summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-12-07 08:55:05 -0500
committerAnthony G. Basile <blueness@gentoo.org>2011-12-07 08:55:05 -0500
commitd5dad4d1e8525930f6556cfb19b360770cb54eda (patch)
tree32e39c777fa8549eeae41fd68289ac43eb16777b
parentGrsec/PaX: 2.6.32.49-201111292107 + 2.2.2-3.1.4-201112021740 (diff)
downloadhardened-patchset-d5dad4d1e8525930f6556cfb19b360770cb54eda.tar.gz
hardened-patchset-d5dad4d1e8525930f6556cfb19b360770cb54eda.tar.bz2
hardened-patchset-d5dad4d1e8525930f6556cfb19b360770cb54eda.zip
Grsec/PaX: 2.2.2-2.6.32.49-201112041811 + 2.2.2-3.1.4-20111204181120111204
-rw-r--r--2.6.32/0000_README2
-rw-r--r--2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201112041811.patch (renamed from 2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201111292107.patch)27087
-rw-r--r--3.1.4/0000_README2
-rw-r--r--3.1.4/4420_grsecurity-2.2.2-3.1.4-201112041811.patch (renamed from 3.1.4/4420_grsecurity-2.2.2-3.1.4-201112021740.patch)24546
4 files changed, 27954 insertions, 23683 deletions
diff --git a/2.6.32/0000_README b/2.6.32/0000_README
index 5ce8a2a..fd7832e 100644
--- a/2.6.32/0000_README
+++ b/2.6.32/0000_README
@@ -3,7 +3,7 @@ README
Individual Patch Descriptions:
-----------------------------------------------------------------------------
-Patch: 4420_grsecurity-2.2.2-2.6.32.49-201111292107.patch
+Patch: 4420_grsecurity-2.2.2-2.6.32.49-201112041811.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201111292107.patch b/2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201112041811.patch
index d13b039..dce7335 100644
--- a/2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201111292107.patch
+++ b/2.6.32/4420_grsecurity-2.2.2-2.6.32.49-201112041811.patch
@@ -1,7 +1,407 @@
-diff -urNp linux-2.6.32.49/arch/alpha/include/asm/elf.h linux-2.6.32.49/arch/alpha/include/asm/elf.h
---- linux-2.6.32.49/arch/alpha/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/alpha/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -91,6 +91,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/Documentation/dontdiff b/Documentation/dontdiff
+index e1efc40..47f0daf 100644
+--- a/Documentation/dontdiff
++++ b/Documentation/dontdiff
+@@ -1,15 +1,19 @@
+ *.a
+ *.aux
+ *.bin
++*.cis
+ *.cpio
+ *.csp
++*.dbg
+ *.dsp
+ *.dvi
+ *.elf
+ *.eps
+ *.fw
++*.gcno
+ *.gen.S
+ *.gif
++*.gmo
+ *.grep
+ *.grp
+ *.gz
+@@ -38,8 +42,10 @@
+ *.tab.h
+ *.tex
+ *.ver
++*.vim
+ *.xml
+ *_MODULES
++*_reg_safe.h
+ *_vga16.c
+ *~
+ *.9
+@@ -49,11 +55,16 @@
+ 53c700_d.h
+ CVS
+ ChangeSet
++GPATH
++GRTAGS
++GSYMS
++GTAGS
+ Image
+ Kerntypes
+ Module.markers
+ Module.symvers
+ PENDING
++PERF*
+ SCCS
+ System.map*
+ TAGS
+@@ -76,7 +87,11 @@ btfixupprep
+ build
+ bvmlinux
+ bzImage*
++capability_names.h
++capflags.c
+ classlist.h*
++clut_vga16.c
++common-cmds.h
+ comp*.log
+ compile.h*
+ conf
+@@ -84,6 +99,8 @@ config
+ config-*
+ config_data.h*
+ config_data.gz*
++config.c
++config.tmp
+ conmakehash
+ consolemap_deftbl.c*
+ cpustr.h
+@@ -97,19 +114,23 @@ elfconfig.h*
+ fixdep
+ fore200e_mkfirm
+ fore200e_pca_fw.c*
++gate.lds
+ gconf
+ gen-devlist
+ gen_crc32table
+ gen_init_cpio
+ genksyms
+ *_gray256.c
++hash
++hid-example
+ ihex2fw
+ ikconfig.h*
+ initramfs_data.cpio
++initramfs_data.cpio.bz2
+ initramfs_data.cpio.gz
+ initramfs_list
+ kallsyms
+-kconfig
++kern_constants.h
+ keywords.c
+ ksym.c*
+ ksym.h*
+@@ -127,13 +148,16 @@ machtypes.h
+ map
+ maui_boot.h
+ mconf
++mdp
+ miboot*
+ mk_elfconfig
+ mkboot
+ mkbugboot
+ mkcpustr
+ mkdep
++mkpiggy
+ mkprep
++mkregtable
+ mktables
+ mktree
+ modpost
+@@ -149,6 +173,7 @@ patches*
+ pca200e.bin
+ pca200e_ecd.bin2
+ piggy.gz
++piggy.S
+ piggyback
+ pnmtologo
+ ppc_defs.h*
+@@ -157,12 +182,15 @@ qconf
+ raid6altivec*.c
+ raid6int*.c
+ raid6tables.c
++regdb.c
+ relocs
++rlim_names.h
+ series
+ setup
+ setup.bin
+ setup.elf
+ sImage
++slabinfo
+ sm_tbl*
+ split-include
+ syscalltab.h
+@@ -171,6 +199,7 @@ tftpboot.img
+ timeconst.h
+ times.h*
+ trix_boot.h
++user_constants.h
+ utsrelease.h*
+ vdso-syms.lds
+ vdso.lds
+@@ -186,14 +215,20 @@ version.h*
+ vmlinux
+ vmlinux-*
+ vmlinux.aout
++vmlinux.bin.all
++vmlinux.bin.bz2
+ vmlinux.lds
++vmlinux.relocs
++voffset.h
+ vsyscall.lds
+ vsyscall_32.lds
+ wanxlfw.inc
+ uImage
+ unifdef
++utsrelease.h
+ wakeup.bin
+ wakeup.elf
+ wakeup.lds
+ zImage*
+ zconf.hash.c
++zoffset.h
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index c840e7d..f4c451c 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1837,6 +1837,13 @@ and is between 256 and 4096 characters. It is defined in the file
+ the specified number of seconds. This is to be used if
+ your oopses keep scrolling off the screen.
+
++ pax_nouderef [X86] disables UDEREF. Most likely needed under certain
++ virtualization environments that don't cope well with the
++ expand down segment used by UDEREF on X86-32 or the frequent
++ page table updates on X86-64.
++
++ pax_softmode= 0/1 to disable/enable PaX softmode on boot already.
++
+ pcbit= [HW,ISDN]
+
+ pcd. [PARIDE]
+diff --git a/Makefile b/Makefile
+index a19b0e8..f773d59 100644
+--- a/Makefile
++++ b/Makefile
+@@ -221,8 +221,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+
+ HOSTCC = gcc
+ HOSTCXX = g++
+-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
+-HOSTCXXFLAGS = -O2
++HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
++HOSTCFLAGS += $(call cc-option, -Wno-empty-body)
++HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
+
+ # Decide whether to build built-in, modular, or both.
+ # Normally, just do built-in.
+@@ -376,8 +377,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
+ # Rules shared between *config targets and build targets
+
+ # Basic helpers built in scripts/
+-PHONY += scripts_basic
+-scripts_basic:
++PHONY += scripts_basic gcc-plugins
++scripts_basic: gcc-plugins
+ $(Q)$(MAKE) $(build)=scripts/basic
+
+ # To avoid any implicit rule to kick in, define an empty command.
+@@ -403,7 +404,7 @@ endif
+ # of make so .config is not included in this case either (for *config).
+
+ no-dot-config-targets := clean mrproper distclean \
+- cscope TAGS tags help %docs check% \
++ cscope gtags TAGS tags help %docs check% \
+ include/linux/version.h headers_% \
+ kernelrelease kernelversion
+
+@@ -526,6 +527,42 @@ else
+ KBUILD_CFLAGS += -O2
+ endif
+
++ifndef DISABLE_PAX_PLUGINS
++ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)
++ifndef DISABLE_PAX_CONSTIFY_PLUGIN
++CONSTIFY_PLUGIN := -fplugin=$(objtree)/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN
++endif
++ifdef CONFIG_PAX_MEMORY_STACKLEAK
++STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -DSTACKLEAK_PLUGIN
++STACKLEAK_PLUGIN += -fplugin-arg-stackleak_plugin-track-lowest-sp=100
++endif
++ifdef CONFIG_KALLOCSTAT_PLUGIN
++KALLOCSTAT_PLUGIN := -fplugin=$(objtree)/tools/gcc/kallocstat_plugin.so
++endif
++ifdef CONFIG_PAX_KERNEXEC_PLUGIN
++KERNEXEC_PLUGIN := -fplugin=$(objtree)/tools/gcc/kernexec_plugin.so
++KERNEXEC_PLUGIN += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD)
++endif
++ifdef CONFIG_CHECKER_PLUGIN
++ifeq ($(call cc-ifversion, -ge, 0406, y), y)
++CHECKER_PLUGIN := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
++endif
++endif
++GCC_PLUGINS := $(CONSTIFY_PLUGIN) $(STACKLEAK_PLUGIN) $(KALLOCSTAT_PLUGIN) $(KERNEXEC_PLUGIN) $(CHECKER_PLUGIN)
++export CONSTIFY_PLUGIN STACKLEAK_PLUGIN KERNEXEC_PLUGIN CHECKER_PLUGIN
++gcc-plugins:
++ $(Q)$(MAKE) $(build)=tools/gcc
++else
++gcc-plugins:
++ifeq ($(call cc-ifversion, -ge, 0405, y), y)
++ $(error Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.))
++else
++ $(Q)echo "warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least"
++endif
++ $(Q)echo "PAX_MEMORY_STACKLEAK and constification will be less secure"
++endif
++endif
++
+ include $(srctree)/arch/$(SRCARCH)/Makefile
+
+ ifneq ($(CONFIG_FRAME_WARN),0)
+@@ -647,7 +684,7 @@ export mod_strip_cmd
+
+
+ ifeq ($(KBUILD_EXTMOD),)
+-core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
++core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
+
+ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
+ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+@@ -868,6 +905,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
+
+ # The actual objects are generated when descending,
+ # make sure no implicit rule kicks in
++$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): KBUILD_CFLAGS += $(GCC_PLUGINS)
+ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
+
+ # Handle descending into subdirectories listed in $(vmlinux-dirs)
+@@ -877,7 +915,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
+ # Error messages still appears in the original language
+
+ PHONY += $(vmlinux-dirs)
+-$(vmlinux-dirs): prepare scripts
++$(vmlinux-dirs): gcc-plugins prepare scripts
+ $(Q)$(MAKE) $(build)=$@
+
+ # Build the kernel release string
+@@ -986,6 +1024,7 @@ prepare0: archprepare FORCE
+ $(Q)$(MAKE) $(build)=. missing-syscalls
+
+ # All the preparing..
++prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS),$(KBUILD_CFLAGS))
+ prepare: prepare0
+
+ # The asm symlink changes when $(ARCH) changes.
+@@ -1127,6 +1166,7 @@ all: modules
+ # using awk while concatenating to the final file.
+
+ PHONY += modules
++modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
+ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
+ $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
+ @$(kecho) ' Building modules, stage 2.';
+@@ -1136,7 +1176,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
+
+ # Target to prepare building external modules
+ PHONY += modules_prepare
+-modules_prepare: prepare scripts
++modules_prepare: gcc-plugins prepare scripts
+
+ # Target to install modules
+ PHONY += modules_install
+@@ -1201,7 +1241,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
+ include/linux/autoconf.h include/linux/version.h \
+ include/linux/utsrelease.h \
+ include/linux/bounds.h include/asm*/asm-offsets.h \
+- Module.symvers Module.markers tags TAGS cscope*
++ Module.symvers Module.markers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
+
+ # clean - Delete most, but leave enough to build external modules
+ #
+@@ -1245,7 +1285,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 -size 0 \
++ -o -name '.*.rej' -o -name '*.so' -o -size 0 \
+ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
+ -type f -print | xargs rm -f
+
+@@ -1292,6 +1332,7 @@ help:
+ @echo ' modules_prepare - Set up for building external modules'
+ @echo ' tags/TAGS - Generate tags file for editors'
+ @echo ' cscope - Generate cscope index'
++ @echo ' gtags - Generate GNU GLOBAL index'
+ @echo ' kernelrelease - Output the release version string'
+ @echo ' kernelversion - Output the version stored in Makefile'
+ @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
+@@ -1393,6 +1434,7 @@ PHONY += $(module-dirs) modules
+ $(module-dirs): crmodverdir $(objtree)/Module.symvers
+ $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+
++modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
+ modules: $(module-dirs)
+ @$(kecho) ' Building modules, stage 2.';
+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+@@ -1448,7 +1490,7 @@ endif # KBUILD_EXTMOD
+ quiet_cmd_tags = GEN $@
+ cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
+
+-tags TAGS cscope: FORCE
++tags TAGS cscope gtags: FORCE
+ $(call cmd,tags)
+
+ # Scripts to check various things for consistency
+@@ -1513,17 +1555,19 @@ else
+ target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
+ endif
+
+-%.s: %.c prepare scripts FORCE
++%.s: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.s: %.c gcc-plugins 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: %.c prepare scripts FORCE
++%.o: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.o: %.c gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ %.lst: %.c prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+-%.s: %.S prepare scripts FORCE
++%.s: %.S gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+-%.o: %.S prepare scripts FORCE
++%.o: %.S gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ %.symtypes: %.c prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+@@ -1533,11 +1577,13 @@ endif
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir)
+-%/: prepare scripts FORCE
++%/: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%/: gcc-plugins prepare scripts FORCE
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir)
+-%.ko: prepare scripts FORCE
++%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.ko: gcc-plugins prepare scripts FORCE
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir) $(@:.ko=.o)
+diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
+index 5c75c1b..c82f878 100644
+--- a/arch/alpha/include/asm/elf.h
++++ b/arch/alpha/include/asm/elf.h
+@@ -91,6 +91,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
@@ -15,9 +415,10 @@ diff -urNp linux-2.6.32.49/arch/alpha/include/asm/elf.h linux-2.6.32.49/arch/alp
/* $0 is set by ld.so to a pointer to a function which might be
registered using atexit. This provides a mean for the dynamic
linker to call DT_FINI functions for shared libraries that have
-diff -urNp linux-2.6.32.49/arch/alpha/include/asm/pgtable.h linux-2.6.32.49/arch/alpha/include/asm/pgtable.h
---- linux-2.6.32.49/arch/alpha/include/asm/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/alpha/include/asm/pgtable.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
+index 3f0c59f..cf1e100 100644
+--- a/arch/alpha/include/asm/pgtable.h
++++ b/arch/alpha/include/asm/pgtable.h
@@ -101,6 +101,17 @@ struct vm_area_struct;
#define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
#define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
@@ -36,10 +437,11 @@ diff -urNp linux-2.6.32.49/arch/alpha/include/asm/pgtable.h linux-2.6.32.49/arch
#define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
-diff -urNp linux-2.6.32.49/arch/alpha/kernel/module.c linux-2.6.32.49/arch/alpha/kernel/module.c
---- linux-2.6.32.49/arch/alpha/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/alpha/kernel/module.c 2011-11-15 19:59:42.000000000 -0500
-@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
+diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
+index ebc3c89..20cfa63 100644
+--- a/arch/alpha/kernel/module.c
++++ b/arch/alpha/kernel/module.c
+@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
/* The small sections were sorted to the end of the segment.
The following should definitely cover them. */
@@ -48,10 +450,11 @@ diff -urNp linux-2.6.32.49/arch/alpha/kernel/module.c linux-2.6.32.49/arch/alpha
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.32.49/arch/alpha/kernel/osf_sys.c linux-2.6.32.49/arch/alpha/kernel/osf_sys.c
---- linux-2.6.32.49/arch/alpha/kernel/osf_sys.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/alpha/kernel/osf_sys.c 2011-11-15 19:59:42.000000000 -0500
-@@ -1172,7 +1172,7 @@ arch_get_unmapped_area_1(unsigned long a
+diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
+index a94e49c..d71dd44 100644
+--- a/arch/alpha/kernel/osf_sys.c
++++ b/arch/alpha/kernel/osf_sys.c
+@@ -1172,7 +1172,7 @@ arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
@@ -60,7 +463,7 @@ diff -urNp linux-2.6.32.49/arch/alpha/kernel/osf_sys.c linux-2.6.32.49/arch/alph
return addr;
addr = vma->vm_end;
vma = vma->vm_next;
-@@ -1208,6 +1208,10 @@ arch_get_unmapped_area(struct file *filp
+@@ -1208,6 +1208,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
@@ -71,7 +474,7 @@ diff -urNp linux-2.6.32.49/arch/alpha/kernel/osf_sys.c linux-2.6.32.49/arch/alph
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != (unsigned long) -ENOMEM)
-@@ -1215,8 +1219,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1215,8 +1219,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
@@ -82,10 +485,11 @@ diff -urNp linux-2.6.32.49/arch/alpha/kernel/osf_sys.c linux-2.6.32.49/arch/alph
if (addr != (unsigned long) -ENOMEM)
return addr;
-diff -urNp linux-2.6.32.49/arch/alpha/mm/fault.c linux-2.6.32.49/arch/alpha/mm/fault.c
---- linux-2.6.32.49/arch/alpha/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/alpha/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
-@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
+diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
+index 00a31de..2ded0f2 100644
+--- a/arch/alpha/mm/fault.c
++++ b/arch/alpha/mm/fault.c
+@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *next_mm)
__reload_thread(pcb);
}
@@ -210,7 +614,7 @@ diff -urNp linux-2.6.32.49/arch/alpha/mm/fault.c linux-2.6.32.49/arch/alpha/mm/f
/*
* This routine handles page faults. It determines the address,
-@@ -131,8 +249,29 @@ do_page_fault(unsigned long address, uns
+@@ -131,8 +249,29 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
good_area:
si_code = SEGV_ACCERR;
if (cause < 0) {
@@ -241,10 +645,11 @@ diff -urNp linux-2.6.32.49/arch/alpha/mm/fault.c linux-2.6.32.49/arch/alpha/mm/f
} else if (!cause) {
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.32.49/arch/arm/include/asm/elf.h linux-2.6.32.49/arch/arm/include/asm/elf.h
---- linux-2.6.32.49/arch/arm/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -109,7 +109,14 @@ int dump_task_regs(struct task_struct *t
+diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
+index 6aac3f5..265536b 100644
+--- a/arch/arm/include/asm/elf.h
++++ b/arch/arm/include/asm/elf.h
+@@ -109,7 +109,14 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -260,9 +665,10 @@ diff -urNp linux-2.6.32.49/arch/arm/include/asm/elf.h linux-2.6.32.49/arch/arm/i
/* When the program starts, a1 contains a pointer to a function to be
registered with atexit, as per the SVR4 ABI. A value of 0 means we
-diff -urNp linux-2.6.32.49/arch/arm/include/asm/kmap_types.h linux-2.6.32.49/arch/arm/include/asm/kmap_types.h
---- linux-2.6.32.49/arch/arm/include/asm/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/include/asm/kmap_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h
+index c019949..388fdd1 100644
+--- a/arch/arm/include/asm/kmap_types.h
++++ b/arch/arm/include/asm/kmap_types.h
@@ -19,6 +19,7 @@ enum km_type {
KM_SOFTIRQ0,
KM_SOFTIRQ1,
@@ -271,9 +677,10 @@ diff -urNp linux-2.6.32.49/arch/arm/include/asm/kmap_types.h linux-2.6.32.49/arc
KM_TYPE_NR
};
-diff -urNp linux-2.6.32.49/arch/arm/include/asm/uaccess.h linux-2.6.32.49/arch/arm/include/asm/uaccess.h
---- linux-2.6.32.49/arch/arm/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
+index 1d6bd40..fba0cb9 100644
+--- a/arch/arm/include/asm/uaccess.h
++++ b/arch/arm/include/asm/uaccess.h
@@ -22,6 +22,8 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1
@@ -309,7 +716,7 @@ diff -urNp linux-2.6.32.49/arch/arm/include/asm/uaccess.h linux-2.6.32.49/arch/a
extern unsigned long __must_check __copy_to_user_std(void __user *to, const void *from, unsigned long n);
extern unsigned long __must_check __clear_user(void __user *addr, unsigned long n);
extern unsigned long __must_check __clear_user_std(void __user *addr, unsigned long n);
-@@ -403,6 +420,9 @@ extern unsigned long __must_check __strn
+@@ -403,6 +420,9 @@ extern unsigned long __must_check __strnlen_user(const char __user *s, long n);
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -319,7 +726,7 @@ diff -urNp linux-2.6.32.49/arch/arm/include/asm/uaccess.h linux-2.6.32.49/arch/a
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
else /* security hole - plug it */
-@@ -412,6 +432,9 @@ static inline unsigned long __must_check
+@@ -412,6 +432,9 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -329,9 +736,10 @@ diff -urNp linux-2.6.32.49/arch/arm/include/asm/uaccess.h linux-2.6.32.49/arch/a
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-diff -urNp linux-2.6.32.49/arch/arm/kernel/armksyms.c linux-2.6.32.49/arch/arm/kernel/armksyms.c
---- linux-2.6.32.49/arch/arm/kernel/armksyms.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/kernel/armksyms.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
+index 0e62770..e2c2cd6 100644
+--- a/arch/arm/kernel/armksyms.c
++++ b/arch/arm/kernel/armksyms.c
@@ -118,8 +118,8 @@ EXPORT_SYMBOL(__strncpy_from_user);
#ifdef CONFIG_MMU
EXPORT_SYMBOL(copy_page);
@@ -343,9 +751,10 @@ diff -urNp linux-2.6.32.49/arch/arm/kernel/armksyms.c linux-2.6.32.49/arch/arm/k
EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(__get_user_1);
-diff -urNp linux-2.6.32.49/arch/arm/kernel/kgdb.c linux-2.6.32.49/arch/arm/kernel/kgdb.c
---- linux-2.6.32.49/arch/arm/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/kernel/kgdb.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c
+index ba8ccfe..2dc34dc 100644
+--- a/arch/arm/kernel/kgdb.c
++++ b/arch/arm/kernel/kgdb.c
@@ -190,7 +190,7 @@ void kgdb_arch_exit(void)
* and we handle the normal undef case within the do_undefinstr
* handler.
@@ -355,10 +764,11 @@ diff -urNp linux-2.6.32.49/arch/arm/kernel/kgdb.c linux-2.6.32.49/arch/arm/kerne
#ifndef __ARMEB__
.gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
#else /* ! __ARMEB__ */
-diff -urNp linux-2.6.32.49/arch/arm/kernel/traps.c linux-2.6.32.49/arch/arm/kernel/traps.c
---- linux-2.6.32.49/arch/arm/kernel/traps.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/kernel/traps.c 2011-11-15 19:59:42.000000000 -0500
-@@ -247,6 +247,8 @@ static void __die(const char *str, int e
+diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
+index 3f361a7..6e806e1 100644
+--- a/arch/arm/kernel/traps.c
++++ b/arch/arm/kernel/traps.c
+@@ -247,6 +247,8 @@ static void __die(const char *str, int err, struct thread_info *thread, struct p
DEFINE_SPINLOCK(die_lock);
@@ -367,7 +777,7 @@ diff -urNp linux-2.6.32.49/arch/arm/kernel/traps.c linux-2.6.32.49/arch/arm/kern
/*
* This function is protected against re-entrancy.
*/
-@@ -271,6 +273,8 @@ NORET_TYPE void die(const char *str, str
+@@ -271,6 +273,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
if (panic_on_oops)
panic("Fatal exception");
@@ -376,9 +786,10 @@ diff -urNp linux-2.6.32.49/arch/arm/kernel/traps.c linux-2.6.32.49/arch/arm/kern
do_exit(SIGSEGV);
}
-diff -urNp linux-2.6.32.49/arch/arm/lib/copy_from_user.S linux-2.6.32.49/arch/arm/lib/copy_from_user.S
---- linux-2.6.32.49/arch/arm/lib/copy_from_user.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/lib/copy_from_user.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S
+index e4fe124..0fc246b 100644
+--- a/arch/arm/lib/copy_from_user.S
++++ b/arch/arm/lib/copy_from_user.S
@@ -16,7 +16,7 @@
/*
* Prototype:
@@ -402,9 +813,10 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/copy_from_user.S linux-2.6.32.49/arch/ar
.section .fixup,"ax"
.align 0
-diff -urNp linux-2.6.32.49/arch/arm/lib/copy_to_user.S linux-2.6.32.49/arch/arm/lib/copy_to_user.S
---- linux-2.6.32.49/arch/arm/lib/copy_to_user.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/lib/copy_to_user.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S
+index 1a71e15..ac7b258 100644
+--- a/arch/arm/lib/copy_to_user.S
++++ b/arch/arm/lib/copy_to_user.S
@@ -16,7 +16,7 @@
/*
* Prototype:
@@ -428,9 +840,10 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/copy_to_user.S linux-2.6.32.49/arch/arm/
.section .fixup,"ax"
.align 0
-diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/uaccess.S
---- linux-2.6.32.49/arch/arm/lib/uaccess.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/lib/uaccess.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S
+index ffdd274..91017b6 100644
+--- a/arch/arm/lib/uaccess.S
++++ b/arch/arm/lib/uaccess.S
@@ -19,7 +19,7 @@
#define PAGE_SHIFT 12
@@ -440,7 +853,7 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/u
* Purpose : copy a block to user memory from kernel memory
* Params : to - user memory
* : from - kernel memory
-@@ -39,7 +39,7 @@ USER( strgtbt r3, [r0], #1) @ May fau
+@@ -39,7 +39,7 @@ USER( strgtbt r3, [r0], #1) @ May fault
sub r2, r2, ip
b .Lc2u_dest_aligned
@@ -449,7 +862,7 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/u
stmfd sp!, {r2, r4 - r7, lr}
cmp r2, #4
blt .Lc2u_not_enough
-@@ -277,14 +277,14 @@ USER( strgebt r3, [r0], #1) @ May fau
+@@ -277,14 +277,14 @@ USER( strgebt r3, [r0], #1) @ May fault
ldrgtb r3, [r1], #0
USER( strgtbt r3, [r0], #1) @ May fault
b .Lc2u_finished
@@ -466,7 +879,7 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/u
* Purpose : copy a block from user memory to kernel memory
* Params : to - kernel memory
* : from - user memory
-@@ -303,7 +303,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fau
+@@ -303,7 +303,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault
sub r2, r2, ip
b .Lcfu_dest_aligned
@@ -475,7 +888,7 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/u
stmfd sp!, {r0, r2, r4 - r7, lr}
cmp r2, #4
blt .Lcfu_not_enough
-@@ -543,7 +543,7 @@ USER( ldrgebt r3, [r1], #1) @ May fau
+@@ -543,7 +543,7 @@ USER( ldrgebt r3, [r1], #1) @ May fault
USER( ldrgtbt r3, [r1], #1) @ May fault
strgtb r3, [r0], #1
b .Lcfu_finished
@@ -484,9 +897,10 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess.S linux-2.6.32.49/arch/arm/lib/u
.section .fixup,"ax"
.align 0
-diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess_with_memcpy.c linux-2.6.32.49/arch/arm/lib/uaccess_with_memcpy.c
---- linux-2.6.32.49/arch/arm/lib/uaccess_with_memcpy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/lib/uaccess_with_memcpy.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
+index 6b967ff..67d5b2b 100644
+--- a/arch/arm/lib/uaccess_with_memcpy.c
++++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -97,7 +97,7 @@ out:
}
@@ -496,9 +910,10 @@ diff -urNp linux-2.6.32.49/arch/arm/lib/uaccess_with_memcpy.c linux-2.6.32.49/ar
{
/*
* This test is stubbed out of the main function above to keep
-diff -urNp linux-2.6.32.49/arch/arm/mach-at91/pm.c linux-2.6.32.49/arch/arm/mach-at91/pm.c
---- linux-2.6.32.49/arch/arm/mach-at91/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-at91/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
+index 4028724..beec230 100644
+--- a/arch/arm/mach-at91/pm.c
++++ b/arch/arm/mach-at91/pm.c
@@ -348,7 +348,7 @@ static void at91_pm_end(void)
}
@@ -508,10 +923,11 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-at91/pm.c linux-2.6.32.49/arch/arm/mach
.valid = at91_pm_valid_state,
.begin = at91_pm_begin,
.enter = at91_pm_enter,
-diff -urNp linux-2.6.32.49/arch/arm/mach-omap1/pm.c linux-2.6.32.49/arch/arm/mach-omap1/pm.c
---- linux-2.6.32.49/arch/arm/mach-omap1/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-omap1/pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq
+diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
+index 5218943..0a34552 100644
+--- a/arch/arm/mach-omap1/pm.c
++++ b/arch/arm/mach-omap1/pm.c
+@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq = {
@@ -520,9 +936,10 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-omap1/pm.c linux-2.6.32.49/arch/arm/mac
.prepare = omap_pm_prepare,
.enter = omap_pm_enter,
.finish = omap_pm_finish,
-diff -urNp linux-2.6.32.49/arch/arm/mach-omap2/pm24xx.c linux-2.6.32.49/arch/arm/mach-omap2/pm24xx.c
---- linux-2.6.32.49/arch/arm/mach-omap2/pm24xx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-omap2/pm24xx.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
+index bff5c4e..d4c649b 100644
+--- a/arch/arm/mach-omap2/pm24xx.c
++++ b/arch/arm/mach-omap2/pm24xx.c
@@ -326,7 +326,7 @@ static void omap2_pm_finish(void)
enable_hlt();
}
@@ -532,9 +949,10 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-omap2/pm24xx.c linux-2.6.32.49/arch/arm
.prepare = omap2_pm_prepare,
.enter = omap2_pm_enter,
.finish = omap2_pm_finish,
-diff -urNp linux-2.6.32.49/arch/arm/mach-omap2/pm34xx.c linux-2.6.32.49/arch/arm/mach-omap2/pm34xx.c
---- linux-2.6.32.49/arch/arm/mach-omap2/pm34xx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-omap2/pm34xx.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
+index 8946319..7d3e661 100644
+--- a/arch/arm/mach-omap2/pm34xx.c
++++ b/arch/arm/mach-omap2/pm34xx.c
@@ -401,7 +401,7 @@ static void omap3_pm_end(void)
return;
}
@@ -544,10 +962,11 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-omap2/pm34xx.c linux-2.6.32.49/arch/arm
.begin = omap3_pm_begin,
.end = omap3_pm_end,
.prepare = omap3_pm_prepare,
-diff -urNp linux-2.6.32.49/arch/arm/mach-pnx4008/pm.c linux-2.6.32.49/arch/arm/mach-pnx4008/pm.c
---- linux-2.6.32.49/arch/arm/mach-pnx4008/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-pnx4008/pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -116,7 +116,7 @@ static int pnx4008_pm_valid(suspend_stat
+diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
+index b3d8d53..6e68ebc 100644
+--- a/arch/arm/mach-pnx4008/pm.c
++++ b/arch/arm/mach-pnx4008/pm.c
+@@ -116,7 +116,7 @@ static int pnx4008_pm_valid(suspend_state_t state)
(state == PM_SUSPEND_MEM);
}
@@ -556,9 +975,10 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-pnx4008/pm.c linux-2.6.32.49/arch/arm/m
.enter = pnx4008_pm_enter,
.valid = pnx4008_pm_valid,
};
-diff -urNp linux-2.6.32.49/arch/arm/mach-pxa/pm.c linux-2.6.32.49/arch/arm/mach-pxa/pm.c
---- linux-2.6.32.49/arch/arm/mach-pxa/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-pxa/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
+index 7693355..9beb00a 100644
+--- a/arch/arm/mach-pxa/pm.c
++++ b/arch/arm/mach-pxa/pm.c
@@ -95,7 +95,7 @@ void pxa_pm_finish(void)
pxa_cpu_pm_fns->finish();
}
@@ -568,10 +988,11 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-pxa/pm.c linux-2.6.32.49/arch/arm/mach-
.valid = pxa_pm_valid,
.enter = pxa_pm_enter,
.prepare = pxa_pm_prepare,
-diff -urNp linux-2.6.32.49/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.32.49/arch/arm/mach-pxa/sharpsl_pm.c
---- linux-2.6.32.49/arch/arm/mach-pxa/sharpsl_pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-pxa/sharpsl_pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -891,7 +891,7 @@ static void sharpsl_apm_get_power_status
+diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
+index 629e05d..06be589 100644
+--- a/arch/arm/mach-pxa/sharpsl_pm.c
++++ b/arch/arm/mach-pxa/sharpsl_pm.c
+@@ -891,7 +891,7 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
}
#ifdef CONFIG_PM
@@ -580,9 +1001,10 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.32.49/arch/a
.prepare = pxa_pm_prepare,
.finish = pxa_pm_finish,
.enter = corgi_pxa_pm_enter,
-diff -urNp linux-2.6.32.49/arch/arm/mach-sa1100/pm.c linux-2.6.32.49/arch/arm/mach-sa1100/pm.c
---- linux-2.6.32.49/arch/arm/mach-sa1100/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mach-sa1100/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
+index c83fdc8..ab9fc44 100644
+--- a/arch/arm/mach-sa1100/pm.c
++++ b/arch/arm/mach-sa1100/pm.c
@@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp)
return virt_to_phys(sp);
}
@@ -592,10 +1014,11 @@ diff -urNp linux-2.6.32.49/arch/arm/mach-sa1100/pm.c linux-2.6.32.49/arch/arm/ma
.enter = sa11x0_pm_enter,
.valid = suspend_valid_only_mem,
};
-diff -urNp linux-2.6.32.49/arch/arm/mm/fault.c linux-2.6.32.49/arch/arm/mm/fault.c
---- linux-2.6.32.49/arch/arm/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
-@@ -166,6 +166,13 @@ __do_user_fault(struct task_struct *tsk,
+diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
+index 3191cd6..c0739db 100644
+--- a/arch/arm/mm/fault.c
++++ b/arch/arm/mm/fault.c
+@@ -166,6 +166,13 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
}
#endif
@@ -609,7 +1032,7 @@ diff -urNp linux-2.6.32.49/arch/arm/mm/fault.c linux-2.6.32.49/arch/arm/mm/fault
tsk->thread.address = addr;
tsk->thread.error_code = fsr;
tsk->thread.trap_no = 14;
-@@ -357,6 +364,33 @@ do_page_fault(unsigned long addr, unsign
+@@ -357,6 +364,33 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
}
#endif /* CONFIG_MMU */
@@ -643,10 +1066,11 @@ diff -urNp linux-2.6.32.49/arch/arm/mm/fault.c linux-2.6.32.49/arch/arm/mm/fault
/*
* First Level Translation Fault Handler
*
-diff -urNp linux-2.6.32.49/arch/arm/mm/mmap.c linux-2.6.32.49/arch/arm/mm/mmap.c
---- linux-2.6.32.49/arch/arm/mm/mmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/mm/mmap.c 2011-11-15 19:59:42.000000000 -0500
-@@ -63,6 +63,10 @@ arch_get_unmapped_area(struct file *filp
+diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
+index f5abc51..7ec524c 100644
+--- a/arch/arm/mm/mmap.c
++++ b/arch/arm/mm/mmap.c
+@@ -63,6 +63,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (len > TASK_SIZE)
return -ENOMEM;
@@ -657,7 +1081,7 @@ diff -urNp linux-2.6.32.49/arch/arm/mm/mmap.c linux-2.6.32.49/arch/arm/mm/mmap.c
if (addr) {
if (do_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -70,15 +74,14 @@ arch_get_unmapped_area(struct file *filp
+@@ -70,15 +74,14 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -695,9 +1119,10 @@ diff -urNp linux-2.6.32.49/arch/arm/mm/mmap.c linux-2.6.32.49/arch/arm/mm/mmap.c
/*
* Remember the place where we stopped the search:
*/
-diff -urNp linux-2.6.32.49/arch/arm/plat-s3c/pm.c linux-2.6.32.49/arch/arm/plat-s3c/pm.c
---- linux-2.6.32.49/arch/arm/plat-s3c/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/arm/plat-s3c/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c
+index 8d97db2..b66cfa5 100644
+--- a/arch/arm/plat-s3c/pm.c
++++ b/arch/arm/plat-s3c/pm.c
@@ -355,7 +355,7 @@ static void s3c_pm_finish(void)
s3c_pm_check_cleanup();
}
@@ -707,10 +1132,11 @@ diff -urNp linux-2.6.32.49/arch/arm/plat-s3c/pm.c linux-2.6.32.49/arch/arm/plat-
.enter = s3c_pm_enter,
.prepare = s3c_pm_prepare,
.finish = s3c_pm_finish,
-diff -urNp linux-2.6.32.49/arch/avr32/include/asm/elf.h linux-2.6.32.49/arch/avr32/include/asm/elf.h
---- linux-2.6.32.49/arch/avr32/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/avr32/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -85,8 +85,14 @@ typedef struct user_fpu_struct elf_fpreg
+diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
+index d5d1d41..856e2ed 100644
+--- a/arch/avr32/include/asm/elf.h
++++ b/arch/avr32/include/asm/elf.h
+@@ -85,8 +85,14 @@ typedef struct user_fpu_struct elf_fpregset_t;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -726,9 +1152,10 @@ diff -urNp linux-2.6.32.49/arch/avr32/include/asm/elf.h linux-2.6.32.49/arch/avr
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This could be done in user space,
-diff -urNp linux-2.6.32.49/arch/avr32/include/asm/kmap_types.h linux-2.6.32.49/arch/avr32/include/asm/kmap_types.h
---- linux-2.6.32.49/arch/avr32/include/asm/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/avr32/include/asm/kmap_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/avr32/include/asm/kmap_types.h b/arch/avr32/include/asm/kmap_types.h
+index b7f5c68..556135c 100644
+--- a/arch/avr32/include/asm/kmap_types.h
++++ b/arch/avr32/include/asm/kmap_types.h
@@ -22,7 +22,8 @@ D(10) KM_IRQ0,
D(11) KM_IRQ1,
D(12) KM_SOFTIRQ0,
@@ -739,9 +1166,10 @@ diff -urNp linux-2.6.32.49/arch/avr32/include/asm/kmap_types.h linux-2.6.32.49/a
};
#undef D
-diff -urNp linux-2.6.32.49/arch/avr32/mach-at32ap/pm.c linux-2.6.32.49/arch/avr32/mach-at32ap/pm.c
---- linux-2.6.32.49/arch/avr32/mach-at32ap/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/avr32/mach-at32ap/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/avr32/mach-at32ap/pm.c b/arch/avr32/mach-at32ap/pm.c
+index f021edf..32d680e 100644
+--- a/arch/avr32/mach-at32ap/pm.c
++++ b/arch/avr32/mach-at32ap/pm.c
@@ -176,7 +176,7 @@ out:
return 0;
}
@@ -751,10 +1179,11 @@ diff -urNp linux-2.6.32.49/arch/avr32/mach-at32ap/pm.c linux-2.6.32.49/arch/avr3
.valid = avr32_pm_valid_state,
.enter = avr32_pm_enter,
};
-diff -urNp linux-2.6.32.49/arch/avr32/mm/fault.c linux-2.6.32.49/arch/avr32/mm/fault.c
---- linux-2.6.32.49/arch/avr32/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/avr32/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
-@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
+diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
+index b61d86d..e292c7f 100644
+--- a/arch/avr32/mm/fault.c
++++ b/arch/avr32/mm/fault.c
+@@ -41,6 +41,23 @@ static inline int notify_page_fault(struct pt_regs *regs, int trap)
int exception_trace = 1;
@@ -795,10 +1224,11 @@ diff -urNp linux-2.6.32.49/arch/avr32/mm/fault.c linux-2.6.32.49/arch/avr32/mm/f
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
-diff -urNp linux-2.6.32.49/arch/blackfin/kernel/kgdb.c linux-2.6.32.49/arch/blackfin/kernel/kgdb.c
---- linux-2.6.32.49/arch/blackfin/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/blackfin/kernel/kgdb.c 2011-11-15 19:59:42.000000000 -0500
-@@ -428,7 +428,7 @@ int kgdb_arch_handle_exception(int vecto
+diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
+index cce79d0..c406c85 100644
+--- a/arch/blackfin/kernel/kgdb.c
++++ b/arch/blackfin/kernel/kgdb.c
+@@ -428,7 +428,7 @@ int kgdb_arch_handle_exception(int vector, int signo,
return -1; /* this means that we do not want to exit from the handler */
}
@@ -807,10 +1237,11 @@ diff -urNp linux-2.6.32.49/arch/blackfin/kernel/kgdb.c linux-2.6.32.49/arch/blac
.gdb_bpt_instr = {0xa1},
#ifdef CONFIG_SMP
.flags = KGDB_HW_BREAKPOINT|KGDB_THR_PROC_SWAP,
-diff -urNp linux-2.6.32.49/arch/blackfin/mach-common/pm.c linux-2.6.32.49/arch/blackfin/mach-common/pm.c
---- linux-2.6.32.49/arch/blackfin/mach-common/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/blackfin/mach-common/pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -255,7 +255,7 @@ static int bfin_pm_enter(suspend_state_t
+diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
+index 8837be4..b2fb413 100644
+--- a/arch/blackfin/mach-common/pm.c
++++ b/arch/blackfin/mach-common/pm.c
+@@ -255,7 +255,7 @@ static int bfin_pm_enter(suspend_state_t state)
return 0;
}
@@ -819,9 +1250,10 @@ diff -urNp linux-2.6.32.49/arch/blackfin/mach-common/pm.c linux-2.6.32.49/arch/b
.enter = bfin_pm_enter,
.valid = bfin_pm_valid,
};
-diff -urNp linux-2.6.32.49/arch/frv/include/asm/kmap_types.h linux-2.6.32.49/arch/frv/include/asm/kmap_types.h
---- linux-2.6.32.49/arch/frv/include/asm/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/frv/include/asm/kmap_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/frv/include/asm/kmap_types.h b/arch/frv/include/asm/kmap_types.h
+index f8e16b2..c73ff79 100644
+--- a/arch/frv/include/asm/kmap_types.h
++++ b/arch/frv/include/asm/kmap_types.h
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -830,10 +1262,11 @@ diff -urNp linux-2.6.32.49/arch/frv/include/asm/kmap_types.h linux-2.6.32.49/arc
KM_TYPE_NR
};
-diff -urNp linux-2.6.32.49/arch/frv/mm/elf-fdpic.c linux-2.6.32.49/arch/frv/mm/elf-fdpic.c
---- linux-2.6.32.49/arch/frv/mm/elf-fdpic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/frv/mm/elf-fdpic.c 2011-11-15 19:59:42.000000000 -0500
-@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c
+index 385fd30..6c3d97e 100644
+--- a/arch/frv/mm/elf-fdpic.c
++++ b/arch/frv/mm/elf-fdpic.c
+@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (addr) {
addr = PAGE_ALIGN(addr);
vma = find_vma(current->mm, addr);
@@ -843,7 +1276,7 @@ diff -urNp linux-2.6.32.49/arch/frv/mm/elf-fdpic.c linux-2.6.32.49/arch/frv/mm/e
goto success;
}
-@@ -89,7 +88,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -89,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
for (; vma; vma = vma->vm_next) {
if (addr > limit)
break;
@@ -852,7 +1285,7 @@ diff -urNp linux-2.6.32.49/arch/frv/mm/elf-fdpic.c linux-2.6.32.49/arch/frv/mm/e
goto success;
addr = vma->vm_end;
}
-@@ -104,7 +103,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -104,7 +103,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
for (; vma; vma = vma->vm_next) {
if (addr > limit)
break;
@@ -861,9 +1294,10 @@ diff -urNp linux-2.6.32.49/arch/frv/mm/elf-fdpic.c linux-2.6.32.49/arch/frv/mm/e
goto success;
addr = vma->vm_end;
}
-diff -urNp linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c
---- linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
+index e4a80d8..11a7ea1 100644
+--- a/arch/ia64/hp/common/hwsw_iommu.c
++++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -17,7 +17,7 @@
#include <linux/swiotlb.h>
#include <asm/machvec.h>
@@ -873,7 +1307,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.32.49/arch
/* swiotlb declarations & definitions: */
extern int swiotlb_late_init_with_default_size (size_t size);
-@@ -33,7 +33,7 @@ static inline int use_swiotlb(struct dev
+@@ -33,7 +33,7 @@ static inline int use_swiotlb(struct device *dev)
!sba_dma_ops.dma_supported(dev, *dev->dma_mask);
}
@@ -882,10 +1316,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.32.49/arch
{
if (use_swiotlb(dev))
return &swiotlb_dma_ops;
-diff -urNp linux-2.6.32.49/arch/ia64/hp/common/sba_iommu.c linux-2.6.32.49/arch/ia64/hp/common/sba_iommu.c
---- linux-2.6.32.49/arch/ia64/hp/common/sba_iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/hp/common/sba_iommu.c 2011-11-15 19:59:42.000000000 -0500
-@@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_d
+diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
+index 01ae69b..35752fd 100644
+--- a/arch/ia64/hp/common/sba_iommu.c
++++ b/arch/ia64/hp/common/sba_iommu.c
+@@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_driver = {
},
};
@@ -903,10 +1338,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/hp/common/sba_iommu.c linux-2.6.32.49/arch/
.alloc_coherent = sba_alloc_coherent,
.free_coherent = sba_free_coherent,
.map_page = sba_map_page,
-diff -urNp linux-2.6.32.49/arch/ia64/ia32/binfmt_elf32.c linux-2.6.32.49/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.32.49/arch/ia64/ia32/binfmt_elf32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/ia32/binfmt_elf32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -45,6 +45,13 @@ randomize_stack_top(unsigned long stack_
+diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
+index c69552b..c7122f4 100644
+--- a/arch/ia64/ia32/binfmt_elf32.c
++++ b/arch/ia64/ia32/binfmt_elf32.c
+@@ -45,6 +45,13 @@ randomize_stack_top(unsigned long stack_top);
#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
@@ -920,9 +1356,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/ia32/binfmt_elf32.c linux-2.6.32.49/arch/ia
/* Ugly but avoids duplication */
#include "../../../fs/binfmt_elf.c"
-diff -urNp linux-2.6.32.49/arch/ia64/ia32/ia32priv.h linux-2.6.32.49/arch/ia64/ia32/ia32priv.h
---- linux-2.6.32.49/arch/ia64/ia32/ia32priv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/ia32/ia32priv.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
+index 0f15349..26b3429 100644
+--- a/arch/ia64/ia32/ia32priv.h
++++ b/arch/ia64/ia32/ia32priv.h
@@ -296,7 +296,14 @@ typedef struct compat_siginfo {
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
@@ -939,9 +1376,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/ia32/ia32priv.h linux-2.6.32.49/arch/ia64/i
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h
---- linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
+index 8d3c79c..71b3af6 100644
+--- a/arch/ia64/include/asm/dma-mapping.h
++++ b/arch/ia64/include/asm/dma-mapping.h
@@ -12,7 +12,7 @@
#define ARCH_HAS_DMA_GET_REQUIRED_MASK
@@ -951,7 +1389,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.49/a
extern struct ia64_machine_vector ia64_mv;
extern void set_iommu_machvec(void);
-@@ -24,7 +24,7 @@ extern void machvec_dma_sync_sg(struct d
+@@ -24,7 +24,7 @@ extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *daddr, gfp_t gfp)
{
@@ -960,7 +1398,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.49/a
void *caddr;
caddr = ops->alloc_coherent(dev, size, daddr, gfp);
-@@ -35,7 +35,7 @@ static inline void *dma_alloc_coherent(s
+@@ -35,7 +35,7 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
static inline void dma_free_coherent(struct device *dev, size_t size,
void *caddr, dma_addr_t daddr)
{
@@ -969,7 +1407,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.49/a
debug_dma_free_coherent(dev, size, caddr, daddr);
ops->free_coherent(dev, size, caddr, daddr);
}
-@@ -49,13 +49,13 @@ static inline void dma_free_coherent(str
+@@ -49,13 +49,13 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
{
@@ -985,9 +1423,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.49/a
return ops->dma_supported(dev, mask);
}
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/elf.h linux-2.6.32.49/arch/ia64/include/asm/elf.h
---- linux-2.6.32.49/arch/ia64/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
+index 86eddee..b116bb4 100644
+--- a/arch/ia64/include/asm/elf.h
++++ b/arch/ia64/include/asm/elf.h
@@ -43,6 +43,13 @@
*/
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL)
@@ -1002,10 +1441,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/elf.h linux-2.6.32.49/arch/ia64
#define PT_IA_64_UNWIND 0x70000001
/* IA-64 relocations: */
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/machvec.h linux-2.6.32.49/arch/ia64/include/asm/machvec.h
---- linux-2.6.32.49/arch/ia64/include/asm/machvec.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/machvec.h 2011-11-15 19:59:42.000000000 -0500
-@@ -45,7 +45,7 @@ typedef void ia64_mv_kernel_launch_event
+diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h
+index 367d299..9ad4279 100644
+--- a/arch/ia64/include/asm/machvec.h
++++ b/arch/ia64/include/asm/machvec.h
+@@ -45,7 +45,7 @@ typedef void ia64_mv_kernel_launch_event_t(void);
/* DMA-mapping interface: */
typedef void ia64_mv_dma_init (void);
typedef u64 ia64_mv_dma_get_required_mask (struct device *);
@@ -1014,7 +1454,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/machvec.h linux-2.6.32.49/arch/
/*
* WARNING: The legacy I/O space is _architected_. Platforms are
-@@ -251,7 +251,7 @@ extern void machvec_init_from_cmdline(co
+@@ -251,7 +251,7 @@ extern void machvec_init_from_cmdline(const char *cmdline);
# endif /* CONFIG_IA64_GENERIC */
extern void swiotlb_dma_init(void);
@@ -1023,9 +1463,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/machvec.h linux-2.6.32.49/arch/
/*
* Define default versions so we can extend machvec for new platforms without having
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/pgtable.h linux-2.6.32.49/arch/ia64/include/asm/pgtable.h
---- linux-2.6.32.49/arch/ia64/include/asm/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/pgtable.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
+index 8840a69..cdb63d9 100644
+--- a/arch/ia64/include/asm/pgtable.h
++++ b/arch/ia64/include/asm/pgtable.h
@@ -12,7 +12,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
@@ -1053,10 +1494,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/pgtable.h linux-2.6.32.49/arch/
#define PAGE_GATE __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_X_RX)
#define PAGE_KERNEL __pgprot(__DIRTY_BITS | _PAGE_PL_0 | _PAGE_AR_RWX)
#define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX)
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/spinlock.h linux-2.6.32.49/arch/ia64/include/asm/spinlock.h
---- linux-2.6.32.49/arch/ia64/include/asm/spinlock.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/spinlock.h 2011-11-15 19:59:42.000000000 -0500
-@@ -72,7 +72,7 @@ static __always_inline void __ticket_spi
+diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
+index 239ecdc..f94170e 100644
+--- a/arch/ia64/include/asm/spinlock.h
++++ b/arch/ia64/include/asm/spinlock.h
+@@ -72,7 +72,7 @@ static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
unsigned short *p = (unsigned short *)&lock->lock + 1, tmp;
asm volatile ("ld2.bias %0=[%1]" : "=r"(tmp) : "r"(p));
@@ -1065,10 +1507,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/spinlock.h linux-2.6.32.49/arch
}
static __always_inline void __ticket_spin_unlock_wait(raw_spinlock_t *lock)
-diff -urNp linux-2.6.32.49/arch/ia64/include/asm/uaccess.h linux-2.6.32.49/arch/ia64/include/asm/uaccess.h
---- linux-2.6.32.49/arch/ia64/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
-@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _
+diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h
+index 449c8c0..432a3d2 100644
+--- a/arch/ia64/include/asm/uaccess.h
++++ b/arch/ia64/include/asm/uaccess.h
+@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
const void *__cu_from = (from); \
long __cu_len = (n); \
\
@@ -1077,7 +1520,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/uaccess.h linux-2.6.32.49/arch/
__cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \
__cu_len; \
})
-@@ -269,7 +269,7 @@ __copy_from_user (void *to, const void _
+@@ -269,7 +269,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
long __cu_len = (n); \
\
__chk_user_ptr(__cu_from); \
@@ -1086,9 +1529,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/include/asm/uaccess.h linux-2.6.32.49/arch/
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
__cu_len; \
})
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/dma-mapping.c linux-2.6.32.49/arch/ia64/kernel/dma-mapping.c
---- linux-2.6.32.49/arch/ia64/kernel/dma-mapping.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/dma-mapping.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
+index f2c1600..969398a 100644
+--- a/arch/ia64/kernel/dma-mapping.c
++++ b/arch/ia64/kernel/dma-mapping.c
@@ -3,7 +3,7 @@
/* Set this to 1 if there is a HW IOMMU in the system */
int iommu_detected __read_mostly;
@@ -1107,9 +1551,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/dma-mapping.c linux-2.6.32.49/arch/i
{
return dma_ops;
}
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/module.c linux-2.6.32.49/arch/ia64/kernel/module.c
---- linux-2.6.32.49/arch/ia64/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/module.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
+index 1481b0a..e7d38ff 100644
+--- a/arch/ia64/kernel/module.c
++++ b/arch/ia64/kernel/module.c
@@ -315,8 +315,7 @@ module_alloc (unsigned long size)
void
module_free (struct module *mod, void *module_region)
@@ -1120,7 +1565,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/module.c linux-2.6.32.49/arch/ia64/k
unw_remove_unwind_table(mod->arch.init_unw_table);
mod->arch.init_unw_table = NULL;
}
-@@ -502,15 +501,39 @@ module_frob_arch_sections (Elf_Ehdr *ehd
+@@ -502,15 +501,39 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
}
static inline int
@@ -1162,7 +1607,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/module.c linux-2.6.32.49/arch/ia64/k
}
static inline int
-@@ -693,7 +716,14 @@ do_reloc (struct module *mod, uint8_t r_
+@@ -693,7 +716,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
break;
case RV_BDREL:
@@ -1178,7 +1623,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/module.c linux-2.6.32.49/arch/ia64/k
break;
case RV_LTV:
-@@ -828,15 +858,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs,
+@@ -828,15 +858,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
* addresses have been selected...
*/
uint64_t gp;
@@ -1198,9 +1643,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/module.c linux-2.6.32.49/arch/ia64/k
mod->arch.gp = gp;
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/pci-dma.c linux-2.6.32.49/arch/ia64/kernel/pci-dma.c
---- linux-2.6.32.49/arch/ia64/kernel/pci-dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/pci-dma.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
+index f6b1ff0..de773fb 100644
+--- a/arch/ia64/kernel/pci-dma.c
++++ b/arch/ia64/kernel/pci-dma.c
@@ -43,7 +43,7 @@ struct device fallback_dev = {
.dma_mask = &fallback_dev.coherent_dma_mask,
};
@@ -1210,7 +1656,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/pci-dma.c linux-2.6.32.49/arch/ia64/
static int __init pci_iommu_init(void)
{
-@@ -96,15 +96,34 @@ int iommu_dma_supported(struct device *d
+@@ -96,15 +96,34 @@ int iommu_dma_supported(struct device *dev, u64 mask)
}
EXPORT_SYMBOL(iommu_dma_supported);
@@ -1252,10 +1698,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/pci-dma.c linux-2.6.32.49/arch/ia64/
/*
* The order of these functions is important for
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/pci-swiotlb.c linux-2.6.32.49/arch/ia64/kernel/pci-swiotlb.c
---- linux-2.6.32.49/arch/ia64/kernel/pci-swiotlb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/pci-swiotlb.c 2011-11-15 19:59:42.000000000 -0500
-@@ -21,7 +21,7 @@ static void *ia64_swiotlb_alloc_coherent
+diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
+index 285aae8..61dbab6 100644
+--- a/arch/ia64/kernel/pci-swiotlb.c
++++ b/arch/ia64/kernel/pci-swiotlb.c
+@@ -21,7 +21,7 @@ static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
}
@@ -1264,10 +1711,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/pci-swiotlb.c linux-2.6.32.49/arch/i
.alloc_coherent = ia64_swiotlb_alloc_coherent,
.free_coherent = swiotlb_free_coherent,
.map_page = swiotlb_map_page,
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
+diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
+index 609d500..7dde2a8 100644
+--- a/arch/ia64/kernel/sys_ia64.c
++++ b/arch/ia64/kernel/sys_ia64.c
+@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
#endif
@@ -1281,7 +1729,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c linux-2.6.32.49/arch/ia64
if (!addr)
addr = mm->free_area_cache;
-@@ -61,14 +68,14 @@ arch_get_unmapped_area (struct file *fil
+@@ -61,14 +68,14 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
@@ -1299,10 +1747,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/sys_ia64.c linux-2.6.32.49/arch/ia64
/* Remember the address where we stopped this search: */
mm->free_area_cache = addr + len;
return addr;
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/topology.c linux-2.6.32.49/arch/ia64/kernel/topology.c
---- linux-2.6.32.49/arch/ia64/kernel/topology.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/topology.c 2011-11-15 19:59:42.000000000 -0500
-@@ -282,7 +282,7 @@ static ssize_t cache_show(struct kobject
+diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
+index 8f06035..b3a5818 100644
+--- a/arch/ia64/kernel/topology.c
++++ b/arch/ia64/kernel/topology.c
+@@ -282,7 +282,7 @@ static ssize_t cache_show(struct kobject * kobj, struct attribute * attr, char *
return ret;
}
@@ -1311,9 +1760,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/topology.c linux-2.6.32.49/arch/ia64
.show = cache_show
};
-diff -urNp linux-2.6.32.49/arch/ia64/kernel/vmlinux.lds.S linux-2.6.32.49/arch/ia64/kernel/vmlinux.lds.S
---- linux-2.6.32.49/arch/ia64/kernel/vmlinux.lds.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/kernel/vmlinux.lds.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
+index 0a0c77b..8e55a81 100644
+--- a/arch/ia64/kernel/vmlinux.lds.S
++++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -190,7 +190,7 @@ SECTIONS
/* Per-cpu data: */
. = ALIGN(PERCPU_PAGE_SIZE);
@@ -1323,10 +1773,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/kernel/vmlinux.lds.S linux-2.6.32.49/arch/i
. = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
* into percpu page size
*/
-diff -urNp linux-2.6.32.49/arch/ia64/mm/fault.c linux-2.6.32.49/arch/ia64/mm/fault.c
---- linux-2.6.32.49/arch/ia64/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
-@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned
+diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
+index 19261a9..1611b7a 100644
+--- a/arch/ia64/mm/fault.c
++++ b/arch/ia64/mm/fault.c
+@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned long address)
return pte_present(pte);
}
@@ -1350,7 +1801,7 @@ diff -urNp linux-2.6.32.49/arch/ia64/mm/fault.c linux-2.6.32.49/arch/ia64/mm/fau
void __kprobes
ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *regs)
{
-@@ -145,9 +162,23 @@ ia64_do_page_fault (unsigned long addres
+@@ -145,9 +162,23 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
mask = ( (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT)
| (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT));
@@ -1375,10 +1826,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/mm/fault.c linux-2.6.32.49/arch/ia64/mm/fau
survive:
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.32.49/arch/ia64/mm/hugetlbpage.c linux-2.6.32.49/arch/ia64/mm/hugetlbpage.c
---- linux-2.6.32.49/arch/ia64/mm/hugetlbpage.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/mm/hugetlbpage.c 2011-11-15 19:59:42.000000000 -0500
-@@ -172,7 +172,7 @@ unsigned long hugetlb_get_unmapped_area(
+diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
+index b0f6157..a082bbc 100644
+--- a/arch/ia64/mm/hugetlbpage.c
++++ b/arch/ia64/mm/hugetlbpage.c
+@@ -172,7 +172,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
/* At this point: (!vmm || addr < vmm->vm_end). */
if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
return -ENOMEM;
@@ -1387,9 +1839,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/mm/hugetlbpage.c linux-2.6.32.49/arch/ia64/
return addr;
addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
}
-diff -urNp linux-2.6.32.49/arch/ia64/mm/init.c linux-2.6.32.49/arch/ia64/mm/init.c
---- linux-2.6.32.49/arch/ia64/mm/init.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/mm/init.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
+index 1857766..05cc6a3 100644
+--- a/arch/ia64/mm/init.c
++++ b/arch/ia64/mm/init.c
@@ -122,6 +122,19 @@ ia64_init_addr_space (void)
vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -1410,10 +1863,11 @@ diff -urNp linux-2.6.32.49/arch/ia64/mm/init.c linux-2.6.32.49/arch/ia64/mm/init
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(&current->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-2.6.32.49/arch/ia64/sn/pci/pci_dma.c linux-2.6.32.49/arch/ia64/sn/pci/pci_dma.c
---- linux-2.6.32.49/arch/ia64/sn/pci/pci_dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/ia64/sn/pci/pci_dma.c 2011-11-15 19:59:42.000000000 -0500
-@@ -464,7 +464,7 @@ int sn_pci_legacy_write(struct pci_bus *
+diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
+index 98b6849..8046766 100644
+--- a/arch/ia64/sn/pci/pci_dma.c
++++ b/arch/ia64/sn/pci/pci_dma.c
+@@ -464,7 +464,7 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
return ret;
}
@@ -1422,9 +1876,10 @@ diff -urNp linux-2.6.32.49/arch/ia64/sn/pci/pci_dma.c linux-2.6.32.49/arch/ia64/
.alloc_coherent = sn_dma_alloc_coherent,
.free_coherent = sn_dma_free_coherent,
.map_page = sn_dma_map_page,
-diff -urNp linux-2.6.32.49/arch/m32r/lib/usercopy.c linux-2.6.32.49/arch/m32r/lib/usercopy.c
---- linux-2.6.32.49/arch/m32r/lib/usercopy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/m32r/lib/usercopy.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c
+index 82abd15..d95ae5d 100644
+--- a/arch/m32r/lib/usercopy.c
++++ b/arch/m32r/lib/usercopy.c
@@ -14,6 +14,9 @@
unsigned long
__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -1435,7 +1890,7 @@ diff -urNp linux-2.6.32.49/arch/m32r/lib/usercopy.c linux-2.6.32.49/arch/m32r/li
prefetch(from);
if (access_ok(VERIFY_WRITE, to, n))
__copy_user(to,from,n);
-@@ -23,6 +26,9 @@ __generic_copy_to_user(void __user *to,
+@@ -23,6 +26,9 @@ __generic_copy_to_user(void __user *to, const void *from, unsigned long n)
unsigned long
__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -1445,9 +1900,23 @@ diff -urNp linux-2.6.32.49/arch/m32r/lib/usercopy.c linux-2.6.32.49/arch/m32r/li
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
-diff -urNp linux-2.6.32.49/arch/mips/alchemy/devboards/pm.c linux-2.6.32.49/arch/mips/alchemy/devboards/pm.c
---- linux-2.6.32.49/arch/mips/alchemy/devboards/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/alchemy/devboards/pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/mips/Makefile b/arch/mips/Makefile
+index 77f5021..2b1db8a 100644
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -51,6 +51,8 @@ endif
+ cflags-y := -ffunction-sections
+ cflags-y += $(call cc-option, -mno-check-zero-division)
+
++cflags-y += -Wno-sign-compare -Wno-extra
++
+ ifdef CONFIG_32BIT
+ ld-emul = $(32bit-emul)
+ vmlinux-32 = vmlinux
+diff --git a/arch/mips/alchemy/devboards/pm.c b/arch/mips/alchemy/devboards/pm.c
+index 632f986..fd0378d 100644
+--- a/arch/mips/alchemy/devboards/pm.c
++++ b/arch/mips/alchemy/devboards/pm.c
@@ -78,7 +78,7 @@ static void db1x_pm_end(void)
}
@@ -1457,10 +1926,11 @@ diff -urNp linux-2.6.32.49/arch/mips/alchemy/devboards/pm.c linux-2.6.32.49/arch
.valid = suspend_valid_only_mem,
.begin = db1x_pm_begin,
.enter = db1x_pm_enter,
-diff -urNp linux-2.6.32.49/arch/mips/include/asm/elf.h linux-2.6.32.49/arch/mips/include/asm/elf.h
---- linux-2.6.32.49/arch/mips/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -368,4 +368,11 @@ extern int dump_task_fpu(struct task_str
+diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
+index 7990694..4e93acf 100644
+--- a/arch/mips/include/asm/elf.h
++++ b/arch/mips/include/asm/elf.h
+@@ -368,4 +368,11 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
@@ -1472,10 +1942,11 @@ diff -urNp linux-2.6.32.49/arch/mips/include/asm/elf.h linux-2.6.32.49/arch/mips
+#endif
+
#endif /* _ASM_ELF_H */
-diff -urNp linux-2.6.32.49/arch/mips/include/asm/page.h linux-2.6.32.49/arch/mips/include/asm/page.h
---- linux-2.6.32.49/arch/mips/include/asm/page.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/include/asm/page.h 2011-11-15 19:59:42.000000000 -0500
-@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct pa
+diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
+index f266295..627cfff 100644
+--- a/arch/mips/include/asm/page.h
++++ b/arch/mips/include/asm/page.h
+@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct page *to, struct page *from,
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
@@ -1484,9 +1955,10 @@ diff -urNp linux-2.6.32.49/arch/mips/include/asm/page.h linux-2.6.32.49/arch/mip
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
-diff -urNp linux-2.6.32.49/arch/mips/include/asm/reboot.h linux-2.6.32.49/arch/mips/include/asm/reboot.h
---- linux-2.6.32.49/arch/mips/include/asm/reboot.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/include/asm/reboot.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/mips/include/asm/reboot.h b/arch/mips/include/asm/reboot.h
+index e48c0bf..f3acf65 100644
+--- a/arch/mips/include/asm/reboot.h
++++ b/arch/mips/include/asm/reboot.h
@@ -9,7 +9,7 @@
#ifndef _ASM_REBOOT_H
#define _ASM_REBOOT_H
@@ -1497,9 +1969,10 @@ diff -urNp linux-2.6.32.49/arch/mips/include/asm/reboot.h linux-2.6.32.49/arch/m
+extern void (*__noreturn _machine_halt)(void);
#endif /* _ASM_REBOOT_H */
-diff -urNp linux-2.6.32.49/arch/mips/include/asm/system.h linux-2.6.32.49/arch/mips/include/asm/system.h
---- linux-2.6.32.49/arch/mips/include/asm/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/include/asm/system.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
+index 83b5509..9fa24a23 100644
+--- a/arch/mips/include/asm/system.h
++++ b/arch/mips/include/asm/system.h
@@ -230,6 +230,6 @@ extern void per_cpu_trap_init(void);
*/
#define __ARCH_WANT_UNLOCKED_CTXSW
@@ -1508,10 +1981,11 @@ diff -urNp linux-2.6.32.49/arch/mips/include/asm/system.h linux-2.6.32.49/arch/m
+#define arch_align_stack(x) ((x) & ~0xfUL)
#endif /* _ASM_SYSTEM_H */
-diff -urNp linux-2.6.32.49/arch/mips/kernel/binfmt_elfn32.c linux-2.6.32.49/arch/mips/kernel/binfmt_elfn32.c
---- linux-2.6.32.49/arch/mips/kernel/binfmt_elfn32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/binfmt_elfn32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
+index 9fdd8bc..fcf9d68 100644
+--- a/arch/mips/kernel/binfmt_elfn32.c
++++ b/arch/mips/kernel/binfmt_elfn32.c
+@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1525,10 +1999,11 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/binfmt_elfn32.c linux-2.6.32.49/arch
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-2.6.32.49/arch/mips/kernel/binfmt_elfo32.c linux-2.6.32.49/arch/mips/kernel/binfmt_elfo32.c
---- linux-2.6.32.49/arch/mips/kernel/binfmt_elfo32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/binfmt_elfo32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
+index ff44823..cf0b48a 100644
+--- a/arch/mips/kernel/binfmt_elfo32.c
++++ b/arch/mips/kernel/binfmt_elfo32.c
+@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1542,10 +2017,11 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/binfmt_elfo32.c linux-2.6.32.49/arch
#include <asm/processor.h>
/*
-diff -urNp linux-2.6.32.49/arch/mips/kernel/kgdb.c linux-2.6.32.49/arch/mips/kernel/kgdb.c
---- linux-2.6.32.49/arch/mips/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/kgdb.c 2011-11-15 19:59:42.000000000 -0500
-@@ -245,6 +245,7 @@ int kgdb_arch_handle_exception(int vecto
+diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
+index 50c9bb8..efdd5f8 100644
+--- a/arch/mips/kernel/kgdb.c
++++ b/arch/mips/kernel/kgdb.c
+@@ -245,6 +245,7 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
return -1;
}
@@ -1553,10 +2029,11 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/kgdb.c linux-2.6.32.49/arch/mips/ker
struct kgdb_arch arch_kgdb_ops;
/*
-diff -urNp linux-2.6.32.49/arch/mips/kernel/process.c linux-2.6.32.49/arch/mips/kernel/process.c
---- linux-2.6.32.49/arch/mips/kernel/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/process.c 2011-11-15 19:59:42.000000000 -0500
-@@ -470,15 +470,3 @@ unsigned long get_wchan(struct task_stru
+diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
+index f3d73e1..bb3f57a 100644
+--- a/arch/mips/kernel/process.c
++++ b/arch/mips/kernel/process.c
+@@ -470,15 +470,3 @@ unsigned long get_wchan(struct task_struct *task)
out:
return pc;
}
@@ -1572,9 +2049,10 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/process.c linux-2.6.32.49/arch/mips/
-
- return sp & ALMASK;
-}
-diff -urNp linux-2.6.32.49/arch/mips/kernel/reset.c linux-2.6.32.49/arch/mips/kernel/reset.c
---- linux-2.6.32.49/arch/mips/kernel/reset.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/reset.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
+index 060563a..7fbf310 100644
+--- a/arch/mips/kernel/reset.c
++++ b/arch/mips/kernel/reset.c
@@ -19,8 +19,8 @@
* So handle all using function pointers to machine specific
* functions.
@@ -1606,10 +2084,11 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/reset.c linux-2.6.32.49/arch/mips/ke
pm_power_off();
+ BUG();
}
-diff -urNp linux-2.6.32.49/arch/mips/kernel/syscall.c linux-2.6.32.49/arch/mips/kernel/syscall.c
---- linux-2.6.32.49/arch/mips/kernel/syscall.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/kernel/syscall.c 2011-11-15 19:59:42.000000000 -0500
-@@ -102,17 +102,21 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
+index 3f7f466..3abe0b5 100644
+--- a/arch/mips/kernel/syscall.c
++++ b/arch/mips/kernel/syscall.c
+@@ -102,17 +102,21 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
@@ -1634,7 +2113,7 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/syscall.c linux-2.6.32.49/arch/mips/
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
else
-@@ -122,7 +126,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -122,7 +126,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
/* At this point: (!vmm || addr < vmm->vm_end). */
if (task_size - len < addr)
return -ENOMEM;
@@ -1643,21 +2122,10 @@ diff -urNp linux-2.6.32.49/arch/mips/kernel/syscall.c linux-2.6.32.49/arch/mips/
return addr;
addr = vmm->vm_end;
if (do_color_align)
-diff -urNp linux-2.6.32.49/arch/mips/Makefile linux-2.6.32.49/arch/mips/Makefile
---- linux-2.6.32.49/arch/mips/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -51,6 +51,8 @@ endif
- cflags-y := -ffunction-sections
- cflags-y += $(call cc-option, -mno-check-zero-division)
-
-+cflags-y += -Wno-sign-compare -Wno-extra
-+
- ifdef CONFIG_32BIT
- ld-emul = $(32bit-emul)
- vmlinux-32 = vmlinux
-diff -urNp linux-2.6.32.49/arch/mips/mm/fault.c linux-2.6.32.49/arch/mips/mm/fault.c
---- linux-2.6.32.49/arch/mips/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/mips/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
+index e97a7a2..f18f5b0 100644
+--- a/arch/mips/mm/fault.c
++++ b/arch/mips/mm/fault.c
@@ -26,6 +26,23 @@
#include <asm/ptrace.h>
#include <asm/highmem.h> /* For VMALLOC_END */
@@ -1682,10 +2150,11 @@ diff -urNp linux-2.6.32.49/arch/mips/mm/fault.c linux-2.6.32.49/arch/mips/mm/fau
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
-diff -urNp linux-2.6.32.49/arch/parisc/include/asm/elf.h linux-2.6.32.49/arch/parisc/include/asm/elf.h
---- linux-2.6.32.49/arch/parisc/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -343,6 +343,13 @@ struct pt_regs; /* forward declaration..
+diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
+index 9c802eb..0592e41 100644
+--- a/arch/parisc/include/asm/elf.h
++++ b/arch/parisc/include/asm/elf.h
+@@ -343,6 +343,13 @@ struct pt_regs; /* forward declaration... */
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
@@ -1699,9 +2168,10 @@ diff -urNp linux-2.6.32.49/arch/parisc/include/asm/elf.h linux-2.6.32.49/arch/pa
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This could be done in user space,
but it's not easy, and we've already done it here. */
-diff -urNp linux-2.6.32.49/arch/parisc/include/asm/pgtable.h linux-2.6.32.49/arch/parisc/include/asm/pgtable.h
---- linux-2.6.32.49/arch/parisc/include/asm/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/include/asm/pgtable.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
+index a27d2e2..18fd845 100644
+--- a/arch/parisc/include/asm/pgtable.h
++++ b/arch/parisc/include/asm/pgtable.h
@@ -207,6 +207,17 @@
#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
#define PAGE_COPY PAGE_EXECREAD
@@ -1720,9 +2190,10 @@ diff -urNp linux-2.6.32.49/arch/parisc/include/asm/pgtable.h linux-2.6.32.49/arc
#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
#define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)
#define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
-diff -urNp linux-2.6.32.49/arch/parisc/kernel/module.c linux-2.6.32.49/arch/parisc/kernel/module.c
---- linux-2.6.32.49/arch/parisc/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/kernel/module.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
+index 2120746..8d70a5e 100644
+--- a/arch/parisc/kernel/module.c
++++ b/arch/parisc/kernel/module.c
@@ -95,16 +95,38 @@
/* three functions to determine where in the module core
@@ -1766,28 +2237,27 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/module.c linux-2.6.32.49/arch/pari
}
static inline int in_local(struct module *me, void *loc)
-@@ -364,13 +386,13 @@ int module_frob_arch_sections(CONST Elf_
+@@ -364,13 +386,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
}
/* align things a bit */
- me->core_size = ALIGN(me->core_size, 16);
- me->arch.got_offset = me->core_size;
- me->core_size += gots * sizeof(struct got_entry);
--
-- me->core_size = ALIGN(me->core_size, 16);
-- me->arch.fdesc_offset = me->core_size;
-- me->core_size += fdescs * sizeof(Elf_Fdesc);
+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
+ me->arch.got_offset = me->core_size_rw;
+ me->core_size_rw += gots * sizeof(struct got_entry);
-+
+
+- me->core_size = ALIGN(me->core_size, 16);
+- me->arch.fdesc_offset = me->core_size;
+- me->core_size += fdescs * sizeof(Elf_Fdesc);
+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
+ me->arch.fdesc_offset = me->core_size_rw;
+ me->core_size_rw += fdescs * sizeof(Elf_Fdesc);
me->arch.got_max = gots;
me->arch.fdesc_max = fdescs;
-@@ -388,7 +410,7 @@ static Elf64_Word get_got(struct module
+@@ -388,7 +410,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
BUG_ON(value == 0);
@@ -1796,7 +2266,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/module.c linux-2.6.32.49/arch/pari
for (i = 0; got[i].addr; i++)
if (got[i].addr == value)
goto out;
-@@ -406,7 +428,7 @@ static Elf64_Word get_got(struct module
+@@ -406,7 +428,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
#ifdef CONFIG_64BIT
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{
@@ -1805,7 +2275,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/module.c linux-2.6.32.49/arch/pari
if (!value) {
printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
-@@ -424,7 +446,7 @@ static Elf_Addr get_fdesc(struct module
+@@ -424,7 +446,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
/* Create new one */
fdesc->addr = value;
@@ -1823,10 +2293,11 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/module.c linux-2.6.32.49/arch/pari
DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
me->arch.unwind_section, table, end, gp);
-diff -urNp linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c
---- linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c 2011-11-15 19:59:42.000000000 -0500
-@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(u
+diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
+index 9147391..f3d949a 100644
+--- a/arch/parisc/kernel/sys_parisc.c
++++ b/arch/parisc/kernel/sys_parisc.c
+@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(unsigned long addr, unsigned long len)
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
@@ -1835,7 +2306,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c linux-2.6.32.49/arch/
return addr;
addr = vma->vm_end;
}
-@@ -79,7 +79,7 @@ static unsigned long get_shared_area(str
+@@ -79,7 +79,7 @@ static unsigned long get_shared_area(struct address_space *mapping,
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
@@ -1844,7 +2315,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c linux-2.6.32.49/arch/
return addr;
addr = DCACHE_ALIGN(vma->vm_end - offset) + offset;
if (addr < vma->vm_end) /* handle wraparound */
-@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
if (!addr)
@@ -1853,10 +2324,11 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/sys_parisc.c linux-2.6.32.49/arch/
if (filp) {
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-2.6.32.49/arch/parisc/kernel/traps.c linux-2.6.32.49/arch/parisc/kernel/traps.c
---- linux-2.6.32.49/arch/parisc/kernel/traps.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/kernel/traps.c 2011-11-15 19:59:42.000000000 -0500
-@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod
+diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
+index 8b58bf0..7afff03 100644
+--- a/arch/parisc/kernel/traps.c
++++ b/arch/parisc/kernel/traps.c
+@@ -733,9 +733,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
down_read(&current->mm->mmap_sem);
vma = find_vma(current->mm,regs->iaoq[0]);
@@ -1867,9 +2339,10 @@ diff -urNp linux-2.6.32.49/arch/parisc/kernel/traps.c linux-2.6.32.49/arch/paris
fault_address = regs->iaoq[0];
fault_space = regs->iasq[0];
-diff -urNp linux-2.6.32.49/arch/parisc/mm/fault.c linux-2.6.32.49/arch/parisc/mm/fault.c
---- linux-2.6.32.49/arch/parisc/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/parisc/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
+index c6afbfc..c5839f6 100644
+--- a/arch/parisc/mm/fault.c
++++ b/arch/parisc/mm/fault.c
@@ -15,6 +15,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
@@ -1878,7 +2351,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/mm/fault.c linux-2.6.32.49/arch/parisc/mm
#include <asm/uaccess.h>
#include <asm/traps.h>
-@@ -52,7 +53,7 @@ DEFINE_PER_CPU(struct exception_data, ex
+@@ -52,7 +53,7 @@ DEFINE_PER_CPU(struct exception_data, exception_data);
static unsigned long
parisc_acctyp(unsigned long code, unsigned int inst)
{
@@ -1887,7 +2360,7 @@ diff -urNp linux-2.6.32.49/arch/parisc/mm/fault.c linux-2.6.32.49/arch/parisc/mm
return VM_EXEC;
switch (inst & 0xf0000000) {
-@@ -138,6 +139,116 @@ parisc_acctyp(unsigned long code, unsign
+@@ -138,6 +139,116 @@ parisc_acctyp(unsigned long code, unsigned int inst)
}
#endif
@@ -2039,9 +2512,23 @@ diff -urNp linux-2.6.32.49/arch/parisc/mm/fault.c linux-2.6.32.49/arch/parisc/mm
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/device.h linux-2.6.32.49/arch/powerpc/include/asm/device.h
---- linux-2.6.32.49/arch/powerpc/include/asm/device.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/device.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index c107b74..409dc0f 100644
+--- a/arch/powerpc/Makefile
++++ b/arch/powerpc/Makefile
+@@ -74,6 +74,8 @@ KBUILD_AFLAGS += -Iarch/$(ARCH)
+ KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
+ CPP = $(CC) -E $(KBUILD_CFLAGS)
+
++cflags-y += -Wno-sign-compare -Wno-extra
++
+ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
+
+ ifeq ($(CONFIG_PPC64),y)
+diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
+index 6d94d27..50d4cad 100644
+--- a/arch/powerpc/include/asm/device.h
++++ b/arch/powerpc/include/asm/device.h
@@ -14,7 +14,7 @@ struct dev_archdata {
struct device_node *of_node;
@@ -2051,10 +2538,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/device.h linux-2.6.32.49/arc
/*
* When an iommu is in use, dma_data is used as a ptr to the base of the
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h
---- linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h 2011-11-15 19:59:42.000000000 -0500
-@@ -69,9 +69,9 @@ static inline unsigned long device_to_ma
+diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
+index e281dae..2b8a784 100644
+--- a/arch/powerpc/include/asm/dma-mapping.h
++++ b/arch/powerpc/include/asm/dma-mapping.h
+@@ -69,9 +69,9 @@ static inline unsigned long device_to_mask(struct device *dev)
#ifdef CONFIG_PPC64
extern struct dma_map_ops dma_iommu_ops;
#endif
@@ -2066,7 +2554,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
{
/* We don't handle the NULL dev case for ISA for now. We could
* do it via an out of line call but it is not needed for now. The
-@@ -84,7 +84,7 @@ static inline struct dma_map_ops *get_dm
+@@ -84,7 +84,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
return dev->archdata.dma_ops;
}
@@ -2075,7 +2563,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
{
dev->archdata.dma_ops = ops;
}
-@@ -118,7 +118,7 @@ static inline void set_dma_offset(struct
+@@ -118,7 +118,7 @@ static inline void set_dma_offset(struct device *dev, dma_addr_t off)
static inline int dma_supported(struct device *dev, u64 mask)
{
@@ -2084,7 +2572,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
if (unlikely(dma_ops == NULL))
return 0;
-@@ -132,7 +132,7 @@ static inline int dma_supported(struct d
+@@ -132,7 +132,7 @@ static inline int dma_supported(struct device *dev, u64 mask)
static inline int dma_set_mask(struct device *dev, u64 dma_mask)
{
@@ -2093,7 +2581,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
if (unlikely(dma_ops == NULL))
return -EIO;
-@@ -147,7 +147,7 @@ static inline int dma_set_mask(struct de
+@@ -147,7 +147,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
@@ -2102,7 +2590,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
void *cpu_addr;
BUG_ON(!dma_ops);
-@@ -162,7 +162,7 @@ static inline void *dma_alloc_coherent(s
+@@ -162,7 +162,7 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
static inline void dma_free_coherent(struct device *dev, size_t size,
void *cpu_addr, dma_addr_t dma_handle)
{
@@ -2111,7 +2599,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
BUG_ON(!dma_ops);
-@@ -173,7 +173,7 @@ static inline void dma_free_coherent(str
+@@ -173,7 +173,7 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
@@ -2120,10 +2608,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.4
if (dma_ops->mapping_error)
return dma_ops->mapping_error(dev, dma_addr);
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/elf.h linux-2.6.32.49/arch/powerpc/include/asm/elf.h
---- linux-2.6.32.49/arch/powerpc/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
-@@ -179,8 +179,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E
+diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
+index 5698502..5db093c 100644
+--- a/arch/powerpc/include/asm/elf.h
++++ b/arch/powerpc/include/asm/elf.h
+@@ -179,8 +179,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -2145,7 +2634,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/elf.h linux-2.6.32.49/arch/p
/*
* Our registers are always unsigned longs, whether we're a 32 bit
-@@ -275,9 +286,6 @@ extern int arch_setup_additional_pages(s
+@@ -275,9 +286,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
(0x7ff >> (PAGE_SHIFT - 12)) : \
(0x3ffff >> (PAGE_SHIFT - 12)))
@@ -2155,10 +2644,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/elf.h linux-2.6.32.49/arch/p
#endif /* __KERNEL__ */
/*
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/iommu.h linux-2.6.32.49/arch/powerpc/include/asm/iommu.h
---- linux-2.6.32.49/arch/powerpc/include/asm/iommu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/iommu.h 2011-11-15 19:59:42.000000000 -0500
-@@ -116,6 +116,9 @@ extern void iommu_init_early_iSeries(voi
+diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
+index edfc980..1766f59 100644
+--- a/arch/powerpc/include/asm/iommu.h
++++ b/arch/powerpc/include/asm/iommu.h
+@@ -116,6 +116,9 @@ extern void iommu_init_early_iSeries(void);
extern void iommu_init_early_dart(void);
extern void iommu_init_early_pasemi(void);
@@ -2168,9 +2658,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/iommu.h linux-2.6.32.49/arch
#ifdef CONFIG_PCI
extern void pci_iommu_init(void);
extern void pci_direct_iommu_init(void);
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/kmap_types.h linux-2.6.32.49/arch/powerpc/include/asm/kmap_types.h
---- linux-2.6.32.49/arch/powerpc/include/asm/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/kmap_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/kmap_types.h b/arch/powerpc/include/asm/kmap_types.h
+index 9163695..5a00112 100644
+--- a/arch/powerpc/include/asm/kmap_types.h
++++ b/arch/powerpc/include/asm/kmap_types.h
@@ -26,6 +26,7 @@ enum km_type {
KM_SOFTIRQ1,
KM_PPC_SYNC_PAGE,
@@ -2179,33 +2670,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/kmap_types.h linux-2.6.32.49
KM_TYPE_NR
};
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/page_64.h linux-2.6.32.49/arch/powerpc/include/asm/page_64.h
---- linux-2.6.32.49/arch/powerpc/include/asm/page_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/page_64.h 2011-11-15 19:59:42.000000000 -0500
-@@ -180,15 +180,18 @@ do { \
- * stack by default, so in the absense of a PT_GNU_STACK program header
- * we turn execute permission off.
- */
--#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
-- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-+#define VM_STACK_DEFAULT_FLAGS32 \
-+ (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
-+ VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
- #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-+#ifndef CONFIG_PAX_PAGEEXEC
- #define VM_STACK_DEFAULT_FLAGS \
- (test_thread_flag(TIF_32BIT) ? \
- VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
-+#endif
-
- #include <asm-generic/getorder.h>
-
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/page.h linux-2.6.32.49/arch/powerpc/include/asm/page.h
---- linux-2.6.32.49/arch/powerpc/include/asm/page.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/page.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
+index ff24254..fe45b21 100644
+--- a/arch/powerpc/include/asm/page.h
++++ b/arch/powerpc/include/asm/page.h
@@ -116,8 +116,9 @@ extern phys_addr_t kernstart_addr;
* and needs to be executable. This means the whole heap ends
* up being executable.
@@ -2228,10 +2696,36 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/page.h linux-2.6.32.49/arch/
#ifndef __ASSEMBLY__
#undef STRICT_MM_TYPECHECKS
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pci.h linux-2.6.32.49/arch/powerpc/include/asm/pci.h
---- linux-2.6.32.49/arch/powerpc/include/asm/pci.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/pci.h 2011-11-15 19:59:42.000000000 -0500
-@@ -65,8 +65,8 @@ static inline int pci_get_legacy_ide_irq
+diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
+index 3f17b83..1f9e766 100644
+--- a/arch/powerpc/include/asm/page_64.h
++++ b/arch/powerpc/include/asm/page_64.h
+@@ -180,15 +180,18 @@ do { \
+ * stack by default, so in the absense of a PT_GNU_STACK program header
+ * we turn execute permission off.
+ */
+-#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
+- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#define VM_STACK_DEFAULT_FLAGS32 \
++ (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
++ VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+ #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
++#ifndef CONFIG_PAX_PAGEEXEC
+ #define VM_STACK_DEFAULT_FLAGS \
+ (test_thread_flag(TIF_32BIT) ? \
+ VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
++#endif
+
+ #include <asm-generic/getorder.h>
+
+diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
+index b5ea626..4030822 100644
+--- a/arch/powerpc/include/asm/pci.h
++++ b/arch/powerpc/include/asm/pci.h
+@@ -65,8 +65,8 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
}
#ifdef CONFIG_PCI
@@ -2242,9 +2736,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pci.h linux-2.6.32.49/arch/p
#else /* CONFIG_PCI */
#define set_pci_dma_ops(d)
#define get_pci_dma_ops() NULL
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pgtable.h linux-2.6.32.49/arch/powerpc/include/asm/pgtable.h
---- linux-2.6.32.49/arch/powerpc/include/asm/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/pgtable.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
+index 2a5da06..d65bea2 100644
+--- a/arch/powerpc/include/asm/pgtable.h
++++ b/arch/powerpc/include/asm/pgtable.h
@@ -2,6 +2,7 @@
#define _ASM_POWERPC_PGTABLE_H
#ifdef __KERNEL__
@@ -2253,9 +2748,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pgtable.h linux-2.6.32.49/ar
#ifndef __ASSEMBLY__
#include <asm/processor.h> /* For TASK_SIZE */
#include <asm/mmu.h>
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pte-hash32.h linux-2.6.32.49/arch/powerpc/include/asm/pte-hash32.h
---- linux-2.6.32.49/arch/powerpc/include/asm/pte-hash32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/pte-hash32.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
+index 4aad413..85d86bf 100644
+--- a/arch/powerpc/include/asm/pte-hash32.h
++++ b/arch/powerpc/include/asm/pte-hash32.h
@@ -21,6 +21,7 @@
#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
#define _PAGE_USER 0x004 /* usermode access allowed */
@@ -2264,10 +2760,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/pte-hash32.h linux-2.6.32.49
#define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
#define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/ptrace.h linux-2.6.32.49/arch/powerpc/include/asm/ptrace.h
---- linux-2.6.32.49/arch/powerpc/include/asm/ptrace.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/ptrace.h 2011-11-15 19:59:42.000000000 -0500
-@@ -103,7 +103,7 @@ extern unsigned long profile_pc(struct p
+diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
+index 8c34149..78f425a 100644
+--- a/arch/powerpc/include/asm/ptrace.h
++++ b/arch/powerpc/include/asm/ptrace.h
+@@ -103,7 +103,7 @@ extern unsigned long profile_pc(struct pt_regs *regs);
} while(0)
struct task_struct;
@@ -2276,9 +2773,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/ptrace.h linux-2.6.32.49/arc
extern int ptrace_put_reg(struct task_struct *task, int regno,
unsigned long data);
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/reg.h linux-2.6.32.49/arch/powerpc/include/asm/reg.h
---- linux-2.6.32.49/arch/powerpc/include/asm/reg.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/reg.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
+index 32a7c30..be3a8bb 100644
+--- a/arch/powerpc/include/asm/reg.h
++++ b/arch/powerpc/include/asm/reg.h
@@ -191,6 +191,7 @@
#define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */
#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
@@ -2287,9 +2785,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/reg.h linux-2.6.32.49/arch/p
#define DSISR_PROTFAULT 0x08000000 /* protection fault */
#define DSISR_ISSTORE 0x02000000 /* access was a store */
#define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/swiotlb.h linux-2.6.32.49/arch/powerpc/include/asm/swiotlb.h
---- linux-2.6.32.49/arch/powerpc/include/asm/swiotlb.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/swiotlb.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/swiotlb.h b/arch/powerpc/include/asm/swiotlb.h
+index 8979d4c..d2fd0d3 100644
+--- a/arch/powerpc/include/asm/swiotlb.h
++++ b/arch/powerpc/include/asm/swiotlb.h
@@ -13,7 +13,7 @@
#include <linux/swiotlb.h>
@@ -2299,10 +2798,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/swiotlb.h linux-2.6.32.49/ar
static inline void dma_mark_clean(void *addr, size_t size) {}
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/system.h linux-2.6.32.49/arch/powerpc/include/asm/system.h
---- linux-2.6.32.49/arch/powerpc/include/asm/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/system.h 2011-11-15 19:59:42.000000000 -0500
-@@ -531,7 +531,7 @@ __cmpxchg_local(volatile void *ptr, unsi
+diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h
+index 094a12a..877a60a 100644
+--- a/arch/powerpc/include/asm/system.h
++++ b/arch/powerpc/include/asm/system.h
+@@ -531,7 +531,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif
@@ -2311,9 +2811,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/system.h linux-2.6.32.49/arc
/* Used in very early kernel initialization. */
extern unsigned long reloc_offset(void);
-diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h
---- linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
+index bd0fb84..a42a14b 100644
+--- a/arch/powerpc/include/asm/uaccess.h
++++ b/arch/powerpc/include/asm/uaccess.h
@@ -13,6 +13,8 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1
@@ -2376,7 +2877,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h linux-2.6.32.49/ar
static inline unsigned long __copy_from_user_inatomic(void *to,
const void __user *from, unsigned long n)
{
-@@ -396,6 +352,10 @@ static inline unsigned long __copy_from_
+@@ -396,6 +352,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
if (ret == 0)
return 0;
}
@@ -2387,7 +2888,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h linux-2.6.32.49/ar
return __copy_tofrom_user((__force void __user *)to, from, n);
}
-@@ -422,6 +382,10 @@ static inline unsigned long __copy_to_us
+@@ -422,6 +382,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
if (ret == 0)
return 0;
}
@@ -2398,7 +2899,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h linux-2.6.32.49/ar
return __copy_tofrom_user(to, (__force const void __user *)from, n);
}
-@@ -439,6 +403,92 @@ static inline unsigned long __copy_to_us
+@@ -439,6 +403,92 @@ static inline unsigned long __copy_to_user(void __user *to,
return __copy_to_user_inatomic(to, from, size);
}
@@ -2491,10 +2992,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/include/asm/uaccess.h linux-2.6.32.49/ar
extern unsigned long __clear_user(void __user *addr, unsigned long size);
static inline unsigned long clear_user(void __user *addr, unsigned long size)
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/cacheinfo.c linux-2.6.32.49/arch/powerpc/kernel/cacheinfo.c
---- linux-2.6.32.49/arch/powerpc/kernel/cacheinfo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/cacheinfo.c 2011-11-15 19:59:42.000000000 -0500
-@@ -642,7 +642,7 @@ static struct kobj_attribute *cache_inde
+diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
+index bb37b1d..01fe9ce 100644
+--- a/arch/powerpc/kernel/cacheinfo.c
++++ b/arch/powerpc/kernel/cacheinfo.c
+@@ -642,7 +642,7 @@ static struct kobj_attribute *cache_index_opt_attrs[] = {
&cache_assoc_attr,
};
@@ -2503,22 +3005,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/cacheinfo.c linux-2.6.32.49/arch/
.show = cache_index_show,
};
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/dma.c linux-2.6.32.49/arch/powerpc/kernel/dma.c
---- linux-2.6.32.49/arch/powerpc/kernel/dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/dma.c 2011-11-15 19:59:42.000000000 -0500
-@@ -134,7 +134,7 @@ static inline void dma_direct_sync_singl
- }
- #endif
-
--struct dma_map_ops dma_direct_ops = {
-+const struct dma_map_ops dma_direct_ops = {
- .alloc_coherent = dma_direct_alloc_coherent,
- .free_coherent = dma_direct_free_coherent,
- .map_sg = dma_direct_map_sg,
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/dma-iommu.c linux-2.6.32.49/arch/powerpc/kernel/dma-iommu.c
---- linux-2.6.32.49/arch/powerpc/kernel/dma-iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/dma-iommu.c 2011-11-15 19:59:42.000000000 -0500
-@@ -70,7 +70,7 @@ static void dma_iommu_unmap_sg(struct de
+diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
+index 37771a5..648530c 100644
+--- a/arch/powerpc/kernel/dma-iommu.c
++++ b/arch/powerpc/kernel/dma-iommu.c
+@@ -70,7 +70,7 @@ static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist,
}
/* We support DMA to/from any memory page via the iommu */
@@ -2527,9 +3018,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/dma-iommu.c linux-2.6.32.49/arch/
{
struct iommu_table *tbl = get_iommu_table_base(dev);
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.32.49/arch/powerpc/kernel/dma-swiotlb.c
---- linux-2.6.32.49/arch/powerpc/kernel/dma-swiotlb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/dma-swiotlb.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c
+index e96cbbd..bdd6d41 100644
+--- a/arch/powerpc/kernel/dma-swiotlb.c
++++ b/arch/powerpc/kernel/dma-swiotlb.c
@@ -31,7 +31,7 @@ unsigned int ppc_swiotlb_enable;
* map_page, and unmap_page on highmem, use normal dma_ops
* for everything else.
@@ -2539,9 +3031,23 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.32.49/arc
.alloc_coherent = dma_direct_alloc_coherent,
.free_coherent = dma_direct_free_coherent,
.map_sg = swiotlb_map_sg_attrs,
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/exceptions-64e.S linux-2.6.32.49/arch/powerpc/kernel/exceptions-64e.S
---- linux-2.6.32.49/arch/powerpc/kernel/exceptions-64e.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/exceptions-64e.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
+index 6215062..ebea59c 100644
+--- a/arch/powerpc/kernel/dma.c
++++ b/arch/powerpc/kernel/dma.c
+@@ -134,7 +134,7 @@ static inline void dma_direct_sync_single_range(struct device *dev,
+ }
+ #endif
+
+-struct dma_map_ops dma_direct_ops = {
++const struct dma_map_ops dma_direct_ops = {
+ .alloc_coherent = dma_direct_alloc_coherent,
+ .free_coherent = dma_direct_free_coherent,
+ .map_sg = dma_direct_map_sg,
+diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
+index 24dcc0e..a300455 100644
+--- a/arch/powerpc/kernel/exceptions-64e.S
++++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -455,6 +455,7 @@ storage_fault_common:
std r14,_DAR(r1)
std r15,_DSISR(r1)
@@ -2560,9 +3066,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/exceptions-64e.S linux-2.6.32.49/
addi r3,r1,STACK_FRAME_OVERHEAD
ld r4,_DAR(r1)
bl .bad_page_fault
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/exceptions-64s.S linux-2.6.32.49/arch/powerpc/kernel/exceptions-64s.S
---- linux-2.6.32.49/arch/powerpc/kernel/exceptions-64s.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/exceptions-64s.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
+index 1808876..9fd206a 100644
+--- a/arch/powerpc/kernel/exceptions-64s.S
++++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -818,10 +818,10 @@ handle_page_fault:
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
@@ -2575,10 +3082,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/exceptions-64s.S linux-2.6.32.49/
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
lwz r4,_DAR(r1)
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/ibmebus.c linux-2.6.32.49/arch/powerpc/kernel/ibmebus.c
---- linux-2.6.32.49/arch/powerpc/kernel/ibmebus.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/ibmebus.c 2011-11-15 19:59:42.000000000 -0500
-@@ -127,7 +127,7 @@ static int ibmebus_dma_supported(struct
+diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
+index a4c8b38..1b09ad9 100644
+--- a/arch/powerpc/kernel/ibmebus.c
++++ b/arch/powerpc/kernel/ibmebus.c
+@@ -127,7 +127,7 @@ static int ibmebus_dma_supported(struct device *dev, u64 mask)
return 1;
}
@@ -2587,10 +3095,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/ibmebus.c linux-2.6.32.49/arch/po
.alloc_coherent = ibmebus_alloc_coherent,
.free_coherent = ibmebus_free_coherent,
.map_sg = ibmebus_map_sg,
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/kgdb.c linux-2.6.32.49/arch/powerpc/kernel/kgdb.c
---- linux-2.6.32.49/arch/powerpc/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/kgdb.c 2011-11-15 19:59:42.000000000 -0500
-@@ -126,7 +126,7 @@ static int kgdb_handle_breakpoint(struct
+diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
+index 641c74b..8339ad7 100644
+--- a/arch/powerpc/kernel/kgdb.c
++++ b/arch/powerpc/kernel/kgdb.c
+@@ -126,7 +126,7 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs)
if (kgdb_handle_exception(0, SIGTRAP, 0, regs) != 0)
return 0;
@@ -2599,7 +3108,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/kgdb.c linux-2.6.32.49/arch/power
regs->nip += 4;
return 1;
-@@ -353,7 +353,7 @@ int kgdb_arch_handle_exception(int vecto
+@@ -353,7 +353,7 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
/*
* Global data
*/
@@ -2608,41 +3117,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/kgdb.c linux-2.6.32.49/arch/power
.gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08},
};
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/module_32.c linux-2.6.32.49/arch/powerpc/kernel/module_32.c
---- linux-2.6.32.49/arch/powerpc/kernel/module_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/module_32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr
- me->arch.core_plt_section = i;
- }
- if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
-- printk("Module doesn't contain .plt or .init.plt sections.\n");
-+ printk("Module %s doesn't contain .plt or .init.plt sections.\n", me->name);
- return -ENOEXEC;
- }
-
-@@ -203,11 +203,16 @@ static uint32_t do_plt_call(void *locati
-
- DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
- /* Init, or core PLT? */
-- if (location >= mod->module_core
-- && location < mod->module_core + mod->core_size)
-+ if ((location >= mod->module_core_rx && location < mod->module_core_rx + mod->core_size_rx) ||
-+ (location >= mod->module_core_rw && location < mod->module_core_rw + mod->core_size_rw))
- entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
-- else
-+ else if ((location >= mod->module_init_rx && location < mod->module_init_rx + mod->init_size_rx) ||
-+ (location >= mod->module_init_rw && location < mod->module_init_rw + mod->init_size_rw))
- entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
-+ else {
-+ printk(KERN_ERR "%s: invalid R_PPC_REL24 entry found\n", mod->name);
-+ return ~0UL;
-+ }
-
- /* Find this entry, or if that fails, the next avail. entry */
- while (entry->jump[0]) {
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/module.c linux-2.6.32.49/arch/powerpc/kernel/module.c
---- linux-2.6.32.49/arch/powerpc/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/module.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
+index 477c663..4f50234 100644
+--- a/arch/powerpc/kernel/module.c
++++ b/arch/powerpc/kernel/module.c
@@ -31,11 +31,24 @@
LIST_HEAD(module_bug_list);
@@ -2668,7 +3146,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/module.c linux-2.6.32.49/arch/pow
return vmalloc_exec(size);
}
-@@ -45,6 +58,13 @@ void module_free(struct module *mod, voi
+@@ -45,6 +58,13 @@ void module_free(struct module *mod, void *module_region)
vfree(module_region);
}
@@ -2682,9 +3160,43 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/module.c linux-2.6.32.49/arch/pow
static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
const char *name)
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/pci-common.c linux-2.6.32.49/arch/powerpc/kernel/pci-common.c
---- linux-2.6.32.49/arch/powerpc/kernel/pci-common.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/pci-common.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
+index f832773..0507238 100644
+--- a/arch/powerpc/kernel/module_32.c
++++ b/arch/powerpc/kernel/module_32.c
+@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
+ me->arch.core_plt_section = i;
+ }
+ if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
+- printk("Module doesn't contain .plt or .init.plt sections.\n");
++ printk("Module %s doesn't contain .plt or .init.plt sections.\n", me->name);
+ return -ENOEXEC;
+ }
+
+@@ -203,11 +203,16 @@ static uint32_t do_plt_call(void *location,
+
+ DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
+ /* Init, or core PLT? */
+- if (location >= mod->module_core
+- && location < mod->module_core + mod->core_size)
++ if ((location >= mod->module_core_rx && location < mod->module_core_rx + mod->core_size_rx) ||
++ (location >= mod->module_core_rw && location < mod->module_core_rw + mod->core_size_rw))
+ entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
+- else
++ else if ((location >= mod->module_init_rx && location < mod->module_init_rx + mod->init_size_rx) ||
++ (location >= mod->module_init_rw && location < mod->module_init_rw + mod->init_size_rw))
+ entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
++ else {
++ printk(KERN_ERR "%s: invalid R_PPC_REL24 entry found\n", mod->name);
++ return ~0UL;
++ }
+
+ /* Find this entry, or if that fails, the next avail. entry */
+ while (entry->jump[0]) {
+diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
+index cadbed6..b9bbb00 100644
+--- a/arch/powerpc/kernel/pci-common.c
++++ b/arch/powerpc/kernel/pci-common.c
@@ -50,14 +50,14 @@ resource_size_t isa_mem_base;
unsigned int ppc_pci_flags = 0;
@@ -2703,9 +3215,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/pci-common.c linux-2.6.32.49/arch
{
return pci_dma_ops;
}
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/process.c linux-2.6.32.49/arch/powerpc/kernel/process.c
---- linux-2.6.32.49/arch/powerpc/kernel/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/process.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
+index 7b816da..8d5c277 100644
+--- a/arch/powerpc/kernel/process.c
++++ b/arch/powerpc/kernel/process.c
@@ -539,8 +539,8 @@ void show_regs(struct pt_regs * regs)
* Lookup NIP late so we have the best change of getting the
* above info out without failing
@@ -2717,7 +3230,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/process.c linux-2.6.32.49/arch/po
#endif
show_stack(current, (unsigned long *) regs->gpr[1]);
if (!user_mode(regs))
-@@ -1034,10 +1034,10 @@ void show_stack(struct task_struct *tsk,
+@@ -1034,10 +1034,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
newsp = stack[0];
ip = stack[STACK_FRAME_LR_SAVE];
if (!firstframe || ip != lr) {
@@ -2730,7 +3243,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/process.c linux-2.6.32.49/arch/po
(void *)current->ret_stack[curr_frame].ret);
curr_frame--;
}
-@@ -1057,7 +1057,7 @@ void show_stack(struct task_struct *tsk,
+@@ -1057,7 +1057,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
struct pt_regs *regs = (struct pt_regs *)
(sp + STACK_FRAME_OVERHEAD);
lr = regs->link;
@@ -2798,10 +3311,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/process.c linux-2.6.32.49/arch/po
-
- return ret;
-}
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/ptrace.c linux-2.6.32.49/arch/powerpc/kernel/ptrace.c
---- linux-2.6.32.49/arch/powerpc/kernel/ptrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/ptrace.c 2011-11-15 19:59:42.000000000 -0500
-@@ -86,7 +86,7 @@ static int set_user_trap(struct task_str
+diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
+index ef14988..856c4bc 100644
+--- a/arch/powerpc/kernel/ptrace.c
++++ b/arch/powerpc/kernel/ptrace.c
+@@ -86,7 +86,7 @@ static int set_user_trap(struct task_struct *task, unsigned long trap)
/*
* Get contents of register REGNO in task TASK.
*/
@@ -2810,7 +3324,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/ptrace.c linux-2.6.32.49/arch/pow
{
if (task->thread.regs == NULL)
return -EIO;
-@@ -894,7 +894,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -894,7 +894,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
CHECK_FULL_REGS(child->thread.regs);
if (index < PT_FPR0) {
@@ -2819,10 +3333,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/ptrace.c linux-2.6.32.49/arch/pow
} else {
flush_fp_to_thread(child);
tmp = ((unsigned long *)child->thread.fpr)
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/signal_32.c linux-2.6.32.49/arch/powerpc/kernel/signal_32.c
---- linux-2.6.32.49/arch/powerpc/kernel/signal_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/signal_32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -857,7 +857,7 @@ int handle_rt_signal32(unsigned long sig
+diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
+index d670429..2bc59b2 100644
+--- a/arch/powerpc/kernel/signal_32.c
++++ b/arch/powerpc/kernel/signal_32.c
+@@ -857,7 +857,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
addr = frame;
@@ -2831,10 +3346,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/signal_32.c linux-2.6.32.49/arch/
if (save_user_regs(regs, frame, 0, 1))
goto badframe;
regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/signal_64.c linux-2.6.32.49/arch/powerpc/kernel/signal_64.c
---- linux-2.6.32.49/arch/powerpc/kernel/signal_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/signal_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct
+diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
+index 2fe6fc6..ada0d96 100644
+--- a/arch/powerpc/kernel/signal_64.c
++++ b/arch/powerpc/kernel/signal_64.c
+@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
current->thread.fpscr.val = 0;
/* Set up to return from userspace. */
@@ -2843,10 +3359,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/signal_64.c linux-2.6.32.49/arch/
regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp;
} else {
err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/sys_ppc32.c linux-2.6.32.49/arch/powerpc/kernel/sys_ppc32.c
---- linux-2.6.32.49/arch/powerpc/kernel/sys_ppc32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/sys_ppc32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -563,10 +563,10 @@ asmlinkage long compat_sys_sysctl(struct
+diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
+index b97c2d6..dd01a6a 100644
+--- a/arch/powerpc/kernel/sys_ppc32.c
++++ b/arch/powerpc/kernel/sys_ppc32.c
+@@ -563,10 +563,10 @@ asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
if (oldlenp) {
if (!error) {
if (get_user(oldlen, oldlenp) ||
@@ -2859,9 +3376,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/sys_ppc32.c linux-2.6.32.49/arch/
}
return error;
}
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/traps.c linux-2.6.32.49/arch/powerpc/kernel/traps.c
---- linux-2.6.32.49/arch/powerpc/kernel/traps.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/traps.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
+index 6f0ae1a..e4b6a56 100644
+--- a/arch/powerpc/kernel/traps.c
++++ b/arch/powerpc/kernel/traps.c
@@ -99,6 +99,8 @@ static void pmac_backlight_unblank(void)
static inline void pmac_backlight_unblank(void) { }
#endif
@@ -2871,7 +3389,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/traps.c linux-2.6.32.49/arch/powe
int die(const char *str, struct pt_regs *regs, long err)
{
static struct {
-@@ -168,6 +170,8 @@ int die(const char *str, struct pt_regs
+@@ -168,6 +170,8 @@ int die(const char *str, struct pt_regs *regs, long err)
if (panic_on_oops)
panic("Fatal exception");
@@ -2880,9 +3398,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/traps.c linux-2.6.32.49/arch/powe
oops_exit();
do_exit(err);
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vdso.c linux-2.6.32.49/arch/powerpc/kernel/vdso.c
---- linux-2.6.32.49/arch/powerpc/kernel/vdso.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/vdso.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
+index 137dc22..fe57a79 100644
+--- a/arch/powerpc/kernel/vdso.c
++++ b/arch/powerpc/kernel/vdso.c
@@ -36,6 +36,7 @@
#include <asm/firmware.h>
#include <asm/vdso.h>
@@ -2891,7 +3410,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vdso.c linux-2.6.32.49/arch/power
#include "setup.h"
-@@ -220,7 +221,7 @@ int arch_setup_additional_pages(struct l
+@@ -220,7 +221,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
vdso_base = VDSO32_MBASE;
#endif
@@ -2900,7 +3419,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vdso.c linux-2.6.32.49/arch/power
/* vDSO has a problem and was disabled, just don't "enable" it for the
* process
-@@ -240,7 +241,7 @@ int arch_setup_additional_pages(struct l
+@@ -240,7 +241,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
vdso_base = get_unmapped_area(NULL, vdso_base,
(vdso_pages << PAGE_SHIFT) +
((VDSO_ALIGNMENT - 1) & PAGE_MASK),
@@ -2909,10 +3428,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vdso.c linux-2.6.32.49/arch/power
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
-diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vio.c linux-2.6.32.49/arch/powerpc/kernel/vio.c
---- linux-2.6.32.49/arch/powerpc/kernel/vio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/kernel/vio.c 2011-11-15 19:59:42.000000000 -0500
-@@ -601,11 +601,12 @@ static void vio_dma_iommu_unmap_sg(struc
+diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
+index 77f6421..829564a 100644
+--- a/arch/powerpc/kernel/vio.c
++++ b/arch/powerpc/kernel/vio.c
+@@ -601,11 +601,12 @@ static void vio_dma_iommu_unmap_sg(struct device *dev,
vio_cmo_dealloc(viodev, alloc_size);
}
@@ -2926,7 +3446,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vio.c linux-2.6.32.49/arch/powerp
.map_page = vio_dma_iommu_map_page,
.unmap_page = vio_dma_iommu_unmap_page,
-@@ -857,7 +858,6 @@ static void vio_cmo_bus_remove(struct vi
+@@ -857,7 +858,6 @@ static void vio_cmo_bus_remove(struct vio_dev *viodev)
static void vio_cmo_set_dma_ops(struct vio_dev *viodev)
{
@@ -2934,9 +3454,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/kernel/vio.c linux-2.6.32.49/arch/powerp
viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops;
}
-diff -urNp linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c
---- linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/lib/usercopy_64.c b/arch/powerpc/lib/usercopy_64.c
+index 5eea6f3..5d10396 100644
+--- a/arch/powerpc/lib/usercopy_64.c
++++ b/arch/powerpc/lib/usercopy_64.c
@@ -9,22 +9,6 @@
#include <linux/module.h>
#include <asm/uaccess.h>
@@ -2960,7 +3481,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c linux-2.6.32.49/arch/p
unsigned long copy_in_user(void __user *to, const void __user *from,
unsigned long n)
{
-@@ -35,7 +19,5 @@ unsigned long copy_in_user(void __user *
+@@ -35,7 +19,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from,
return n;
}
@@ -2968,21 +3489,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/lib/usercopy_64.c linux-2.6.32.49/arch/p
-EXPORT_SYMBOL(copy_to_user);
EXPORT_SYMBOL(copy_in_user);
-diff -urNp linux-2.6.32.49/arch/powerpc/Makefile linux-2.6.32.49/arch/powerpc/Makefile
---- linux-2.6.32.49/arch/powerpc/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -74,6 +74,8 @@ KBUILD_AFLAGS += -Iarch/$(ARCH)
- KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
- CPP = $(CC) -E $(KBUILD_CFLAGS)
-
-+cflags-y += -Wno-sign-compare -Wno-extra
-+
- CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
-
- ifeq ($(CONFIG_PPC64),y)
-diff -urNp linux-2.6.32.49/arch/powerpc/mm/fault.c linux-2.6.32.49/arch/powerpc/mm/fault.c
---- linux-2.6.32.49/arch/powerpc/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/mm/fault.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
+index e7dae82..877ce0d 100644
+--- a/arch/powerpc/mm/fault.c
++++ b/arch/powerpc/mm/fault.c
@@ -30,6 +30,10 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
@@ -3002,7 +3512,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/fault.c linux-2.6.32.49/arch/powerpc/
#ifdef CONFIG_KPROBES
-@@ -64,6 +69,33 @@ static inline int notify_page_fault(stru
+@@ -64,6 +69,33 @@ static inline int notify_page_fault(struct pt_regs *regs)
}
#endif
@@ -3036,7 +3546,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/fault.c linux-2.6.32.49/arch/powerpc/
/*
* Check whether the instruction at regs->nip is a store using
* an update addressing form which will update r1.
-@@ -134,7 +166,7 @@ int __kprobes do_page_fault(struct pt_re
+@@ -134,7 +166,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
* indicate errors in DSISR but can validly be set in SRR1.
*/
if (trap == 0x400)
@@ -3087,10 +3597,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/fault.c linux-2.6.32.49/arch/powerpc/
_exception(SIGSEGV, regs, code, address);
return 0;
}
-diff -urNp linux-2.6.32.49/arch/powerpc/mm/mem.c linux-2.6.32.49/arch/powerpc/mm/mem.c
---- linux-2.6.32.49/arch/powerpc/mm/mem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/mm/mem.c 2011-11-15 19:59:42.000000000 -0500
-@@ -250,7 +250,7 @@ static int __init mark_nonram_nosave(voi
+diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
+index 5973631..ad617af 100644
+--- a/arch/powerpc/mm/mem.c
++++ b/arch/powerpc/mm/mem.c
+@@ -250,7 +250,7 @@ static int __init mark_nonram_nosave(void)
{
unsigned long lmb_next_region_start_pfn,
lmb_region_max_pfn;
@@ -3099,10 +3610,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/mem.c linux-2.6.32.49/arch/powerpc/mm
for (i = 0; i < lmb.memory.cnt - 1; i++) {
lmb_region_max_pfn =
-diff -urNp linux-2.6.32.49/arch/powerpc/mm/mmap_64.c linux-2.6.32.49/arch/powerpc/mm/mmap_64.c
---- linux-2.6.32.49/arch/powerpc/mm/mmap_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/mm/mmap_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str
+diff --git a/arch/powerpc/mm/mmap_64.c b/arch/powerpc/mm/mmap_64.c
+index 0d957a4..26d968f 100644
+--- a/arch/powerpc/mm/mmap_64.c
++++ b/arch/powerpc/mm/mmap_64.c
+@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -3125,10 +3637,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/mmap_64.c linux-2.6.32.49/arch/powerp
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/mm/slice.c
---- linux-2.6.32.49/arch/powerpc/mm/slice.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/mm/slice.c 2011-11-15 19:59:42.000000000 -0500
-@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_
+diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
+index ba51948..23009d9 100644
+--- a/arch/powerpc/mm/slice.c
++++ b/arch/powerpc/mm/slice.c
+@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
if ((mm->task_size - len) < addr)
return 0;
vma = find_vma(mm, addr);
@@ -3146,7 +3659,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/
/*
* Remember the place where we stopped the search:
*/
-@@ -313,10 +313,14 @@ static unsigned long slice_find_area_top
+@@ -313,10 +313,14 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
}
}
@@ -3164,7 +3677,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/
/* Check for hit with different page size */
mask = slice_range_to_mask(addr, len);
-@@ -336,7 +340,7 @@ static unsigned long slice_find_area_top
+@@ -336,7 +340,7 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -3173,7 +3686,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/
/* remember the address as a hint for next time */
if (use_cache)
mm->free_area_cache = addr;
-@@ -348,7 +352,7 @@ static unsigned long slice_find_area_top
+@@ -348,7 +352,7 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -3182,7 +3695,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/
}
/*
-@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(un
+@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
if (fixed && addr > (mm->task_size - len))
return -EINVAL;
@@ -3194,9 +3707,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/mm/slice.c linux-2.6.32.49/arch/powerpc/
/* If hint, make sure it matches our alignment restrictions */
if (!fixed && addr) {
addr = _ALIGN_UP(addr, 1ul << pshift);
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.32.49/arch/powerpc/platforms/52xx/lite5200_pm.c
---- linux-2.6.32.49/arch/powerpc/platforms/52xx/lite5200_pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/52xx/lite5200_pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
+index b5c753d..8f01abe 100644
+--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
++++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -235,7 +235,7 @@ static void lite5200_pm_end(void)
lite5200_pm_target_state = PM_SUSPEND_ON;
}
@@ -3206,9 +3720,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.3
.valid = lite5200_pm_valid,
.begin = lite5200_pm_begin,
.prepare = lite5200_pm_prepare,
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.32.49/arch/powerpc/platforms/52xx/mpc52xx_pm.c
---- linux-2.6.32.49/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+index a55b0b6..478c18e 100644
+--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
++++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -180,7 +180,7 @@ void mpc52xx_pm_finish(void)
iounmap(mbar);
}
@@ -3218,9 +3733,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.32
.valid = mpc52xx_pm_valid,
.prepare = mpc52xx_pm_prepare,
.enter = mpc52xx_pm_enter,
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/83xx/suspend.c linux-2.6.32.49/arch/powerpc/platforms/83xx/suspend.c
---- linux-2.6.32.49/arch/powerpc/platforms/83xx/suspend.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/83xx/suspend.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
+index 08e65fc..643d3ac 100644
+--- a/arch/powerpc/platforms/83xx/suspend.c
++++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -273,7 +273,7 @@ static int mpc83xx_is_pci_agent(void)
return ret;
}
@@ -3230,10 +3746,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/83xx/suspend.c linux-2.6.32.49
.valid = mpc83xx_suspend_valid,
.begin = mpc83xx_suspend_begin,
.enter = mpc83xx_suspend_enter,
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/cell/iommu.c linux-2.6.32.49/arch/powerpc/platforms/cell/iommu.c
---- linux-2.6.32.49/arch/powerpc/platforms/cell/iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/cell/iommu.c 2011-11-15 19:59:42.000000000 -0500
-@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struc
+diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
+index ca5bfdf..1602e09 100644
+--- a/arch/powerpc/platforms/cell/iommu.c
++++ b/arch/powerpc/platforms/cell/iommu.c
+@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask)
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
@@ -3242,10 +3759,11 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/cell/iommu.c linux-2.6.32.49/a
.alloc_coherent = dma_fixed_alloc_coherent,
.free_coherent = dma_fixed_free_coherent,
.map_sg = dma_fixed_map_sg,
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c
---- linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c 2011-11-15 19:59:42.000000000 -0500
-@@ -694,7 +694,7 @@ static int ps3_dma_supported(struct devi
+diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
+index e34b305..20e48ec 100644
+--- a/arch/powerpc/platforms/ps3/system-bus.c
++++ b/arch/powerpc/platforms/ps3/system-bus.c
+@@ -694,7 +694,7 @@ static int ps3_dma_supported(struct device *_dev, u64 mask)
return mask >= DMA_BIT_MASK(32);
}
@@ -3254,7 +3772,7 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.
.alloc_coherent = ps3_alloc_coherent,
.free_coherent = ps3_free_coherent,
.map_sg = ps3_sb_map_sg,
-@@ -704,7 +704,7 @@ static struct dma_map_ops ps3_sb_dma_ops
+@@ -704,7 +704,7 @@ static struct dma_map_ops ps3_sb_dma_ops = {
.unmap_page = ps3_unmap_page,
};
@@ -3263,9 +3781,10 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.
.alloc_coherent = ps3_alloc_coherent,
.free_coherent = ps3_free_coherent,
.map_sg = ps3_ioc0_map_sg,
-diff -urNp linux-2.6.32.49/arch/powerpc/platforms/pseries/Kconfig linux-2.6.32.49/arch/powerpc/platforms/pseries/Kconfig
---- linux-2.6.32.49/arch/powerpc/platforms/pseries/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/powerpc/platforms/pseries/Kconfig 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
+index f0e6f28..60d53ed 100644
+--- a/arch/powerpc/platforms/pseries/Kconfig
++++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -2,6 +2,8 @@ config PPC_PSERIES
depends on PPC64 && PPC_BOOK3S
bool "IBM pSeries & new (POWER5-based) iSeries"
@@ -3275,9 +3794,51 @@ diff -urNp linux-2.6.32.49/arch/powerpc/platforms/pseries/Kconfig linux-2.6.32.4
select PPC_I8259
select PPC_RTAS
select RTAS_ERROR_LOGGING
-diff -urNp linux-2.6.32.49/arch/s390/include/asm/elf.h linux-2.6.32.49/arch/s390/include/asm/elf.h
---- linux-2.6.32.49/arch/s390/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
+index 43c0aca..42c045b 100644
+--- a/arch/s390/Kconfig
++++ b/arch/s390/Kconfig
+@@ -194,28 +194,26 @@ config AUDIT_ARCH
+
+ config S390_SWITCH_AMODE
+ bool "Switch kernel/user addressing modes"
++ default y
+ help
+ This option allows to switch the addressing modes of kernel and user
+- space. The kernel parameter switch_amode=on will enable this feature,
+- default is disabled. Enabling this (via kernel parameter) on machines
+- earlier than IBM System z9-109 EC/BC will reduce system performance.
++ space. Enabling this on machines earlier than IBM System z9-109 EC/BC
++ will reduce system performance.
+
+ Note that this option will also be selected by selecting the execute
+- protection option below. Enabling the execute protection via the
+- noexec kernel parameter will also switch the addressing modes,
+- independent of the switch_amode kernel parameter.
++ protection option below. Enabling the execute protection will also
++ switch the addressing modes, independent of this option.
+
+
+ config S390_EXEC_PROTECT
+ bool "Data execute protection"
++ default y
+ select S390_SWITCH_AMODE
+ help
+ This option allows to enable a buffer overflow protection for user
+ space programs and it also selects the addressing mode option above.
+- The kernel parameter noexec=on will enable this feature and also
+- switch the addressing modes, default is disabled. Enabling this (via
+- kernel parameter) on machines earlier than IBM System z9-109 EC/BC
+- will reduce system performance.
++ Enabling this on machines earlier than IBM System z9-109 EC/BC will
++ reduce system performance.
+
+ comment "Code generation options"
+
+diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
+index e885442..5e6c303 100644
+--- a/arch/s390/include/asm/elf.h
++++ b/arch/s390/include/asm/elf.h
@@ -164,6 +164,13 @@ extern unsigned int vdso_enabled;
that it will "exec", and that there is sufficient room for the brk. */
#define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)
@@ -3292,9 +3853,10 @@ diff -urNp linux-2.6.32.49/arch/s390/include/asm/elf.h linux-2.6.32.49/arch/s390
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. */
-diff -urNp linux-2.6.32.49/arch/s390/include/asm/setup.h linux-2.6.32.49/arch/s390/include/asm/setup.h
---- linux-2.6.32.49/arch/s390/include/asm/setup.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/include/asm/setup.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
+index e37478e..9ce0e9f 100644
+--- a/arch/s390/include/asm/setup.h
++++ b/arch/s390/include/asm/setup.h
@@ -50,13 +50,13 @@ extern unsigned long memory_end;
void detect_memory_layout(struct mem_chunk chunk[]);
@@ -3311,9 +3873,10 @@ diff -urNp linux-2.6.32.49/arch/s390/include/asm/setup.h linux-2.6.32.49/arch/s3
#else
#define s390_noexec (0)
#endif
-diff -urNp linux-2.6.32.49/arch/s390/include/asm/uaccess.h linux-2.6.32.49/arch/s390/include/asm/uaccess.h
---- linux-2.6.32.49/arch/s390/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
+index 8377e91..e28e6f1 100644
+--- a/arch/s390/include/asm/uaccess.h
++++ b/arch/s390/include/asm/uaccess.h
@@ -232,6 +232,10 @@ static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -3325,7 +3888,7 @@ diff -urNp linux-2.6.32.49/arch/s390/include/asm/uaccess.h linux-2.6.32.49/arch/
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-@@ -257,6 +261,9 @@ copy_to_user(void __user *to, const void
+@@ -257,6 +261,9 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
static inline unsigned long __must_check
__copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -3346,50 +3909,11 @@ diff -urNp linux-2.6.32.49/arch/s390/include/asm/uaccess.h linux-2.6.32.49/arch/
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
else
-diff -urNp linux-2.6.32.49/arch/s390/Kconfig linux-2.6.32.49/arch/s390/Kconfig
---- linux-2.6.32.49/arch/s390/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/Kconfig 2011-11-15 19:59:42.000000000 -0500
-@@ -194,28 +194,26 @@ config AUDIT_ARCH
-
- config S390_SWITCH_AMODE
- bool "Switch kernel/user addressing modes"
-+ default y
- help
- This option allows to switch the addressing modes of kernel and user
-- space. The kernel parameter switch_amode=on will enable this feature,
-- default is disabled. Enabling this (via kernel parameter) on machines
-- earlier than IBM System z9-109 EC/BC will reduce system performance.
-+ space. Enabling this on machines earlier than IBM System z9-109 EC/BC
-+ will reduce system performance.
-
- Note that this option will also be selected by selecting the execute
-- protection option below. Enabling the execute protection via the
-- noexec kernel parameter will also switch the addressing modes,
-- independent of the switch_amode kernel parameter.
-+ protection option below. Enabling the execute protection will also
-+ switch the addressing modes, independent of this option.
-
-
- config S390_EXEC_PROTECT
- bool "Data execute protection"
-+ default y
- select S390_SWITCH_AMODE
- help
- This option allows to enable a buffer overflow protection for user
- space programs and it also selects the addressing mode option above.
-- The kernel parameter noexec=on will enable this feature and also
-- switch the addressing modes, default is disabled. Enabling this (via
-- kernel parameter) on machines earlier than IBM System z9-109 EC/BC
-- will reduce system performance.
-+ Enabling this on machines earlier than IBM System z9-109 EC/BC will
-+ reduce system performance.
-
- comment "Code generation options"
-
-diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/kernel/module.c
---- linux-2.6.32.49/arch/s390/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/kernel/module.c 2011-11-15 19:59:42.000000000 -0500
-@@ -166,11 +166,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
+diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
+index 639380a..72e3c02 100644
+--- a/arch/s390/kernel/module.c
++++ b/arch/s390/kernel/module.c
+@@ -166,11 +166,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
/* Increase core size by size of got & plt and set start
offsets for got and plt. */
@@ -3406,7 +3930,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
return 0;
}
-@@ -256,7 +256,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -256,7 +256,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
if (info->got_initialized == 0) {
Elf_Addr *gotent;
@@ -3415,7 +3939,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
info->got_offset;
*gotent = val;
info->got_initialized = 1;
-@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
else if (r_type == R_390_GOTENT ||
r_type == R_390_GOTPLTENT)
*(unsigned int *) loc =
@@ -3424,7 +3948,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
else if (r_type == R_390_GOT64 ||
r_type == R_390_GOTPLT64)
*(unsigned long *) loc = val;
-@@ -294,7 +294,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -294,7 +294,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
if (info->plt_initialized == 0) {
unsigned int *ip;
@@ -3433,7 +3957,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
info->plt_offset;
#ifndef CONFIG_64BIT
ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
-@@ -319,7 +319,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -319,7 +319,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
val - loc + 0xffffUL < 0x1ffffeUL) ||
(r_type == R_390_PLT32DBL &&
val - loc + 0xffffffffULL < 0x1fffffffeULL)))
@@ -3442,7 +3966,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
me->arch.plt_offset +
info->plt_offset;
val += rela->r_addend - loc;
-@@ -341,7 +341,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -341,7 +341,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
case R_390_GOTOFF32: /* 32 bit offset to GOT. */
case R_390_GOTOFF64: /* 64 bit offset to GOT. */
val = val + rela->r_addend -
@@ -3451,7 +3975,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
if (r_type == R_390_GOTOFF16)
*(unsigned short *) loc = val;
else if (r_type == R_390_GOTOFF32)
-@@ -351,7 +351,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -351,7 +351,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
break;
case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
@@ -3460,10 +3984,11 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/module.c linux-2.6.32.49/arch/s390/k
rela->r_addend - loc;
if (r_type == R_390_GOTPC)
*(unsigned int *) loc = val;
-diff -urNp linux-2.6.32.49/arch/s390/kernel/setup.c linux-2.6.32.49/arch/s390/kernel/setup.c
---- linux-2.6.32.49/arch/s390/kernel/setup.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/kernel/setup.c 2011-11-15 19:59:42.000000000 -0500
-@@ -306,9 +306,6 @@ static int __init early_parse_mem(char *
+diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
+index 061479f..dbfb08c 100644
+--- a/arch/s390/kernel/setup.c
++++ b/arch/s390/kernel/setup.c
+@@ -306,9 +306,6 @@ static int __init early_parse_mem(char *p)
early_param("mem", early_parse_mem);
#ifdef CONFIG_S390_SWITCH_AMODE
@@ -3473,7 +3998,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/setup.c linux-2.6.32.49/arch/s390/ke
static int set_amode_and_uaccess(unsigned long user_amode,
unsigned long user32_amode)
{
-@@ -334,17 +331,6 @@ static int set_amode_and_uaccess(unsigne
+@@ -334,17 +331,6 @@ static int set_amode_and_uaccess(unsigned long user_amode,
return 0;
}
}
@@ -3491,7 +4016,7 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/setup.c linux-2.6.32.49/arch/s390/ke
#else /* CONFIG_S390_SWITCH_AMODE */
static inline int set_amode_and_uaccess(unsigned long user_amode,
unsigned long user32_amode)
-@@ -353,24 +339,6 @@ static inline int set_amode_and_uaccess(
+@@ -353,24 +339,6 @@ static inline int set_amode_and_uaccess(unsigned long user_amode,
}
#endif /* CONFIG_S390_SWITCH_AMODE */
@@ -3516,10 +4041,11 @@ diff -urNp linux-2.6.32.49/arch/s390/kernel/setup.c linux-2.6.32.49/arch/s390/ke
static void setup_addressing_mode(void)
{
if (s390_noexec) {
-diff -urNp linux-2.6.32.49/arch/s390/mm/mmap.c linux-2.6.32.49/arch/s390/mm/mmap.c
---- linux-2.6.32.49/arch/s390/mm/mmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/s390/mm/mmap.c 2011-11-15 19:59:42.000000000 -0500
-@@ -78,10 +78,22 @@ void arch_pick_mmap_layout(struct mm_str
+diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
+index f4558cc..e461f37 100644
+--- a/arch/s390/mm/mmap.c
++++ b/arch/s390/mm/mmap.c
+@@ -78,10 +78,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -3542,7 +4068,7 @@ diff -urNp linux-2.6.32.49/arch/s390/mm/mmap.c linux-2.6.32.49/arch/s390/mm/mmap
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-@@ -153,10 +165,22 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -153,10 +165,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -3565,9 +4091,10 @@ diff -urNp linux-2.6.32.49/arch/s390/mm/mmap.c linux-2.6.32.49/arch/s390/mm/mmap
mm->get_unmapped_area = s390_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.32.49/arch/score/include/asm/system.h linux-2.6.32.49/arch/score/include/asm/system.h
---- linux-2.6.32.49/arch/score/include/asm/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/score/include/asm/system.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/score/include/asm/system.h b/arch/score/include/asm/system.h
+index 589d5c7..669e274 100644
+--- a/arch/score/include/asm/system.h
++++ b/arch/score/include/asm/system.h
@@ -17,7 +17,7 @@ do { \
#define finish_arch_switch(prev) do {} while (0)
@@ -3577,10 +4104,11 @@ diff -urNp linux-2.6.32.49/arch/score/include/asm/system.h linux-2.6.32.49/arch/
#define mb() barrier()
#define rmb() barrier()
-diff -urNp linux-2.6.32.49/arch/score/kernel/process.c linux-2.6.32.49/arch/score/kernel/process.c
---- linux-2.6.32.49/arch/score/kernel/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/score/kernel/process.c 2011-11-15 19:59:42.000000000 -0500
-@@ -161,8 +161,3 @@ unsigned long get_wchan(struct task_stru
+diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
+index 25d0803..d6c8e36 100644
+--- a/arch/score/kernel/process.c
++++ b/arch/score/kernel/process.c
+@@ -161,8 +161,3 @@ unsigned long get_wchan(struct task_struct *task)
return task_pt_regs(task)->cp0_epc;
}
@@ -3589,10 +4117,11 @@ diff -urNp linux-2.6.32.49/arch/score/kernel/process.c linux-2.6.32.49/arch/scor
-{
- return sp;
-}
-diff -urNp linux-2.6.32.49/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.32.49/arch/sh/boards/mach-hp6xx/pm.c
---- linux-2.6.32.49/arch/sh/boards/mach-hp6xx/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sh/boards/mach-hp6xx/pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -143,7 +143,7 @@ static int hp6x0_pm_enter(suspend_state_
+diff --git a/arch/sh/boards/mach-hp6xx/pm.c b/arch/sh/boards/mach-hp6xx/pm.c
+index d936c1a..304a252 100644
+--- a/arch/sh/boards/mach-hp6xx/pm.c
++++ b/arch/sh/boards/mach-hp6xx/pm.c
+@@ -143,7 +143,7 @@ static int hp6x0_pm_enter(suspend_state_t state)
return 0;
}
@@ -3601,10 +4130,11 @@ diff -urNp linux-2.6.32.49/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.32.49/arch/s
.enter = hp6x0_pm_enter,
.valid = suspend_valid_only_mem,
};
-diff -urNp linux-2.6.32.49/arch/sh/kernel/cpu/sh4/sq.c linux-2.6.32.49/arch/sh/kernel/cpu/sh4/sq.c
---- linux-2.6.32.49/arch/sh/kernel/cpu/sh4/sq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sh/kernel/cpu/sh4/sq.c 2011-11-15 19:59:42.000000000 -0500
-@@ -327,7 +327,7 @@ static struct attribute *sq_sysfs_attrs[
+diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
+index 8a8a993..7b3079b 100644
+--- a/arch/sh/kernel/cpu/sh4/sq.c
++++ b/arch/sh/kernel/cpu/sh4/sq.c
+@@ -327,7 +327,7 @@ static struct attribute *sq_sysfs_attrs[] = {
NULL,
};
@@ -3613,10 +4143,11 @@ diff -urNp linux-2.6.32.49/arch/sh/kernel/cpu/sh4/sq.c linux-2.6.32.49/arch/sh/k
.show = sq_sysfs_show,
.store = sq_sysfs_store,
};
-diff -urNp linux-2.6.32.49/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.32.49/arch/sh/kernel/cpu/shmobile/pm.c
---- linux-2.6.32.49/arch/sh/kernel/cpu/shmobile/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sh/kernel/cpu/shmobile/pm.c 2011-11-15 19:59:42.000000000 -0500
-@@ -58,7 +58,7 @@ static int sh_pm_enter(suspend_state_t s
+diff --git a/arch/sh/kernel/cpu/shmobile/pm.c b/arch/sh/kernel/cpu/shmobile/pm.c
+index ee3c2aa..c49cee6 100644
+--- a/arch/sh/kernel/cpu/shmobile/pm.c
++++ b/arch/sh/kernel/cpu/shmobile/pm.c
+@@ -58,7 +58,7 @@ static int sh_pm_enter(suspend_state_t state)
return 0;
}
@@ -3625,9 +4156,10 @@ diff -urNp linux-2.6.32.49/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.32.49/arch
.enter = sh_pm_enter,
.valid = suspend_valid_only_mem,
};
-diff -urNp linux-2.6.32.49/arch/sh/kernel/kgdb.c linux-2.6.32.49/arch/sh/kernel/kgdb.c
---- linux-2.6.32.49/arch/sh/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sh/kernel/kgdb.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c
+index 3e532d0..9faa306 100644
+--- a/arch/sh/kernel/kgdb.c
++++ b/arch/sh/kernel/kgdb.c
@@ -271,7 +271,7 @@ void kgdb_arch_exit(void)
{
}
@@ -3637,10 +4169,11 @@ diff -urNp linux-2.6.32.49/arch/sh/kernel/kgdb.c linux-2.6.32.49/arch/sh/kernel/
/* Breakpoint instruction: trapa #0x3c */
#ifdef CONFIG_CPU_LITTLE_ENDIAN
.gdb_bpt_instr = { 0x3c, 0xc3 },
-diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
---- linux-2.6.32.49/arch/sh/mm/mmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sh/mm/mmap.c 2011-11-15 19:59:42.000000000 -0500
-@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
+index afeb710..d1d1289 100644
+--- a/arch/sh/mm/mmap.c
++++ b/arch/sh/mm/mmap.c
+@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -3659,7 +4192,7 @@ diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
/*
* Remember the place where we stopped the search:
*/
-@@ -157,8 +156,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -157,8 +156,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -3669,7 +4202,7 @@ diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
return addr;
}
-@@ -179,7 +177,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +177,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -3678,7 +4211,7 @@ diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -3701,7 +4234,7 @@ diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -3714,9 +4247,23 @@ diff -urNp linux-2.6.32.49/arch/sh/mm/mmap.c linux-2.6.32.49/arch/sh/mm/mmap.c
bottomup:
/*
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h
---- linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
+index 113225b..7fd04e7 100644
+--- a/arch/sparc/Makefile
++++ b/arch/sparc/Makefile
+@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/
+ # Export what is needed by arch/sparc/boot/Makefile
+ export VMLINUX_INIT VMLINUX_MAIN
+ VMLINUX_INIT := $(head-y) $(init-y)
+-VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
++VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
+ VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
+ VMLINUX_MAIN += $(drivers-y) $(net-y)
+
+diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
+index f5cc06f..f858d47 100644
+--- a/arch/sparc/include/asm/atomic_64.h
++++ b/arch/sparc/include/asm/atomic_64.h
@@ -14,18 +14,40 @@
#define ATOMIC64_INIT(i) { (i) }
@@ -3758,7 +4305,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/ar
extern int atomic_sub_ret(int, atomic_t *);
extern long atomic64_sub_ret(long, atomic64_t *);
-@@ -33,13 +55,29 @@ extern long atomic64_sub_ret(long, atomi
+@@ -33,13 +55,29 @@ extern long atomic64_sub_ret(long, atomic64_t *);
#define atomic64_dec_return(v) atomic64_sub_ret(1, v)
#define atomic_inc_return(v) atomic_add_ret(1, v)
@@ -3788,7 +4335,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/ar
/*
* atomic_inc_and_test - increment and test
-@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomi
+@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomic64_t *);
* other cases.
*/
#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
@@ -3799,7 +4346,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/ar
#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
#define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0)
-@@ -59,30 +101,65 @@ extern long atomic64_sub_ret(long, atomi
+@@ -59,30 +101,65 @@ extern long atomic64_sub_ret(long, atomic64_t *);
#define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0)
#define atomic_inc(v) atomic_add(1, v)
@@ -3869,7 +4416,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/ar
}
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-@@ -90,20 +167,35 @@ static inline int atomic_add_unless(atom
+@@ -90,20 +167,35 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
#define atomic64_cmpxchg(v, o, n) \
((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
@@ -3909,9 +4456,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/atomic_64.h linux-2.6.32.49/ar
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/cache.h linux-2.6.32.49/arch/sparc/include/asm/cache.h
---- linux-2.6.32.49/arch/sparc/include/asm/cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/cache.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/cache.h b/arch/sparc/include/asm/cache.h
+index 41f85ae..fb54d5e 100644
+--- a/arch/sparc/include/asm/cache.h
++++ b/arch/sparc/include/asm/cache.h
@@ -8,7 +8,7 @@
#define _SPARC_CACHE_H
@@ -3921,10 +4469,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/cache.h linux-2.6.32.49/arch/s
#define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)))
#ifdef CONFIG_SPARC32
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h
---- linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h 2011-11-15 19:59:42.000000000 -0500
-@@ -14,10 +14,10 @@ extern int dma_set_mask(struct device *d
+diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h
+index 5a8c308..38def92 100644
+--- a/arch/sparc/include/asm/dma-mapping.h
++++ b/arch/sparc/include/asm/dma-mapping.h
+@@ -14,10 +14,10 @@ extern int dma_set_mask(struct device *dev, u64 dma_mask);
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
#define dma_is_consistent(d, h) (1)
@@ -3937,7 +4486,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.49/
{
#if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
if (dev->bus == &pci_bus_type)
-@@ -31,7 +31,7 @@ static inline struct dma_map_ops *get_dm
+@@ -31,7 +31,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag)
{
@@ -3946,7 +4495,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.49/
void *cpu_addr;
cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag);
-@@ -42,7 +42,7 @@ static inline void *dma_alloc_coherent(s
+@@ -42,7 +42,7 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
static inline void dma_free_coherent(struct device *dev, size_t size,
void *cpu_addr, dma_addr_t dma_handle)
{
@@ -3955,9 +4504,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.49/
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
ops->free_coherent(dev, size, cpu_addr, dma_handle);
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/elf_32.h linux-2.6.32.49/arch/sparc/include/asm/elf_32.h
---- linux-2.6.32.49/arch/sparc/include/asm/elf_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/elf_32.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
+index 381a1b5..b97e3ff 100644
+--- a/arch/sparc/include/asm/elf_32.h
++++ b/arch/sparc/include/asm/elf_32.h
@@ -116,6 +116,13 @@ typedef struct {
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
@@ -3972,9 +4522,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/elf_32.h linux-2.6.32.49/arch/
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. This can NOT be done in userspace
on Sparc. */
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/elf_64.h linux-2.6.32.49/arch/sparc/include/asm/elf_64.h
---- linux-2.6.32.49/arch/sparc/include/asm/elf_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/elf_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
+index 9968085..c2106ef 100644
+--- a/arch/sparc/include/asm/elf_64.h
++++ b/arch/sparc/include/asm/elf_64.h
@@ -163,6 +163,12 @@ typedef struct {
#define ELF_ET_DYN_BASE 0x0000010000000000UL
#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
@@ -3988,9 +4539,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/elf_64.h linux-2.6.32.49/arch/
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/pgtable_32.h linux-2.6.32.49/arch/sparc/include/asm/pgtable_32.h
---- linux-2.6.32.49/arch/sparc/include/asm/pgtable_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/pgtable_32.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
+index e0cabe7..efd60f1 100644
+--- a/arch/sparc/include/asm/pgtable_32.h
++++ b/arch/sparc/include/asm/pgtable_32.h
@@ -43,6 +43,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_copy)
@@ -4022,9 +4574,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/pgtable_32.h linux-2.6.32.49/a
extern unsigned long page_kernel;
#ifdef MODULE
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.32.49/arch/sparc/include/asm/pgtsrmmu.h
---- linux-2.6.32.49/arch/sparc/include/asm/pgtsrmmu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/pgtsrmmu.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h
+index 1407c07..7e10231 100644
+--- a/arch/sparc/include/asm/pgtsrmmu.h
++++ b/arch/sparc/include/asm/pgtsrmmu.h
@@ -115,6 +115,13 @@
SRMMU_EXEC | SRMMU_REF)
#define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
@@ -4039,10 +4592,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.32.49/arc
#define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
SRMMU_DIRTY | SRMMU_REF)
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h
---- linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h 2011-11-15 19:59:42.000000000 -0500
-@@ -92,14 +92,19 @@ static inline void __raw_spin_lock_flags
+diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
+index 43e5147..47622a1 100644
+--- a/arch/sparc/include/asm/spinlock_64.h
++++ b/arch/sparc/include/asm/spinlock_64.h
+@@ -92,14 +92,19 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla
/* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */
@@ -4064,7 +4618,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%icc, 1b\n"
-@@ -112,10 +117,10 @@ static void inline arch_read_lock(raw_rw
+@@ -112,10 +117,10 @@ static void inline arch_read_lock(raw_rwlock_t *lock)
" .previous"
: "=&r" (tmp1), "=&r" (tmp2)
: "r" (lock)
@@ -4077,7 +4631,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
{
int tmp1, tmp2;
-@@ -123,7 +128,12 @@ static int inline arch_read_trylock(raw_
+@@ -123,7 +128,12 @@ static int inline arch_read_trylock(raw_rwlock_t *lock)
"1: ldsw [%2], %0\n"
" brlz,a,pn %0, 2f\n"
" mov 0, %0\n"
@@ -4091,7 +4645,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%icc, 1b\n"
-@@ -136,13 +146,18 @@ static int inline arch_read_trylock(raw_
+@@ -136,13 +146,18 @@ static int inline arch_read_trylock(raw_rwlock_t *lock)
return tmp1;
}
@@ -4112,7 +4666,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%xcc, 1b\n"
-@@ -152,7 +167,7 @@ static void inline arch_read_unlock(raw_
+@@ -152,7 +167,7 @@ static void inline arch_read_unlock(raw_rwlock_t *lock)
: "memory");
}
@@ -4121,7 +4675,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
{
unsigned long mask, tmp1, tmp2;
-@@ -177,7 +192,7 @@ static void inline arch_write_lock(raw_r
+@@ -177,7 +192,7 @@ static void inline arch_write_lock(raw_rwlock_t *lock)
: "memory");
}
@@ -4130,7 +4684,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
{
__asm__ __volatile__(
" stw %%g0, [%0]"
-@@ -186,7 +201,7 @@ static void inline arch_write_unlock(raw
+@@ -186,7 +201,7 @@ static void inline arch_write_unlock(raw_rwlock_t *lock)
: "memory");
}
@@ -4139,9 +4693,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.49/
{
unsigned long mask, tmp1, tmp2, result;
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/thread_info_32.h linux-2.6.32.49/arch/sparc/include/asm/thread_info_32.h
---- linux-2.6.32.49/arch/sparc/include/asm/thread_info_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/thread_info_32.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
+index 844d73a..f787fb9 100644
+--- a/arch/sparc/include/asm/thread_info_32.h
++++ b/arch/sparc/include/asm/thread_info_32.h
@@ -50,6 +50,8 @@ struct thread_info {
unsigned long w_saved;
@@ -4151,9 +4706,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/thread_info_32.h linux-2.6.32.
};
/*
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/thread_info_64.h linux-2.6.32.49/arch/sparc/include/asm/thread_info_64.h
---- linux-2.6.32.49/arch/sparc/include/asm/thread_info_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/thread_info_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
+index f78ad9a..9f55fc7 100644
+--- a/arch/sparc/include/asm/thread_info_64.h
++++ b/arch/sparc/include/asm/thread_info_64.h
@@ -68,6 +68,8 @@ struct thread_info {
struct pt_regs *kern_una_regs;
unsigned int kern_una_insn;
@@ -4163,10 +4719,29 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/thread_info_64.h linux-2.6.32.
unsigned long fpregs[0] __attribute__ ((aligned(64)));
};
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_32.h linux-2.6.32.49/arch/sparc/include/asm/uaccess_32.h
---- linux-2.6.32.49/arch/sparc/include/asm/uaccess_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/uaccess_32.h 2011-11-15 19:59:42.000000000 -0500
-@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __
+diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
+index e88fbe5..96b0ce5 100644
+--- a/arch/sparc/include/asm/uaccess.h
++++ b/arch/sparc/include/asm/uaccess.h
+@@ -1,5 +1,13 @@
+ #ifndef ___ASM_SPARC_UACCESS_H
+ #define ___ASM_SPARC_UACCESS_H
++
++#ifdef __KERNEL__
++#ifndef __ASSEMBLY__
++#include <linux/types.h>
++extern void check_object_size(const void *ptr, unsigned long n, bool to);
++#endif
++#endif
++
+ #if defined(__sparc__) && defined(__arch64__)
+ #include <asm/uaccess_64.h>
+ #else
+diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
+index 8303ac4..07f333d 100644
+--- a/arch/sparc/include/asm/uaccess_32.h
++++ b/arch/sparc/include/asm/uaccess_32.h
+@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __user *to, const void __user *from, unsig
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -4217,9 +4792,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_32.h linux-2.6.32.49/a
return __copy_user((__force void __user *) to, from, n);
}
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h
---- linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
+index 9ea271e..7b8a271 100644
+--- a/arch/sparc/include/asm/uaccess_64.h
++++ b/arch/sparc/include/asm/uaccess_64.h
@@ -9,6 +9,7 @@
#include <linux/compiler.h>
#include <linux/string.h>
@@ -4228,7 +4804,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.49/a
#include <asm/asi.h>
#include <asm/system.h>
#include <asm/spitfire.h>
-@@ -212,8 +213,15 @@ extern unsigned long copy_from_user_fixu
+@@ -212,8 +213,15 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
@@ -4245,7 +4821,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.49/a
if (unlikely(ret))
ret = copy_from_user_fixup(to, from, size);
return ret;
-@@ -228,8 +236,15 @@ extern unsigned long copy_to_user_fixup(
+@@ -228,8 +236,15 @@ extern unsigned long copy_to_user_fixup(void __user *to, const void *from,
static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long size)
{
@@ -4262,27 +4838,24 @@ diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.49/a
if (unlikely(ret))
ret = copy_to_user_fixup(to, from, size);
return ret;
-diff -urNp linux-2.6.32.49/arch/sparc/include/asm/uaccess.h linux-2.6.32.49/arch/sparc/include/asm/uaccess.h
---- linux-2.6.32.49/arch/sparc/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
-@@ -1,5 +1,13 @@
- #ifndef ___ASM_SPARC_UACCESS_H
- #define ___ASM_SPARC_UACCESS_H
-+
-+#ifdef __KERNEL__
-+#ifndef __ASSEMBLY__
-+#include <linux/types.h>
-+extern void check_object_size(const void *ptr, unsigned long n, bool to);
-+#endif
-+#endif
-+
- #if defined(__sparc__) && defined(__arch64__)
- #include <asm/uaccess_64.h>
- #else
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/iommu.c linux-2.6.32.49/arch/sparc/kernel/iommu.c
---- linux-2.6.32.49/arch/sparc/kernel/iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/iommu.c 2011-11-15 19:59:42.000000000 -0500
-@@ -826,7 +826,7 @@ static void dma_4u_sync_sg_for_cpu(struc
+diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
+index 2782681..77ded84 100644
+--- a/arch/sparc/kernel/Makefile
++++ b/arch/sparc/kernel/Makefile
+@@ -3,7 +3,7 @@
+ #
+
+ asflags-y := -ansi
+-ccflags-y := -Werror
++#ccflags-y := -Werror
+
+ extra-y := head_$(BITS).o
+ extra-y += init_task.o
+diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c
+index 7690cc2..ece64c9 100644
+--- a/arch/sparc/kernel/iommu.c
++++ b/arch/sparc/kernel/iommu.c
+@@ -826,7 +826,7 @@ static void dma_4u_sync_sg_for_cpu(struct device *dev,
spin_unlock_irqrestore(&iommu->lock, flags);
}
@@ -4291,7 +4864,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/iommu.c linux-2.6.32.49/arch/sparc/
.alloc_coherent = dma_4u_alloc_coherent,
.free_coherent = dma_4u_free_coherent,
.map_page = dma_4u_map_page,
-@@ -837,7 +837,7 @@ static struct dma_map_ops sun4u_dma_ops
+@@ -837,7 +837,7 @@ static struct dma_map_ops sun4u_dma_ops = {
.sync_sg_for_cpu = dma_4u_sync_sg_for_cpu,
};
@@ -4300,10 +4873,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/iommu.c linux-2.6.32.49/arch/sparc/
EXPORT_SYMBOL(dma_ops);
extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/ioport.c linux-2.6.32.49/arch/sparc/kernel/ioport.c
---- linux-2.6.32.49/arch/sparc/kernel/ioport.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/ioport.c 2011-11-15 19:59:42.000000000 -0500
-@@ -392,7 +392,7 @@ static void sbus_sync_sg_for_device(stru
+diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
+index 9f61fd8..bd048db 100644
+--- a/arch/sparc/kernel/ioport.c
++++ b/arch/sparc/kernel/ioport.c
+@@ -392,7 +392,7 @@ static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
BUG();
}
@@ -4321,7 +4895,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/ioport.c linux-2.6.32.49/arch/sparc
EXPORT_SYMBOL(dma_ops);
static int __init sparc_register_ioport(void)
-@@ -640,7 +640,7 @@ static void pci32_sync_sg_for_device(str
+@@ -640,7 +640,7 @@ static void pci32_sync_sg_for_device(struct device *device, struct scatterlist *
}
}
@@ -4330,9 +4904,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/ioport.c linux-2.6.32.49/arch/sparc
.alloc_coherent = pci32_alloc_coherent,
.free_coherent = pci32_free_coherent,
.map_page = pci32_map_page,
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/kgdb_32.c linux-2.6.32.49/arch/sparc/kernel/kgdb_32.c
---- linux-2.6.32.49/arch/sparc/kernel/kgdb_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/kgdb_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
+index 04df4ed..55c4b6e 100644
+--- a/arch/sparc/kernel/kgdb_32.c
++++ b/arch/sparc/kernel/kgdb_32.c
@@ -158,7 +158,7 @@ void kgdb_arch_exit(void)
{
}
@@ -4342,9 +4917,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/kgdb_32.c linux-2.6.32.49/arch/spar
/* Breakpoint instruction: ta 0x7d */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
};
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/kgdb_64.c linux-2.6.32.49/arch/sparc/kernel/kgdb_64.c
---- linux-2.6.32.49/arch/sparc/kernel/kgdb_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/kgdb_64.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/kernel/kgdb_64.c b/arch/sparc/kernel/kgdb_64.c
+index f5a0fd4..d886f71 100644
+--- a/arch/sparc/kernel/kgdb_64.c
++++ b/arch/sparc/kernel/kgdb_64.c
@@ -180,7 +180,7 @@ void kgdb_arch_exit(void)
{
}
@@ -4354,22 +4930,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/kgdb_64.c linux-2.6.32.49/arch/spar
/* Breakpoint instruction: ta 0x72 */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },
};
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/Makefile linux-2.6.32.49/arch/sparc/kernel/Makefile
---- linux-2.6.32.49/arch/sparc/kernel/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -3,7 +3,7 @@
- #
-
- asflags-y := -ansi
--ccflags-y := -Werror
-+#ccflags-y := -Werror
-
- extra-y := head_$(BITS).o
- extra-y += init_task.o
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/pci_sun4v.c linux-2.6.32.49/arch/sparc/kernel/pci_sun4v.c
---- linux-2.6.32.49/arch/sparc/kernel/pci_sun4v.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/pci_sun4v.c 2011-11-15 19:59:42.000000000 -0500
-@@ -525,7 +525,7 @@ static void dma_4v_unmap_sg(struct devic
+diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
+index 23c33ff..d137fbd 100644
+--- a/arch/sparc/kernel/pci_sun4v.c
++++ b/arch/sparc/kernel/pci_sun4v.c
+@@ -525,7 +525,7 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist,
spin_unlock_irqrestore(&iommu->lock, flags);
}
@@ -4378,9 +4943,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/pci_sun4v.c linux-2.6.32.49/arch/sp
.alloc_coherent = dma_4v_alloc_coherent,
.free_coherent = dma_4v_free_coherent,
.map_page = dma_4v_map_page,
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_32.c linux-2.6.32.49/arch/sparc/kernel/process_32.c
---- linux-2.6.32.49/arch/sparc/kernel/process_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/process_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
+index c49865b..b41a81b 100644
+--- a/arch/sparc/kernel/process_32.c
++++ b/arch/sparc/kernel/process_32.c
@@ -196,7 +196,7 @@ void __show_backtrace(unsigned long fp)
rw->ins[4], rw->ins[5],
rw->ins[6],
@@ -4407,7 +4973,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_32.c linux-2.6.32.49/arch/s
printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
-@@ -305,7 +305,7 @@ void show_stack(struct task_struct *tsk,
+@@ -305,7 +305,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
rw = (struct reg_window32 *) fp;
pc = rw->ins[7];
printk("[%08lx : ", pc);
@@ -4416,10 +4982,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_32.c linux-2.6.32.49/arch/s
fp = rw->ins[6];
} while (++count < 16);
printk("\n");
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_64.c linux-2.6.32.49/arch/sparc/kernel/process_64.c
---- linux-2.6.32.49/arch/sparc/kernel/process_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/process_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -180,14 +180,14 @@ static void show_regwindow(struct pt_reg
+diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
+index cb70476..3d0c191 100644
+--- a/arch/sparc/kernel/process_64.c
++++ b/arch/sparc/kernel/process_64.c
+@@ -180,14 +180,14 @@ static void show_regwindow(struct pt_regs *regs)
printk("i4: %016lx i5: %016lx i6: %016lx i7: %016lx\n",
rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]);
if (regs->tstate & TSTATE_PRIV)
@@ -4445,7 +5012,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_64.c linux-2.6.32.49/arch/s
show_regwindow(regs);
}
-@@ -284,7 +284,7 @@ void arch_trigger_all_cpu_backtrace(void
+@@ -284,7 +284,7 @@ void arch_trigger_all_cpu_backtrace(void)
((tp && tp->task) ? tp->task->pid : -1));
if (gp->tstate & TSTATE_PRIV) {
@@ -4454,9 +5021,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/process_64.c linux-2.6.32.49/arch/s
(void *) gp->tpc,
(void *) gp->o7,
(void *) gp->i7,
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/sigutil_64.c linux-2.6.32.49/arch/sparc/kernel/sigutil_64.c
---- linux-2.6.32.49/arch/sparc/kernel/sigutil_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/sigutil_64.c 2011-11-29 18:13:57.000000000 -0500
+diff --git a/arch/sparc/kernel/sigutil_64.c b/arch/sparc/kernel/sigutil_64.c
+index 6edc4e5..06a69b4 100644
+--- a/arch/sparc/kernel/sigutil_64.c
++++ b/arch/sparc/kernel/sigutil_64.c
@@ -2,6 +2,7 @@
#include <linux/types.h>
#include <linux/thread_info.h>
@@ -4465,10 +5033,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sigutil_64.c linux-2.6.32.49/arch/s
#include <asm/sigcontext.h>
#include <asm/fpumacro.h>
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c
---- linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -57,7 +57,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
+index 3a82e65..ce0a53a 100644
+--- a/arch/sparc/kernel/sys_sparc_32.c
++++ b/arch/sparc/kernel/sys_sparc_32.c
+@@ -57,7 +57,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (ARCH_SUN4C && len > 0x20000000)
return -ENOMEM;
if (!addr)
@@ -4477,7 +5046,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c linux-2.6.32.49/arch
if (flags & MAP_SHARED)
addr = COLOUR_ALIGN(addr);
-@@ -72,7 +72,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -72,7 +72,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
}
if (TASK_SIZE - PAGE_SIZE - len < addr)
return -ENOMEM;
@@ -4486,10 +5055,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_32.c linux-2.6.32.49/arch
return addr;
addr = vmm->vm_end;
if (flags & MAP_SHARED)
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c
---- linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -125,7 +125,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
+index cfa0e19..98972ac 100644
+--- a/arch/sparc/kernel/sys_sparc_64.c
++++ b/arch/sparc/kernel/sys_sparc_64.c
+@@ -125,7 +125,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
@@ -4498,7 +5068,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
-@@ -140,6 +140,10 @@ unsigned long arch_get_unmapped_area(str
+@@ -140,6 +140,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
@@ -4509,7 +5079,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -147,15 +151,14 @@ unsigned long arch_get_unmapped_area(str
+@@ -147,15 +151,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -4546,7 +5116,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
/*
* Remember the place where we stopped the search:
*/
-@@ -216,7 +219,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -216,7 +219,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
@@ -4555,7 +5125,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
-@@ -237,8 +240,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -237,8 +240,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -4565,7 +5135,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
return addr;
}
-@@ -259,7 +261,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -259,7 +261,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -4574,7 +5144,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -268,18 +270,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -268,18 +270,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -4597,7 +5167,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -289,10 +291,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -289,10 +291,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -4610,7 +5180,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
bottomup:
/*
-@@ -384,6 +384,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -384,6 +384,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY ||
sysctl_legacy_va_layout) {
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
@@ -4623,7 +5193,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
} else {
-@@ -398,6 +404,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -398,6 +404,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
gap = (task_size / 6 * 5);
mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
@@ -4636,10 +5206,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.49/arch
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_32.c linux-2.6.32.49/arch/sparc/kernel/traps_32.c
---- linux-2.6.32.49/arch/sparc/kernel/traps_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/traps_32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -44,6 +44,8 @@ static void instruction_dump(unsigned lo
+diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
+index c0490c7..84959d1 100644
+--- a/arch/sparc/kernel/traps_32.c
++++ b/arch/sparc/kernel/traps_32.c
+@@ -44,6 +44,8 @@ static void instruction_dump(unsigned long *pc)
#define __SAVE __asm__ __volatile__("save %sp, -0x40, %sp\n\t")
#define __RESTORE __asm__ __volatile__("restore %g0, %g0, %g0\n\t")
@@ -4648,7 +5219,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_32.c linux-2.6.32.49/arch/spa
void die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
-@@ -76,15 +78,17 @@ void die_if_kernel(char *str, struct pt_
+@@ -76,15 +78,17 @@ void die_if_kernel(char *str, struct pt_regs *regs)
count++ < 30 &&
(((unsigned long) rw) >= PAGE_OFFSET) &&
!(((unsigned long) rw) & 0x7)) {
@@ -4668,10 +5239,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_32.c linux-2.6.32.49/arch/spa
do_exit(SIGSEGV);
}
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/sparc/kernel/traps_64.c
---- linux-2.6.32.49/arch/sparc/kernel/traps_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/traps_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -73,7 +73,7 @@ static void dump_tl1_traplog(struct tl1_
+diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
+index 10f7bb9..cdb6793 100644
+--- a/arch/sparc/kernel/traps_64.c
++++ b/arch/sparc/kernel/traps_64.c
+@@ -73,7 +73,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
i + 1,
p->trapstack[i].tstate, p->trapstack[i].tpc,
p->trapstack[i].tnpc, p->trapstack[i].tt);
@@ -4680,7 +5252,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
}
}
-@@ -93,6 +93,12 @@ void bad_trap(struct pt_regs *regs, long
+@@ -93,6 +93,12 @@ void bad_trap(struct pt_regs *regs, long lvl)
lvl -= 0x100;
if (regs->tstate & TSTATE_PRIV) {
@@ -4693,7 +5265,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
sprintf(buffer, "Kernel bad sw trap %lx", lvl);
die_if_kernel(buffer, regs);
}
-@@ -111,11 +117,16 @@ void bad_trap(struct pt_regs *regs, long
+@@ -111,11 +117,16 @@ void bad_trap(struct pt_regs *regs, long lvl)
void bad_trap_tl1(struct pt_regs *regs, long lvl)
{
char buffer[32];
@@ -4711,7 +5283,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
sprintf (buffer, "Bad trap %lx at tl>0", lvl);
-@@ -1139,7 +1150,7 @@ static void cheetah_log_errors(struct pt
+@@ -1139,7 +1150,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate);
printk("%s" "ERROR(%d): ",
(recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id());
@@ -4720,7 +5292,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n",
(recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
(afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT,
-@@ -1746,7 +1757,7 @@ void cheetah_plus_parity_error(int type,
+@@ -1746,7 +1757,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id(),
(type & 0x1) ? 'I' : 'D',
regs->tpc);
@@ -4729,7 +5301,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
panic("Irrecoverable Cheetah+ parity error.");
}
-@@ -1754,7 +1765,7 @@ void cheetah_plus_parity_error(int type,
+@@ -1754,7 +1765,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id(),
(type & 0x1) ? 'I' : 'D',
regs->tpc);
@@ -4738,7 +5310,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
}
struct sun4v_error_entry {
-@@ -1961,9 +1972,9 @@ void sun4v_itlb_error_report(struct pt_r
+@@ -1961,9 +1972,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
@@ -4750,7 +5322,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
(void *) regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
-@@ -1985,9 +1996,9 @@ void sun4v_dtlb_error_report(struct pt_r
+@@ -1985,9 +1996,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
@@ -4762,7 +5334,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
(void *) regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
-@@ -2191,7 +2202,7 @@ void show_stack(struct task_struct *tsk,
+@@ -2191,7 +2202,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp = (unsigned long)sf->fp + STACK_BIAS;
}
@@ -4771,7 +5343,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
} while (++count < 16);
}
-@@ -2233,6 +2244,8 @@ static inline struct reg_window *kernel_
+@@ -2233,6 +2244,8 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw)
return (struct reg_window *) (fp + STACK_BIAS);
}
@@ -4780,7 +5352,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
void die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
-@@ -2260,7 +2273,7 @@ void die_if_kernel(char *str, struct pt_
+@@ -2260,7 +2273,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
while (rw &&
count++ < 30&&
is_kernel_stack(current, rw)) {
@@ -4789,7 +5361,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
(void *) rw->ins[7]);
rw = kernel_stack_up(rw);
-@@ -2273,8 +2286,11 @@ void die_if_kernel(char *str, struct pt_
+@@ -2273,8 +2286,11 @@ void die_if_kernel(char *str, struct pt_regs *regs)
}
user_instruction_dump ((unsigned int __user *) regs->tpc);
}
@@ -4802,9 +5374,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/traps_64.c linux-2.6.32.49/arch/spa
do_exit(SIGSEGV);
}
EXPORT_SYMBOL(die_if_kernel);
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/una_asm_64.S linux-2.6.32.49/arch/sparc/kernel/una_asm_64.S
---- linux-2.6.32.49/arch/sparc/kernel/una_asm_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/una_asm_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/kernel/una_asm_64.S b/arch/sparc/kernel/una_asm_64.S
+index be183fe..1c8d332 100644
+--- a/arch/sparc/kernel/una_asm_64.S
++++ b/arch/sparc/kernel/una_asm_64.S
@@ -127,7 +127,7 @@ do_int_load:
wr %o5, 0x0, %asi
retl
@@ -4814,10 +5387,11 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/una_asm_64.S linux-2.6.32.49/arch/s
.section __ex_table,"a"
.word 4b, __retl_efault
-diff -urNp linux-2.6.32.49/arch/sparc/kernel/unaligned_64.c linux-2.6.32.49/arch/sparc/kernel/unaligned_64.c
---- linux-2.6.32.49/arch/sparc/kernel/unaligned_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/kernel/unaligned_64.c 2011-11-15 19:59:42.000000000 -0500
-@@ -288,7 +288,7 @@ static void log_unaligned(struct pt_regs
+diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
+index 3792099..2af17d8 100644
+--- a/arch/sparc/kernel/unaligned_64.c
++++ b/arch/sparc/kernel/unaligned_64.c
+@@ -288,7 +288,7 @@ static void log_unaligned(struct pt_regs *regs)
if (count < 5) {
last_time = jiffies;
count++;
@@ -4826,9 +5400,23 @@ diff -urNp linux-2.6.32.49/arch/sparc/kernel/unaligned_64.c linux-2.6.32.49/arch
regs->tpc, (void *) regs->tpc);
}
}
-diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc/lib/atomic_64.S
---- linux-2.6.32.49/arch/sparc/lib/atomic_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/lib/atomic_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
+index e75faf0..24f12f9 100644
+--- a/arch/sparc/lib/Makefile
++++ b/arch/sparc/lib/Makefile
+@@ -2,7 +2,7 @@
+ #
+
+ asflags-y := -ansi -DST_DIV0=0x02
+-ccflags-y := -Werror
++#ccflags-y := -Werror
+
+ lib-$(CONFIG_SPARC32) += mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o
+ lib-$(CONFIG_SPARC32) += memcpy.o memset.o
+diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
+index 0268210..f0291ca 100644
+--- a/arch/sparc/lib/atomic_64.S
++++ b/arch/sparc/lib/atomic_64.S
@@ -18,7 +18,12 @@
atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
BACKOFF_SETUP(%o2)
@@ -4843,7 +5431,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, 2f
-@@ -28,12 +33,32 @@ atomic_add: /* %o0 = increment, %o1 = at
+@@ -28,12 +33,32 @@ atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_add, .-atomic_add
@@ -4877,7 +5465,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, 2f
-@@ -43,12 +68,32 @@ atomic_sub: /* %o0 = decrement, %o1 = at
+@@ -43,12 +68,32 @@ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_sub, .-atomic_sub
@@ -4911,7 +5499,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, 2f
-@@ -59,12 +104,33 @@ atomic_add_ret: /* %o0 = increment, %o1
+@@ -59,12 +104,33 @@ atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_add_ret, .-atomic_add_ret
@@ -4946,7 +5534,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, 2f
-@@ -80,7 +146,12 @@ atomic_sub_ret: /* %o0 = decrement, %o1
+@@ -80,7 +146,12 @@ atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */
BACKOFF_SETUP(%o2)
1: ldx [%o1], %g1
@@ -4960,7 +5548,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, 2f
-@@ -90,12 +161,32 @@ atomic64_add: /* %o0 = increment, %o1 =
+@@ -90,12 +161,32 @@ atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_add, .-atomic64_add
@@ -4994,7 +5582,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, 2f
-@@ -105,12 +196,32 @@ atomic64_sub: /* %o0 = decrement, %o1 =
+@@ -105,12 +196,32 @@ atomic64_sub: /* %o0 = decrement, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_sub, .-atomic64_sub
@@ -5028,7 +5616,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, 2f
-@@ -121,12 +232,33 @@ atomic64_add_ret: /* %o0 = increment, %o
+@@ -121,12 +232,33 @@ atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_add_ret, .-atomic64_add_ret
@@ -5063,9 +5651,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/atomic_64.S linux-2.6.32.49/arch/sparc
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, 2f
-diff -urNp linux-2.6.32.49/arch/sparc/lib/ksyms.c linux-2.6.32.49/arch/sparc/lib/ksyms.c
---- linux-2.6.32.49/arch/sparc/lib/ksyms.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/lib/ksyms.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/lib/ksyms.c b/arch/sparc/lib/ksyms.c
+index 704b126..2e79d76 100644
+--- a/arch/sparc/lib/ksyms.c
++++ b/arch/sparc/lib/ksyms.c
@@ -144,12 +144,18 @@ EXPORT_SYMBOL(__downgrade_write);
/* Atomic counter implementation. */
@@ -5085,21 +5674,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/ksyms.c linux-2.6.32.49/arch/sparc/lib
EXPORT_SYMBOL(atomic64_sub_ret);
/* Atomic bit operations. */
-diff -urNp linux-2.6.32.49/arch/sparc/lib/Makefile linux-2.6.32.49/arch/sparc/lib/Makefile
---- linux-2.6.32.49/arch/sparc/lib/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/lib/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -2,7 +2,7 @@
- #
-
- asflags-y := -ansi -DST_DIV0=0x02
--ccflags-y := -Werror
-+#ccflags-y := -Werror
-
- lib-$(CONFIG_SPARC32) += mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o
- lib-$(CONFIG_SPARC32) += memcpy.o memset.o
-diff -urNp linux-2.6.32.49/arch/sparc/lib/rwsem_64.S linux-2.6.32.49/arch/sparc/lib/rwsem_64.S
---- linux-2.6.32.49/arch/sparc/lib/rwsem_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/lib/rwsem_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/lib/rwsem_64.S b/arch/sparc/lib/rwsem_64.S
+index 91a7d29..ce75c29 100644
+--- a/arch/sparc/lib/rwsem_64.S
++++ b/arch/sparc/lib/rwsem_64.S
@@ -11,7 +11,12 @@
.globl __down_read
__down_read:
@@ -5198,21 +5776,23 @@ diff -urNp linux-2.6.32.49/arch/sparc/lib/rwsem_64.S linux-2.6.32.49/arch/sparc/
cas [%o0], %g3, %g7
cmp %g3, %g7
bne,pn %icc, 1b
-diff -urNp linux-2.6.32.49/arch/sparc/Makefile linux-2.6.32.49/arch/sparc/Makefile
---- linux-2.6.32.49/arch/sparc/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
- # Export what is needed by arch/sparc/boot/Makefile
- export VMLINUX_INIT VMLINUX_MAIN
- VMLINUX_INIT := $(head-y) $(init-y)
--VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
-+VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
- VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
- VMLINUX_MAIN += $(drivers-y) $(net-y)
+diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
+index 79836a7..62f47a2 100644
+--- a/arch/sparc/mm/Makefile
++++ b/arch/sparc/mm/Makefile
+@@ -2,7 +2,7 @@
+ #
+
+ asflags-y := -ansi
+-ccflags-y := -Werror
++#ccflags-y := -Werror
-diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_32.c linux-2.6.32.49/arch/sparc/mm/fault_32.c
---- linux-2.6.32.49/arch/sparc/mm/fault_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/fault_32.c 2011-11-18 18:01:52.000000000 -0500
+ obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
+ obj-y += fault_$(BITS).o
+diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
+index b99f81c..3453e93 100644
+--- a/arch/sparc/mm/fault_32.c
++++ b/arch/sparc/mm/fault_32.c
@@ -21,6 +21,9 @@
#include <linux/interrupt.h>
#include <linux/module.h>
@@ -5223,7 +5803,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_32.c linux-2.6.32.49/arch/sparc/m
#include <asm/system.h>
#include <asm/page.h>
-@@ -167,6 +170,267 @@ static unsigned long compute_si_addr(str
+@@ -167,6 +170,267 @@ static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault)
return safe_compute_effective_address(regs, insn);
}
@@ -5516,9 +6096,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_32.c linux-2.6.32.49/arch/sparc/m
/* Allow reads even for write-only mappings */
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
-diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_64.c linux-2.6.32.49/arch/sparc/mm/fault_64.c
---- linux-2.6.32.49/arch/sparc/mm/fault_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/fault_64.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
+index 43b0da9..a0b78f9 100644
+--- a/arch/sparc/mm/fault_64.c
++++ b/arch/sparc/mm/fault_64.c
@@ -20,6 +20,9 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
@@ -5529,7 +6110,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_64.c linux-2.6.32.49/arch/sparc/m
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -78,7 +81,7 @@ static void bad_kernel_pc(struct pt_regs
+@@ -78,7 +81,7 @@ static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr)
printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n",
regs->tpc);
printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]);
@@ -5538,7 +6119,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_64.c linux-2.6.32.49/arch/sparc/m
printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr);
dump_stack();
unhandled_fault(regs->tpc, current, regs);
-@@ -249,6 +252,456 @@ static void noinline bogus_32bit_fault_a
+@@ -249,6 +252,456 @@ static void noinline bogus_32bit_fault_address(struct pt_regs *regs,
show_regs(regs);
}
@@ -5995,7 +6576,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_64.c linux-2.6.32.49/arch/sparc/m
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
{
struct mm_struct *mm = current->mm;
-@@ -315,6 +768,29 @@ asmlinkage void __kprobes do_sparc64_fau
+@@ -315,6 +768,29 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
if (!vma)
goto bad_area;
@@ -6025,9 +6606,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/fault_64.c linux-2.6.32.49/arch/sparc/m
/* Pure DTLB misses do not tell us whether the fault causing
* load/store/atomic was a write or not, it only says that there
* was no match. So in such a case we (carefully) read the
-diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c
---- linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
+index f27d103..1b06377 100644
+--- a/arch/sparc/mm/hugetlbpage.c
++++ b/arch/sparc/mm/hugetlbpage.c
@@ -69,7 +69,7 @@ full_search:
}
return -ENOMEM;
@@ -6037,7 +6619,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/spar
/*
* Remember the place where we stopped the search:
*/
-@@ -108,7 +108,7 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -108,7 +108,7 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -6046,7 +6628,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/spar
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -117,16 +117,17 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -117,16 +117,17 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -6066,7 +6648,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/spar
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -136,8 +137,8 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -136,8 +137,8 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -6077,7 +6659,7 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/spar
bottomup:
/*
-@@ -183,8 +184,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -183,8 +184,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (addr) {
addr = ALIGN(addr, HPAGE_SIZE);
vma = find_vma(mm, addr);
@@ -6087,9 +6669,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/hugetlbpage.c linux-2.6.32.49/arch/spar
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-2.6.32.49/arch/sparc/mm/init_32.c linux-2.6.32.49/arch/sparc/mm/init_32.c
---- linux-2.6.32.49/arch/sparc/mm/init_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/init_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
+index dc7c3b1..34c0070 100644
+--- a/arch/sparc/mm/init_32.c
++++ b/arch/sparc/mm/init_32.c
@@ -317,6 +317,9 @@ extern void device_scan(void);
pgprot_t PAGE_SHARED __read_mostly;
EXPORT_SYMBOL(PAGE_SHARED);
@@ -6124,21 +6707,10 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/init_32.c linux-2.6.32.49/arch/sparc/mm
protection_map[12] = PAGE_READONLY;
protection_map[13] = PAGE_READONLY;
protection_map[14] = PAGE_SHARED;
-diff -urNp linux-2.6.32.49/arch/sparc/mm/Makefile linux-2.6.32.49/arch/sparc/mm/Makefile
---- linux-2.6.32.49/arch/sparc/mm/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -2,7 +2,7 @@
- #
-
- asflags-y := -ansi
--ccflags-y := -Werror
-+#ccflags-y := -Werror
-
- obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
- obj-y += fault_$(BITS).o
-diff -urNp linux-2.6.32.49/arch/sparc/mm/srmmu.c linux-2.6.32.49/arch/sparc/mm/srmmu.c
---- linux-2.6.32.49/arch/sparc/mm/srmmu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/sparc/mm/srmmu.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
+index 509b1ff..bfd7118 100644
+--- a/arch/sparc/mm/srmmu.c
++++ b/arch/sparc/mm/srmmu.c
@@ -2200,6 +2200,13 @@ void __init ld_mmu_srmmu(void)
PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
@@ -6153,9 +6725,25 @@ diff -urNp linux-2.6.32.49/arch/sparc/mm/srmmu.c linux-2.6.32.49/arch/sparc/mm/s
BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
-diff -urNp linux-2.6.32.49/arch/um/include/asm/kmap_types.h linux-2.6.32.49/arch/um/include/asm/kmap_types.h
---- linux-2.6.32.49/arch/um/include/asm/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/include/asm/kmap_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/um/Makefile b/arch/um/Makefile
+index fc633db..5e1a1c2 100644
+--- a/arch/um/Makefile
++++ b/arch/um/Makefile
+@@ -49,6 +49,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
+ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+ $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
+
++ifdef CONSTIFY_PLUGIN
++USER_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
++
+ include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
+
+ #This will adjust *FLAGS accordingly to the platform.
+diff --git a/arch/um/include/asm/kmap_types.h b/arch/um/include/asm/kmap_types.h
+index 6c03acd..a5e0215 100644
+--- a/arch/um/include/asm/kmap_types.h
++++ b/arch/um/include/asm/kmap_types.h
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -6164,9 +6752,10 @@ diff -urNp linux-2.6.32.49/arch/um/include/asm/kmap_types.h linux-2.6.32.49/arch
KM_TYPE_NR
};
-diff -urNp linux-2.6.32.49/arch/um/include/asm/page.h linux-2.6.32.49/arch/um/include/asm/page.h
---- linux-2.6.32.49/arch/um/include/asm/page.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/include/asm/page.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
+index 4cc9b6c..02e5029 100644
+--- a/arch/um/include/asm/page.h
++++ b/arch/um/include/asm/page.h
@@ -14,6 +14,9 @@
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
@@ -6177,9 +6766,10 @@ diff -urNp linux-2.6.32.49/arch/um/include/asm/page.h linux-2.6.32.49/arch/um/in
#ifndef __ASSEMBLY__
struct page;
-diff -urNp linux-2.6.32.49/arch/um/kernel/process.c linux-2.6.32.49/arch/um/kernel/process.c
---- linux-2.6.32.49/arch/um/kernel/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/kernel/process.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
+index 4a28a15..654dc2a 100644
+--- a/arch/um/kernel/process.c
++++ b/arch/um/kernel/process.c
@@ -393,22 +393,6 @@ int singlestepping(void * t)
return 2;
}
@@ -6203,23 +6793,10 @@ diff -urNp linux-2.6.32.49/arch/um/kernel/process.c linux-2.6.32.49/arch/um/kern
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack_page, sp, ip;
-diff -urNp linux-2.6.32.49/arch/um/Makefile linux-2.6.32.49/arch/um/Makefile
---- linux-2.6.32.49/arch/um/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/Makefile 2011-11-18 18:01:52.000000000 -0500
-@@ -49,6 +49,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINE
- $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
- $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
-
-+ifdef CONSTIFY_PLUGIN
-+USER_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
-+
- include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-
- #This will adjust *FLAGS accordingly to the platform.
-diff -urNp linux-2.6.32.49/arch/um/sys-i386/shared/sysdep/system.h linux-2.6.32.49/arch/um/sys-i386/shared/sysdep/system.h
---- linux-2.6.32.49/arch/um/sys-i386/shared/sysdep/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/sys-i386/shared/sysdep/system.h 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/um/sys-i386/shared/sysdep/system.h b/arch/um/sys-i386/shared/sysdep/system.h
+index d1b93c4..ae1b7fd 100644
+--- a/arch/um/sys-i386/shared/sysdep/system.h
++++ b/arch/um/sys-i386/shared/sysdep/system.h
@@ -17,7 +17,7 @@
# define AT_VECTOR_SIZE_ARCH 1
#endif
@@ -6229,9 +6806,10 @@ diff -urNp linux-2.6.32.49/arch/um/sys-i386/shared/sysdep/system.h linux-2.6.32.
void default_idle(void);
-diff -urNp linux-2.6.32.49/arch/um/sys-i386/syscalls.c linux-2.6.32.49/arch/um/sys-i386/syscalls.c
---- linux-2.6.32.49/arch/um/sys-i386/syscalls.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/sys-i386/syscalls.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c
+index 857ca0b..9a2669d 100644
+--- a/arch/um/sys-i386/syscalls.c
++++ b/arch/um/sys-i386/syscalls.c
@@ -11,6 +11,21 @@
#include "asm/uaccess.h"
#include "asm/unistd.h"
@@ -6254,9 +6832,10 @@ diff -urNp linux-2.6.32.49/arch/um/sys-i386/syscalls.c linux-2.6.32.49/arch/um/s
/*
* Perform the select(nd, in, out, ex, tv) and mmap() system
* calls. Linux/i386 didn't use to be able to handle more than
-diff -urNp linux-2.6.32.49/arch/um/sys-x86_64/shared/sysdep/system.h linux-2.6.32.49/arch/um/sys-x86_64/shared/sysdep/system.h
---- linux-2.6.32.49/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/um/sys-x86_64/shared/sysdep/system.h b/arch/um/sys-x86_64/shared/sysdep/system.h
+index d1b93c4..ae1b7fd 100644
+--- a/arch/um/sys-x86_64/shared/sysdep/system.h
++++ b/arch/um/sys-x86_64/shared/sysdep/system.h
@@ -17,7 +17,7 @@
# define AT_VECTOR_SIZE_ARCH 1
#endif
@@ -6266,10 +6845,170 @@ diff -urNp linux-2.6.32.49/arch/um/sys-x86_64/shared/sysdep/system.h linux-2.6.3
void default_idle(void);
-diff -urNp linux-2.6.32.49/arch/x86/boot/bitops.h linux-2.6.32.49/arch/x86/boot/bitops.h
---- linux-2.6.32.49/arch/x86/boot/bitops.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/bitops.h 2011-11-15 19:59:42.000000000 -0500
-@@ -26,7 +26,7 @@ static inline int variable_test_bit(int
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 73ae02a..f932de5 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -223,7 +223,7 @@ config X86_TRAMPOLINE
+
+ config X86_32_LAZY_GS
+ def_bool y
+- depends on X86_32 && !CC_STACKPROTECTOR
++ depends on X86_32 && !CC_STACKPROTECTOR && !PAX_MEMORY_UDEREF
+
+ config KTIME_SCALAR
+ def_bool X86_32
+@@ -1008,7 +1008,7 @@ choice
+
+ config NOHIGHMEM
+ bool "off"
+- depends on !X86_NUMAQ
++ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
+ ---help---
+ Linux can use up to 64 Gigabytes of physical memory on x86 systems.
+ However, the address space of 32-bit x86 processors is only 4
+@@ -1045,7 +1045,7 @@ config NOHIGHMEM
+
+ config HIGHMEM4G
+ bool "4GB"
+- depends on !X86_NUMAQ
++ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
+ ---help---
+ Select this if you have a 32-bit processor and between 1 and 4
+ gigabytes of physical RAM.
+@@ -1099,7 +1099,7 @@ config PAGE_OFFSET
+ hex
+ default 0xB0000000 if VMSPLIT_3G_OPT
+ default 0x80000000 if VMSPLIT_2G
+- default 0x78000000 if VMSPLIT_2G_OPT
++ default 0x70000000 if VMSPLIT_2G_OPT
+ default 0x40000000 if VMSPLIT_1G
+ default 0xC0000000
+ depends on X86_32
+@@ -1460,6 +1460,7 @@ config SECCOMP
+
+ config CC_STACKPROTECTOR
+ bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
++ depends on X86_64 || !PAX_MEMORY_UDEREF
+ ---help---
+ This option turns on the -fstack-protector GCC feature. This
+ feature puts, at the beginning of functions, a canary value on
+@@ -1517,6 +1518,7 @@ config KEXEC_JUMP
+ config PHYSICAL_START
+ hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
+ default "0x1000000"
++ range 0x400000 0x40000000
+ ---help---
+ This gives the physical address where the kernel is loaded.
+
+@@ -1581,6 +1583,7 @@ config PHYSICAL_ALIGN
+ hex
+ prompt "Alignment value to which kernel should be aligned" if X86_32
+ default "0x1000000"
++ range 0x400000 0x1000000 if PAX_KERNEXEC
+ range 0x2000 0x1000000
+ ---help---
+ This value puts the alignment restrictions on physical address
+@@ -1612,9 +1615,10 @@ config HOTPLUG_CPU
+ Say N if you want to disable CPU hotplug.
+
+ config COMPAT_VDSO
+- def_bool y
++ def_bool n
+ prompt "Compat VDSO support"
+ depends on X86_32 || IA32_EMULATION
++ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF
+ ---help---
+ Map the 32-bit VDSO to the predictable old-style address too.
+ ---help---
+diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
+index 0e566103..1a6b57e 100644
+--- a/arch/x86/Kconfig.cpu
++++ b/arch/x86/Kconfig.cpu
+@@ -340,7 +340,7 @@ config X86_PPRO_FENCE
+
+ config X86_F00F_BUG
+ def_bool y
+- depends on M586MMX || M586TSC || M586 || M486 || M386
++ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC
+
+ config X86_WP_WORKS_OK
+ def_bool y
+@@ -360,7 +360,7 @@ config X86_POPAD_OK
+
+ config X86_ALIGNMENT_16
+ def_bool y
+- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
++ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK8 || MK7 || MK6 || MCORE2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
+
+ config X86_INTEL_USERCOPY
+ def_bool y
+@@ -406,7 +406,7 @@ config X86_CMPXCHG64
+ # generates cmov.
+ config X86_CMOV
+ def_bool y
+- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM)
++ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM)
+
+ config X86_MINIMUM_CPU_FAMILY
+ int
+diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
+index d105f29..c928727 100644
+--- a/arch/x86/Kconfig.debug
++++ b/arch/x86/Kconfig.debug
+@@ -99,7 +99,7 @@ config X86_PTDUMP
+ config DEBUG_RODATA
+ bool "Write protect kernel read-only data structures"
+ default y
+- depends on DEBUG_KERNEL
++ depends on DEBUG_KERNEL && BROKEN
+ ---help---
+ Mark the kernel read-only data as write-protected in the pagetables,
+ in order to catch accidental (and incorrect) writes to such const
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile
+index d2d24c9..0f21f8d 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -44,6 +44,7 @@ ifeq ($(CONFIG_X86_32),y)
+ else
+ BITS := 64
+ UTS_MACHINE := x86_64
++ biarch := $(call cc-option,-m64)
+ CHECKFLAGS += -D__x86_64__ -m64
+
+ KBUILD_AFLAGS += -m64
+@@ -189,3 +190,12 @@ define archhelp
+ echo ' FDARGS="..." arguments for the booted kernel'
+ echo ' FDINITRD=file initrd for the booted kernel'
+ endef
++
++define OLD_LD
++
++*** ${VERSION}.${PATCHLEVEL} PaX kernels no longer build correctly with old versions of binutils.
++*** Please upgrade your binutils to 2.18 or newer
++endef
++
++archprepare:
++ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
+diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
+index ec749c2..bbb5319 100644
+--- a/arch/x86/boot/Makefile
++++ b/arch/x86/boot/Makefile
+@@ -69,6 +69,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
+ $(call cc-option, -fno-stack-protector) \
+ $(call cc-option, -mpreferred-stack-boundary=2)
+ KBUILD_CFLAGS += $(call cc-option, -m32)
++ifdef CONSTIFY_PLUGIN
++KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+
+diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
+index 878e4b9..20537ab 100644
+--- a/arch/x86/boot/bitops.h
++++ b/arch/x86/boot/bitops.h
+@@ -26,7 +26,7 @@ static inline int variable_test_bit(int nr, const void *addr)
u8 v;
const u32 *p = (const u32 *)addr;
@@ -6278,7 +7017,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/bitops.h linux-2.6.32.49/arch/x86/boot/
return v;
}
-@@ -37,7 +37,7 @@ static inline int variable_test_bit(int
+@@ -37,7 +37,7 @@ static inline int variable_test_bit(int nr, const void *addr)
static inline void set_bit(int nr, void *addr)
{
@@ -6287,9 +7026,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/bitops.h linux-2.6.32.49/arch/x86/boot/
}
#endif /* BOOT_BITOPS_H */
-diff -urNp linux-2.6.32.49/arch/x86/boot/boot.h linux-2.6.32.49/arch/x86/boot/boot.h
---- linux-2.6.32.49/arch/x86/boot/boot.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/boot.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
+index 98239d2..f40214c 100644
+--- a/arch/x86/boot/boot.h
++++ b/arch/x86/boot/boot.h
@@ -82,7 +82,7 @@ static inline void io_delay(void)
static inline u16 ds(void)
{
@@ -6299,7 +7039,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/boot.h linux-2.6.32.49/arch/x86/boot/bo
return seg;
}
-@@ -178,7 +178,7 @@ static inline void wrgs32(u32 v, addr_t
+@@ -178,7 +178,7 @@ static inline void wrgs32(u32 v, addr_t addr)
static inline int memcmp(const void *s1, const void *s2, size_t len)
{
u8 diff;
@@ -6308,9 +7048,24 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/boot.h linux-2.6.32.49/arch/x86/boot/bo
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/head_32.S linux-2.6.32.49/arch/x86/boot/compressed/head_32.S
---- linux-2.6.32.49/arch/x86/boot/compressed/head_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/head_32.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
+index f8ed065..5bf5ff3 100644
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -13,6 +13,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=small
+ KBUILD_CFLAGS += $(cflags-y)
+ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
+ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
++ifdef CONSTIFY_PLUGIN
++KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
+
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
+index f543b70..b60fba8 100644
+--- a/arch/x86/boot/compressed/head_32.S
++++ b/arch/x86/boot/compressed/head_32.S
@@ -76,7 +76,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
@@ -6339,9 +7094,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/head_32.S linux-2.6.32.49/ar
addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
jmp 1b
2:
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/head_64.S linux-2.6.32.49/arch/x86/boot/compressed/head_64.S
---- linux-2.6.32.49/arch/x86/boot/compressed/head_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/head_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
+index 077e1b6..2c6b13b 100644
+--- a/arch/x86/boot/compressed/head_64.S
++++ b/arch/x86/boot/compressed/head_64.S
@@ -91,7 +91,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
@@ -6369,22 +7125,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/head_64.S linux-2.6.32.49/ar
#endif
/* Target address to relocate to for decompression */
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/Makefile linux-2.6.32.49/arch/x86/boot/compressed/Makefile
---- linux-2.6.32.49/arch/x86/boot/compressed/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -13,6 +13,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=smal
- KBUILD_CFLAGS += $(cflags-y)
- KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
- KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
-+ifdef CONSTIFY_PLUGIN
-+KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
-
- KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
- GCOV_PROFILE := n
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/misc.c linux-2.6.32.49/arch/x86/boot/compressed/misc.c
---- linux-2.6.32.49/arch/x86/boot/compressed/misc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/misc.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
+index 842b2a3..f00178b 100644
+--- a/arch/x86/boot/compressed/misc.c
++++ b/arch/x86/boot/compressed/misc.c
@@ -288,7 +288,7 @@ static void parse_elf(void *output)
case PT_LOAD:
#ifdef CONFIG_RELOCATABLE
@@ -6394,7 +7138,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/misc.c linux-2.6.32.49/arch/
#else
dest = (void *)(phdr->p_paddr);
#endif
-@@ -335,7 +335,7 @@ asmlinkage void decompress_kernel(void *
+@@ -335,7 +335,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
error("Destination address too large");
#endif
#ifndef CONFIG_RELOCATABLE
@@ -6403,9 +7147,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/misc.c linux-2.6.32.49/arch/
error("Wrong destination address");
#endif
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/mkpiggy.c linux-2.6.32.49/arch/x86/boot/compressed/mkpiggy.c
---- linux-2.6.32.49/arch/x86/boot/compressed/mkpiggy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/mkpiggy.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
+index bcbd36c..b1754af 100644
+--- a/arch/x86/boot/compressed/mkpiggy.c
++++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
offs = (olen > ilen) ? olen - ilen : 0;
@@ -6415,9 +7160,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/mkpiggy.c linux-2.6.32.49/ar
offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
printf(".section \".rodata.compressed\",\"a\",@progbits\n");
-diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/relocs.c linux-2.6.32.49/arch/x86/boot/compressed/relocs.c
---- linux-2.6.32.49/arch/x86/boot/compressed/relocs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/compressed/relocs.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
+index bbeb0c3..f5167ab 100644
+--- a/arch/x86/boot/compressed/relocs.c
++++ b/arch/x86/boot/compressed/relocs.c
@@ -10,8 +10,11 @@
#define USE_BSD
#include <endian.h>
@@ -6579,7 +7325,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/relocs.c linux-2.6.32.49/arc
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_REL) {
-@@ -504,6 +548,21 @@ static void walk_relocs(void (*visit)(El
+@@ -504,6 +548,21 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
if (sym->st_shndx == SHN_ABS) {
continue;
}
@@ -6601,7 +7347,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/relocs.c linux-2.6.32.49/arc
if (r_type == R_386_NONE || r_type == R_386_PC32) {
/*
* NONE can be ignored and and PC relative
-@@ -541,7 +600,7 @@ static int cmp_relocs(const void *va, co
+@@ -541,7 +600,7 @@ static int cmp_relocs(const void *va, const void *vb)
static void emit_relocs(int as_text)
{
@@ -6618,9 +7364,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/compressed/relocs.c linux-2.6.32.49/arc
read_shdrs(fp);
read_strtabs(fp);
read_symtabs(fp);
-diff -urNp linux-2.6.32.49/arch/x86/boot/cpucheck.c linux-2.6.32.49/arch/x86/boot/cpucheck.c
---- linux-2.6.32.49/arch/x86/boot/cpucheck.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/cpucheck.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
+index 4d3ff03..e4972ff 100644
+--- a/arch/x86/boot/cpucheck.c
++++ b/arch/x86/boot/cpucheck.c
@@ -74,7 +74,7 @@ static int has_fpu(void)
u16 fcw = -1, fsw = -1;
u32 cr0;
@@ -6675,7 +7422,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/cpucheck.c linux-2.6.32.49/arch/x86/boo
: "+a" (eax),
"=c" (cpu.flags[6]),
"=d" (cpu.flags[1])
-@@ -203,9 +203,9 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -203,9 +203,9 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 ecx = MSR_K7_HWCR;
u32 eax, edx;
@@ -6687,7 +7434,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/cpucheck.c linux-2.6.32.49/arch/x86/boo
get_flags(); /* Make sure it really did something */
err = check_flags();
-@@ -218,9 +218,9 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -218,9 +218,9 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 ecx = MSR_VIA_FCR;
u32 eax, edx;
@@ -6699,7 +7446,7 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/cpucheck.c linux-2.6.32.49/arch/x86/boo
set_bit(X86_FEATURE_CX8, cpu.flags);
err = check_flags();
-@@ -231,12 +231,12 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -231,12 +231,12 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 eax, edx;
u32 level = 1;
@@ -6716,10 +7463,11 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/cpucheck.c linux-2.6.32.49/arch/x86/boo
err = check_flags();
}
-diff -urNp linux-2.6.32.49/arch/x86/boot/header.S linux-2.6.32.49/arch/x86/boot/header.S
---- linux-2.6.32.49/arch/x86/boot/header.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/header.S 2011-11-15 19:59:42.000000000 -0500
-@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical
+diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
+index b31cc54..8d69237 100644
+--- a/arch/x86/boot/header.S
++++ b/arch/x86/boot/header.S
+@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical pointer to
# single linked list of
# struct setup_data
@@ -6728,22 +7476,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/header.S linux-2.6.32.49/arch/x86/boot/
#define ZO_INIT_SIZE (ZO__end - ZO_startup_32 + ZO_z_extract_offset)
#define VO_INIT_SIZE (VO__end - VO__text)
-diff -urNp linux-2.6.32.49/arch/x86/boot/Makefile linux-2.6.32.49/arch/x86/boot/Makefile
---- linux-2.6.32.49/arch/x86/boot/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -69,6 +69,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os
- $(call cc-option, -fno-stack-protector) \
- $(call cc-option, -mpreferred-stack-boundary=2)
- KBUILD_CFLAGS += $(call cc-option, -m32)
-+ifdef CONSTIFY_PLUGIN
-+KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
- KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
- GCOV_PROFILE := n
-
-diff -urNp linux-2.6.32.49/arch/x86/boot/memory.c linux-2.6.32.49/arch/x86/boot/memory.c
---- linux-2.6.32.49/arch/x86/boot/memory.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/memory.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
+index cae3feb..ff8ff2a 100644
+--- a/arch/x86/boot/memory.c
++++ b/arch/x86/boot/memory.c
@@ -19,7 +19,7 @@
static int detect_memory_e820(void)
@@ -6753,9 +7489,22 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/memory.c linux-2.6.32.49/arch/x86/boot/
struct biosregs ireg, oreg;
struct e820entry *desc = boot_params.e820_map;
static struct e820entry buf; /* static so it is zeroed */
-diff -urNp linux-2.6.32.49/arch/x86/boot/video.c linux-2.6.32.49/arch/x86/boot/video.c
---- linux-2.6.32.49/arch/x86/boot/video.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/video.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
+index 11e8c6e..fdbb1ed 100644
+--- a/arch/x86/boot/video-vesa.c
++++ b/arch/x86/boot/video-vesa.c
+@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
+
+ boot_params.screen_info.vesapm_seg = oreg.es;
+ boot_params.screen_info.vesapm_off = oreg.di;
++ boot_params.screen_info.vesapm_size = oreg.cx;
+ }
+
+ /*
+diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
+index d42da38..787cdf3 100644
+--- a/arch/x86/boot/video.c
++++ b/arch/x86/boot/video.c
@@ -90,7 +90,7 @@ static void store_mode_params(void)
static unsigned int get_entry(void)
{
@@ -6765,20 +7514,10 @@ diff -urNp linux-2.6.32.49/arch/x86/boot/video.c linux-2.6.32.49/arch/x86/boot/v
int key;
unsigned int v;
-diff -urNp linux-2.6.32.49/arch/x86/boot/video-vesa.c linux-2.6.32.49/arch/x86/boot/video-vesa.c
---- linux-2.6.32.49/arch/x86/boot/video-vesa.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/boot/video-vesa.c 2011-11-15 19:59:42.000000000 -0500
-@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
-
- boot_params.screen_info.vesapm_seg = oreg.es;
- boot_params.screen_info.vesapm_off = oreg.di;
-+ boot_params.screen_info.vesapm_size = oreg.cx;
- }
-
- /*
-diff -urNp linux-2.6.32.49/arch/x86/crypto/aes-x86_64-asm_64.S linux-2.6.32.49/arch/x86/crypto/aes-x86_64-asm_64.S
---- linux-2.6.32.49/arch/x86/crypto/aes-x86_64-asm_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/crypto/aes-x86_64-asm_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/crypto/aes-x86_64-asm_64.S b/arch/x86/crypto/aes-x86_64-asm_64.S
+index 5b577d5..3c1fed4 100644
+--- a/arch/x86/crypto/aes-x86_64-asm_64.S
++++ b/arch/x86/crypto/aes-x86_64-asm_64.S
@@ -8,6 +8,8 @@
* including this sentence is retained in full.
*/
@@ -6792,14 +7531,158 @@ diff -urNp linux-2.6.32.49/arch/x86/crypto/aes-x86_64-asm_64.S linux-2.6.32.49/a
je B192; \
leaq 32(r9),r9;
-+#define ret pax_force_retaddr; ret
++#define ret pax_force_retaddr 0, 1; ret
+
#define epilogue(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
movq r1,r2; \
movq r3,r4; \
-diff -urNp linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S
---- linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
+index eb0566e..e3ebad8 100644
+--- a/arch/x86/crypto/aesni-intel_asm.S
++++ b/arch/x86/crypto/aesni-intel_asm.S
+@@ -16,6 +16,7 @@
+ */
+
+ #include <linux/linkage.h>
++#include <asm/alternative-asm.h>
+
+ .text
+
+@@ -52,6 +53,7 @@ _key_expansion_256a:
+ pxor %xmm1, %xmm0
+ movaps %xmm0, (%rcx)
+ add $0x10, %rcx
++ pax_force_retaddr_bts
+ ret
+
+ _key_expansion_192a:
+@@ -75,6 +77,7 @@ _key_expansion_192a:
+ shufps $0b01001110, %xmm2, %xmm1
+ movaps %xmm1, 16(%rcx)
+ add $0x20, %rcx
++ pax_force_retaddr_bts
+ ret
+
+ _key_expansion_192b:
+@@ -93,6 +96,7 @@ _key_expansion_192b:
+
+ movaps %xmm0, (%rcx)
+ add $0x10, %rcx
++ pax_force_retaddr_bts
+ ret
+
+ _key_expansion_256b:
+@@ -104,6 +108,7 @@ _key_expansion_256b:
+ pxor %xmm1, %xmm2
+ movaps %xmm2, (%rcx)
+ add $0x10, %rcx
++ pax_force_retaddr_bts
+ ret
+
+ /*
+@@ -239,7 +244,9 @@ ENTRY(aesni_set_key)
+ cmp %rcx, %rdi
+ jb .Ldec_key_loop
+ xor %rax, %rax
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_set_key)
+
+ /*
+ * void aesni_enc(struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
+@@ -249,7 +256,9 @@ ENTRY(aesni_enc)
+ movups (INP), STATE # input
+ call _aesni_enc1
+ movups STATE, (OUTP) # output
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_enc)
+
+ /*
+ * _aesni_enc1: internal ABI
+@@ -319,6 +328,7 @@ _aesni_enc1:
+ movaps 0x70(TKEYP), KEY
+ # aesenclast KEY, STATE # last round
+ .byte 0x66, 0x0f, 0x38, 0xdd, 0xc2
++ pax_force_retaddr_bts
+ ret
+
+ /*
+@@ -482,6 +492,7 @@ _aesni_enc4:
+ .byte 0x66, 0x0f, 0x38, 0xdd, 0xea
+ # aesenclast KEY, STATE4
+ .byte 0x66, 0x0f, 0x38, 0xdd, 0xf2
++ pax_force_retaddr_bts
+ ret
+
+ /*
+@@ -493,7 +504,9 @@ ENTRY(aesni_dec)
+ movups (INP), STATE # input
+ call _aesni_dec1
+ movups STATE, (OUTP) #output
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_dec)
+
+ /*
+ * _aesni_dec1: internal ABI
+@@ -563,6 +576,7 @@ _aesni_dec1:
+ movaps 0x70(TKEYP), KEY
+ # aesdeclast KEY, STATE # last round
+ .byte 0x66, 0x0f, 0x38, 0xdf, 0xc2
++ pax_force_retaddr_bts
+ ret
+
+ /*
+@@ -726,6 +740,7 @@ _aesni_dec4:
+ .byte 0x66, 0x0f, 0x38, 0xdf, 0xea
+ # aesdeclast KEY, STATE4
+ .byte 0x66, 0x0f, 0x38, 0xdf, 0xf2
++ pax_force_retaddr_bts
+ ret
+
+ /*
+@@ -769,7 +784,9 @@ ENTRY(aesni_ecb_enc)
+ cmp $16, LEN
+ jge .Lecb_enc_loop1
+ .Lecb_enc_ret:
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_ecb_enc)
+
+ /*
+ * void aesni_ecb_dec(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
+@@ -813,7 +830,9 @@ ENTRY(aesni_ecb_dec)
+ cmp $16, LEN
+ jge .Lecb_dec_loop1
+ .Lecb_dec_ret:
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_ecb_dec)
+
+ /*
+ * void aesni_cbc_enc(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
+@@ -837,7 +856,9 @@ ENTRY(aesni_cbc_enc)
+ jge .Lcbc_enc_loop
+ movups STATE, (IVP)
+ .Lcbc_enc_ret:
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_cbc_enc)
+
+ /*
+ * void aesni_cbc_dec(struct crypto_aes_ctx *ctx, const u8 *dst, u8 *src,
+@@ -894,4 +915,6 @@ ENTRY(aesni_cbc_dec)
+ .Lcbc_dec_ret:
+ movups IV, (IVP)
+ .Lcbc_dec_just_ret:
++ pax_force_retaddr 0, 1
+ ret
++ENDPROC(aesni_cbc_dec)
+diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S
+index 6214a9b..1f4fc9a 100644
+--- a/arch/x86/crypto/salsa20-x86_64-asm_64.S
++++ b/arch/x86/crypto/salsa20-x86_64-asm_64.S
@@ -1,3 +1,5 @@
+#include <asm/alternative-asm.h>
+
@@ -6810,7 +7693,7 @@ diff -urNp linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S linux-2.6.32.
add %r11,%rsp
mov %rdi,%rax
mov %rsi,%rdx
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
# bytesatleast65:
._bytesatleast65:
@@ -6828,9 +7711,10 @@ diff -urNp linux-2.6.32.49/arch/x86/crypto/salsa20-x86_64-asm_64.S linux-2.6.32.
mov %rsi,%rdx
+ pax_force_retaddr
ret
-diff -urNp linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S
---- linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/crypto/twofish-x86_64-asm_64.S b/arch/x86/crypto/twofish-x86_64-asm_64.S
+index 35974a5..5662ae2 100644
+--- a/arch/x86/crypto/twofish-x86_64-asm_64.S
++++ b/arch/x86/crypto/twofish-x86_64-asm_64.S
@@ -21,6 +21,7 @@
.text
@@ -6843,7 +7727,7 @@ diff -urNp linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S linux-2.6.32.
popq R1
movq $1,%rax
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
twofish_dec_blk:
@@ -6851,12 +7735,13 @@ diff -urNp linux-2.6.32.49/arch/x86/crypto/twofish-x86_64-asm_64.S linux-2.6.32.
popq R1
movq $1,%rax
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
-diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32_aout.c linux-2.6.32.49/arch/x86/ia32/ia32_aout.c
---- linux-2.6.32.49/arch/x86/ia32/ia32_aout.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/ia32/ia32_aout.c 2011-11-15 19:59:42.000000000 -0500
-@@ -169,6 +169,8 @@ static int aout_core_dump(long signr, st
+diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
+index 14531ab..a89a0c0 100644
+--- a/arch/x86/ia32/ia32_aout.c
++++ b/arch/x86/ia32/ia32_aout.c
+@@ -169,6 +169,8 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
unsigned long dump_start, dump_size;
struct user32 dump;
@@ -6865,7 +7750,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32_aout.c linux-2.6.32.49/arch/x86/ia
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
-@@ -218,12 +220,6 @@ static int aout_core_dump(long signr, st
+@@ -218,12 +220,6 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
dump_size = dump.u_ssize << PAGE_SHIFT;
DUMP_WRITE(dump_start, dump_size);
}
@@ -6878,9 +7763,90 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32_aout.c linux-2.6.32.49/arch/x86/ia
end_coredump:
set_fs(fs);
return has_dumped;
-diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia32/ia32entry.S
---- linux-2.6.32.49/arch/x86/ia32/ia32entry.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/ia32/ia32entry.S 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
+index 588a7aa..a3468b0 100644
+--- a/arch/x86/ia32/ia32_signal.c
++++ b/arch/x86/ia32/ia32_signal.c
+@@ -167,7 +167,7 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
+ }
+ seg = get_fs();
+ set_fs(KERNEL_DS);
+- ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp);
++ ret = do_sigaltstack(uss_ptr ? (const stack_t __force_user *)&uss : NULL, (stack_t __force_user *)&uoss, regs->sp);
+ set_fs(seg);
+ if (ret >= 0 && uoss_ptr) {
+ if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)))
+@@ -374,7 +374,7 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
+ */
+ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+ size_t frame_size,
+- void **fpstate)
++ void __user **fpstate)
+ {
+ unsigned long sp;
+
+@@ -395,7 +395,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+
+ if (used_math()) {
+ sp = sp - sig_xstate_ia32_size;
+- *fpstate = (struct _fpstate_ia32 *) sp;
++ *fpstate = (struct _fpstate_ia32 __user *) sp;
+ if (save_i387_xstate_ia32(*fpstate) < 0)
+ return (void __user *) -1L;
+ }
+@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+ sp -= frame_size;
+ /* Align the stack pointer according to the i386 ABI,
+ * i.e. so that on function entry ((sp + 4) & 15) == 0. */
+- sp = ((sp + 4) & -16ul) - 4;
++ sp = ((sp - 12) & -16ul) - 4;
+ return (void __user *) sp;
+ }
+
+@@ -461,7 +461,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
+ * These are actually not used anymore, but left because some
+ * gdb versions depend on them as a marker.
+ */
+- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
++ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
+ } put_user_catch(err);
+
+ if (err)
+@@ -503,7 +503,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+ 0xb8,
+ __NR_ia32_rt_sigreturn,
+ 0x80cd,
+- 0,
++ 0
+ };
+
+ frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
+@@ -533,16 +533,18 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+
+ if (ka->sa.sa_flags & SA_RESTORER)
+ restorer = ka->sa.sa_restorer;
++ else if (current->mm->context.vdso)
++ /* Return stub is in 32bit vsyscall page */
++ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
+ else
+- restorer = VDSO32_SYMBOL(current->mm->context.vdso,
+- rt_sigreturn);
++ restorer = &frame->retcode;
+ put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
+
+ /*
+ * Not actually used anymore, but left because some gdb
+ * versions need it.
+ */
+- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
++ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
+ } put_user_catch(err);
+
+ if (err)
+diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
+index 4edd8eb..07ac7fd 100644
+--- a/arch/x86/ia32/ia32entry.S
++++ b/arch/x86/ia32/ia32entry.S
@@ -13,7 +13,9 @@
#include <asm/thread_info.h>
#include <asm/segment.h>
@@ -6891,11 +7857,12 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
#include <linux/elf-em.h>
-@@ -93,6 +95,29 @@ ENTRY(native_irq_enable_sysexit)
+@@ -93,6 +95,30 @@ ENTRY(native_irq_enable_sysexit)
ENDPROC(native_irq_enable_sysexit)
#endif
+ .macro pax_enter_kernel_user
++ pax_set_fptr_mask
+#ifdef CONFIG_PAX_MEMORY_UDEREF
+ call pax_enter_kernel_user
+#endif
@@ -6921,48 +7888,87 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
/*
* 32bit SYSENTER instruction entry.
*
-@@ -119,7 +144,7 @@ ENTRY(ia32_sysenter_target)
+@@ -119,12 +145,6 @@ ENTRY(ia32_sysenter_target)
CFI_REGISTER rsp,rbp
SWAPGS_UNSAFE_STACK
movq PER_CPU_VAR(kernel_stack), %rsp
- addq $(KERNEL_STACK_OFFSET),%rsp
-+ pax_enter_kernel_user
- /*
- * No need to follow this irqs on/off section: the syscall
- * disabled irqs, here we enable it straight after entry:
-@@ -135,7 +160,8 @@ ENTRY(ia32_sysenter_target)
+- /*
+- * No need to follow this irqs on/off section: the syscall
+- * disabled irqs, here we enable it straight after entry:
+- */
+- ENABLE_INTERRUPTS(CLBR_NONE)
+ movl %ebp,%ebp /* zero extension */
+ pushq $__USER32_DS
+ CFI_ADJUST_CFA_OFFSET 8
+@@ -135,28 +155,41 @@ ENTRY(ia32_sysenter_target)
pushfq
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET rflags,0*/
- movl 8*3-THREAD_SIZE+TI_sysenter_return(%rsp), %r10d
-+ GET_THREAD_INFO(%r10)
-+ movl TI_sysenter_return(%r10), %r10d
- CFI_REGISTER rip,r10
+- CFI_REGISTER rip,r10
++ GET_THREAD_INFO(%r11)
++ movl TI_sysenter_return(%r11), %r11d
++ CFI_REGISTER rip,r11
pushq $__USER32_CS
CFI_ADJUST_CFA_OFFSET 8
-@@ -150,6 +176,12 @@ ENTRY(ia32_sysenter_target)
+ /*CFI_REL_OFFSET cs,0*/
+ movl %eax, %eax
+- pushq %r10
++ pushq %r11
+ CFI_ADJUST_CFA_OFFSET 8
+ CFI_REL_OFFSET rip,0
+ pushq %rax
+ CFI_ADJUST_CFA_OFFSET 8
+ cld
SAVE_ARGS 0,0,1
++ pax_enter_kernel_user
++ /*
++ * No need to follow this irqs on/off section: the syscall
++ * disabled irqs, here we enable it straight after entry:
++ */
++ ENABLE_INTERRUPTS(CLBR_NONE)
/* no need to do an access_ok check here because rbp has been
32bit zero extended */
+
+#ifdef CONFIG_PAX_MEMORY_UDEREF
-+ mov $PAX_USER_SHADOW_BASE,%r10
-+ add %r10,%rbp
++ mov $PAX_USER_SHADOW_BASE,%r11
++ add %r11,%rbp
+#endif
+
1: movl (%rbp),%ebp
.section __ex_table,"a"
.quad 1b,ia32_badarg
-@@ -172,6 +204,8 @@ sysenter_dispatch:
- testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
+ .previous
+- GET_THREAD_INFO(%r10)
+- orl $TS_COMPAT,TI_status(%r10)
+- testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
++ GET_THREAD_INFO(%r11)
++ orl $TS_COMPAT,TI_status(%r11)
++ testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r11)
+ CFI_REMEMBER_STATE
+ jnz sysenter_tracesys
+ cmpq $(IA32_NR_syscalls-1),%rax
+@@ -166,13 +199,15 @@ sysenter_do_call:
+ sysenter_dispatch:
+ call *ia32_sys_call_table(,%rax,8)
+ movq %rax,RAX-ARGOFFSET(%rsp)
+- GET_THREAD_INFO(%r10)
++ GET_THREAD_INFO(%r11)
+ DISABLE_INTERRUPTS(CLBR_NONE)
+ TRACE_IRQS_OFF
+- testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
++ testl $_TIF_ALLWORK_MASK,TI_flags(%r11)
jnz sysexit_audit
sysexit_from_sys_call:
+- andl $~TS_COMPAT,TI_status(%r10)
+ pax_exit_kernel_user
+ pax_erase_kstack
- andl $~TS_COMPAT,TI_status(%r10)
++ andl $~TS_COMPAT,TI_status(%r11)
/* clear IF, that popfq doesn't enable interrupts early */
andl $~0x200,EFLAGS-R11(%rsp)
-@@ -200,6 +234,9 @@ sysexit_from_sys_call:
+ movl RIP-R11(%rsp),%edx /* User %eip */
+@@ -200,6 +235,9 @@ sysexit_from_sys_call:
movl %eax,%esi /* 2nd arg: syscall number */
movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */
call audit_syscall_entry
@@ -6972,7 +7978,40 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */
cmpq $(IA32_NR_syscalls-1),%rax
ja ia32_badsys
-@@ -252,6 +289,9 @@ sysenter_tracesys:
+@@ -211,7 +249,7 @@ sysexit_from_sys_call:
+ .endm
+
+ .macro auditsys_exit exit
+- testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
++ testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r11)
+ jnz ia32_ret_from_sys_call
+ TRACE_IRQS_ON
+ sti
+@@ -221,12 +259,12 @@ sysexit_from_sys_call:
+ movzbl %al,%edi /* zero-extend that into %edi */
+ inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
+ call audit_syscall_exit
+- GET_THREAD_INFO(%r10)
++ GET_THREAD_INFO(%r11)
+ movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */
+ movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
+ cli
+ TRACE_IRQS_OFF
+- testl %edi,TI_flags(%r10)
++ testl %edi,TI_flags(%r11)
+ jz \exit
+ CLEAR_RREGS -ARGOFFSET
+ jmp int_with_check
+@@ -244,7 +282,7 @@ sysexit_audit:
+
+ sysenter_tracesys:
+ #ifdef CONFIG_AUDITSYSCALL
+- testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
++ testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r11)
+ jz sysenter_auditsys
+ #endif
+ SAVE_REST
+@@ -252,6 +290,9 @@ sysenter_tracesys:
movq $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
movq %rsp,%rdi /* &pt_regs -> arg1 */
call syscall_trace_enter
@@ -6982,7 +8021,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
RESTORE_REST
cmpq $(IA32_NR_syscalls-1),%rax
-@@ -283,19 +323,24 @@ ENDPROC(ia32_sysenter_target)
+@@ -283,19 +324,20 @@ ENDPROC(ia32_sysenter_target)
ENTRY(ia32_cstar_target)
CFI_STARTPROC32 simple
CFI_SIGNAL_FRAME
@@ -6994,44 +8033,69 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
movl %esp,%r8d
CFI_REGISTER rsp,r8
movq PER_CPU_VAR(kernel_stack),%rsp
-+
-+#ifdef CONFIG_PAX_MEMORY_UDEREF
++ SAVE_ARGS 8*6,1,1
+ pax_enter_kernel_user
-+#endif
-+
/*
* No need to follow this irqs on/off section: the syscall
* disabled irqs and here we enable it straight after entry:
*/
ENABLE_INTERRUPTS(CLBR_NONE)
- SAVE_ARGS 8,1,1
-+ SAVE_ARGS 8*6,1,1
movl %eax,%eax /* zero extension */
movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
movq %rcx,RIP-ARGOFFSET(%rsp)
-@@ -311,6 +356,12 @@ ENTRY(ia32_cstar_target)
+@@ -311,13 +353,19 @@ ENTRY(ia32_cstar_target)
/* no need to do an access_ok check here because r8 has been
32bit zero extended */
/* hardware stack frame is complete now */
+
+#ifdef CONFIG_PAX_MEMORY_UDEREF
-+ mov $PAX_USER_SHADOW_BASE,%r10
-+ add %r10,%r8
++ mov $PAX_USER_SHADOW_BASE,%r11
++ add %r11,%r8
+#endif
+
1: movl (%r8),%r9d
.section __ex_table,"a"
.quad 1b,ia32_badarg
-@@ -333,6 +384,8 @@ cstar_dispatch:
- testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
+ .previous
+- GET_THREAD_INFO(%r10)
+- orl $TS_COMPAT,TI_status(%r10)
+- testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
++ GET_THREAD_INFO(%r11)
++ orl $TS_COMPAT,TI_status(%r11)
++ testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r11)
+ CFI_REMEMBER_STATE
+ jnz cstar_tracesys
+ cmpq $IA32_NR_syscalls-1,%rax
+@@ -327,13 +375,15 @@ cstar_do_call:
+ cstar_dispatch:
+ call *ia32_sys_call_table(,%rax,8)
+ movq %rax,RAX-ARGOFFSET(%rsp)
+- GET_THREAD_INFO(%r10)
++ GET_THREAD_INFO(%r11)
+ DISABLE_INTERRUPTS(CLBR_NONE)
+ TRACE_IRQS_OFF
+- testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
++ testl $_TIF_ALLWORK_MASK,TI_flags(%r11)
jnz sysretl_audit
sysretl_from_sys_call:
+- andl $~TS_COMPAT,TI_status(%r10)
+ pax_exit_kernel_user
+ pax_erase_kstack
- andl $~TS_COMPAT,TI_status(%r10)
++ andl $~TS_COMPAT,TI_status(%r11)
RESTORE_ARGS 1,-ARG_SKIP,1,1,1
movl RIP-ARGOFFSET(%rsp),%ecx
-@@ -370,6 +423,9 @@ cstar_tracesys:
+ CFI_REGISTER rip,rcx
+@@ -361,7 +411,7 @@ sysretl_audit:
+
+ cstar_tracesys:
+ #ifdef CONFIG_AUDITSYSCALL
+- testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
++ testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r11)
+ jz cstar_auditsys
+ #endif
+ xchgl %r9d,%ebp
+@@ -370,6 +420,9 @@ cstar_tracesys:
movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
movq %rsp,%rdi /* &pt_regs -> arg1 */
call syscall_trace_enter
@@ -7041,15 +8105,38 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
LOAD_ARGS32 ARGOFFSET, 1 /* reload args from stack in case ptrace changed it */
RESTORE_REST
xchgl %ebp,%r9d
-@@ -415,6 +471,7 @@ ENTRY(ia32_syscall)
+@@ -415,11 +468,6 @@ ENTRY(ia32_syscall)
CFI_REL_OFFSET rip,RIP-RIP
PARAVIRT_ADJUST_EXCEPTION_FRAME
SWAPGS
+- /*
+- * No need to follow this irqs on/off section: the syscall
+- * disabled irqs and here we enable it straight after entry:
+- */
+- ENABLE_INTERRUPTS(CLBR_NONE)
+ movl %eax,%eax
+ pushq %rax
+ CFI_ADJUST_CFA_OFFSET 8
+@@ -427,9 +475,15 @@ ENTRY(ia32_syscall)
+ /* note the registers are not zero extended to the sf.
+ this could be a problem. */
+ SAVE_ARGS 0,0,1
+- GET_THREAD_INFO(%r10)
+- orl $TS_COMPAT,TI_status(%r10)
+- testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
+ pax_enter_kernel_user
- /*
- * No need to follow this irqs on/off section: the syscall
- * disabled irqs and here we enable it straight after entry:
-@@ -448,6 +505,9 @@ ia32_tracesys:
++ /*
++ * No need to follow this irqs on/off section: the syscall
++ * disabled irqs and here we enable it straight after entry:
++ */
++ ENABLE_INTERRUPTS(CLBR_NONE)
++ GET_THREAD_INFO(%r11)
++ orl $TS_COMPAT,TI_status(%r11)
++ testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r11)
+ jnz ia32_tracesys
+ cmpq $(IA32_NR_syscalls-1),%rax
+ ja ia32_badsys
+@@ -448,6 +502,9 @@ ia32_tracesys:
movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
movq %rsp,%rdi /* &pt_regs -> arg1 */
call syscall_trace_enter
@@ -7059,7 +8146,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */
RESTORE_REST
cmpq $(IA32_NR_syscalls-1),%rax
-@@ -462,6 +522,7 @@ ia32_badsys:
+@@ -462,6 +519,7 @@ ia32_badsys:
quiet_ni_syscall:
movq $-ENOSYS,%rax
@@ -7067,89 +8154,11 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32entry.S linux-2.6.32.49/arch/x86/ia
ret
CFI_ENDPROC
-diff -urNp linux-2.6.32.49/arch/x86/ia32/ia32_signal.c linux-2.6.32.49/arch/x86/ia32/ia32_signal.c
---- linux-2.6.32.49/arch/x86/ia32/ia32_signal.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/ia32/ia32_signal.c 2011-11-15 19:59:42.000000000 -0500
-@@ -167,7 +167,7 @@ asmlinkage long sys32_sigaltstack(const
- }
- seg = get_fs();
- set_fs(KERNEL_DS);
-- ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp);
-+ ret = do_sigaltstack(uss_ptr ? (const stack_t __force_user *)&uss : NULL, (stack_t __force_user *)&uoss, regs->sp);
- set_fs(seg);
- if (ret >= 0 && uoss_ptr) {
- if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)))
-@@ -374,7 +374,7 @@ static int ia32_setup_sigcontext(struct
- */
- static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
- size_t frame_size,
-- void **fpstate)
-+ void __user **fpstate)
- {
- unsigned long sp;
-
-@@ -395,7 +395,7 @@ static void __user *get_sigframe(struct
-
- if (used_math()) {
- sp = sp - sig_xstate_ia32_size;
-- *fpstate = (struct _fpstate_ia32 *) sp;
-+ *fpstate = (struct _fpstate_ia32 __user *) sp;
- if (save_i387_xstate_ia32(*fpstate) < 0)
- return (void __user *) -1L;
- }
-@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct
- sp -= frame_size;
- /* Align the stack pointer according to the i386 ABI,
- * i.e. so that on function entry ((sp + 4) & 15) == 0. */
-- sp = ((sp + 4) & -16ul) - 4;
-+ sp = ((sp - 12) & -16ul) - 4;
- return (void __user *) sp;
- }
-
-@@ -461,7 +461,7 @@ int ia32_setup_frame(int sig, struct k_s
- * These are actually not used anymore, but left because some
- * gdb versions depend on them as a marker.
- */
-- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
-+ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
- } put_user_catch(err);
-
- if (err)
-@@ -503,7 +503,7 @@ int ia32_setup_rt_frame(int sig, struct
- 0xb8,
- __NR_ia32_rt_sigreturn,
- 0x80cd,
-- 0,
-+ 0
- };
-
- frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
-@@ -533,16 +533,18 @@ int ia32_setup_rt_frame(int sig, struct
-
- if (ka->sa.sa_flags & SA_RESTORER)
- restorer = ka->sa.sa_restorer;
-+ else if (current->mm->context.vdso)
-+ /* Return stub is in 32bit vsyscall page */
-+ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
- else
-- restorer = VDSO32_SYMBOL(current->mm->context.vdso,
-- rt_sigreturn);
-+ restorer = &frame->retcode;
- put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
-
- /*
- * Not actually used anymore, but left because some gdb
- * versions need it.
- */
-- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
-+ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
- } put_user_catch(err);
-
- if (err)
-diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia32/sys_ia32.c
---- linux-2.6.32.49/arch/x86/ia32/sys_ia32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/ia32/sys_ia32.c 2011-11-15 19:59:42.000000000 -0500
-@@ -69,8 +69,8 @@ asmlinkage long sys32_ftruncate64(unsign
+diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
+index 016218c..47ccbdd 100644
+--- a/arch/x86/ia32/sys_ia32.c
++++ b/arch/x86/ia32/sys_ia32.c
+@@ -69,8 +69,8 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long offset_low,
*/
static int cp_stat64(struct stat64 __user *ubuf, struct kstat *stat)
{
@@ -7160,7 +8169,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
SET_UID(uid, stat->uid);
SET_GID(gid, stat->gid);
if (!access_ok(VERIFY_WRITE, ubuf, sizeof(struct stat64)) ||
-@@ -308,8 +308,8 @@ asmlinkage long sys32_rt_sigprocmask(int
+@@ -308,8 +308,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
}
set_fs(KERNEL_DS);
ret = sys_rt_sigprocmask(how,
@@ -7171,7 +8180,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
sigsetsize);
set_fs(old_fs);
if (ret)
-@@ -371,7 +371,7 @@ asmlinkage long sys32_sched_rr_get_inter
+@@ -371,7 +371,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -7180,7 +8189,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
set_fs(old_fs);
if (put_compat_timespec(&t, interval))
return -EFAULT;
-@@ -387,7 +387,7 @@ asmlinkage long sys32_rt_sigpending(comp
+@@ -387,7 +387,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -7189,7 +8198,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
set_fs(old_fs);
if (!ret) {
switch (_NSIG_WORDS) {
-@@ -412,7 +412,7 @@ asmlinkage long sys32_rt_sigqueueinfo(in
+@@ -412,7 +412,7 @@ asmlinkage long sys32_rt_sigqueueinfo(int pid, int sig,
if (copy_siginfo_from_user32(&info, uinfo))
return -EFAULT;
set_fs(KERNEL_DS);
@@ -7198,7 +8207,7 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
set_fs(old_fs);
return ret;
}
-@@ -513,7 +513,7 @@ asmlinkage long sys32_sendfile(int out_f
+@@ -513,7 +513,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
return -EFAULT;
set_fs(KERNEL_DS);
@@ -7207,32 +8216,59 @@ diff -urNp linux-2.6.32.49/arch/x86/ia32/sys_ia32.c linux-2.6.32.49/arch/x86/ia3
count);
set_fs(old_fs);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/alternative-asm.h linux-2.6.32.49/arch/x86/include/asm/alternative-asm.h
---- linux-2.6.32.49/arch/x86/include/asm/alternative-asm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/alternative-asm.h 2011-11-15 19:59:42.000000000 -0500
-@@ -19,4 +19,18 @@
+diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
+index e2077d3..e134a5e 100644
+--- a/arch/x86/include/asm/alternative-asm.h
++++ b/arch/x86/include/asm/alternative-asm.h
+@@ -19,4 +19,43 @@
.endm
#endif
+#ifdef CONFIG_PAX_KERNEXEC_PLUGIN
-+ .macro pax_force_retaddr rip=0
++ .macro pax_force_retaddr_bts rip=0
++ btsq $63,\rip(%rsp)
++ .endm
++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS
++ .macro pax_force_retaddr rip=0, reload=0
+ btsq $63,\rip(%rsp)
+ .endm
+ .macro pax_force_fptr ptr
+ btsq $63,\ptr
+ .endm
++ .macro pax_set_fptr_mask
++ .endm
++#endif
++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR
++ .macro pax_force_retaddr rip=0, reload=0
++ .if \reload
++ pax_set_fptr_mask
++ .endif
++ orq %r10,\rip(%rsp)
++ .endm
++ .macro pax_force_fptr ptr
++ orq %r10,\ptr
++ .endm
++ .macro pax_set_fptr_mask
++ movabs $0x8000000000000000,%r10
++ .endm
++#endif
+#else
-+ .macro pax_force_retaddr rip=0
++ .macro pax_force_retaddr rip=0, reload=0
+ .endm
+ .macro pax_force_fptr ptr
+ .endm
++ .macro pax_force_retaddr_bts rip=0
++ .endm
++ .macro pax_set_fptr_mask
++ .endm
+#endif
+
#endif /* __ASSEMBLY__ */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/alternative.h linux-2.6.32.49/arch/x86/include/asm/alternative.h
---- linux-2.6.32.49/arch/x86/include/asm/alternative.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/alternative.h 2011-11-15 19:59:42.000000000 -0500
-@@ -85,7 +85,7 @@ static inline void alternatives_smp_swit
+diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
+index c240efc..fdfadf3 100644
+--- a/arch/x86/include/asm/alternative.h
++++ b/arch/x86/include/asm/alternative.h
+@@ -85,7 +85,7 @@ static inline void alternatives_smp_switch(int smp) {}
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous\n" \
@@ -7241,10 +8277,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/alternative.h linux-2.6.32.49/ar
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous"
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/apic.h linux-2.6.32.49/arch/x86/include/asm/apic.h
---- linux-2.6.32.49/arch/x86/include/asm/apic.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/apic.h 2011-11-15 19:59:42.000000000 -0500
-@@ -46,7 +46,7 @@ static inline void generic_apic_probe(vo
+diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
+index 474d80d..1f97d58 100644
+--- a/arch/x86/include/asm/apic.h
++++ b/arch/x86/include/asm/apic.h
+@@ -46,7 +46,7 @@ static inline void generic_apic_probe(void)
#ifdef CONFIG_X86_LOCAL_APIC
@@ -7253,10 +8290,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/apic.h linux-2.6.32.49/arch/x86/
extern int local_apic_timer_c2_ok;
extern int disable_apic;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/apm.h linux-2.6.32.49/arch/x86/include/asm/apm.h
---- linux-2.6.32.49/arch/x86/include/asm/apm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/apm.h 2011-11-15 19:59:42.000000000 -0500
-@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32
+diff --git a/arch/x86/include/asm/apm.h b/arch/x86/include/asm/apm.h
+index 20370c6..a2eb9b0 100644
+--- a/arch/x86/include/asm/apm.h
++++ b/arch/x86/include/asm/apm.h
+@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -7265,7 +8303,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/apm.h linux-2.6.32.49/arch/x86/i
"setc %%al\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-@@ -58,7 +58,7 @@ static inline u8 apm_bios_call_simple_as
+@@ -58,7 +58,7 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -7274,10 +8312,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/apm.h linux-2.6.32.49/arch/x86/i
"setc %%bl\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch/x86/include/asm/atomic_32.h
---- linux-2.6.32.49/arch/x86/include/asm/atomic_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/atomic_32.h 2011-11-15 19:59:42.000000000 -0500
-@@ -25,6 +25,17 @@ static inline int atomic_read(const atom
+diff --git a/arch/x86/include/asm/atomic_32.h b/arch/x86/include/asm/atomic_32.h
+index dc5a667..fbed878 100644
+--- a/arch/x86/include/asm/atomic_32.h
++++ b/arch/x86/include/asm/atomic_32.h
+@@ -25,6 +25,17 @@ static inline int atomic_read(const atomic_t *v)
}
/**
@@ -7295,7 +8334,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic_set - set atomic variable
* @v: pointer of type atomic_t
* @i: required value
-@@ -37,6 +48,18 @@ static inline void atomic_set(atomic_t *
+@@ -37,6 +48,18 @@ static inline void atomic_set(atomic_t *v, int i)
}
/**
@@ -7314,7 +8353,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic_add - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic_t
-@@ -45,7 +68,29 @@ static inline void atomic_set(atomic_t *
+@@ -45,7 +68,29 @@ static inline void atomic_set(atomic_t *v, int i)
*/
static inline void atomic_add(int i, atomic_t *v)
{
@@ -7345,7 +8384,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter)
: "ir" (i));
}
-@@ -59,7 +104,29 @@ static inline void atomic_add(int i, ato
+@@ -59,7 +104,29 @@ static inline void atomic_add(int i, atomic_t *v)
*/
static inline void atomic_sub(int i, atomic_t *v)
{
@@ -7376,7 +8415,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter)
: "ir" (i));
}
-@@ -77,7 +144,16 @@ static inline int atomic_sub_and_test(in
+@@ -77,7 +144,16 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
{
unsigned char c;
@@ -7394,7 +8433,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -91,7 +167,27 @@ static inline int atomic_sub_and_test(in
+@@ -91,7 +167,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
*/
static inline void atomic_inc(atomic_t *v)
{
@@ -7423,7 +8462,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter));
}
-@@ -103,7 +199,27 @@ static inline void atomic_inc(atomic_t *
+@@ -103,7 +199,27 @@ static inline void atomic_inc(atomic_t *v)
*/
static inline void atomic_dec(atomic_t *v)
{
@@ -7452,7 +8491,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter));
}
-@@ -119,7 +235,16 @@ static inline int atomic_dec_and_test(at
+@@ -119,7 +235,16 @@ static inline int atomic_dec_and_test(atomic_t *v)
{
unsigned char c;
@@ -7470,7 +8509,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -137,7 +262,35 @@ static inline int atomic_inc_and_test(at
+@@ -137,7 +262,35 @@ static inline int atomic_inc_and_test(atomic_t *v)
{
unsigned char c;
@@ -7507,7 +8546,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -156,7 +309,16 @@ static inline int atomic_add_negative(in
+@@ -156,7 +309,16 @@ static inline int atomic_add_negative(int i, atomic_t *v)
{
unsigned char c;
@@ -7525,7 +8564,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
: "+m" (v->counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -179,6 +341,46 @@ static inline int atomic_add_return(int
+@@ -179,6 +341,46 @@ static inline int atomic_add_return(int i, atomic_t *v)
#endif
/* Modern 486+ processor */
__i = i;
@@ -7572,7 +8611,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
asm volatile(LOCK_PREFIX "xaddl %0, %1"
: "+r" (i), "+m" (v->counter)
: : "memory");
-@@ -211,11 +413,21 @@ static inline int atomic_cmpxchg(atomic_
+@@ -211,11 +413,21 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
return cmpxchg(&v->counter, old, new);
}
@@ -7594,7 +8633,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
/**
* atomic_add_unless - add unless the number is already a given value
* @v: pointer of type atomic_t
-@@ -227,22 +439,39 @@ static inline int atomic_xchg(atomic_t *
+@@ -227,22 +439,39 @@ static inline int atomic_xchg(atomic_t *v, int new)
*/
static inline int atomic_add_unless(atomic_t *v, int a, int u)
{
@@ -7657,7 +8696,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
/**
* atomic64_xchg - xchg atomic64 variable
-@@ -279,6 +517,7 @@ extern u64 atomic64_cmpxchg(atomic64_t *
+@@ -279,6 +517,7 @@ extern u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val);
* the old value.
*/
extern u64 atomic64_xchg(atomic64_t *ptr, u64 new_val);
@@ -7665,7 +8704,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
/**
* atomic64_set - set atomic64 variable
-@@ -290,6 +529,15 @@ extern u64 atomic64_xchg(atomic64_t *ptr
+@@ -290,6 +529,15 @@ extern u64 atomic64_xchg(atomic64_t *ptr, u64 new_val);
extern void atomic64_set(atomic64_t *ptr, u64 new_val);
/**
@@ -7681,7 +8720,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic64_read - read atomic64 variable
* @ptr: pointer to type atomic64_t
*
-@@ -317,7 +565,33 @@ static inline u64 atomic64_read(atomic64
+@@ -317,7 +565,33 @@ static inline u64 atomic64_read(atomic64_t *ptr)
return res;
}
@@ -7716,7 +8755,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
/**
* atomic64_add_return - add and return
-@@ -332,8 +606,11 @@ extern u64 atomic64_add_return(u64 delta
+@@ -332,8 +606,11 @@ extern u64 atomic64_add_return(u64 delta, atomic64_t *ptr);
* Other variants with different arithmetic operators:
*/
extern u64 atomic64_sub_return(u64 delta, atomic64_t *ptr);
@@ -7728,7 +8767,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
/**
* atomic64_add - add integer to atomic64 variable
-@@ -345,6 +622,15 @@ extern u64 atomic64_dec_return(atomic64_
+@@ -345,6 +622,15 @@ extern u64 atomic64_dec_return(atomic64_t *ptr);
extern void atomic64_add(u64 delta, atomic64_t *ptr);
/**
@@ -7744,7 +8783,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic64_sub - subtract the atomic64 variable
* @delta: integer value to subtract
* @ptr: pointer to type atomic64_t
-@@ -354,6 +640,15 @@ extern void atomic64_add(u64 delta, atom
+@@ -354,6 +640,15 @@ extern void atomic64_add(u64 delta, atomic64_t *ptr);
extern void atomic64_sub(u64 delta, atomic64_t *ptr);
/**
@@ -7760,7 +8799,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic64_sub_and_test - subtract value from variable and test result
* @delta: integer value to subtract
* @ptr: pointer to type atomic64_t
-@@ -373,6 +668,14 @@ extern int atomic64_sub_and_test(u64 del
+@@ -373,6 +668,14 @@ extern int atomic64_sub_and_test(u64 delta, atomic64_t *ptr);
extern void atomic64_inc(atomic64_t *ptr);
/**
@@ -7775,7 +8814,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic64_dec - decrement atomic64 variable
* @ptr: pointer to type atomic64_t
*
-@@ -381,6 +684,14 @@ extern void atomic64_inc(atomic64_t *ptr
+@@ -381,6 +684,14 @@ extern void atomic64_inc(atomic64_t *ptr);
extern void atomic64_dec(atomic64_t *ptr);
/**
@@ -7790,10 +8829,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_32.h linux-2.6.32.49/arch
* atomic64_dec_and_test - decrement and test
* @ptr: pointer to type atomic64_t
*
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch/x86/include/asm/atomic_64.h
---- linux-2.6.32.49/arch/x86/include/asm/atomic_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/atomic_64.h 2011-11-15 19:59:42.000000000 -0500
-@@ -24,6 +24,17 @@ static inline int atomic_read(const atom
+diff --git a/arch/x86/include/asm/atomic_64.h b/arch/x86/include/asm/atomic_64.h
+index d605dc2..fafd7bd 100644
+--- a/arch/x86/include/asm/atomic_64.h
++++ b/arch/x86/include/asm/atomic_64.h
+@@ -24,6 +24,17 @@ static inline int atomic_read(const atomic_t *v)
}
/**
@@ -7811,7 +8851,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
* atomic_set - set atomic variable
* @v: pointer of type atomic_t
* @i: required value
-@@ -36,6 +47,18 @@ static inline void atomic_set(atomic_t *
+@@ -36,6 +47,18 @@ static inline void atomic_set(atomic_t *v, int i)
}
/**
@@ -7830,7 +8870,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
* atomic_add - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic_t
-@@ -44,7 +67,29 @@ static inline void atomic_set(atomic_t *
+@@ -44,7 +67,29 @@ static inline void atomic_set(atomic_t *v, int i)
*/
static inline void atomic_add(int i, atomic_t *v)
{
@@ -7861,7 +8901,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "ir" (i), "m" (v->counter));
}
-@@ -58,7 +103,29 @@ static inline void atomic_add(int i, ato
+@@ -58,7 +103,29 @@ static inline void atomic_add(int i, atomic_t *v)
*/
static inline void atomic_sub(int i, atomic_t *v)
{
@@ -7892,7 +8932,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "ir" (i), "m" (v->counter));
}
-@@ -76,7 +143,16 @@ static inline int atomic_sub_and_test(in
+@@ -76,7 +143,16 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
{
unsigned char c;
@@ -7910,7 +8950,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "ir" (i), "m" (v->counter) : "memory");
return c;
-@@ -90,7 +166,28 @@ static inline int atomic_sub_and_test(in
+@@ -90,7 +166,28 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
*/
static inline void atomic_inc(atomic_t *v)
{
@@ -7940,7 +8980,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -103,7 +200,28 @@ static inline void atomic_inc(atomic_t *
+@@ -103,7 +200,28 @@ static inline void atomic_inc(atomic_t *v)
*/
static inline void atomic_dec(atomic_t *v)
{
@@ -7970,7 +9010,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -120,7 +238,16 @@ static inline int atomic_dec_and_test(at
+@@ -120,7 +238,16 @@ static inline int atomic_dec_and_test(atomic_t *v)
{
unsigned char c;
@@ -7988,7 +9028,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -138,7 +265,35 @@ static inline int atomic_inc_and_test(at
+@@ -138,7 +265,35 @@ static inline int atomic_inc_and_test(atomic_t *v)
{
unsigned char c;
@@ -8025,7 +9065,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -157,7 +312,16 @@ static inline int atomic_add_negative(in
+@@ -157,7 +312,16 @@ static inline int atomic_add_negative(int i, atomic_t *v)
{
unsigned char c;
@@ -8043,7 +9083,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "ir" (i), "m" (v->counter) : "memory");
return c;
-@@ -173,7 +337,31 @@ static inline int atomic_add_negative(in
+@@ -173,7 +337,31 @@ static inline int atomic_add_negative(int i, atomic_t *v)
static inline int atomic_add_return(int i, atomic_t *v)
{
int __i = i;
@@ -8076,7 +9116,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -185,6 +373,10 @@ static inline int atomic_sub_return(int
+@@ -185,6 +373,10 @@ static inline int atomic_sub_return(int i, atomic_t *v)
}
#define atomic_inc_return(v) (atomic_add_return(1, v))
@@ -8087,7 +9127,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
#define atomic_dec_return(v) (atomic_sub_return(1, v))
/* The 64-bit atomic type */
-@@ -204,6 +396,18 @@ static inline long atomic64_read(const a
+@@ -204,6 +396,18 @@ static inline long atomic64_read(const atomic64_t *v)
}
/**
@@ -8106,7 +9146,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
* atomic64_set - set atomic64 variable
* @v: pointer to type atomic64_t
* @i: required value
-@@ -216,6 +420,18 @@ static inline void atomic64_set(atomic64
+@@ -216,6 +420,18 @@ static inline void atomic64_set(atomic64_t *v, long i)
}
/**
@@ -8125,7 +9165,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
* atomic64_add - add integer to atomic64 variable
* @i: integer value to add
* @v: pointer to type atomic64_t
-@@ -224,6 +440,28 @@ static inline void atomic64_set(atomic64
+@@ -224,6 +440,28 @@ static inline void atomic64_set(atomic64_t *v, long i)
*/
static inline void atomic64_add(long i, atomic64_t *v)
{
@@ -8154,7 +9194,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
asm volatile(LOCK_PREFIX "addq %1,%0"
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
-@@ -238,7 +476,15 @@ static inline void atomic64_add(long i,
+@@ -238,7 +476,15 @@ static inline void atomic64_add(long i, atomic64_t *v)
*/
static inline void atomic64_sub(long i, atomic64_t *v)
{
@@ -8171,7 +9211,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
}
-@@ -256,7 +502,16 @@ static inline int atomic64_sub_and_test(
+@@ -256,7 +502,16 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v)
{
unsigned char c;
@@ -8189,7 +9229,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -270,6 +525,27 @@ static inline int atomic64_sub_and_test(
+@@ -270,6 +525,27 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v)
*/
static inline void atomic64_inc(atomic64_t *v)
{
@@ -8217,7 +9257,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
asm volatile(LOCK_PREFIX "incq %0"
: "=m" (v->counter)
: "m" (v->counter));
-@@ -283,7 +559,28 @@ static inline void atomic64_inc(atomic64
+@@ -283,7 +559,28 @@ static inline void atomic64_inc(atomic64_t *v)
*/
static inline void atomic64_dec(atomic64_t *v)
{
@@ -8247,7 +9287,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -300,7 +597,16 @@ static inline int atomic64_dec_and_test(
+@@ -300,7 +597,16 @@ static inline int atomic64_dec_and_test(atomic64_t *v)
{
unsigned char c;
@@ -8265,7 +9305,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -318,7 +624,16 @@ static inline int atomic64_inc_and_test(
+@@ -318,7 +624,16 @@ static inline int atomic64_inc_and_test(atomic64_t *v)
{
unsigned char c;
@@ -8283,7 +9323,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -337,7 +652,16 @@ static inline int atomic64_add_negative(
+@@ -337,7 +652,16 @@ static inline int atomic64_add_negative(long i, atomic64_t *v)
{
unsigned char c;
@@ -8301,7 +9341,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -353,7 +677,31 @@ static inline int atomic64_add_negative(
+@@ -353,7 +677,31 @@ static inline int atomic64_add_negative(long i, atomic64_t *v)
static inline long atomic64_add_return(long i, atomic64_t *v)
{
long __i = i;
@@ -8334,7 +9374,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -365,6 +713,10 @@ static inline long atomic64_sub_return(l
+@@ -365,6 +713,10 @@ static inline long atomic64_sub_return(long i, atomic64_t *v)
}
#define atomic64_inc_return(v) (atomic64_add_return(1, (v)))
@@ -8345,7 +9385,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
#define atomic64_dec_return(v) (atomic64_sub_return(1, (v)))
static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
-@@ -372,21 +724,41 @@ static inline long atomic64_cmpxchg(atom
+@@ -372,21 +724,41 @@ static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
return cmpxchg(&v->counter, old, new);
}
@@ -8387,7 +9427,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
/**
* atomic_add_unless - add unless the number is a given value
* @v: pointer of type atomic_t
-@@ -398,17 +770,30 @@ static inline long atomic_xchg(atomic_t
+@@ -398,17 +770,30 @@ static inline long atomic_xchg(atomic_t *v, int new)
*/
static inline int atomic_add_unless(atomic_t *v, int a, int u)
{
@@ -8422,7 +9462,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
}
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-@@ -424,17 +809,30 @@ static inline int atomic_add_unless(atom
+@@ -424,17 +809,30 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
*/
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
{
@@ -8457,9 +9497,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/atomic_64.h linux-2.6.32.49/arch
}
/**
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/bitops.h linux-2.6.32.49/arch/x86/include/asm/bitops.h
---- linux-2.6.32.49/arch/x86/include/asm/bitops.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/bitops.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
+index 02b47a6..d5c4b15 100644
+--- a/arch/x86/include/asm/bitops.h
++++ b/arch/x86/include/asm/bitops.h
@@ -38,7 +38,7 @@
* a mask operation on a byte.
*/
@@ -8469,9 +9510,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/bitops.h linux-2.6.32.49/arch/x8
#define CONST_MASK(nr) (1 << ((nr) & 7))
/**
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/boot.h linux-2.6.32.49/arch/x86/include/asm/boot.h
---- linux-2.6.32.49/arch/x86/include/asm/boot.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/boot.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
+index 7a10659..8bbf355 100644
+--- a/arch/x86/include/asm/boot.h
++++ b/arch/x86/include/asm/boot.h
@@ -11,10 +11,15 @@
#include <asm/pgtable_types.h>
@@ -8489,9 +9531,26 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/boot.h linux-2.6.32.49/arch/x86/
/* Minimum kernel alignment, as a power of two */
#ifdef CONFIG_X86_64
#define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/cacheflush.h linux-2.6.32.49/arch/x86/include/asm/cacheflush.h
---- linux-2.6.32.49/arch/x86/include/asm/cacheflush.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/cacheflush.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
+index 549860d..7d45f68 100644
+--- a/arch/x86/include/asm/cache.h
++++ b/arch/x86/include/asm/cache.h
+@@ -5,9 +5,10 @@
+
+ /* L1 cache line size */
+ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
+-#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
++#define L1_CACHE_BYTES (_AC(1,UL) << L1_CACHE_SHIFT)
+
+ #define __read_mostly __attribute__((__section__(".data.read_mostly")))
++#define __read_only __attribute__((__section__(".data.read_only")))
+
+ #ifdef CONFIG_X86_VSMP
+ /* vSMP Internode cacheline shift */
+diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
+index b54f6af..5b376a6 100644
+--- a/arch/x86/include/asm/cacheflush.h
++++ b/arch/x86/include/asm/cacheflush.h
@@ -60,7 +60,7 @@ PAGEFLAG(WC, WC)
static inline unsigned long get_page_memtype(struct page *pg)
{
@@ -8501,7 +9560,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/cacheflush.h linux-2.6.32.49/arc
else if (!PageUncached(pg) && PageWC(pg))
return _PAGE_CACHE_WC;
else if (PageUncached(pg) && !PageWC(pg))
-@@ -85,7 +85,7 @@ static inline void set_page_memtype(stru
+@@ -85,7 +85,7 @@ static inline void set_page_memtype(struct page *pg, unsigned long memtype)
SetPageWC(pg);
break;
default:
@@ -8510,25 +9569,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/cacheflush.h linux-2.6.32.49/arc
ClearPageUncached(pg);
ClearPageWC(pg);
break;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/cache.h linux-2.6.32.49/arch/x86/include/asm/cache.h
---- linux-2.6.32.49/arch/x86/include/asm/cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/cache.h 2011-11-15 19:59:42.000000000 -0500
-@@ -5,9 +5,10 @@
-
- /* L1 cache line size */
- #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
--#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
-+#define L1_CACHE_BYTES (_AC(1,UL) << L1_CACHE_SHIFT)
-
- #define __read_mostly __attribute__((__section__(".data.read_mostly")))
-+#define __read_only __attribute__((__section__(".data.read_only")))
-
- #ifdef CONFIG_X86_VSMP
- /* vSMP Internode cacheline shift */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/calling.h linux-2.6.32.49/arch/x86/include/asm/calling.h
---- linux-2.6.32.49/arch/x86/include/asm/calling.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/calling.h 2011-11-15 19:59:42.000000000 -0500
-@@ -52,32 +52,32 @@ For 32-bit we have the following convent
+diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
+index 0e63c9a..ab8d972 100644
+--- a/arch/x86/include/asm/calling.h
++++ b/arch/x86/include/asm/calling.h
+@@ -52,32 +52,32 @@ For 32-bit we have the following conventions - kernel is built with
* for assembly code:
*/
@@ -8582,10 +9627,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/calling.h linux-2.6.32.49/arch/x
#define ARGOFFSET R11
#define SWFRAME ORIG_RAX
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/checksum_32.h linux-2.6.32.49/arch/x86/include/asm/checksum_32.h
---- linux-2.6.32.49/arch/x86/include/asm/checksum_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/checksum_32.h 2011-11-15 19:59:42.000000000 -0500
-@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene
+diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
+index 46fc474..b02b0f9 100644
+--- a/arch/x86/include/asm/checksum_32.h
++++ b/arch/x86/include/asm/checksum_32.h
+@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,
int len, __wsum sum,
int *src_err_ptr, int *dst_err_ptr);
@@ -8600,7 +9646,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/checksum_32.h linux-2.6.32.49/ar
/*
* Note: when you get a NULL pointer exception here this means someone
* passed in an incorrect kernel address to one of these functions.
-@@ -50,7 +58,7 @@ static inline __wsum csum_partial_copy_f
+@@ -50,7 +58,7 @@ static inline __wsum csum_partial_copy_from_user(const void __user *src,
int *err_ptr)
{
might_sleep();
@@ -8609,7 +9655,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/checksum_32.h linux-2.6.32.49/ar
len, sum, err_ptr, NULL);
}
-@@ -178,7 +186,7 @@ static inline __wsum csum_and_copy_to_us
+@@ -178,7 +186,7 @@ static inline __wsum csum_and_copy_to_user(const void *src,
{
might_sleep();
if (access_ok(VERIFY_WRITE, dst, len))
@@ -8618,25 +9664,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/checksum_32.h linux-2.6.32.49/ar
len, sum, NULL, err_ptr);
if (len)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc_defs.h linux-2.6.32.49/arch/x86/include/asm/desc_defs.h
---- linux-2.6.32.49/arch/x86/include/asm/desc_defs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/desc_defs.h 2011-11-15 19:59:42.000000000 -0500
-@@ -31,6 +31,12 @@ struct desc_struct {
- unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
- unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
- };
-+ struct {
-+ u16 offset_low;
-+ u16 seg;
-+ unsigned reserved: 8, type: 4, s: 1, dpl: 2, p: 1;
-+ unsigned offset_high: 16;
-+ } gate;
- };
- } __attribute__((packed));
-
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/include/asm/desc.h
---- linux-2.6.32.49/arch/x86/include/asm/desc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/desc.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
+index 617bd56..7b047a1 100644
+--- a/arch/x86/include/asm/desc.h
++++ b/arch/x86/include/asm/desc.h
@@ -4,6 +4,7 @@
#include <asm/desc_defs.h>
#include <asm/ldt.h>
@@ -8645,7 +9676,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
#include <linux/smp.h>
static inline void fill_ldt(struct desc_struct *desc,
-@@ -15,6 +16,7 @@ static inline void fill_ldt(struct desc_
+@@ -15,6 +16,7 @@ static inline void fill_ldt(struct desc_struct *desc,
desc->base1 = (info->base_addr & 0x00ff0000) >> 16;
desc->type = (info->read_exec_only ^ 1) << 1;
desc->type |= info->contents << 2;
@@ -8653,7 +9684,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
desc->s = 1;
desc->dpl = 0x3;
desc->p = info->seg_not_present ^ 1;
-@@ -31,16 +33,12 @@ static inline void fill_ldt(struct desc_
+@@ -31,16 +33,12 @@ static inline void fill_ldt(struct desc_struct *desc,
}
extern struct desc_ptr idt_descr;
@@ -8673,7 +9704,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
#ifdef CONFIG_X86_64
-@@ -65,9 +63,14 @@ static inline void pack_gate(gate_desc *
+@@ -65,9 +63,14 @@ static inline void pack_gate(gate_desc *gate, unsigned char type,
unsigned long base, unsigned dpl, unsigned flags,
unsigned short seg)
{
@@ -8691,7 +9722,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
#endif
-@@ -115,13 +118,17 @@ static inline void paravirt_free_ldt(str
+@@ -115,13 +118,17 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
static inline void native_write_idt_entry(gate_desc *idt, int entry,
const gate_desc *gate)
{
@@ -8709,7 +9740,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry,
-@@ -139,7 +146,10 @@ static inline void native_write_gdt_entr
+@@ -139,7 +146,10 @@ static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry,
size = sizeof(struct desc_struct);
break;
}
@@ -8720,7 +9751,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
-@@ -211,7 +221,9 @@ static inline void native_set_ldt(const
+@@ -211,7 +221,9 @@ static inline void native_set_ldt(const void *addr, unsigned int entries)
static inline void native_load_tr_desc(void)
{
@@ -8730,7 +9761,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
static inline void native_load_gdt(const struct desc_ptr *dtr)
-@@ -246,8 +258,10 @@ static inline void native_load_tls(struc
+@@ -246,8 +258,10 @@ static inline void native_load_tls(struct thread_struct *t, unsigned int cpu)
unsigned int i;
struct desc_struct *gdt = get_cpu_gdt_table(cpu);
@@ -8741,7 +9772,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
}
#define _LDT_empty(info) \
-@@ -309,7 +323,7 @@ static inline void set_desc_limit(struct
+@@ -309,7 +323,7 @@ static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit)
desc->limit = (limit >> 16) & 0xf;
}
@@ -8750,7 +9781,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
unsigned dpl, unsigned ist, unsigned seg)
{
gate_desc s;
-@@ -327,7 +341,7 @@ static inline void _set_gate(int gate, u
+@@ -327,7 +341,7 @@ static inline void _set_gate(int gate, unsigned type, void *addr,
* Pentium F0 0F bugfix can have resulted in the mapped
* IDT being write-protected.
*/
@@ -8759,7 +9790,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
{
BUG_ON((unsigned)n > 0xFF);
_set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS);
-@@ -356,19 +370,19 @@ static inline void alloc_intr_gate(unsig
+@@ -356,19 +370,19 @@ static inline void alloc_intr_gate(unsigned int n, void *addr)
/*
* This routine sets up an interrupt gate at directory privilege level 3.
*/
@@ -8782,7 +9813,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
{
BUG_ON((unsigned)n > 0xFF);
_set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS);
-@@ -377,19 +391,31 @@ static inline void set_trap_gate(unsigne
+@@ -377,19 +391,31 @@ static inline void set_trap_gate(unsigned int n, void *addr)
static inline void set_task_gate(unsigned int n, unsigned int gdt_entry)
{
BUG_ON((unsigned)n > 0xFF);
@@ -8817,9 +9848,27 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/desc.h linux-2.6.32.49/arch/x86/
+#endif
+
#endif /* _ASM_X86_DESC_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/device.h linux-2.6.32.49/arch/x86/include/asm/device.h
---- linux-2.6.32.49/arch/x86/include/asm/device.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/device.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/asm/desc_defs.h
+index 9d66848..6b4a691 100644
+--- a/arch/x86/include/asm/desc_defs.h
++++ b/arch/x86/include/asm/desc_defs.h
+@@ -31,6 +31,12 @@ struct desc_struct {
+ unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
+ unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
+ };
++ struct {
++ u16 offset_low;
++ u16 seg;
++ unsigned reserved: 8, type: 4, s: 1, dpl: 2, p: 1;
++ unsigned offset_high: 16;
++ } gate;
+ };
+ } __attribute__((packed));
+
+diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h
+index cee34e9..a7c3fa2 100644
+--- a/arch/x86/include/asm/device.h
++++ b/arch/x86/include/asm/device.h
@@ -6,7 +6,7 @@ struct dev_archdata {
void *acpi_handle;
#endif
@@ -8829,9 +9878,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/device.h linux-2.6.32.49/arch/x8
#endif
#ifdef CONFIG_DMAR
void *iommu; /* hook for IOMMU specific extension */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h
---- linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
+index 6a25d5d..786b202 100644
+--- a/arch/x86/include/asm/dma-mapping.h
++++ b/arch/x86/include/asm/dma-mapping.h
@@ -25,9 +25,9 @@ extern int iommu_merge;
extern struct device x86_dma_fallback_dev;
extern int panic_on_overflow;
@@ -8844,7 +9894,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h linux-2.6.32.49/ar
{
#ifdef CONFIG_X86_32
return dma_ops;
-@@ -44,7 +44,7 @@ static inline struct dma_map_ops *get_dm
+@@ -44,7 +44,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
/* Make sure we keep the same behaviour */
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
@@ -8862,7 +9912,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h linux-2.6.32.49/ar
void *memory;
gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
-@@ -149,7 +149,7 @@ dma_alloc_coherent(struct device *dev, s
+@@ -149,7 +149,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
static inline void dma_free_coherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t bus)
{
@@ -8871,10 +9921,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/dma-mapping.h linux-2.6.32.49/ar
WARN_ON(irqs_disabled()); /* for portability */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/e820.h linux-2.6.32.49/arch/x86/include/asm/e820.h
---- linux-2.6.32.49/arch/x86/include/asm/e820.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/e820.h 2011-11-15 19:59:42.000000000 -0500
-@@ -133,7 +133,7 @@ extern char *default_machine_specific_me
+diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
+index 40b4e61..40d8133 100644
+--- a/arch/x86/include/asm/e820.h
++++ b/arch/x86/include/asm/e820.h
+@@ -133,7 +133,7 @@ extern char *default_machine_specific_memory_setup(void);
#define ISA_END_ADDRESS 0x100000
#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
@@ -8883,9 +9934,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/e820.h linux-2.6.32.49/arch/x86/
#define BIOS_END 0x00100000
#ifdef __KERNEL__
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/elf.h linux-2.6.32.49/arch/x86/include/asm/elf.h
---- linux-2.6.32.49/arch/x86/include/asm/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/elf.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
+index 8ac9d9a..0a6c96e 100644
+--- a/arch/x86/include/asm/elf.h
++++ b/arch/x86/include/asm/elf.h
@@ -257,7 +257,25 @@ extern int force_personality32;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -8932,7 +9984,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/elf.h linux-2.6.32.49/arch/x86/i
#define VDSO_ENTRY \
((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall))
-@@ -337,7 +353,4 @@ extern int arch_setup_additional_pages(s
+@@ -337,7 +353,4 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
#define compat_arch_setup_additional_pages syscall32_setup_pages
@@ -8940,9 +9992,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/elf.h linux-2.6.32.49/arch/x86/i
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_X86_ELF_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/emergency-restart.h linux-2.6.32.49/arch/x86/include/asm/emergency-restart.h
---- linux-2.6.32.49/arch/x86/include/asm/emergency-restart.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/emergency-restart.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/emergency-restart.h b/arch/x86/include/asm/emergency-restart.h
+index cc70c1c..d96d011 100644
+--- a/arch/x86/include/asm/emergency-restart.h
++++ b/arch/x86/include/asm/emergency-restart.h
@@ -15,6 +15,6 @@ enum reboot_type {
extern enum reboot_type reboot_type;
@@ -8951,9 +10004,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/emergency-restart.h linux-2.6.32
+extern void machine_emergency_restart(void) __noreturn;
#endif /* _ASM_X86_EMERGENCY_RESTART_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/futex.h linux-2.6.32.49/arch/x86/include/asm/futex.h
---- linux-2.6.32.49/arch/x86/include/asm/futex.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/futex.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/futex.h b/arch/x86/include/asm/futex.h
+index 1f11ce4..7caabd1 100644
+--- a/arch/x86/include/asm/futex.h
++++ b/arch/x86/include/asm/futex.h
@@ -12,16 +12,18 @@
#include <asm/system.h>
@@ -8987,7 +10041,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/futex.h linux-2.6.32.49/arch/x86
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
-@@ -61,10 +63,10 @@ static inline int futex_atomic_op_inuser
+@@ -61,10 +63,10 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
switch (op) {
case FUTEX_OP_SET:
@@ -9000,7 +10054,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/futex.h linux-2.6.32.49/arch/x86
uaddr, oparg);
break;
case FUTEX_OP_OR:
-@@ -109,7 +111,7 @@ static inline int futex_atomic_op_inuser
+@@ -109,7 +111,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
return ret;
}
@@ -9009,7 +10063,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/futex.h linux-2.6.32.49/arch/x86
int newval)
{
-@@ -119,16 +121,16 @@ static inline int futex_atomic_cmpxchg_i
+@@ -119,16 +121,16 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval,
return -ENOSYS;
#endif
@@ -9029,9 +10083,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/futex.h linux-2.6.32.49/arch/x86
: "i" (-EFAULT), "r" (newval), "0" (oldval)
: "memory"
);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/hw_irq.h linux-2.6.32.49/arch/x86/include/asm/hw_irq.h
---- linux-2.6.32.49/arch/x86/include/asm/hw_irq.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/hw_irq.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
+index ba180d9..3bad351 100644
+--- a/arch/x86/include/asm/hw_irq.h
++++ b/arch/x86/include/asm/hw_irq.h
@@ -92,8 +92,8 @@ extern void setup_ioapic_dest(void);
extern void enable_IO_APIC(void);
@@ -9043,10 +10098,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/hw_irq.h linux-2.6.32.49/arch/x8
/* EISA */
extern void eisa_set_level_irq(unsigned int irq);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/i387.h linux-2.6.32.49/arch/x86/include/asm/i387.h
---- linux-2.6.32.49/arch/x86/include/asm/i387.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/i387.h 2011-11-15 19:59:42.000000000 -0500
-@@ -60,6 +60,11 @@ static inline int fxrstor_checking(struc
+diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
+index 0b20bbb..4cb1396 100644
+--- a/arch/x86/include/asm/i387.h
++++ b/arch/x86/include/asm/i387.h
+@@ -60,6 +60,11 @@ static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
{
int err;
@@ -9058,7 +10114,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/i387.h linux-2.6.32.49/arch/x86/
asm volatile("1: rex64/fxrstor (%[fx])\n\t"
"2:\n"
".section .fixup,\"ax\"\n"
-@@ -105,6 +110,11 @@ static inline int fxsave_user(struct i38
+@@ -105,6 +110,11 @@ static inline int fxsave_user(struct i387_fxsave_struct __user *fx)
{
int err;
@@ -9070,7 +10126,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/i387.h linux-2.6.32.49/arch/x86/
asm volatile("1: rex64/fxsave (%[fx])\n\t"
"2:\n"
".section .fixup,\"ax\"\n"
-@@ -195,13 +205,8 @@ static inline int fxrstor_checking(struc
+@@ -195,13 +205,8 @@ static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
}
/* We need a safe address that is cheap to find and that is already
@@ -9086,7 +10142,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/i387.h linux-2.6.32.49/arch/x86/
/*
* These must be called with preempt disabled
-@@ -291,7 +296,7 @@ static inline void kernel_fpu_begin(void
+@@ -291,7 +296,7 @@ static inline void kernel_fpu_begin(void)
struct thread_info *me = current_thread_info();
preempt_disable();
if (me->status & TS_USEDFPU)
@@ -9095,9 +10151,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/i387.h linux-2.6.32.49/arch/x86/
else
clts();
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/io_32.h linux-2.6.32.49/arch/x86/include/asm/io_32.h
---- linux-2.6.32.49/arch/x86/include/asm/io_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/io_32.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h
+index a299900..15c5410 100644
+--- a/arch/x86/include/asm/io_32.h
++++ b/arch/x86/include/asm/io_32.h
@@ -3,6 +3,7 @@
#include <linux/string.h>
@@ -9124,9 +10181,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/io_32.h linux-2.6.32.49/arch/x86
#include <asm-generic/iomap.h>
#include <linux/vmalloc.h>
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/io_64.h linux-2.6.32.49/arch/x86/include/asm/io_64.h
---- linux-2.6.32.49/arch/x86/include/asm/io_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/io_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h
+index 2440678..c158b88 100644
+--- a/arch/x86/include/asm/io_64.h
++++ b/arch/x86/include/asm/io_64.h
@@ -140,6 +140,17 @@ __OUTS(l)
#include <linux/vmalloc.h>
@@ -9145,9 +10203,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/io_64.h linux-2.6.32.49/arch/x86
#include <asm-generic/iomap.h>
void __memcpy_fromio(void *, unsigned long, unsigned);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/iommu.h linux-2.6.32.49/arch/x86/include/asm/iommu.h
---- linux-2.6.32.49/arch/x86/include/asm/iommu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/iommu.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h
+index fd6d21b..8b13915 100644
+--- a/arch/x86/include/asm/iommu.h
++++ b/arch/x86/include/asm/iommu.h
@@ -3,7 +3,7 @@
extern void pci_iommu_shutdown(void);
@@ -9157,10 +10216,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/iommu.h linux-2.6.32.49/arch/x86
extern int force_iommu, no_iommu;
extern int iommu_detected;
extern int iommu_pass_through;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/irqflags.h linux-2.6.32.49/arch/x86/include/asm/irqflags.h
---- linux-2.6.32.49/arch/x86/include/asm/irqflags.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/irqflags.h 2011-11-15 19:59:42.000000000 -0500
-@@ -142,6 +142,11 @@ static inline unsigned long __raw_local_
+diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
+index 9e2b952..557206e 100644
+--- a/arch/x86/include/asm/irqflags.h
++++ b/arch/x86/include/asm/irqflags.h
+@@ -142,6 +142,11 @@ static inline unsigned long __raw_local_irq_save(void)
sti; \
sysexit
@@ -9172,9 +10232,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/irqflags.h linux-2.6.32.49/arch/
#else
#define INTERRUPT_RETURN iret
#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/kprobes.h linux-2.6.32.49/arch/x86/include/asm/kprobes.h
---- linux-2.6.32.49/arch/x86/include/asm/kprobes.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/kprobes.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
+index 4fe681d..bb6d40c 100644
+--- a/arch/x86/include/asm/kprobes.h
++++ b/arch/x86/include/asm/kprobes.h
@@ -34,13 +34,8 @@ typedef u8 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION 0xcc
#define RELATIVEJUMP_INSTRUCTION 0xe9
@@ -9191,9 +10252,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/kprobes.h linux-2.6.32.49/arch/x
#define flush_insn_slot(p) do { } while (0)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/kvm_host.h linux-2.6.32.49/arch/x86/include/asm/kvm_host.h
---- linux-2.6.32.49/arch/x86/include/asm/kvm_host.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/kvm_host.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
+index 08bc2ff..2e88d1f 100644
+--- a/arch/x86/include/asm/kvm_host.h
++++ b/arch/x86/include/asm/kvm_host.h
@@ -534,9 +534,9 @@ struct kvm_x86_ops {
bool (*gb_page_enable)(void);
@@ -9206,9 +10268,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/kvm_host.h linux-2.6.32.49/arch/
int kvm_mmu_module_init(void);
void kvm_mmu_module_exit(void);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86/include/asm/local.h
---- linux-2.6.32.49/arch/x86/include/asm/local.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/local.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
+index 47b9b6f..815aaa1 100644
+--- a/arch/x86/include/asm/local.h
++++ b/arch/x86/include/asm/local.h
@@ -18,26 +18,58 @@ typedef struct {
static inline void local_inc(local_t *l)
@@ -9272,7 +10335,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+m" (l->a.counter)
: "ir" (i));
}
-@@ -55,7 +87,16 @@ static inline int local_sub_and_test(lon
+@@ -55,7 +87,16 @@ static inline int local_sub_and_test(long i, local_t *l)
{
unsigned char c;
@@ -9290,7 +10353,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+m" (l->a.counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -73,7 +114,16 @@ static inline int local_dec_and_test(loc
+@@ -73,7 +114,16 @@ static inline int local_dec_and_test(local_t *l)
{
unsigned char c;
@@ -9308,7 +10371,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -91,7 +141,16 @@ static inline int local_inc_and_test(loc
+@@ -91,7 +141,16 @@ static inline int local_inc_and_test(local_t *l)
{
unsigned char c;
@@ -9326,7 +10389,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -110,7 +169,16 @@ static inline int local_add_negative(lon
+@@ -110,7 +169,16 @@ static inline int local_add_negative(long i, local_t *l)
{
unsigned char c;
@@ -9344,7 +10407,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+m" (l->a.counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -133,7 +201,15 @@ static inline long local_add_return(long
+@@ -133,7 +201,15 @@ static inline long local_add_return(long i, local_t *l)
#endif
/* Modern 486+ processor */
__i = i;
@@ -9361,9 +10424,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/local.h linux-2.6.32.49/arch/x86
: "+r" (i), "+m" (l->a.counter)
: : "memory");
return i + __i;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/microcode.h linux-2.6.32.49/arch/x86/include/asm/microcode.h
---- linux-2.6.32.49/arch/x86/include/asm/microcode.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/microcode.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
+index ef51b50..514ba37 100644
+--- a/arch/x86/include/asm/microcode.h
++++ b/arch/x86/include/asm/microcode.h
@@ -12,13 +12,13 @@ struct device;
enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND };
@@ -9404,9 +10468,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/microcode.h linux-2.6.32.49/arch
{
return NULL;
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/mman.h linux-2.6.32.49/arch/x86/include/asm/mman.h
---- linux-2.6.32.49/arch/x86/include/asm/mman.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/mman.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/mman.h b/arch/x86/include/asm/mman.h
+index 593e51d..fa69c9a 100644
+--- a/arch/x86/include/asm/mman.h
++++ b/arch/x86/include/asm/mman.h
@@ -5,4 +5,14 @@
#include <asm-generic/mman.h>
@@ -9422,10 +10487,41 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/mman.h linux-2.6.32.49/arch/x86/
+#endif
+
#endif /* _ASM_X86_MMAN_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu_context.h linux-2.6.32.49/arch/x86/include/asm/mmu_context.h
---- linux-2.6.32.49/arch/x86/include/asm/mmu_context.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/mmu_context.h 2011-11-15 19:59:42.000000000 -0500
-@@ -24,6 +24,18 @@ void destroy_context(struct mm_struct *m
+diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
+index 80a1dee..239c67d 100644
+--- a/arch/x86/include/asm/mmu.h
++++ b/arch/x86/include/asm/mmu.h
+@@ -9,10 +9,23 @@
+ * we put the segment information here.
+ */
+ typedef struct {
+- void *ldt;
++ struct desc_struct *ldt;
+ int size;
+ struct mutex lock;
+- void *vdso;
++ unsigned long vdso;
++
++#ifdef CONFIG_X86_32
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++ unsigned long user_cs_base;
++ unsigned long user_cs_limit;
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
++ cpumask_t cpu_user_cs_mask;
++#endif
++
++#endif
++#endif
++
+ } mm_context_t;
+
+ #ifdef CONFIG_SMP
+diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
+index 8b5393e..8143173 100644
+--- a/arch/x86/include/asm/mmu_context.h
++++ b/arch/x86/include/asm/mmu_context.h
+@@ -24,6 +24,18 @@ void destroy_context(struct mm_struct *mm);
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
@@ -9444,7 +10540,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu_context.h linux-2.6.32.49/ar
#ifdef CONFIG_SMP
if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
percpu_write(cpu_tlbstate.state, TLBSTATE_LAZY);
-@@ -34,16 +46,30 @@ static inline void switch_mm(struct mm_s
+@@ -34,16 +46,30 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
unsigned cpu = smp_processor_id();
@@ -9475,7 +10571,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu_context.h linux-2.6.32.49/ar
/* stop flush ipis for the previous mm */
cpumask_clear_cpu(cpu, mm_cpumask(prev));
-@@ -53,9 +79,38 @@ static inline void switch_mm(struct mm_s
+@@ -53,9 +79,38 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
*/
if (unlikely(prev->context.ldt != next->context.ldt))
load_LDT_nolock(&next->context);
@@ -9515,7 +10611,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu_context.h linux-2.6.32.49/ar
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next);
-@@ -64,11 +119,28 @@ static inline void switch_mm(struct mm_s
+@@ -64,11 +119,28 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
* tlb flush IPI delivery. We must reload CR3
* to make sure to use no freed page tables.
*/
@@ -9545,38 +10641,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu_context.h linux-2.6.32.49/ar
}
#define activate_mm(prev, next) \
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/mmu.h linux-2.6.32.49/arch/x86/include/asm/mmu.h
---- linux-2.6.32.49/arch/x86/include/asm/mmu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/mmu.h 2011-11-15 19:59:42.000000000 -0500
-@@ -9,10 +9,23 @@
- * we put the segment information here.
- */
- typedef struct {
-- void *ldt;
-+ struct desc_struct *ldt;
- int size;
- struct mutex lock;
-- void *vdso;
-+ unsigned long vdso;
-+
-+#ifdef CONFIG_X86_32
-+#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
-+ unsigned long user_cs_base;
-+ unsigned long user_cs_limit;
-+
-+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
-+ cpumask_t cpu_user_cs_mask;
-+#endif
-+
-+#endif
-+#endif
-+
- } mm_context_t;
-
- #ifdef CONFIG_SMP
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/module.h linux-2.6.32.49/arch/x86/include/asm/module.h
---- linux-2.6.32.49/arch/x86/include/asm/module.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/module.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h
+index 3e2ce58..caaf478 100644
+--- a/arch/x86/include/asm/module.h
++++ b/arch/x86/include/asm/module.h
@@ -5,6 +5,7 @@
#ifdef CONFIG_X86_64
@@ -9585,7 +10653,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/module.h linux-2.6.32.49/arch/x8
#elif defined CONFIG_M386
#define MODULE_PROC_FAMILY "386 "
#elif defined CONFIG_M486
-@@ -59,13 +60,24 @@
+@@ -59,13 +60,26 @@
#error unknown processor family
#endif
@@ -9602,8 +10670,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/module.h linux-2.6.32.49/arch/x8
+#define MODULE_STACKSIZE ""
+#endif
+
-+#ifdef CONFIG_PAX_KERNEXEC
-+#define MODULE_PAX_KERNEXEC "KERNEXEC "
++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS
++#define MODULE_PAX_KERNEXEC "KERNEXEC_BTS "
++#elif defined(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR)
++#define MODULE_PAX_KERNEXEC "KERNEXEC_OR "
+#else
+#define MODULE_PAX_KERNEXEC ""
#endif
@@ -9617,9 +10687,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/module.h linux-2.6.32.49/arch/x8
+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF
+
#endif /* _ASM_X86_MODULE_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/page_64_types.h linux-2.6.32.49/arch/x86/include/asm/page_64_types.h
---- linux-2.6.32.49/arch/x86/include/asm/page_64_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/page_64_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
+index 7639dbf..e08a58c 100644
+--- a/arch/x86/include/asm/page_64_types.h
++++ b/arch/x86/include/asm/page_64_types.h
@@ -56,7 +56,7 @@ void copy_page(void *to, void *from);
/* duplicated to the one in bootmem.h */
@@ -9629,10 +10700,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/page_64_types.h linux-2.6.32.49/
extern unsigned long __phys_addr(unsigned long);
#define __phys_reloc_hide(x) (x)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/paravirt.h linux-2.6.32.49/arch/x86/include/asm/paravirt.h
---- linux-2.6.32.49/arch/x86/include/asm/paravirt.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/paravirt.h 2011-11-15 19:59:42.000000000 -0500
-@@ -648,6 +648,18 @@ static inline void set_pgd(pgd_t *pgdp,
+diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
+index efb3899..ef30687 100644
+--- a/arch/x86/include/asm/paravirt.h
++++ b/arch/x86/include/asm/paravirt.h
+@@ -648,6 +648,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
val);
}
@@ -9651,7 +10723,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/paravirt.h linux-2.6.32.49/arch/
static inline void pgd_clear(pgd_t *pgdp)
{
set_pgd(pgdp, __pgd(0));
-@@ -729,6 +741,21 @@ static inline void __set_fixmap(unsigned
+@@ -729,6 +741,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
pv_mmu_ops.set_fixmap(idx, phys, flags);
}
@@ -9704,9 +10776,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/paravirt.h linux-2.6.32.49/arch/
#endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/paravirt_types.h linux-2.6.32.49/arch/x86/include/asm/paravirt_types.h
---- linux-2.6.32.49/arch/x86/include/asm/paravirt_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/paravirt_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
+index 9357473..aeb2de5 100644
+--- a/arch/x86/include/asm/paravirt_types.h
++++ b/arch/x86/include/asm/paravirt_types.h
@@ -78,19 +78,19 @@ struct pv_init_ops {
*/
unsigned (*patch)(u8 type, u16 clobber, void *insnbuf,
@@ -9778,10 +10851,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/paravirt_types.h linux-2.6.32.49
/* This contains all the paravirt structures: we get a convenient
* number for each function using the offset which we use to indicate
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pci_x86.h linux-2.6.32.49/arch/x86/include/asm/pci_x86.h
---- linux-2.6.32.49/arch/x86/include/asm/pci_x86.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pci_x86.h 2011-11-15 19:59:42.000000000 -0500
-@@ -89,16 +89,16 @@ extern int (*pcibios_enable_irq)(struct
+diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
+index b399988..3f47c38 100644
+--- a/arch/x86/include/asm/pci_x86.h
++++ b/arch/x86/include/asm/pci_x86.h
+@@ -89,16 +89,16 @@ extern int (*pcibios_enable_irq)(struct pci_dev *dev);
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
struct pci_raw_ops {
@@ -9803,9 +10877,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pci_x86.h linux-2.6.32.49/arch/x
extern bool port_cf9_safe;
/* arch_initcall level */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/percpu.h linux-2.6.32.49/arch/x86/include/asm/percpu.h
---- linux-2.6.32.49/arch/x86/include/asm/percpu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/percpu.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
+index b65a36d..50345a4 100644
+--- a/arch/x86/include/asm/percpu.h
++++ b/arch/x86/include/asm/percpu.h
@@ -78,6 +78,7 @@ do { \
if (0) { \
T__ tmp__; \
@@ -9814,10 +10889,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/percpu.h linux-2.6.32.49/arch/x8
} \
switch (sizeof(var)) { \
case 1: \
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgalloc.h linux-2.6.32.49/arch/x86/include/asm/pgalloc.h
---- linux-2.6.32.49/arch/x86/include/asm/pgalloc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgalloc.h 2011-11-15 19:59:42.000000000 -0500
-@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(s
+diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
+index 271de94..ef944d6 100644
+--- a/arch/x86/include/asm/pgalloc.h
++++ b/arch/x86/include/asm/pgalloc.h
+@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(struct mm_struct *mm,
pmd_t *pmd, pte_t *pte)
{
paravirt_alloc_pte(mm, __pa(pte) >> PAGE_SHIFT);
@@ -9831,10 +10907,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgalloc.h linux-2.6.32.49/arch/x
set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable-2level.h linux-2.6.32.49/arch/x86/include/asm/pgtable-2level.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable-2level.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable-2level.h 2011-11-15 19:59:42.000000000 -0500
-@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t
+diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
+index 2334982..70bc412 100644
+--- a/arch/x86/include/asm/pgtable-2level.h
++++ b/arch/x86/include/asm/pgtable-2level.h
+@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte)
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
@@ -9844,88 +10921,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable-2level.h linux-2.6.32.49
}
static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_32.h linux-2.6.32.49/arch/x86/include/asm/pgtable_32.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable_32.h 2011-11-15 19:59:42.000000000 -0500
-@@ -26,9 +26,6 @@
- struct mm_struct;
- struct vm_area_struct;
-
--extern pgd_t swapper_pg_dir[1024];
--extern pgd_t trampoline_pg_dir[1024];
--
- static inline void pgtable_cache_init(void) { }
- static inline void check_pgt_cache(void) { }
- void paging_init(void);
-@@ -49,6 +46,12 @@ extern void set_pmd_pfn(unsigned long, u
- # include <asm/pgtable-2level.h>
- #endif
-
-+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-+extern pgd_t trampoline_pg_dir[PTRS_PER_PGD];
-+#ifdef CONFIG_X86_PAE
-+extern pmd_t swapper_pm_dir[PTRS_PER_PGD][PTRS_PER_PMD];
-+#endif
-+
- #if defined(CONFIG_HIGHPTE)
- #define __KM_PTE \
- (in_nmi() ? KM_NMI_PTE : \
-@@ -73,7 +76,9 @@ extern void set_pmd_pfn(unsigned long, u
- /* Clear a kernel PTE and flush it from the TLB */
- #define kpte_clear_flush(ptep, vaddr) \
- do { \
-+ pax_open_kernel(); \
- pte_clear(&init_mm, (vaddr), (ptep)); \
-+ pax_close_kernel(); \
- __flush_tlb_one((vaddr)); \
- } while (0)
-
-@@ -85,6 +90,9 @@ do { \
-
- #endif /* !__ASSEMBLY__ */
-
-+#define HAVE_ARCH_UNMAPPED_AREA
-+#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
-+
- /*
- * kern_addr_valid() is (1) for FLATMEM and (0) for
- * SPARSEMEM and DISCONTIGMEM
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_32_types.h linux-2.6.32.49/arch/x86/include/asm/pgtable_32_types.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable_32_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable_32_types.h 2011-11-15 19:59:42.000000000 -0500
-@@ -8,7 +8,7 @@
- */
- #ifdef CONFIG_X86_PAE
- # include <asm/pgtable-3level_types.h>
--# define PMD_SIZE (1UL << PMD_SHIFT)
-+# define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
- # define PMD_MASK (~(PMD_SIZE - 1))
- #else
- # include <asm/pgtable-2level_types.h>
-@@ -46,6 +46,19 @@ extern bool __vmalloc_start_set; /* set
- # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
- #endif
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+#ifndef __ASSEMBLY__
-+extern unsigned char MODULES_EXEC_VADDR[];
-+extern unsigned char MODULES_EXEC_END[];
-+#endif
-+#include <asm/boot.h>
-+#define ktla_ktva(addr) (addr + LOAD_PHYSICAL_ADDR + PAGE_OFFSET)
-+#define ktva_ktla(addr) (addr - LOAD_PHYSICAL_ADDR - PAGE_OFFSET)
-+#else
-+#define ktla_ktva(addr) (addr)
-+#define ktva_ktla(addr) (addr)
-+#endif
-+
- #define MODULES_VADDR VMALLOC_START
- #define MODULES_END VMALLOC_END
- #define MODULES_LEN (MODULES_VADDR - MODULES_END)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable-3level.h linux-2.6.32.49/arch/x86/include/asm/pgtable-3level.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable-3level.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable-3level.h 2011-11-15 19:59:42.000000000 -0500
-@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic
+diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
+index 33927d2..ccde329 100644
+--- a/arch/x86/include/asm/pgtable-3level.h
++++ b/arch/x86/include/asm/pgtable-3level.h
+@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
@@ -9942,66 +10942,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable-3level.h linux-2.6.32.49
}
/*
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_64.h linux-2.6.32.49/arch/x86/include/asm/pgtable_64.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable_64.h 2011-11-15 19:59:42.000000000 -0500
-@@ -16,10 +16,13 @@
-
- extern pud_t level3_kernel_pgt[512];
- extern pud_t level3_ident_pgt[512];
-+extern pud_t level3_vmalloc_pgt[512];
-+extern pud_t level3_vmemmap_pgt[512];
-+extern pud_t level2_vmemmap_pgt[512];
- extern pmd_t level2_kernel_pgt[512];
- extern pmd_t level2_fixmap_pgt[512];
--extern pmd_t level2_ident_pgt[512];
--extern pgd_t init_level4_pgt[];
-+extern pmd_t level2_ident_pgt[512*2];
-+extern pgd_t init_level4_pgt[512];
-
- #define swapper_pg_dir init_level4_pgt
-
-@@ -74,7 +77,9 @@ static inline pte_t native_ptep_get_and_
-
- static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
- {
-+ pax_open_kernel();
- *pmdp = pmd;
-+ pax_close_kernel();
- }
-
- static inline void native_pmd_clear(pmd_t *pmd)
-@@ -94,6 +99,13 @@ static inline void native_pud_clear(pud_
-
- static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
- {
-+ pax_open_kernel();
-+ *pgdp = pgd;
-+ pax_close_kernel();
-+}
-+
-+static inline void native_set_pgd_batched(pgd_t *pgdp, pgd_t pgd)
-+{
- *pgdp = pgd;
- }
-
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_64_types.h linux-2.6.32.49/arch/x86/include/asm/pgtable_64_types.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable_64_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable_64_types.h 2011-11-15 19:59:42.000000000 -0500
-@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
- #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
- #define MODULES_END _AC(0xffffffffff000000, UL)
- #define MODULES_LEN (MODULES_END - MODULES_VADDR)
-+#define MODULES_EXEC_VADDR MODULES_VADDR
-+#define MODULES_EXEC_END MODULES_END
-+
-+#define ktla_ktva(addr) (addr)
-+#define ktva_ktla(addr) (addr)
-
- #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x86/include/asm/pgtable.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
+index af6fd36..867ff74 100644
+--- a/arch/x86/include/asm/pgtable.h
++++ b/arch/x86/include/asm/pgtable.h
@@ -39,6 +39,7 @@ extern struct list_head pgd_list;
#ifndef __PAGETABLE_PUD_FOLDED
@@ -10062,7 +11006,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x
static inline int pte_dirty(pte_t pte)
{
return pte_flags(pte) & _PAGE_DIRTY;
-@@ -167,9 +207,29 @@ static inline pte_t pte_wrprotect(pte_t
+@@ -167,9 +207,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
return pte_clear_flags(pte, _PAGE_RW);
}
@@ -10093,7 +11037,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x
}
static inline pte_t pte_mkdirty(pte_t pte)
-@@ -302,6 +362,15 @@ pte_t *populate_extra_pte(unsigned long
+@@ -302,6 +362,15 @@ pte_t *populate_extra_pte(unsigned long vaddr);
#endif
#ifndef __ASSEMBLY__
@@ -10109,7 +11053,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x
#include <linux/mm_types.h>
static inline int pte_none(pte_t pte)
-@@ -472,7 +541,7 @@ static inline pud_t *pud_offset(pgd_t *p
+@@ -472,7 +541,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
static inline int pgd_bad(pgd_t pgd)
{
@@ -10153,7 +11097,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x
#ifndef __ASSEMBLY__
extern int direct_gbpages;
-@@ -611,11 +699,23 @@ static inline void ptep_set_wrprotect(st
+@@ -611,11 +699,23 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm,
* dst and src can be on the same page, but the range must not overlap,
* and must not cross a page boundary.
*/
@@ -10179,9 +11123,149 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable.h linux-2.6.32.49/arch/x
#include <asm-generic/pgtable.h>
#endif /* __ASSEMBLY__ */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h
---- linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
+index 750f1bf..971e839 100644
+--- a/arch/x86/include/asm/pgtable_32.h
++++ b/arch/x86/include/asm/pgtable_32.h
+@@ -26,9 +26,6 @@
+ struct mm_struct;
+ struct vm_area_struct;
+
+-extern pgd_t swapper_pg_dir[1024];
+-extern pgd_t trampoline_pg_dir[1024];
+-
+ static inline void pgtable_cache_init(void) { }
+ static inline void check_pgt_cache(void) { }
+ void paging_init(void);
+@@ -49,6 +46,12 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
+ # include <asm/pgtable-2level.h>
+ #endif
+
++extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
++extern pgd_t trampoline_pg_dir[PTRS_PER_PGD];
++#ifdef CONFIG_X86_PAE
++extern pmd_t swapper_pm_dir[PTRS_PER_PGD][PTRS_PER_PMD];
++#endif
++
+ #if defined(CONFIG_HIGHPTE)
+ #define __KM_PTE \
+ (in_nmi() ? KM_NMI_PTE : \
+@@ -73,7 +76,9 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
+ /* Clear a kernel PTE and flush it from the TLB */
+ #define kpte_clear_flush(ptep, vaddr) \
+ do { \
++ pax_open_kernel(); \
+ pte_clear(&init_mm, (vaddr), (ptep)); \
++ pax_close_kernel(); \
+ __flush_tlb_one((vaddr)); \
+ } while (0)
+
+@@ -85,6 +90,9 @@ do { \
+
+ #endif /* !__ASSEMBLY__ */
+
++#define HAVE_ARCH_UNMAPPED_AREA
++#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
++
+ /*
+ * kern_addr_valid() is (1) for FLATMEM and (0) for
+ * SPARSEMEM and DISCONTIGMEM
+diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
+index 5e67c15..12d5c47 100644
+--- a/arch/x86/include/asm/pgtable_32_types.h
++++ b/arch/x86/include/asm/pgtable_32_types.h
+@@ -8,7 +8,7 @@
+ */
+ #ifdef CONFIG_X86_PAE
+ # include <asm/pgtable-3level_types.h>
+-# define PMD_SIZE (1UL << PMD_SHIFT)
++# define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
+ # define PMD_MASK (~(PMD_SIZE - 1))
+ #else
+ # include <asm/pgtable-2level_types.h>
+@@ -46,6 +46,19 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
+ # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
+ #endif
+
++#ifdef CONFIG_PAX_KERNEXEC
++#ifndef __ASSEMBLY__
++extern unsigned char MODULES_EXEC_VADDR[];
++extern unsigned char MODULES_EXEC_END[];
++#endif
++#include <asm/boot.h>
++#define ktla_ktva(addr) (addr + LOAD_PHYSICAL_ADDR + PAGE_OFFSET)
++#define ktva_ktla(addr) (addr - LOAD_PHYSICAL_ADDR - PAGE_OFFSET)
++#else
++#define ktla_ktva(addr) (addr)
++#define ktva_ktla(addr) (addr)
++#endif
++
+ #define MODULES_VADDR VMALLOC_START
+ #define MODULES_END VMALLOC_END
+ #define MODULES_LEN (MODULES_VADDR - MODULES_END)
+diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
+index c57a301..312bdb4 100644
+--- a/arch/x86/include/asm/pgtable_64.h
++++ b/arch/x86/include/asm/pgtable_64.h
+@@ -16,10 +16,13 @@
+
+ extern pud_t level3_kernel_pgt[512];
+ extern pud_t level3_ident_pgt[512];
++extern pud_t level3_vmalloc_pgt[512];
++extern pud_t level3_vmemmap_pgt[512];
++extern pud_t level2_vmemmap_pgt[512];
+ extern pmd_t level2_kernel_pgt[512];
+ extern pmd_t level2_fixmap_pgt[512];
+-extern pmd_t level2_ident_pgt[512];
+-extern pgd_t init_level4_pgt[];
++extern pmd_t level2_ident_pgt[512*2];
++extern pgd_t init_level4_pgt[512];
+
+ #define swapper_pg_dir init_level4_pgt
+
+@@ -74,7 +77,9 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
+
+ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
+ {
++ pax_open_kernel();
+ *pmdp = pmd;
++ pax_close_kernel();
+ }
+
+ static inline void native_pmd_clear(pmd_t *pmd)
+@@ -94,6 +99,13 @@ static inline void native_pud_clear(pud_t *pud)
+
+ static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
+ {
++ pax_open_kernel();
++ *pgdp = pgd;
++ pax_close_kernel();
++}
++
++static inline void native_set_pgd_batched(pgd_t *pgdp, pgd_t pgd)
++{
+ *pgdp = pgd;
+ }
+
+diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
+index 766ea16..5b96cb3 100644
+--- a/arch/x86/include/asm/pgtable_64_types.h
++++ b/arch/x86/include/asm/pgtable_64_types.h
+@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
+ #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
+ #define MODULES_END _AC(0xffffffffff000000, UL)
+ #define MODULES_LEN (MODULES_END - MODULES_VADDR)
++#define MODULES_EXEC_VADDR MODULES_VADDR
++#define MODULES_EXEC_END MODULES_END
++
++#define ktla_ktva(addr) (addr)
++#define ktva_ktla(addr) (addr)
+
+ #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
+diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
+index d1f4a76..2f46ba1 100644
+--- a/arch/x86/include/asm/pgtable_types.h
++++ b/arch/x86/include/asm/pgtable_types.h
@@ -16,12 +16,11 @@
#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
#define _PAGE_BIT_PAT 7 /* on 4KB pages */
@@ -10249,7 +11333,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h linux-2.6.32.49/
#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
#endif
-@@ -202,7 +205,17 @@ static inline pgdval_t pgd_flags(pgd_t p
+@@ -202,7 +205,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
{
return native_pgd_val(pgd) & PTE_FLAGS_MASK;
}
@@ -10267,7 +11351,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h linux-2.6.32.49/
#if PAGETABLE_LEVELS > 3
typedef struct { pudval_t pud; } pud_t;
-@@ -216,8 +229,6 @@ static inline pudval_t native_pud_val(pu
+@@ -216,8 +229,6 @@ static inline pudval_t native_pud_val(pud_t pud)
return pud.pud;
}
#else
@@ -10276,7 +11360,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h linux-2.6.32.49/
static inline pudval_t native_pud_val(pud_t pud)
{
return native_pgd_val(pud.pgd);
-@@ -237,8 +248,6 @@ static inline pmdval_t native_pmd_val(pm
+@@ -237,8 +248,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
return pmd.pmd;
}
#else
@@ -10302,9 +11386,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/pgtable_types.h linux-2.6.32.49/
#define pgprot_writecombine pgprot_writecombine
extern pgprot_t pgprot_writecombine(pgprot_t prot);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch/x86/include/asm/processor.h
---- linux-2.6.32.49/arch/x86/include/asm/processor.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/processor.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
+index fa04dea..5f823fc 100644
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
@@ -272,7 +272,7 @@ struct tss_struct {
} ____cacheline_aligned;
@@ -10314,7 +11399,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
/*
* Save the original ist values for checking stack pointers during debugging
-@@ -911,11 +911,18 @@ static inline void spin_lock_prefetch(co
+@@ -911,11 +911,18 @@ static inline void spin_lock_prefetch(const void *x)
*/
#define TASK_SIZE PAGE_OFFSET
#define TASK_SIZE_MAX TASK_SIZE
@@ -10335,7 +11420,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
.vm86_info = NULL, \
.sysenter_cs = __KERNEL_CS, \
.io_bitmap_ptr = NULL, \
-@@ -929,7 +936,7 @@ static inline void spin_lock_prefetch(co
+@@ -929,7 +936,7 @@ static inline void spin_lock_prefetch(const void *x)
*/
#define INIT_TSS { \
.x86_tss = { \
@@ -10344,7 +11429,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
.ss0 = __KERNEL_DS, \
.ss1 = __KERNEL_CS, \
.io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
-@@ -940,11 +947,7 @@ static inline void spin_lock_prefetch(co
+@@ -940,11 +947,7 @@ static inline void spin_lock_prefetch(const void *x)
extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
@@ -10357,7 +11442,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
/*
* The below -8 is to reserve 8 bytes on top of the ring0 stack.
-@@ -959,7 +962,7 @@ extern unsigned long thread_saved_pc(str
+@@ -959,7 +962,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define task_pt_regs(task) \
({ \
struct pt_regs *__regs__; \
@@ -10366,7 +11451,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
__regs__ - 1; \
})
-@@ -969,13 +972,13 @@ extern unsigned long thread_saved_pc(str
+@@ -969,13 +972,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
/*
* User space process size. 47bits minus one guard page.
*/
@@ -10382,7 +11467,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
#define TASK_SIZE (test_thread_flag(TIF_IA32) ? \
IA32_PAGE_OFFSET : TASK_SIZE_MAX)
-@@ -986,11 +989,11 @@ extern unsigned long thread_saved_pc(str
+@@ -986,11 +989,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define STACK_TOP_MAX TASK_SIZE_MAX
#define INIT_THREAD { \
@@ -10396,7 +11481,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
}
/*
-@@ -1012,6 +1015,10 @@ extern void start_thread(struct pt_regs
+@@ -1012,6 +1015,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
*/
#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
@@ -10407,10 +11492,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/processor.h linux-2.6.32.49/arch
#define KSTK_EIP(task) (task_pt_regs(task)->ip)
/* Get/set a process' ability to use the timestamp counter instruction */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/ptrace.h linux-2.6.32.49/arch/x86/include/asm/ptrace.h
---- linux-2.6.32.49/arch/x86/include/asm/ptrace.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/ptrace.h 2011-11-15 19:59:42.000000000 -0500
-@@ -151,28 +151,29 @@ static inline unsigned long regs_return_
+diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
+index 0f0d908..f2e3da2 100644
+--- a/arch/x86/include/asm/ptrace.h
++++ b/arch/x86/include/asm/ptrace.h
+@@ -151,28 +151,29 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
}
/*
@@ -10446,9 +11532,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/ptrace.h linux-2.6.32.49/arch/x8
#endif
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/reboot.h linux-2.6.32.49/arch/x86/include/asm/reboot.h
---- linux-2.6.32.49/arch/x86/include/asm/reboot.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/reboot.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
+index 562d4fd..6e39df1 100644
+--- a/arch/x86/include/asm/reboot.h
++++ b/arch/x86/include/asm/reboot.h
@@ -6,19 +6,19 @@
struct pt_regs;
@@ -10475,10 +11562,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/reboot.h linux-2.6.32.49/arch/x8
typedef void (*nmi_shootdown_cb)(int, struct die_args*);
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86/include/asm/rwsem.h
---- linux-2.6.32.49/arch/x86/include/asm/rwsem.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/rwsem.h 2011-11-15 19:59:42.000000000 -0500
-@@ -118,6 +118,14 @@ static inline void __down_read(struct rw
+diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
+index 606ede1..dbfff37 100644
+--- a/arch/x86/include/asm/rwsem.h
++++ b/arch/x86/include/asm/rwsem.h
+@@ -118,6 +118,14 @@ static inline void __down_read(struct rw_semaphore *sem)
{
asm volatile("# beginning down_read\n\t"
LOCK_PREFIX _ASM_INC "(%1)\n\t"
@@ -10493,7 +11581,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
/* adds 0x00000001, returns the old value */
" jns 1f\n"
" call call_rwsem_down_read_failed\n"
-@@ -139,6 +147,14 @@ static inline int __down_read_trylock(st
+@@ -139,6 +147,14 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
"1:\n\t"
" mov %1,%2\n\t"
" add %3,%2\n\t"
@@ -10508,7 +11596,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
" jle 2f\n\t"
LOCK_PREFIX " cmpxchg %2,%0\n\t"
" jnz 1b\n\t"
-@@ -160,6 +176,14 @@ static inline void __down_write_nested(s
+@@ -160,6 +176,14 @@ static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
tmp = RWSEM_ACTIVE_WRITE_BIAS;
asm volatile("# beginning down_write\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -10523,7 +11611,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
/* subtract 0x0000ffff, returns the old value */
" test %1,%1\n\t"
/* was the count 0 before? */
-@@ -198,6 +222,14 @@ static inline void __up_read(struct rw_s
+@@ -198,6 +222,14 @@ static inline void __up_read(struct rw_semaphore *sem)
rwsem_count_t tmp = -RWSEM_ACTIVE_READ_BIAS;
asm volatile("# beginning __up_read\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -10538,7 +11626,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
/* subtracts 1, returns the old value */
" jns 1f\n\t"
" call call_rwsem_wake\n"
-@@ -216,6 +248,14 @@ static inline void __up_write(struct rw_
+@@ -216,6 +248,14 @@ static inline void __up_write(struct rw_semaphore *sem)
rwsem_count_t tmp;
asm volatile("# beginning __up_write\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -10553,7 +11641,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
/* tries to transition
0xffff0001 -> 0x00000000 */
" jz 1f\n"
-@@ -234,6 +274,14 @@ static inline void __downgrade_write(str
+@@ -234,6 +274,14 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
{
asm volatile("# beginning __downgrade_write\n\t"
LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
@@ -10568,7 +11656,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
/*
* transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
* 0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
-@@ -253,7 +301,15 @@ static inline void __downgrade_write(str
+@@ -253,7 +301,15 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
static inline void rwsem_atomic_add(rwsem_count_t delta,
struct rw_semaphore *sem)
{
@@ -10585,7 +11673,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
: "+m" (sem->count)
: "er" (delta));
}
-@@ -266,7 +322,15 @@ static inline rwsem_count_t rwsem_atomic
+@@ -266,7 +322,15 @@ static inline rwsem_count_t rwsem_atomic_update(rwsem_count_t delta,
{
rwsem_count_t tmp = delta;
@@ -10602,9 +11690,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/rwsem.h linux-2.6.32.49/arch/x86
: "+r" (tmp), "+m" (sem->count)
: : "memory");
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/segment.h linux-2.6.32.49/arch/x86/include/asm/segment.h
---- linux-2.6.32.49/arch/x86/include/asm/segment.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/segment.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
+index 14e0ed8..7f7dd5e 100644
+--- a/arch/x86/include/asm/segment.h
++++ b/arch/x86/include/asm/segment.h
@@ -62,10 +62,15 @@
* 26 - ESPFIX small SS
* 27 - per-cpu [ offset to per-cpu data area ]
@@ -10680,9 +11769,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/segment.h linux-2.6.32.49/arch/x
#define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
#define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS* 8 + 3)
#define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS* 8 + 3)
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/smp.h linux-2.6.32.49/arch/x86/include/asm/smp.h
---- linux-2.6.32.49/arch/x86/include/asm/smp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/smp.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
+index 4c2f63c..5685db2 100644
+--- a/arch/x86/include/asm/smp.h
++++ b/arch/x86/include/asm/smp.h
@@ -24,7 +24,7 @@ extern unsigned int num_processors;
DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map);
DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
@@ -10692,7 +11782,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/smp.h linux-2.6.32.49/arch/x86/i
static inline struct cpumask *cpu_sibling_mask(int cpu)
{
-@@ -40,10 +40,7 @@ DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_ap
+@@ -40,10 +40,7 @@ DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
/* Static state in head.S used to set up a CPU */
@@ -10713,7 +11803,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/smp.h linux-2.6.32.49/arch/x86/i
/* Globals due to paravirt */
extern void set_cpu_sibling_map(int cpu);
-@@ -175,14 +172,8 @@ extern unsigned disabled_cpus __cpuinitd
+@@ -175,14 +172,8 @@ extern unsigned disabled_cpus __cpuinitdata;
extern int safe_smp_processor_id(void);
#elif defined(CONFIG_X86_64_SMP)
@@ -10730,10 +11820,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/smp.h linux-2.6.32.49/arch/x86/i
#define safe_smp_processor_id() smp_processor_id()
#endif
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/spinlock.h linux-2.6.32.49/arch/x86/include/asm/spinlock.h
---- linux-2.6.32.49/arch/x86/include/asm/spinlock.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/spinlock.h 2011-11-15 19:59:42.000000000 -0500
-@@ -249,6 +249,14 @@ static inline int __raw_write_can_lock(r
+diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
+index 4e77853..4359783 100644
+--- a/arch/x86/include/asm/spinlock.h
++++ b/arch/x86/include/asm/spinlock.h
+@@ -249,6 +249,14 @@ static inline int __raw_write_can_lock(raw_rwlock_t *lock)
static inline void __raw_read_lock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t"
@@ -10748,7 +11839,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/spinlock.h linux-2.6.32.49/arch/
"jns 1f\n"
"call __read_lock_failed\n\t"
"1:\n"
-@@ -258,6 +266,14 @@ static inline void __raw_read_lock(raw_r
+@@ -258,6 +266,14 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
static inline void __raw_write_lock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t"
@@ -10763,7 +11854,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/spinlock.h linux-2.6.32.49/arch/
"jz 1f\n"
"call __write_lock_failed\n\t"
"1:\n"
-@@ -286,12 +302,29 @@ static inline int __raw_write_trylock(ra
+@@ -286,12 +302,29 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)
static inline void __raw_read_unlock(raw_rwlock_t *rw)
{
@@ -10795,9 +11886,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/spinlock.h linux-2.6.32.49/arch/
: "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/stackprotector.h linux-2.6.32.49/arch/x86/include/asm/stackprotector.h
---- linux-2.6.32.49/arch/x86/include/asm/stackprotector.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/stackprotector.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
+index 1575177..cb23f52 100644
+--- a/arch/x86/include/asm/stackprotector.h
++++ b/arch/x86/include/asm/stackprotector.h
@@ -48,7 +48,7 @@
* head_32 for boot CPU and setup_per_cpu_areas() for others.
*/
@@ -10807,7 +11899,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/stackprotector.h linux-2.6.32.49
/*
* Initialize the stackprotector canary value.
-@@ -113,7 +113,7 @@ static inline void setup_stack_canary_se
+@@ -113,7 +113,7 @@ static inline void setup_stack_canary_segment(int cpu)
static inline void load_stack_canary_segment(void)
{
@@ -10816,9 +11908,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/stackprotector.h linux-2.6.32.49
asm volatile ("mov %0, %%gs" : : "r" (0));
#endif
}
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/system.h linux-2.6.32.49/arch/x86/include/asm/system.h
---- linux-2.6.32.49/arch/x86/include/asm/system.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/system.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
+index e0fbf29..858ef4a 100644
+--- a/arch/x86/include/asm/system.h
++++ b/arch/x86/include/asm/system.h
@@ -132,7 +132,7 @@ do { \
"thread_return:\n\t" \
"movq "__percpu_arg([current_task])",%%rsi\n\t" \
@@ -10837,7 +11930,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/system.h linux-2.6.32.49/arch/x8
[current_task] "m" (per_cpu_var(current_task)) \
__switch_canary_iparam \
: "memory", "cc" __EXTRA_CLOBBER)
-@@ -200,7 +200,7 @@ static inline unsigned long get_limit(un
+@@ -200,7 +200,7 @@ static inline unsigned long get_limit(unsigned long segment)
{
unsigned long __limit;
asm("lsll %1,%0" : "=r" (__limit) : "r" (segment));
@@ -10861,9 +11954,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/system.h linux-2.6.32.49/arch/x8
/*
* Force strict CPU ordering.
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/thread_info.h linux-2.6.32.49/arch/x86/include/asm/thread_info.h
---- linux-2.6.32.49/arch/x86/include/asm/thread_info.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/thread_info.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
+index 19c3ce4..8962535 100644
+--- a/arch/x86/include/asm/thread_info.h
++++ b/arch/x86/include/asm/thread_info.h
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <asm/page.h>
@@ -10970,7 +12064,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/thread_info.h linux-2.6.32.49/ar
/*
* macros/functions for gaining access to the thread information structure
* preempt_count needs to be 1 initially, until the scheduler is functional.
-@@ -209,21 +198,8 @@ static inline struct thread_info *curren
+@@ -209,21 +198,8 @@ static inline struct thread_info *current_thread_info(void)
#ifndef __ASSEMBLY__
DECLARE_PER_CPU(unsigned long, kernel_stack);
@@ -11011,10 +12105,242 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/thread_info.h linux-2.6.32.49/ar
+
#endif
#endif /* _ASM_X86_THREAD_INFO_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h
---- linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h 2011-11-15 19:59:42.000000000 -0500
-@@ -44,6 +44,11 @@ unsigned long __must_check __copy_from_u
+diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
+index 61c5874..8a046e9 100644
+--- a/arch/x86/include/asm/uaccess.h
++++ b/arch/x86/include/asm/uaccess.h
+@@ -8,12 +8,15 @@
+ #include <linux/thread_info.h>
+ #include <linux/prefetch.h>
+ #include <linux/string.h>
++#include <linux/sched.h>
+ #include <asm/asm.h>
+ #include <asm/page.h>
+
+ #define VERIFY_READ 0
+ #define VERIFY_WRITE 1
+
++extern void check_object_size(const void *ptr, unsigned long n, bool to);
++
+ /*
+ * The fs value determines whether argument validity checking should be
+ * performed or not. If get_fs() == USER_DS, checking is performed, with
+@@ -29,7 +32,12 @@
+
+ #define get_ds() (KERNEL_DS)
+ #define get_fs() (current_thread_info()->addr_limit)
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
++void __set_fs(mm_segment_t x);
++void set_fs(mm_segment_t x);
++#else
+ #define set_fs(x) (current_thread_info()->addr_limit = (x))
++#endif
+
+ #define segment_eq(a, b) ((a).seg == (b).seg)
+
+@@ -77,7 +85,33 @@
+ * checks that the pointer is in the user space range - after calling
+ * this function, memory access functions may still return -EFAULT.
+ */
+-#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
++#define __access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
++#define access_ok(type, addr, size) \
++({ \
++ long __size = size; \
++ unsigned long __addr = (unsigned long)addr; \
++ unsigned long __addr_ao = __addr & PAGE_MASK; \
++ unsigned long __end_ao = __addr + __size - 1; \
++ bool __ret_ao = __range_not_ok(__addr, __size) == 0; \
++ if (__ret_ao && unlikely((__end_ao ^ __addr_ao) & PAGE_MASK)) { \
++ while(__addr_ao <= __end_ao) { \
++ char __c_ao; \
++ __addr_ao += PAGE_SIZE; \
++ if (__size > PAGE_SIZE) \
++ cond_resched(); \
++ if (__get_user(__c_ao, (char __user *)__addr)) \
++ break; \
++ if (type != VERIFY_WRITE) { \
++ __addr = __addr_ao; \
++ continue; \
++ } \
++ if (__put_user(__c_ao, (char __user *)__addr)) \
++ break; \
++ __addr = __addr_ao; \
++ } \
++ } \
++ __ret_ao; \
++})
+
+ /*
+ * The exception table consists of pairs of addresses: the first is the
+@@ -183,12 +217,20 @@ extern int __get_user_bad(void);
+ asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
+ : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
+
+-
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __copyuser_seg "gs;"
++#define __COPYUSER_SET_ES "pushl %%gs; popl %%es\n"
++#define __COPYUSER_RESTORE_ES "pushl %%ss; popl %%es\n"
++#else
++#define __copyuser_seg
++#define __COPYUSER_SET_ES
++#define __COPYUSER_RESTORE_ES
++#endif
+
+ #ifdef CONFIG_X86_32
+ #define __put_user_asm_u64(x, addr, err, errret) \
+- asm volatile("1: movl %%eax,0(%2)\n" \
+- "2: movl %%edx,4(%2)\n" \
++ asm volatile("1: "__copyuser_seg"movl %%eax,0(%2)\n" \
++ "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
+ "3:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "4: movl %3,%0\n" \
+@@ -200,8 +242,8 @@ extern int __get_user_bad(void);
+ : "A" (x), "r" (addr), "i" (errret), "0" (err))
+
+ #define __put_user_asm_ex_u64(x, addr) \
+- asm volatile("1: movl %%eax,0(%1)\n" \
+- "2: movl %%edx,4(%1)\n" \
++ asm volatile("1: "__copyuser_seg"movl %%eax,0(%1)\n" \
++ "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
+ "3:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ _ASM_EXTABLE(2b, 3b - 2b) \
+@@ -253,7 +295,7 @@ extern void __put_user_8(void);
+ __typeof__(*(ptr)) __pu_val; \
+ __chk_user_ptr(ptr); \
+ might_fault(); \
+- __pu_val = x; \
++ __pu_val = (x); \
+ switch (sizeof(*(ptr))) { \
+ case 1: \
+ __put_user_x(1, __pu_val, ptr, __ret_pu); \
+@@ -374,7 +416,7 @@ do { \
+ } while (0)
+
+ #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
+ "2:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov %3,%0\n" \
+@@ -382,7 +424,7 @@ do { \
+ " jmp 2b\n" \
+ ".previous\n" \
+ _ASM_EXTABLE(1b, 3b) \
+- : "=r" (err), ltype(x) \
++ : "=r" (err), ltype (x) \
+ : "m" (__m(addr)), "i" (errret), "0" (err))
+
+ #define __get_user_size_ex(x, ptr, size) \
+@@ -407,7 +449,7 @@ do { \
+ } while (0)
+
+ #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
+- asm volatile("1: mov"itype" %1,%"rtype"0\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %1,%"rtype"0\n"\
+ "2:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ : ltype(x) : "m" (__m(addr)))
+@@ -424,13 +466,24 @@ do { \
+ int __gu_err; \
+ unsigned long __gu_val; \
+ __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
+- (x) = (__force __typeof__(*(ptr)))__gu_val; \
++ (x) = (__typeof__(*(ptr)))__gu_val; \
+ __gu_err; \
+ })
+
+ /* FIXME: this hack is definitely wrong -AK */
+ struct __large_struct { unsigned long buf[100]; };
+-#define __m(x) (*(struct __large_struct __user *)(x))
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define ____m(x) \
++({ \
++ unsigned long ____x = (unsigned long)(x); \
++ if (____x < PAX_USER_SHADOW_BASE) \
++ ____x += PAX_USER_SHADOW_BASE; \
++ (void __user *)____x; \
++})
++#else
++#define ____m(x) (x)
++#endif
++#define __m(x) (*(struct __large_struct __user *)____m(x))
+
+ /*
+ * Tell gcc we read from memory instead of writing: this is because
+@@ -438,7 +491,7 @@ struct __large_struct { unsigned long buf[100]; };
+ * aliasing issues.
+ */
+ #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+- asm volatile("1: mov"itype" %"rtype"1,%2\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
+ "2:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov %3,%0\n" \
+@@ -446,10 +499,10 @@ struct __large_struct { unsigned long buf[100]; };
+ ".previous\n" \
+ _ASM_EXTABLE(1b, 3b) \
+ : "=r"(err) \
+- : ltype(x), "m" (__m(addr)), "i" (errret), "0" (err))
++ : ltype (x), "m" (__m(addr)), "i" (errret), "0" (err))
+
+ #define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
+- asm volatile("1: mov"itype" %"rtype"0,%1\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"0,%1\n"\
+ "2:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ : : ltype(x), "m" (__m(addr)))
+@@ -488,8 +541,12 @@ struct __large_struct { unsigned long buf[100]; };
+ * On error, the variable @x is set to zero.
+ */
+
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __get_user(x, ptr) get_user((x), (ptr))
++#else
+ #define __get_user(x, ptr) \
+ __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
++#endif
+
+ /**
+ * __put_user: - Write a simple value into user space, with less checking.
+@@ -511,8 +568,12 @@ struct __large_struct { unsigned long buf[100]; };
+ * Returns zero on success, or -EFAULT on error.
+ */
+
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __put_user(x, ptr) put_user((x), (ptr))
++#else
+ #define __put_user(x, ptr) \
+ __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
++#endif
+
+ #define __get_user_unaligned __get_user
+ #define __put_user_unaligned __put_user
+@@ -530,7 +591,7 @@ struct __large_struct { unsigned long buf[100]; };
+ #define get_user_ex(x, ptr) do { \
+ unsigned long __gue_val; \
+ __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
+- (x) = (__force __typeof__(*(ptr)))__gue_val; \
++ (x) = (__typeof__(*(ptr)))__gue_val; \
+ } while (0)
+
+ #ifdef CONFIG_X86_WP_WORKS_OK
+@@ -567,6 +628,7 @@ extern struct movsl_mask {
+
+ #define ARCH_HAS_NOCACHE_UACCESS 1
+
++#define ARCH_HAS_SORT_EXTABLE
+ #ifdef CONFIG_X86_32
+ # include "uaccess_32.h"
+ #else
+diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
+index 632fb44..e30e334 100644
+--- a/arch/x86/include/asm/uaccess_32.h
++++ b/arch/x86/include/asm/uaccess_32.h
+@@ -44,6 +44,11 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero
static __always_inline unsigned long __must_check
__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
{
@@ -11026,7 +12352,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arc
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -62,6 +67,8 @@ __copy_to_user_inatomic(void __user *to,
+@@ -62,6 +67,8 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
return ret;
}
}
@@ -11035,7 +12361,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arc
return __copy_to_user_ll(to, from, n);
}
-@@ -83,12 +90,16 @@ static __always_inline unsigned long __m
+@@ -83,12 +90,16 @@ static __always_inline unsigned long __must_check
__copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_fault();
@@ -11065,7 +12391,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arc
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -153,6 +170,8 @@ __copy_from_user(void *to, const void __
+@@ -153,6 +170,8 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
return ret;
}
}
@@ -11074,7 +12400,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arc
return __copy_from_user_ll(to, from, n);
}
-@@ -160,6 +179,10 @@ static __always_inline unsigned long __c
+@@ -160,6 +179,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
const void __user *from, unsigned long n)
{
might_fault();
@@ -11154,9 +12480,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_32.h linux-2.6.32.49/arc
long __must_check strncpy_from_user(char *dst, const char __user *src,
long count);
long __must_check __strncpy_from_user(char *dst,
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h
---- linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
+index db24b21..72a9dfc 100644
+--- a/arch/x86/include/asm/uaccess_64.h
++++ b/arch/x86/include/asm/uaccess_64.h
@@ -9,6 +9,9 @@
#include <linux/prefetch.h>
#include <linux/lockdep.h>
@@ -11336,12 +12663,14 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
+#endif
+
+ return copy_user_generic((__force_kernel void *)dst, src, size);
-+ }
-+}
-+
-+static __always_inline __must_check
+ }
+ }
+
+ static __always_inline __must_check
+-int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
+unsigned long copy_to_user(void __user *to, const void *from, unsigned len)
-+{
+ {
+- int ret = 0;
+ if (access_ok(VERIFY_WRITE, to, len))
+ len = __copy_to_user(to, from, len);
+ return len;
@@ -11359,15 +12688,13 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
+ if (!__builtin_constant_p(len))
+ check_object_size(to, len, false);
+ memset(to, 0, len);
- }
++ }
+ return len;
- }
-
- static __always_inline __must_check
--int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
++}
++
++static __always_inline __must_check
+unsigned long __copy_in_user(void __user *dst, const void __user *src, unsigned size)
- {
-- int ret = 0;
++{
+ unsigned ret = 0;
might_fault();
@@ -11407,7 +12734,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
ret, "b", "b", "=q", 1);
if (likely(!ret))
__put_user_asm(tmp, (u8 __user *)dst,
-@@ -134,7 +227,7 @@ int __copy_in_user(void __user *dst, con
+@@ -134,7 +227,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
}
case 2: {
u16 tmp;
@@ -11416,7 +12743,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
ret, "w", "w", "=r", 2);
if (likely(!ret))
__put_user_asm(tmp, (u16 __user *)dst,
-@@ -144,7 +237,7 @@ int __copy_in_user(void __user *dst, con
+@@ -144,7 +237,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
case 4: {
u32 tmp;
@@ -11425,7 +12752,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
ret, "l", "k", "=r", 4);
if (likely(!ret))
__put_user_asm(tmp, (u32 __user *)dst,
-@@ -153,7 +246,7 @@ int __copy_in_user(void __user *dst, con
+@@ -153,7 +246,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
}
case 8: {
u64 tmp;
@@ -11434,7 +12761,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
ret, "q", "", "=r", 8);
if (likely(!ret))
__put_user_asm(tmp, (u64 __user *)dst,
-@@ -161,8 +254,16 @@ int __copy_in_user(void __user *dst, con
+@@ -161,8 +254,16 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
return ret;
}
default:
@@ -11453,7 +12780,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
}
}
-@@ -176,33 +277,75 @@ __must_check long strlen_user(const char
+@@ -176,33 +277,75 @@ __must_check long strlen_user(const char __user *str);
__must_check unsigned long clear_user(void __user *mem, unsigned long len);
__must_check unsigned long __clear_user(void __user *mem, unsigned long len);
@@ -11470,12 +12797,12 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
+#ifdef CONFIG_PAX_MEMORY_UDEREF
+ if (!__access_ok(VERIFY_READ, src, size))
+ return size;
-+
+
+-static __must_check __always_inline int
+ if ((unsigned long)src < PAX_USER_SHADOW_BASE)
+ src += PAX_USER_SHADOW_BASE;
+#endif
-
--static __must_check __always_inline int
++
+ return copy_user_generic(dst, (__force_kernel const void *)src, size);
+}
+
@@ -11540,239 +12867,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess_64.h linux-2.6.32.49/arc
+copy_user_handle_tail(char __user *to, char __user *from, unsigned len, unsigned zerorest);
#endif /* _ASM_X86_UACCESS_64_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/uaccess.h linux-2.6.32.49/arch/x86/include/asm/uaccess.h
---- linux-2.6.32.49/arch/x86/include/asm/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/uaccess.h 2011-11-15 19:59:42.000000000 -0500
-@@ -8,12 +8,15 @@
- #include <linux/thread_info.h>
- #include <linux/prefetch.h>
- #include <linux/string.h>
-+#include <linux/sched.h>
- #include <asm/asm.h>
- #include <asm/page.h>
-
- #define VERIFY_READ 0
- #define VERIFY_WRITE 1
-
-+extern void check_object_size(const void *ptr, unsigned long n, bool to);
-+
- /*
- * The fs value determines whether argument validity checking should be
- * performed or not. If get_fs() == USER_DS, checking is performed, with
-@@ -29,7 +32,12 @@
-
- #define get_ds() (KERNEL_DS)
- #define get_fs() (current_thread_info()->addr_limit)
-+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+void __set_fs(mm_segment_t x);
-+void set_fs(mm_segment_t x);
-+#else
- #define set_fs(x) (current_thread_info()->addr_limit = (x))
-+#endif
-
- #define segment_eq(a, b) ((a).seg == (b).seg)
-
-@@ -77,7 +85,33 @@
- * checks that the pointer is in the user space range - after calling
- * this function, memory access functions may still return -EFAULT.
- */
--#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
-+#define __access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
-+#define access_ok(type, addr, size) \
-+({ \
-+ long __size = size; \
-+ unsigned long __addr = (unsigned long)addr; \
-+ unsigned long __addr_ao = __addr & PAGE_MASK; \
-+ unsigned long __end_ao = __addr + __size - 1; \
-+ bool __ret_ao = __range_not_ok(__addr, __size) == 0; \
-+ if (__ret_ao && unlikely((__end_ao ^ __addr_ao) & PAGE_MASK)) { \
-+ while(__addr_ao <= __end_ao) { \
-+ char __c_ao; \
-+ __addr_ao += PAGE_SIZE; \
-+ if (__size > PAGE_SIZE) \
-+ cond_resched(); \
-+ if (__get_user(__c_ao, (char __user *)__addr)) \
-+ break; \
-+ if (type != VERIFY_WRITE) { \
-+ __addr = __addr_ao; \
-+ continue; \
-+ } \
-+ if (__put_user(__c_ao, (char __user *)__addr)) \
-+ break; \
-+ __addr = __addr_ao; \
-+ } \
-+ } \
-+ __ret_ao; \
-+})
-
- /*
- * The exception table consists of pairs of addresses: the first is the
-@@ -183,12 +217,20 @@ extern int __get_user_bad(void);
- asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
- : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
-
--
-+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __copyuser_seg "gs;"
-+#define __COPYUSER_SET_ES "pushl %%gs; popl %%es\n"
-+#define __COPYUSER_RESTORE_ES "pushl %%ss; popl %%es\n"
-+#else
-+#define __copyuser_seg
-+#define __COPYUSER_SET_ES
-+#define __COPYUSER_RESTORE_ES
-+#endif
-
- #ifdef CONFIG_X86_32
- #define __put_user_asm_u64(x, addr, err, errret) \
-- asm volatile("1: movl %%eax,0(%2)\n" \
-- "2: movl %%edx,4(%2)\n" \
-+ asm volatile("1: "__copyuser_seg"movl %%eax,0(%2)\n" \
-+ "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
- "3:\n" \
- ".section .fixup,\"ax\"\n" \
- "4: movl %3,%0\n" \
-@@ -200,8 +242,8 @@ extern int __get_user_bad(void);
- : "A" (x), "r" (addr), "i" (errret), "0" (err))
-
- #define __put_user_asm_ex_u64(x, addr) \
-- asm volatile("1: movl %%eax,0(%1)\n" \
-- "2: movl %%edx,4(%1)\n" \
-+ asm volatile("1: "__copyuser_seg"movl %%eax,0(%1)\n" \
-+ "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
- "3:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- _ASM_EXTABLE(2b, 3b - 2b) \
-@@ -253,7 +295,7 @@ extern void __put_user_8(void);
- __typeof__(*(ptr)) __pu_val; \
- __chk_user_ptr(ptr); \
- might_fault(); \
-- __pu_val = x; \
-+ __pu_val = (x); \
- switch (sizeof(*(ptr))) { \
- case 1: \
- __put_user_x(1, __pu_val, ptr, __ret_pu); \
-@@ -374,7 +416,7 @@ do { \
- } while (0)
-
- #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
-- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
- "2:\n" \
- ".section .fixup,\"ax\"\n" \
- "3: mov %3,%0\n" \
-@@ -382,7 +424,7 @@ do { \
- " jmp 2b\n" \
- ".previous\n" \
- _ASM_EXTABLE(1b, 3b) \
-- : "=r" (err), ltype(x) \
-+ : "=r" (err), ltype (x) \
- : "m" (__m(addr)), "i" (errret), "0" (err))
-
- #define __get_user_size_ex(x, ptr, size) \
-@@ -407,7 +449,7 @@ do { \
- } while (0)
-
- #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
-- asm volatile("1: mov"itype" %1,%"rtype"0\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %1,%"rtype"0\n"\
- "2:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- : ltype(x) : "m" (__m(addr)))
-@@ -424,13 +466,24 @@ do { \
- int __gu_err; \
- unsigned long __gu_val; \
- __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
-- (x) = (__force __typeof__(*(ptr)))__gu_val; \
-+ (x) = (__typeof__(*(ptr)))__gu_val; \
- __gu_err; \
- })
-
- /* FIXME: this hack is definitely wrong -AK */
- struct __large_struct { unsigned long buf[100]; };
--#define __m(x) (*(struct __large_struct __user *)(x))
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define ____m(x) \
-+({ \
-+ unsigned long ____x = (unsigned long)(x); \
-+ if (____x < PAX_USER_SHADOW_BASE) \
-+ ____x += PAX_USER_SHADOW_BASE; \
-+ (void __user *)____x; \
-+})
-+#else
-+#define ____m(x) (x)
-+#endif
-+#define __m(x) (*(struct __large_struct __user *)____m(x))
-
- /*
- * Tell gcc we read from memory instead of writing: this is because
-@@ -438,7 +491,7 @@ struct __large_struct { unsigned long bu
- * aliasing issues.
- */
- #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
-- asm volatile("1: mov"itype" %"rtype"1,%2\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
- "2:\n" \
- ".section .fixup,\"ax\"\n" \
- "3: mov %3,%0\n" \
-@@ -446,10 +499,10 @@ struct __large_struct { unsigned long bu
- ".previous\n" \
- _ASM_EXTABLE(1b, 3b) \
- : "=r"(err) \
-- : ltype(x), "m" (__m(addr)), "i" (errret), "0" (err))
-+ : ltype (x), "m" (__m(addr)), "i" (errret), "0" (err))
-
- #define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
-- asm volatile("1: mov"itype" %"rtype"0,%1\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"0,%1\n"\
- "2:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- : : ltype(x), "m" (__m(addr)))
-@@ -488,8 +541,12 @@ struct __large_struct { unsigned long bu
- * On error, the variable @x is set to zero.
- */
-
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __get_user(x, ptr) get_user((x), (ptr))
-+#else
- #define __get_user(x, ptr) \
- __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
-+#endif
-
- /**
- * __put_user: - Write a simple value into user space, with less checking.
-@@ -511,8 +568,12 @@ struct __large_struct { unsigned long bu
- * Returns zero on success, or -EFAULT on error.
- */
-
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __put_user(x, ptr) put_user((x), (ptr))
-+#else
- #define __put_user(x, ptr) \
- __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
-+#endif
-
- #define __get_user_unaligned __get_user
- #define __put_user_unaligned __put_user
-@@ -530,7 +591,7 @@ struct __large_struct { unsigned long bu
- #define get_user_ex(x, ptr) do { \
- unsigned long __gue_val; \
- __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
-- (x) = (__force __typeof__(*(ptr)))__gue_val; \
-+ (x) = (__typeof__(*(ptr)))__gue_val; \
- } while (0)
-
- #ifdef CONFIG_X86_WP_WORKS_OK
-@@ -567,6 +628,7 @@ extern struct movsl_mask {
-
- #define ARCH_HAS_NOCACHE_UACCESS 1
-
-+#define ARCH_HAS_SORT_EXTABLE
- #ifdef CONFIG_X86_32
- # include "uaccess_32.h"
- #else
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/vdso.h linux-2.6.32.49/arch/x86/include/asm/vdso.h
---- linux-2.6.32.49/arch/x86/include/asm/vdso.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/vdso.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h
+index 9064052..786cfbc 100644
+--- a/arch/x86/include/asm/vdso.h
++++ b/arch/x86/include/asm/vdso.h
@@ -25,7 +25,7 @@ extern const char VDSO32_PRELINK[];
#define VDSO32_SYMBOL(base, name) \
({ \
@@ -11782,9 +12880,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/vdso.h linux-2.6.32.49/arch/x86/
})
#endif
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/vgtod.h linux-2.6.32.49/arch/x86/include/asm/vgtod.h
---- linux-2.6.32.49/arch/x86/include/asm/vgtod.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/vgtod.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
+index 3d61e20..9507180 100644
+--- a/arch/x86/include/asm/vgtod.h
++++ b/arch/x86/include/asm/vgtod.h
@@ -14,6 +14,7 @@ struct vsyscall_gtod_data {
int sysctl_enabled;
struct timezone sys_tz;
@@ -11793,9 +12892,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/vgtod.h linux-2.6.32.49/arch/x86
cycle_t (*vread)(void);
cycle_t cycle_last;
cycle_t mask;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/vmi.h linux-2.6.32.49/arch/x86/include/asm/vmi.h
---- linux-2.6.32.49/arch/x86/include/asm/vmi.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/vmi.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/vmi.h b/arch/x86/include/asm/vmi.h
+index 61e08c0..b0da582 100644
+--- a/arch/x86/include/asm/vmi.h
++++ b/arch/x86/include/asm/vmi.h
@@ -191,6 +191,7 @@ struct vrom_header {
u8 reserved[96]; /* Reserved for headers */
char vmi_init[8]; /* VMI_Init jump point */
@@ -11804,9 +12904,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/vmi.h linux-2.6.32.49/arch/x86/i
} __attribute__((packed));
struct pnp_header {
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/vmi_time.h linux-2.6.32.49/arch/x86/include/asm/vmi_time.h
---- linux-2.6.32.49/arch/x86/include/asm/vmi_time.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/vmi_time.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/vmi_time.h b/arch/x86/include/asm/vmi_time.h
+index c6e0bee..fcb9f74 100644
+--- a/arch/x86/include/asm/vmi_time.h
++++ b/arch/x86/include/asm/vmi_time.h
@@ -43,7 +43,7 @@ extern struct vmi_timer_ops {
int (*wallclock_updated)(void);
void (*set_alarm)(u32 flags, u64 expiry, u64 period);
@@ -11816,9 +12917,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/vmi_time.h linux-2.6.32.49/arch/
/* Prototypes */
extern void __init vmi_time_init(void);
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/vsyscall.h linux-2.6.32.49/arch/x86/include/asm/vsyscall.h
---- linux-2.6.32.49/arch/x86/include/asm/vsyscall.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/vsyscall.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h
+index d0983d2..1f7c9e9 100644
+--- a/arch/x86/include/asm/vsyscall.h
++++ b/arch/x86/include/asm/vsyscall.h
@@ -15,9 +15,10 @@ enum vsyscall_num {
#ifdef __KERNEL__
@@ -11849,9 +12951,10 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/vsyscall.h linux-2.6.32.49/arch/
#endif /* __KERNEL__ */
#endif /* _ASM_X86_VSYSCALL_H */
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/x86_init.h linux-2.6.32.49/arch/x86/include/asm/x86_init.h
---- linux-2.6.32.49/arch/x86/include/asm/x86_init.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/x86_init.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
+index 2c756fd..3377e37 100644
+--- a/arch/x86/include/asm/x86_init.h
++++ b/arch/x86/include/asm/x86_init.h
@@ -28,7 +28,7 @@ struct x86_init_mpparse {
void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
void (*find_smp_config)(unsigned int reserve);
@@ -11933,10 +13036,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/x86_init.h linux-2.6.32.49/arch/
extern struct x86_init_ops x86_init;
extern struct x86_cpuinit_ops x86_cpuinit;
-diff -urNp linux-2.6.32.49/arch/x86/include/asm/xsave.h linux-2.6.32.49/arch/x86/include/asm/xsave.h
---- linux-2.6.32.49/arch/x86/include/asm/xsave.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/include/asm/xsave.h 2011-11-15 19:59:42.000000000 -0500
-@@ -56,6 +56,12 @@ static inline int xrstor_checking(struct
+diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
+index 727acc1..554f3eb 100644
+--- a/arch/x86/include/asm/xsave.h
++++ b/arch/x86/include/asm/xsave.h
+@@ -56,6 +56,12 @@ static inline int xrstor_checking(struct xsave_struct *fx)
static inline int xsave_user(struct xsave_struct __user *buf)
{
int err;
@@ -11949,7 +13053,7 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/xsave.h linux-2.6.32.49/arch/x86
__asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x27\n"
"2:\n"
".section .fixup,\"ax\"\n"
-@@ -78,10 +84,15 @@ static inline int xsave_user(struct xsav
+@@ -78,10 +84,15 @@ static inline int xsave_user(struct xsave_struct __user *buf)
static inline int xrestore_user(struct xsave_struct __user *buf, u64 mask)
{
int err;
@@ -11966,127 +13070,11 @@ diff -urNp linux-2.6.32.49/arch/x86/include/asm/xsave.h linux-2.6.32.49/arch/x86
__asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
"2:\n"
".section .fixup,\"ax\"\n"
-diff -urNp linux-2.6.32.49/arch/x86/Kconfig linux-2.6.32.49/arch/x86/Kconfig
---- linux-2.6.32.49/arch/x86/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/Kconfig 2011-11-15 19:59:42.000000000 -0500
-@@ -223,7 +223,7 @@ config X86_TRAMPOLINE
-
- config X86_32_LAZY_GS
- def_bool y
-- depends on X86_32 && !CC_STACKPROTECTOR
-+ depends on X86_32 && !CC_STACKPROTECTOR && !PAX_MEMORY_UDEREF
-
- config KTIME_SCALAR
- def_bool X86_32
-@@ -1008,7 +1008,7 @@ choice
-
- config NOHIGHMEM
- bool "off"
-- depends on !X86_NUMAQ
-+ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
- ---help---
- Linux can use up to 64 Gigabytes of physical memory on x86 systems.
- However, the address space of 32-bit x86 processors is only 4
-@@ -1045,7 +1045,7 @@ config NOHIGHMEM
-
- config HIGHMEM4G
- bool "4GB"
-- depends on !X86_NUMAQ
-+ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
- ---help---
- Select this if you have a 32-bit processor and between 1 and 4
- gigabytes of physical RAM.
-@@ -1099,7 +1099,7 @@ config PAGE_OFFSET
- hex
- default 0xB0000000 if VMSPLIT_3G_OPT
- default 0x80000000 if VMSPLIT_2G
-- default 0x78000000 if VMSPLIT_2G_OPT
-+ default 0x70000000 if VMSPLIT_2G_OPT
- default 0x40000000 if VMSPLIT_1G
- default 0xC0000000
- depends on X86_32
-@@ -1460,6 +1460,7 @@ config SECCOMP
-
- config CC_STACKPROTECTOR
- bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
-+ depends on X86_64 || !PAX_MEMORY_UDEREF
- ---help---
- This option turns on the -fstack-protector GCC feature. This
- feature puts, at the beginning of functions, a canary value on
-@@ -1517,6 +1518,7 @@ config KEXEC_JUMP
- config PHYSICAL_START
- hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
- default "0x1000000"
-+ range 0x400000 0x40000000
- ---help---
- This gives the physical address where the kernel is loaded.
-
-@@ -1581,6 +1583,7 @@ config PHYSICAL_ALIGN
- hex
- prompt "Alignment value to which kernel should be aligned" if X86_32
- default "0x1000000"
-+ range 0x400000 0x1000000 if PAX_KERNEXEC
- range 0x2000 0x1000000
- ---help---
- This value puts the alignment restrictions on physical address
-@@ -1612,9 +1615,10 @@ config HOTPLUG_CPU
- Say N if you want to disable CPU hotplug.
-
- config COMPAT_VDSO
-- def_bool y
-+ def_bool n
- prompt "Compat VDSO support"
- depends on X86_32 || IA32_EMULATION
-+ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF
- ---help---
- Map the 32-bit VDSO to the predictable old-style address too.
- ---help---
-diff -urNp linux-2.6.32.49/arch/x86/Kconfig.cpu linux-2.6.32.49/arch/x86/Kconfig.cpu
---- linux-2.6.32.49/arch/x86/Kconfig.cpu 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/Kconfig.cpu 2011-11-15 19:59:42.000000000 -0500
-@@ -340,7 +340,7 @@ config X86_PPRO_FENCE
-
- config X86_F00F_BUG
- def_bool y
-- depends on M586MMX || M586TSC || M586 || M486 || M386
-+ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC
-
- config X86_WP_WORKS_OK
- def_bool y
-@@ -360,7 +360,7 @@ config X86_POPAD_OK
-
- config X86_ALIGNMENT_16
- def_bool y
-- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
-+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK8 || MK7 || MK6 || MCORE2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
-
- config X86_INTEL_USERCOPY
- def_bool y
-@@ -406,7 +406,7 @@ config X86_CMPXCHG64
- # generates cmov.
- config X86_CMOV
- def_bool y
-- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM)
-+ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM)
-
- config X86_MINIMUM_CPU_FAMILY
- int
-diff -urNp linux-2.6.32.49/arch/x86/Kconfig.debug linux-2.6.32.49/arch/x86/Kconfig.debug
---- linux-2.6.32.49/arch/x86/Kconfig.debug 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/Kconfig.debug 2011-11-15 19:59:42.000000000 -0500
-@@ -99,7 +99,7 @@ config X86_PTDUMP
- config DEBUG_RODATA
- bool "Write protect kernel read-only data structures"
- default y
-- depends on DEBUG_KERNEL
-+ depends on DEBUG_KERNEL && BROKEN
- ---help---
- Mark the kernel read-only data as write-protected in the pagetables,
- in order to catch accidental (and incorrect) writes to such const
-diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/realmode/Makefile linux-2.6.32.49/arch/x86/kernel/acpi/realmode/Makefile
---- linux-2.6.32.49/arch/x86/kernel/acpi/realmode/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/acpi/realmode/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -41,6 +41,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os
+diff --git a/arch/x86/kernel/acpi/realmode/Makefile b/arch/x86/kernel/acpi/realmode/Makefile
+index 6a564ac..9b1340c 100644
+--- a/arch/x86/kernel/acpi/realmode/Makefile
++++ b/arch/x86/kernel/acpi/realmode/Makefile
+@@ -41,6 +41,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
$(call cc-option, -fno-stack-protector) \
$(call cc-option, -mpreferred-stack-boundary=2)
KBUILD_CFLAGS += $(call cc-option, -m32)
@@ -12096,9 +13084,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/realmode/Makefile linux-2.6.32.4
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
-diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.32.49/arch/x86/kernel/acpi/realmode/wakeup.S
---- linux-2.6.32.49/arch/x86/kernel/acpi/realmode/wakeup.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/acpi/realmode/wakeup.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S
+index 580b4e2..d4129e4 100644
+--- a/arch/x86/kernel/acpi/realmode/wakeup.S
++++ b/arch/x86/kernel/acpi/realmode/wakeup.S
@@ -91,6 +91,9 @@ _start:
/* Do any other stuff... */
@@ -12126,9 +13115,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.32.4
#else
pushw $0
pushw trampoline_segment
-diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/sleep.c linux-2.6.32.49/arch/x86/kernel/acpi/sleep.c
---- linux-2.6.32.49/arch/x86/kernel/acpi/sleep.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/acpi/sleep.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
+index ca93638..7042f24 100644
+--- a/arch/x86/kernel/acpi/sleep.c
++++ b/arch/x86/kernel/acpi/sleep.c
@@ -11,11 +11,12 @@
#include <linux/cpumask.h>
#include <asm/segment.h>
@@ -12175,9 +13165,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/sleep.c linux-2.6.32.49/arch/x86
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.32.49/arch/x86/kernel/acpi/wakeup_32.S
---- linux-2.6.32.49/arch/x86/kernel/acpi/wakeup_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/acpi/wakeup_32.S 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
+index 8ded418..079961e 100644
+--- a/arch/x86/kernel/acpi/wakeup_32.S
++++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -30,13 +30,11 @@ wakeup_pmode_return:
# and restore the stack ... but you need gdt for this to work
movl saved_context_esp, %esp
@@ -12194,10 +13185,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.32.49/arch
bogus_magic:
jmp bogus_magic
-diff -urNp linux-2.6.32.49/arch/x86/kernel/alternative.c linux-2.6.32.49/arch/x86/kernel/alternative.c
---- linux-2.6.32.49/arch/x86/kernel/alternative.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/alternative.c 2011-11-15 19:59:42.000000000 -0500
-@@ -407,7 +407,7 @@ void __init_or_module apply_paravirt(str
+diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
+index de7353c..075da5f 100644
+--- a/arch/x86/kernel/alternative.c
++++ b/arch/x86/kernel/alternative.c
+@@ -407,7 +407,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start,
BUG_ON(p->len > MAX_PATCH_LEN);
/* prep the buffer with the original instructions */
@@ -12206,7 +13198,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/alternative.c linux-2.6.32.49/arch/x8
used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf,
(unsigned long)p->instr, p->len);
-@@ -475,7 +475,7 @@ void __init alternative_instructions(voi
+@@ -475,7 +475,7 @@ void __init alternative_instructions(void)
if (smp_alt_once)
free_init_pages("SMP alternatives",
(unsigned long)__smp_locks,
@@ -12215,7 +13207,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/alternative.c linux-2.6.32.49/arch/x8
restart_nmi();
}
-@@ -492,13 +492,17 @@ void __init alternative_instructions(voi
+@@ -492,13 +492,17 @@ void __init alternative_instructions(void)
* instructions. And on the local CPU you need to be protected again NMI or MCE
* handlers seeing an inconsistent instruction while you patch.
*/
@@ -12235,7 +13227,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/alternative.c linux-2.6.32.49/arch/x8
local_irq_restore(flags);
/* Could also do a CLFLUSH here to speed up CPU recovery; but
that causes hangs on some VIA CPUs. */
-@@ -520,35 +524,21 @@ static void *__init_or_module text_poke_
+@@ -520,35 +524,21 @@ static void *__init_or_module text_poke_early(void *addr, const void *opcode,
*/
void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
{
@@ -12279,10 +13271,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/alternative.c linux-2.6.32.49/arch/x8
+ BUG_ON((vaddr)[i] != ((const unsigned char *)opcode)[i]);
return addr;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/amd_iommu.c linux-2.6.32.49/arch/x86/kernel/amd_iommu.c
---- linux-2.6.32.49/arch/x86/kernel/amd_iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/amd_iommu.c 2011-11-15 19:59:42.000000000 -0500
-@@ -2076,7 +2076,7 @@ static void prealloc_protection_domains(
+diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
+index 3a44b75..1601800 100644
+--- a/arch/x86/kernel/amd_iommu.c
++++ b/arch/x86/kernel/amd_iommu.c
+@@ -2076,7 +2076,7 @@ static void prealloc_protection_domains(void)
}
}
@@ -12291,9 +13284,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/amd_iommu.c linux-2.6.32.49/arch/x86/
.alloc_coherent = alloc_coherent,
.free_coherent = free_coherent,
.map_page = map_page,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/apic.c linux-2.6.32.49/arch/x86/kernel/apic/apic.c
---- linux-2.6.32.49/arch/x86/kernel/apic/apic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/apic/apic.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+index 1d2d670..8e3f477 100644
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
@@ -170,7 +170,7 @@ int first_system_vector = 0xfe;
/*
* Debug level, exported for io_apic.c
@@ -12303,7 +13297,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/apic.c linux-2.6.32.49/arch/x86/
int pic_mode;
-@@ -1794,7 +1794,7 @@ void smp_error_interrupt(struct pt_regs
+@@ -1794,7 +1794,7 @@ void smp_error_interrupt(struct pt_regs *regs)
apic_write(APIC_ESR, 0);
v1 = apic_read(APIC_ESR);
ack_APIC_irq();
@@ -12312,7 +13306,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/apic.c linux-2.6.32.49/arch/x86/
/*
* Here is what the APIC error bits mean:
-@@ -2184,6 +2184,8 @@ static int __cpuinit apic_cluster_num(vo
+@@ -2184,6 +2184,8 @@ static int __cpuinit apic_cluster_num(void)
u16 *bios_cpu_apicid;
DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
@@ -12321,10 +13315,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/apic.c linux-2.6.32.49/arch/x86/
bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c
---- linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c 2011-11-15 19:59:42.000000000 -0500
-@@ -716,7 +716,7 @@ struct IO_APIC_route_entry **alloc_ioapi
+diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
+index 8928d97..f799cea 100644
+--- a/arch/x86/kernel/apic/io_apic.c
++++ b/arch/x86/kernel/apic/io_apic.c
+@@ -716,7 +716,7 @@ struct IO_APIC_route_entry **alloc_ioapic_entries(void)
ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics,
GFP_ATOMIC);
if (!ioapic_entries)
@@ -12342,7 +13337,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c linux-2.6.32.49/arch/x
}
/*
-@@ -1150,7 +1150,7 @@ int IO_APIC_get_PCI_irq_vector(int bus,
+@@ -1150,7 +1150,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
}
EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
@@ -12360,7 +13355,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c linux-2.6.32.49/arch/x
{
spin_unlock(&vector_lock);
}
-@@ -2542,7 +2542,7 @@ static void ack_apic_edge(unsigned int i
+@@ -2542,7 +2542,7 @@ static void ack_apic_edge(unsigned int irq)
ack_APIC_irq();
}
@@ -12369,7 +13364,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c linux-2.6.32.49/arch/x
static void ack_apic_level(unsigned int irq)
{
-@@ -2626,7 +2626,7 @@ static void ack_apic_level(unsigned int
+@@ -2626,7 +2626,7 @@ static void ack_apic_level(unsigned int irq)
/* Tail end of version 0x11 I/O APIC bug workaround */
if (!(v & (1 << (i & 0x1f)))) {
@@ -12378,9 +13373,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apic/io_apic.c linux-2.6.32.49/arch/x
spin_lock(&ioapic_lock);
__mask_and_edge_IO_APIC_irq(cfg);
__unmask_and_level_IO_APIC_irq(cfg);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/apm_32.c linux-2.6.32.49/arch/x86/kernel/apm_32.c
---- linux-2.6.32.49/arch/x86/kernel/apm_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/apm_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
+index 151ace6..f317474 100644
+--- a/arch/x86/kernel/apm_32.c
++++ b/arch/x86/kernel/apm_32.c
@@ -410,7 +410,7 @@ static DEFINE_SPINLOCK(user_list_lock);
* This is for buggy BIOS's that refer to (real mode) segment 0x40
* even though they are called in protected mode.
@@ -12413,7 +13409,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apm_32.c linux-2.6.32.49/arch/x86/ker
put_cpu();
return call->eax & 0xff;
-@@ -664,7 +671,10 @@ static long __apm_bios_call_simple(void
+@@ -664,7 +671,10 @@ static long __apm_bios_call_simple(void *_call)
BUG_ON(cpu != 0);
gdt = get_cpu_gdt_table(cpu);
save_desc_40 = gdt[0x40 / 8];
@@ -12424,7 +13420,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apm_32.c linux-2.6.32.49/arch/x86/ker
apm_irq_save(flags);
APM_DO_SAVE_SEGS;
-@@ -672,7 +682,11 @@ static long __apm_bios_call_simple(void
+@@ -672,7 +682,11 @@ static long __apm_bios_call_simple(void *_call)
&call->eax);
APM_DO_RESTORE_SEGS;
apm_irq_restore(flags);
@@ -12461,9 +13457,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/apm_32.c linux-2.6.32.49/arch/x86/ker
proc_create("apm", 0, NULL, &apm_file_ops);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/asm-offsets_32.c linux-2.6.32.49/arch/x86/kernel/asm-offsets_32.c
---- linux-2.6.32.49/arch/x86/kernel/asm-offsets_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/asm-offsets_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
+index dfdbf64..9b2b6ce 100644
+--- a/arch/x86/kernel/asm-offsets_32.c
++++ b/arch/x86/kernel/asm-offsets_32.c
@@ -51,7 +51,6 @@ void foo(void)
OFFSET(CPUINFO_x86_vendor_id, cpuinfo_x86, x86_vendor_id);
BLANK();
@@ -12501,9 +13498,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/asm-offsets_32.c linux-2.6.32.49/arch
#endif
#ifdef CONFIG_XEN
-diff -urNp linux-2.6.32.49/arch/x86/kernel/asm-offsets_64.c linux-2.6.32.49/arch/x86/kernel/asm-offsets_64.c
---- linux-2.6.32.49/arch/x86/kernel/asm-offsets_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/asm-offsets_64.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
+index 4a6aeed..371de20 100644
+--- a/arch/x86/kernel/asm-offsets_64.c
++++ b/arch/x86/kernel/asm-offsets_64.c
@@ -44,6 +44,8 @@ int main(void)
ENTRY(addr_limit);
ENTRY(preempt_count);
@@ -12548,10 +13546,26 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/asm-offsets_64.c linux-2.6.32.49/arch
#ifdef CONFIG_XEN
BLANK();
OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/amd.c linux-2.6.32.49/arch/x86/kernel/cpu/amd.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/amd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/amd.c 2011-11-15 19:59:42.000000000 -0500
-@@ -602,7 +602,7 @@ static unsigned int __cpuinit amd_size_c
+diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
+index ff502cc..dc5133e 100644
+--- a/arch/x86/kernel/cpu/Makefile
++++ b/arch/x86/kernel/cpu/Makefile
+@@ -7,10 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
+ CFLAGS_REMOVE_common.o = -pg
+ endif
+
+-# Make sure load_percpu_segment has no stackprotector
+-nostackp := $(call cc-option, -fno-stack-protector)
+-CFLAGS_common.o := $(nostackp)
+-
+ obj-y := intel_cacheinfo.o addon_cpuid_features.o
+ obj-y += proc.o capflags.o powerflags.o common.o
+ obj-y += vmware.o hypervisor.o sched.o
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
+index 6e082dc..a0b5f36 100644
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -602,7 +602,7 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
unsigned int size)
{
/* AMD errata T13 (order #21922) */
@@ -12560,10 +13574,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/amd.c linux-2.6.32.49/arch/x86/ke
/* Duron Rev A0 */
if (c->x86_model == 3 && c->x86_mask == 0)
size = 64;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86/kernel/cpu/common.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/common.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/common.c 2011-11-15 19:59:42.000000000 -0500
-@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitcon
+diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
+index 4e34d10..a53b130a 100644
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitconst default_cpu = {
static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
@@ -12633,7 +13648,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86
gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr);
/* Reload the per-cpu base */
-@@ -798,6 +744,10 @@ static void __cpuinit identify_cpu(struc
+@@ -798,6 +744,10 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
/* Filter out anything that depends on CPUID levels we don't have */
filter_cpuid_features(c, true);
@@ -12644,7 +13659,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86
/* If the model name is still unset, do table lookup. */
if (!c->x86_model_id[0]) {
const char *p;
-@@ -980,6 +930,9 @@ static __init int setup_disablecpuid(cha
+@@ -980,6 +930,9 @@ static __init int setup_disablecpuid(char *arg)
}
__setup("clearcpuid=", setup_disablecpuid);
@@ -12654,7 +13669,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86
#ifdef CONFIG_X86_64
struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table };
-@@ -995,7 +948,7 @@ DEFINE_PER_CPU(struct task_struct *, cur
+@@ -995,7 +948,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
EXPORT_PER_CPU_SYMBOL(current_task);
DEFINE_PER_CPU(unsigned long, kernel_stack) =
@@ -12663,7 +13678,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86
EXPORT_PER_CPU_SYMBOL(kernel_stack);
DEFINE_PER_CPU(char *, irq_stack_ptr) =
-@@ -1060,7 +1013,7 @@ struct pt_regs * __cpuinit idle_regs(str
+@@ -1060,7 +1013,7 @@ struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
{
memset(regs, 0, sizeof(struct pt_regs));
regs->fs = __KERNEL_PERCPU;
@@ -12707,10 +13722,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/common.c linux-2.6.32.49/arch/x86
struct thread_struct *thread = &curr->thread;
if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/intel.c linux-2.6.32.49/arch/x86/kernel/cpu/intel.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/intel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/intel.c 2011-11-15 19:59:42.000000000 -0500
-@@ -162,7 +162,7 @@ static void __cpuinit trap_init_f00f_bug
+diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
+index 6a77cca..4f4fca0 100644
+--- a/arch/x86/kernel/cpu/intel.c
++++ b/arch/x86/kernel/cpu/intel.c
+@@ -162,7 +162,7 @@ static void __cpuinit trap_init_f00f_bug(void)
* Update the IDT descriptor and reload the IDT so that
* it uses the read-only mapped virtual address.
*/
@@ -12719,10 +13735,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/intel.c linux-2.6.32.49/arch/x86/
load_idt(&idt_descr);
}
#endif
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/intel_cacheinfo.c linux-2.6.32.49/arch/x86/kernel/cpu/intel_cacheinfo.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/intel_cacheinfo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/intel_cacheinfo.c 2011-11-15 19:59:42.000000000 -0500
-@@ -921,7 +921,7 @@ static ssize_t store(struct kobject *kob
+diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
+index 417990f..96dc36b 100644
+--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
++++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
+@@ -921,7 +921,7 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -12731,35 +13748,25 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/intel_cacheinfo.c linux-2.6.32.49
.show = show,
.store = store,
};
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/Makefile linux-2.6.32.49/arch/x86/kernel/cpu/Makefile
---- linux-2.6.32.49/arch/x86/kernel/cpu/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/Makefile 2011-11-15 19:59:42.000000000 -0500
-@@ -7,10 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
- CFLAGS_REMOVE_common.o = -pg
- endif
-
--# Make sure load_percpu_segment has no stackprotector
--nostackp := $(call cc-option, -fno-stack-protector)
--CFLAGS_common.o := $(nostackp)
--
- obj-y := intel_cacheinfo.o addon_cpuid_features.o
- obj-y += proc.o capflags.o powerflags.o common.o
- obj-y += vmware.o hypervisor.o sched.o
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce_amd.c linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce_amd.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce_amd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce_amd.c 2011-11-15 19:59:42.000000000 -0500
-@@ -385,7 +385,7 @@ static ssize_t store(struct kobject *kob
- return ret;
+diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
+index 472763d..9831e11 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
++++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
+@@ -211,7 +211,9 @@ static ssize_t mce_write(struct file *filp, const char __user *ubuf,
+ static int inject_init(void)
+ {
+ printk(KERN_INFO "Machine check injector initialized\n");
+- mce_chrdev_ops.write = mce_write;
++ pax_open_kernel();
++ *(void **)&mce_chrdev_ops.write = mce_write;
++ pax_close_kernel();
+ register_die_notifier(&mce_raise_nb);
+ return 0;
}
-
--static struct sysfs_ops threshold_ops = {
-+static const struct sysfs_ops threshold_ops = {
- .show = show,
- .store = store,
- };
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
+index 0f16a2b..21740f5 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce.c
++++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -43,6 +43,7 @@
#include <asm/ipi.h>
#include <asm/mce.h>
@@ -12790,7 +13797,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
/* Panic in progress. Enable interrupts and wait for final IPI */
static void wait_for_panic(void)
-@@ -248,7 +249,7 @@ static void mce_panic(char *msg, struct
+@@ -248,7 +249,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
/*
* Make sure only one CPU runs in machine check panic
*/
@@ -12799,7 +13806,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
wait_for_panic();
barrier();
-@@ -256,7 +257,7 @@ static void mce_panic(char *msg, struct
+@@ -256,7 +257,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
console_verbose();
} else {
/* Don't log too much for fake panic */
@@ -12817,7 +13824,26 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
wait_for_panic();
if (!monarch_timeout)
goto out;
-@@ -1429,14 +1430,14 @@ void __cpuinit mcheck_init(struct cpuinf
+@@ -1394,7 +1395,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
+ }
+
+ /* Call the installed machine check handler for this CPU setup. */
+-void (*machine_check_vector)(struct pt_regs *, long error_code) =
++void (*machine_check_vector)(struct pt_regs *, long error_code) __read_only =
+ unexpected_machine_check;
+
+ /*
+@@ -1416,7 +1417,9 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
+ return;
+ }
+
++ pax_open_kernel();
+ machine_check_vector = do_machine_check;
++ pax_close_kernel();
+
+ mce_init();
+ mce_cpu_features(c);
+@@ -1429,14 +1432,14 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
*/
static DEFINE_SPINLOCK(mce_state_lock);
@@ -12834,7 +13860,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
spin_unlock(&mce_state_lock);
return -EBUSY;
-@@ -1444,7 +1445,7 @@ static int mce_open(struct inode *inode,
+@@ -1444,7 +1447,7 @@ static int mce_open(struct inode *inode, struct file *file)
if (file->f_flags & O_EXCL)
open_exclu = 1;
@@ -12843,7 +13869,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
spin_unlock(&mce_state_lock);
-@@ -1455,7 +1456,7 @@ static int mce_release(struct inode *ino
+@@ -1455,7 +1458,7 @@ static int mce_release(struct inode *inode, struct file *file)
{
spin_lock(&mce_state_lock);
@@ -12852,7 +13878,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
open_exclu = 0;
spin_unlock(&mce_state_lock);
-@@ -2082,7 +2083,7 @@ struct dentry *mce_get_debugfs_dir(void)
+@@ -2082,7 +2085,7 @@ struct dentry *mce_get_debugfs_dir(void)
static void mce_reset(void)
{
cpu_missing = 0;
@@ -12861,24 +13887,52 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.49/arch
atomic_set(&mce_executing, 0);
atomic_set(&mce_callin, 0);
atomic_set(&global_nwo, 0);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce-inject.c linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce-inject.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce-inject.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mcheck/mce-inject.c 2011-11-15 19:59:42.000000000 -0500
-@@ -211,7 +211,9 @@ static ssize_t mce_write(struct file *fi
- static int inject_init(void)
+diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
+index ef3cd31..9d2f6ab 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
++++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
+@@ -385,7 +385,7 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
+ return ret;
+ }
+
+-static struct sysfs_ops threshold_ops = {
++static const struct sysfs_ops threshold_ops = {
+ .show = show,
+ .store = store,
+ };
+diff --git a/arch/x86/kernel/cpu/mcheck/p5.c b/arch/x86/kernel/cpu/mcheck/p5.c
+index 5c0e653..1e82c7c 100644
+--- a/arch/x86/kernel/cpu/mcheck/p5.c
++++ b/arch/x86/kernel/cpu/mcheck/p5.c
+@@ -50,7 +50,9 @@ void intel_p5_mcheck_init(struct cpuinfo_x86 *c)
+ if (!cpu_has(c, X86_FEATURE_MCE))
+ return;
+
++ pax_open_kernel();
+ machine_check_vector = pentium_machine_check;
++ pax_close_kernel();
+ /* Make sure the vector pointer is visible before we enable MCEs: */
+ wmb();
+
+diff --git a/arch/x86/kernel/cpu/mcheck/winchip.c b/arch/x86/kernel/cpu/mcheck/winchip.c
+index 54060f5..e6ba93d 100644
+--- a/arch/x86/kernel/cpu/mcheck/winchip.c
++++ b/arch/x86/kernel/cpu/mcheck/winchip.c
+@@ -24,7 +24,9 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c)
{
- printk(KERN_INFO "Machine check injector initialized\n");
-- mce_chrdev_ops.write = mce_write;
+ u32 lo, hi;
+
+ pax_open_kernel();
-+ *(void **)&mce_chrdev_ops.write = mce_write;
+ machine_check_vector = winchip_machine_check;
+ pax_close_kernel();
- register_die_notifier(&mce_raise_nb);
- return 0;
- }
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/amd.c linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/amd.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/amd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/amd.c 2011-11-15 19:59:42.000000000 -0500
-@@ -108,7 +108,7 @@ amd_validate_add_page(unsigned long base
+ /* Make sure the vector pointer is visible before we enable MCEs: */
+ wmb();
+
+diff --git a/arch/x86/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
+index 33af141..92ba9cd 100644
+--- a/arch/x86/kernel/cpu/mtrr/amd.c
++++ b/arch/x86/kernel/cpu/mtrr/amd.c
+@@ -108,7 +108,7 @@ amd_validate_add_page(unsigned long base, unsigned long size, unsigned int type)
return 0;
}
@@ -12887,10 +13941,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/amd.c linux-2.6.32.49/arch/x
.vendor = X86_VENDOR_AMD,
.set = amd_set_mtrr,
.get = amd_get_mtrr,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/centaur.c linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/centaur.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/centaur.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/centaur.c 2011-11-15 19:59:42.000000000 -0500
-@@ -110,7 +110,7 @@ centaur_validate_add_page(unsigned long
+diff --git a/arch/x86/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
+index de89f14..316fe3e 100644
+--- a/arch/x86/kernel/cpu/mtrr/centaur.c
++++ b/arch/x86/kernel/cpu/mtrr/centaur.c
+@@ -110,7 +110,7 @@ centaur_validate_add_page(unsigned long base, unsigned long size, unsigned int t
return 0;
}
@@ -12899,9 +13954,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/centaur.c linux-2.6.32.49/ar
.vendor = X86_VENDOR_CENTAUR,
.set = centaur_set_mcr,
.get = centaur_get_mcr,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/cyrix.c linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/cyrix.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/cyrix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/cyrix.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c
+index 228d982..68a3343 100644
+--- a/arch/x86/kernel/cpu/mtrr/cyrix.c
++++ b/arch/x86/kernel/cpu/mtrr/cyrix.c
@@ -265,7 +265,7 @@ static void cyrix_set_all(void)
post_set();
}
@@ -12911,9 +13967,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/cyrix.c linux-2.6.32.49/arch
.vendor = X86_VENDOR_CYRIX,
.set_all = cyrix_set_all,
.set = cyrix_set_arr,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/generic.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/generic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/generic.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
+index 55da0c5..4d75584 100644
+--- a/arch/x86/kernel/cpu/mtrr/generic.c
++++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -752,7 +752,7 @@ int positive_have_wrcomb(void)
/*
* Generic structure...
@@ -12923,9 +13980,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.32.49/ar
.use_intel_if = 1,
.set_all = generic_set_all,
.get = generic_get_mtrr,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/main.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/main.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
+index fd60f09..c94ef52 100644
+--- a/arch/x86/kernel/cpu/mtrr/main.c
++++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -60,14 +60,14 @@ static DEFINE_MUTEX(mtrr_mutex);
u64 size_or_mask, size_and_mask;
static bool mtrr_aps_delayed_init;
@@ -12944,9 +14002,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.32.49/arch/
{
if (ops->vendor && ops->vendor < X86_VENDOR_NUM)
mtrr_ops[ops->vendor] = ops;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h
---- linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.h b/arch/x86/kernel/cpu/mtrr/mtrr.h
+index a501dee..816c719 100644
+--- a/arch/x86/kernel/cpu/mtrr/mtrr.h
++++ b/arch/x86/kernel/cpu/mtrr/mtrr.h
@@ -25,14 +25,14 @@ struct mtrr_ops {
int (*validate_add_page)(unsigned long base, unsigned long size,
unsigned int type);
@@ -12964,7 +14023,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.32.49/arch/
extern int positive_have_wrcomb(void);
-@@ -53,10 +53,10 @@ void fill_mtrr_var_range(unsigned int in
+@@ -53,10 +53,10 @@ void fill_mtrr_var_range(unsigned int index,
u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
void get_mtrr_state(void);
@@ -12977,46 +14036,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.32.49/arch/
#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
#define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.32.49/arch/x86/kernel/cpu/perfctr-watchdog.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/perfctr-watchdog.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/perfctr-watchdog.c 2011-11-15 19:59:42.000000000 -0500
-@@ -30,11 +30,11 @@ struct nmi_watchdog_ctlblk {
-
- /* Interface defining a CPU specific perfctr watchdog */
- struct wd_ops {
-- int (*reserve)(void);
-- void (*unreserve)(void);
-- int (*setup)(unsigned nmi_hz);
-- void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
-- void (*stop)(void);
-+ int (* const reserve)(void);
-+ void (* const unreserve)(void);
-+ int (* const setup)(unsigned nmi_hz);
-+ void (* const rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
-+ void (* const stop)(void);
- unsigned perfctr;
- unsigned evntsel;
- u64 checkbit;
-@@ -645,6 +645,7 @@ static const struct wd_ops p4_wd_ops = {
- #define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL
- #define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK
-
-+/* cannot be const */
- static struct wd_ops intel_arch_wd_ops;
-
- static int setup_intel_arch_watchdog(unsigned nmi_hz)
-@@ -697,6 +698,7 @@ static int setup_intel_arch_watchdog(uns
- return 1;
- }
-
-+/* cannot be const */
- static struct wd_ops intel_arch_wd_ops __read_mostly = {
- .reserve = single_msr_reserve,
- .unreserve = single_msr_unreserve,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c
---- linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c 2011-11-15 19:59:42.000000000 -0500
-@@ -723,10 +723,10 @@ x86_perf_event_update(struct perf_event
+diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
+index 0ff02ca..fc49a60 100644
+--- a/arch/x86/kernel/cpu/perf_event.c
++++ b/arch/x86/kernel/cpu/perf_event.c
+@@ -723,10 +723,10 @@ x86_perf_event_update(struct perf_event *event,
* count to the generic event atomically:
*/
again:
@@ -13038,7 +14062,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.49/arch
atomic64_sub(delta, &hwc->period_left);
return new_raw_count;
-@@ -1353,7 +1353,7 @@ x86_perf_event_set_period(struct perf_ev
+@@ -1353,7 +1353,7 @@ x86_perf_event_set_period(struct perf_event *event,
* The hw event starts counting from this event offset,
* mark it to be able to extra future deltas:
*/
@@ -13047,7 +14071,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.49/arch
err = checking_wrmsrl(hwc->event_base + idx,
(u64)(-left) & x86_pmu.event_mask);
-@@ -2357,7 +2357,7 @@ perf_callchain_user(struct pt_regs *regs
+@@ -2357,7 +2357,7 @@ perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry)
break;
callchain_store(entry, frame.return_address);
@@ -13056,10 +14080,48 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.49/arch
}
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/crash.c linux-2.6.32.49/arch/x86/kernel/crash.c
---- linux-2.6.32.49/arch/x86/kernel/crash.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/crash.c 2011-11-15 19:59:42.000000000 -0500
-@@ -41,7 +41,7 @@ static void kdump_nmi_callback(int cpu,
+diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c
+index 898df97..9e82503 100644
+--- a/arch/x86/kernel/cpu/perfctr-watchdog.c
++++ b/arch/x86/kernel/cpu/perfctr-watchdog.c
+@@ -30,11 +30,11 @@ struct nmi_watchdog_ctlblk {
+
+ /* Interface defining a CPU specific perfctr watchdog */
+ struct wd_ops {
+- int (*reserve)(void);
+- void (*unreserve)(void);
+- int (*setup)(unsigned nmi_hz);
+- void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
+- void (*stop)(void);
++ int (* const reserve)(void);
++ void (* const unreserve)(void);
++ int (* const setup)(unsigned nmi_hz);
++ void (* const rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
++ void (* const stop)(void);
+ unsigned perfctr;
+ unsigned evntsel;
+ u64 checkbit;
+@@ -645,6 +645,7 @@ static const struct wd_ops p4_wd_ops = {
+ #define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL
+ #define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK
+
++/* cannot be const */
+ static struct wd_ops intel_arch_wd_ops;
+
+ static int setup_intel_arch_watchdog(unsigned nmi_hz)
+@@ -697,6 +698,7 @@ static int setup_intel_arch_watchdog(unsigned nmi_hz)
+ return 1;
+ }
+
++/* cannot be const */
+ static struct wd_ops intel_arch_wd_ops __read_mostly = {
+ .reserve = single_msr_reserve,
+ .unreserve = single_msr_unreserve,
+diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
+index ff95824..2ffdcb5 100644
+--- a/arch/x86/kernel/crash.c
++++ b/arch/x86/kernel/crash.c
+@@ -41,7 +41,7 @@ static void kdump_nmi_callback(int cpu, struct die_args *args)
regs = args->regs;
#ifdef CONFIG_X86_32
@@ -13068,9 +14130,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/crash.c linux-2.6.32.49/arch/x86/kern
crash_fixup_ss_esp(&fixed_regs, regs);
regs = &fixed_regs;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/doublefault_32.c linux-2.6.32.49/arch/x86/kernel/doublefault_32.c
---- linux-2.6.32.49/arch/x86/kernel/doublefault_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/doublefault_32.c 2011-11-15 19:59:42.000000000 -0500
+diff --git a/arch/x86/kernel/doublefault_32.c b/arch/x86/kernel/doublefault_32.c
+index 37250fe..bf2ec74 100644
+--- a/arch/x86/kernel/doublefault_32.c
++++ b/arch/x86/kernel/doublefault_32.c
@@ -11,7 +11,7 @@
#define DOUBLEFAULT_STACKSIZE (1024)
@@ -13089,7 +14152,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/doublefault_32.c linux-2.6.32.49/arch
printk(KERN_EMERG "PANIC: double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
-@@ -58,10 +58,10 @@ struct tss_struct doublefault_tss __cach
+@@ -58,10 +58,10 @@ struct tss_struct doublefault_tss __cacheline_aligned = {
/* 0x2 bit is always set */
.flags = X86_EFLAGS_SF | 0x2,
.sp = STACK_START,
@@ -13102,10 +14165,144 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/doublefault_32.c linux-2.6.32.49/arch
.fs = __KERNEL_PERCPU,
.__cr3 = __pa_nodebug(swapper_pg_dir),
-diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c
---- linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c 2011-11-18 18:10:09.000000000 -0500
-@@ -53,16 +53,12 @@ void dump_trace(struct task_struct *task
+diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
+index 2d8a371..4fa6ae6 100644
+--- a/arch/x86/kernel/dumpstack.c
++++ b/arch/x86/kernel/dumpstack.c
+@@ -2,6 +2,9 @@
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
+ */
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++#define __INCLUDED_BY_HIDESYM 1
++#endif
+ #include <linux/kallsyms.h>
+ #include <linux/kprobes.h>
+ #include <linux/uaccess.h>
+@@ -28,7 +31,7 @@ static int die_counter;
+
+ void printk_address(unsigned long address, int reliable)
+ {
+- printk(" [<%p>] %s%pS\n", (void *) address,
++ printk(" [<%p>] %s%pA\n", (void *) address,
+ reliable ? "" : "? ", (void *) address);
+ }
+
+@@ -36,9 +39,8 @@ void printk_address(unsigned long address, int reliable)
+ static void
+ print_ftrace_graph_addr(unsigned long addr, void *data,
+ const struct stacktrace_ops *ops,
+- struct thread_info *tinfo, int *graph)
++ struct task_struct *task, int *graph)
+ {
+- struct task_struct *task = tinfo->task;
+ unsigned long ret_addr;
+ int index = task->curr_ret_stack;
+
+@@ -59,7 +61,7 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
+ static inline void
+ print_ftrace_graph_addr(unsigned long addr, void *data,
+ const struct stacktrace_ops *ops,
+- struct thread_info *tinfo, int *graph)
++ struct task_struct *task, int *graph)
+ { }
+ #endif
+
+@@ -70,10 +72,8 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
+ * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
+ */
+
+-static inline int valid_stack_ptr(struct thread_info *tinfo,
+- void *p, unsigned int size, void *end)
++static inline int valid_stack_ptr(void *t, void *p, unsigned int size, void *end)
+ {
+- void *t = tinfo;
+ if (end) {
+ if (p < end && p >= (end-THREAD_SIZE))
+ return 1;
+@@ -84,14 +84,14 @@ static inline int valid_stack_ptr(struct thread_info *tinfo,
+ }
+
+ unsigned long
+-print_context_stack(struct thread_info *tinfo,
++print_context_stack(struct task_struct *task, void *stack_start,
+ unsigned long *stack, unsigned long bp,
+ const struct stacktrace_ops *ops, void *data,
+ unsigned long *end, int *graph)
+ {
+ struct stack_frame *frame = (struct stack_frame *)bp;
+
+- while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
++ while (valid_stack_ptr(stack_start, stack, sizeof(*stack), end)) {
+ unsigned long addr;
+
+ addr = *stack;
+@@ -103,7 +103,7 @@ print_context_stack(struct thread_info *tinfo,
+ } else {
+ ops->address(data, addr, 0);
+ }
+- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
++ print_ftrace_graph_addr(addr, data, ops, task, graph);
+ }
+ stack++;
+ }
+@@ -180,7 +180,7 @@ void dump_stack(void)
+ #endif
+
+ printk("Pid: %d, comm: %.20s %s %s %.*s\n",
+- current->pid, current->comm, print_tainted(),
++ task_pid_nr(current), current->comm, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+ init_utsname()->version);
+@@ -220,6 +220,8 @@ unsigned __kprobes long oops_begin(void)
+ return flags;
+ }
+
++extern void gr_handle_kernel_exploit(void);
++
+ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
+ {
+ if (regs && kexec_should_crash(current))
+@@ -241,7 +243,10 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
+ panic("Fatal exception in interrupt");
+ if (panic_on_oops)
+ panic("Fatal exception");
+- do_exit(signr);
++
++ gr_handle_kernel_exploit();
++
++ do_group_exit(signr);
+ }
+
+ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
+@@ -295,7 +300,7 @@ void die(const char *str, struct pt_regs *regs, long err)
+ unsigned long flags = oops_begin();
+ int sig = SIGSEGV;
+
+- if (!user_mode_vm(regs))
++ if (!user_mode(regs))
+ report_bug(regs->ip, regs);
+
+ if (__die(str, regs, err))
+diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h
+index 81086c2..13e8b17 100644
+--- a/arch/x86/kernel/dumpstack.h
++++ b/arch/x86/kernel/dumpstack.h
+@@ -15,7 +15,7 @@
+ #endif
+
+ extern unsigned long
+-print_context_stack(struct thread_info *tinfo,
++print_context_stack(struct task_struct *task, void *stack_start,
+ unsigned long *stack, unsigned long bp,
+ const struct stacktrace_ops *ops, void *data,
+ unsigned long *end, int *graph);
+diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
+index f7dd2a7..504f53b 100644
+--- a/arch/x86/kernel/dumpstack_32.c
++++ b/arch/x86/kernel/dumpstack_32.c
+@@ -53,16 +53,12 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
#endif
for (;;) {
@@ -13126,7 +14323,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x
if (ops->stack(data, "IRQ") < 0)
break;
touch_nmi_watchdog();
-@@ -112,11 +108,12 @@ void show_registers(struct pt_regs *regs
+@@ -112,11 +108,12 @@ void show_registers(struct pt_regs *regs)
* When in-kernel, we also print out the stack and code at the
* time of the fault..
*/
@@ -13140,7 +14337,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x
printk(KERN_EMERG "Stack:\n");
show_stack_log_lvl(NULL, regs, &regs->sp,
-@@ -124,10 +121,10 @@ void show_registers(struct pt_regs *regs
+@@ -124,10 +121,10 @@ void show_registers(struct pt_regs *regs)
printk(KERN_EMERG "Code: ");
@@ -13153,7 +14350,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x
code_len = code_len - code_prologue + 1;
}
for (i = 0; i < code_len; i++, ip++) {
-@@ -136,7 +133,7 @@ void show_registers(struct pt_regs *regs
+@@ -136,7 +133,7 @@ void show_registers(struct pt_regs *regs)
printk(" Bad EIP value.");
break;
}
@@ -13162,7 +14359,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x
printk("<%02x> ", c);
else
printk("%02x ", c);
-@@ -145,10 +142,23 @@ void show_registers(struct pt_regs *regs
+@@ -145,10 +142,23 @@ void show_registers(struct pt_regs *regs)
printk("\n");
}
@@ -13186,10 +14383,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_32.c linux-2.6.32.49/arch/x
if (ip < PAGE_OFFSET)
return 0;
if (probe_kernel_address((unsigned short *)ip, ud2))
-diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c
---- linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c 2011-11-18 18:01:52.000000000 -0500
-@@ -116,8 +116,8 @@ void dump_trace(struct task_struct *task
+diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
+index a071e6b..36cd585 100644
+--- a/arch/x86/kernel/dumpstack_64.c
++++ b/arch/x86/kernel/dumpstack_64.c
+@@ -116,8 +116,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
unsigned long *irq_stack_end =
(unsigned long *)per_cpu(irq_stack_ptr, cpu);
unsigned used = 0;
@@ -13199,7 +14397,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x
if (!task)
task = current;
-@@ -146,10 +146,10 @@ void dump_trace(struct task_struct *task
+@@ -146,10 +146,10 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
* current stack address. If the stacks consist of nested
* exceptions
*/
@@ -13211,7 +14409,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x
estack_end = in_exception_stack(cpu, (unsigned long)stack,
&used, &id);
-@@ -157,7 +157,7 @@ void dump_trace(struct task_struct *task
+@@ -157,7 +157,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (ops->stack(data, id) < 0)
break;
@@ -13220,7 +14418,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x
data, estack_end, &graph);
ops->stack(data, "<EOE>");
/*
-@@ -176,7 +176,7 @@ void dump_trace(struct task_struct *task
+@@ -176,7 +176,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (stack >= irq_stack && stack < irq_stack_end) {
if (ops->stack(data, "IRQ") < 0)
break;
@@ -13229,7 +14427,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x
ops, data, irq_stack_end, &graph);
/*
* We link to the next stack (which would be
-@@ -195,7 +195,8 @@ void dump_trace(struct task_struct *task
+@@ -195,7 +195,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
/*
* This handles the process stack:
*/
@@ -13290,140 +14488,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack_64.c linux-2.6.32.49/arch/x
+}
+EXPORT_SYMBOL(pax_check_alloca);
+#endif
-diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack.c linux-2.6.32.49/arch/x86/kernel/dumpstack.c
---- linux-2.6.32.49/arch/x86/kernel/dumpstack.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/dumpstack.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2,6 +2,9 @@
- * Copyright (C) 1991, 1992 Linus Torvalds
- * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
- */
-+#ifdef CONFIG_GRKERNSEC_HIDESYM
-+#define __INCLUDED_BY_HIDESYM 1
-+#endif
- #include <linux/kallsyms.h>
- #include <linux/kprobes.h>
- #include <linux/uaccess.h>
-@@ -28,7 +31,7 @@ static int die_counter;
-
- void printk_address(unsigned long address, int reliable)
- {
-- printk(" [<%p>] %s%pS\n", (void *) address,
-+ printk(" [<%p>] %s%pA\n", (void *) address,
- reliable ? "" : "? ", (void *) address);
- }
-
-@@ -36,9 +39,8 @@ void printk_address(unsigned long addres
- static void
- print_ftrace_graph_addr(unsigned long addr, void *data,
- const struct stacktrace_ops *ops,
-- struct thread_info *tinfo, int *graph)
-+ struct task_struct *task, int *graph)
- {
-- struct task_struct *task = tinfo->task;
- unsigned long ret_addr;
- int index = task->curr_ret_stack;
-
-@@ -59,7 +61,7 @@ print_ftrace_graph_addr(unsigned long ad
- static inline void
- print_ftrace_graph_addr(unsigned long addr, void *data,
- const struct stacktrace_ops *ops,
-- struct thread_info *tinfo, int *graph)
-+ struct task_struct *task, int *graph)
- { }
- #endif
-
-@@ -70,10 +72,8 @@ print_ftrace_graph_addr(unsigned long ad
- * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
- */
-
--static inline int valid_stack_ptr(struct thread_info *tinfo,
-- void *p, unsigned int size, void *end)
-+static inline int valid_stack_ptr(void *t, void *p, unsigned int size, void *end)
- {
-- void *t = tinfo;
- if (end) {
- if (p < end && p >= (end-THREAD_SIZE))
- return 1;
-@@ -84,14 +84,14 @@ static inline int valid_stack_ptr(struct
- }
-
- unsigned long
--print_context_stack(struct thread_info *tinfo,
-+print_context_stack(struct task_struct *task, void *stack_start,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- unsigned long *end, int *graph)
- {
- struct stack_frame *frame = (struct stack_frame *)bp;
-
-- while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
-+ while (valid_stack_ptr(stack_start, stack, sizeof(*stack), end)) {
- unsigned long addr;
-
- addr = *stack;
-@@ -103,7 +103,7 @@ print_context_stack(struct thread_info *
- } else {
- ops->address(data, addr, 0);
- }
-- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
-+ print_ftrace_graph_addr(addr, data, ops, task, graph);
- }
- stack++;
- }
-@@ -180,7 +180,7 @@ void dump_stack(void)
- #endif
-
- printk("Pid: %d, comm: %.20s %s %s %.*s\n",
-- current->pid, current->comm, print_tainted(),
-+ task_pid_nr(current), current->comm, print_tainted(),
- init_utsname()->release,
- (int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
-@@ -220,6 +220,8 @@ unsigned __kprobes long oops_begin(void)
- return flags;
- }
-
-+extern void gr_handle_kernel_exploit(void);
-+
- void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
- {
- if (regs && kexec_should_crash(current))
-@@ -241,7 +243,10 @@ void __kprobes oops_end(unsigned long fl
- panic("Fatal exception in interrupt");
- if (panic_on_oops)
- panic("Fatal exception");
-- do_exit(signr);
-+
-+ gr_handle_kernel_exploit();
-+
-+ do_group_exit(signr);
- }
-
- int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-@@ -295,7 +300,7 @@ void die(const char *str, struct pt_regs
- unsigned long flags = oops_begin();
- int sig = SIGSEGV;
-
-- if (!user_mode_vm(regs))
-+ if (!user_mode(regs))
- report_bug(regs->ip, regs);
-
- if (__die(str, regs, err))
-diff -urNp linux-2.6.32.49/arch/x86/kernel/dumpstack.h linux-2.6.32.49/arch/x86/kernel/dumpstack.h
---- linux-2.6.32.49/arch/x86/kernel/dumpstack.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/dumpstack.h 2011-11-15 19:59:43.000000000 -0500
-@@ -15,7 +15,7 @@
- #endif
-
- extern unsigned long
--print_context_stack(struct thread_info *tinfo,
-+print_context_stack(struct task_struct *task, void *stack_start,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- unsigned long *end, int *graph);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/e820.c linux-2.6.32.49/arch/x86/kernel/e820.c
---- linux-2.6.32.49/arch/x86/kernel/e820.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/e820.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
+index a89739a..95e0c48 100644
+--- a/arch/x86/kernel/e820.c
++++ b/arch/x86/kernel/e820.c
@@ -733,7 +733,7 @@ struct early_res {
};
static struct early_res early_res[MAX_EARLY_RES] __initdata = {
@@ -13433,9 +14501,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/e820.c linux-2.6.32.49/arch/x86/kerne
};
static int __init find_overlapped_early(u64 start, u64 end)
-diff -urNp linux-2.6.32.49/arch/x86/kernel/early_printk.c linux-2.6.32.49/arch/x86/kernel/early_printk.c
---- linux-2.6.32.49/arch/x86/kernel/early_printk.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/early_printk.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
+index b9c830c..1e41a96 100644
+--- a/arch/x86/kernel/early_printk.c
++++ b/arch/x86/kernel/early_printk.c
@@ -7,6 +7,7 @@
#include <linux/pci_regs.h>
#include <linux/pci_ids.h>
@@ -13444,7 +14513,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/early_printk.c linux-2.6.32.49/arch/x
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/fcntl.h>
-@@ -170,6 +171,8 @@ asmlinkage void early_printk(const char
+@@ -170,6 +171,8 @@ asmlinkage void early_printk(const char *fmt, ...)
int n;
va_list ap;
@@ -13453,9 +14522,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/early_printk.c linux-2.6.32.49/arch/x
va_start(ap, fmt);
n = vscnprintf(buf, sizeof(buf), fmt, ap);
early_console->write(early_console, buf, n);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_32.c linux-2.6.32.49/arch/x86/kernel/efi_32.c
---- linux-2.6.32.49/arch/x86/kernel/efi_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/efi_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c
+index 5cab48e..b025f9b 100644
+--- a/arch/x86/kernel/efi_32.c
++++ b/arch/x86/kernel/efi_32.c
@@ -38,70 +38,56 @@
*/
@@ -13470,10 +14540,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_32.c linux-2.6.32.49/arch/x86/ker
- unsigned long temp;
struct desc_ptr gdt_descr;
-- local_irq_save(efi_rt_eflags);
+#ifdef CONFIG_PAX_KERNEXEC
+ struct desc_struct d;
+#endif
++
+ local_irq_save(efi_rt_eflags);
- /*
- * If I don't have PAE, I should just duplicate two entries in page
@@ -13481,8 +14552,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_32.c linux-2.6.32.49/arch/x86/ker
- * page directory.
- */
- cr4 = read_cr4_safe();
-+ local_irq_save(efi_rt_eflags);
-
+-
- if (cr4 & X86_CR4_PAE) {
- efi_bak_pg_dir_pointer[0].pgd =
- swapper_pg_dir[pgd_index(0)].pgd;
@@ -13553,9 +14623,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_32.c linux-2.6.32.49/arch/x86/ker
/*
* After the lock is released, the original page table is restored.
-diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_32.S linux-2.6.32.49/arch/x86/kernel/efi_stub_32.S
---- linux-2.6.32.49/arch/x86/kernel/efi_stub_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/efi_stub_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/efi_stub_32.S b/arch/x86/kernel/efi_stub_32.S
+index fbe66e6..c5c0dd2 100644
+--- a/arch/x86/kernel/efi_stub_32.S
++++ b/arch/x86/kernel/efi_stub_32.S
@@ -6,7 +6,9 @@
*/
@@ -13664,9 +14735,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_32.S linux-2.6.32.49/arch/x8
saved_return_addr:
.long 0
efi_rt_function_ptr:
-diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S
---- linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/efi_stub_64.S b/arch/x86/kernel/efi_stub_64.S
+index 4c07cca..2c8427d 100644
+--- a/arch/x86/kernel/efi_stub_64.S
++++ b/arch/x86/kernel/efi_stub_64.S
@@ -7,6 +7,7 @@
*/
@@ -13679,7 +14751,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $32, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call0)
@@ -13687,7 +14759,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $32, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call1)
@@ -13695,7 +14767,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $32, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call2)
@@ -13703,7 +14775,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $32, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call3)
@@ -13711,7 +14783,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $32, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call4)
@@ -13719,7 +14791,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $48, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call5)
@@ -13727,12 +14799,13 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/efi_stub_64.S linux-2.6.32.49/arch/x8
call *%rdi
addq $48, %rsp
RESTORE_XMM
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call6)
-diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_32.S linux-2.6.32.49/arch/x86/kernel/entry_32.S
---- linux-2.6.32.49/arch/x86/kernel/entry_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/entry_32.S 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
+index c097e7d..c689cf4 100644
+--- a/arch/x86/kernel/entry_32.S
++++ b/arch/x86/kernel/entry_32.S
@@ -185,13 +185,146 @@
/*CFI_REL_OFFSET gs, PT_GS*/
.endm
@@ -14497,9 +15570,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_32.S linux-2.6.32.49/arch/x86/k
/*
* End of kprobes section
-diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/kernel/entry_64.S
---- linux-2.6.32.49/arch/x86/kernel/entry_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/entry_64.S 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
+index 34a56a9..a4abbbe 100644
+--- a/arch/x86/kernel/entry_64.S
++++ b/arch/x86/kernel/entry_64.S
@@ -53,6 +53,8 @@
#include <asm/paravirt.h>
#include <asm/ftrace.h>
@@ -14573,7 +15647,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
retq
#endif
-@@ -174,6 +182,269 @@ ENTRY(native_usergs_sysret64)
+@@ -174,6 +182,282 @@ ENTRY(native_usergs_sysret64)
ENDPROC(native_usergs_sysret64)
#endif /* CONFIG_PARAVIRT */
@@ -14592,6 +15666,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ .endm
+
+ .macro pax_enter_kernel
++ pax_set_fptr_mask
+#ifdef CONFIG_PAX_KERNEXEC
+ call pax_enter_kernel
+#endif
@@ -14613,14 +15688,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+
+ GET_CR0_INTO_RDI
+ bts $16,%rdi
-+ jnc 1f
++ jnc 3f
+ mov %cs,%edi
+ cmp $__KERNEL_CS,%edi
-+ jz 3f
-+ ljmpq __KERNEL_CS,3f
-+1: ljmpq __KERNEXEC_KERNEL_CS,2f
-+2: SET_RDI_INTO_CR0
-+3:
++ jnz 2f
++1:
+
+#ifdef CONFIG_PARAVIRT
+ PV_RESTORE_REGS(CLBR_RDI)
@@ -14629,6 +15701,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ popq %rdi
+ pax_force_retaddr
+ retq
++
++2: ljmpq __KERNEL_CS,1f
++3: ljmpq __KERNEXEC_KERNEL_CS,4f
++4: SET_RDI_INTO_CR0
++ jmp 1b
+ENDPROC(pax_enter_kernel)
+
+ENTRY(pax_exit_kernel)
@@ -14640,12 +15717,8 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+
+ mov %cs,%rdi
+ cmp $__KERNEXEC_KERNEL_CS,%edi
-+ jnz 2f
-+ GET_CR0_INTO_RDI
-+ btr $16,%rdi
-+ ljmpq __KERNEL_CS,1f
-+1: SET_RDI_INTO_CR0
-+2:
++ jz 2f
++1:
+
+#ifdef CONFIG_PARAVIRT
+ PV_RESTORE_REGS(CLBR_RDI);
@@ -14654,10 +15727,24 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ popq %rdi
+ pax_force_retaddr
+ retq
++
++2: GET_CR0_INTO_RDI
++ btr $16,%rdi
++ ljmpq __KERNEL_CS,3f
++3: SET_RDI_INTO_CR0
++ jmp 1b
++#ifdef CONFIG_PARAVIRT
++ PV_RESTORE_REGS(CLBR_RDI);
++#endif
++
++ popq %rdi
++ pax_force_retaddr
++ retq
+ENDPROC(pax_exit_kernel)
+#endif
+
+ .macro pax_enter_kernel_user
++ pax_set_fptr_mask
+#ifdef CONFIG_PAX_MEMORY_UDEREF
+ call pax_enter_kernel_user
+#endif
@@ -14790,16 +15877,16 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+
+#ifdef CONFIG_PAX_MEMORY_STACKLEAK
+/*
-+ * r10: thread_info
++ * r11: thread_info
+ * rcx, rdx: can be clobbered
+ */
+ENTRY(pax_erase_kstack)
+ pushq %rdi
+ pushq %rax
-+ pushq %r10
++ pushq %r11
+
-+ GET_THREAD_INFO(%r10)
-+ mov TI_lowest_stack(%r10), %rdi
++ GET_THREAD_INFO(%r11)
++ mov TI_lowest_stack(%r11), %rdi
+ mov $-0xBEEF, %rax
+ std
+
@@ -14829,11 +15916,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ shr $3, %ecx
+ rep stosq
+
-+ mov TI_task_thread_sp0(%r10), %rdi
++ mov TI_task_thread_sp0(%r11), %rdi
+ sub $256, %rdi
-+ mov %rdi, TI_lowest_stack(%r10)
++ mov %rdi, TI_lowest_stack(%r11)
+
-+ popq %r10
++ popq %r11
+ popq %rax
+ popq %rdi
+ pax_force_retaddr
@@ -14843,7 +15930,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.macro TRACE_IRQS_IRETQ offset=ARGOFFSET
#ifdef CONFIG_TRACE_IRQFLAGS
-@@ -317,7 +588,7 @@ ENTRY(save_args)
+@@ -317,7 +601,7 @@ ENTRY(save_args)
leaq -ARGOFFSET+16(%rsp),%rdi /* arg1 for handler */
movq_cfi rbp, 8 /* push %rbp */
leaq 8(%rsp), %rbp /* mov %rsp, %ebp */
@@ -14852,7 +15939,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
je 1f
SWAPGS
/*
-@@ -337,9 +608,10 @@ ENTRY(save_args)
+@@ -337,9 +621,10 @@ ENTRY(save_args)
* We entered an interrupt context - irqs are off:
*/
2: TRACE_IRQS_OFF
@@ -14864,7 +15951,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
ENTRY(save_rest)
PARTIAL_FRAME 1 REST_SKIP+8
-@@ -352,9 +624,10 @@ ENTRY(save_rest)
+@@ -352,9 +637,10 @@ ENTRY(save_rest)
movq_cfi r15, R15+16
movq %r11, 8(%rsp) /* return address */
FIXUP_TOP_OF_STACK %r11, 16
@@ -14876,12 +15963,12 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/* save complete stack frame */
.pushsection .kprobes.text, "ax"
-@@ -383,9 +656,10 @@ ENTRY(save_paranoid)
+@@ -383,9 +669,10 @@ ENTRY(save_paranoid)
js 1f /* negative -> in kernel */
SWAPGS
xorl %ebx,%ebx
-1: ret
-+1: pax_force_retaddr
++1: pax_force_retaddr_bts
+ ret
CFI_ENDPROC
-END(save_paranoid)
@@ -14889,7 +15976,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.popsection
/*
-@@ -409,7 +683,7 @@ ENTRY(ret_from_fork)
+@@ -409,7 +696,7 @@ ENTRY(ret_from_fork)
RESTORE_REST
@@ -14898,7 +15985,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
je int_ret_from_sys_call
testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET
-@@ -419,7 +693,7 @@ ENTRY(ret_from_fork)
+@@ -419,7 +706,7 @@ ENTRY(ret_from_fork)
jmp ret_from_sys_call # go to the SYSRET fastpath
CFI_ENDPROC
@@ -14907,7 +15994,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* System call entry. Upto 6 arguments in registers are supported.
-@@ -455,7 +729,7 @@ END(ret_from_fork)
+@@ -455,7 +742,7 @@ END(ret_from_fork)
ENTRY(system_call)
CFI_STARTPROC simple
CFI_SIGNAL_FRAME
@@ -14916,10 +16003,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
CFI_REGISTER rip,rcx
/*CFI_REGISTER rflags,r11*/
SWAPGS_UNSAFE_STACK
-@@ -468,12 +742,13 @@ ENTRY(system_call_after_swapgs)
+@@ -468,12 +755,13 @@ ENTRY(system_call_after_swapgs)
movq %rsp,PER_CPU_VAR(old_rsp)
movq PER_CPU_VAR(kernel_stack),%rsp
++ SAVE_ARGS 8*6,1
+ pax_enter_kernel_user
/*
* No need to follow this irqs off/on section - it's straight
@@ -14927,11 +16015,19 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
*/
ENABLE_INTERRUPTS(CLBR_NONE)
- SAVE_ARGS 8,1
-+ SAVE_ARGS 8*6,1
movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
movq %rcx,RIP-ARGOFFSET(%rsp)
CFI_REL_OFFSET rip,RIP-ARGOFFSET
-@@ -502,6 +777,8 @@ sysret_check:
+@@ -483,7 +771,7 @@ ENTRY(system_call_after_swapgs)
+ system_call_fastpath:
+ cmpq $__NR_syscall_max,%rax
+ ja badsys
+- movq %r10,%rcx
++ movq R10-ARGOFFSET(%rsp),%rcx
+ call *sys_call_table(,%rax,8) # XXX: rip relative
+ movq %rax,RAX-ARGOFFSET(%rsp)
+ /*
+@@ -502,6 +790,8 @@ sysret_check:
andl %edi,%edx
jnz sysret_careful
CFI_REMEMBER_STATE
@@ -14940,7 +16036,15 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* sysretq will re-enable interrupts:
*/
-@@ -562,6 +839,9 @@ auditsys:
+@@ -555,14 +845,18 @@ badsys:
+ * jump back to the normal fast path.
+ */
+ auditsys:
+- movq %r10,%r9 /* 6th arg: 4th syscall arg */
++ movq R10-ARGOFFSET(%rsp),%r9 /* 6th arg: 4th syscall arg */
+ movq %rdx,%r8 /* 5th arg: 3rd syscall arg */
+ movq %rsi,%rcx /* 4th arg: 2nd syscall arg */
+ movq %rdi,%rdx /* 3rd arg: 1st syscall arg */
movq %rax,%rsi /* 2nd arg: syscall number */
movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */
call audit_syscall_entry
@@ -14948,9 +16052,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ pax_erase_kstack
+
LOAD_ARGS 0 /* reload call-clobbered registers */
++ pax_set_fptr_mask
jmp system_call_fastpath
-@@ -592,6 +872,9 @@ tracesys:
+ /*
+@@ -592,16 +886,20 @@ tracesys:
FIXUP_TOP_OF_STACK %rdi
movq %rsp,%rdi
call syscall_trace_enter
@@ -14960,7 +16066,19 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* Reload arg registers from stack in case ptrace changed them.
* We don't reload %rax because syscall_trace_enter() returned
-@@ -613,7 +896,7 @@ tracesys:
+ * the value it wants us to use in the table lookup.
+ */
+ LOAD_ARGS ARGOFFSET, 1
++ pax_set_fptr_mask
+ RESTORE_REST
+ cmpq $__NR_syscall_max,%rax
+ ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */
+- movq %r10,%rcx /* fixup for C */
++ movq R10-ARGOFFSET(%rsp),%rcx /* fixup for C */
+ call *sys_call_table(,%rax,8)
+ movq %rax,RAX-ARGOFFSET(%rsp)
+ /* Use IRET because user could have changed frame */
+@@ -613,7 +911,7 @@ tracesys:
GLOBAL(int_ret_from_sys_call)
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
@@ -14969,7 +16087,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
je retint_restore_args
movl $_TIF_ALLWORK_MASK,%edi
/* edi: mask to check */
-@@ -674,7 +957,7 @@ int_restore_rest:
+@@ -674,7 +972,7 @@ int_restore_rest:
TRACE_IRQS_OFF
jmp int_with_check
CFI_ENDPROC
@@ -14978,7 +16096,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* Certain special system calls that need to save a complete full stack frame.
-@@ -690,7 +973,7 @@ ENTRY(\label)
+@@ -690,7 +988,7 @@ ENTRY(\label)
call \func
jmp ptregscall_common
CFI_ENDPROC
@@ -14987,7 +16105,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
PTREGSCALL stub_clone, sys_clone, %r8
-@@ -708,9 +991,10 @@ ENTRY(ptregscall_common)
+@@ -708,9 +1006,10 @@ ENTRY(ptregscall_common)
movq_cfi_restore R12+8, r12
movq_cfi_restore RBP+8, rbp
movq_cfi_restore RBX+8, rbx
@@ -14999,7 +16117,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
ENTRY(stub_execve)
CFI_STARTPROC
-@@ -726,7 +1010,7 @@ ENTRY(stub_execve)
+@@ -726,7 +1025,7 @@ ENTRY(stub_execve)
RESTORE_REST
jmp int_ret_from_sys_call
CFI_ENDPROC
@@ -15008,7 +16126,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* sigreturn is special because it needs to restore all registers on return.
-@@ -744,7 +1028,7 @@ ENTRY(stub_rt_sigreturn)
+@@ -744,7 +1043,7 @@ ENTRY(stub_rt_sigreturn)
RESTORE_REST
jmp int_ret_from_sys_call
CFI_ENDPROC
@@ -15017,7 +16135,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* Build the entry stubs and pointer table with some assembler magic.
-@@ -780,7 +1064,7 @@ vector=vector+1
+@@ -780,7 +1079,7 @@ vector=vector+1
2: jmp common_interrupt
.endr
CFI_ENDPROC
@@ -15026,7 +16144,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.previous
END(interrupt)
-@@ -800,6 +1084,16 @@ END(interrupt)
+@@ -800,6 +1099,16 @@ END(interrupt)
CFI_ADJUST_CFA_OFFSET 10*8
call save_args
PARTIAL_FRAME 0
@@ -15043,7 +16161,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
call \func
.endm
-@@ -822,7 +1116,7 @@ ret_from_intr:
+@@ -822,7 +1131,7 @@ ret_from_intr:
CFI_ADJUST_CFA_OFFSET -8
exit_intr:
GET_THREAD_INFO(%rcx)
@@ -15052,7 +16170,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
je retint_kernel
/* Interrupt came from user space */
-@@ -844,12 +1138,16 @@ retint_swapgs: /* return to user-space
+@@ -844,12 +1153,16 @@ retint_swapgs: /* return to user-space */
* The iretq could re-enable interrupts:
*/
DISABLE_INTERRUPTS(CLBR_ANY)
@@ -15069,7 +16187,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* The iretq could re-enable interrupts:
*/
-@@ -940,7 +1238,7 @@ ENTRY(retint_kernel)
+@@ -940,7 +1253,7 @@ ENTRY(retint_kernel)
#endif
CFI_ENDPROC
@@ -15078,7 +16196,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* APIC interrupts.
-@@ -953,7 +1251,7 @@ ENTRY(\sym)
+@@ -953,7 +1266,7 @@ ENTRY(\sym)
interrupt \do_sym
jmp ret_from_intr
CFI_ENDPROC
@@ -15087,7 +16205,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
#ifdef CONFIG_SMP
-@@ -1032,12 +1330,22 @@ ENTRY(\sym)
+@@ -1032,12 +1345,22 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET 15*8
call error_entry
DEFAULT_FRAME 0
@@ -15111,7 +16229,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
.macro paranoidzeroentry sym do_sym
-@@ -1049,12 +1357,22 @@ ENTRY(\sym)
+@@ -1049,12 +1372,22 @@ ENTRY(\sym)
subq $15*8, %rsp
call save_paranoid
TRACE_IRQS_OFF
@@ -15135,7 +16253,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
.macro paranoidzeroentry_ist sym do_sym ist
-@@ -1066,15 +1384,30 @@ ENTRY(\sym)
+@@ -1066,15 +1399,30 @@ ENTRY(\sym)
subq $15*8, %rsp
call save_paranoid
TRACE_IRQS_OFF
@@ -15168,7 +16286,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
.macro errorentry sym do_sym
-@@ -1085,13 +1418,23 @@ ENTRY(\sym)
+@@ -1085,13 +1433,23 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET 15*8
call error_entry
DEFAULT_FRAME 0
@@ -15193,7 +16311,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
/* error code is on the stack already */
-@@ -1104,13 +1447,23 @@ ENTRY(\sym)
+@@ -1104,13 +1462,23 @@ ENTRY(\sym)
call save_paranoid
DEFAULT_FRAME 0
TRACE_IRQS_OFF
@@ -15218,7 +16336,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.endm
zeroentry divide_error do_divide_error
-@@ -1141,9 +1494,10 @@ gs_change:
+@@ -1141,9 +1509,10 @@ gs_change:
SWAPGS
popf
CFI_ADJUST_CFA_OFFSET -8
@@ -15230,7 +16348,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
.section __ex_table,"a"
.align 8
-@@ -1195,9 +1549,10 @@ ENTRY(kernel_thread)
+@@ -1195,9 +1564,10 @@ ENTRY(kernel_thread)
*/
RESTORE_ALL
UNFAKE_STACK_FRAME
@@ -15242,7 +16360,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
ENTRY(child_rip)
pushq $0 # fake return address
-@@ -1208,13 +1563,14 @@ ENTRY(child_rip)
+@@ -1208,13 +1578,14 @@ ENTRY(child_rip)
*/
movq %rdi, %rax
movq %rsi, %rdi
@@ -15258,7 +16376,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* execve(). This function needs to use IRET, not SYSRET, to set up all state properly.
-@@ -1243,9 +1599,10 @@ ENTRY(kernel_execve)
+@@ -1243,9 +1614,10 @@ ENTRY(kernel_execve)
je int_ret_from_sys_call
RESTORE_ARGS
UNFAKE_STACK_FRAME
@@ -15270,7 +16388,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/* Call softirq on interrupt stack. Interrupts are off. */
ENTRY(call_softirq)
-@@ -1263,9 +1620,10 @@ ENTRY(call_softirq)
+@@ -1263,9 +1635,10 @@ ENTRY(call_softirq)
CFI_DEF_CFA_REGISTER rsp
CFI_ADJUST_CFA_OFFSET -8
decl PER_CPU_VAR(irq_count)
@@ -15282,7 +16400,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
#ifdef CONFIG_XEN
zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
-@@ -1303,7 +1661,7 @@ ENTRY(xen_do_hypervisor_callback) # do
+@@ -1303,7 +1676,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs)
decl PER_CPU_VAR(irq_count)
jmp error_exit
CFI_ENDPROC
@@ -15291,7 +16409,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* Hypervisor uses this for application faults while it executes.
-@@ -1362,7 +1720,7 @@ ENTRY(xen_failsafe_callback)
+@@ -1362,7 +1735,7 @@ ENTRY(xen_failsafe_callback)
SAVE_ALL
jmp error_exit
CFI_ENDPROC
@@ -15300,7 +16418,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
#endif /* CONFIG_XEN */
-@@ -1405,16 +1763,31 @@ ENTRY(paranoid_exit)
+@@ -1405,16 +1778,31 @@ ENTRY(paranoid_exit)
TRACE_IRQS_OFF
testl %ebx,%ebx /* swapgs needed? */
jnz paranoid_restore
@@ -15312,7 +16430,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ TRACE_IRQS_IRETQ 0
+ SWAPGS_UNSAFE_STACK
+ RESTORE_ALL 8
-+ pax_force_retaddr
++ pax_force_retaddr_bts
+ jmp irq_return
+#endif
paranoid_swapgs:
@@ -15329,11 +16447,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ pax_exit_kernel
TRACE_IRQS_IRETQ 0
RESTORE_ALL 8
-+ pax_force_retaddr
++ pax_force_retaddr_bts
jmp irq_return
paranoid_userspace:
GET_THREAD_INFO(%rcx)
-@@ -1443,7 +1816,7 @@ paranoid_schedule:
+@@ -1443,7 +1831,7 @@ paranoid_schedule:
TRACE_IRQS_OFF
jmp paranoid_userspace
CFI_ENDPROC
@@ -15342,7 +16460,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* Exception entry point. This expects an error code/orig_rax on the stack.
-@@ -1470,12 +1843,13 @@ ENTRY(error_entry)
+@@ -1470,12 +1858,13 @@ ENTRY(error_entry)
movq_cfi r14, R14+8
movq_cfi r15, R15+8
xorl %ebx,%ebx
@@ -15353,11 +16471,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
SWAPGS
error_sti:
TRACE_IRQS_OFF
-+ pax_force_retaddr
++ pax_force_retaddr_bts
ret
CFI_ENDPROC
-@@ -1497,7 +1871,7 @@ error_kernelspace:
+@@ -1497,7 +1886,7 @@ error_kernelspace:
cmpq $gs_change,RIP+8(%rsp)
je error_swapgs
jmp error_sti
@@ -15366,7 +16484,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */
-@@ -1517,7 +1891,7 @@ ENTRY(error_exit)
+@@ -1517,7 +1906,7 @@ ENTRY(error_exit)
jnz retint_careful
jmp retint_swapgs
CFI_ENDPROC
@@ -15375,7 +16493,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/* runs on exception stack */
-@@ -1529,6 +1903,16 @@ ENTRY(nmi)
+@@ -1529,6 +1918,16 @@ ENTRY(nmi)
CFI_ADJUST_CFA_OFFSET 15*8
call save_paranoid
DEFAULT_FRAME 0
@@ -15392,7 +16510,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
movq %rsp,%rdi
movq $-1,%rsi
-@@ -1539,12 +1923,28 @@ ENTRY(nmi)
+@@ -1539,12 +1938,28 @@ ENTRY(nmi)
DISABLE_INTERRUPTS(CLBR_NONE)
testl %ebx,%ebx /* swapgs needed? */
jnz nmi_restore
@@ -15403,7 +16521,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
+ pax_exit_kernel
+ SWAPGS_UNSAFE_STACK
+ RESTORE_ALL 8
-+ pax_force_retaddr
++ pax_force_retaddr_bts
+ jmp irq_return
+#endif
nmi_swapgs:
@@ -15418,11 +16536,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
nmi_restore:
+ pax_exit_kernel
RESTORE_ALL 8
-+ pax_force_retaddr
++ pax_force_retaddr_bts
jmp irq_return
nmi_userspace:
GET_THREAD_INFO(%rcx)
-@@ -1573,14 +1973,14 @@ nmi_schedule:
+@@ -1573,14 +1988,14 @@ nmi_schedule:
jmp paranoid_exit
CFI_ENDPROC
#endif
@@ -15439,10 +16557,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/entry_64.S linux-2.6.32.49/arch/x86/k
/*
* End of kprobes section
-diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/kernel/ftrace.c
---- linux-2.6.32.49/arch/x86/kernel/ftrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/ftrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -103,7 +103,7 @@ static void *mod_code_ip; /* holds the
+diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
+index 9dbb527..7b3615a 100644
+--- a/arch/x86/kernel/ftrace.c
++++ b/arch/x86/kernel/ftrace.c
+@@ -103,7 +103,7 @@ static void *mod_code_ip; /* holds the IP to write to */
static void *mod_code_newcode; /* holds the text to write to the IP */
static unsigned nmi_wait_count;
@@ -15451,7 +16570,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
int ftrace_arch_read_dyn_info(char *buf, int size)
{
-@@ -111,7 +111,7 @@ int ftrace_arch_read_dyn_info(char *buf,
+@@ -111,7 +111,7 @@ int ftrace_arch_read_dyn_info(char *buf, int size)
r = snprintf(buf, size, "%u %u",
nmi_wait_count,
@@ -15472,7 +16591,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
}
/* Must have previous changes seen before executions */
smp_mb();
-@@ -215,7 +217,7 @@ do_ftrace_mod_code(unsigned long ip, voi
+@@ -215,7 +217,7 @@ do_ftrace_mod_code(unsigned long ip, void *new_code)
@@ -15481,7 +16600,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
static unsigned char *ftrace_nop_replace(void)
{
-@@ -228,6 +230,8 @@ ftrace_modify_code(unsigned long ip, uns
+@@ -228,6 +230,8 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code,
{
unsigned char replaced[MCOUNT_INSN_SIZE];
@@ -15490,7 +16609,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
/*
* Note: Due to modules and __init, code can
* disappear and change, we need to protect against faulting
-@@ -284,7 +288,7 @@ int ftrace_update_ftrace_func(ftrace_fun
+@@ -284,7 +288,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
unsigned char old[MCOUNT_INSN_SIZE], *new;
int ret;
@@ -15499,7 +16618,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
new = ftrace_call_replace(ip, (unsigned long)func);
ret = ftrace_modify_code(ip, old, new);
-@@ -337,15 +341,15 @@ int __init ftrace_dyn_arch_init(void *da
+@@ -337,15 +341,15 @@ int __init ftrace_dyn_arch_init(void *data)
switch (faulted) {
case 0:
pr_info("ftrace: converting mcount calls to 0f 1f 44 00 00\n");
@@ -15518,7 +16637,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
break;
}
-@@ -366,6 +370,8 @@ static int ftrace_mod_jmp(unsigned long
+@@ -366,6 +370,8 @@ static int ftrace_mod_jmp(unsigned long ip,
{
unsigned char code[MCOUNT_INSN_SIZE];
@@ -15527,9 +16646,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ftrace.c linux-2.6.32.49/arch/x86/ker
if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
return -EFAULT;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/head32.c linux-2.6.32.49/arch/x86/kernel/head32.c
---- linux-2.6.32.49/arch/x86/kernel/head32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/head32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
+index 4f8e250..df24706 100644
+--- a/arch/x86/kernel/head32.c
++++ b/arch/x86/kernel/head32.c
@@ -16,6 +16,7 @@
#include <asm/apic.h>
#include <asm/io_apic.h>
@@ -15547,9 +16667,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head32.c linux-2.6.32.49/arch/x86/ker
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
-diff -urNp linux-2.6.32.49/arch/x86/kernel/head_32.S linux-2.6.32.49/arch/x86/kernel/head_32.S
---- linux-2.6.32.49/arch/x86/kernel/head_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/head_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
+index 34c3308..6fc4e76 100644
+--- a/arch/x86/kernel/head_32.S
++++ b/arch/x86/kernel/head_32.S
@@ -19,10 +19,17 @@
#include <asm/setup.h>
#include <asm/processor-flags.h>
@@ -15581,7 +16702,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_32.S linux-2.6.32.49/arch/x86/ke
/* Enough space to fit pagetables for the low memory linear map */
MAPPING_BEYOND_END = \
-@@ -73,6 +76,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P
+@@ -73,6 +76,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_PAGES) * PAGE_SIZE_asm
RESERVE_BRK(pagetables, INIT_MAP_SIZE)
/*
@@ -16071,18 +17192,20 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_32.S linux-2.6.32.49/arch/x86/ke
+ /* Be sure this is zeroed to avoid false validations in Xen */
+ .fill PAGE_SIZE_asm - GDT_SIZE,1,0
+ .endr
-diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/kernel/head_64.S
---- linux-2.6.32.49/arch/x86/kernel/head_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/head_64.S 2011-11-15 19:59:43.000000000 -0500
-@@ -19,6 +19,7 @@
+diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
+index 780cd92..564ca35 100644
+--- a/arch/x86/kernel/head_64.S
++++ b/arch/x86/kernel/head_64.S
+@@ -19,6 +19,8 @@
#include <asm/cache.h>
#include <asm/processor-flags.h>
#include <asm/percpu.h>
+#include <asm/cpufeature.h>
++#include <asm/alternative-asm.h>
#ifdef CONFIG_PARAVIRT
#include <asm/asm-offsets.h>
-@@ -38,6 +39,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET
+@@ -38,6 +40,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET)
L3_PAGE_OFFSET = pud_index(__PAGE_OFFSET)
L4_START_KERNEL = pgd_index(__START_KERNEL_map)
L3_START_KERNEL = pud_index(__START_KERNEL_map)
@@ -16093,7 +17216,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
.text
__HEAD
-@@ -85,35 +90,22 @@ startup_64:
+@@ -85,35 +91,22 @@ startup_64:
*/
addq %rbp, init_level4_pgt + 0(%rip)
addq %rbp, init_level4_pgt + (L4_PAGE_OFFSET*8)(%rip)
@@ -16108,12 +17231,9 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
- addq %rbp, level3_kernel_pgt + (510*8)(%rip)
- addq %rbp, level3_kernel_pgt + (511*8)(%rip)
-+ addq %rbp, level3_vmemmap_pgt + (L3_VMEMMAP_START*8)(%rip)
-
+-
- addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
-+ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8)(%rip)
-+ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8+8)(%rip)
-
+-
- /* Add an Identity mapping if I am above 1G */
- leaq _text(%rip), %rdi
- andq $PMD_PAGE_MASK, %rdi
@@ -16122,11 +17242,14 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
- shrq $PUD_SHIFT, %rax
- andq $(PTRS_PER_PUD - 1), %rax
- jz ident_complete
--
++ addq %rbp, level3_vmemmap_pgt + (L3_VMEMMAP_START*8)(%rip)
+
- leaq (level2_spare_pgt - __START_KERNEL_map + _KERNPG_TABLE)(%rbp), %rdx
- leaq level3_ident_pgt(%rip), %rbx
- movq %rdx, 0(%rbx, %rax, 8)
--
++ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8)(%rip)
++ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8+8)(%rip)
+
- movq %rdi, %rax
- shrq $PMD_SHIFT, %rax
- andq $(PTRS_PER_PMD - 1), %rax
@@ -16139,7 +17262,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
/*
* Fixup the kernel text+data virtual addresses. Note that
-@@ -161,8 +153,8 @@ ENTRY(secondary_startup_64)
+@@ -161,8 +154,8 @@ ENTRY(secondary_startup_64)
* after the boot processor executes this code.
*/
@@ -16150,7 +17273,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
movq %rax, %cr4
/* Setup early boot stage 4 level pagetables. */
-@@ -184,9 +176,13 @@ ENTRY(secondary_startup_64)
+@@ -184,9 +177,15 @@ ENTRY(secondary_startup_64)
movl $MSR_EFER, %ecx
rdmsr
btsl $_EFER_SCE, %eax /* Enable System Call */
@@ -16159,13 +17282,23 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
jnc 1f
btsl $_EFER_NX, %eax
+ leaq init_level4_pgt(%rip), %rdi
++#ifndef CONFIG_EFI
+ btsq $_PAGE_BIT_NX, 8*L4_PAGE_OFFSET(%rdi)
++#endif
+ btsq $_PAGE_BIT_NX, 8*L4_VMALLOC_START(%rdi)
+ btsq $_PAGE_BIT_NX, 8*L4_VMEMMAP_START(%rdi)
1: wrmsr /* Make changes effective */
/* Setup cr0 */
-@@ -262,16 +258,16 @@ ENTRY(secondary_startup_64)
+@@ -249,6 +248,7 @@ ENTRY(secondary_startup_64)
+ * jump. In addition we need to ensure %cs is set so we make this
+ * a far return.
+ */
++ pax_set_fptr_mask
+ movq initial_code(%rip),%rax
+ pushq $0 # fake return address to stop unwinder
+ pushq $__KERNEL_CS # set correct cs
+@@ -262,16 +262,16 @@ ENTRY(secondary_startup_64)
.quad x86_64_start_kernel
ENTRY(initial_gs)
.quad INIT_PER_CPU_VAR(irq_stack_union)
@@ -16184,7 +17317,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
#ifdef CONFIG_EARLY_PRINTK
.globl early_idt_handlers
early_idt_handlers:
-@@ -316,18 +312,23 @@ ENTRY(early_idt_handler)
+@@ -316,18 +316,23 @@ ENTRY(early_idt_handler)
#endif /* EARLY_PRINTK */
1: hlt
jmp 1b
@@ -16209,7 +17342,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
#define NEXT_PAGE(name) \
.balign PAGE_SIZE; \
ENTRY(name)
-@@ -350,13 +351,36 @@ NEXT_PAGE(init_level4_pgt)
+@@ -350,13 +355,36 @@ NEXT_PAGE(init_level4_pgt)
.quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
.org init_level4_pgt + L4_PAGE_OFFSET*8, 0
.quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
@@ -16246,7 +17379,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
NEXT_PAGE(level3_kernel_pgt)
.fill L3_START_KERNEL,8,0
-@@ -364,20 +388,23 @@ NEXT_PAGE(level3_kernel_pgt)
+@@ -364,20 +392,23 @@ NEXT_PAGE(level3_kernel_pgt)
.quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
.quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
@@ -16278,7 +17411,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
NEXT_PAGE(level2_kernel_pgt)
/*
-@@ -390,33 +417,55 @@ NEXT_PAGE(level2_kernel_pgt)
+@@ -390,33 +421,55 @@ NEXT_PAGE(level2_kernel_pgt)
* If you want to increase this then increase MODULES_VADDR
* too.)
*/
@@ -16344,9 +17477,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/head_64.S linux-2.6.32.49/arch/x86/ke
__PAGE_ALIGNED_BSS
.align PAGE_SIZE
-diff -urNp linux-2.6.32.49/arch/x86/kernel/i386_ksyms_32.c linux-2.6.32.49/arch/x86/kernel/i386_ksyms_32.c
---- linux-2.6.32.49/arch/x86/kernel/i386_ksyms_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/i386_ksyms_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c
+index 9c3bd4a..e1d9b35 100644
+--- a/arch/x86/kernel/i386_ksyms_32.c
++++ b/arch/x86/kernel/i386_ksyms_32.c
@@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void);
EXPORT_SYMBOL(cmpxchg8b_emu);
#endif
@@ -16368,9 +17502,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/i386_ksyms_32.c linux-2.6.32.49/arch/
+#ifdef CONFIG_PAX_KERNEXEC
+EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR);
+#endif
-diff -urNp linux-2.6.32.49/arch/x86/kernel/i8259.c linux-2.6.32.49/arch/x86/kernel/i8259.c
---- linux-2.6.32.49/arch/x86/kernel/i8259.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/i8259.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
+index df89102..a244320 100644
+--- a/arch/x86/kernel/i8259.c
++++ b/arch/x86/kernel/i8259.c
@@ -208,7 +208,7 @@ spurious_8259A_irq:
"spurious 8259A interrupt: IRQ%d.\n", irq);
spurious_irq_mask |= irqmask;
@@ -16380,10 +17515,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/i8259.c linux-2.6.32.49/arch/x86/kern
/*
* Theoretically we do not have to handle this IRQ,
* but in Linux this does not cause problems and is
-diff -urNp linux-2.6.32.49/arch/x86/kernel/init_task.c linux-2.6.32.49/arch/x86/kernel/init_task.c
---- linux-2.6.32.49/arch/x86/kernel/init_task.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/init_task.c 2011-11-15 19:59:43.000000000 -0500
-@@ -20,8 +20,7 @@ static struct sighand_struct init_sighan
+diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
+index 3a54dcb..1c22348 100644
+--- a/arch/x86/kernel/init_task.c
++++ b/arch/x86/kernel/init_task.c
+@@ -20,8 +20,7 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
@@ -16401,9 +17537,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/init_task.c linux-2.6.32.49/arch/x86/
-
+struct tss_struct init_tss[NR_CPUS] ____cacheline_internodealigned_in_smp = { [0 ... NR_CPUS-1] = INIT_TSS };
+EXPORT_SYMBOL(init_tss);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/ioport.c linux-2.6.32.49/arch/x86/kernel/ioport.c
---- linux-2.6.32.49/arch/x86/kernel/ioport.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/ioport.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
+index 99c4d30..74c84e9 100644
+--- a/arch/x86/kernel/ioport.c
++++ b/arch/x86/kernel/ioport.c
@@ -6,6 +6,7 @@
#include <linux/sched.h>
#include <linux/kernel.h>
@@ -16412,7 +17549,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ioport.c linux-2.6.32.49/arch/x86/ker
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/ioport.h>
-@@ -41,6 +42,12 @@ asmlinkage long sys_ioperm(unsigned long
+@@ -41,6 +42,12 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
return -EINVAL;
@@ -16425,7 +17562,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ioport.c linux-2.6.32.49/arch/x86/ker
if (turn_on && !capable(CAP_SYS_RAWIO))
return -EPERM;
-@@ -67,7 +74,7 @@ asmlinkage long sys_ioperm(unsigned long
+@@ -67,7 +74,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
* because the ->io_bitmap_max value must match the bitmap
* contents:
*/
@@ -16434,7 +17571,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ioport.c linux-2.6.32.49/arch/x86/ker
set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
-@@ -111,6 +118,12 @@ static int do_iopl(unsigned int level, s
+@@ -111,6 +118,12 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
return -EINVAL;
/* Trying to gain more privileges? */
if (level > old) {
@@ -16447,9 +17584,48 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ioport.c linux-2.6.32.49/arch/x86/ker
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/kernel/irq_32.c
---- linux-2.6.32.49/arch/x86/kernel/irq_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/irq_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
+index 04bbd52..83a07d9 100644
+--- a/arch/x86/kernel/irq.c
++++ b/arch/x86/kernel/irq.c
+@@ -15,7 +15,7 @@
+ #include <asm/mce.h>
+ #include <asm/hw_irq.h>
+
+-atomic_t irq_err_count;
++atomic_unchecked_t irq_err_count;
+
+ /* Function pointer for generic interrupt vector handling */
+ void (*generic_interrupt_extension)(void) = NULL;
+@@ -114,9 +114,9 @@ static int show_other_interrupts(struct seq_file *p, int prec)
+ seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
+ seq_printf(p, " Machine check polls\n");
+ #endif
+- seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
++ seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read_unchecked(&irq_err_count));
+ #if defined(CONFIG_X86_IO_APIC)
+- seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
++ seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read_unchecked(&irq_mis_count));
+ #endif
+ return 0;
+ }
+@@ -209,10 +209,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
+
+ u64 arch_irq_stat(void)
+ {
+- u64 sum = atomic_read(&irq_err_count);
++ u64 sum = atomic_read_unchecked(&irq_err_count);
+
+ #ifdef CONFIG_X86_IO_APIC
+- sum += atomic_read(&irq_mis_count);
++ sum += atomic_read_unchecked(&irq_mis_count);
+ #endif
+ return sum;
+ }
+diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
+index 7d35d0f..03f1d52 100644
+--- a/arch/x86/kernel/irq_32.c
++++ b/arch/x86/kernel/irq_32.c
@@ -35,7 +35,7 @@ static int check_stack_overflow(void)
__asm__ __volatile__("andl %%esp,%0" :
"=r" (sp) : "0" (THREAD_SIZE - 1));
@@ -16459,7 +17635,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
}
static void print_stack_overflow(void)
-@@ -54,9 +54,9 @@ static inline void print_stack_overflow(
+@@ -54,9 +54,9 @@ static inline void print_stack_overflow(void) { }
* per-CPU IRQ handling contexts (thread information and stack)
*/
union irq_ctx {
@@ -16472,7 +17648,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx);
static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx);
-@@ -78,10 +78,9 @@ static void call_on_stack(void *func, vo
+@@ -78,10 +78,9 @@ static void call_on_stack(void *func, void *stack)
static inline int
execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
{
@@ -16484,7 +17660,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
irqctx = __get_cpu_var(hardirq_ctx);
/*
-@@ -90,21 +89,16 @@ execute_on_irq_stack(int overflow, struc
+@@ -90,21 +89,16 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
* handler) we can't do that and just have to keep using the
* current stack (which is the irq stack already after all)
*/
@@ -16512,7 +17688,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
if (unlikely(overflow))
call_on_stack(print_stack_overflow, isp);
-@@ -116,6 +110,11 @@ execute_on_irq_stack(int overflow, struc
+@@ -116,6 +110,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
: "0" (irq), "1" (desc), "2" (isp),
"D" (desc->handle_irq)
: "memory", "cc", "ecx");
@@ -16524,7 +17700,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
return 1;
}
-@@ -124,28 +123,11 @@ execute_on_irq_stack(int overflow, struc
+@@ -124,28 +123,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
*/
void __cpuinit irq_ctx_init(int cpu)
{
@@ -16590,47 +17766,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/irq_32.c linux-2.6.32.49/arch/x86/ker
/*
* Shouldnt happen, we returned above if in_interrupt():
*/
-diff -urNp linux-2.6.32.49/arch/x86/kernel/irq.c linux-2.6.32.49/arch/x86/kernel/irq.c
---- linux-2.6.32.49/arch/x86/kernel/irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -15,7 +15,7 @@
- #include <asm/mce.h>
- #include <asm/hw_irq.h>
-
--atomic_t irq_err_count;
-+atomic_unchecked_t irq_err_count;
-
- /* Function pointer for generic interrupt vector handling */
- void (*generic_interrupt_extension)(void) = NULL;
-@@ -114,9 +114,9 @@ static int show_other_interrupts(struct
- seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
- seq_printf(p, " Machine check polls\n");
- #endif
-- seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
-+ seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read_unchecked(&irq_err_count));
- #if defined(CONFIG_X86_IO_APIC)
-- seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
-+ seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read_unchecked(&irq_mis_count));
- #endif
- return 0;
- }
-@@ -209,10 +209,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
-
- u64 arch_irq_stat(void)
- {
-- u64 sum = atomic_read(&irq_err_count);
-+ u64 sum = atomic_read_unchecked(&irq_err_count);
-
- #ifdef CONFIG_X86_IO_APIC
-- sum += atomic_read(&irq_mis_count);
-+ sum += atomic_read_unchecked(&irq_mis_count);
- #endif
- return sum;
- }
-diff -urNp linux-2.6.32.49/arch/x86/kernel/kgdb.c linux-2.6.32.49/arch/x86/kernel/kgdb.c
---- linux-2.6.32.49/arch/x86/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/kgdb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -390,13 +390,13 @@ int kgdb_arch_handle_exception(int e_vec
+diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
+index 8d82a77..0baf312 100644
+--- a/arch/x86/kernel/kgdb.c
++++ b/arch/x86/kernel/kgdb.c
+@@ -390,13 +390,13 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
/* clear the trace bit */
linux_regs->flags &= ~X86_EFLAGS_TF;
@@ -16646,7 +17786,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kgdb.c linux-2.6.32.49/arch/x86/kerne
raw_smp_processor_id());
}
-@@ -476,7 +476,7 @@ static int __kgdb_notify(struct die_args
+@@ -476,7 +476,7 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd)
break;
case DIE_DEBUG:
@@ -16655,7 +17795,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kgdb.c linux-2.6.32.49/arch/x86/kerne
raw_smp_processor_id()) {
if (user_mode(regs))
return single_step_cont(regs, args);
-@@ -573,7 +573,7 @@ unsigned long kgdb_arch_pc(int exception
+@@ -573,7 +573,7 @@ unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs)
return instruction_pointer(regs);
}
@@ -16664,10 +17804,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kgdb.c linux-2.6.32.49/arch/x86/kerne
/* Breakpoint instruction: */
.gdb_bpt_instr = { 0xcc },
.flags = KGDB_HW_BREAKPOINT,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/kernel/kprobes.c
---- linux-2.6.32.49/arch/x86/kernel/kprobes.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/kprobes.c 2011-11-18 18:01:52.000000000 -0500
-@@ -168,9 +168,13 @@ static void __kprobes set_jmp_op(void *f
+diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
+index 7a67820..8d15b75 100644
+--- a/arch/x86/kernel/kprobes.c
++++ b/arch/x86/kernel/kprobes.c
+@@ -168,9 +168,13 @@ static void __kprobes set_jmp_op(void *from, void *to)
char op;
s32 raddr;
} __attribute__((packed)) * jop;
@@ -16682,7 +17823,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
}
/*
-@@ -195,7 +199,7 @@ static int __kprobes can_boost(kprobe_op
+@@ -195,7 +199,7 @@ static int __kprobes can_boost(kprobe_opcode_t *opcodes)
kprobe_opcode_t opcode;
kprobe_opcode_t *orig_opcodes = opcodes;
@@ -16691,7 +17832,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
return 0; /* Page fault may occur on this address. */
retry:
-@@ -339,7 +343,9 @@ static void __kprobes fix_riprel(struct
+@@ -339,7 +343,9 @@ static void __kprobes fix_riprel(struct kprobe *p)
disp = (u8 *) p->addr + *((s32 *) insn) -
(u8 *) p->ainsn.insn;
BUG_ON((s64) (s32) disp != disp); /* Sanity check. */
@@ -16701,7 +17842,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
}
}
#endif
-@@ -347,16 +353,18 @@ static void __kprobes fix_riprel(struct
+@@ -347,16 +353,18 @@ static void __kprobes fix_riprel(struct kprobe *p)
static void __kprobes arch_copy_kprobe(struct kprobe *p)
{
@@ -16723,7 +17864,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
}
int __kprobes arch_prepare_kprobe(struct kprobe *p)
-@@ -434,7 +442,7 @@ static void __kprobes prepare_singlestep
+@@ -434,7 +442,7 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
if (p->opcode == BREAKPOINT_INSTRUCTION)
regs->ip = (unsigned long)p->addr;
else
@@ -16732,7 +17873,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
}
void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
-@@ -455,7 +463,7 @@ static void __kprobes setup_singlestep(s
+@@ -455,7 +463,7 @@ static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs,
if (p->ainsn.boostable == 1 && !p->post_handler) {
/* Boost up -- we can execute copied instructions directly */
reset_current_kprobe();
@@ -16741,7 +17882,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
preempt_enable_no_resched();
return;
}
-@@ -525,7 +533,7 @@ static int __kprobes kprobe_handler(stru
+@@ -525,7 +533,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
struct kprobe_ctlblk *kcb;
addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t));
@@ -16750,7 +17891,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
/*
* The breakpoint instruction was removed right
* after we hit it. Another cpu has removed
-@@ -637,6 +645,9 @@ static void __used __kprobes kretprobe_t
+@@ -637,6 +645,9 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
/* Skip orig_ax, ip, cs */
" addq $24, %rsp\n"
" popfq\n"
@@ -16760,7 +17901,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
#else
" pushf\n"
/*
-@@ -777,7 +788,7 @@ static void __kprobes resume_execution(s
+@@ -777,7 +788,7 @@ static void __kprobes resume_execution(struct kprobe *p,
struct pt_regs *regs, struct kprobe_ctlblk *kcb)
{
unsigned long *tos = stack_addr(regs);
@@ -16769,7 +17910,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
unsigned long orig_ip = (unsigned long)p->addr;
kprobe_opcode_t *insn = p->ainsn.insn;
-@@ -960,7 +971,7 @@ int __kprobes kprobe_exceptions_notify(s
+@@ -960,7 +971,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
struct die_args *args = data;
int ret = NOTIFY_DONE;
@@ -16778,10 +17919,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kprobes.c linux-2.6.32.49/arch/x86/ke
return ret;
switch (val) {
-diff -urNp linux-2.6.32.49/arch/x86/kernel/kvm.c linux-2.6.32.49/arch/x86/kernel/kvm.c
---- linux-2.6.32.49/arch/x86/kernel/kvm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/kvm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -216,6 +216,7 @@ static void __init paravirt_ops_setup(vo
+diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
+index 63b0ec8..6d92227 100644
+--- a/arch/x86/kernel/kvm.c
++++ b/arch/x86/kernel/kvm.c
+@@ -216,6 +216,7 @@ static void __init paravirt_ops_setup(void)
pv_mmu_ops.set_pud = kvm_set_pud;
#if PAGETABLE_LEVELS == 4
pv_mmu_ops.set_pgd = kvm_set_pgd;
@@ -16789,10 +17931,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/kvm.c linux-2.6.32.49/arch/x86/kernel
#endif
#endif
pv_mmu_ops.flush_tlb_user = kvm_flush_tlb;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/ldt.c linux-2.6.32.49/arch/x86/kernel/ldt.c
---- linux-2.6.32.49/arch/x86/kernel/ldt.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/ldt.c 2011-11-15 19:59:43.000000000 -0500
-@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, i
+diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
+index ec6ef60..ab2c824 100644
+--- a/arch/x86/kernel/ldt.c
++++ b/arch/x86/kernel/ldt.c
+@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
if (reload) {
#ifdef CONFIG_SMP
preempt_disable();
@@ -16808,7 +17951,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ldt.c linux-2.6.32.49/arch/x86/kernel
#endif
}
if (oldsize) {
-@@ -94,7 +94,7 @@ static inline int copy_ldt(mm_context_t
+@@ -94,7 +94,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
return err;
for (i = 0; i < old->size; i++)
@@ -16817,7 +17960,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ldt.c linux-2.6.32.49/arch/x86/kernel
return 0;
}
-@@ -115,6 +115,24 @@ int init_new_context(struct task_struct
+@@ -115,6 +115,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
retval = copy_ldt(&mm->context, &old_mm->context);
mutex_unlock(&old_mm->context.lock);
}
@@ -16842,7 +17985,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ldt.c linux-2.6.32.49/arch/x86/kernel
return retval;
}
-@@ -229,6 +247,13 @@ static int write_ldt(void __user *ptr, u
+@@ -229,6 +247,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
}
}
@@ -16856,9 +17999,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ldt.c linux-2.6.32.49/arch/x86/kernel
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c
---- linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
+index c1c429d..f02eaf9 100644
+--- a/arch/x86/kernel/machine_kexec_32.c
++++ b/arch/x86/kernel/machine_kexec_32.c
@@ -26,7 +26,7 @@
#include <asm/system.h>
#include <asm/cacheflush.h>
@@ -16868,7 +18012,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c linux-2.6.32.49/ar
{
struct desc_ptr curidt;
-@@ -38,7 +38,7 @@ static void set_idt(void *newidt, __u16
+@@ -38,7 +38,7 @@ static void set_idt(void *newidt, __u16 limit)
}
@@ -16886,10 +18030,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/machine_kexec_32.c linux-2.6.32.49/ar
relocate_kernel_ptr = control_page;
page_list[PA_CONTROL_PAGE] = __pa(control_page);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_amd.c linux-2.6.32.49/arch/x86/kernel/microcode_amd.c
---- linux-2.6.32.49/arch/x86/kernel/microcode_amd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/microcode_amd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -364,7 +364,7 @@ static void microcode_fini_cpu_amd(int c
+diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
+index 1e47679..e73449d 100644
+--- a/arch/x86/kernel/microcode_amd.c
++++ b/arch/x86/kernel/microcode_amd.c
+@@ -364,7 +364,7 @@ static void microcode_fini_cpu_amd(int cpu)
uci->mc = NULL;
}
@@ -16898,7 +18043,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_amd.c linux-2.6.32.49/arch/
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info_amd,
-@@ -372,7 +372,7 @@ static struct microcode_ops microcode_am
+@@ -372,7 +372,7 @@ static struct microcode_ops microcode_amd_ops = {
.microcode_fini_cpu = microcode_fini_cpu_amd,
};
@@ -16907,9 +18052,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_amd.c linux-2.6.32.49/arch/
{
return &microcode_amd_ops;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_core.c linux-2.6.32.49/arch/x86/kernel/microcode_core.c
---- linux-2.6.32.49/arch/x86/kernel/microcode_core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/microcode_core.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
+index 378e9a8..b5a6ea9 100644
+--- a/arch/x86/kernel/microcode_core.c
++++ b/arch/x86/kernel/microcode_core.c
@@ -90,7 +90,7 @@ MODULE_LICENSE("GPL");
#define MICROCODE_VERSION "2.00"
@@ -16919,10 +18065,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_core.c linux-2.6.32.49/arch
/*
* Synchronization.
-diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_intel.c linux-2.6.32.49/arch/x86/kernel/microcode_intel.c
---- linux-2.6.32.49/arch/x86/kernel/microcode_intel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/microcode_intel.c 2011-11-15 19:59:43.000000000 -0500
-@@ -443,13 +443,13 @@ static enum ucode_state request_microcod
+diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
+index 0d334dd..14cedaf 100644
+--- a/arch/x86/kernel/microcode_intel.c
++++ b/arch/x86/kernel/microcode_intel.c
+@@ -443,13 +443,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
static int get_ucode_user(void *to, const void *from, size_t n)
{
@@ -16947,7 +18094,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_intel.c linux-2.6.32.49/arc
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info,
-@@ -468,7 +468,7 @@ static struct microcode_ops microcode_in
+@@ -468,7 +468,7 @@ static struct microcode_ops microcode_intel_ops = {
.microcode_fini_cpu = microcode_fini_cpu,
};
@@ -16956,9 +18103,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/microcode_intel.c linux-2.6.32.49/arc
{
return &microcode_intel_ops;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/module.c linux-2.6.32.49/arch/x86/kernel/module.c
---- linux-2.6.32.49/arch/x86/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/module.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
+index 89f386f..9028f51 100644
+--- a/arch/x86/kernel/module.c
++++ b/arch/x86/kernel/module.c
@@ -34,7 +34,7 @@
#define DEBUGP(fmt...)
#endif
@@ -16989,7 +18137,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/module.c linux-2.6.32.49/arch/x86/ker
}
/* Free memory returned from module_alloc */
-@@ -58,6 +68,40 @@ void module_free(struct module *mod, voi
+@@ -58,6 +68,40 @@ void module_free(struct module *mod, void *module_region)
vfree(module_region);
}
@@ -17068,7 +18216,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/module.c linux-2.6.32.49/arch/x86/ker
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
-@@ -153,21 +203,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
+@@ -153,21 +203,30 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
case R_X86_64_NONE:
break;
case R_X86_64_64:
@@ -17099,9 +18247,23 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/module.c linux-2.6.32.49/arch/x86/ker
#if 0
if ((s64)val != *(s32 *)loc)
goto overflow;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/kernel/paravirt.c
---- linux-2.6.32.49/arch/x86/kernel/paravirt.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/paravirt.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/paravirt-spinlocks.c b/arch/x86/kernel/paravirt-spinlocks.c
+index 3a7c5a4..9191528 100644
+--- a/arch/x86/kernel/paravirt-spinlocks.c
++++ b/arch/x86/kernel/paravirt-spinlocks.c
+@@ -13,7 +13,7 @@ default_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
+ __raw_spin_lock(lock);
+ }
+
+-struct pv_lock_ops pv_lock_ops = {
++struct pv_lock_ops pv_lock_ops __read_only = {
+ #ifdef CONFIG_SMP
+ .spin_is_locked = __ticket_spin_is_locked,
+ .spin_is_contended = __ticket_spin_is_contended,
+diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
+index 1b1739d..dea6077 100644
+--- a/arch/x86/kernel/paravirt.c
++++ b/arch/x86/kernel/paravirt.c
@@ -53,6 +53,9 @@ u64 _paravirt_ident_64(u64 x)
{
return x;
@@ -17112,7 +18274,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/k
void __init default_banner(void)
{
-@@ -122,7 +125,7 @@ unsigned paravirt_patch_jmp(void *insnbu
+@@ -122,7 +125,7 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target,
* corresponding structure. */
static void *get_call_destination(u8 type)
{
@@ -17121,7 +18283,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/k
.pv_init_ops = pv_init_ops,
.pv_time_ops = pv_time_ops,
.pv_cpu_ops = pv_cpu_ops,
-@@ -133,6 +136,8 @@ static void *get_call_destination(u8 typ
+@@ -133,6 +136,8 @@ static void *get_call_destination(u8 type)
.pv_lock_ops = pv_lock_ops,
#endif
};
@@ -17130,7 +18292,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/k
return *((void **)&tmpl + type);
}
-@@ -145,15 +150,19 @@ unsigned paravirt_patch_default(u8 type,
+@@ -145,15 +150,19 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
@@ -17153,7 +18315,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/k
else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
type == PARAVIRT_PATCH(pv_cpu_ops.irq_enable_sysexit) ||
-@@ -178,7 +187,7 @@ unsigned paravirt_patch_insns(void *insn
+@@ -178,7 +187,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
if (insn_len > len || start == NULL)
insn_len = len;
else
@@ -17249,22 +18411,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt.c linux-2.6.32.49/arch/x86/k
};
EXPORT_SYMBOL_GPL(pv_time_ops);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.32.49/arch/x86/kernel/paravirt-spinlocks.c
---- linux-2.6.32.49/arch/x86/kernel/paravirt-spinlocks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/paravirt-spinlocks.c 2011-11-15 19:59:43.000000000 -0500
-@@ -13,7 +13,7 @@ default_spin_lock_flags(raw_spinlock_t *
- __raw_spin_lock(lock);
- }
-
--struct pv_lock_ops pv_lock_ops = {
-+struct pv_lock_ops pv_lock_ops __read_only = {
- #ifdef CONFIG_SMP
- .spin_is_locked = __ticket_spin_is_locked,
- .spin_is_contended = __ticket_spin_is_contended,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-calgary_64.c linux-2.6.32.49/arch/x86/kernel/pci-calgary_64.c
---- linux-2.6.32.49/arch/x86/kernel/pci-calgary_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/pci-calgary_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -477,7 +477,7 @@ static void calgary_free_coherent(struct
+diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
+index 1a2d4b1..6a0dd55 100644
+--- a/arch/x86/kernel/pci-calgary_64.c
++++ b/arch/x86/kernel/pci-calgary_64.c
+@@ -477,7 +477,7 @@ static void calgary_free_coherent(struct device *dev, size_t size,
free_pages((unsigned long)vaddr, get_order(size));
}
@@ -17273,9 +18424,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-calgary_64.c linux-2.6.32.49/arch
.alloc_coherent = calgary_alloc_coherent,
.free_coherent = calgary_free_coherent,
.map_sg = calgary_map_sg,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-dma.c linux-2.6.32.49/arch/x86/kernel/pci-dma.c
---- linux-2.6.32.49/arch/x86/kernel/pci-dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/pci-dma.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
+index 6ac3931..42b4414 100644
+--- a/arch/x86/kernel/pci-dma.c
++++ b/arch/x86/kernel/pci-dma.c
@@ -14,7 +14,7 @@
static int forbid_dac __read_mostly;
@@ -17294,10 +18446,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-dma.c linux-2.6.32.49/arch/x86/ke
#ifdef CONFIG_PCI
if (mask > 0xffffffff && forbid_dac > 0) {
-diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-gart_64.c linux-2.6.32.49/arch/x86/kernel/pci-gart_64.c
---- linux-2.6.32.49/arch/x86/kernel/pci-gart_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/pci-gart_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -682,7 +682,7 @@ static __init int init_k8_gatt(struct ag
+diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
+index 1c76691..e3632db 100644
+--- a/arch/x86/kernel/pci-gart_64.c
++++ b/arch/x86/kernel/pci-gart_64.c
+@@ -682,7 +682,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
return -1;
}
@@ -17306,10 +18459,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-gart_64.c linux-2.6.32.49/arch/x8
.map_sg = gart_map_sg,
.unmap_sg = gart_unmap_sg,
.map_page = gart_map_page,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-nommu.c linux-2.6.32.49/arch/x86/kernel/pci-nommu.c
---- linux-2.6.32.49/arch/x86/kernel/pci-nommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/pci-nommu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -94,7 +94,7 @@ static void nommu_sync_sg_for_device(str
+diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
+index a3933d4..c898869 100644
+--- a/arch/x86/kernel/pci-nommu.c
++++ b/arch/x86/kernel/pci-nommu.c
+@@ -94,7 +94,7 @@ static void nommu_sync_sg_for_device(struct device *dev,
flush_write_buffers();
}
@@ -17318,10 +18472,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-nommu.c linux-2.6.32.49/arch/x86/
.alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = nommu_free_coherent,
.map_sg = nommu_map_sg,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-swiotlb.c linux-2.6.32.49/arch/x86/kernel/pci-swiotlb.c
---- linux-2.6.32.49/arch/x86/kernel/pci-swiotlb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/pci-swiotlb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -25,7 +25,7 @@ static void *x86_swiotlb_alloc_coherent(
+diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
+index aaa6b78..4de1881 100644
+--- a/arch/x86/kernel/pci-swiotlb.c
++++ b/arch/x86/kernel/pci-swiotlb.c
+@@ -25,7 +25,7 @@ static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags);
}
@@ -17330,10 +18485,129 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/pci-swiotlb.c linux-2.6.32.49/arch/x8
.mapping_error = swiotlb_dma_mapping_error,
.alloc_coherent = x86_swiotlb_alloc_coherent,
.free_coherent = swiotlb_free_coherent,
-diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86/kernel/process_32.c
---- linux-2.6.32.49/arch/x86/kernel/process_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/process_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -67,6 +67,7 @@ asmlinkage void ret_from_fork(void) __as
+diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
+index fc6c84d..0312ca2 100644
+--- a/arch/x86/kernel/process.c
++++ b/arch/x86/kernel/process.c
+@@ -51,16 +51,33 @@ void free_thread_xstate(struct task_struct *tsk)
+
+ void free_thread_info(struct thread_info *ti)
+ {
+- free_thread_xstate(ti->task);
+ free_pages((unsigned long)ti, get_order(THREAD_SIZE));
+ }
+
++static struct kmem_cache *task_struct_cachep;
++
+ void arch_task_cache_init(void)
+ {
+- task_xstate_cachep =
+- kmem_cache_create("task_xstate", xstate_size,
++ /* create a slab on which task_structs can be allocated */
++ task_struct_cachep =
++ kmem_cache_create("task_struct", sizeof(struct task_struct),
++ ARCH_MIN_TASKALIGN, SLAB_PANIC | SLAB_NOTRACK, NULL);
++
++ task_xstate_cachep =
++ kmem_cache_create("task_xstate", xstate_size,
+ __alignof__(union thread_xstate),
+- SLAB_PANIC | SLAB_NOTRACK, NULL);
++ SLAB_PANIC | SLAB_NOTRACK | SLAB_USERCOPY, NULL);
++}
++
++struct task_struct *alloc_task_struct(void)
++{
++ return kmem_cache_alloc(task_struct_cachep, GFP_KERNEL);
++}
++
++void free_task_struct(struct task_struct *task)
++{
++ free_thread_xstate(task);
++ kmem_cache_free(task_struct_cachep, task);
+ }
+
+ /*
+@@ -73,7 +90,7 @@ void exit_thread(void)
+ unsigned long *bp = t->io_bitmap_ptr;
+
+ if (bp) {
+- struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
++ struct tss_struct *tss = init_tss + get_cpu();
+
+ t->io_bitmap_ptr = NULL;
+ clear_thread_flag(TIF_IO_BITMAP);
+@@ -93,6 +110,9 @@ void flush_thread(void)
+
+ clear_tsk_thread_flag(tsk, TIF_DEBUG);
+
++#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_PAX_MEMORY_UDEREF)
++ loadsegment(gs, 0);
++#endif
+ tsk->thread.debugreg0 = 0;
+ tsk->thread.debugreg1 = 0;
+ tsk->thread.debugreg2 = 0;
+@@ -307,7 +327,7 @@ void default_idle(void)
+ EXPORT_SYMBOL(default_idle);
+ #endif
+
+-void stop_this_cpu(void *dummy)
++__noreturn void stop_this_cpu(void *dummy)
+ {
+ local_irq_disable();
+ /*
+@@ -568,16 +588,38 @@ static int __init idle_setup(char *str)
+ }
+ early_param("idle", idle_setup);
+
+-unsigned long arch_align_stack(unsigned long sp)
++#ifdef CONFIG_PAX_RANDKSTACK
++void pax_randomize_kstack(struct pt_regs *regs)
+ {
+- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+- sp -= get_random_int() % 8192;
+- return sp & ~0xf;
+-}
++ struct thread_struct *thread = &current->thread;
++ unsigned long time;
+
+-unsigned long arch_randomize_brk(struct mm_struct *mm)
+-{
+- unsigned long range_end = mm->brk + 0x02000000;
+- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
++ if (!randomize_va_space)
++ return;
++
++ if (v8086_mode(regs))
++ return;
++
++ rdtscl(time);
++
++ /* P4 seems to return a 0 LSB, ignore it */
++#ifdef CONFIG_MPENTIUM4
++ time &= 0x3EUL;
++ time <<= 2;
++#elif defined(CONFIG_X86_64)
++ time &= 0xFUL;
++ time <<= 4;
++#else
++ time &= 0x1FUL;
++ time <<= 3;
++#endif
++
++ thread->sp0 ^= time;
++ load_sp0(init_tss + smp_processor_id(), thread);
++
++#ifdef CONFIG_X86_64
++ percpu_write(kernel_stack, thread->sp0);
++#endif
+ }
++#endif
+
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index c40c432..6e1df72 100644
+--- a/arch/x86/kernel/process_32.c
++++ b/arch/x86/kernel/process_32.c
+@@ -67,6 +67,7 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
unsigned long thread_saved_pc(struct task_struct *tsk)
{
return ((unsigned long *)tsk->thread.sp)[3];
@@ -17341,7 +18615,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
}
#ifndef CONFIG_SMP
-@@ -129,15 +130,14 @@ void __show_regs(struct pt_regs *regs, i
+@@ -129,15 +130,14 @@ void __show_regs(struct pt_regs *regs, int all)
unsigned short ss, gs;
const char *board;
@@ -17359,7 +18633,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
printk("\n");
-@@ -210,10 +210,10 @@ int kernel_thread(int (*fn)(void *), voi
+@@ -210,10 +210,10 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
regs.bx = (unsigned long) fn;
regs.dx = (unsigned long) arg;
@@ -17373,7 +18647,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
regs.orig_ax = -1;
regs.ip = (unsigned long) kernel_thread_helper;
regs.cs = __KERNEL_CS | get_kernel_rpl();
-@@ -247,13 +247,14 @@ int copy_thread(unsigned long clone_flag
+@@ -247,13 +247,14 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
struct task_struct *tsk;
int err;
@@ -17389,7 +18663,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
p->thread.ip = (unsigned long) ret_from_fork;
-@@ -345,7 +346,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -345,7 +346,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
struct thread_struct *prev = &prev_p->thread,
*next = &next_p->thread;
int cpu = smp_processor_id();
@@ -17398,7 +18672,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
bool preload_fpu;
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
-@@ -380,6 +381,10 @@ __switch_to(struct task_struct *prev_p,
+@@ -380,6 +381,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
*/
lazy_save_gs(prev->gs);
@@ -17409,7 +18683,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
/*
* Load the per-thread Thread-Local Storage descriptor.
*/
-@@ -415,6 +420,9 @@ __switch_to(struct task_struct *prev_p,
+@@ -415,6 +420,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
*/
arch_end_context_switch(next_p);
@@ -17419,7 +18693,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
if (preload_fpu)
__math_state_restore();
-@@ -424,8 +432,6 @@ __switch_to(struct task_struct *prev_p,
+@@ -424,8 +432,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
if (prev->gs | next->gs)
lazy_load_gs(next->gs);
@@ -17428,14 +18702,15 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_32.c linux-2.6.32.49/arch/x86
return prev_p;
}
-@@ -495,4 +501,3 @@ unsigned long get_wchan(struct task_stru
+@@ -495,4 +501,3 @@ unsigned long get_wchan(struct task_struct *p)
} while (count++ < 16);
return 0;
}
-
-diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86/kernel/process_64.c
---- linux-2.6.32.49/arch/x86/kernel/process_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/process_64.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
+index 39493bc..196816d 100644
+--- a/arch/x86/kernel/process_64.c
++++ b/arch/x86/kernel/process_64.c
@@ -91,7 +91,7 @@ static void __exit_idle(void)
void exit_idle(void)
{
@@ -17445,7 +18720,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
return;
__exit_idle();
}
-@@ -170,7 +170,7 @@ void __show_regs(struct pt_regs *regs, i
+@@ -170,7 +170,7 @@ void __show_regs(struct pt_regs *regs, int all)
if (!board)
board = "";
printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n",
@@ -17454,7 +18729,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version, board);
-@@ -280,8 +280,7 @@ int copy_thread(unsigned long clone_flag
+@@ -280,8 +280,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
struct pt_regs *childregs;
struct task_struct *me = current;
@@ -17464,7 +18739,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
*childregs = *regs;
childregs->ax = 0;
-@@ -292,6 +291,7 @@ int copy_thread(unsigned long clone_flag
+@@ -292,6 +291,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
p->thread.sp = (unsigned long) childregs;
p->thread.sp0 = (unsigned long) (childregs+1);
p->thread.usersp = me->thread.usersp;
@@ -17472,7 +18747,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
set_tsk_thread_flag(p, TIF_FORK);
-@@ -379,7 +379,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -379,7 +379,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
@@ -17481,7 +18756,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
unsigned fsindex, gsindex;
bool preload_fpu;
-@@ -475,10 +475,9 @@ __switch_to(struct task_struct *prev_p,
+@@ -475,10 +475,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
prev->usersp = percpu_read(old_rsp);
percpu_write(old_rsp, next->usersp);
percpu_write(current_task, next_p);
@@ -17494,7 +18769,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
/*
* Now maybe reload the debug registers and handle I/O bitmaps
-@@ -559,12 +558,11 @@ unsigned long get_wchan(struct task_stru
+@@ -559,12 +558,11 @@ unsigned long get_wchan(struct task_struct *p)
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
@@ -17509,127 +18784,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/process_64.c linux-2.6.32.49/arch/x86
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
-diff -urNp linux-2.6.32.49/arch/x86/kernel/process.c linux-2.6.32.49/arch/x86/kernel/process.c
---- linux-2.6.32.49/arch/x86/kernel/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/process.c 2011-11-15 19:59:43.000000000 -0500
-@@ -51,16 +51,33 @@ void free_thread_xstate(struct task_stru
-
- void free_thread_info(struct thread_info *ti)
- {
-- free_thread_xstate(ti->task);
- free_pages((unsigned long)ti, get_order(THREAD_SIZE));
- }
-
-+static struct kmem_cache *task_struct_cachep;
-+
- void arch_task_cache_init(void)
- {
-- task_xstate_cachep =
-- kmem_cache_create("task_xstate", xstate_size,
-+ /* create a slab on which task_structs can be allocated */
-+ task_struct_cachep =
-+ kmem_cache_create("task_struct", sizeof(struct task_struct),
-+ ARCH_MIN_TASKALIGN, SLAB_PANIC | SLAB_NOTRACK, NULL);
-+
-+ task_xstate_cachep =
-+ kmem_cache_create("task_xstate", xstate_size,
- __alignof__(union thread_xstate),
-- SLAB_PANIC | SLAB_NOTRACK, NULL);
-+ SLAB_PANIC | SLAB_NOTRACK | SLAB_USERCOPY, NULL);
-+}
-+
-+struct task_struct *alloc_task_struct(void)
-+{
-+ return kmem_cache_alloc(task_struct_cachep, GFP_KERNEL);
-+}
-+
-+void free_task_struct(struct task_struct *task)
-+{
-+ free_thread_xstate(task);
-+ kmem_cache_free(task_struct_cachep, task);
- }
-
- /*
-@@ -73,7 +90,7 @@ void exit_thread(void)
- unsigned long *bp = t->io_bitmap_ptr;
-
- if (bp) {
-- struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
-+ struct tss_struct *tss = init_tss + get_cpu();
-
- t->io_bitmap_ptr = NULL;
- clear_thread_flag(TIF_IO_BITMAP);
-@@ -93,6 +110,9 @@ void flush_thread(void)
-
- clear_tsk_thread_flag(tsk, TIF_DEBUG);
-
-+#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_PAX_MEMORY_UDEREF)
-+ loadsegment(gs, 0);
-+#endif
- tsk->thread.debugreg0 = 0;
- tsk->thread.debugreg1 = 0;
- tsk->thread.debugreg2 = 0;
-@@ -307,7 +327,7 @@ void default_idle(void)
- EXPORT_SYMBOL(default_idle);
- #endif
-
--void stop_this_cpu(void *dummy)
-+__noreturn void stop_this_cpu(void *dummy)
- {
- local_irq_disable();
- /*
-@@ -568,16 +588,38 @@ static int __init idle_setup(char *str)
- }
- early_param("idle", idle_setup);
-
--unsigned long arch_align_stack(unsigned long sp)
-+#ifdef CONFIG_PAX_RANDKSTACK
-+void pax_randomize_kstack(struct pt_regs *regs)
- {
-- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-- sp -= get_random_int() % 8192;
-- return sp & ~0xf;
--}
-+ struct thread_struct *thread = &current->thread;
-+ unsigned long time;
-
--unsigned long arch_randomize_brk(struct mm_struct *mm)
--{
-- unsigned long range_end = mm->brk + 0x02000000;
-- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
-+ if (!randomize_va_space)
-+ return;
-+
-+ if (v8086_mode(regs))
-+ return;
-+
-+ rdtscl(time);
-+
-+ /* P4 seems to return a 0 LSB, ignore it */
-+#ifdef CONFIG_MPENTIUM4
-+ time &= 0x3EUL;
-+ time <<= 2;
-+#elif defined(CONFIG_X86_64)
-+ time &= 0xFUL;
-+ time <<= 4;
-+#else
-+ time &= 0x1FUL;
-+ time <<= 3;
-+#endif
-+
-+ thread->sp0 ^= time;
-+ load_sp0(init_tss + smp_processor_id(), thread);
-+
-+#ifdef CONFIG_X86_64
-+ percpu_write(kernel_stack, thread->sp0);
-+#endif
- }
-+#endif
-
-diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/kernel/ptrace.c
---- linux-2.6.32.49/arch/x86/kernel/ptrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/ptrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -925,7 +925,7 @@ static const struct user_regset_view use
+diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
+index c06acdd..3f5fff5 100644
+--- a/arch/x86/kernel/ptrace.c
++++ b/arch/x86/kernel/ptrace.c
+@@ -925,7 +925,7 @@ static const struct user_regset_view user_x86_32_view; /* Initialized below. */
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
int ret;
@@ -17638,7 +18797,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
switch (request) {
/* read the word at location addr in the USER area. */
-@@ -1012,14 +1012,14 @@ long arch_ptrace(struct task_struct *chi
+@@ -1012,14 +1012,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
if (addr < 0)
return -EIO;
ret = do_get_thread_area(child, addr,
@@ -17655,7 +18814,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
break;
#endif
-@@ -1038,12 +1038,12 @@ long arch_ptrace(struct task_struct *chi
+@@ -1038,12 +1038,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
#ifdef CONFIG_X86_PTRACE_BTS
case PTRACE_BTS_CONFIG:
ret = ptrace_bts_config
@@ -17670,7 +18829,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
break;
case PTRACE_BTS_SIZE:
-@@ -1052,7 +1052,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -1052,7 +1052,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_BTS_GET:
ret = ptrace_bts_read_record
@@ -17679,7 +18838,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
break;
case PTRACE_BTS_CLEAR:
-@@ -1061,7 +1061,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -1061,7 +1061,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_BTS_DRAIN:
ret = ptrace_bts_drain
@@ -17688,7 +18847,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
break;
#endif /* CONFIG_X86_PTRACE_BTS */
-@@ -1450,7 +1450,7 @@ void send_sigtrap(struct task_struct *ts
+@@ -1450,7 +1450,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
info.si_code = si_code;
/* User-mode ip? */
@@ -17697,7 +18856,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
/* Send us the fake SIGTRAP */
force_sig_info(SIGTRAP, &info, tsk);
-@@ -1469,7 +1469,7 @@ void send_sigtrap(struct task_struct *ts
+@@ -1469,7 +1469,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
* We must return the syscall number to actually look up in the table.
* This can be -1L to skip running any syscall at all.
*/
@@ -17706,7 +18865,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
{
long ret = 0;
-@@ -1514,7 +1514,7 @@ asmregparm long syscall_trace_enter(stru
+@@ -1514,7 +1514,7 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)
return ret ?: regs->orig_ax;
}
@@ -17715,9 +18874,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/ptrace.c linux-2.6.32.49/arch/x86/ker
{
if (unlikely(current->audit_context))
audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/kernel/reboot.c
---- linux-2.6.32.49/arch/x86/kernel/reboot.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/reboot.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
+index cf98100..e76e03d 100644
+--- a/arch/x86/kernel/reboot.c
++++ b/arch/x86/kernel/reboot.c
@@ -33,7 +33,7 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
@@ -17745,7 +18905,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
};
static const struct desc_ptr
-@@ -346,7 +346,7 @@ static const unsigned char jump_to_bios
+@@ -346,7 +346,7 @@ static const unsigned char jump_to_bios [] =
* specified by the code and length parameters.
* We assume that length will aways be less that 100!
*/
@@ -17754,7 +18914,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
{
local_irq_disable();
-@@ -366,8 +366,8 @@ void machine_real_restart(const unsigned
+@@ -366,8 +366,8 @@ void machine_real_restart(const unsigned char *code, int length)
/* Remap the kernel at virtual address zero, as well as offset zero
from the kernel segment. This assumes the kernel segment starts at
virtual address PAGE_OFFSET. */
@@ -17765,7 +18925,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
/*
* Use `swapper_pg_dir' as our page directory.
-@@ -379,16 +379,15 @@ void machine_real_restart(const unsigned
+@@ -379,16 +379,15 @@ void machine_real_restart(const unsigned char *code, int length)
boot)". This seems like a fairly standard thing that gets set by
REBOOT.COM programs, and the previous reset routine did this
too. */
@@ -17785,7 +18945,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
/* Set up the IDT for real mode. */
load_idt(&real_mode_idt);
-@@ -416,6 +415,7 @@ void machine_real_restart(const unsigned
+@@ -416,6 +415,7 @@ void machine_real_restart(const unsigned char *code, int length)
__asm__ __volatile__ ("ljmp $0x0008,%0"
:
: "i" ((void *)(0x1000 - sizeof (real_mode_switch) - 100)));
@@ -17793,7 +18953,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
}
#ifdef CONFIG_APM_MODULE
EXPORT_SYMBOL(machine_real_restart);
-@@ -544,7 +544,7 @@ void __attribute__((weak)) mach_reboot_f
+@@ -544,7 +544,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
{
}
@@ -17818,7 +18978,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
{
printk("machine restart\n");
-@@ -674,7 +674,7 @@ static void native_machine_restart(char
+@@ -674,7 +674,7 @@ static void native_machine_restart(char *__unused)
__machine_emergency_restart(0);
}
@@ -17836,7 +18996,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
{
if (pm_power_off) {
if (!reboot_force)
-@@ -694,6 +694,7 @@ static void native_machine_power_off(voi
+@@ -694,6 +694,7 @@ static void native_machine_power_off(void)
}
/* a fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
@@ -17844,9 +19004,30 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/reboot.c linux-2.6.32.49/arch/x86/ker
}
struct machine_ops machine_ops = {
-diff -urNp linux-2.6.32.49/arch/x86/kernel/setup.c linux-2.6.32.49/arch/x86/kernel/setup.c
---- linux-2.6.32.49/arch/x86/kernel/setup.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/setup.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
+index 7a6f3b3..976a959 100644
+--- a/arch/x86/kernel/relocate_kernel_64.S
++++ b/arch/x86/kernel/relocate_kernel_64.S
+@@ -11,6 +11,7 @@
+ #include <asm/kexec.h>
+ #include <asm/processor-flags.h>
+ #include <asm/pgtable_types.h>
++#include <asm/alternative-asm.h>
+
+ /*
+ * Must be relocatable PIC code callable as a C function
+@@ -167,6 +168,7 @@ identity_mapped:
+ xorq %r14, %r14
+ xorq %r15, %r15
+
++ pax_force_retaddr 0, 1
+ ret
+
+ 1:
+diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
+index 5449a26..0b6c759 100644
+--- a/arch/x86/kernel/setup.c
++++ b/arch/x86/kernel/setup.c
@@ -783,14 +783,14 @@ void __init setup_arch(char **cmdline_p)
if (!boot_params.hdr.root_flags)
@@ -17867,9 +19048,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/setup.c linux-2.6.32.49/arch/x86/kern
data_resource.end = virt_to_phys(_edata)-1;
bss_resource.start = virt_to_phys(&__bss_start);
bss_resource.end = virt_to_phys(&__bss_stop)-1;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/setup_percpu.c linux-2.6.32.49/arch/x86/kernel/setup_percpu.c
---- linux-2.6.32.49/arch/x86/kernel/setup_percpu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/setup_percpu.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
+index d559af9..524c6ad 100644
+--- a/arch/x86/kernel/setup_percpu.c
++++ b/arch/x86/kernel/setup_percpu.c
@@ -25,19 +25,17 @@
# define DBG(x...)
#endif
@@ -17894,7 +19076,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/setup_percpu.c linux-2.6.32.49/arch/x
[0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
};
EXPORT_SYMBOL(__per_cpu_offset);
-@@ -159,10 +157,10 @@ static inline void setup_percpu_segment(
+@@ -159,10 +157,10 @@ static inline void setup_percpu_segment(int cpu)
{
#ifdef CONFIG_X86_32
struct desc_struct gdt;
@@ -17933,10 +19115,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/setup_percpu.c linux-2.6.32.49/arch/x
/*
* Up to this point, the boot CPU has been using .data.init
* area. Reload any changed state for the boot CPU.
-diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/kernel/signal.c
---- linux-2.6.32.49/arch/x86/kernel/signal.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/signal.c 2011-11-15 19:59:43.000000000 -0500
-@@ -197,7 +197,7 @@ static unsigned long align_sigframe(unsi
+diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
+index 6a44a76..a9287a1 100644
+--- a/arch/x86/kernel/signal.c
++++ b/arch/x86/kernel/signal.c
+@@ -197,7 +197,7 @@ static unsigned long align_sigframe(unsigned long sp)
* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0.
*/
@@ -17945,7 +19128,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
#else /* !CONFIG_X86_32 */
sp = round_down(sp, 16) - 8;
#endif
-@@ -248,11 +248,11 @@ get_sigframe(struct k_sigaction *ka, str
+@@ -248,11 +248,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
* Return an always-bogus address instead so we will die with SIGSEGV.
*/
if (onsigstack && !likely(on_sig_stack(sp)))
@@ -17959,7 +19142,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
return (void __user *)sp;
}
-@@ -307,9 +307,9 @@ __setup_frame(int sig, struct k_sigactio
+@@ -307,9 +307,9 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
}
if (current->mm->context.vdso)
@@ -17971,7 +19154,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
-@@ -323,7 +323,7 @@ __setup_frame(int sig, struct k_sigactio
+@@ -323,7 +323,7 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
* reasons and because gdb uses it as a signature to notice
* signal handler stack frames.
*/
@@ -17980,7 +19163,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
if (err)
return -EFAULT;
-@@ -377,7 +377,10 @@ static int __setup_rt_frame(int sig, str
+@@ -377,7 +377,10 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
/* Set up to return from userspace. */
@@ -17992,7 +19175,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
put_user_ex(restorer, &frame->pretcode);
-@@ -389,7 +392,7 @@ static int __setup_rt_frame(int sig, str
+@@ -389,7 +392,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
* reasons and because gdb uses it as a signature to notice
* signal handler stack frames.
*/
@@ -18001,7 +19184,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
} put_user_catch(err);
if (err)
-@@ -782,6 +785,8 @@ static void do_signal(struct pt_regs *re
+@@ -782,6 +785,8 @@ static void do_signal(struct pt_regs *regs)
int signr;
sigset_t *oldset;
@@ -18010,7 +19193,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
/*
* We want the common case to go fast, which is why we may in certain
* cases get here from kernel mode. Just return without doing anything
-@@ -789,7 +794,7 @@ static void do_signal(struct pt_regs *re
+@@ -789,7 +794,7 @@ static void do_signal(struct pt_regs *regs)
* X86_32: vm86 regs switched out by assembly code before reaching
* here, so testing against kernel CS suffices.
*/
@@ -18019,10 +19202,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/signal.c linux-2.6.32.49/arch/x86/ker
return;
if (current_thread_info()->status & TS_RESTORE_SIGMASK)
-diff -urNp linux-2.6.32.49/arch/x86/kernel/smpboot.c linux-2.6.32.49/arch/x86/kernel/smpboot.c
---- linux-2.6.32.49/arch/x86/kernel/smpboot.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/smpboot.c 2011-11-15 19:59:43.000000000 -0500
-@@ -94,14 +94,14 @@ static DEFINE_PER_CPU(struct task_struct
+diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
+index 7e8e905..64d5c32 100644
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -94,14 +94,14 @@ static DEFINE_PER_CPU(struct task_struct *, idle_thread_array);
*/
static DEFINE_MUTEX(x86_cpu_hotplug_driver_mutex);
@@ -18041,7 +19225,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/smpboot.c linux-2.6.32.49/arch/x86/ke
}
ssize_t arch_cpu_probe(const char *buf, size_t count) { return -1; }
-@@ -625,7 +625,7 @@ wakeup_secondary_cpu_via_init(int phys_a
+@@ -625,7 +625,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
* target processor state.
*/
startup_ipi_hook(phys_apicid, (unsigned long) start_secondary,
@@ -18050,7 +19234,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/smpboot.c linux-2.6.32.49/arch/x86/ke
/*
* Run STARTUP IPI loop.
-@@ -743,6 +743,7 @@ static int __cpuinit do_boot_cpu(int api
+@@ -743,6 +743,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
set_idle_for_cpu(cpu, c_idle.idle);
do_rest:
per_cpu(current_task, cpu) = c_idle.idle;
@@ -18078,7 +19262,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/smpboot.c linux-2.6.32.49/arch/x86/ke
/* start_ip had better be page-aligned! */
start_ip = setup_trampoline();
-@@ -891,6 +894,12 @@ int __cpuinit native_cpu_up(unsigned int
+@@ -891,6 +894,12 @@ int __cpuinit native_cpu_up(unsigned int cpu)
per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
@@ -18091,10 +19275,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/smpboot.c linux-2.6.32.49/arch/x86/ke
err = do_boot_cpu(apicid, cpu);
if (err) {
-diff -urNp linux-2.6.32.49/arch/x86/kernel/step.c linux-2.6.32.49/arch/x86/kernel/step.c
---- linux-2.6.32.49/arch/x86/kernel/step.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/step.c 2011-11-15 19:59:43.000000000 -0500
-@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struc
+diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c
+index 3149032..14f1053 100644
+--- a/arch/x86/kernel/step.c
++++ b/arch/x86/kernel/step.c
+@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *re
struct desc_struct *desc;
unsigned long base;
@@ -18107,7 +19292,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/step.c linux-2.6.32.49/arch/x86/kerne
addr = -1L; /* bogus selector, access would fault */
else {
desc = child->mm->context.ldt + seg;
-@@ -42,7 +42,8 @@ unsigned long convert_ip_to_linear(struc
+@@ -42,7 +42,8 @@ unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *re
addr += base;
}
mutex_unlock(&child->mm->context.lock);
@@ -18117,7 +19302,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/step.c linux-2.6.32.49/arch/x86/kerne
return addr;
}
-@@ -53,6 +54,9 @@ static int is_setting_trap_flag(struct t
+@@ -53,6 +54,9 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs)
unsigned char opcode[15];
unsigned long addr = convert_ip_to_linear(child, regs);
@@ -18127,7 +19312,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/step.c linux-2.6.32.49/arch/x86/kerne
copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0);
for (i = 0; i < copied; i++) {
switch (opcode[i]) {
-@@ -74,7 +78,7 @@ static int is_setting_trap_flag(struct t
+@@ -74,7 +78,7 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs)
#ifdef CONFIG_X86_64
case 0x40 ... 0x4f:
@@ -18136,17 +19321,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/step.c linux-2.6.32.49/arch/x86/kerne
/* 32-bit mode: register increment */
return 0;
/* 64-bit mode: REX prefix */
-diff -urNp linux-2.6.32.49/arch/x86/kernel/syscall_table_32.S linux-2.6.32.49/arch/x86/kernel/syscall_table_32.S
---- linux-2.6.32.49/arch/x86/kernel/syscall_table_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/syscall_table_32.S 2011-11-15 19:59:43.000000000 -0500
-@@ -1,3 +1,4 @@
-+.section .rodata,"a",@progbits
- ENTRY(sys_call_table)
- .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
- .long sys_exit
-diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c
---- linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
+index dee1ff7..a397f7f 100644
+--- a/arch/x86/kernel/sys_i386_32.c
++++ b/arch/x86/kernel/sys_i386_32.c
@@ -24,6 +24,21 @@
#include <asm/syscalls.h>
@@ -18382,7 +19560,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c linux-2.6.32.49/arch/x8
struct sel_arg_struct {
unsigned long n;
-@@ -93,7 +314,7 @@ asmlinkage int sys_ipc(uint call, int fi
+@@ -93,7 +314,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL);
case SEMTIMEDOP:
return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
@@ -18391,7 +19569,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c linux-2.6.32.49/arch/x8
case SEMGET:
return sys_semget(first, second, third);
-@@ -140,7 +361,7 @@ asmlinkage int sys_ipc(uint call, int fi
+@@ -140,7 +361,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
ret = do_shmat(first, (char __user *) ptr, second, &raddr);
if (ret)
return ret;
@@ -18400,7 +19578,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c linux-2.6.32.49/arch/x8
}
case 1: /* iBCS2 emulator entry point */
if (!segment_eq(get_fs(), get_ds()))
-@@ -207,17 +428,3 @@ asmlinkage int sys_olduname(struct oldol
+@@ -207,17 +428,3 @@ asmlinkage int sys_olduname(struct oldold_utsname __user *name)
return error;
}
@@ -18418,9 +19596,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_i386_32.c linux-2.6.32.49/arch/x8
- : "0" (__NR_execve), "ri" (filename), "c" (argv), "d" (envp) : "memory");
- return __res;
-}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c
---- linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
+index 8aa2057..b604bc1 100644
+--- a/arch/x86/kernel/sys_x86_64.c
++++ b/arch/x86/kernel/sys_x86_64.c
@@ -32,8 +32,8 @@ out:
return error;
}
@@ -18432,7 +19611,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
{
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT)) {
unsigned long new_begin;
-@@ -52,7 +52,7 @@ static void find_start_end(unsigned long
+@@ -52,7 +52,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin,
*begin = new_begin;
}
} else {
@@ -18441,7 +19620,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
*end = TASK_SIZE;
}
}
-@@ -69,16 +69,19 @@ arch_get_unmapped_area(struct file *filp
+@@ -69,16 +69,19 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -18473,7 +19652,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
/*
* Remember the place where we stopped the search:
*/
-@@ -128,7 +131,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -128,7 +131,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
@@ -18482,7 +19661,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT))
goto bottomup;
@@ -18505,7 +19684,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
}
/* check if free_area_cache is useful for us */
-@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
@@ -18514,7 +19693,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
/* remember the address as a hint for next time */
return mm->free_area_cache = addr-len;
}
-@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -18523,7 +19702,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
/* remember the address as a hint for next time */
return mm->free_area_cache = addr;
-@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -18558,9 +19737,19 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/sys_x86_64.c linux-2.6.32.49/arch/x86
mm->cached_hole_size = ~0UL;
return addr;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/tboot.c linux-2.6.32.49/arch/x86/kernel/tboot.c
---- linux-2.6.32.49/arch/x86/kernel/tboot.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/tboot.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
+index 76d70a4..4c94a44 100644
+--- a/arch/x86/kernel/syscall_table_32.S
++++ b/arch/x86/kernel/syscall_table_32.S
+@@ -1,3 +1,4 @@
++.section .rodata,"a",@progbits
+ ENTRY(sys_call_table)
+ .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
+ .long sys_exit
+diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
+index 46b8277..3349d55 100644
+--- a/arch/x86/kernel/tboot.c
++++ b/arch/x86/kernel/tboot.c
@@ -216,7 +216,7 @@ static int tboot_setup_sleep(void)
void tboot_shutdown(u32 shutdown_type)
@@ -18579,7 +19768,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/tboot.c linux-2.6.32.49/arch/x86/kern
shutdown();
/* should not reach here */
-@@ -295,7 +295,7 @@ void tboot_sleep(u8 sleep_state, u32 pm1
+@@ -295,7 +295,7 @@ void tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control)
tboot_shutdown(acpi_shutdown_map[sleep_state]);
}
@@ -18588,7 +19777,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/tboot.c linux-2.6.32.49/arch/x86/kern
static int tboot_wait_for_aps(int num_aps)
{
-@@ -319,9 +319,9 @@ static int __cpuinit tboot_cpu_callback(
+@@ -319,9 +319,9 @@ static int __cpuinit tboot_cpu_callback(struct notifier_block *nfb,
{
switch (action) {
case CPU_DYING:
@@ -18609,9 +19798,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/tboot.c linux-2.6.32.49/arch/x86/kern
register_hotcpu_notifier(&tboot_cpu_notifier);
return 0;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/time.c linux-2.6.32.49/arch/x86/kernel/time.c
---- linux-2.6.32.49/arch/x86/kernel/time.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/time.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
+index be25734..87fe232 100644
+--- a/arch/x86/kernel/time.c
++++ b/arch/x86/kernel/time.c
@@ -26,17 +26,13 @@
int timer_ack;
#endif
@@ -18632,7 +19822,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/time.c linux-2.6.32.49/arch/x86/kerne
#else
unsigned long *sp =
(unsigned long *)kernel_stack_pointer(regs);
-@@ -45,11 +41,17 @@ unsigned long profile_pc(struct pt_regs
+@@ -45,11 +41,17 @@ unsigned long profile_pc(struct pt_regs *regs)
* or above a saved flags. Eflags has bits 22-31 zero,
* kernel addresses don't.
*/
@@ -18650,10 +19840,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/time.c linux-2.6.32.49/arch/x86/kerne
}
return pc;
}
-diff -urNp linux-2.6.32.49/arch/x86/kernel/tls.c linux-2.6.32.49/arch/x86/kernel/tls.c
---- linux-2.6.32.49/arch/x86/kernel/tls.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/tls.c 2011-11-15 19:59:43.000000000 -0500
-@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc
+diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
+index 6bb7b85..dd853e1 100644
+--- a/arch/x86/kernel/tls.c
++++ b/arch/x86/kernel/tls.c
+@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struct *p, int idx,
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
return -EINVAL;
@@ -18665,9 +19856,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/tls.c linux-2.6.32.49/arch/x86/kernel
set_tls_desc(p, idx, &info, 1);
return 0;
-diff -urNp linux-2.6.32.49/arch/x86/kernel/trampoline_32.S linux-2.6.32.49/arch/x86/kernel/trampoline_32.S
---- linux-2.6.32.49/arch/x86/kernel/trampoline_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/trampoline_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/trampoline_32.S b/arch/x86/kernel/trampoline_32.S
+index 8508237..229b664 100644
+--- a/arch/x86/kernel/trampoline_32.S
++++ b/arch/x86/kernel/trampoline_32.S
@@ -32,6 +32,12 @@
#include <asm/segment.h>
#include <asm/page_types.h>
@@ -18690,9 +19882,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/trampoline_32.S linux-2.6.32.49/arch/
# These need to be in the same 64K segment as the above;
# hence we don't use the boot_gdt_descr defined in head.S
-diff -urNp linux-2.6.32.49/arch/x86/kernel/trampoline_64.S linux-2.6.32.49/arch/x86/kernel/trampoline_64.S
---- linux-2.6.32.49/arch/x86/kernel/trampoline_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/trampoline_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
+index 3af2dff..ba8aa49 100644
+--- a/arch/x86/kernel/trampoline_64.S
++++ b/arch/x86/kernel/trampoline_64.S
@@ -91,7 +91,7 @@ startup_32:
movl $__KERNEL_DS, %eax # Initialize the %ds segment register
movl %eax, %ds
@@ -18720,9 +19913,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/trampoline_64.S linux-2.6.32.49/arch/
.long tgdt - r_base
.short 0
.quad 0x00cf9b000000ffff # __KERNEL32_CS
-diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kernel/traps.c
---- linux-2.6.32.49/arch/x86/kernel/traps.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/traps.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
+index 7e37dce..ec3f8e5 100644
+--- a/arch/x86/kernel/traps.c
++++ b/arch/x86/kernel/traps.c
@@ -69,12 +69,6 @@ asmlinkage int system_call(void);
/* Do we ignore FPU interrupts ? */
@@ -18736,7 +19930,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
#endif
DECLARE_BITMAP(used_vectors, NR_VECTORS);
-@@ -112,19 +106,19 @@ static inline void preempt_conditional_c
+@@ -112,19 +106,19 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
static inline void
die_if_kernel(const char *str, struct pt_regs *regs, long err)
{
@@ -18759,7 +19953,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
/*
* traps 0, 1, 3, 4, and 5 should be forwarded to vm86.
* On nmi (interrupt 2), do_trap should not be called.
-@@ -135,7 +129,7 @@ do_trap(int trapnr, int signr, char *str
+@@ -135,7 +129,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
}
#endif
@@ -18798,7 +19992,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
return;
#ifdef CONFIG_X86_32
-@@ -265,14 +271,30 @@ do_general_protection(struct pt_regs *re
+@@ -265,14 +271,30 @@ do_general_protection(struct pt_regs *regs, long error_code)
conditional_sti(regs);
#ifdef CONFIG_X86_32
@@ -18845,7 +20039,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
die("general protection fault", regs, error_code);
}
-@@ -435,6 +464,17 @@ static notrace __kprobes void default_do
+@@ -435,6 +464,17 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
dotraplinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
@@ -18863,7 +20057,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
nmi_enter();
inc_irq_stat(__nmi_count);
-@@ -558,7 +598,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -558,7 +598,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
}
#ifdef CONFIG_X86_32
@@ -18872,7 +20066,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
goto debug_vm86;
#endif
-@@ -570,7 +610,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -570,7 +610,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
* kernel space (but re-enable TF when returning to user mode).
*/
if (condition & DR_STEP) {
@@ -18881,7 +20075,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
goto clear_TF_reenable;
}
-@@ -757,7 +797,7 @@ do_simd_coprocessor_error(struct pt_regs
+@@ -757,7 +797,7 @@ do_simd_coprocessor_error(struct pt_regs *regs, long error_code)
* Handle strange cache flush from user space exception
* in all other cases. This is undocumented behaviour.
*/
@@ -18890,7 +20084,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
handle_vm86_fault((struct kernel_vm86_regs *)regs, error_code);
return;
}
-@@ -798,7 +838,7 @@ asmlinkage void __attribute__((weak)) sm
+@@ -798,7 +838,7 @@ asmlinkage void __attribute__((weak)) smp_threshold_interrupt(void)
void __math_state_restore(void)
{
struct thread_info *thread = current_thread_info();
@@ -18909,118 +20103,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/traps.c linux-2.6.32.49/arch/x86/kern
if (!tsk_used_math(tsk)) {
local_irq_enable();
-diff -urNp linux-2.6.32.49/arch/x86/kernel/verify_cpu_64.S linux-2.6.32.49/arch/x86/kernel/verify_cpu_64.S
---- linux-2.6.32.49/arch/x86/kernel/verify_cpu_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/verify_cpu_64.S 1969-12-31 19:00:00.000000000 -0500
-@@ -1,105 +0,0 @@
--/*
-- *
-- * verify_cpu.S - Code for cpu long mode and SSE verification. This
-- * code has been borrowed from boot/setup.S and was introduced by
-- * Andi Kleen.
-- *
-- * Copyright (c) 2007 Andi Kleen (ak@suse.de)
-- * Copyright (c) 2007 Eric Biederman (ebiederm@xmission.com)
-- * Copyright (c) 2007 Vivek Goyal (vgoyal@in.ibm.com)
-- *
-- * This source code is licensed under the GNU General Public License,
-- * Version 2. See the file COPYING for more details.
-- *
-- * This is a common code for verification whether CPU supports
-- * long mode and SSE or not. It is not called directly instead this
-- * file is included at various places and compiled in that context.
-- * Following are the current usage.
-- *
-- * This file is included by both 16bit and 32bit code.
-- *
-- * arch/x86_64/boot/setup.S : Boot cpu verification (16bit)
-- * arch/x86_64/boot/compressed/head.S: Boot cpu verification (32bit)
-- * arch/x86_64/kernel/trampoline.S: secondary processor verfication (16bit)
-- * arch/x86_64/kernel/acpi/wakeup.S:Verfication at resume (16bit)
-- *
-- * verify_cpu, returns the status of cpu check in register %eax.
-- * 0: Success 1: Failure
-- *
-- * The caller needs to check for the error code and take the action
-- * appropriately. Either display a message or halt.
-- */
--
--#include <asm/cpufeature.h>
--
--verify_cpu:
-- pushfl # Save caller passed flags
-- pushl $0 # Kill any dangerous flags
-- popfl
--
-- pushfl # standard way to check for cpuid
-- popl %eax
-- movl %eax,%ebx
-- xorl $0x200000,%eax
-- pushl %eax
-- popfl
-- pushfl
-- popl %eax
-- cmpl %eax,%ebx
-- jz verify_cpu_no_longmode # cpu has no cpuid
--
-- movl $0x0,%eax # See if cpuid 1 is implemented
-- cpuid
-- cmpl $0x1,%eax
-- jb verify_cpu_no_longmode # no cpuid 1
--
-- xor %di,%di
-- cmpl $0x68747541,%ebx # AuthenticAMD
-- jnz verify_cpu_noamd
-- cmpl $0x69746e65,%edx
-- jnz verify_cpu_noamd
-- cmpl $0x444d4163,%ecx
-- jnz verify_cpu_noamd
-- mov $1,%di # cpu is from AMD
--
--verify_cpu_noamd:
-- movl $0x1,%eax # Does the cpu have what it takes
-- cpuid
-- andl $REQUIRED_MASK0,%edx
-- xorl $REQUIRED_MASK0,%edx
-- jnz verify_cpu_no_longmode
--
-- movl $0x80000000,%eax # See if extended cpuid is implemented
-- cpuid
-- cmpl $0x80000001,%eax
-- jb verify_cpu_no_longmode # no extended cpuid
--
-- movl $0x80000001,%eax # Does the cpu have what it takes
-- cpuid
-- andl $REQUIRED_MASK1,%edx
-- xorl $REQUIRED_MASK1,%edx
-- jnz verify_cpu_no_longmode
--
--verify_cpu_sse_test:
-- movl $1,%eax
-- cpuid
-- andl $SSE_MASK,%edx
-- cmpl $SSE_MASK,%edx
-- je verify_cpu_sse_ok
-- test %di,%di
-- jz verify_cpu_no_longmode # only try to force SSE on AMD
-- movl $0xc0010015,%ecx # HWCR
-- rdmsr
-- btr $15,%eax # enable SSE
-- wrmsr
-- xor %di,%di # don't loop
-- jmp verify_cpu_sse_test # try again
--
--verify_cpu_no_longmode:
-- popfl # Restore caller passed flags
-- movl $1,%eax
-- ret
--verify_cpu_sse_ok:
-- popfl # Restore caller passed flags
-- xorl %eax, %eax
-- ret
-diff -urNp linux-2.6.32.49/arch/x86/kernel/verify_cpu.S linux-2.6.32.49/arch/x86/kernel/verify_cpu.S
---- linux-2.6.32.49/arch/x86/kernel/verify_cpu.S 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/verify_cpu.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
+new file mode 100644
+index 0000000..50c5edd
+--- /dev/null
++++ b/arch/x86/kernel/verify_cpu.S
@@ -0,0 +1,140 @@
+/*
+ *
@@ -19162,9 +20249,121 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/verify_cpu.S linux-2.6.32.49/arch/x86
+ popfl # Restore caller passed flags
+ xorl %eax, %eax
+ ret
-diff -urNp linux-2.6.32.49/arch/x86/kernel/vm86_32.c linux-2.6.32.49/arch/x86/kernel/vm86_32.c
---- linux-2.6.32.49/arch/x86/kernel/vm86_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/vm86_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/verify_cpu_64.S b/arch/x86/kernel/verify_cpu_64.S
+deleted file mode 100644
+index 45b6f8a..0000000
+--- a/arch/x86/kernel/verify_cpu_64.S
++++ /dev/null
+@@ -1,105 +0,0 @@
+-/*
+- *
+- * verify_cpu.S - Code for cpu long mode and SSE verification. This
+- * code has been borrowed from boot/setup.S and was introduced by
+- * Andi Kleen.
+- *
+- * Copyright (c) 2007 Andi Kleen (ak@suse.de)
+- * Copyright (c) 2007 Eric Biederman (ebiederm@xmission.com)
+- * Copyright (c) 2007 Vivek Goyal (vgoyal@in.ibm.com)
+- *
+- * This source code is licensed under the GNU General Public License,
+- * Version 2. See the file COPYING for more details.
+- *
+- * This is a common code for verification whether CPU supports
+- * long mode and SSE or not. It is not called directly instead this
+- * file is included at various places and compiled in that context.
+- * Following are the current usage.
+- *
+- * This file is included by both 16bit and 32bit code.
+- *
+- * arch/x86_64/boot/setup.S : Boot cpu verification (16bit)
+- * arch/x86_64/boot/compressed/head.S: Boot cpu verification (32bit)
+- * arch/x86_64/kernel/trampoline.S: secondary processor verfication (16bit)
+- * arch/x86_64/kernel/acpi/wakeup.S:Verfication at resume (16bit)
+- *
+- * verify_cpu, returns the status of cpu check in register %eax.
+- * 0: Success 1: Failure
+- *
+- * The caller needs to check for the error code and take the action
+- * appropriately. Either display a message or halt.
+- */
+-
+-#include <asm/cpufeature.h>
+-
+-verify_cpu:
+- pushfl # Save caller passed flags
+- pushl $0 # Kill any dangerous flags
+- popfl
+-
+- pushfl # standard way to check for cpuid
+- popl %eax
+- movl %eax,%ebx
+- xorl $0x200000,%eax
+- pushl %eax
+- popfl
+- pushfl
+- popl %eax
+- cmpl %eax,%ebx
+- jz verify_cpu_no_longmode # cpu has no cpuid
+-
+- movl $0x0,%eax # See if cpuid 1 is implemented
+- cpuid
+- cmpl $0x1,%eax
+- jb verify_cpu_no_longmode # no cpuid 1
+-
+- xor %di,%di
+- cmpl $0x68747541,%ebx # AuthenticAMD
+- jnz verify_cpu_noamd
+- cmpl $0x69746e65,%edx
+- jnz verify_cpu_noamd
+- cmpl $0x444d4163,%ecx
+- jnz verify_cpu_noamd
+- mov $1,%di # cpu is from AMD
+-
+-verify_cpu_noamd:
+- movl $0x1,%eax # Does the cpu have what it takes
+- cpuid
+- andl $REQUIRED_MASK0,%edx
+- xorl $REQUIRED_MASK0,%edx
+- jnz verify_cpu_no_longmode
+-
+- movl $0x80000000,%eax # See if extended cpuid is implemented
+- cpuid
+- cmpl $0x80000001,%eax
+- jb verify_cpu_no_longmode # no extended cpuid
+-
+- movl $0x80000001,%eax # Does the cpu have what it takes
+- cpuid
+- andl $REQUIRED_MASK1,%edx
+- xorl $REQUIRED_MASK1,%edx
+- jnz verify_cpu_no_longmode
+-
+-verify_cpu_sse_test:
+- movl $1,%eax
+- cpuid
+- andl $SSE_MASK,%edx
+- cmpl $SSE_MASK,%edx
+- je verify_cpu_sse_ok
+- test %di,%di
+- jz verify_cpu_no_longmode # only try to force SSE on AMD
+- movl $0xc0010015,%ecx # HWCR
+- rdmsr
+- btr $15,%eax # enable SSE
+- wrmsr
+- xor %di,%di # don't loop
+- jmp verify_cpu_sse_test # try again
+-
+-verify_cpu_no_longmode:
+- popfl # Restore caller passed flags
+- movl $1,%eax
+- ret
+-verify_cpu_sse_ok:
+- popfl # Restore caller passed flags
+- xorl %eax, %eax
+- ret
+diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
+index 9c4e625..c992817 100644
+--- a/arch/x86/kernel/vm86_32.c
++++ b/arch/x86/kernel/vm86_32.c
@@ -41,6 +41,7 @@
#include <linux/ptrace.h>
#include <linux/audit.h>
@@ -19173,7 +20372,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vm86_32.c linux-2.6.32.49/arch/x86/ke
#include <asm/uaccess.h>
#include <asm/io.h>
-@@ -148,7 +149,7 @@ struct pt_regs *save_v86_state(struct ke
+@@ -148,7 +149,7 @@ struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
do_exit(SIGSEGV);
}
@@ -19211,7 +20410,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vm86_32.c linux-2.6.32.49/arch/x86/ke
tsk = current;
switch (regs->bx) {
case VM86_REQUEST_IRQ:
-@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm
+@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
tsk->thread.saved_fs = info->regs32->fs;
tsk->thread.saved_gs = get_user_gs(info->regs32);
@@ -19220,7 +20419,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vm86_32.c linux-2.6.32.49/arch/x86/ke
tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
-@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_re
+@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
goto cannot_handle;
if (i == 0x21 && is_revectored(AH(regs), &KVM86->int21_revectored))
goto cannot_handle;
@@ -19229,10 +20428,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vm86_32.c linux-2.6.32.49/arch/x86/ke
if (get_user(segoffs, intr_ptr))
goto cannot_handle;
if ((segoffs >> 16) == BIOSSEG)
-diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/kernel/vmi_32.c
---- linux-2.6.32.49/arch/x86/kernel/vmi_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/vmi_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,12 +44,17 @@ typedef u32 __attribute__((regparm(1)))
+diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
+index d430e4c..831f817 100644
+--- a/arch/x86/kernel/vmi_32.c
++++ b/arch/x86/kernel/vmi_32.c
+@@ -44,12 +44,17 @@ typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void);
typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
#define call_vrom_func(rom,func) \
@@ -19241,14 +20441,15 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
#define call_vrom_long_func(rom,func,arg) \
- (((VROMLONGFUNC *)(rom->func)) (arg))
+-
+-static struct vrom_header *vmi_rom;
+({\
+ u64 __reloc = ((VROMLONGFUNC *)(ktva_ktla(rom.func))) (arg);\
+ struct vmi_relocation_info *const __rel = (struct vmi_relocation_info *)&__reloc;\
+ __rel->eip = (unsigned char *)ktva_ktla((unsigned long)__rel->eip);\
+ __reloc;\
+})
-
--static struct vrom_header *vmi_rom;
++
+static struct vrom_header vmi_rom __attribute((__section__(".vmi.rom"), __aligned__(PAGE_SIZE)));
static int disable_pge;
static int disable_pse;
@@ -19275,7 +20476,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
}
static unsigned patch_internal(int call, unsigned len, void *insnbuf,
-@@ -102,6 +107,7 @@ static unsigned patch_internal(int call,
+@@ -102,6 +107,7 @@ static unsigned patch_internal(int call, unsigned len, void *insnbuf,
{
u64 reloc;
struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc;
@@ -19283,7 +20484,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
reloc = call_vrom_long_func(vmi_rom, get_reloc, call);
switch(rel->type) {
case VMI_RELOCATION_CALL_REL:
-@@ -404,13 +410,13 @@ static void vmi_set_pud(pud_t *pudp, pud
+@@ -404,13 +410,13 @@ static void vmi_set_pud(pud_t *pudp, pud_t pudval)
static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
@@ -19299,7 +20500,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD);
}
#endif
-@@ -438,10 +444,10 @@ vmi_startup_ipi_hook(int phys_apicid, un
+@@ -438,10 +444,10 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
ap.ss = __KERNEL_DS;
ap.esp = (unsigned long) start_esp;
@@ -19332,7 +20533,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
static inline int __init check_vmi_rom(struct vrom_header *rom)
{
struct pci_header *pci;
-@@ -498,6 +516,10 @@ static inline int __init check_vmi_rom(s
+@@ -498,6 +516,10 @@ static inline int __init check_vmi_rom(struct vrom_header *rom)
return 0;
if (rom->vrom_signature != VMI_SIGNATURE)
return 0;
@@ -19343,7 +20544,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
if (rom->api_version_maj != VMI_API_REV_MAJOR ||
rom->api_version_min+1 < VMI_API_REV_MINOR+1) {
printk(KERN_WARNING "VMI: Found mismatched rom version %d.%d\n",
-@@ -562,7 +584,7 @@ static inline int __init probe_vmi_rom(v
+@@ -562,7 +584,7 @@ static inline int __init probe_vmi_rom(void)
struct vrom_header *romstart;
romstart = (struct vrom_header *)isa_bus_to_virt(base);
if (check_vmi_rom(romstart)) {
@@ -19352,7 +20553,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
return 1;
}
}
-@@ -836,6 +858,11 @@ static inline int __init activate_vmi(vo
+@@ -836,6 +858,11 @@ static inline int __init activate_vmi(void)
para_fill(pv_irq_ops.safe_halt, Halt);
@@ -19364,7 +20565,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
/*
* Alternative instruction rewriting doesn't happen soon enough
* to convert VMI_IRET to a call instead of a jump; so we have
-@@ -853,16 +880,16 @@ static inline int __init activate_vmi(vo
+@@ -853,16 +880,16 @@ static inline int __init activate_vmi(void)
void __init vmi_init(void)
{
@@ -19394,9 +20595,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmi_32.c linux-2.6.32.49/arch/x86/ker
return;
local_irq_save(flags);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S
---- linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
+index 3c68fe2..12c8280 100644
+--- a/arch/x86/kernel/vmlinux.lds.S
++++ b/arch/x86/kernel/vmlinux.lds.S
@@ -26,6 +26,13 @@
#include <asm/page_types.h>
#include <asm/cache.h>
@@ -19411,7 +20613,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.49/arch/x8
#undef i386 /* in case the preprocessor is a 32bit one */
-@@ -34,40 +41,53 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONF
+@@ -34,40 +41,53 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
#ifdef CONFIG_X86_32
OUTPUT_ARCH(i386)
ENTRY(phys_startup_32)
@@ -19502,11 +20704,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.49/arch/x8
+ . = ALIGN(HPAGE_SIZE);
+ MODULES_EXEC_END = . - 1;
+#endif
-+
-+ } :module
-+#endif
- EXCEPTION_TABLE(16) :text = 0x9090
++ } :module
++#endif
++
+ .text.end : AT(ADDR(.text.end) - LOAD_OFFSET) {
+ /* End of text section */
+ _etext = . - __KERNEL_TEXT_OFFSET;
@@ -19689,10 +20891,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.49/arch/x8
"kernel image bigger than KERNEL_IMAGE_SIZE");
#ifdef CONFIG_SMP
-diff -urNp linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c
---- linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -80,6 +80,7 @@ void update_vsyscall(struct timespec *wa
+diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
+index 62f39d7..3bc46a1 100644
+--- a/arch/x86/kernel/vsyscall_64.c
++++ b/arch/x86/kernel/vsyscall_64.c
+@@ -80,6 +80,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
/* copy vsyscall data */
@@ -19700,7 +20903,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c linux-2.6.32.49/arch/x8
vsyscall_gtod_data.clock.vread = clock->vread;
vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
vsyscall_gtod_data.clock.mask = clock->mask;
-@@ -203,7 +204,7 @@ vgetcpu(unsigned *cpu, unsigned *node, s
+@@ -203,7 +204,7 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
We do this here because otherwise user space would do it on
its own in a likely inferior way (no access to jiffies).
If you don't like it pass NULL. */
@@ -19709,9 +20912,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/vsyscall_64.c linux-2.6.32.49/arch/x8
p = tcache->blob[1];
} else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
/* Load per CPU data from RDTSCP */
-diff -urNp linux-2.6.32.49/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.32.49/arch/x86/kernel/x8664_ksyms_64.c
---- linux-2.6.32.49/arch/x86/kernel/x8664_ksyms_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/x8664_ksyms_64.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c
+index 3909e3b..5433a97 100644
+--- a/arch/x86/kernel/x8664_ksyms_64.c
++++ b/arch/x86/kernel/x8664_ksyms_64.c
@@ -30,8 +30,6 @@ EXPORT_SYMBOL(__put_user_8);
EXPORT_SYMBOL(copy_user_generic);
@@ -19721,10 +20925,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.32.49/arch
EXPORT_SYMBOL(__copy_from_user_inatomic);
EXPORT_SYMBOL(copy_page);
-diff -urNp linux-2.6.32.49/arch/x86/kernel/xsave.c linux-2.6.32.49/arch/x86/kernel/xsave.c
---- linux-2.6.32.49/arch/x86/kernel/xsave.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kernel/xsave.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,7 +54,7 @@ int check_for_xstate(struct i387_fxsave_
+diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
+index c5ee17e..d63218f 100644
+--- a/arch/x86/kernel/xsave.c
++++ b/arch/x86/kernel/xsave.c
+@@ -54,7 +54,7 @@ int check_for_xstate(struct i387_fxsave_struct __user *buf,
fx_sw_user->xstate_size > fx_sw_user->extended_size)
return -1;
@@ -19742,7 +20947,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/xsave.c linux-2.6.32.49/arch/x86/kern
}
/*
-@@ -228,7 +228,7 @@ int restore_i387_xstate(void __user *buf
+@@ -228,7 +228,7 @@ int restore_i387_xstate(void __user *buf)
if (task_thread_info(tsk)->status & TS_XSAVE)
err = restore_user_xstate(buf);
else
@@ -19751,9 +20956,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kernel/xsave.c linux-2.6.32.49/arch/x86/kern
buf);
if (unlikely(err)) {
/*
-diff -urNp linux-2.6.32.49/arch/x86/kvm/emulate.c linux-2.6.32.49/arch/x86/kvm/emulate.c
---- linux-2.6.32.49/arch/x86/kvm/emulate.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/emulate.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
+index 1350e43..a94b011 100644
+--- a/arch/x86/kvm/emulate.c
++++ b/arch/x86/kvm/emulate.c
@@ -81,8 +81,8 @@
#define Src2CL (1<<29)
#define Src2ImmByte (2<<29)
@@ -19790,9 +20996,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/emulate.c linux-2.6.32.49/arch/x86/kvm/e
switch ((_dst).bytes) { \
case 1: \
____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b"); \
-diff -urNp linux-2.6.32.49/arch/x86/kvm/lapic.c linux-2.6.32.49/arch/x86/kvm/lapic.c
---- linux-2.6.32.49/arch/x86/kvm/lapic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/lapic.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
+index 8dfeaaa..4daa395 100644
+--- a/arch/x86/kvm/lapic.c
++++ b/arch/x86/kvm/lapic.c
@@ -52,7 +52,7 @@
#define APIC_BUS_CYCLE_NS 1
@@ -19802,10 +21009,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/lapic.c linux-2.6.32.49/arch/x86/kvm/lap
#define APIC_LVT_NUM 6
/* 14 is the version for Xeon and Pentium 8.4.8*/
-diff -urNp linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h
---- linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h 2011-11-18 18:01:55.000000000 -0500
-@@ -416,6 +416,8 @@ static int FNAME(page_fault)(struct kvm_
+diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
+index 3bc2707..dd157e2 100644
+--- a/arch/x86/kvm/paging_tmpl.h
++++ b/arch/x86/kvm/paging_tmpl.h
+@@ -416,6 +416,8 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
int level = PT_PAGE_TABLE_LEVEL;
unsigned long mmu_seq;
@@ -19814,7 +21022,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h linux-2.6.32.49/arch/x86/k
pgprintk("%s: addr %lx err %x\n", __func__, addr, error_code);
kvm_mmu_audit(vcpu, "pre page fault");
-@@ -461,6 +463,7 @@ static int FNAME(page_fault)(struct kvm_
+@@ -461,6 +463,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
kvm_mmu_free_some_pages(vcpu);
sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault,
level, &write_pt, pfn);
@@ -19822,10 +21030,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/paging_tmpl.h linux-2.6.32.49/arch/x86/k
pgprintk("%s: shadow pte %p %llx ptwrite %d\n", __func__,
sptep, *sptep, write_pt);
-diff -urNp linux-2.6.32.49/arch/x86/kvm/svm.c linux-2.6.32.49/arch/x86/kvm/svm.c
---- linux-2.6.32.49/arch/x86/kvm/svm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/svm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2486,7 +2486,11 @@ static void reload_tss(struct kvm_vcpu *
+diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
+index 7c6e63e..c5d92c1 100644
+--- a/arch/x86/kvm/svm.c
++++ b/arch/x86/kvm/svm.c
+@@ -2486,7 +2486,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
int cpu = raw_smp_processor_id();
struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu);
@@ -19846,9 +21055,10 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/svm.c linux-2.6.32.49/arch/x86/kvm/svm.c
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
.hardware_setup = svm_hardware_setup,
-diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
---- linux-2.6.32.49/arch/x86/kvm/vmx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/vmx.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
+index e6d925f..e7a4af8 100644
+--- a/arch/x86/kvm/vmx.c
++++ b/arch/x86/kvm/vmx.c
@@ -570,7 +570,11 @@ static void reload_tss(void)
kvm_get_gdt(&gdt);
@@ -19875,7 +21085,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
if (enable_ept && !cpu_has_vmx_ept_2m_page())
kvm_disable_largepages();
-@@ -2362,7 +2369,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
+@@ -2362,7 +2369,7 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
vmcs_writel(HOST_IDTR_BASE, dt.base); /* 22.2.4 */
asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
@@ -19884,7 +21094,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0);
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0);
vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, 0);
-@@ -3718,6 +3725,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -3718,6 +3725,12 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
"jmp .Lkvm_vmx_return \n\t"
".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t"
".Lkvm_vmx_return: "
@@ -19897,7 +21107,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
/* Save guest registers, load host registers, keep flags */
"xchg %0, (%%"R"sp) \n\t"
"mov %%"R"ax, %c[rax](%0) \n\t"
-@@ -3764,8 +3777,13 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -3764,8 +3777,13 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
[r15]"i"(offsetof(struct vcpu_vmx, vcpu.arch.regs[VCPU_REGS_R15])),
#endif
[cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2))
@@ -19912,7 +21122,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
#ifdef CONFIG_X86_64
, "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
#endif
-@@ -3782,7 +3800,16 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -3782,7 +3800,16 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
if (vmx->rmode.irq.pending)
fixup_rmode_irq(vmx);
@@ -19939,10 +21149,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/vmx.c linux-2.6.32.49/arch/x86/kvm/vmx.c
.cpu_has_kvm_support = cpu_has_kvm_support,
.disabled_by_bios = vmx_disabled_by_bios,
.hardware_setup = hardware_setup,
-diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
---- linux-2.6.32.49/arch/x86/kvm/x86.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/kvm/x86.c 2011-11-15 19:59:43.000000000 -0500
-@@ -82,7 +82,7 @@ static void update_cr8_intercept(struct
+diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
+index df1cefb..5e882ad 100644
+--- a/arch/x86/kvm/x86.c
++++ b/arch/x86/kvm/x86.c
+@@ -82,7 +82,7 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu);
static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries);
@@ -19951,7 +21162,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
EXPORT_SYMBOL_GPL(kvm_x86_ops);
int ignore_msrs = 0;
-@@ -1430,15 +1430,20 @@ static int kvm_vcpu_ioctl_set_cpuid2(str
+@@ -1430,15 +1430,20 @@ static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries)
{
@@ -19975,7 +21186,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
vcpu->arch.cpuid_nent = cpuid->nent;
kvm_apic_set_version(vcpu);
return 0;
-@@ -1451,16 +1456,20 @@ static int kvm_vcpu_ioctl_get_cpuid2(str
+@@ -1451,16 +1456,20 @@ static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries)
{
@@ -19999,7 +21210,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
return 0;
out:
-@@ -1678,7 +1687,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
+@@ -1678,7 +1687,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
struct kvm_interrupt *irq)
{
@@ -20008,7 +21219,7 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
return -EINVAL;
if (irqchip_in_kernel(vcpu->kvm))
return -ENXIO;
-@@ -3260,10 +3269,10 @@ static struct notifier_block kvmclock_cp
+@@ -3260,10 +3269,10 @@ static struct notifier_block kvmclock_cpufreq_notifier_block = {
.notifier_call = kvmclock_cpufreq_notifier
};
@@ -20021,10 +21232,11 @@ diff -urNp linux-2.6.32.49/arch/x86/kvm/x86.c linux-2.6.32.49/arch/x86/kvm/x86.c
if (kvm_x86_ops) {
printk(KERN_ERR "kvm: already loaded the other module\n");
-diff -urNp linux-2.6.32.49/arch/x86/lguest/boot.c linux-2.6.32.49/arch/x86/lguest/boot.c
---- linux-2.6.32.49/arch/x86/lguest/boot.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lguest/boot.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1172,9 +1172,10 @@ static __init int early_put_chars(u32 vt
+diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
+index 7e59dc1..b88c98f 100644
+--- a/arch/x86/lguest/boot.c
++++ b/arch/x86/lguest/boot.c
+@@ -1172,9 +1172,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
* Rebooting also tells the Host we're finished, but the RESTART flag tells the
* Launcher to reboot us.
*/
@@ -20036,10 +21248,11 @@ diff -urNp linux-2.6.32.49/arch/x86/lguest/boot.c linux-2.6.32.49/arch/x86/lgues
}
/*G:050
-diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/lib/atomic64_32.c
---- linux-2.6.32.49/arch/x86/lib/atomic64_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/atomic64_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -25,6 +25,12 @@ u64 atomic64_cmpxchg(atomic64_t *ptr, u6
+diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
+index 824fa0b..c619e96 100644
+--- a/arch/x86/lib/atomic64_32.c
++++ b/arch/x86/lib/atomic64_32.c
+@@ -25,6 +25,12 @@ u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val)
}
EXPORT_SYMBOL(atomic64_cmpxchg);
@@ -20052,7 +21265,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
/**
* atomic64_xchg - xchg atomic64 variable
* @ptr: pointer to type atomic64_t
-@@ -56,6 +62,36 @@ u64 atomic64_xchg(atomic64_t *ptr, u64 n
+@@ -56,6 +62,36 @@ u64 atomic64_xchg(atomic64_t *ptr, u64 new_val)
EXPORT_SYMBOL(atomic64_xchg);
/**
@@ -20089,7 +21302,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
* atomic64_set - set atomic64 variable
* @ptr: pointer to type atomic64_t
* @new_val: value to assign
-@@ -69,7 +105,19 @@ void atomic64_set(atomic64_t *ptr, u64 n
+@@ -69,7 +105,19 @@ void atomic64_set(atomic64_t *ptr, u64 new_val)
EXPORT_SYMBOL(atomic64_set);
/**
@@ -20110,7 +21323,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
* atomic64_add_return - add and return
* @delta: integer value to add
* @ptr: pointer to type atomic64_t
-@@ -99,24 +147,72 @@ noinline u64 atomic64_add_return(u64 del
+@@ -99,24 +147,72 @@ noinline u64 atomic64_add_return(u64 delta, atomic64_t *ptr)
}
EXPORT_SYMBOL(atomic64_add_return);
@@ -20183,7 +21396,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
/**
* atomic64_add - add integer to atomic64 variable
* @delta: integer value to add
-@@ -131,6 +227,19 @@ void atomic64_add(u64 delta, atomic64_t
+@@ -131,6 +227,19 @@ void atomic64_add(u64 delta, atomic64_t *ptr)
EXPORT_SYMBOL(atomic64_add);
/**
@@ -20203,7 +21416,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
* atomic64_sub - subtract the atomic64 variable
* @delta: integer value to subtract
* @ptr: pointer to type atomic64_t
-@@ -144,6 +253,19 @@ void atomic64_sub(u64 delta, atomic64_t
+@@ -144,6 +253,19 @@ void atomic64_sub(u64 delta, atomic64_t *ptr)
EXPORT_SYMBOL(atomic64_sub);
/**
@@ -20261,9 +21474,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/atomic64_32.c linux-2.6.32.49/arch/x86/l
* atomic64_dec_and_test - decrement and test
* @ptr: pointer to type atomic64_t
*
-diff -urNp linux-2.6.32.49/arch/x86/lib/checksum_32.S linux-2.6.32.49/arch/x86/lib/checksum_32.S
---- linux-2.6.32.49/arch/x86/lib/checksum_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/checksum_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/checksum_32.S b/arch/x86/lib/checksum_32.S
+index adbccd0..98f96c8 100644
+--- a/arch/x86/lib/checksum_32.S
++++ b/arch/x86/lib/checksum_32.S
@@ -28,7 +28,8 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -20274,7 +21488,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/checksum_32.S linux-2.6.32.49/arch/x86/l
/*
* computes a partial checksum, e.g. for TCP/UDP fragments
*/
-@@ -304,9 +305,28 @@ unsigned int csum_partial_copy_generic (
+@@ -304,9 +305,28 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
#define ARGBASE 16
#define FP 12
@@ -20524,9 +21738,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/checksum_32.S linux-2.6.32.49/arch/x86/l
#undef ROUND
#undef ROUND1
-diff -urNp linux-2.6.32.49/arch/x86/lib/clear_page_64.S linux-2.6.32.49/arch/x86/lib/clear_page_64.S
---- linux-2.6.32.49/arch/x86/lib/clear_page_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/clear_page_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/clear_page_64.S b/arch/x86/lib/clear_page_64.S
+index ebeafcc..1e3a402 100644
+--- a/arch/x86/lib/clear_page_64.S
++++ b/arch/x86/lib/clear_page_64.S
@@ -1,5 +1,6 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -20559,9 +21774,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/clear_page_64.S linux-2.6.32.49/arch/x86
1: .byte 0xeb /* jmp <disp8> */
.byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.32.49/arch/x86/lib/copy_page_64.S linux-2.6.32.49/arch/x86/lib/copy_page_64.S
---- linux-2.6.32.49/arch/x86/lib/copy_page_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/copy_page_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/copy_page_64.S b/arch/x86/lib/copy_page_64.S
+index 727a5d4..333818a 100644
+--- a/arch/x86/lib/copy_page_64.S
++++ b/arch/x86/lib/copy_page_64.S
@@ -2,12 +2,14 @@
#include <linux/linkage.h>
@@ -20577,6 +21793,42 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_page_64.S linux-2.6.32.49/arch/x86/
ret
CFI_ENDPROC
ENDPROC(copy_page_c)
+@@ -38,7 +40,7 @@ ENTRY(copy_page)
+ movq 16 (%rsi), %rdx
+ movq 24 (%rsi), %r8
+ movq 32 (%rsi), %r9
+- movq 40 (%rsi), %r10
++ movq 40 (%rsi), %r13
+ movq 48 (%rsi), %r11
+ movq 56 (%rsi), %r12
+
+@@ -49,7 +51,7 @@ ENTRY(copy_page)
+ movq %rdx, 16 (%rdi)
+ movq %r8, 24 (%rdi)
+ movq %r9, 32 (%rdi)
+- movq %r10, 40 (%rdi)
++ movq %r13, 40 (%rdi)
+ movq %r11, 48 (%rdi)
+ movq %r12, 56 (%rdi)
+
+@@ -68,7 +70,7 @@ ENTRY(copy_page)
+ movq 16 (%rsi), %rdx
+ movq 24 (%rsi), %r8
+ movq 32 (%rsi), %r9
+- movq 40 (%rsi), %r10
++ movq 40 (%rsi), %r13
+ movq 48 (%rsi), %r11
+ movq 56 (%rsi), %r12
+
+@@ -77,7 +79,7 @@ ENTRY(copy_page)
+ movq %rdx, 16 (%rdi)
+ movq %r8, 24 (%rdi)
+ movq %r9, 32 (%rdi)
+- movq %r10, 40 (%rdi)
++ movq %r13, 40 (%rdi)
+ movq %r11, 48 (%rdi)
+ movq %r12, 56 (%rdi)
+
@@ -94,6 +96,7 @@ ENTRY(copy_page)
CFI_RESTORE r13
addq $3*8,%rsp
@@ -20594,9 +21846,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_page_64.S linux-2.6.32.49/arch/x86/
1: .byte 0xeb /* jmp <disp8> */
.byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_64.S linux-2.6.32.49/arch/x86/lib/copy_user_64.S
---- linux-2.6.32.49/arch/x86/lib/copy_user_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/copy_user_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
+index af8debd..40c75f3 100644
+--- a/arch/x86/lib/copy_user_64.S
++++ b/arch/x86/lib/copy_user_64.S
@@ -15,13 +15,15 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
@@ -20673,6 +21926,30 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_64.S linux-2.6.32.49/arch/x86/
ret
CFI_ENDPROC
ENDPROC(bad_from_user)
+@@ -142,19 +115,19 @@ ENTRY(copy_user_generic_unrolled)
+ jz 17f
+ 1: movq (%rsi),%r8
+ 2: movq 1*8(%rsi),%r9
+-3: movq 2*8(%rsi),%r10
++3: movq 2*8(%rsi),%rax
+ 4: movq 3*8(%rsi),%r11
+ 5: movq %r8,(%rdi)
+ 6: movq %r9,1*8(%rdi)
+-7: movq %r10,2*8(%rdi)
++7: movq %rax,2*8(%rdi)
+ 8: movq %r11,3*8(%rdi)
+ 9: movq 4*8(%rsi),%r8
+ 10: movq 5*8(%rsi),%r9
+-11: movq 6*8(%rsi),%r10
++11: movq 6*8(%rsi),%rax
+ 12: movq 7*8(%rsi),%r11
+ 13: movq %r8,4*8(%rdi)
+ 14: movq %r9,5*8(%rdi)
+-15: movq %r10,6*8(%rdi)
++15: movq %rax,6*8(%rdi)
+ 16: movq %r11,7*8(%rdi)
+ leaq 64(%rsi),%rsi
+ leaq 64(%rdi),%rdi
@@ -180,6 +153,7 @@ ENTRY(copy_user_generic_unrolled)
decl %ecx
jnz 21b
@@ -20689,9 +21966,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_64.S linux-2.6.32.49/arch/x86/
ret
.section .fixup,"ax"
-diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S
---- linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/copy_user_nocache_64.S b/arch/x86/lib/copy_user_nocache_64.S
+index cb0c112..e3a6895 100644
+--- a/arch/x86/lib/copy_user_nocache_64.S
++++ b/arch/x86/lib/copy_user_nocache_64.S
@@ -8,12 +8,14 @@
#include <linux/linkage.h>
@@ -20723,6 +22001,30 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S linux-2.6.32.49/a
cmpl $8,%edx
jb 20f /* less then 8 bytes, go to byte copy loop */
ALIGN_DESTINATION
+@@ -59,19 +70,19 @@ ENTRY(__copy_user_nocache)
+ jz 17f
+ 1: movq (%rsi),%r8
+ 2: movq 1*8(%rsi),%r9
+-3: movq 2*8(%rsi),%r10
++3: movq 2*8(%rsi),%rax
+ 4: movq 3*8(%rsi),%r11
+ 5: movnti %r8,(%rdi)
+ 6: movnti %r9,1*8(%rdi)
+-7: movnti %r10,2*8(%rdi)
++7: movnti %rax,2*8(%rdi)
+ 8: movnti %r11,3*8(%rdi)
+ 9: movq 4*8(%rsi),%r8
+ 10: movq 5*8(%rsi),%r9
+-11: movq 6*8(%rsi),%r10
++11: movq 6*8(%rsi),%rax
+ 12: movq 7*8(%rsi),%r11
+ 13: movnti %r8,4*8(%rdi)
+ 14: movnti %r9,5*8(%rdi)
+-15: movnti %r10,6*8(%rdi)
++15: movnti %rax,6*8(%rdi)
+ 16: movnti %r11,7*8(%rdi)
+ leaq 64(%rsi),%rsi
+ leaq 64(%rdi),%rdi
@@ -98,6 +109,7 @@ ENTRY(__copy_user_nocache)
jnz 21b
23: xorl %eax,%eax
@@ -20731,9 +22033,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/copy_user_nocache_64.S linux-2.6.32.49/a
ret
.section .fixup,"ax"
-diff -urNp linux-2.6.32.49/arch/x86/lib/csum-copy_64.S linux-2.6.32.49/arch/x86/lib/csum-copy_64.S
---- linux-2.6.32.49/arch/x86/lib/csum-copy_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/csum-copy_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S
+index f0dba36..48cb4d6 100644
+--- a/arch/x86/lib/csum-copy_64.S
++++ b/arch/x86/lib/csum-copy_64.S
@@ -8,6 +8,7 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -20746,14 +22049,15 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/csum-copy_64.S linux-2.6.32.49/arch/x86/
CFI_RESTORE rbp
addq $7*8,%rsp
CFI_ADJUST_CFA_OFFSET -7*8
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
CFI_RESTORE_STATE
-diff -urNp linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c
---- linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -52,7 +52,13 @@ csum_partial_copy_from_user(const void _
+diff --git a/arch/x86/lib/csum-wrappers_64.c b/arch/x86/lib/csum-wrappers_64.c
+index 459b58a..9570bc7 100644
+--- a/arch/x86/lib/csum-wrappers_64.c
++++ b/arch/x86/lib/csum-wrappers_64.c
+@@ -52,7 +52,13 @@ csum_partial_copy_from_user(const void __user *src, void *dst,
len -= 2;
}
}
@@ -20768,7 +22072,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c linux-2.6.32.49/arch/
dst, len, isum, errp, NULL);
if (unlikely(*errp))
goto out_err;
-@@ -105,7 +111,13 @@ csum_partial_copy_to_user(const void *sr
+@@ -105,7 +111,13 @@ csum_partial_copy_to_user(const void *src, void __user *dst,
}
*errp = 0;
@@ -20783,9 +22087,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/csum-wrappers_64.c linux-2.6.32.49/arch/
len, isum, NULL, errp);
}
EXPORT_SYMBOL(csum_partial_copy_to_user);
-diff -urNp linux-2.6.32.49/arch/x86/lib/getuser.S linux-2.6.32.49/arch/x86/lib/getuser.S
---- linux-2.6.32.49/arch/x86/lib/getuser.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/getuser.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S
+index 51f1504..ddac4c1 100644
+--- a/arch/x86/lib/getuser.S
++++ b/arch/x86/lib/getuser.S
@@ -33,15 +33,38 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
@@ -20909,9 +22214,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/getuser.S linux-2.6.32.49/arch/x86/lib/g
ret
CFI_ENDPROC
END(bad_get_user)
-diff -urNp linux-2.6.32.49/arch/x86/lib/iomap_copy_64.S linux-2.6.32.49/arch/x86/lib/iomap_copy_64.S
---- linux-2.6.32.49/arch/x86/lib/iomap_copy_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/iomap_copy_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/iomap_copy_64.S b/arch/x86/lib/iomap_copy_64.S
+index 05a95e7..326f2fa 100644
+--- a/arch/x86/lib/iomap_copy_64.S
++++ b/arch/x86/lib/iomap_copy_64.S
@@ -17,6 +17,7 @@
#include <linux/linkage.h>
@@ -20928,9 +22234,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/iomap_copy_64.S linux-2.6.32.49/arch/x86
ret
CFI_ENDPROC
ENDPROC(__iowrite32_copy)
-diff -urNp linux-2.6.32.49/arch/x86/lib/memcpy_64.S linux-2.6.32.49/arch/x86/lib/memcpy_64.S
---- linux-2.6.32.49/arch/x86/lib/memcpy_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/memcpy_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S
+index ad5441e..610e351 100644
+--- a/arch/x86/lib/memcpy_64.S
++++ b/arch/x86/lib/memcpy_64.S
@@ -4,6 +4,7 @@
#include <asm/cpufeature.h>
@@ -20951,7 +22258,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/memcpy_64.S linux-2.6.32.49/arch/x86/lib
jnz .Lloop_1
.Lend:
-+ pax_force_retaddr
++ pax_force_retaddr 0, 1
ret
CFI_ENDPROC
ENDPROC(memcpy)
@@ -20964,9 +22271,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/memcpy_64.S linux-2.6.32.49/arch/x86/lib
1: .byte 0xeb /* jmp <disp8> */
.byte (memcpy_c - memcpy) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.32.49/arch/x86/lib/memset_64.S linux-2.6.32.49/arch/x86/lib/memset_64.S
---- linux-2.6.32.49/arch/x86/lib/memset_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/memset_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/memset_64.S b/arch/x86/lib/memset_64.S
+index 2c59481..7e9ba4e 100644
+--- a/arch/x86/lib/memset_64.S
++++ b/arch/x86/lib/memset_64.S
@@ -2,6 +2,7 @@
#include <linux/linkage.h>
@@ -20983,10 +22291,27 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/memset_64.S linux-2.6.32.49/arch/x86/lib
ret
CFI_ENDPROC
ENDPROC(memset_c)
-@@ -96,6 +98,7 @@ ENTRY(__memset)
+@@ -35,13 +37,13 @@ ENDPROC(memset_c)
+ ENTRY(memset)
+ ENTRY(__memset)
+ CFI_STARTPROC
+- movq %rdi,%r10
+ movq %rdx,%r11
+
+ /* expand byte value */
+ movzbl %sil,%ecx
+ movabs $0x0101010101010101,%rax
+ mul %rcx /* with rax, clobbers rdx */
++ movq %rdi,%rdx
+
+ /* align dst */
+ movl %edi,%r9d
+@@ -95,7 +97,8 @@ ENTRY(__memset)
+ jnz .Lloop_1
.Lende:
- movq %r10,%rax
+- movq %r10,%rax
++ movq %rdx,%rax
+ pax_force_retaddr
ret
@@ -21000,10 +22325,11 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/memset_64.S linux-2.6.32.49/arch/x86/lib
1: .byte 0xeb /* jmp <disp8> */
.byte (memset_c - memset) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.32.49/arch/x86/lib/mmx_32.c linux-2.6.32.49/arch/x86/lib/mmx_32.c
---- linux-2.6.32.49/arch/x86/lib/mmx_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/mmx_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *
+diff --git a/arch/x86/lib/mmx_32.c b/arch/x86/lib/mmx_32.c
+index c9f2d9b..e7fd2c0 100644
+--- a/arch/x86/lib/mmx_32.c
++++ b/arch/x86/lib/mmx_32.c
+@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
{
void *p;
int i;
@@ -21011,7 +22337,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/mmx_32.c linux-2.6.32.49/arch/x86/lib/mm
if (unlikely(in_interrupt()))
return __memcpy(to, from, len);
-@@ -39,44 +40,72 @@ void *_mmx_memcpy(void *to, const void *
+@@ -39,44 +40,72 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
kernel_fpu_begin();
__asm__ __volatile__ (
@@ -21118,7 +22444,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/mmx_32.c linux-2.6.32.49/arch/x86/lib/mm
kernel_fpu_begin();
-@@ -166,42 +196,70 @@ static void fast_copy_page(void *to, voi
+@@ -166,42 +196,70 @@ static void fast_copy_page(void *to, void *from)
* but that is for later. -AV
*/
__asm__ __volatile__(
@@ -21318,9 +22644,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/mmx_32.c linux-2.6.32.49/arch/x86/lib/mm
from += 64;
to += 64;
-diff -urNp linux-2.6.32.49/arch/x86/lib/msr-reg.S linux-2.6.32.49/arch/x86/lib/msr-reg.S
---- linux-2.6.32.49/arch/x86/lib/msr-reg.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/msr-reg.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/msr-reg.S b/arch/x86/lib/msr-reg.S
+index 69fa106..adda88b 100644
+--- a/arch/x86/lib/msr-reg.S
++++ b/arch/x86/lib/msr-reg.S
@@ -3,6 +3,7 @@
#include <asm/dwarf2.h>
#include <asm/asm.h>
@@ -21329,17 +22656,44 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/msr-reg.S linux-2.6.32.49/arch/x86/lib/m
#ifdef CONFIG_X86_64
/*
-@@ -37,6 +38,7 @@ ENTRY(native_\op\()_safe_regs)
- movl %edi, 28(%r10)
+@@ -16,7 +17,7 @@ ENTRY(native_\op\()_safe_regs)
+ CFI_STARTPROC
+ pushq_cfi %rbx
+ pushq_cfi %rbp
+- movq %rdi, %r10 /* Save pointer */
++ movq %rdi, %r9 /* Save pointer */
+ xorl %r11d, %r11d /* Return value */
+ movl (%rdi), %eax
+ movl 4(%rdi), %ecx
+@@ -27,16 +28,17 @@ ENTRY(native_\op\()_safe_regs)
+ movl 28(%rdi), %edi
+ CFI_REMEMBER_STATE
+ 1: \op
+-2: movl %eax, (%r10)
++2: movl %eax, (%r9)
+ movl %r11d, %eax /* Return value */
+- movl %ecx, 4(%r10)
+- movl %edx, 8(%r10)
+- movl %ebx, 12(%r10)
+- movl %ebp, 20(%r10)
+- movl %esi, 24(%r10)
+- movl %edi, 28(%r10)
++ movl %ecx, 4(%r9)
++ movl %edx, 8(%r9)
++ movl %ebx, 12(%r9)
++ movl %ebp, 20(%r9)
++ movl %esi, 24(%r9)
++ movl %edi, 28(%r9)
popq_cfi %rbp
popq_cfi %rbx
+ pax_force_retaddr
ret
3:
CFI_RESTORE_STATE
-diff -urNp linux-2.6.32.49/arch/x86/lib/putuser.S linux-2.6.32.49/arch/x86/lib/putuser.S
---- linux-2.6.32.49/arch/x86/lib/putuser.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/putuser.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/putuser.S b/arch/x86/lib/putuser.S
+index 36b0d15..d381858 100644
+--- a/arch/x86/lib/putuser.S
++++ b/arch/x86/lib/putuser.S
@@ -15,7 +15,9 @@
#include <asm/thread_info.h>
#include <asm/errno.h>
@@ -21479,9 +22833,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/putuser.S linux-2.6.32.49/arch/x86/lib/p
#endif
xor %eax,%eax
EXIT
-diff -urNp linux-2.6.32.49/arch/x86/lib/rwlock_64.S linux-2.6.32.49/arch/x86/lib/rwlock_64.S
---- linux-2.6.32.49/arch/x86/lib/rwlock_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/rwlock_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/rwlock_64.S b/arch/x86/lib/rwlock_64.S
+index 05ea55f..f81311a 100644
+--- a/arch/x86/lib/rwlock_64.S
++++ b/arch/x86/lib/rwlock_64.S
@@ -17,6 +17,7 @@ ENTRY(__write_lock_failed)
LOCK_PREFIX
subl $RW_LOCK_BIAS,(%rdi)
@@ -21498,9 +22853,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/rwlock_64.S linux-2.6.32.49/arch/x86/lib
ret
CFI_ENDPROC
END(__read_lock_failed)
-diff -urNp linux-2.6.32.49/arch/x86/lib/rwsem_64.S linux-2.6.32.49/arch/x86/lib/rwsem_64.S
---- linux-2.6.32.49/arch/x86/lib/rwsem_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/rwsem_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/rwsem_64.S b/arch/x86/lib/rwsem_64.S
+index 15acecf..f768b10 100644
+--- a/arch/x86/lib/rwsem_64.S
++++ b/arch/x86/lib/rwsem_64.S
@@ -48,6 +48,7 @@ ENTRY(call_rwsem_down_read_failed)
call rwsem_down_read_failed
popq %rdx
@@ -21534,9 +22890,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/rwsem_64.S linux-2.6.32.49/arch/x86/lib/
+ pax_force_retaddr
ret
ENDPROC(call_rwsem_downgrade_wake)
-diff -urNp linux-2.6.32.49/arch/x86/lib/thunk_64.S linux-2.6.32.49/arch/x86/lib/thunk_64.S
---- linux-2.6.32.49/arch/x86/lib/thunk_64.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/thunk_64.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
+index bf9a7d5..fb06ab5 100644
+--- a/arch/x86/lib/thunk_64.S
++++ b/arch/x86/lib/thunk_64.S
@@ -10,7 +10,8 @@
#include <asm/dwarf2.h>
#include <asm/calling.h>
@@ -21562,9 +22919,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/thunk_64.S linux-2.6.32.49/arch/x86/lib/
+ pax_force_retaddr
ret
CFI_ENDPROC
-diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/lib/usercopy_32.c
---- linux-2.6.32.49/arch/x86/lib/usercopy_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/usercopy_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c
+index 1f118d4..ec4a953 100644
+--- a/arch/x86/lib/usercopy_32.c
++++ b/arch/x86/lib/usercopy_32.c
@@ -43,7 +43,7 @@ do { \
__asm__ __volatile__( \
" testl %1,%1\n" \
@@ -21587,7 +22945,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
".section .fixup,\"ax\"\n" \
"3: lea 0(%2,%0,4),%0\n" \
" jmp 2b\n" \
-@@ -200,6 +202,7 @@ long strnlen_user(const char __user *s,
+@@ -200,6 +202,7 @@ long strnlen_user(const char __user *s, long n)
might_fault();
__asm__ __volatile__(
@@ -21595,7 +22953,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
" testl %0, %0\n"
" jz 3f\n"
" andl %0,%%ecx\n"
-@@ -208,6 +211,7 @@ long strnlen_user(const char __user *s,
+@@ -208,6 +211,7 @@ long strnlen_user(const char __user *s, long n)
" subl %%ecx,%0\n"
" addl %0,%%eax\n"
"1:\n"
@@ -21612,7 +22970,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
{
int d0, d1;
__asm__ __volatile__(
-@@ -239,36 +243,36 @@ __copy_user_intel(void __user *to, const
+@@ -239,36 +243,36 @@ __copy_user_intel(void __user *to, const void *from, unsigned long size)
" .align 2,0x90\n"
"3: movl 0(%4), %%eax\n"
"4: movl 4(%4), %%edx\n"
@@ -21665,7 +23023,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
" addl $-64, %0\n"
" addl $64, %4\n"
" addl $64, %3\n"
-@@ -278,10 +282,119 @@ __copy_user_intel(void __user *to, const
+@@ -278,10 +282,119 @@ __copy_user_intel(void __user *to, const void *from, unsigned long size)
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -21785,7 +23143,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
".section .fixup,\"ax\"\n"
"101: lea 0(%%eax,%0,4),%0\n"
" jmp 100b\n"
-@@ -339,41 +452,41 @@ __copy_user_zeroing_intel(void *to, cons
+@@ -339,41 +452,41 @@ __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
int d0, d1;
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -21845,7 +23203,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
" movl %%eax, 56(%3)\n"
" movl %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -385,9 +498,9 @@ __copy_user_zeroing_intel(void *to, cons
+@@ -385,9 +498,9 @@ __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -21857,7 +23215,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -440,41 +553,41 @@ static unsigned long __copy_user_zeroing
+@@ -440,41 +553,41 @@ static unsigned long __copy_user_zeroing_intel_nocache(void *to,
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -21917,7 +23275,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -487,9 +600,9 @@ static unsigned long __copy_user_zeroing
+@@ -487,9 +600,9 @@ static unsigned long __copy_user_zeroing_intel_nocache(void *to,
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -21929,7 +23287,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -537,41 +650,41 @@ static unsigned long __copy_user_intel_n
+@@ -537,41 +650,41 @@ static unsigned long __copy_user_intel_nocache(void *to,
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -21989,7 +23347,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -584,9 +697,9 @@ static unsigned long __copy_user_intel_n
+@@ -584,9 +697,9 @@ static unsigned long __copy_user_intel_nocache(void *to,
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -22001,7 +23359,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -629,32 +742,36 @@ static unsigned long __copy_user_intel_n
+@@ -629,32 +742,36 @@ static unsigned long __copy_user_intel_nocache(void *to,
*/
unsigned long __copy_user_zeroing_intel(void *to, const void __user *from,
unsigned long size);
@@ -22073,7 +23431,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
return n;
}
EXPORT_SYMBOL(__copy_to_user_ll);
-@@ -797,10 +914,9 @@ unsigned long __copy_from_user_ll_nozero
+@@ -797,10 +914,9 @@ unsigned long __copy_from_user_ll_nozero(void *to, const void __user *from,
unsigned long n)
{
if (movsl_is_ok(to, from, n))
@@ -22086,7 +23444,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
return n;
}
EXPORT_SYMBOL(__copy_from_user_ll_nozero);
-@@ -827,59 +943,38 @@ unsigned long __copy_from_user_ll_nocach
+@@ -827,59 +943,38 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
if (n > 64 && cpu_has_xmm2)
n = __copy_user_intel_nocache(to, from, n);
else
@@ -22170,9 +23528,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_32.c linux-2.6.32.49/arch/x86/l
-EXPORT_SYMBOL(copy_from_user);
+EXPORT_SYMBOL(set_fs);
+#endif
-diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_64.c linux-2.6.32.49/arch/x86/lib/usercopy_64.c
---- linux-2.6.32.49/arch/x86/lib/usercopy_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/lib/usercopy_64.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c
+index b7c2849..5ef0f95 100644
+--- a/arch/x86/lib/usercopy_64.c
++++ b/arch/x86/lib/usercopy_64.c
@@ -42,6 +42,12 @@ long
__strncpy_from_user(char *dst, const char __user *src, long count)
{
@@ -22186,7 +23545,7 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_64.c linux-2.6.32.49/arch/x86/l
__do_strncpy_from_user(dst, src, count, res);
return res;
}
-@@ -65,6 +71,12 @@ unsigned long __clear_user(void __user *
+@@ -65,6 +71,12 @@ unsigned long __clear_user(void __user *addr, unsigned long size)
{
long __d0;
might_fault();
@@ -22231,33 +23590,10 @@ diff -urNp linux-2.6.32.49/arch/x86/lib/usercopy_64.c linux-2.6.32.49/arch/x86/l
{
char c;
unsigned zero_len;
-diff -urNp linux-2.6.32.49/arch/x86/Makefile linux-2.6.32.49/arch/x86/Makefile
---- linux-2.6.32.49/arch/x86/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/Makefile 2011-11-15 19:59:43.000000000 -0500
-@@ -44,6 +44,7 @@ ifeq ($(CONFIG_X86_32),y)
- else
- BITS := 64
- UTS_MACHINE := x86_64
-+ biarch := $(call cc-option,-m64)
- CHECKFLAGS += -D__x86_64__ -m64
-
- KBUILD_AFLAGS += -m64
-@@ -189,3 +190,12 @@ define archhelp
- echo ' FDARGS="..." arguments for the booted kernel'
- echo ' FDINITRD=file initrd for the booted kernel'
- endef
-+
-+define OLD_LD
-+
-+*** ${VERSION}.${PATCHLEVEL} PaX kernels no longer build correctly with old versions of binutils.
-+*** Please upgrade your binutils to 2.18 or newer
-+endef
-+
-+archprepare:
-+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
-diff -urNp linux-2.6.32.49/arch/x86/mm/extable.c linux-2.6.32.49/arch/x86/mm/extable.c
---- linux-2.6.32.49/arch/x86/mm/extable.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/extable.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
+index 61b41ca..5fef66a 100644
+--- a/arch/x86/mm/extable.c
++++ b/arch/x86/mm/extable.c
@@ -1,14 +1,71 @@
#include <linux/module.h>
#include <linux/spinlock.h>
@@ -22331,9 +23667,10 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/extable.c linux-2.6.32.49/arch/x86/mm/ext
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap;
pnp_bios_is_utter_crap = 1;
-diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault.c
---- linux-2.6.32.49/arch/x86/mm/fault.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/fault.c 2011-11-18 18:07:11.000000000 -0500
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index 8ac0d76..3f191dc 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
@@ -11,10 +11,19 @@
#include <linux/kprobes.h> /* __kprobes, ... */
#include <linux/mmiotrace.h> /* kmmio_handler, ... */
@@ -22354,7 +23691,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
/*
* Page fault error code bits:
-@@ -51,7 +60,7 @@ static inline int notify_page_fault(stru
+@@ -51,7 +60,7 @@ static inline int notify_page_fault(struct pt_regs *regs)
int ret = 0;
/* kprobe_running() needs smp_processor_id() */
@@ -22363,7 +23700,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
preempt_disable();
if (kprobe_running() && kprobe_fault_handler(regs, 14))
ret = 1;
-@@ -112,7 +121,10 @@ check_prefetch_opcode(struct pt_regs *re
+@@ -112,7 +121,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr,
return !instr_lo || (instr_lo>>1) == 1;
case 0x00:
/* Prefetch instruction is 0x0F0D or 0x0F18 */
@@ -22375,7 +23712,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
return 0;
*prefetch = (instr_lo == 0xF) &&
-@@ -146,7 +158,10 @@ is_prefetch(struct pt_regs *regs, unsign
+@@ -146,7 +158,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
while (instr < max_instr) {
unsigned char opcode;
@@ -22387,7 +23724,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
break;
instr++;
-@@ -172,6 +187,34 @@ force_sig_info_fault(int si_signo, int s
+@@ -172,6 +187,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
force_sig_info(si_signo, &info, tsk);
}
@@ -22448,7 +23785,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
break;
}
spin_unlock_irqrestore(&pgd_lock, flags);
-@@ -258,6 +314,11 @@ static noinline int vmalloc_fault(unsign
+@@ -258,6 +314,11 @@ static noinline int vmalloc_fault(unsigned long address)
* an interrupt in the middle of a task switch..
*/
pgd_paddr = read_cr3();
@@ -22488,7 +23825,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
if (pgd_none(*pgd))
set_pgd(pgd, *pgd_ref);
else
-@@ -373,7 +446,14 @@ static noinline int vmalloc_fault(unsign
+@@ -373,7 +446,14 @@ static noinline int vmalloc_fault(unsigned long address)
* happen within a race in page table update. In the later
* case just flush:
*/
@@ -22503,7 +23840,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
pgd_ref = pgd_offset_k(address);
if (pgd_none(*pgd_ref))
return -1;
-@@ -535,7 +615,7 @@ static int is_errata93(struct pt_regs *r
+@@ -535,7 +615,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
static int is_errata100(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_64
@@ -22512,7 +23849,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
return 1;
#endif
return 0;
-@@ -562,7 +642,7 @@ static int is_f00f_bug(struct pt_regs *r
+@@ -562,7 +642,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
}
static const char nx_warning[] = KERN_CRIT
@@ -22521,7 +23858,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
static void
show_fault_oops(struct pt_regs *regs, unsigned long error_code,
-@@ -571,15 +651,26 @@ show_fault_oops(struct pt_regs *regs, un
+@@ -571,15 +651,26 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
if (!oops_may_print())
return;
@@ -22550,7 +23887,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
printk(KERN_ALERT "BUG: unable to handle kernel ");
if (address < PAGE_SIZE)
printk(KERN_CONT "NULL pointer dereference");
-@@ -705,6 +796,23 @@ __bad_area_nosemaphore(struct pt_regs *r
+@@ -705,6 +796,23 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
{
struct task_struct *tsk = current;
@@ -22574,7 +23911,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
/* User mode accesses just cause a SIGSEGV */
if (error_code & PF_USER) {
/*
-@@ -722,6 +830,21 @@ __bad_area_nosemaphore(struct pt_regs *r
+@@ -722,6 +830,21 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
if (is_errata100(regs, address))
return;
@@ -22596,7 +23933,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
if (unlikely(show_unhandled_signals))
show_signal_msg(regs, error_code, address, tsk);
-@@ -818,7 +941,7 @@ do_sigbus(struct pt_regs *regs, unsigned
+@@ -818,7 +941,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
if (fault & VM_FAULT_HWPOISON) {
printk(KERN_ERR
"MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
@@ -22605,7 +23942,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
code = BUS_MCEERR_AR;
}
#endif
-@@ -857,6 +980,99 @@ static int spurious_fault_check(unsigned
+@@ -857,6 +980,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
return 1;
}
@@ -22715,7 +24052,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
if (write) {
/* write, present and write, not present: */
if (unlikely(!(vma->vm_flags & VM_WRITE)))
-@@ -956,17 +1175,31 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -956,17 +1175,31 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
{
struct vm_area_struct *vma;
struct task_struct *tsk;
@@ -22751,7 +24088,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
/*
* Detect and handle instructions that would cause a page fault for
* both a tracked kernel page and a userspace page.
-@@ -1026,7 +1259,7 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1026,7 +1259,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
* User-mode registers count as a user access even for any
* potential system fault or CPU buglet:
*/
@@ -22760,7 +24097,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
local_irq_enable();
error_code |= PF_USER;
} else {
-@@ -1080,6 +1313,11 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1080,6 +1313,11 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
might_sleep();
}
@@ -22772,7 +24109,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
vma = find_vma(mm, address);
if (unlikely(!vma)) {
bad_area(regs, error_code, address);
-@@ -1091,18 +1329,24 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1091,18 +1329,24 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
bad_area(regs, error_code, address);
return;
}
@@ -22796,13 +24133,13 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
+ if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < task_pt_regs(tsk)->sp)) {
+ bad_area(regs, error_code, address);
+ return;
-+ }
+ }
+
+#ifdef CONFIG_PAX_SEGMEXEC
+ if (unlikely((mm->pax_flags & MF_PAX_SEGMEXEC) && vma->vm_end - SEGMEXEC_TASK_SIZE - 1 < address - SEGMEXEC_TASK_SIZE - 1)) {
+ bad_area(regs, error_code, address);
+ return;
- }
++ }
+#endif
+
if (unlikely(expand_stack(vma, address))) {
@@ -23049,10 +24386,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/fault.c linux-2.6.32.49/arch/x86/mm/fault
+
+ return ret ? -EFAULT : 0;
+}
-diff -urNp linux-2.6.32.49/arch/x86/mm/gup.c linux-2.6.32.49/arch/x86/mm/gup.c
---- linux-2.6.32.49/arch/x86/mm/gup.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/gup.c 2011-11-15 19:59:43.000000000 -0500
-@@ -237,7 +237,7 @@ int __get_user_pages_fast(unsigned long
+diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
+index 71da1bc..7a16bf4 100644
+--- a/arch/x86/mm/gup.c
++++ b/arch/x86/mm/gup.c
+@@ -237,7 +237,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
addr = start;
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
@@ -23061,10 +24399,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/gup.c linux-2.6.32.49/arch/x86/mm/gup.c
(void __user *)start, len)))
return 0;
-diff -urNp linux-2.6.32.49/arch/x86/mm/highmem_32.c linux-2.6.32.49/arch/x86/mm/highmem_32.c
---- linux-2.6.32.49/arch/x86/mm/highmem_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/highmem_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -43,7 +43,10 @@ void *kmap_atomic_prot(struct page *page
+diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
+index 63a6ba6..79abd7a 100644
+--- a/arch/x86/mm/highmem_32.c
++++ b/arch/x86/mm/highmem_32.c
+@@ -43,7 +43,10 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
BUG_ON(!pte_none(*(kmap_pte-idx)));
@@ -23075,10 +24414,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/highmem_32.c linux-2.6.32.49/arch/x86/mm/
return (void *)vaddr;
}
-diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm/hugetlbpage.c
---- linux-2.6.32.49/arch/x86/mm/hugetlbpage.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/hugetlbpage.c 2011-11-15 19:59:43.000000000 -0500
-@@ -267,13 +267,20 @@ static unsigned long hugetlb_get_unmappe
+diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
+index f46c340..6ff9a26 100644
+--- a/arch/x86/mm/hugetlbpage.c
++++ b/arch/x86/mm/hugetlbpage.c
+@@ -267,13 +267,20 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
@@ -23138,7 +24478,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm
}
static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
-@@ -309,10 +317,9 @@ static unsigned long hugetlb_get_unmappe
+@@ -309,10 +317,9 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
{
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
@@ -23151,7 +24491,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm
/* don't allow allocations above current base */
if (mm->free_area_cache > base)
-@@ -322,64 +329,63 @@ static unsigned long hugetlb_get_unmappe
+@@ -322,64 +329,63 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
largest_hole = 0;
mm->free_area_cache = base;
}
@@ -23254,7 +24594,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm
mm->free_area_cache = base;
mm->cached_hole_size = ~0UL;
-@@ -400,10 +407,19 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -400,10 +407,19 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
@@ -23275,7 +24615,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm
return -ENOMEM;
if (flags & MAP_FIXED) {
-@@ -415,8 +431,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -415,8 +431,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (addr) {
addr = ALIGN(addr, huge_page_size(h));
vma = find_vma(mm, addr);
@@ -23285,9 +24625,151 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/hugetlbpage.c linux-2.6.32.49/arch/x86/mm
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/init_32.c
---- linux-2.6.32.49/arch/x86/mm/init_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/init_32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
+index 73ffd55..ad78676 100644
+--- a/arch/x86/mm/init.c
++++ b/arch/x86/mm/init.c
+@@ -69,11 +69,7 @@ static void __init find_early_table_space(unsigned long end, int use_pse,
+ * cause a hotspot and fill up ZONE_DMA. The page tables
+ * need roughly 0.5KB per GB.
+ */
+-#ifdef CONFIG_X86_32
+- start = 0x7000;
+-#else
+- start = 0x8000;
+-#endif
++ start = 0x100000;
+ e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
+ tables, PAGE_SIZE);
+ if (e820_table_start == -1UL)
+@@ -147,7 +143,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
+ #endif
+
+ set_nx();
+- if (nx_enabled)
++ if (nx_enabled && cpu_has_nx)
+ printk(KERN_INFO "NX (Execute Disable) protection: active\n");
+
+ /* Enable PSE if available */
+@@ -329,10 +325,27 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
+ * Access has to be given to non-kernel-ram areas as well, these contain the PCI
+ * mmio resources as well as potential bios/acpi data regions.
+ */
++
+ int devmem_is_allowed(unsigned long pagenr)
+ {
++#ifdef CONFIG_GRKERNSEC_KMEM
++ /* allow BDA */
++ if (!pagenr)
++ return 1;
++ /* allow EBDA */
++ if ((0x9f000 >> PAGE_SHIFT) == pagenr)
++ return 1;
++ /* allow ISA/video mem */
++ if ((ISA_START_ADDRESS >> PAGE_SHIFT) <= pagenr && pagenr < (ISA_END_ADDRESS >> PAGE_SHIFT))
++ return 1;
++ /* throw out everything else below 1MB */
++ if (pagenr <= 256)
++ return 0;
++#else
+ if (pagenr <= 256)
+ return 1;
++#endif
++
+ if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
+ return 0;
+ if (!page_is_ram(pagenr))
+@@ -379,6 +392,86 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
+
+ void free_initmem(void)
+ {
++
++#ifdef CONFIG_PAX_KERNEXEC
++#ifdef CONFIG_X86_32
++ /* PaX: limit KERNEL_CS to actual size */
++ unsigned long addr, limit;
++ struct desc_struct d;
++ int cpu;
++
++ limit = paravirt_enabled() ? ktva_ktla(0xffffffff) : (unsigned long)&_etext;
++ limit = (limit - 1UL) >> PAGE_SHIFT;
++
++ memset(__LOAD_PHYSICAL_ADDR + PAGE_OFFSET, POISON_FREE_INITMEM, PAGE_SIZE);
++ for (cpu = 0; cpu < NR_CPUS; cpu++) {
++ pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC);
++ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S);
++ }
++
++ /* PaX: make KERNEL_CS read-only */
++ addr = PFN_ALIGN(ktla_ktva((unsigned long)&_text));
++ if (!paravirt_enabled())
++ set_memory_ro(addr, (PFN_ALIGN(_sdata) - addr) >> PAGE_SHIFT);
++/*
++ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_sdata; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ }
++*/
++#ifdef CONFIG_X86_PAE
++ set_memory_nx(PFN_ALIGN(__init_begin), (PFN_ALIGN(__init_end) - PFN_ALIGN(__init_begin)) >> PAGE_SHIFT);
++/*
++ for (addr = (unsigned long)&__init_begin; addr < (unsigned long)&__init_end; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
++ }
++*/
++#endif
++
++#ifdef CONFIG_MODULES
++ set_memory_4k((unsigned long)MODULES_EXEC_VADDR, (MODULES_EXEC_END - MODULES_EXEC_VADDR) >> PAGE_SHIFT);
++#endif
++
++#else
++ pgd_t *pgd;
++ pud_t *pud;
++ pmd_t *pmd;
++ unsigned long addr, end;
++
++ /* PaX: make kernel code/rodata read-only, rest non-executable */
++ for (addr = __START_KERNEL_map; addr < __START_KERNEL_map + KERNEL_IMAGE_SIZE; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ if (!pmd_present(*pmd))
++ continue;
++ if ((unsigned long)_text <= addr && addr < (unsigned long)_sdata)
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ else
++ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
++ }
++
++ addr = (unsigned long)__va(__pa(__START_KERNEL_map));
++ end = addr + KERNEL_IMAGE_SIZE;
++ for (; addr < end; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ if (!pmd_present(*pmd))
++ continue;
++ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_sdata)))
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ }
++#endif
++
++ flush_tlb_all();
++#endif
++
+ free_init_pages("unused kernel memory",
+ (unsigned long)(&__init_begin),
+ (unsigned long)(&__init_end));
+diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
+index 30938c1..bda3d5d 100644
+--- a/arch/x86/mm/init_32.c
++++ b/arch/x86/mm/init_32.c
@@ -72,36 +72,6 @@ static __init void *alloc_low_page(void)
}
@@ -23325,7 +24807,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
* Create a page table and place a pointer to it in a middle page
* directory entry:
*/
-@@ -121,13 +91,28 @@ static pte_t * __init one_page_table_ini
+@@ -121,13 +91,28 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
page_table = (pte_t *)alloc_low_page();
paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
@@ -23354,7 +24836,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
pmd_t * __init populate_extra_pmd(unsigned long vaddr)
{
int pgd_idx = pgd_index(vaddr);
-@@ -201,6 +186,7 @@ page_table_range_init(unsigned long star
+@@ -201,6 +186,7 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
int pgd_idx, pmd_idx;
unsigned long vaddr;
pgd_t *pgd;
@@ -23362,7 +24844,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
pmd_t *pmd;
pte_t *pte = NULL;
-@@ -210,8 +196,13 @@ page_table_range_init(unsigned long star
+@@ -210,8 +196,13 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
pgd = pgd_base + pgd_idx;
for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
@@ -23378,7 +24860,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
pmd++, pmd_idx++) {
pte = page_table_kmap_check(one_page_table_init(pmd),
-@@ -223,11 +214,20 @@ page_table_range_init(unsigned long star
+@@ -223,11 +214,20 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
}
}
@@ -23403,7 +24885,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
}
/*
-@@ -243,9 +243,10 @@ kernel_physical_mapping_init(unsigned lo
+@@ -243,9 +243,10 @@ kernel_physical_mapping_init(unsigned long start,
int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
unsigned long start_pfn, end_pfn;
pgd_t *pgd_base = swapper_pg_dir;
@@ -23478,7 +24960,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
prot = PAGE_KERNEL_EXEC;
pages_4k++;
-@@ -489,7 +490,7 @@ void __init native_pagetable_setup_start
+@@ -489,7 +490,7 @@ void __init native_pagetable_setup_start(pgd_t *base)
pud = pud_offset(pgd, va);
pmd = pmd_offset(pud, va);
@@ -23487,7 +24969,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
break;
pte = pte_offset_kernel(pmd, va);
-@@ -541,9 +542,7 @@ void __init early_ioremap_page_table_ran
+@@ -541,9 +542,7 @@ void __init early_ioremap_page_table_range_init(void)
static void __init pagetable_init(void)
{
@@ -23522,7 +25004,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
EXPORT_SYMBOL_GPL(__supported_pte_mask);
/* user-defined highmem size */
-@@ -777,7 +776,7 @@ void __init setup_bootmem_allocator(void
+@@ -777,7 +776,7 @@ void __init setup_bootmem_allocator(void)
* Initialize the boot-time allocator (with low memory only):
*/
bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
@@ -23591,10 +25073,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_32.c linux-2.6.32.49/arch/x86/mm/ini
set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
printk(KERN_INFO "Write protecting the kernel text: %luk\n",
size >> 10);
-diff -urNp linux-2.6.32.49/arch/x86/mm/init_64.c linux-2.6.32.49/arch/x86/mm/init_64.c
---- linux-2.6.32.49/arch/x86/mm/init_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/init_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -164,7 +164,9 @@ void set_pte_vaddr_pud(pud_t *pud_page,
+diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
+index 7d095ad..25d2549 100644
+--- a/arch/x86/mm/init_64.c
++++ b/arch/x86/mm/init_64.c
+@@ -164,7 +164,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
pmd = fill_pmd(pud, vaddr);
pte = fill_pte(pmd, vaddr);
@@ -23604,7 +25087,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_64.c linux-2.6.32.49/arch/x86/mm/ini
/*
* It's enough to flush this one mapping.
-@@ -223,14 +225,12 @@ static void __init __init_extra_mapping(
+@@ -223,14 +225,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
pgd = pgd_offset_k((unsigned long)__va(phys));
if (pgd_none(*pgd)) {
pud = (pud_t *) spp_getpage();
@@ -23645,7 +25128,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_64.c linux-2.6.32.49/arch/x86/mm/ini
};
struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
-@@ -896,7 +902,7 @@ int in_gate_area_no_task(unsigned long a
+@@ -896,7 +902,7 @@ int in_gate_area_no_task(unsigned long addr)
const char *arch_vma_name(struct vm_area_struct *vma)
{
@@ -23654,150 +25137,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/init_64.c linux-2.6.32.49/arch/x86/mm/ini
return "[vdso]";
if (vma == &gate_vma)
return "[vsyscall]";
-diff -urNp linux-2.6.32.49/arch/x86/mm/init.c linux-2.6.32.49/arch/x86/mm/init.c
---- linux-2.6.32.49/arch/x86/mm/init.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/init.c 2011-11-15 19:59:43.000000000 -0500
-@@ -69,11 +69,7 @@ static void __init find_early_table_spac
- * cause a hotspot and fill up ZONE_DMA. The page tables
- * need roughly 0.5KB per GB.
- */
--#ifdef CONFIG_X86_32
-- start = 0x7000;
--#else
-- start = 0x8000;
--#endif
-+ start = 0x100000;
- e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
- tables, PAGE_SIZE);
- if (e820_table_start == -1UL)
-@@ -147,7 +143,7 @@ unsigned long __init_refok init_memory_m
- #endif
-
- set_nx();
-- if (nx_enabled)
-+ if (nx_enabled && cpu_has_nx)
- printk(KERN_INFO "NX (Execute Disable) protection: active\n");
-
- /* Enable PSE if available */
-@@ -329,10 +325,27 @@ unsigned long __init_refok init_memory_m
- * Access has to be given to non-kernel-ram areas as well, these contain the PCI
- * mmio resources as well as potential bios/acpi data regions.
- */
-+
- int devmem_is_allowed(unsigned long pagenr)
- {
-+#ifdef CONFIG_GRKERNSEC_KMEM
-+ /* allow BDA */
-+ if (!pagenr)
-+ return 1;
-+ /* allow EBDA */
-+ if ((0x9f000 >> PAGE_SHIFT) == pagenr)
-+ return 1;
-+ /* allow ISA/video mem */
-+ if ((ISA_START_ADDRESS >> PAGE_SHIFT) <= pagenr && pagenr < (ISA_END_ADDRESS >> PAGE_SHIFT))
-+ return 1;
-+ /* throw out everything else below 1MB */
-+ if (pagenr <= 256)
-+ return 0;
-+#else
- if (pagenr <= 256)
- return 1;
-+#endif
-+
- if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
- return 0;
- if (!page_is_ram(pagenr))
-@@ -379,6 +392,86 @@ void free_init_pages(char *what, unsigne
-
- void free_initmem(void)
- {
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+#ifdef CONFIG_X86_32
-+ /* PaX: limit KERNEL_CS to actual size */
-+ unsigned long addr, limit;
-+ struct desc_struct d;
-+ int cpu;
-+
-+ limit = paravirt_enabled() ? ktva_ktla(0xffffffff) : (unsigned long)&_etext;
-+ limit = (limit - 1UL) >> PAGE_SHIFT;
-+
-+ memset(__LOAD_PHYSICAL_ADDR + PAGE_OFFSET, POISON_FREE_INITMEM, PAGE_SIZE);
-+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
-+ pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC);
-+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S);
-+ }
-+
-+ /* PaX: make KERNEL_CS read-only */
-+ addr = PFN_ALIGN(ktla_ktva((unsigned long)&_text));
-+ if (!paravirt_enabled())
-+ set_memory_ro(addr, (PFN_ALIGN(_sdata) - addr) >> PAGE_SHIFT);
-+/*
-+ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_sdata; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ }
-+*/
-+#ifdef CONFIG_X86_PAE
-+ set_memory_nx(PFN_ALIGN(__init_begin), (PFN_ALIGN(__init_end) - PFN_ALIGN(__init_begin)) >> PAGE_SHIFT);
-+/*
-+ for (addr = (unsigned long)&__init_begin; addr < (unsigned long)&__init_end; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
-+ }
-+*/
-+#endif
-+
-+#ifdef CONFIG_MODULES
-+ set_memory_4k((unsigned long)MODULES_EXEC_VADDR, (MODULES_EXEC_END - MODULES_EXEC_VADDR) >> PAGE_SHIFT);
-+#endif
-+
-+#else
-+ pgd_t *pgd;
-+ pud_t *pud;
-+ pmd_t *pmd;
-+ unsigned long addr, end;
-+
-+ /* PaX: make kernel code/rodata read-only, rest non-executable */
-+ for (addr = __START_KERNEL_map; addr < __START_KERNEL_map + KERNEL_IMAGE_SIZE; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ if (!pmd_present(*pmd))
-+ continue;
-+ if ((unsigned long)_text <= addr && addr < (unsigned long)_sdata)
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ else
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
-+ }
-+
-+ addr = (unsigned long)__va(__pa(__START_KERNEL_map));
-+ end = addr + KERNEL_IMAGE_SIZE;
-+ for (; addr < end; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ if (!pmd_present(*pmd))
-+ continue;
-+ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_sdata)))
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ }
-+#endif
-+
-+ flush_tlb_all();
-+#endif
-+
- free_init_pages("unused kernel memory",
- (unsigned long)(&__init_begin),
- (unsigned long)(&__init_end));
-diff -urNp linux-2.6.32.49/arch/x86/mm/iomap_32.c linux-2.6.32.49/arch/x86/mm/iomap_32.c
---- linux-2.6.32.49/arch/x86/mm/iomap_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/iomap_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -65,7 +65,11 @@ void *kmap_atomic_prot_pfn(unsigned long
+diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
+index 84e236c..69bd3f6 100644
+--- a/arch/x86/mm/iomap_32.c
++++ b/arch/x86/mm/iomap_32.c
+@@ -65,7 +65,11 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
debug_kmap_atomic(type);
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -23809,9 +25153,10 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/iomap_32.c linux-2.6.32.49/arch/x86/mm/io
arch_flush_lazy_mmu_mode();
return (void *)vaddr;
-diff -urNp linux-2.6.32.49/arch/x86/mm/ioremap.c linux-2.6.32.49/arch/x86/mm/ioremap.c
---- linux-2.6.32.49/arch/x86/mm/ioremap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/ioremap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
+index 2feb9bd..3646202 100644
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
@@ -41,8 +41,8 @@ int page_is_ram(unsigned long pagenr)
* Second special case: Some BIOSen report the PC BIOS
* area (640->1Mb) as ram even though it is not.
@@ -23823,7 +25168,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/ioremap.c linux-2.6.32.49/arch/x86/mm/ior
return 0;
for (i = 0; i < e820.nr_map; i++) {
-@@ -137,13 +137,10 @@ static void __iomem *__ioremap_caller(re
+@@ -137,13 +137,10 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
/*
* Don't allow anybody to remap normal RAM that we're using..
*/
@@ -23839,7 +25184,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/ioremap.c linux-2.6.32.49/arch/x86/mm/ior
return NULL;
WARN_ON_ONCE(is_ram);
}
-@@ -407,7 +404,7 @@ static int __init early_ioremap_debug_se
+@@ -407,7 +404,7 @@ static int __init early_ioremap_debug_setup(char *str)
early_param("early_ioremap_debug", early_ioremap_debug_setup);
static __initdata int after_paging_init;
@@ -23858,10 +25203,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/ioremap.c linux-2.6.32.49/arch/x86/mm/ior
/*
* The boot-ioremap range spans multiple pmds, for which
-diff -urNp linux-2.6.32.49/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.32.49/arch/x86/mm/kmemcheck/kmemcheck.c
---- linux-2.6.32.49/arch/x86/mm/kmemcheck/kmemcheck.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/kmemcheck/kmemcheck.c 2011-11-15 19:59:43.000000000 -0500
-@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *reg
+diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
+index 8cc1833..1abbc5b 100644
+--- a/arch/x86/mm/kmemcheck/kmemcheck.c
++++ b/arch/x86/mm/kmemcheck/kmemcheck.c
+@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *regs, unsigned long address,
* memory (e.g. tracked pages)? For now, we need this to avoid
* invoking kmemcheck for PnP BIOS calls.
*/
@@ -23873,10 +25219,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.32.49/arc
return false;
pte = kmemcheck_pte_lookup(address);
-diff -urNp linux-2.6.32.49/arch/x86/mm/mmap.c linux-2.6.32.49/arch/x86/mm/mmap.c
---- linux-2.6.32.49/arch/x86/mm/mmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/mmap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size
+diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
+index c8191de..2975082 100644
+--- a/arch/x86/mm/mmap.c
++++ b/arch/x86/mm/mmap.c
+@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size(void)
* Leave an at least ~128 MB hole with possible stack randomization.
*/
#define MIN_GAP (128*1024*1024UL + stack_maxrandom_size())
@@ -23931,7 +25278,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/mmap.c linux-2.6.32.49/arch/x86/mm/mmap.c
return TASK_UNMAPPED_BASE + mmap_rnd();
}
-@@ -125,11 +138,23 @@ static unsigned long mmap_legacy_base(vo
+@@ -125,11 +138,23 @@ static unsigned long mmap_legacy_base(void)
void arch_pick_mmap_layout(struct mm_struct *mm)
{
if (mmap_is_legacy()) {
@@ -23957,10 +25304,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/mmap.c linux-2.6.32.49/arch/x86/mm/mmap.c
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.32.49/arch/x86/mm/mmio-mod.c linux-2.6.32.49/arch/x86/mm/mmio-mod.c
---- linux-2.6.32.49/arch/x86/mm/mmio-mod.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/mmio-mod.c 2011-11-15 19:59:43.000000000 -0500
-@@ -193,7 +193,7 @@ static void pre(struct kmmio_probe *p, s
+diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
+index 132772a..b961f11 100644
+--- a/arch/x86/mm/mmio-mod.c
++++ b/arch/x86/mm/mmio-mod.c
+@@ -193,7 +193,7 @@ static void pre(struct kmmio_probe *p, struct pt_regs *regs,
break;
default:
{
@@ -23969,7 +25317,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/mmio-mod.c linux-2.6.32.49/arch/x86/mm/mm
my_trace->opcode = MMIO_UNKNOWN_OP;
my_trace->width = 0;
my_trace->value = (*ip) << 16 | *(ip + 1) << 8 |
-@@ -233,7 +233,7 @@ static void post(struct kmmio_probe *p,
+@@ -233,7 +233,7 @@ static void post(struct kmmio_probe *p, unsigned long condition,
static void ioremap_trace_core(resource_size_t offset, unsigned long size,
void __iomem *addr)
{
@@ -23978,7 +25326,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/mmio-mod.c linux-2.6.32.49/arch/x86/mm/mm
struct remap_trace *trace = kmalloc(sizeof(*trace), GFP_KERNEL);
/* These are page-unaligned. */
struct mmiotrace_map map = {
-@@ -257,7 +257,7 @@ static void ioremap_trace_core(resource_
+@@ -257,7 +257,7 @@ static void ioremap_trace_core(resource_size_t offset, unsigned long size,
.private = trace
},
.phys = offset,
@@ -23987,10 +25335,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/mmio-mod.c linux-2.6.32.49/arch/x86/mm/mm
};
map.map_id = trace->id;
-diff -urNp linux-2.6.32.49/arch/x86/mm/numa_32.c linux-2.6.32.49/arch/x86/mm/numa_32.c
---- linux-2.6.32.49/arch/x86/mm/numa_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/numa_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -98,7 +98,6 @@ unsigned long node_memmap_size_bytes(int
+diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
+index d253006..e56dd6a 100644
+--- a/arch/x86/mm/numa_32.c
++++ b/arch/x86/mm/numa_32.c
+@@ -98,7 +98,6 @@ unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn,
}
#endif
@@ -23998,10 +25347,24 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/numa_32.c linux-2.6.32.49/arch/x86/mm/num
extern unsigned long highend_pfn, highstart_pfn;
#define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE)
-diff -urNp linux-2.6.32.49/arch/x86/mm/pageattr.c linux-2.6.32.49/arch/x86/mm/pageattr.c
---- linux-2.6.32.49/arch/x86/mm/pageattr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pageattr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -261,16 +261,17 @@ static inline pgprot_t static_protection
+diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
+index e1d1069..2251ff3 100644
+--- a/arch/x86/mm/pageattr-test.c
++++ b/arch/x86/mm/pageattr-test.c
+@@ -36,7 +36,7 @@ enum {
+
+ static int pte_testbit(pte_t pte)
+ {
+- return pte_flags(pte) & _PAGE_UNUSED1;
++ return pte_flags(pte) & _PAGE_CPA_TEST;
+ }
+
+ struct split_state {
+diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
+index dd38bfb..8c12306 100644
+--- a/arch/x86/mm/pageattr.c
++++ b/arch/x86/mm/pageattr.c
+@@ -261,16 +261,17 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
* PCI BIOS based config access (CONFIG_PCI_GOBIOS) support.
*/
if (within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
@@ -24022,7 +25385,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pageattr.c linux-2.6.32.49/arch/x86/mm/pa
/*
* The .rodata section needs to be read-only. Using the pfn
* catches all aliases.
-@@ -278,6 +279,14 @@ static inline pgprot_t static_protection
+@@ -278,6 +279,14 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
__pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
pgprot_val(forbidden) |= _PAGE_RW;
@@ -24077,22 +25440,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pageattr.c linux-2.6.32.49/arch/x86/mm/pa
}
static int
-diff -urNp linux-2.6.32.49/arch/x86/mm/pageattr-test.c linux-2.6.32.49/arch/x86/mm/pageattr-test.c
---- linux-2.6.32.49/arch/x86/mm/pageattr-test.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pageattr-test.c 2011-11-15 19:59:43.000000000 -0500
-@@ -36,7 +36,7 @@ enum {
-
- static int pte_testbit(pte_t pte)
- {
-- return pte_flags(pte) & _PAGE_UNUSED1;
-+ return pte_flags(pte) & _PAGE_CPA_TEST;
- }
-
- struct split_state {
-diff -urNp linux-2.6.32.49/arch/x86/mm/pat.c linux-2.6.32.49/arch/x86/mm/pat.c
---- linux-2.6.32.49/arch/x86/mm/pat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -258,7 +258,7 @@ chk_conflict(struct memtype *new, struct
+diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
+index e78cd0e..de0a817 100644
+--- a/arch/x86/mm/pat.c
++++ b/arch/x86/mm/pat.c
+@@ -258,7 +258,7 @@ chk_conflict(struct memtype *new, struct memtype *entry, unsigned long *type)
conflict:
printk(KERN_INFO "%s:%d conflicting memory types "
@@ -24110,7 +25462,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pat.c linux-2.6.32.49/arch/x86/mm/pat.c
}
dprintk("free_memtype request 0x%Lx-0x%Lx\n", start, end);
-@@ -689,8 +689,8 @@ static inline int range_is_allowed(unsig
+@@ -689,8 +689,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
printk(KERN_INFO
@@ -24121,7 +25473,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pat.c linux-2.6.32.49/arch/x86/mm/pat.c
return 0;
}
cursor += PAGE_SIZE;
-@@ -755,7 +755,7 @@ int kernel_map_sync_memtype(u64 base, un
+@@ -755,7 +755,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
printk(KERN_INFO
"%s:%d ioremap_change_attr failed %s "
"for %Lx-%Lx\n",
@@ -24130,7 +25482,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pat.c linux-2.6.32.49/arch/x86/mm/pat.c
cattr_name(flags),
base, (unsigned long long)(base + size));
return -EINVAL;
-@@ -813,7 +813,7 @@ static int reserve_pfn_range(u64 paddr,
+@@ -813,7 +813,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
free_memtype(paddr, paddr + size);
printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
" for %Lx-%Lx, got %s\n",
@@ -24139,10 +25491,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pat.c linux-2.6.32.49/arch/x86/mm/pat.c
cattr_name(want_flags),
(unsigned long long)paddr,
(unsigned long long)(paddr + size),
-diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in.c
---- linux-2.6.32.49/arch/x86/mm/pf_in.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pf_in.c 2011-11-15 19:59:43.000000000 -0500
-@@ -148,7 +148,7 @@ enum reason_type get_ins_type(unsigned l
+diff --git a/arch/x86/mm/pf_in.c b/arch/x86/mm/pf_in.c
+index df3d5c8..c2223e1 100644
+--- a/arch/x86/mm/pf_in.c
++++ b/arch/x86/mm/pf_in.c
+@@ -148,7 +148,7 @@ enum reason_type get_ins_type(unsigned long ins_addr)
int i;
enum reason_type rv = OTHERS;
@@ -24151,7 +25504,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -168,7 +168,7 @@ static unsigned int get_ins_reg_width(un
+@@ -168,7 +168,7 @@ static unsigned int get_ins_reg_width(unsigned long ins_addr)
struct prefix_bits prf;
int i;
@@ -24160,7 +25513,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -191,7 +191,7 @@ unsigned int get_ins_mem_width(unsigned
+@@ -191,7 +191,7 @@ unsigned int get_ins_mem_width(unsigned long ins_addr)
struct prefix_bits prf;
int i;
@@ -24169,7 +25522,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -417,7 +417,7 @@ unsigned long get_ins_reg_val(unsigned l
+@@ -417,7 +417,7 @@ unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs)
int i;
unsigned long rv;
@@ -24178,7 +25531,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
for (i = 0; i < ARRAY_SIZE(reg_rop); i++)
-@@ -472,7 +472,7 @@ unsigned long get_ins_imm_val(unsigned l
+@@ -472,7 +472,7 @@ unsigned long get_ins_imm_val(unsigned long ins_addr)
int i;
unsigned long rv;
@@ -24187,27 +25540,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pf_in.c linux-2.6.32.49/arch/x86/mm/pf_in
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
for (i = 0; i < ARRAY_SIZE(imm_wop); i++)
-diff -urNp linux-2.6.32.49/arch/x86/mm/pgtable_32.c linux-2.6.32.49/arch/x86/mm/pgtable_32.c
---- linux-2.6.32.49/arch/x86/mm/pgtable_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pgtable_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -49,10 +49,13 @@ void set_pte_vaddr(unsigned long vaddr,
- return;
- }
- pte = pte_offset_kernel(pmd, vaddr);
-+
-+ pax_open_kernel();
- if (pte_val(pteval))
- set_pte_at(&init_mm, vaddr, pte, pteval);
- else
- pte_clear(&init_mm, vaddr, pte);
-+ pax_close_kernel();
-
- /*
- * It's enough to flush this one mapping.
-diff -urNp linux-2.6.32.49/arch/x86/mm/pgtable.c linux-2.6.32.49/arch/x86/mm/pgtable.c
---- linux-2.6.32.49/arch/x86/mm/pgtable.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/pgtable.c 2011-11-15 19:59:43.000000000 -0500
-@@ -83,9 +83,52 @@ static inline void pgd_list_del(pgd_t *p
+diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
+index e0e6fad..6b90017 100644
+--- a/arch/x86/mm/pgtable.c
++++ b/arch/x86/mm/pgtable.c
+@@ -83,9 +83,52 @@ static inline void pgd_list_del(pgd_t *pgd)
list_del(&page->lru);
}
@@ -24288,7 +25625,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pgtable.c linux-2.6.32.49/arch/x86/mm/pgt
void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
{
-@@ -161,36 +205,38 @@ void pud_populate(struct mm_struct *mm,
+@@ -161,36 +205,38 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
*/
flush_tlb_mm(mm);
}
@@ -24338,7 +25675,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pgtable.c linux-2.6.32.49/arch/x86/mm/pgt
return -ENOMEM;
}
-@@ -203,51 +249,56 @@ static int preallocate_pmds(pmd_t *pmds[
+@@ -203,51 +249,56 @@ static int preallocate_pmds(pmd_t *pmds[])
* preallocate which never got a corresponding vma will need to be
* freed manually.
*/
@@ -24453,9 +25790,28 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/pgtable.c linux-2.6.32.49/arch/x86/mm/pgt
pgd_dtor(pgd);
paravirt_pgd_free(mm, pgd);
free_page((unsigned long)pgd);
-diff -urNp linux-2.6.32.49/arch/x86/mm/setup_nx.c linux-2.6.32.49/arch/x86/mm/setup_nx.c
---- linux-2.6.32.49/arch/x86/mm/setup_nx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/setup_nx.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
+index 46c8834..fcab43d 100644
+--- a/arch/x86/mm/pgtable_32.c
++++ b/arch/x86/mm/pgtable_32.c
+@@ -49,10 +49,13 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pteval)
+ return;
+ }
+ pte = pte_offset_kernel(pmd, vaddr);
++
++ pax_open_kernel();
+ if (pte_val(pteval))
+ set_pte_at(&init_mm, vaddr, pte, pteval);
+ else
+ pte_clear(&init_mm, vaddr, pte);
++ pax_close_kernel();
+
+ /*
+ * It's enough to flush this one mapping.
+diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
+index 513d8ed..978c161 100644
+--- a/arch/x86/mm/setup_nx.c
++++ b/arch/x86/mm/setup_nx.c
@@ -4,11 +4,10 @@
#include <asm/pgtable.h>
@@ -24470,7 +25826,7 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/setup_nx.c linux-2.6.32.49/arch/x86/mm/se
/*
* noexec = on|off
*
-@@ -22,32 +21,26 @@ static int __init noexec_setup(char *str
+@@ -22,32 +21,26 @@ static int __init noexec_setup(char *str)
if (!str)
return -EINVAL;
if (!strncmp(str, "on", 2)) {
@@ -24521,9 +25877,10 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/setup_nx.c linux-2.6.32.49/arch/x86/mm/se
__supported_pte_mask &= ~_PAGE_NX;
}
#endif
-diff -urNp linux-2.6.32.49/arch/x86/mm/tlb.c linux-2.6.32.49/arch/x86/mm/tlb.c
---- linux-2.6.32.49/arch/x86/mm/tlb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/mm/tlb.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
+index 36fe08e..b123d3a 100644
+--- a/arch/x86/mm/tlb.c
++++ b/arch/x86/mm/tlb.c
@@ -61,7 +61,11 @@ void leave_mm(int cpu)
BUG();
cpumask_clear_cpu(cpu,
@@ -24536,10 +25893,11 @@ diff -urNp linux-2.6.32.49/arch/x86/mm/tlb.c linux-2.6.32.49/arch/x86/mm/tlb.c
}
EXPORT_SYMBOL_GPL(leave_mm);
-diff -urNp linux-2.6.32.49/arch/x86/oprofile/backtrace.c linux-2.6.32.49/arch/x86/oprofile/backtrace.c
---- linux-2.6.32.49/arch/x86/oprofile/backtrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/oprofile/backtrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -57,7 +57,7 @@ static struct frame_head *dump_user_back
+diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
+index 044897b..a195924 100644
+--- a/arch/x86/oprofile/backtrace.c
++++ b/arch/x86/oprofile/backtrace.c
+@@ -57,7 +57,7 @@ static struct frame_head *dump_user_backtrace(struct frame_head *head)
struct frame_head bufhead[2];
/* Also check accessibility of one struct frame_head beyond */
@@ -24548,7 +25906,7 @@ diff -urNp linux-2.6.32.49/arch/x86/oprofile/backtrace.c linux-2.6.32.49/arch/x8
return NULL;
if (__copy_from_user_inatomic(bufhead, head, sizeof(bufhead)))
return NULL;
-@@ -77,7 +77,7 @@ x86_backtrace(struct pt_regs * const reg
+@@ -77,7 +77,7 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth)
{
struct frame_head *head = (struct frame_head *)frame_pointer(regs);
@@ -24557,10 +25915,11 @@ diff -urNp linux-2.6.32.49/arch/x86/oprofile/backtrace.c linux-2.6.32.49/arch/x8
unsigned long stack = kernel_stack_pointer(regs);
if (depth)
dump_trace(NULL, regs, (unsigned long *)stack, 0,
-diff -urNp linux-2.6.32.49/arch/x86/oprofile/op_model_p4.c linux-2.6.32.49/arch/x86/oprofile/op_model_p4.c
---- linux-2.6.32.49/arch/x86/oprofile/op_model_p4.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/oprofile/op_model_p4.c 2011-11-15 19:59:43.000000000 -0500
-@@ -50,7 +50,7 @@ static inline void setup_num_counters(vo
+diff --git a/arch/x86/oprofile/op_model_p4.c b/arch/x86/oprofile/op_model_p4.c
+index e6a160a..36deff6 100644
+--- a/arch/x86/oprofile/op_model_p4.c
++++ b/arch/x86/oprofile/op_model_p4.c
+@@ -50,7 +50,7 @@ static inline void setup_num_counters(void)
#endif
}
@@ -24569,9 +25928,10 @@ diff -urNp linux-2.6.32.49/arch/x86/oprofile/op_model_p4.c linux-2.6.32.49/arch/
{
#ifdef CONFIG_SMP
return smp_num_siblings == 2 ? 2 : 1;
-diff -urNp linux-2.6.32.49/arch/x86/pci/common.c linux-2.6.32.49/arch/x86/pci/common.c
---- linux-2.6.32.49/arch/x86/pci/common.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/common.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
+index 1331fcf..03901b2 100644
+--- a/arch/x86/pci/common.c
++++ b/arch/x86/pci/common.c
@@ -31,8 +31,8 @@ int noioapicreroute = 1;
int pcibios_last_bus = -1;
unsigned long pirq_table_addr;
@@ -24583,10 +25943,11 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/common.c linux-2.6.32.49/arch/x86/pci/co
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 *val)
-diff -urNp linux-2.6.32.49/arch/x86/pci/direct.c linux-2.6.32.49/arch/x86/pci/direct.c
---- linux-2.6.32.49/arch/x86/pci/direct.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/direct.c 2011-11-15 19:59:43.000000000 -0500
-@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int
+diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c
+index 347d882..4baf6b6 100644
+--- a/arch/x86/pci/direct.c
++++ b/arch/x86/pci/direct.c
+@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
#undef PCI_CONF1_ADDRESS
@@ -24595,7 +25956,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/direct.c linux-2.6.32.49/arch/x86/pci/di
.read = pci_conf1_read,
.write = pci_conf1_write,
};
-@@ -173,7 +173,7 @@ static int pci_conf2_write(unsigned int
+@@ -173,7 +173,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
#undef PCI_CONF2_ADDRESS
@@ -24613,10 +25974,11 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/direct.c linux-2.6.32.49/arch/x86/pci/di
{
u32 x = 0;
int year, devfn;
-diff -urNp linux-2.6.32.49/arch/x86/pci/mmconfig_32.c linux-2.6.32.49/arch/x86/pci/mmconfig_32.c
---- linux-2.6.32.49/arch/x86/pci/mmconfig_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/mmconfig_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int
+diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
+index f10a7e9..0425342 100644
+--- a/arch/x86/pci/mmconfig_32.c
++++ b/arch/x86/pci/mmconfig_32.c
+@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
return 0;
}
@@ -24625,10 +25987,11 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/mmconfig_32.c linux-2.6.32.49/arch/x86/p
.read = pci_mmcfg_read,
.write = pci_mmcfg_write,
};
-diff -urNp linux-2.6.32.49/arch/x86/pci/mmconfig_64.c linux-2.6.32.49/arch/x86/pci/mmconfig_64.c
---- linux-2.6.32.49/arch/x86/pci/mmconfig_64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/mmconfig_64.c 2011-11-15 19:59:43.000000000 -0500
-@@ -104,7 +104,7 @@ static int pci_mmcfg_write(unsigned int
+diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
+index 94349f8..41600a7 100644
+--- a/arch/x86/pci/mmconfig_64.c
++++ b/arch/x86/pci/mmconfig_64.c
+@@ -104,7 +104,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
return 0;
}
@@ -24637,10 +26000,11 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/mmconfig_64.c linux-2.6.32.49/arch/x86/p
.read = pci_mmcfg_read,
.write = pci_mmcfg_write,
};
-diff -urNp linux-2.6.32.49/arch/x86/pci/numaq_32.c linux-2.6.32.49/arch/x86/pci/numaq_32.c
---- linux-2.6.32.49/arch/x86/pci/numaq_32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/numaq_32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -112,7 +112,7 @@ static int pci_conf1_mq_write(unsigned i
+diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c
+index 8eb295e..86bd657 100644
+--- a/arch/x86/pci/numaq_32.c
++++ b/arch/x86/pci/numaq_32.c
+@@ -112,7 +112,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
#undef PCI_CONF1_MQ_ADDRESS
@@ -24649,10 +26013,11 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/numaq_32.c linux-2.6.32.49/arch/x86/pci/
.read = pci_conf1_mq_read,
.write = pci_conf1_mq_write
};
-diff -urNp linux-2.6.32.49/arch/x86/pci/olpc.c linux-2.6.32.49/arch/x86/pci/olpc.c
---- linux-2.6.32.49/arch/x86/pci/olpc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/olpc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int s
+diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c
+index b889d82..5a58a0a 100644
+--- a/arch/x86/pci/olpc.c
++++ b/arch/x86/pci/olpc.c
+@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int seg, unsigned int bus,
return 0;
}
@@ -24661,9 +26026,10 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/olpc.c linux-2.6.32.49/arch/x86/pci/olpc
.read = pci_olpc_read,
.write = pci_olpc_write,
};
-diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pcbios.c
---- linux-2.6.32.49/arch/x86/pci/pcbios.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/pci/pcbios.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
+index 1c975cc..ffd0536 100644
+--- a/arch/x86/pci/pcbios.c
++++ b/arch/x86/pci/pcbios.c
@@ -56,50 +56,93 @@ union bios32 {
static struct {
unsigned long address;
@@ -24799,7 +26165,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
: "memory");
local_irq_restore(flags);
-@@ -165,7 +211,10 @@ static int pci_bios_read(unsigned int se
+@@ -165,7 +211,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
switch (len) {
case 1:
@@ -24811,7 +26177,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -174,7 +223,8 @@ static int pci_bios_read(unsigned int se
+@@ -174,7 +223,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_BYTE),
"b" (bx),
"D" ((long)reg),
@@ -24821,7 +26187,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
/*
* Zero-extend the result beyond 8 bits, do not trust the
* BIOS having done it:
-@@ -182,7 +232,10 @@ static int pci_bios_read(unsigned int se
+@@ -182,7 +232,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
*value &= 0xff;
break;
case 2:
@@ -24833,7 +26199,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -191,7 +244,8 @@ static int pci_bios_read(unsigned int se
+@@ -191,7 +244,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_WORD),
"b" (bx),
"D" ((long)reg),
@@ -24843,7 +26209,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
/*
* Zero-extend the result beyond 16 bits, do not trust the
* BIOS having done it:
-@@ -199,7 +253,10 @@ static int pci_bios_read(unsigned int se
+@@ -199,7 +253,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
*value &= 0xffff;
break;
case 4:
@@ -24855,7 +26221,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -208,7 +265,8 @@ static int pci_bios_read(unsigned int se
+@@ -208,7 +265,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_DWORD),
"b" (bx),
"D" ((long)reg),
@@ -24865,7 +26231,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
break;
}
-@@ -231,7 +289,10 @@ static int pci_bios_write(unsigned int s
+@@ -231,7 +289,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
switch (len) {
case 1:
@@ -24877,7 +26243,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -240,10 +301,14 @@ static int pci_bios_write(unsigned int s
+@@ -240,10 +301,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -24894,7 +26260,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -252,10 +317,14 @@ static int pci_bios_write(unsigned int s
+@@ -252,10 +317,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -24911,7 +26277,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -264,7 +333,8 @@ static int pci_bios_write(unsigned int s
+@@ -264,7 +333,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -24921,7 +26287,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
break;
}
-@@ -278,7 +348,7 @@ static int pci_bios_write(unsigned int s
+@@ -278,7 +348,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
* Function table for BIOS32 access
*/
@@ -24930,7 +26296,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
.read = pci_bios_read,
.write = pci_bios_write
};
-@@ -287,7 +357,7 @@ static struct pci_raw_ops pci_bios_acces
+@@ -287,7 +357,7 @@ static struct pci_raw_ops pci_bios_access = {
* Try to find PCI BIOS.
*/
@@ -24939,7 +26305,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
{
union bios32 *check;
unsigned char sum;
-@@ -368,10 +438,13 @@ struct irq_routing_table * pcibios_get_i
+@@ -368,10 +438,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
DBG("PCI: Fetching IRQ routing table... ");
__asm__("push %%es\n\t"
@@ -24954,7 +26320,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -382,7 +455,8 @@ struct irq_routing_table * pcibios_get_i
+@@ -382,7 +455,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
"1" (0),
"D" ((long) &opt),
"S" (&pci_indirect),
@@ -24964,7 +26330,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00)
-@@ -406,7 +480,10 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -406,7 +480,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
{
int ret;
@@ -24976,7 +26342,7 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -414,7 +491,8 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -414,7 +491,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
: "0" (PCIBIOS_SET_PCI_HW_INT),
"b" ((dev->bus->number << 8) | dev->devfn),
"c" ((irq << 8) | (pin + 10)),
@@ -24986,9 +26352,10 @@ diff -urNp linux-2.6.32.49/arch/x86/pci/pcbios.c linux-2.6.32.49/arch/x86/pci/pc
return !(ret & 0xff00);
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
-diff -urNp linux-2.6.32.49/arch/x86/power/cpu.c linux-2.6.32.49/arch/x86/power/cpu.c
---- linux-2.6.32.49/arch/x86/power/cpu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/power/cpu.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
+index fa0f651..9d8f3d9 100644
+--- a/arch/x86/power/cpu.c
++++ b/arch/x86/power/cpu.c
@@ -129,7 +129,7 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
@@ -25008,9 +26375,10 @@ diff -urNp linux-2.6.32.49/arch/x86/power/cpu.c linux-2.6.32.49/arch/x86/power/c
syscall_init(); /* This sets MSR_*STAR and related */
#endif
-diff -urNp linux-2.6.32.49/arch/x86/vdso/Makefile linux-2.6.32.49/arch/x86/vdso/Makefile
---- linux-2.6.32.49/arch/x86/vdso/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/Makefile 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
+index dd78ef6..f9d928d 100644
+--- a/arch/x86/vdso/Makefile
++++ b/arch/x86/vdso/Makefile
@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
@@ -25020,9 +26388,10 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/Makefile linux-2.6.32.49/arch/x86/vdso/
GCOV_PROFILE := n
#
-diff -urNp linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c
---- linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
+index ee55754..0013b2e 100644
+--- a/arch/x86/vdso/vclock_gettime.c
++++ b/arch/x86/vdso/vclock_gettime.c
@@ -22,24 +22,48 @@
#include <asm/hpet.h>
#include <asm/unistd.h>
@@ -25076,7 +26445,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c linux-2.6.32.49/arch/x
return (v * gtod->clock.mult) >> gtod->clock.shift;
}
-@@ -113,7 +137,9 @@ notrace static noinline int do_monotonic
+@@ -113,7 +137,9 @@ notrace static noinline int do_monotonic_coarse(struct timespec *ts)
notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
{
@@ -25087,7 +26456,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c linux-2.6.32.49/arch/x
switch (clock) {
case CLOCK_REALTIME:
if (likely(gtod->clock.vread))
-@@ -133,10 +159,20 @@ notrace int __vdso_clock_gettime(clockid
+@@ -133,10 +159,20 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
int clock_gettime(clockid_t, struct timespec *)
__attribute__((weak, alias("__vdso_clock_gettime")));
@@ -25110,7 +26479,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c linux-2.6.32.49/arch/x
if (likely(tv != NULL)) {
BUILD_BUG_ON(offsetof(struct timeval, tv_usec) !=
offsetof(struct timespec, tv_nsec) ||
-@@ -151,9 +187,7 @@ notrace int __vdso_gettimeofday(struct t
+@@ -151,9 +187,7 @@ notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
}
return 0;
}
@@ -25121,9 +26490,24 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vclock_gettime.c linux-2.6.32.49/arch/x
}
int gettimeofday(struct timeval *, struct timezone *)
__attribute__((weak, alias("__vdso_gettimeofday")));
-diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c
---- linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/vdso/vdso.lds.S b/arch/x86/vdso/vdso.lds.S
+index 4e5dd3b..00ba15e 100644
+--- a/arch/x86/vdso/vdso.lds.S
++++ b/arch/x86/vdso/vdso.lds.S
+@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK;
+ #define VEXTERN(x) VDSO64_ ## x = vdso_ ## x;
+ #include "vextern.h"
+ #undef VEXTERN
++
++#define VEXTERN(x) VDSO64_ ## x = __vdso_ ## x;
++VEXTERN(fallback_gettimeofday)
++VEXTERN(fallback_time)
++VEXTERN(getcpu)
++#undef VEXTERN
+diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
+index 58bc00f..d53fb48 100644
+--- a/arch/x86/vdso/vdso32-setup.c
++++ b/arch/x86/vdso/vdso32-setup.c
@@ -25,6 +25,7 @@
#include <asm/tlbflush.h>
#include <asm/vdso.h>
@@ -25132,7 +26516,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86
enum {
VDSO_DISABLED = 0,
-@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int m
+@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int map)
void enable_sep_cpu(void)
{
int cpu = get_cpu();
@@ -25150,7 +26534,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct l
+@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
if (compat)
addr = VDSO_HIGH_BASE;
else {
@@ -25167,7 +26551,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86
if (compat_uses_vma || !compat) {
/*
-@@ -361,11 +362,11 @@ int arch_setup_additional_pages(struct l
+@@ -361,11 +362,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
}
current_thread_info()->sysenter_return =
@@ -25197,7 +26581,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86
return NULL;
}
-@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(stru
+@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
struct mm_struct *mm = tsk->mm;
/* Check to see if this task was created in compat vdso mode */
@@ -25206,22 +26590,10 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso32-setup.c linux-2.6.32.49/arch/x86
return &gate_vma;
return NULL;
}
-diff -urNp linux-2.6.32.49/arch/x86/vdso/vdso.lds.S linux-2.6.32.49/arch/x86/vdso/vdso.lds.S
---- linux-2.6.32.49/arch/x86/vdso/vdso.lds.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/vdso.lds.S 2011-11-15 19:59:43.000000000 -0500
-@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK;
- #define VEXTERN(x) VDSO64_ ## x = vdso_ ## x;
- #include "vextern.h"
- #undef VEXTERN
-+
-+#define VEXTERN(x) VDSO64_ ## x = __vdso_ ## x;
-+VEXTERN(fallback_gettimeofday)
-+VEXTERN(fallback_time)
-+VEXTERN(getcpu)
-+#undef VEXTERN
-diff -urNp linux-2.6.32.49/arch/x86/vdso/vextern.h linux-2.6.32.49/arch/x86/vdso/vextern.h
---- linux-2.6.32.49/arch/x86/vdso/vextern.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/vextern.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/vdso/vextern.h b/arch/x86/vdso/vextern.h
+index 1683ba2..48d07f3 100644
+--- a/arch/x86/vdso/vextern.h
++++ b/arch/x86/vdso/vextern.h
@@ -11,6 +11,5 @@
put into vextern.h and be referenced as a pointer with vdso prefix.
The main kernel later fills in the values. */
@@ -25229,9 +26601,10 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vextern.h linux-2.6.32.49/arch/x86/vdso
-VEXTERN(jiffies)
VEXTERN(vgetcpu_mode)
VEXTERN(vsyscall_gtod_data)
-diff -urNp linux-2.6.32.49/arch/x86/vdso/vma.c linux-2.6.32.49/arch/x86/vdso/vma.c
---- linux-2.6.32.49/arch/x86/vdso/vma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/vdso/vma.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
+index 21e1aeb..2c0b3c4 100644
+--- a/arch/x86/vdso/vma.c
++++ b/arch/x86/vdso/vma.c
@@ -17,8 +17,6 @@
#include "vextern.h" /* Just for VMAGIC. */
#undef VEXTERN
@@ -25280,7 +26653,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vma.c linux-2.6.32.49/arch/x86/vdso/vma
}
__initcall(init_vdso_vars);
-@@ -102,13 +95,15 @@ static unsigned long vdso_addr(unsigned
+@@ -102,13 +95,15 @@ static unsigned long vdso_addr(unsigned long start, unsigned len)
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{
struct mm_struct *mm = current->mm;
@@ -25300,7 +26673,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vma.c linux-2.6.32.49/arch/x86/vdso/vma
addr = vdso_addr(mm->start_stack, vdso_size);
addr = get_unmapped_area(NULL, addr, vdso_size, 0, 0);
if (IS_ERR_VALUE(addr)) {
-@@ -116,7 +111,7 @@ int arch_setup_additional_pages(struct l
+@@ -116,7 +111,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
goto up_fail;
}
@@ -25309,7 +26682,7 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vma.c linux-2.6.32.49/arch/x86/vdso/vma
ret = install_special_mapping(mm, addr, vdso_size,
VM_READ|VM_EXEC|
-@@ -124,7 +119,7 @@ int arch_setup_additional_pages(struct l
+@@ -124,7 +119,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
VM_ALWAYSDUMP,
vdso_pages);
if (ret) {
@@ -25329,9 +26702,10 @@ diff -urNp linux-2.6.32.49/arch/x86/vdso/vma.c linux-2.6.32.49/arch/x86/vdso/vma
- return 0;
-}
-__setup("vdso=", vdso_setup);
-diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen/enlighten.c
---- linux-2.6.32.49/arch/x86/xen/enlighten.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/enlighten.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index 0087b00..eecb34f 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
@@ -71,8 +71,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
struct shared_info xen_dummy_shared_info;
@@ -25341,7 +26715,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen
/*
* Point at some empty memory to start with. We map the real shared_info
* page as soon as fixmap is up and running.
-@@ -548,7 +546,7 @@ static void xen_write_idt_entry(gate_des
+@@ -548,7 +546,7 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g)
preempt_disable();
@@ -25350,7 +26724,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen
end = start + __get_cpu_var(idt_desc).size + 1;
xen_mc_flush();
-@@ -993,7 +991,7 @@ static const struct pv_apic_ops xen_apic
+@@ -993,7 +991,7 @@ static const struct pv_apic_ops xen_apic_ops __initdata = {
#endif
};
@@ -25380,7 +26754,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen
{
xen_reboot(SHUTDOWN_poweroff);
}
-@@ -1095,9 +1093,20 @@ asmlinkage void __init xen_start_kernel(
+@@ -1095,9 +1093,20 @@ asmlinkage void __init xen_start_kernel(void)
*/
__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
@@ -25403,7 +26777,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen
#endif
xen_setup_features();
-@@ -1129,13 +1138,6 @@ asmlinkage void __init xen_start_kernel(
+@@ -1129,13 +1138,6 @@ asmlinkage void __init xen_start_kernel(void)
machine_ops = xen_machine_ops;
@@ -25417,10 +26791,11 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/enlighten.c linux-2.6.32.49/arch/x86/xen
xen_smp_init();
pgd = (pgd_t *)xen_start_info->pt_base;
-diff -urNp linux-2.6.32.49/arch/x86/xen/mmu.c linux-2.6.32.49/arch/x86/xen/mmu.c
---- linux-2.6.32.49/arch/x86/xen/mmu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/mmu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1719,6 +1719,8 @@ __init pgd_t *xen_setup_kernel_pagetable
+diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
+index 3f90a2c..ee0d992 100644
+--- a/arch/x86/xen/mmu.c
++++ b/arch/x86/xen/mmu.c
+@@ -1719,6 +1719,8 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
convert_pfn_mfn(init_level4_pgt);
convert_pfn_mfn(level3_ident_pgt);
convert_pfn_mfn(level3_kernel_pgt);
@@ -25429,7 +26804,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/mmu.c linux-2.6.32.49/arch/x86/xen/mmu.c
l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud);
-@@ -1737,7 +1739,10 @@ __init pgd_t *xen_setup_kernel_pagetable
+@@ -1737,7 +1739,10 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
@@ -25440,7 +26815,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/mmu.c linux-2.6.32.49/arch/x86/xen/mmu.c
set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
-@@ -1860,6 +1865,7 @@ static __init void xen_post_allocator_in
+@@ -1860,6 +1865,7 @@ static __init void xen_post_allocator_init(void)
pv_mmu_ops.set_pud = xen_set_pud;
#if PAGETABLE_LEVELS == 4
pv_mmu_ops.set_pgd = xen_set_pgd;
@@ -25448,7 +26823,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/mmu.c linux-2.6.32.49/arch/x86/xen/mmu.c
#endif
/* This will work as long as patching hasn't happened yet
-@@ -1946,6 +1952,7 @@ static const struct pv_mmu_ops xen_mmu_o
+@@ -1946,6 +1952,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
.pud_val = PV_CALLEE_SAVE(xen_pud_val),
.make_pud = PV_CALLEE_SAVE(xen_make_pud),
.set_pgd = xen_set_pgd_hyper,
@@ -25456,10 +26831,11 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/mmu.c linux-2.6.32.49/arch/x86/xen/mmu.c
.alloc_pud = xen_alloc_pmd_init,
.release_pud = xen_release_pmd_init,
-diff -urNp linux-2.6.32.49/arch/x86/xen/smp.c linux-2.6.32.49/arch/x86/xen/smp.c
---- linux-2.6.32.49/arch/x86/xen/smp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/smp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -168,11 +168,6 @@ static void __init xen_smp_prepare_boot_
+diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
+index a96204a..fca9b8e 100644
+--- a/arch/x86/xen/smp.c
++++ b/arch/x86/xen/smp.c
+@@ -168,11 +168,6 @@ static void __init xen_smp_prepare_boot_cpu(void)
{
BUG_ON(smp_processor_id() != 0);
native_smp_prepare_boot_cpu();
@@ -25471,7 +26847,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/smp.c linux-2.6.32.49/arch/x86/xen/smp.c
xen_setup_vcpu_info_placement();
}
-@@ -241,12 +236,12 @@ cpu_initialize_context(unsigned int cpu,
+@@ -241,12 +236,12 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
gdt = get_cpu_gdt_table(cpu);
ctxt->flags = VGCF_IN_KERNEL;
@@ -25487,7 +26863,7 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/smp.c linux-2.6.32.49/arch/x86/xen/smp.c
#else
ctxt->gs_base_kernel = per_cpu_offset(cpu);
#endif
-@@ -297,13 +292,12 @@ static int __cpuinit xen_cpu_up(unsigned
+@@ -297,13 +292,12 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
int rc;
per_cpu(current_task, cpu) = idle;
@@ -25503,9 +26879,10 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/smp.c linux-2.6.32.49/arch/x86/xen/smp.c
#endif
xen_setup_runstate_info(cpu);
xen_setup_timer(cpu);
-diff -urNp linux-2.6.32.49/arch/x86/xen/xen-asm_32.S linux-2.6.32.49/arch/x86/xen/xen-asm_32.S
---- linux-2.6.32.49/arch/x86/xen/xen-asm_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/xen-asm_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
+index 9a95a9c..4f39e774 100644
+--- a/arch/x86/xen/xen-asm_32.S
++++ b/arch/x86/xen/xen-asm_32.S
@@ -83,14 +83,14 @@ ENTRY(xen_iret)
ESP_OFFSET=4 # bytes pushed onto stack
@@ -25527,9 +26904,10 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/xen-asm_32.S linux-2.6.32.49/arch/x86/xe
#else
movl per_cpu__xen_vcpu, %eax
#endif
-diff -urNp linux-2.6.32.49/arch/x86/xen/xen-head.S linux-2.6.32.49/arch/x86/xen/xen-head.S
---- linux-2.6.32.49/arch/x86/xen/xen-head.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/xen-head.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
+index 1a5ff24..a187d40 100644
+--- a/arch/x86/xen/xen-head.S
++++ b/arch/x86/xen/xen-head.S
@@ -19,6 +19,17 @@ ENTRY(startup_xen)
#ifdef CONFIG_X86_32
mov %esi,xen_start_info
@@ -25548,9 +26926,10 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/xen-head.S linux-2.6.32.49/arch/x86/xen/
#else
mov %rsi,xen_start_info
mov $init_thread_union+THREAD_SIZE,%rsp
-diff -urNp linux-2.6.32.49/arch/x86/xen/xen-ops.h linux-2.6.32.49/arch/x86/xen/xen-ops.h
---- linux-2.6.32.49/arch/x86/xen/xen-ops.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/arch/x86/xen/xen-ops.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
+index f9153a3..51eab3d 100644
+--- a/arch/x86/xen/xen-ops.h
++++ b/arch/x86/xen/xen-ops.h
@@ -10,8 +10,6 @@
extern const char xen_hypervisor_callback[];
extern const char xen_failsafe_callback[];
@@ -25560,10 +26939,11 @@ diff -urNp linux-2.6.32.49/arch/x86/xen/xen-ops.h linux-2.6.32.49/arch/x86/xen/x
struct trap_info;
void xen_copy_trap_info(struct trap_info *traps);
-diff -urNp linux-2.6.32.49/block/blk-integrity.c linux-2.6.32.49/block/blk-integrity.c
---- linux-2.6.32.49/block/blk-integrity.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/blk-integrity.c 2011-11-15 19:59:43.000000000 -0500
-@@ -278,7 +278,7 @@ static struct attribute *integrity_attrs
+diff --git a/block/blk-integrity.c b/block/blk-integrity.c
+index 15c6308..96e83c2 100644
+--- a/block/blk-integrity.c
++++ b/block/blk-integrity.c
+@@ -278,7 +278,7 @@ static struct attribute *integrity_attrs[] = {
NULL,
};
@@ -25572,10 +26952,11 @@ diff -urNp linux-2.6.32.49/block/blk-integrity.c linux-2.6.32.49/block/blk-integ
.show = &integrity_attr_show,
.store = &integrity_attr_store,
};
-diff -urNp linux-2.6.32.49/block/blk-iopoll.c linux-2.6.32.49/block/blk-iopoll.c
---- linux-2.6.32.49/block/blk-iopoll.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/blk-iopoll.c 2011-11-15 19:59:43.000000000 -0500
-@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopo
+diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
+index ca56420..f2fc409 100644
+--- a/block/blk-iopoll.c
++++ b/block/blk-iopoll.c
+@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopoll *iopoll)
}
EXPORT_SYMBOL(blk_iopoll_complete);
@@ -25584,10 +26965,11 @@ diff -urNp linux-2.6.32.49/block/blk-iopoll.c linux-2.6.32.49/block/blk-iopoll.c
{
struct list_head *list = &__get_cpu_var(blk_cpu_iopoll);
int rearm = 0, budget = blk_iopoll_budget;
-diff -urNp linux-2.6.32.49/block/blk-map.c linux-2.6.32.49/block/blk-map.c
---- linux-2.6.32.49/block/blk-map.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/blk-map.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,7 +54,7 @@ static int __blk_rq_map_user(struct requ
+diff --git a/block/blk-map.c b/block/blk-map.c
+index 30a7e51..0aeec6a 100644
+--- a/block/blk-map.c
++++ b/block/blk-map.c
+@@ -54,7 +54,7 @@ static int __blk_rq_map_user(struct request_queue *q, struct request *rq,
* direct dma. else, set up kernel bounce buffers
*/
uaddr = (unsigned long) ubuf;
@@ -25596,7 +26978,7 @@ diff -urNp linux-2.6.32.49/block/blk-map.c linux-2.6.32.49/block/blk-map.c
bio = bio_map_user(q, NULL, uaddr, len, reading, gfp_mask);
else
bio = bio_copy_user(q, map_data, uaddr, len, reading, gfp_mask);
-@@ -201,12 +201,13 @@ int blk_rq_map_user_iov(struct request_q
+@@ -201,12 +201,13 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
for (i = 0; i < iov_count; i++) {
unsigned long uaddr = (unsigned long)iov[i].iov_base;
@@ -25612,7 +26994,7 @@ diff -urNp linux-2.6.32.49/block/blk-map.c linux-2.6.32.49/block/blk-map.c
}
if (unaligned || (q->dma_pad_mask & len) || map_data)
-@@ -299,7 +300,7 @@ int blk_rq_map_kern(struct request_queue
+@@ -299,7 +300,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
if (!len || !kbuf)
return -EINVAL;
@@ -25621,10 +27003,11 @@ diff -urNp linux-2.6.32.49/block/blk-map.c linux-2.6.32.49/block/blk-map.c
if (do_copy)
bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
else
-diff -urNp linux-2.6.32.49/block/blk-softirq.c linux-2.6.32.49/block/blk-softirq.c
---- linux-2.6.32.49/block/blk-softirq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/blk-softirq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head,
+diff --git a/block/blk-softirq.c b/block/blk-softirq.c
+index ee9c216..58d410a 100644
+--- a/block/blk-softirq.c
++++ b/block/blk-softirq.c
+@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
* Softirq action handler - move entries to local list and loop over them
* while passing them to the queue registered handler.
*/
@@ -25633,10 +27016,11 @@ diff -urNp linux-2.6.32.49/block/blk-softirq.c linux-2.6.32.49/block/blk-softirq
{
struct list_head *cpu_list, local_list;
-diff -urNp linux-2.6.32.49/block/blk-sysfs.c linux-2.6.32.49/block/blk-sysfs.c
---- linux-2.6.32.49/block/blk-sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/blk-sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -414,7 +414,7 @@ static void blk_release_queue(struct kob
+diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
+index bb9c5ea..5330d48 100644
+--- a/block/blk-sysfs.c
++++ b/block/blk-sysfs.c
+@@ -414,7 +414,7 @@ static void blk_release_queue(struct kobject *kobj)
kmem_cache_free(blk_requestq_cachep, q);
}
@@ -25645,10 +27029,11 @@ diff -urNp linux-2.6.32.49/block/blk-sysfs.c linux-2.6.32.49/block/blk-sysfs.c
.show = queue_attr_show,
.store = queue_attr_store,
};
-diff -urNp linux-2.6.32.49/block/bsg.c linux-2.6.32.49/block/bsg.c
---- linux-2.6.32.49/block/bsg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/bsg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -175,16 +175,24 @@ static int blk_fill_sgv4_hdr_rq(struct r
+diff --git a/block/bsg.c b/block/bsg.c
+index 7154a7a..08ac2f0 100644
+--- a/block/bsg.c
++++ b/block/bsg.c
+@@ -175,16 +175,24 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
struct sg_io_v4 *hdr, struct bsg_device *bd,
fmode_t has_write_perm)
{
@@ -25675,7 +27060,7 @@ diff -urNp linux-2.6.32.49/block/bsg.c linux-2.6.32.49/block/bsg.c
if (hdr->subprotocol == BSG_SUB_PROTOCOL_SCSI_CMD) {
if (blk_verify_command(rq->cmd, has_write_perm))
return -EPERM;
-@@ -282,7 +290,7 @@ bsg_map_hdr(struct bsg_device *bd, struc
+@@ -282,7 +290,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
rq->next_rq = next_rq;
next_rq->cmd_type = rq->cmd_type;
@@ -25684,7 +27069,7 @@ diff -urNp linux-2.6.32.49/block/bsg.c linux-2.6.32.49/block/bsg.c
ret = blk_rq_map_user(q, next_rq, NULL, dxferp,
hdr->din_xfer_len, GFP_KERNEL);
if (ret)
-@@ -291,10 +299,10 @@ bsg_map_hdr(struct bsg_device *bd, struc
+@@ -291,10 +299,10 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
if (hdr->dout_xfer_len) {
dxfer_len = hdr->dout_xfer_len;
@@ -25697,7 +27082,7 @@ diff -urNp linux-2.6.32.49/block/bsg.c linux-2.6.32.49/block/bsg.c
} else
dxfer_len = 0;
-@@ -436,7 +444,7 @@ static int blk_complete_sgv4_hdr_rq(stru
+@@ -436,7 +444,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
int len = min_t(unsigned int, hdr->max_response_len,
rq->sense_len);
@@ -25706,10 +27091,11 @@ diff -urNp linux-2.6.32.49/block/bsg.c linux-2.6.32.49/block/bsg.c
rq->sense, len);
if (!ret)
hdr->response_len = len;
-diff -urNp linux-2.6.32.49/block/compat_ioctl.c linux-2.6.32.49/block/compat_ioctl.c
---- linux-2.6.32.49/block/compat_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/compat_ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -354,7 +354,7 @@ static int compat_fd_ioctl(struct block_
+diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
+index 9bd086c..ca1fc22 100644
+--- a/block/compat_ioctl.c
++++ b/block/compat_ioctl.c
+@@ -354,7 +354,7 @@ static int compat_fd_ioctl(struct block_device *bdev, fmode_t mode,
err |= __get_user(f->spec1, &uf->spec1);
err |= __get_user(f->fmt_gap, &uf->fmt_gap);
err |= __get_user(name, &uf->name);
@@ -25718,10 +27104,11 @@ diff -urNp linux-2.6.32.49/block/compat_ioctl.c linux-2.6.32.49/block/compat_ioc
if (err) {
err = -EFAULT;
goto out;
-diff -urNp linux-2.6.32.49/block/elevator.c linux-2.6.32.49/block/elevator.c
---- linux-2.6.32.49/block/elevator.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/elevator.c 2011-11-15 19:59:43.000000000 -0500
-@@ -889,7 +889,7 @@ elv_attr_store(struct kobject *kobj, str
+diff --git a/block/elevator.c b/block/elevator.c
+index a847046..75a1746 100644
+--- a/block/elevator.c
++++ b/block/elevator.c
+@@ -889,7 +889,7 @@ elv_attr_store(struct kobject *kobj, struct attribute *attr,
return error;
}
@@ -25730,9 +27117,10 @@ diff -urNp linux-2.6.32.49/block/elevator.c linux-2.6.32.49/block/elevator.c
.show = elv_attr_show,
.store = elv_attr_store,
};
-diff -urNp linux-2.6.32.49/block/scsi_ioctl.c linux-2.6.32.49/block/scsi_ioctl.c
---- linux-2.6.32.49/block/scsi_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/block/scsi_ioctl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
+index 1d5a780..0e2fb8c 100644
+--- a/block/scsi_ioctl.c
++++ b/block/scsi_ioctl.c
@@ -220,8 +220,20 @@ EXPORT_SYMBOL(blk_verify_command);
static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
struct sg_io_hdr *hdr, fmode_t mode)
@@ -25755,7 +27143,7 @@ diff -urNp linux-2.6.32.49/block/scsi_ioctl.c linux-2.6.32.49/block/scsi_ioctl.c
if (blk_verify_command(rq->cmd, mode & FMODE_WRITE))
return -EPERM;
-@@ -430,6 +442,8 @@ int sg_scsi_ioctl(struct request_queue *
+@@ -430,6 +442,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
int err;
unsigned int in_len, out_len, bytes, opcode, cmdlen;
char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
@@ -25764,7 +27152,7 @@ diff -urNp linux-2.6.32.49/block/scsi_ioctl.c linux-2.6.32.49/block/scsi_ioctl.c
if (!sic)
return -EINVAL;
-@@ -463,9 +477,18 @@ int sg_scsi_ioctl(struct request_queue *
+@@ -463,9 +477,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
*/
err = -EFAULT;
rq->cmd_len = cmdlen;
@@ -25784,9 +27172,10 @@ diff -urNp linux-2.6.32.49/block/scsi_ioctl.c linux-2.6.32.49/block/scsi_ioctl.c
if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len))
goto error;
-diff -urNp linux-2.6.32.49/crypto/cryptd.c linux-2.6.32.49/crypto/cryptd.c
---- linux-2.6.32.49/crypto/cryptd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/crypto/cryptd.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/crypto/cryptd.c b/crypto/cryptd.c
+index 3533582..f143117 100644
+--- a/crypto/cryptd.c
++++ b/crypto/cryptd.c
@@ -50,7 +50,7 @@ struct cryptd_blkcipher_ctx {
struct cryptd_blkcipher_request_ctx {
@@ -25796,10 +27185,11 @@ diff -urNp linux-2.6.32.49/crypto/cryptd.c linux-2.6.32.49/crypto/cryptd.c
struct cryptd_hash_ctx {
struct crypto_shash *child;
-diff -urNp linux-2.6.32.49/crypto/gf128mul.c linux-2.6.32.49/crypto/gf128mul.c
---- linux-2.6.32.49/crypto/gf128mul.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/crypto/gf128mul.c 2011-11-15 19:59:43.000000000 -0500
-@@ -182,7 +182,7 @@ void gf128mul_lle(be128 *r, const be128
+diff --git a/crypto/gf128mul.c b/crypto/gf128mul.c
+index a90d260..7a9765e 100644
+--- a/crypto/gf128mul.c
++++ b/crypto/gf128mul.c
+@@ -182,7 +182,7 @@ void gf128mul_lle(be128 *r, const be128 *b)
for (i = 0; i < 7; ++i)
gf128mul_x_lle(&p[i + 1], &p[i]);
@@ -25808,7 +27198,7 @@ diff -urNp linux-2.6.32.49/crypto/gf128mul.c linux-2.6.32.49/crypto/gf128mul.c
for (i = 0;;) {
u8 ch = ((u8 *)b)[15 - i];
-@@ -220,7 +220,7 @@ void gf128mul_bbe(be128 *r, const be128
+@@ -220,7 +220,7 @@ void gf128mul_bbe(be128 *r, const be128 *b)
for (i = 0; i < 7; ++i)
gf128mul_x_bbe(&p[i + 1], &p[i]);
@@ -25817,9 +27207,10 @@ diff -urNp linux-2.6.32.49/crypto/gf128mul.c linux-2.6.32.49/crypto/gf128mul.c
for (i = 0;;) {
u8 ch = ((u8 *)b)[i];
-diff -urNp linux-2.6.32.49/crypto/serpent.c linux-2.6.32.49/crypto/serpent.c
---- linux-2.6.32.49/crypto/serpent.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/crypto/serpent.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/crypto/serpent.c b/crypto/serpent.c
+index b651a55..023297d 100644
+--- a/crypto/serpent.c
++++ b/crypto/serpent.c
@@ -21,6 +21,7 @@
#include <asm/byteorder.h>
#include <linux/crypto.h>
@@ -25828,7 +27219,7 @@ diff -urNp linux-2.6.32.49/crypto/serpent.c linux-2.6.32.49/crypto/serpent.c
/* Key is padded to the maximum of 256 bits before round key generation.
* Any key length <= 256 bits (32 bytes) is allowed by the algorithm.
-@@ -224,6 +225,8 @@ static int serpent_setkey(struct crypto_
+@@ -224,6 +225,8 @@ static int serpent_setkey(struct crypto_tfm *tfm, const u8 *key,
u32 r0,r1,r2,r3,r4;
int i;
@@ -25837,182 +27228,10 @@ diff -urNp linux-2.6.32.49/crypto/serpent.c linux-2.6.32.49/crypto/serpent.c
/* Copy key, add padding */
for (i = 0; i < keylen; ++i)
-diff -urNp linux-2.6.32.49/Documentation/dontdiff linux-2.6.32.49/Documentation/dontdiff
---- linux-2.6.32.49/Documentation/dontdiff 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/Documentation/dontdiff 2011-11-18 18:01:52.000000000 -0500
-@@ -1,13 +1,16 @@
- *.a
- *.aux
- *.bin
-+*.cis
- *.cpio
- *.csp
-+*.dbg
- *.dsp
- *.dvi
- *.elf
- *.eps
- *.fw
-+*.gcno
- *.gen.S
- *.gif
- *.grep
-@@ -38,8 +41,10 @@
- *.tab.h
- *.tex
- *.ver
-+*.vim
- *.xml
- *_MODULES
-+*_reg_safe.h
- *_vga16.c
- *~
- *.9
-@@ -49,11 +54,16 @@
- 53c700_d.h
- CVS
- ChangeSet
-+GPATH
-+GRTAGS
-+GSYMS
-+GTAGS
- Image
- Kerntypes
- Module.markers
- Module.symvers
- PENDING
-+PERF*
- SCCS
- System.map*
- TAGS
-@@ -76,7 +86,11 @@ btfixupprep
- build
- bvmlinux
- bzImage*
-+capability_names.h
-+capflags.c
- classlist.h*
-+clut_vga16.c
-+common-cmds.h
- comp*.log
- compile.h*
- conf
-@@ -84,6 +98,8 @@ config
- config-*
- config_data.h*
- config_data.gz*
-+config.c
-+config.tmp
- conmakehash
- consolemap_deftbl.c*
- cpustr.h
-@@ -97,19 +113,22 @@ elfconfig.h*
- fixdep
- fore200e_mkfirm
- fore200e_pca_fw.c*
-+gate.lds
- gconf
- gen-devlist
- gen_crc32table
- gen_init_cpio
- genksyms
- *_gray256.c
-+hash
- ihex2fw
- ikconfig.h*
- initramfs_data.cpio
-+initramfs_data.cpio.bz2
- initramfs_data.cpio.gz
- initramfs_list
- kallsyms
--kconfig
-+kern_constants.h
- keywords.c
- ksym.c*
- ksym.h*
-@@ -133,7 +152,9 @@ mkboot
- mkbugboot
- mkcpustr
- mkdep
-+mkpiggy
- mkprep
-+mkregtable
- mktables
- mktree
- modpost
-@@ -149,6 +170,7 @@ patches*
- pca200e.bin
- pca200e_ecd.bin2
- piggy.gz
-+piggy.S
- piggyback
- pnmtologo
- ppc_defs.h*
-@@ -157,12 +179,15 @@ qconf
- raid6altivec*.c
- raid6int*.c
- raid6tables.c
-+regdb.c
- relocs
-+rlim_names.h
- series
- setup
- setup.bin
- setup.elf
- sImage
-+slabinfo
- sm_tbl*
- split-include
- syscalltab.h
-@@ -171,6 +196,7 @@ tftpboot.img
- timeconst.h
- times.h*
- trix_boot.h
-+user_constants.h
- utsrelease.h*
- vdso-syms.lds
- vdso.lds
-@@ -186,14 +212,20 @@ version.h*
- vmlinux
- vmlinux-*
- vmlinux.aout
-+vmlinux.bin.all
-+vmlinux.bin.bz2
- vmlinux.lds
-+vmlinux.relocs
-+voffset.h
- vsyscall.lds
- vsyscall_32.lds
- wanxlfw.inc
- uImage
- unifdef
-+utsrelease.h
- wakeup.bin
- wakeup.elf
- wakeup.lds
- zImage*
- zconf.hash.c
-+zoffset.h
-diff -urNp linux-2.6.32.49/Documentation/kernel-parameters.txt linux-2.6.32.49/Documentation/kernel-parameters.txt
---- linux-2.6.32.49/Documentation/kernel-parameters.txt 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/Documentation/kernel-parameters.txt 2011-11-15 19:59:43.000000000 -0500
-@@ -1837,6 +1837,13 @@ and is between 256 and 4096 characters.
- the specified number of seconds. This is to be used if
- your oopses keep scrolling off the screen.
-
-+ pax_nouderef [X86] disables UDEREF. Most likely needed under certain
-+ virtualization environments that don't cope well with the
-+ expand down segment used by UDEREF on X86-32 or the frequent
-+ page table updates on X86-64.
-+
-+ pax_softmode= 0/1 to disable/enable PaX softmode on boot already.
-+
- pcbit= [HW,ISDN]
-
- pcd. [PARIDE]
-diff -urNp linux-2.6.32.49/drivers/acpi/acpi_pad.c linux-2.6.32.49/drivers/acpi/acpi_pad.c
---- linux-2.6.32.49/drivers/acpi/acpi_pad.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/acpi_pad.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
+index 0d2cdb8..d8de48d 100644
+--- a/drivers/acpi/acpi_pad.c
++++ b/drivers/acpi/acpi_pad.c
@@ -30,7 +30,7 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
@@ -26022,9 +27241,10 @@ diff -urNp linux-2.6.32.49/drivers/acpi/acpi_pad.c linux-2.6.32.49/drivers/acpi/
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
static DEFINE_MUTEX(isolated_cpus_lock);
-diff -urNp linux-2.6.32.49/drivers/acpi/battery.c linux-2.6.32.49/drivers/acpi/battery.c
---- linux-2.6.32.49/drivers/acpi/battery.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/battery.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
+index 3f4602b..2e41d36 100644
+--- a/drivers/acpi/battery.c
++++ b/drivers/acpi/battery.c
@@ -763,7 +763,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
}
@@ -26034,9 +27254,10 @@ diff -urNp linux-2.6.32.49/drivers/acpi/battery.c linux-2.6.32.49/drivers/acpi/b
mode_t mode;
const char *name;
} acpi_battery_file[] = {
-diff -urNp linux-2.6.32.49/drivers/acpi/dock.c linux-2.6.32.49/drivers/acpi/dock.c
---- linux-2.6.32.49/drivers/acpi/dock.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/dock.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
+index 7338b6a..82f0257 100644
+--- a/drivers/acpi/dock.c
++++ b/drivers/acpi/dock.c
@@ -77,7 +77,7 @@ struct dock_dependent_device {
struct list_head list;
struct list_head hotplug_list;
@@ -26046,7 +27267,7 @@ diff -urNp linux-2.6.32.49/drivers/acpi/dock.c linux-2.6.32.49/drivers/acpi/dock
void *context;
};
-@@ -605,7 +605,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
+@@ -605,7 +605,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifier);
* the dock driver after _DCK is executed.
*/
int
@@ -26055,10 +27276,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/dock.c linux-2.6.32.49/drivers/acpi/dock
void *context)
{
struct dock_dependent_device *dd;
-diff -urNp linux-2.6.32.49/drivers/acpi/osl.c linux-2.6.32.49/drivers/acpi/osl.c
---- linux-2.6.32.49/drivers/acpi/osl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/osl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -523,6 +523,8 @@ acpi_os_read_memory(acpi_physical_addres
+diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
+index 7c1c59e..2993595 100644
+--- a/drivers/acpi/osl.c
++++ b/drivers/acpi/osl.c
+@@ -523,6 +523,8 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
@@ -26067,7 +27289,7 @@ diff -urNp linux-2.6.32.49/drivers/acpi/osl.c linux-2.6.32.49/drivers/acpi/osl.c
if (!value)
value = &dummy;
-@@ -551,6 +553,8 @@ acpi_os_write_memory(acpi_physical_addre
+@@ -551,6 +553,8 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
@@ -26076,10 +27298,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/osl.c linux-2.6.32.49/drivers/acpi/osl.c
switch (width) {
case 8:
-diff -urNp linux-2.6.32.49/drivers/acpi/power_meter.c linux-2.6.32.49/drivers/acpi/power_meter.c
---- linux-2.6.32.49/drivers/acpi/power_meter.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/power_meter.c 2011-11-15 19:59:43.000000000 -0500
-@@ -315,8 +315,6 @@ static ssize_t set_trip(struct device *d
+diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c
+index c216062..eec10d2 100644
+--- a/drivers/acpi/power_meter.c
++++ b/drivers/acpi/power_meter.c
+@@ -315,8 +315,6 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
return res;
temp /= 1000;
@@ -26088,10 +27311,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/power_meter.c linux-2.6.32.49/drivers/ac
mutex_lock(&resource->lock);
resource->trip[attr->index - 7] = temp;
-diff -urNp linux-2.6.32.49/drivers/acpi/proc.c linux-2.6.32.49/drivers/acpi/proc.c
---- linux-2.6.32.49/drivers/acpi/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -391,20 +391,15 @@ acpi_system_write_wakeup_device(struct f
+diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
+index d0d25e2..961643d 100644
+--- a/drivers/acpi/proc.c
++++ b/drivers/acpi/proc.c
+@@ -391,20 +391,15 @@ acpi_system_write_wakeup_device(struct file *file,
size_t count, loff_t * ppos)
{
struct list_head *node, *next;
@@ -26117,7 +27341,7 @@ diff -urNp linux-2.6.32.49/drivers/acpi/proc.c linux-2.6.32.49/drivers/acpi/proc
mutex_lock(&acpi_device_lock);
list_for_each_safe(node, next, &acpi_wakeup_device_list) {
-@@ -413,7 +408,7 @@ acpi_system_write_wakeup_device(struct f
+@@ -413,7 +408,7 @@ acpi_system_write_wakeup_device(struct file *file,
if (!dev->wakeup.flags.valid)
continue;
@@ -26126,10 +27350,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/proc.c linux-2.6.32.49/drivers/acpi/proc
dev->wakeup.state.enabled =
dev->wakeup.state.enabled ? 0 : 1;
found_dev = dev;
-diff -urNp linux-2.6.32.49/drivers/acpi/processor_core.c linux-2.6.32.49/drivers/acpi/processor_core.c
---- linux-2.6.32.49/drivers/acpi/processor_core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/processor_core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -790,7 +790,7 @@ static int __cpuinit acpi_processor_add(
+diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
+index 7102474..de8ad22 100644
+--- a/drivers/acpi/processor_core.c
++++ b/drivers/acpi/processor_core.c
+@@ -790,7 +790,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
return 0;
}
@@ -26138,9 +27363,10 @@ diff -urNp linux-2.6.32.49/drivers/acpi/processor_core.c linux-2.6.32.49/drivers
/*
* Buggy BIOS check
-diff -urNp linux-2.6.32.49/drivers/acpi/sbshc.c linux-2.6.32.49/drivers/acpi/sbshc.c
---- linux-2.6.32.49/drivers/acpi/sbshc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/sbshc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
+index d933980..5761f13 100644
+--- a/drivers/acpi/sbshc.c
++++ b/drivers/acpi/sbshc.c
@@ -17,7 +17,7 @@
#define PREFIX "ACPI: "
@@ -26150,10 +27376,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/sbshc.c linux-2.6.32.49/drivers/acpi/sbs
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
struct acpi_smb_hc {
-diff -urNp linux-2.6.32.49/drivers/acpi/sleep.c linux-2.6.32.49/drivers/acpi/sleep.c
---- linux-2.6.32.49/drivers/acpi/sleep.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/sleep.c 2011-11-15 19:59:43.000000000 -0500
-@@ -283,7 +283,7 @@ static int acpi_suspend_state_valid(susp
+diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
+index 0458094..6978e7b 100644
+--- a/drivers/acpi/sleep.c
++++ b/drivers/acpi/sleep.c
+@@ -283,7 +283,7 @@ static int acpi_suspend_state_valid(suspend_state_t pm_state)
}
}
@@ -26162,7 +27389,7 @@ diff -urNp linux-2.6.32.49/drivers/acpi/sleep.c linux-2.6.32.49/drivers/acpi/sle
.valid = acpi_suspend_state_valid,
.begin = acpi_suspend_begin,
.prepare_late = acpi_pm_prepare,
-@@ -311,7 +311,7 @@ static int acpi_suspend_begin_old(suspen
+@@ -311,7 +311,7 @@ static int acpi_suspend_begin_old(suspend_state_t pm_state)
* The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
* been requested.
*/
@@ -26180,7 +27407,7 @@ diff -urNp linux-2.6.32.49/drivers/acpi/sleep.c linux-2.6.32.49/drivers/acpi/sle
.begin = acpi_hibernation_begin,
.end = acpi_pm_end,
.pre_snapshot = acpi_hibernation_pre_snapshot,
-@@ -513,7 +513,7 @@ static int acpi_hibernation_pre_snapshot
+@@ -513,7 +513,7 @@ static int acpi_hibernation_pre_snapshot_old(void)
* The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
* been requested.
*/
@@ -26189,10 +27416,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/sleep.c linux-2.6.32.49/drivers/acpi/sle
.begin = acpi_hibernation_begin_old,
.end = acpi_pm_end,
.pre_snapshot = acpi_hibernation_pre_snapshot_old,
-diff -urNp linux-2.6.32.49/drivers/acpi/video.c linux-2.6.32.49/drivers/acpi/video.c
---- linux-2.6.32.49/drivers/acpi/video.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/acpi/video.c 2011-11-15 19:59:43.000000000 -0500
-@@ -359,7 +359,7 @@ static int acpi_video_set_brightness(str
+diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
+index 05dff63..b662ab7 100644
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -359,7 +359,7 @@ static int acpi_video_set_brightness(struct backlight_device *bd)
vd->brightness->levels[request_level]);
}
@@ -26201,10 +27429,11 @@ diff -urNp linux-2.6.32.49/drivers/acpi/video.c linux-2.6.32.49/drivers/acpi/vid
.get_brightness = acpi_video_get_brightness,
.update_status = acpi_video_set_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/ata/ahci.c linux-2.6.32.49/drivers/ata/ahci.c
---- linux-2.6.32.49/drivers/ata/ahci.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/ahci.c 2011-11-15 19:59:43.000000000 -0500
-@@ -387,7 +387,7 @@ static struct scsi_host_template ahci_sh
+diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
+index 6787aab..23ffb0e 100644
+--- a/drivers/ata/ahci.c
++++ b/drivers/ata/ahci.c
+@@ -387,7 +387,7 @@ static struct scsi_host_template ahci_sht = {
.sdev_attrs = ahci_sdev_attrs,
};
@@ -26213,7 +27442,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/ahci.c linux-2.6.32.49/drivers/ata/ahci.c
.inherits = &sata_pmp_port_ops,
.qc_defer = sata_pmp_qc_defer_cmd_switch,
-@@ -424,17 +424,17 @@ static struct ata_port_operations ahci_o
+@@ -424,17 +424,17 @@ static struct ata_port_operations ahci_ops = {
.port_stop = ahci_port_stop,
};
@@ -26234,10 +27463,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/ahci.c linux-2.6.32.49/drivers/ata/ahci.c
.inherits = &ahci_ops,
.softreset = ahci_sb600_softreset,
.pmp_softreset = ahci_sb600_softreset,
-diff -urNp linux-2.6.32.49/drivers/ata/ata_generic.c linux-2.6.32.49/drivers/ata/ata_generic.c
---- linux-2.6.32.49/drivers/ata/ata_generic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/ata_generic.c 2011-11-15 19:59:43.000000000 -0500
-@@ -104,7 +104,7 @@ static struct scsi_host_template generic
+diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
+index 99e7196..4968c77 100644
+--- a/drivers/ata/ata_generic.c
++++ b/drivers/ata/ata_generic.c
+@@ -104,7 +104,7 @@ static struct scsi_host_template generic_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26246,10 +27476,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/ata_generic.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_mode = generic_set_mode,
-diff -urNp linux-2.6.32.49/drivers/ata/ata_piix.c linux-2.6.32.49/drivers/ata/ata_piix.c
---- linux-2.6.32.49/drivers/ata/ata_piix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/ata_piix.c 2011-11-15 19:59:43.000000000 -0500
-@@ -318,7 +318,7 @@ static struct scsi_host_template piix_sh
+diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
+index c33591d..000c121 100644
+--- a/drivers/ata/ata_piix.c
++++ b/drivers/ata/ata_piix.c
+@@ -318,7 +318,7 @@ static struct scsi_host_template piix_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26258,7 +27489,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/ata_piix.c linux-2.6.32.49/drivers/ata/at
.inherits = &ata_bmdma32_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = piix_set_piomode,
-@@ -326,22 +326,22 @@ static struct ata_port_operations piix_p
+@@ -326,22 +326,22 @@ static struct ata_port_operations piix_pata_ops = {
.prereset = piix_pata_prereset,
};
@@ -26285,10 +27516,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/ata_piix.c linux-2.6.32.49/drivers/ata/at
.inherits = &piix_sata_ops,
.hardreset = sata_std_hardreset,
.scr_read = piix_sidpr_scr_read,
-diff -urNp linux-2.6.32.49/drivers/ata/libata-acpi.c linux-2.6.32.49/drivers/ata/libata-acpi.c
---- linux-2.6.32.49/drivers/ata/libata-acpi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/libata-acpi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -223,12 +223,12 @@ static void ata_acpi_dev_uevent(acpi_han
+diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
+index b0882cd..c295d65 100644
+--- a/drivers/ata/libata-acpi.c
++++ b/drivers/ata/libata-acpi.c
+@@ -223,12 +223,12 @@ static void ata_acpi_dev_uevent(acpi_handle handle, u32 event, void *data)
ata_acpi_uevent(dev->link->ap, dev, event);
}
@@ -26303,10 +27535,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-acpi.c linux-2.6.32.49/drivers/ata
.handler = ata_acpi_ap_notify_dock,
.uevent = ata_acpi_ap_uevent,
};
-diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata/libata-core.c
---- linux-2.6.32.49/drivers/ata/libata-core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/libata-core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -4954,7 +4954,7 @@ void ata_qc_free(struct ata_queued_cmd *
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index d4f7f99..94f603e 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -4954,7 +4954,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
struct ata_port *ap;
unsigned int tag;
@@ -26315,7 +27548,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
ap = qc->ap;
qc->flags = 0;
-@@ -4970,7 +4970,7 @@ void __ata_qc_complete(struct ata_queued
+@@ -4970,7 +4970,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap;
struct ata_link *link;
@@ -26324,7 +27557,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;
-@@ -5987,7 +5987,7 @@ static void ata_host_stop(struct device
+@@ -5987,7 +5987,7 @@ static void ata_host_stop(struct device *gendev, void *res)
* LOCKING:
* None.
*/
@@ -26333,7 +27566,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
{
static DEFINE_SPINLOCK(lock);
const struct ata_port_operations *cur;
-@@ -5999,6 +5999,7 @@ static void ata_finalize_port_ops(struct
+@@ -5999,6 +5999,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
return;
spin_lock(&lock);
@@ -26341,7 +27574,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
for (cur = ops->inherits; cur; cur = cur->inherits) {
void **inherit = (void **)cur;
-@@ -6012,8 +6013,9 @@ static void ata_finalize_port_ops(struct
+@@ -6012,8 +6013,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
if (IS_ERR(*pp))
*pp = NULL;
@@ -26352,7 +27585,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
spin_unlock(&lock);
}
-@@ -6110,7 +6112,7 @@ int ata_host_start(struct ata_host *host
+@@ -6110,7 +6112,7 @@ int ata_host_start(struct ata_host *host)
*/
/* KILLME - the only user left is ipr */
void ata_host_init(struct ata_host *host, struct device *dev,
@@ -26361,7 +27594,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
{
spin_lock_init(&host->lock);
host->dev = dev;
-@@ -6773,7 +6775,7 @@ static void ata_dummy_error_handler(stru
+@@ -6773,7 +6775,7 @@ static void ata_dummy_error_handler(struct ata_port *ap)
/* truly dummy */
}
@@ -26370,9 +27603,10 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-core.c linux-2.6.32.49/drivers/ata
.qc_prep = ata_noop_qc_prep,
.qc_issue = ata_dummy_qc_issue,
.error_handler = ata_dummy_error_handler,
-diff -urNp linux-2.6.32.49/drivers/ata/libata-eh.c linux-2.6.32.49/drivers/ata/libata-eh.c
---- linux-2.6.32.49/drivers/ata/libata-eh.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/libata-eh.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
+index e5bdb9b..45a8e72 100644
+--- a/drivers/ata/libata-eh.c
++++ b/drivers/ata/libata-eh.c
@@ -2423,6 +2423,8 @@ void ata_eh_report(struct ata_port *ap)
{
struct ata_link *link;
@@ -26382,7 +27616,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-eh.c linux-2.6.32.49/drivers/ata/l
ata_for_each_link(link, ap, HOST_FIRST)
ata_eh_link_report(link);
}
-@@ -3594,7 +3596,7 @@ void ata_do_eh(struct ata_port *ap, ata_
+@@ -3594,7 +3596,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
*/
void ata_std_error_handler(struct ata_port *ap)
{
@@ -26391,10 +27625,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-eh.c linux-2.6.32.49/drivers/ata/l
ata_reset_fn_t hardreset = ops->hardreset;
/* ignore built-in hardreset if SCR access is not available */
-diff -urNp linux-2.6.32.49/drivers/ata/libata-pmp.c linux-2.6.32.49/drivers/ata/libata-pmp.c
---- linux-2.6.32.49/drivers/ata/libata-pmp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/libata-pmp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -841,7 +841,7 @@ static int sata_pmp_handle_link_fail(str
+diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
+index 51f0ffb..19ce3e3 100644
+--- a/drivers/ata/libata-pmp.c
++++ b/drivers/ata/libata-pmp.c
+@@ -841,7 +841,7 @@ static int sata_pmp_handle_link_fail(struct ata_link *link, int *link_tries)
*/
static int sata_pmp_eh_recover(struct ata_port *ap)
{
@@ -26403,10 +27638,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/libata-pmp.c linux-2.6.32.49/drivers/ata/
int pmp_tries, link_tries[SATA_PMP_MAX_PORTS];
struct ata_link *pmp_link = &ap->link;
struct ata_device *pmp_dev = pmp_link->device;
-diff -urNp linux-2.6.32.49/drivers/ata/pata_acpi.c linux-2.6.32.49/drivers/ata/pata_acpi.c
---- linux-2.6.32.49/drivers/ata/pata_acpi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_acpi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -215,7 +215,7 @@ static struct scsi_host_template pacpi_s
+diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
+index d8f35fe..288180a 100644
+--- a/drivers/ata/pata_acpi.c
++++ b/drivers/ata/pata_acpi.c
+@@ -215,7 +215,7 @@ static struct scsi_host_template pacpi_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26415,10 +27651,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_acpi.c linux-2.6.32.49/drivers/ata/p
.inherits = &ata_bmdma_port_ops,
.qc_issue = pacpi_qc_issue,
.cable_detect = pacpi_cable_detect,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pata_ali.c
---- linux-2.6.32.49/drivers/ata/pata_ali.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_ali.c 2011-11-15 19:59:43.000000000 -0500
-@@ -365,7 +365,7 @@ static struct scsi_host_template ali_sht
+diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
+index 9434114..1f2f364 100644
+--- a/drivers/ata/pata_ali.c
++++ b/drivers/ata/pata_ali.c
+@@ -365,7 +365,7 @@ static struct scsi_host_template ali_sht = {
* Port operations for PIO only ALi
*/
@@ -26427,7 +27664,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = ali_set_piomode,
-@@ -382,7 +382,7 @@ static const struct ata_port_operations
+@@ -382,7 +382,7 @@ static const struct ata_port_operations ali_dma_base_ops = {
* Port operations for DMA capable ALi without cable
* detect
*/
@@ -26436,7 +27673,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ali_dma_base_ops,
.cable_detect = ata_cable_40wire,
.mode_filter = ali_20_filter,
-@@ -393,7 +393,7 @@ static struct ata_port_operations ali_20
+@@ -393,7 +393,7 @@ static struct ata_port_operations ali_20_port_ops = {
/*
* Port operations for DMA capable ALi with cable detect
*/
@@ -26445,7 +27682,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ali_dma_base_ops,
.check_atapi_dma = ali_check_atapi_dma,
.cable_detect = ali_c2_cable_detect,
-@@ -404,7 +404,7 @@ static struct ata_port_operations ali_c2
+@@ -404,7 +404,7 @@ static struct ata_port_operations ali_c2_port_ops = {
/*
* Port operations for DMA capable ALi with cable detect
*/
@@ -26454,7 +27691,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ali_dma_base_ops,
.check_atapi_dma = ali_check_atapi_dma,
.cable_detect = ali_c2_cable_detect,
-@@ -414,7 +414,7 @@ static struct ata_port_operations ali_c4
+@@ -414,7 +414,7 @@ static struct ata_port_operations ali_c4_port_ops = {
/*
* Port operations for DMA capable ALi with cable detect and LBA48
*/
@@ -26463,10 +27700,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ali.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ali_dma_base_ops,
.check_atapi_dma = ali_check_atapi_dma,
.dev_config = ali_warn_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_amd.c linux-2.6.32.49/drivers/ata/pata_amd.c
---- linux-2.6.32.49/drivers/ata/pata_amd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_amd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -397,28 +397,28 @@ static const struct ata_port_operations
+diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
+index 567f3f7..c8ee0da 100644
+--- a/drivers/ata/pata_amd.c
++++ b/drivers/ata/pata_amd.c
+@@ -397,28 +397,28 @@ static const struct ata_port_operations amd_base_port_ops = {
.prereset = amd_pre_reset,
};
@@ -26499,7 +27737,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_amd.c linux-2.6.32.49/drivers/ata/pa
.inherits = &amd_base_port_ops,
.cable_detect = amd_cable_detect,
.set_piomode = amd133_set_piomode,
-@@ -433,13 +433,13 @@ static const struct ata_port_operations
+@@ -433,13 +433,13 @@ static const struct ata_port_operations nv_base_port_ops = {
.host_stop = nv_host_stop,
};
@@ -26515,10 +27753,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_amd.c linux-2.6.32.49/drivers/ata/pa
.inherits = &nv_base_port_ops,
.set_piomode = nv133_set_piomode,
.set_dmamode = nv133_set_dmamode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_artop.c linux-2.6.32.49/drivers/ata/pata_artop.c
---- linux-2.6.32.49/drivers/ata/pata_artop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_artop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -311,7 +311,7 @@ static struct scsi_host_template artop_s
+diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
+index d332cfd..4b7eaae 100644
+--- a/drivers/ata/pata_artop.c
++++ b/drivers/ata/pata_artop.c
+@@ -311,7 +311,7 @@ static struct scsi_host_template artop_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26527,7 +27766,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_artop.c linux-2.6.32.49/drivers/ata/
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = artop6210_set_piomode,
-@@ -320,7 +320,7 @@ static struct ata_port_operations artop6
+@@ -320,7 +320,7 @@ static struct ata_port_operations artop6210_ops = {
.qc_defer = artop6210_qc_defer,
};
@@ -26536,10 +27775,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_artop.c linux-2.6.32.49/drivers/ata/
.inherits = &ata_bmdma_port_ops,
.cable_detect = artop6260_cable_detect,
.set_piomode = artop6260_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_at32.c linux-2.6.32.49/drivers/ata/pata_at32.c
---- linux-2.6.32.49/drivers/ata/pata_at32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_at32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -172,7 +172,7 @@ static struct scsi_host_template at32_sh
+diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c
+index 5c129f9..7bb7ccb 100644
+--- a/drivers/ata/pata_at32.c
++++ b/drivers/ata/pata_at32.c
+@@ -172,7 +172,7 @@ static struct scsi_host_template at32_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -26548,10 +27788,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_at32.c linux-2.6.32.49/drivers/ata/p
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = pata_at32_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_at91.c linux-2.6.32.49/drivers/ata/pata_at91.c
---- linux-2.6.32.49/drivers/ata/pata_at91.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_at91.c 2011-11-15 19:59:43.000000000 -0500
-@@ -195,7 +195,7 @@ static struct scsi_host_template pata_at
+diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
+index 41c94b1..829006d 100644
+--- a/drivers/ata/pata_at91.c
++++ b/drivers/ata/pata_at91.c
+@@ -195,7 +195,7 @@ static struct scsi_host_template pata_at91_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -26560,10 +27801,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_at91.c linux-2.6.32.49/drivers/ata/p
.inherits = &ata_sff_port_ops,
.sff_data_xfer = pata_at91_data_xfer_noirq,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_atiixp.c linux-2.6.32.49/drivers/ata/pata_atiixp.c
---- linux-2.6.32.49/drivers/ata/pata_atiixp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_atiixp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -205,7 +205,7 @@ static struct scsi_host_template atiixp_
+diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
+index ae4454d..d391eb4 100644
+--- a/drivers/ata/pata_atiixp.c
++++ b/drivers/ata/pata_atiixp.c
+@@ -205,7 +205,7 @@ static struct scsi_host_template atiixp_sht = {
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
@@ -26572,10 +27814,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_atiixp.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_sff_dumb_qc_prep,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_atp867x.c linux-2.6.32.49/drivers/ata/pata_atp867x.c
---- linux-2.6.32.49/drivers/ata/pata_atp867x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_atp867x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -274,7 +274,7 @@ static struct scsi_host_template atp867x
+diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c
+index 6fe7ded..2a425dc 100644
+--- a/drivers/ata/pata_atp867x.c
++++ b/drivers/ata/pata_atp867x.c
+@@ -274,7 +274,7 @@ static struct scsi_host_template atp867x_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26584,10 +27827,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_atp867x.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.cable_detect = atp867x_cable_detect,
.set_piomode = atp867x_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_bf54x.c linux-2.6.32.49/drivers/ata/pata_bf54x.c
---- linux-2.6.32.49/drivers/ata/pata_bf54x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_bf54x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1464,7 +1464,7 @@ static struct scsi_host_template bfin_sh
+diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
+index c4b47a3..b27a367 100644
+--- a/drivers/ata/pata_bf54x.c
++++ b/drivers/ata/pata_bf54x.c
+@@ -1464,7 +1464,7 @@ static struct scsi_host_template bfin_sht = {
.dma_boundary = ATA_DMA_BOUNDARY,
};
@@ -26596,10 +27840,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_bf54x.c linux-2.6.32.49/drivers/ata/
.inherits = &ata_sff_port_ops,
.set_piomode = bfin_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cmd640.c linux-2.6.32.49/drivers/ata/pata_cmd640.c
---- linux-2.6.32.49/drivers/ata/pata_cmd640.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cmd640.c 2011-11-15 19:59:43.000000000 -0500
-@@ -168,7 +168,7 @@ static struct scsi_host_template cmd640_
+diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
+index 5acf9fa..84248be 100644
+--- a/drivers/ata/pata_cmd640.c
++++ b/drivers/ata/pata_cmd640.c
+@@ -168,7 +168,7 @@ static struct scsi_host_template cmd640_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26608,10 +27853,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cmd640.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
/* In theory xfer_noirq is not needed once we kill the prefetcher */
.sff_data_xfer = ata_sff_data_xfer_noirq,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cmd64x.c linux-2.6.32.49/drivers/ata/pata_cmd64x.c
---- linux-2.6.32.49/drivers/ata/pata_cmd64x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cmd64x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -271,18 +271,18 @@ static const struct ata_port_operations
+diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
+index ccd2694..c869c3d 100644
+--- a/drivers/ata/pata_cmd64x.c
++++ b/drivers/ata/pata_cmd64x.c
+@@ -271,18 +271,18 @@ static const struct ata_port_operations cmd64x_base_ops = {
.set_dmamode = cmd64x_set_dmamode,
};
@@ -26633,10 +27879,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cmd64x.c linux-2.6.32.49/drivers/ata
.inherits = &cmd64x_base_ops,
.bmdma_stop = cmd648_bmdma_stop,
.cable_detect = cmd648_cable_detect,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5520.c linux-2.6.32.49/drivers/ata/pata_cs5520.c
---- linux-2.6.32.49/drivers/ata/pata_cs5520.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cs5520.c 2011-11-15 19:59:43.000000000 -0500
-@@ -144,7 +144,7 @@ static struct scsi_host_template cs5520_
+diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
+index 0df83cf..d7595b0 100644
+--- a/drivers/ata/pata_cs5520.c
++++ b/drivers/ata/pata_cs5520.c
+@@ -144,7 +144,7 @@ static struct scsi_host_template cs5520_sht = {
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
@@ -26645,10 +27892,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5520.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_sff_dumb_qc_prep,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5530.c linux-2.6.32.49/drivers/ata/pata_cs5530.c
---- linux-2.6.32.49/drivers/ata/pata_cs5530.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cs5530.c 2011-11-15 19:59:43.000000000 -0500
-@@ -164,7 +164,7 @@ static struct scsi_host_template cs5530_
+diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
+index c974b05..6d26b11 100644
+--- a/drivers/ata/pata_cs5530.c
++++ b/drivers/ata/pata_cs5530.c
+@@ -164,7 +164,7 @@ static struct scsi_host_template cs5530_sht = {
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
@@ -26657,10 +27905,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5530.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_sff_dumb_qc_prep,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5535.c linux-2.6.32.49/drivers/ata/pata_cs5535.c
---- linux-2.6.32.49/drivers/ata/pata_cs5535.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cs5535.c 2011-11-15 19:59:43.000000000 -0500
-@@ -160,7 +160,7 @@ static struct scsi_host_template cs5535_
+diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
+index 403f561..aacd26b 100644
+--- a/drivers/ata/pata_cs5535.c
++++ b/drivers/ata/pata_cs5535.c
+@@ -160,7 +160,7 @@ static struct scsi_host_template cs5535_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26669,10 +27918,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5535.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = cs5535_cable_detect,
.set_piomode = cs5535_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5536.c linux-2.6.32.49/drivers/ata/pata_cs5536.c
---- linux-2.6.32.49/drivers/ata/pata_cs5536.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cs5536.c 2011-11-15 19:59:43.000000000 -0500
-@@ -223,7 +223,7 @@ static struct scsi_host_template cs5536_
+diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
+index 6da4cb4..de24a25 100644
+--- a/drivers/ata/pata_cs5536.c
++++ b/drivers/ata/pata_cs5536.c
+@@ -223,7 +223,7 @@ static struct scsi_host_template cs5536_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26681,10 +27931,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cs5536.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = cs5536_cable_detect,
.set_piomode = cs5536_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_cypress.c linux-2.6.32.49/drivers/ata/pata_cypress.c
---- linux-2.6.32.49/drivers/ata/pata_cypress.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_cypress.c 2011-11-15 19:59:43.000000000 -0500
-@@ -113,7 +113,7 @@ static struct scsi_host_template cy82c69
+diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
+index 8fb040b..b16a9c9 100644
+--- a/drivers/ata/pata_cypress.c
++++ b/drivers/ata/pata_cypress.c
+@@ -113,7 +113,7 @@ static struct scsi_host_template cy82c693_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26693,10 +27944,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_cypress.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = cy82c693_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_efar.c linux-2.6.32.49/drivers/ata/pata_efar.c
---- linux-2.6.32.49/drivers/ata/pata_efar.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_efar.c 2011-11-15 19:59:43.000000000 -0500
-@@ -222,7 +222,7 @@ static struct scsi_host_template efar_sh
+diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
+index 2a6412f..555ee11 100644
+--- a/drivers/ata/pata_efar.c
++++ b/drivers/ata/pata_efar.c
+@@ -222,7 +222,7 @@ static struct scsi_host_template efar_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26705,10 +27957,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_efar.c linux-2.6.32.49/drivers/ata/p
.inherits = &ata_bmdma_port_ops,
.cable_detect = efar_cable_detect,
.set_piomode = efar_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt366.c linux-2.6.32.49/drivers/ata/pata_hpt366.c
---- linux-2.6.32.49/drivers/ata/pata_hpt366.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_hpt366.c 2011-11-15 19:59:43.000000000 -0500
-@@ -282,7 +282,7 @@ static struct scsi_host_template hpt36x_
+diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
+index b9d8836..0b92030 100644
+--- a/drivers/ata/pata_hpt366.c
++++ b/drivers/ata/pata_hpt366.c
+@@ -282,7 +282,7 @@ static struct scsi_host_template hpt36x_sht = {
* Configuration for HPT366/68
*/
@@ -26717,10 +27970,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt366.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = hpt36x_cable_detect,
.mode_filter = hpt366_filter,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt37x.c linux-2.6.32.49/drivers/ata/pata_hpt37x.c
---- linux-2.6.32.49/drivers/ata/pata_hpt37x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_hpt37x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -576,7 +576,7 @@ static struct scsi_host_template hpt37x_
+diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
+index 5af7f19..00c4980 100644
+--- a/drivers/ata/pata_hpt37x.c
++++ b/drivers/ata/pata_hpt37x.c
+@@ -576,7 +576,7 @@ static struct scsi_host_template hpt37x_sht = {
* Configuration for HPT370
*/
@@ -26729,7 +27983,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt37x.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt370_bmdma_stop,
-@@ -591,7 +591,7 @@ static struct ata_port_operations hpt370
+@@ -591,7 +591,7 @@ static struct ata_port_operations hpt370_port_ops = {
* Configuration for HPT370A. Close to 370 but less filters
*/
@@ -26738,7 +27992,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt37x.c linux-2.6.32.49/drivers/ata
.inherits = &hpt370_port_ops,
.mode_filter = hpt370a_filter,
};
-@@ -601,7 +601,7 @@ static struct ata_port_operations hpt370
+@@ -601,7 +601,7 @@ static struct ata_port_operations hpt370a_port_ops = {
* and DMA mode setting functionality.
*/
@@ -26747,7 +28001,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt37x.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt37x_bmdma_stop,
-@@ -616,7 +616,7 @@ static struct ata_port_operations hpt372
+@@ -616,7 +616,7 @@ static struct ata_port_operations hpt372_port_ops = {
* but we have a different cable detection procedure for function 1.
*/
@@ -26756,10 +28010,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt37x.c linux-2.6.32.49/drivers/ata
.inherits = &hpt372_port_ops,
.prereset = hpt374_fn1_pre_reset,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt3x2n.c linux-2.6.32.49/drivers/ata/pata_hpt3x2n.c
---- linux-2.6.32.49/drivers/ata/pata_hpt3x2n.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_hpt3x2n.c 2011-11-15 19:59:43.000000000 -0500
-@@ -337,7 +337,7 @@ static struct scsi_host_template hpt3x2n
+diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
+index 100f227..2e39382 100644
+--- a/drivers/ata/pata_hpt3x2n.c
++++ b/drivers/ata/pata_hpt3x2n.c
+@@ -337,7 +337,7 @@ static struct scsi_host_template hpt3x2n_sht = {
* Configuration for HPT3x2n.
*/
@@ -26768,10 +28023,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt3x2n.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt3x2n_bmdma_stop,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt3x3.c linux-2.6.32.49/drivers/ata/pata_hpt3x3.c
---- linux-2.6.32.49/drivers/ata/pata_hpt3x3.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_hpt3x3.c 2011-11-15 19:59:43.000000000 -0500
-@@ -141,7 +141,7 @@ static struct scsi_host_template hpt3x3_
+diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
+index 7e31025..6fca8f4 100644
+--- a/drivers/ata/pata_hpt3x3.c
++++ b/drivers/ata/pata_hpt3x3.c
+@@ -141,7 +141,7 @@ static struct scsi_host_template hpt3x3_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26780,10 +28036,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_hpt3x3.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = hpt3x3_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_icside.c linux-2.6.32.49/drivers/ata/pata_icside.c
---- linux-2.6.32.49/drivers/ata/pata_icside.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_icside.c 2011-11-15 19:59:43.000000000 -0500
-@@ -319,7 +319,7 @@ static void pata_icside_postreset(struct
+diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
+index b663b7f..9a26c2a 100644
+--- a/drivers/ata/pata_icside.c
++++ b/drivers/ata/pata_icside.c
+@@ -319,7 +319,7 @@ static void pata_icside_postreset(struct ata_link *link, unsigned int *classes)
}
}
@@ -26792,10 +28049,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_icside.c linux-2.6.32.49/drivers/ata
.inherits = &ata_sff_port_ops,
/* no need to build any PRD tables for DMA */
.qc_prep = ata_noop_qc_prep,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_isapnp.c linux-2.6.32.49/drivers/ata/pata_isapnp.c
---- linux-2.6.32.49/drivers/ata/pata_isapnp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_isapnp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -23,12 +23,12 @@ static struct scsi_host_template isapnp_
+diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
+index 4bceb88..457dfb6 100644
+--- a/drivers/ata/pata_isapnp.c
++++ b/drivers/ata/pata_isapnp.c
+@@ -23,12 +23,12 @@ static struct scsi_host_template isapnp_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -26810,10 +28068,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_isapnp.c linux-2.6.32.49/drivers/ata
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
/* No altstatus so we don't want to use the lost interrupt poll */
-diff -urNp linux-2.6.32.49/drivers/ata/pata_it8213.c linux-2.6.32.49/drivers/ata/pata_it8213.c
---- linux-2.6.32.49/drivers/ata/pata_it8213.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_it8213.c 2011-11-15 19:59:43.000000000 -0500
-@@ -234,7 +234,7 @@ static struct scsi_host_template it8213_
+diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
+index f156da8..24976e2 100644
+--- a/drivers/ata/pata_it8213.c
++++ b/drivers/ata/pata_it8213.c
+@@ -234,7 +234,7 @@ static struct scsi_host_template it8213_sht = {
};
@@ -26822,10 +28081,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_it8213.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.cable_detect = it8213_cable_detect,
.set_piomode = it8213_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_it821x.c linux-2.6.32.49/drivers/ata/pata_it821x.c
---- linux-2.6.32.49/drivers/ata/pata_it821x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_it821x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -800,7 +800,7 @@ static struct scsi_host_template it821x_
+diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
+index 188bc2f..ca9e785 100644
+--- a/drivers/ata/pata_it821x.c
++++ b/drivers/ata/pata_it821x.c
+@@ -800,7 +800,7 @@ static struct scsi_host_template it821x_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26834,7 +28094,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_it821x.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.check_atapi_dma= it821x_check_atapi_dma,
-@@ -814,7 +814,7 @@ static struct ata_port_operations it821x
+@@ -814,7 +814,7 @@ static struct ata_port_operations it821x_smart_port_ops = {
.port_start = it821x_port_start,
};
@@ -26843,7 +28103,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_it821x.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.check_atapi_dma= it821x_check_atapi_dma,
-@@ -830,7 +830,7 @@ static struct ata_port_operations it821x
+@@ -830,7 +830,7 @@ static struct ata_port_operations it821x_passthru_port_ops = {
.port_start = it821x_port_start,
};
@@ -26852,10 +28112,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_it821x.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.check_atapi_dma= it821x_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_ixp4xx_cf.c linux-2.6.32.49/drivers/ata/pata_ixp4xx_cf.c
---- linux-2.6.32.49/drivers/ata/pata_ixp4xx_cf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_ixp4xx_cf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -89,7 +89,7 @@ static struct scsi_host_template ixp4xx_
+diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
+index ba54b08..4b952b7 100644
+--- a/drivers/ata/pata_ixp4xx_cf.c
++++ b/drivers/ata/pata_ixp4xx_cf.c
+@@ -89,7 +89,7 @@ static struct scsi_host_template ixp4xx_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -26864,10 +28125,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ixp4xx_cf.c linux-2.6.32.49/drivers/
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ixp4xx_mmio_data_xfer,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_jmicron.c linux-2.6.32.49/drivers/ata/pata_jmicron.c
---- linux-2.6.32.49/drivers/ata/pata_jmicron.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_jmicron.c 2011-11-15 19:59:43.000000000 -0500
-@@ -111,7 +111,7 @@ static struct scsi_host_template jmicron
+diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
+index 3a1474a..434b0ff 100644
+--- a/drivers/ata/pata_jmicron.c
++++ b/drivers/ata/pata_jmicron.c
+@@ -111,7 +111,7 @@ static struct scsi_host_template jmicron_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -26876,9 +28138,10 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_jmicron.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.prereset = jmicron_pre_reset,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata/pata_legacy.c
---- linux-2.6.32.49/drivers/ata/pata_legacy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_legacy.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
+index 6932e56..220e71d 100644
+--- a/drivers/ata/pata_legacy.c
++++ b/drivers/ata/pata_legacy.c
@@ -106,7 +106,7 @@ struct legacy_probe {
struct legacy_controller {
@@ -26888,7 +28151,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
unsigned int pio_mask;
unsigned int flags;
unsigned int pflags;
-@@ -223,12 +223,12 @@ static const struct ata_port_operations
+@@ -223,12 +223,12 @@ static const struct ata_port_operations legacy_base_port_ops = {
* pio_mask as well.
*/
@@ -26903,7 +28166,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
.set_mode = legacy_set_mode,
-@@ -324,7 +324,7 @@ static unsigned int pdc_data_xfer_vlb(st
+@@ -324,7 +324,7 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
return buflen;
}
@@ -26912,7 +28175,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = pdc20230_set_piomode,
.sff_data_xfer = pdc_data_xfer_vlb,
-@@ -357,7 +357,7 @@ static void ht6560a_set_piomode(struct a
+@@ -357,7 +357,7 @@ static void ht6560a_set_piomode(struct ata_port *ap, struct ata_device *adev)
ioread8(ap->ioaddr.status_addr);
}
@@ -26921,7 +28184,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = ht6560a_set_piomode,
};
-@@ -400,7 +400,7 @@ static void ht6560b_set_piomode(struct a
+@@ -400,7 +400,7 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev)
ioread8(ap->ioaddr.status_addr);
}
@@ -26930,7 +28193,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = ht6560b_set_piomode,
};
-@@ -499,7 +499,7 @@ static void opti82c611a_set_piomode(stru
+@@ -499,7 +499,7 @@ static void opti82c611a_set_piomode(struct ata_port *ap,
}
@@ -26939,7 +28202,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = opti82c611a_set_piomode,
};
-@@ -609,7 +609,7 @@ static unsigned int opti82c46x_qc_issue(
+@@ -609,7 +609,7 @@ static unsigned int opti82c46x_qc_issue(struct ata_queued_cmd *qc)
return ata_sff_qc_issue(qc);
}
@@ -26948,7 +28211,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = opti82c46x_set_piomode,
.qc_issue = opti82c46x_qc_issue,
-@@ -771,20 +771,20 @@ static int qdi_port(struct platform_devi
+@@ -771,20 +771,20 @@ static int qdi_port(struct platform_device *dev,
return 0;
}
@@ -26972,7 +28235,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = qdi6580dp_set_piomode,
.sff_data_xfer = vlb32_data_xfer,
-@@ -855,7 +855,7 @@ static int winbond_port(struct platform_
+@@ -855,7 +855,7 @@ static int winbond_port(struct platform_device *dev,
return 0;
}
@@ -26981,7 +28244,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
.inherits = &legacy_base_port_ops,
.set_piomode = winbond_set_piomode,
.sff_data_xfer = vlb32_data_xfer,
-@@ -978,7 +978,7 @@ static __init int legacy_init_one(struct
+@@ -978,7 +978,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
int pio_modes = controller->pio_mask;
unsigned long io = probe->port;
u32 mask = (1 << probe->slot);
@@ -26990,10 +28253,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_legacy.c linux-2.6.32.49/drivers/ata
struct legacy_data *ld = &legacy_data[probe->slot];
struct ata_host *host = NULL;
struct ata_port *ap;
-diff -urNp linux-2.6.32.49/drivers/ata/pata_marvell.c linux-2.6.32.49/drivers/ata/pata_marvell.c
---- linux-2.6.32.49/drivers/ata/pata_marvell.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_marvell.c 2011-11-15 19:59:43.000000000 -0500
-@@ -100,7 +100,7 @@ static struct scsi_host_template marvell
+diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
+index 2096fb7..4d090fc 100644
+--- a/drivers/ata/pata_marvell.c
++++ b/drivers/ata/pata_marvell.c
+@@ -100,7 +100,7 @@ static struct scsi_host_template marvell_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27002,10 +28266,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_marvell.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.cable_detect = marvell_cable_detect,
.prereset = marvell_pre_reset,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_mpc52xx.c linux-2.6.32.49/drivers/ata/pata_mpc52xx.c
---- linux-2.6.32.49/drivers/ata/pata_mpc52xx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_mpc52xx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -609,7 +609,7 @@ static struct scsi_host_template mpc52xx
+diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
+index 99d41be..7d56aa8 100644
+--- a/drivers/ata/pata_mpc52xx.c
++++ b/drivers/ata/pata_mpc52xx.c
+@@ -609,7 +609,7 @@ static struct scsi_host_template mpc52xx_ata_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27014,10 +28279,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_mpc52xx.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.sff_dev_select = mpc52xx_ata_dev_select,
.set_piomode = mpc52xx_ata_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_mpiix.c linux-2.6.32.49/drivers/ata/pata_mpiix.c
---- linux-2.6.32.49/drivers/ata/pata_mpiix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_mpiix.c 2011-11-15 19:59:43.000000000 -0500
-@@ -140,7 +140,7 @@ static struct scsi_host_template mpiix_s
+diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
+index b21f002..0a27e7f 100644
+--- a/drivers/ata/pata_mpiix.c
++++ b/drivers/ata/pata_mpiix.c
+@@ -140,7 +140,7 @@ static struct scsi_host_template mpiix_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27026,10 +28292,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_mpiix.c linux-2.6.32.49/drivers/ata/
.inherits = &ata_sff_port_ops,
.qc_issue = mpiix_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_netcell.c linux-2.6.32.49/drivers/ata/pata_netcell.c
---- linux-2.6.32.49/drivers/ata/pata_netcell.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_netcell.c 2011-11-15 19:59:43.000000000 -0500
-@@ -34,7 +34,7 @@ static struct scsi_host_template netcell
+diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
+index f0d52f7..89c3be3 100644
+--- a/drivers/ata/pata_netcell.c
++++ b/drivers/ata/pata_netcell.c
+@@ -34,7 +34,7 @@ static struct scsi_host_template netcell_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27038,10 +28305,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_netcell.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_80wire,
.read_id = netcell_read_id,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_ninja32.c linux-2.6.32.49/drivers/ata/pata_ninja32.c
---- linux-2.6.32.49/drivers/ata/pata_ninja32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_ninja32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -81,7 +81,7 @@ static struct scsi_host_template ninja32
+diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
+index dd53a66..a3f4317 100644
+--- a/drivers/ata/pata_ninja32.c
++++ b/drivers/ata/pata_ninja32.c
+@@ -81,7 +81,7 @@ static struct scsi_host_template ninja32_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27050,10 +28318,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ninja32.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.sff_dev_select = ninja32_dev_select,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_ns87410.c linux-2.6.32.49/drivers/ata/pata_ns87410.c
---- linux-2.6.32.49/drivers/ata/pata_ns87410.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_ns87410.c 2011-11-15 19:59:43.000000000 -0500
-@@ -132,7 +132,7 @@ static struct scsi_host_template ns87410
+diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
+index ca53fac..9aa93ef 100644
+--- a/drivers/ata/pata_ns87410.c
++++ b/drivers/ata/pata_ns87410.c
+@@ -132,7 +132,7 @@ static struct scsi_host_template ns87410_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27062,10 +28331,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ns87410.c linux-2.6.32.49/drivers/at
.inherits = &ata_sff_port_ops,
.qc_issue = ns87410_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_ns87415.c linux-2.6.32.49/drivers/ata/pata_ns87415.c
---- linux-2.6.32.49/drivers/ata/pata_ns87415.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_ns87415.c 2011-11-15 19:59:43.000000000 -0500
-@@ -299,7 +299,7 @@ static u8 ns87560_bmdma_status(struct at
+diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
+index 773b159..55f454e 100644
+--- a/drivers/ata/pata_ns87415.c
++++ b/drivers/ata/pata_ns87415.c
+@@ -299,7 +299,7 @@ static u8 ns87560_bmdma_status(struct ata_port *ap)
}
#endif /* 87560 SuperIO Support */
@@ -27074,7 +28344,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ns87415.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.check_atapi_dma = ns87415_check_atapi_dma,
-@@ -313,7 +313,7 @@ static struct ata_port_operations ns8741
+@@ -313,7 +313,7 @@ static struct ata_port_operations ns87415_pata_ops = {
};
#if defined(CONFIG_SUPERIO)
@@ -27083,10 +28353,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_ns87415.c linux-2.6.32.49/drivers/at
.inherits = &ns87415_pata_ops,
.sff_tf_read = ns87560_tf_read,
.sff_check_status = ns87560_check_status,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_octeon_cf.c linux-2.6.32.49/drivers/ata/pata_octeon_cf.c
---- linux-2.6.32.49/drivers/ata/pata_octeon_cf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_octeon_cf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -801,6 +801,7 @@ static unsigned int octeon_cf_qc_issue(s
+diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
+index d6f6956..639295b 100644
+--- a/drivers/ata/pata_octeon_cf.c
++++ b/drivers/ata/pata_octeon_cf.c
+@@ -801,6 +801,7 @@ static unsigned int octeon_cf_qc_issue(struct ata_queued_cmd *qc)
return 0;
}
@@ -27094,10 +28365,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_octeon_cf.c linux-2.6.32.49/drivers/
static struct ata_port_operations octeon_cf_ops = {
.inherits = &ata_sff_port_ops,
.check_atapi_dma = octeon_cf_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_oldpiix.c linux-2.6.32.49/drivers/ata/pata_oldpiix.c
---- linux-2.6.32.49/drivers/ata/pata_oldpiix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_oldpiix.c 2011-11-15 19:59:43.000000000 -0500
-@@ -208,7 +208,7 @@ static struct scsi_host_template oldpiix
+diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
+index 84ac503..adee1cd 100644
+--- a/drivers/ata/pata_oldpiix.c
++++ b/drivers/ata/pata_oldpiix.c
+@@ -208,7 +208,7 @@ static struct scsi_host_template oldpiix_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27106,10 +28378,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_oldpiix.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.qc_issue = oldpiix_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_opti.c linux-2.6.32.49/drivers/ata/pata_opti.c
---- linux-2.6.32.49/drivers/ata/pata_opti.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_opti.c 2011-11-15 19:59:43.000000000 -0500
-@@ -152,7 +152,7 @@ static struct scsi_host_template opti_sh
+diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
+index 99eddda..3a4c0aa 100644
+--- a/drivers/ata/pata_opti.c
++++ b/drivers/ata/pata_opti.c
+@@ -152,7 +152,7 @@ static struct scsi_host_template opti_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27118,10 +28391,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_opti.c linux-2.6.32.49/drivers/ata/p
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = opti_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_optidma.c linux-2.6.32.49/drivers/ata/pata_optidma.c
---- linux-2.6.32.49/drivers/ata/pata_optidma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_optidma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -337,7 +337,7 @@ static struct scsi_host_template optidma
+diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
+index 86885a4..8e9968d 100644
+--- a/drivers/ata/pata_optidma.c
++++ b/drivers/ata/pata_optidma.c
+@@ -337,7 +337,7 @@ static struct scsi_host_template optidma_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27130,7 +28404,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_optidma.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = optidma_set_pio_mode,
-@@ -346,7 +346,7 @@ static struct ata_port_operations optidm
+@@ -346,7 +346,7 @@ static struct ata_port_operations optidma_port_ops = {
.prereset = optidma_pre_reset,
};
@@ -27139,10 +28413,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_optidma.c linux-2.6.32.49/drivers/at
.inherits = &optidma_port_ops,
.set_piomode = optiplus_set_pio_mode,
.set_dmamode = optiplus_set_dma_mode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_palmld.c linux-2.6.32.49/drivers/ata/pata_palmld.c
---- linux-2.6.32.49/drivers/ata/pata_palmld.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_palmld.c 2011-11-15 19:59:43.000000000 -0500
-@@ -37,7 +37,7 @@ static struct scsi_host_template palmld_
+diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c
+index 11fb4cc..1a14022 100644
+--- a/drivers/ata/pata_palmld.c
++++ b/drivers/ata/pata_palmld.c
+@@ -37,7 +37,7 @@ static struct scsi_host_template palmld_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27151,10 +28426,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_palmld.c linux-2.6.32.49/drivers/ata
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_pcmcia.c linux-2.6.32.49/drivers/ata/pata_pcmcia.c
---- linux-2.6.32.49/drivers/ata/pata_pcmcia.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_pcmcia.c 2011-11-15 19:59:43.000000000 -0500
-@@ -162,14 +162,14 @@ static struct scsi_host_template pcmcia_
+diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
+index dc99e26..7f4b1e4 100644
+--- a/drivers/ata/pata_pcmcia.c
++++ b/drivers/ata/pata_pcmcia.c
+@@ -162,14 +162,14 @@ static struct scsi_host_template pcmcia_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27171,7 +28447,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_pcmcia.c linux-2.6.32.49/drivers/ata
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_data_xfer_8bit,
.cable_detect = ata_cable_40wire,
-@@ -256,7 +256,7 @@ static int pcmcia_init_one(struct pcmcia
+@@ -256,7 +256,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
unsigned long io_base, ctl_base;
void __iomem *io_addr, *ctl_addr;
int n_ports = 1;
@@ -27180,10 +28456,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_pcmcia.c linux-2.6.32.49/drivers/ata
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (info == NULL)
-diff -urNp linux-2.6.32.49/drivers/ata/pata_pdc2027x.c linux-2.6.32.49/drivers/ata/pata_pdc2027x.c
---- linux-2.6.32.49/drivers/ata/pata_pdc2027x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_pdc2027x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -132,14 +132,14 @@ static struct scsi_host_template pdc2027
+diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
+index ca5cad0..3a1f125 100644
+--- a/drivers/ata/pata_pdc2027x.c
++++ b/drivers/ata/pata_pdc2027x.c
+@@ -132,14 +132,14 @@ static struct scsi_host_template pdc2027x_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27200,10 +28477,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_pdc2027x.c linux-2.6.32.49/drivers/a
.inherits = &pdc2027x_pata100_ops,
.mode_filter = pdc2027x_mode_filter,
.set_piomode = pdc2027x_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c
---- linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c 2011-11-15 19:59:43.000000000 -0500
-@@ -274,7 +274,7 @@ static struct scsi_host_template pdc202x
+diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
+index 2911120..4bf62aa 100644
+--- a/drivers/ata/pata_pdc202xx_old.c
++++ b/drivers/ata/pata_pdc202xx_old.c
+@@ -274,7 +274,7 @@ static struct scsi_host_template pdc202xx_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27212,7 +28490,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c linux-2.6.32.49/drive
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
-@@ -284,7 +284,7 @@ static struct ata_port_operations pdc202
+@@ -284,7 +284,7 @@ static struct ata_port_operations pdc2024x_port_ops = {
.sff_exec_command = pdc202xx_exec_command,
};
@@ -27221,10 +28499,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_pdc202xx_old.c linux-2.6.32.49/drive
.inherits = &pdc2024x_port_ops,
.check_atapi_dma = pdc2026x_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_platform.c linux-2.6.32.49/drivers/ata/pata_platform.c
---- linux-2.6.32.49/drivers/ata/pata_platform.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_platform.c 2011-11-15 19:59:43.000000000 -0500
-@@ -48,7 +48,7 @@ static struct scsi_host_template pata_pl
+diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
+index 3f6ebc6..a18c358 100644
+--- a/drivers/ata/pata_platform.c
++++ b/drivers/ata/pata_platform.c
+@@ -48,7 +48,7 @@ static struct scsi_host_template pata_platform_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27233,10 +28512,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_platform.c linux-2.6.32.49/drivers/a
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
.cable_detect = ata_cable_unknown,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_qdi.c linux-2.6.32.49/drivers/ata/pata_qdi.c
---- linux-2.6.32.49/drivers/ata/pata_qdi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_qdi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -157,7 +157,7 @@ static struct scsi_host_template qdi_sht
+diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
+index 45879dc..165a9f9 100644
+--- a/drivers/ata/pata_qdi.c
++++ b/drivers/ata/pata_qdi.c
+@@ -157,7 +157,7 @@ static struct scsi_host_template qdi_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27245,7 +28525,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_qdi.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_sff_port_ops,
.qc_issue = qdi_qc_issue,
.sff_data_xfer = qdi_data_xfer,
-@@ -165,7 +165,7 @@ static struct ata_port_operations qdi650
+@@ -165,7 +165,7 @@ static struct ata_port_operations qdi6500_port_ops = {
.set_piomode = qdi6500_set_piomode,
};
@@ -27254,10 +28534,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_qdi.c linux-2.6.32.49/drivers/ata/pa
.inherits = &qdi6500_port_ops,
.set_piomode = qdi6580_set_piomode,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_radisys.c linux-2.6.32.49/drivers/ata/pata_radisys.c
---- linux-2.6.32.49/drivers/ata/pata_radisys.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_radisys.c 2011-11-15 19:59:43.000000000 -0500
-@@ -187,7 +187,7 @@ static struct scsi_host_template radisys
+diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
+index 4401b33..716c5cc 100644
+--- a/drivers/ata/pata_radisys.c
++++ b/drivers/ata/pata_radisys.c
+@@ -187,7 +187,7 @@ static struct scsi_host_template radisys_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27266,10 +28547,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_radisys.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.qc_issue = radisys_qc_issue,
.cable_detect = ata_cable_unknown,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_rb532_cf.c linux-2.6.32.49/drivers/ata/pata_rb532_cf.c
---- linux-2.6.32.49/drivers/ata/pata_rb532_cf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_rb532_cf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -68,7 +68,7 @@ static irqreturn_t rb532_pata_irq_handle
+diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
+index 45f1e10..fab6bca 100644
+--- a/drivers/ata/pata_rb532_cf.c
++++ b/drivers/ata/pata_rb532_cf.c
+@@ -68,7 +68,7 @@ static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
return IRQ_HANDLED;
}
@@ -27278,10 +28560,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_rb532_cf.c linux-2.6.32.49/drivers/a
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer32,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_rdc.c linux-2.6.32.49/drivers/ata/pata_rdc.c
---- linux-2.6.32.49/drivers/ata/pata_rdc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_rdc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -272,7 +272,7 @@ static void rdc_set_dmamode(struct ata_p
+diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
+index c843a1e..b5853c3 100644
+--- a/drivers/ata/pata_rdc.c
++++ b/drivers/ata/pata_rdc.c
+@@ -272,7 +272,7 @@ static void rdc_set_dmamode(struct ata_port *ap, struct ata_device *adev)
pci_write_config_byte(dev, 0x48, udma_enable);
}
@@ -27290,10 +28573,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_rdc.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_bmdma32_port_ops,
.cable_detect = rdc_pata_cable_detect,
.set_piomode = rdc_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_rz1000.c linux-2.6.32.49/drivers/ata/pata_rz1000.c
---- linux-2.6.32.49/drivers/ata/pata_rz1000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_rz1000.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,7 +54,7 @@ static struct scsi_host_template rz1000_
+diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
+index a5e4dfe..080c8c9 100644
+--- a/drivers/ata/pata_rz1000.c
++++ b/drivers/ata/pata_rz1000.c
+@@ -54,7 +54,7 @@ static struct scsi_host_template rz1000_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27302,10 +28586,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_rz1000.c linux-2.6.32.49/drivers/ata
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_mode = rz1000_set_mode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_sc1200.c linux-2.6.32.49/drivers/ata/pata_sc1200.c
---- linux-2.6.32.49/drivers/ata/pata_sc1200.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_sc1200.c 2011-11-15 19:59:43.000000000 -0500
-@@ -207,7 +207,7 @@ static struct scsi_host_template sc1200_
+diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
+index 3bbed83..e309daf 100644
+--- a/drivers/ata/pata_sc1200.c
++++ b/drivers/ata/pata_sc1200.c
+@@ -207,7 +207,7 @@ static struct scsi_host_template sc1200_sht = {
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
@@ -27314,10 +28599,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_sc1200.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_sff_dumb_qc_prep,
.qc_issue = sc1200_qc_issue,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_scc.c linux-2.6.32.49/drivers/ata/pata_scc.c
---- linux-2.6.32.49/drivers/ata/pata_scc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_scc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -965,7 +965,7 @@ static struct scsi_host_template scc_sht
+diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
+index 4257d6b..4c1d9d5 100644
+--- a/drivers/ata/pata_scc.c
++++ b/drivers/ata/pata_scc.c
+@@ -965,7 +965,7 @@ static struct scsi_host_template scc_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27326,10 +28612,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_scc.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_bmdma_port_ops,
.set_piomode = scc_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_sch.c linux-2.6.32.49/drivers/ata/pata_sch.c
---- linux-2.6.32.49/drivers/ata/pata_sch.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_sch.c 2011-11-15 19:59:43.000000000 -0500
-@@ -75,7 +75,7 @@ static struct scsi_host_template sch_sht
+diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
+index 99cceb4..e2e0a87 100644
+--- a/drivers/ata/pata_sch.c
++++ b/drivers/ata/pata_sch.c
+@@ -75,7 +75,7 @@ static struct scsi_host_template sch_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27338,10 +28625,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_sch.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_piomode = sch_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_serverworks.c linux-2.6.32.49/drivers/ata/pata_serverworks.c
---- linux-2.6.32.49/drivers/ata/pata_serverworks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_serverworks.c 2011-11-15 19:59:43.000000000 -0500
-@@ -299,7 +299,7 @@ static struct scsi_host_template serverw
+diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
+index beaed12..39969f1 100644
+--- a/drivers/ata/pata_serverworks.c
++++ b/drivers/ata/pata_serverworks.c
+@@ -299,7 +299,7 @@ static struct scsi_host_template serverworks_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27350,7 +28638,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_serverworks.c linux-2.6.32.49/driver
.inherits = &ata_bmdma_port_ops,
.cable_detect = serverworks_cable_detect,
.mode_filter = serverworks_osb4_filter,
-@@ -307,7 +307,7 @@ static struct ata_port_operations server
+@@ -307,7 +307,7 @@ static struct ata_port_operations serverworks_osb4_port_ops = {
.set_dmamode = serverworks_set_dmamode,
};
@@ -27359,10 +28647,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_serverworks.c linux-2.6.32.49/driver
.inherits = &serverworks_osb4_port_ops,
.mode_filter = serverworks_csb_filter,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_sil680.c linux-2.6.32.49/drivers/ata/pata_sil680.c
---- linux-2.6.32.49/drivers/ata/pata_sil680.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_sil680.c 2011-11-15 19:59:43.000000000 -0500
-@@ -194,7 +194,7 @@ static struct scsi_host_template sil680_
+diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
+index a2ace48..0463b44 100644
+--- a/drivers/ata/pata_sil680.c
++++ b/drivers/ata/pata_sil680.c
+@@ -194,7 +194,7 @@ static struct scsi_host_template sil680_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27371,10 +28660,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_sil680.c linux-2.6.32.49/drivers/ata
.inherits = &ata_bmdma32_port_ops,
.cable_detect = sil680_cable_detect,
.set_piomode = sil680_set_piomode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_sis.c linux-2.6.32.49/drivers/ata/pata_sis.c
---- linux-2.6.32.49/drivers/ata/pata_sis.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_sis.c 2011-11-15 19:59:43.000000000 -0500
-@@ -503,47 +503,47 @@ static struct scsi_host_template sis_sht
+diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
+index 488e77b..b3724d5 100644
+--- a/drivers/ata/pata_sis.c
++++ b/drivers/ata/pata_sis.c
+@@ -503,47 +503,47 @@ static struct scsi_host_template sis_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27429,10 +28719,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_sis.c linux-2.6.32.49/drivers/ata/pa
.inherits = &sis_base_ops,
.set_piomode = sis_old_set_piomode,
.set_dmamode = sis_old_set_dmamode,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_sl82c105.c linux-2.6.32.49/drivers/ata/pata_sl82c105.c
---- linux-2.6.32.49/drivers/ata/pata_sl82c105.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_sl82c105.c 2011-11-15 19:59:43.000000000 -0500
-@@ -231,7 +231,7 @@ static struct scsi_host_template sl82c10
+diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
+index 29f733c..43e9ca0 100644
+--- a/drivers/ata/pata_sl82c105.c
++++ b/drivers/ata/pata_sl82c105.c
+@@ -231,7 +231,7 @@ static struct scsi_host_template sl82c105_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27441,10 +28732,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_sl82c105.c linux-2.6.32.49/drivers/a
.inherits = &ata_bmdma_port_ops,
.qc_defer = sl82c105_qc_defer,
.bmdma_start = sl82c105_bmdma_start,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_triflex.c linux-2.6.32.49/drivers/ata/pata_triflex.c
---- linux-2.6.32.49/drivers/ata/pata_triflex.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_triflex.c 2011-11-15 19:59:43.000000000 -0500
-@@ -178,7 +178,7 @@ static struct scsi_host_template triflex
+diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
+index f1f13ff..df39e99 100644
+--- a/drivers/ata/pata_triflex.c
++++ b/drivers/ata/pata_triflex.c
+@@ -178,7 +178,7 @@ static struct scsi_host_template triflex_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27453,10 +28745,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_triflex.c linux-2.6.32.49/drivers/at
.inherits = &ata_bmdma_port_ops,
.bmdma_start = triflex_bmdma_start,
.bmdma_stop = triflex_bmdma_stop,
-diff -urNp linux-2.6.32.49/drivers/ata/pata_via.c linux-2.6.32.49/drivers/ata/pata_via.c
---- linux-2.6.32.49/drivers/ata/pata_via.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_via.c 2011-11-15 19:59:43.000000000 -0500
-@@ -419,7 +419,7 @@ static struct scsi_host_template via_sht
+diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
+index 1d73b8d..98a4b29 100644
+--- a/drivers/ata/pata_via.c
++++ b/drivers/ata/pata_via.c
+@@ -419,7 +419,7 @@ static struct scsi_host_template via_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27465,7 +28758,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_via.c linux-2.6.32.49/drivers/ata/pa
.inherits = &ata_bmdma_port_ops,
.cable_detect = via_cable_detect,
.set_piomode = via_set_piomode,
-@@ -429,7 +429,7 @@ static struct ata_port_operations via_po
+@@ -429,7 +429,7 @@ static struct ata_port_operations via_port_ops = {
.port_start = via_port_start,
};
@@ -27474,10 +28767,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_via.c linux-2.6.32.49/drivers/ata/pa
.inherits = &via_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
};
-diff -urNp linux-2.6.32.49/drivers/ata/pata_winbond.c linux-2.6.32.49/drivers/ata/pata_winbond.c
---- linux-2.6.32.49/drivers/ata/pata_winbond.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pata_winbond.c 2011-11-15 19:59:43.000000000 -0500
-@@ -125,7 +125,7 @@ static struct scsi_host_template winbond
+diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
+index 6d8619b..ad511c4 100644
+--- a/drivers/ata/pata_winbond.c
++++ b/drivers/ata/pata_winbond.c
+@@ -125,7 +125,7 @@ static struct scsi_host_template winbond_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -27486,10 +28780,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pata_winbond.c linux-2.6.32.49/drivers/at
.inherits = &ata_sff_port_ops,
.sff_data_xfer = winbond_data_xfer,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.32.49/drivers/ata/pdc_adma.c linux-2.6.32.49/drivers/ata/pdc_adma.c
---- linux-2.6.32.49/drivers/ata/pdc_adma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/pdc_adma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -145,7 +145,7 @@ static struct scsi_host_template adma_at
+diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
+index 6c65b07..f996ec7 100644
+--- a/drivers/ata/pdc_adma.c
++++ b/drivers/ata/pdc_adma.c
+@@ -145,7 +145,7 @@ static struct scsi_host_template adma_ata_sht = {
.dma_boundary = ADMA_DMA_BOUNDARY,
};
@@ -27498,10 +28793,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/pdc_adma.c linux-2.6.32.49/drivers/ata/pd
.inherits = &ata_sff_port_ops,
.lost_interrupt = ATA_OP_NULL,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_fsl.c linux-2.6.32.49/drivers/ata/sata_fsl.c
---- linux-2.6.32.49/drivers/ata/sata_fsl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_fsl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1258,7 +1258,7 @@ static struct scsi_host_template sata_fs
+diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
+index 172b57e..c49bc1e 100644
+--- a/drivers/ata/sata_fsl.c
++++ b/drivers/ata/sata_fsl.c
+@@ -1258,7 +1258,7 @@ static struct scsi_host_template sata_fsl_sht = {
.dma_boundary = ATA_DMA_BOUNDARY,
};
@@ -27510,10 +28806,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_fsl.c linux-2.6.32.49/drivers/ata/sa
.inherits = &sata_pmp_port_ops,
.qc_defer = ata_std_qc_defer,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_inic162x.c linux-2.6.32.49/drivers/ata/sata_inic162x.c
---- linux-2.6.32.49/drivers/ata/sata_inic162x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_inic162x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -721,7 +721,7 @@ static int inic_port_start(struct ata_po
+diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
+index 4406902..60603ef 100644
+--- a/drivers/ata/sata_inic162x.c
++++ b/drivers/ata/sata_inic162x.c
+@@ -721,7 +721,7 @@ static int inic_port_start(struct ata_port *ap)
return 0;
}
@@ -27522,10 +28819,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_inic162x.c linux-2.6.32.49/drivers/a
.inherits = &sata_port_ops,
.check_atapi_dma = inic_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_mv.c linux-2.6.32.49/drivers/ata/sata_mv.c
---- linux-2.6.32.49/drivers/ata/sata_mv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_mv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -656,7 +656,7 @@ static struct scsi_host_template mv6_sht
+diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
+index cf41126..8107be6 100644
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -656,7 +656,7 @@ static struct scsi_host_template mv6_sht = {
.dma_boundary = MV_DMA_BOUNDARY,
};
@@ -27534,7 +28832,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_mv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &ata_sff_port_ops,
.lost_interrupt = ATA_OP_NULL,
-@@ -678,7 +678,7 @@ static struct ata_port_operations mv5_op
+@@ -678,7 +678,7 @@ static struct ata_port_operations mv5_ops = {
.port_stop = mv_port_stop,
};
@@ -27543,7 +28841,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_mv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &mv5_ops,
.dev_config = mv6_dev_config,
.scr_read = mv_scr_read,
-@@ -698,7 +698,7 @@ static struct ata_port_operations mv6_op
+@@ -698,7 +698,7 @@ static struct ata_port_operations mv6_ops = {
.bmdma_status = mv_bmdma_status,
};
@@ -27552,10 +28850,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_mv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &mv6_ops,
.dev_config = ATA_OP_NULL,
.qc_prep = mv_qc_prep_iie,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_nv.c linux-2.6.32.49/drivers/ata/sata_nv.c
---- linux-2.6.32.49/drivers/ata/sata_nv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_nv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -464,7 +464,7 @@ static struct scsi_host_template nv_swnc
+diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
+index ae2297c..d5c9c33 100644
+--- a/drivers/ata/sata_nv.c
++++ b/drivers/ata/sata_nv.c
+@@ -464,7 +464,7 @@ static struct scsi_host_template nv_swncq_sht = {
* cases. Define nv_hardreset() which only kicks in for post-boot
* probing and use it for all variants.
*/
@@ -27564,7 +28863,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_nv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &ata_bmdma_port_ops,
.lost_interrupt = ATA_OP_NULL,
.scr_read = nv_scr_read,
-@@ -472,20 +472,20 @@ static struct ata_port_operations nv_gen
+@@ -472,20 +472,20 @@ static struct ata_port_operations nv_generic_ops = {
.hardreset = nv_hardreset,
};
@@ -27588,7 +28887,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_nv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &nv_ck804_ops,
.check_atapi_dma = nv_adma_check_atapi_dma,
-@@ -509,7 +509,7 @@ static struct ata_port_operations nv_adm
+@@ -509,7 +509,7 @@ static struct ata_port_operations nv_adma_ops = {
.host_stop = nv_adma_host_stop,
};
@@ -27597,10 +28896,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_nv.c linux-2.6.32.49/drivers/ata/sat
.inherits = &nv_generic_ops,
.qc_defer = ata_std_qc_defer,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_promise.c linux-2.6.32.49/drivers/ata/sata_promise.c
---- linux-2.6.32.49/drivers/ata/sata_promise.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_promise.c 2011-11-15 19:59:43.000000000 -0500
-@@ -195,7 +195,7 @@ static const struct ata_port_operations
+diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
+index 07d8d00..6cc70bb 100644
+--- a/drivers/ata/sata_promise.c
++++ b/drivers/ata/sata_promise.c
+@@ -195,7 +195,7 @@ static const struct ata_port_operations pdc_common_ops = {
.error_handler = pdc_error_handler,
};
@@ -27609,7 +28909,7 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_promise.c linux-2.6.32.49/drivers/at
.inherits = &pdc_common_ops,
.cable_detect = pdc_sata_cable_detect,
.freeze = pdc_sata_freeze,
-@@ -208,14 +208,14 @@ static struct ata_port_operations pdc_sa
+@@ -208,14 +208,14 @@ static struct ata_port_operations pdc_sata_ops = {
/* First-generation chips need a more restrictive ->check_atapi_dma op,
and ->freeze/thaw that ignore the hotplug controls. */
@@ -27626,10 +28926,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_promise.c linux-2.6.32.49/drivers/at
.inherits = &pdc_common_ops,
.cable_detect = pdc_pata_cable_detect,
.freeze = pdc_freeze,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_qstor.c linux-2.6.32.49/drivers/ata/sata_qstor.c
---- linux-2.6.32.49/drivers/ata/sata_qstor.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_qstor.c 2011-11-15 19:59:43.000000000 -0500
-@@ -132,7 +132,7 @@ static struct scsi_host_template qs_ata_
+diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
+index 326c0cf..36ecebe 100644
+--- a/drivers/ata/sata_qstor.c
++++ b/drivers/ata/sata_qstor.c
+@@ -132,7 +132,7 @@ static struct scsi_host_template qs_ata_sht = {
.dma_boundary = QS_DMA_BOUNDARY,
};
@@ -27638,22 +28939,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_qstor.c linux-2.6.32.49/drivers/ata/
.inherits = &ata_sff_port_ops,
.check_atapi_dma = qs_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_sil24.c linux-2.6.32.49/drivers/ata/sata_sil24.c
---- linux-2.6.32.49/drivers/ata/sata_sil24.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_sil24.c 2011-11-15 19:59:43.000000000 -0500
-@@ -388,7 +388,7 @@ static struct scsi_host_template sil24_s
- .dma_boundary = ATA_DMA_BOUNDARY,
- };
-
--static struct ata_port_operations sil24_ops = {
-+static const struct ata_port_operations sil24_ops = {
- .inherits = &sata_pmp_port_ops,
-
- .qc_defer = sil24_qc_defer,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_sil.c linux-2.6.32.49/drivers/ata/sata_sil.c
---- linux-2.6.32.49/drivers/ata/sata_sil.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_sil.c 2011-11-15 19:59:43.000000000 -0500
-@@ -182,7 +182,7 @@ static struct scsi_host_template sil_sht
+diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
+index 3cb69d5..0871d3c 100644
+--- a/drivers/ata/sata_sil.c
++++ b/drivers/ata/sata_sil.c
+@@ -182,7 +182,7 @@ static struct scsi_host_template sil_sht = {
.sg_tablesize = ATA_MAX_PRD
};
@@ -27662,10 +28952,24 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_sil.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_bmdma32_port_ops,
.dev_config = sil_dev_config,
.set_mode = sil_set_mode,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_sis.c linux-2.6.32.49/drivers/ata/sata_sis.c
---- linux-2.6.32.49/drivers/ata/sata_sis.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_sis.c 2011-11-15 19:59:43.000000000 -0500
-@@ -89,7 +89,7 @@ static struct scsi_host_template sis_sht
+diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
+index e6946fc..eddb794 100644
+--- a/drivers/ata/sata_sil24.c
++++ b/drivers/ata/sata_sil24.c
+@@ -388,7 +388,7 @@ static struct scsi_host_template sil24_sht = {
+ .dma_boundary = ATA_DMA_BOUNDARY,
+ };
+
+-static struct ata_port_operations sil24_ops = {
++static const struct ata_port_operations sil24_ops = {
+ .inherits = &sata_pmp_port_ops,
+
+ .qc_defer = sil24_qc_defer,
+diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
+index f8a91bf..9cb06b6 100644
+--- a/drivers/ata/sata_sis.c
++++ b/drivers/ata/sata_sis.c
+@@ -89,7 +89,7 @@ static struct scsi_host_template sis_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27674,10 +28978,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_sis.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_bmdma_port_ops,
.scr_read = sis_scr_read,
.scr_write = sis_scr_write,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_svw.c linux-2.6.32.49/drivers/ata/sata_svw.c
---- linux-2.6.32.49/drivers/ata/sata_svw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_svw.c 2011-11-15 19:59:43.000000000 -0500
-@@ -344,7 +344,7 @@ static struct scsi_host_template k2_sata
+diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
+index 7257f2d..d04c6f5 100644
+--- a/drivers/ata/sata_svw.c
++++ b/drivers/ata/sata_svw.c
+@@ -344,7 +344,7 @@ static struct scsi_host_template k2_sata_sht = {
};
@@ -27686,10 +28991,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_svw.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_bmdma_port_ops,
.sff_tf_load = k2_sata_tf_load,
.sff_tf_read = k2_sata_tf_read,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_sx4.c linux-2.6.32.49/drivers/ata/sata_sx4.c
---- linux-2.6.32.49/drivers/ata/sata_sx4.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_sx4.c 2011-11-15 19:59:43.000000000 -0500
-@@ -248,7 +248,7 @@ static struct scsi_host_template pdc_sat
+diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
+index bbcf970..cd0df0d 100644
+--- a/drivers/ata/sata_sx4.c
++++ b/drivers/ata/sata_sx4.c
+@@ -248,7 +248,7 @@ static struct scsi_host_template pdc_sata_sht = {
};
/* TODO: inherit from base port_ops after converting to new EH */
@@ -27698,10 +29004,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_sx4.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_sff_port_ops,
.check_atapi_dma = pdc_check_atapi_dma,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_uli.c linux-2.6.32.49/drivers/ata/sata_uli.c
---- linux-2.6.32.49/drivers/ata/sata_uli.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_uli.c 2011-11-15 19:59:43.000000000 -0500
-@@ -79,7 +79,7 @@ static struct scsi_host_template uli_sht
+diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
+index e5bff47..089d859 100644
+--- a/drivers/ata/sata_uli.c
++++ b/drivers/ata/sata_uli.c
+@@ -79,7 +79,7 @@ static struct scsi_host_template uli_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27710,10 +29017,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_uli.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_bmdma_port_ops,
.scr_read = uli_scr_read,
.scr_write = uli_scr_write,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_via.c linux-2.6.32.49/drivers/ata/sata_via.c
---- linux-2.6.32.49/drivers/ata/sata_via.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_via.c 2011-11-15 19:59:43.000000000 -0500
-@@ -115,32 +115,32 @@ static struct scsi_host_template svia_sh
+diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
+index f5dcca7..77b94eb 100644
+--- a/drivers/ata/sata_via.c
++++ b/drivers/ata/sata_via.c
+@@ -115,32 +115,32 @@ static struct scsi_host_template svia_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -27751,10 +29059,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_via.c linux-2.6.32.49/drivers/ata/sa
.inherits = &svia_base_ops,
.hardreset = sata_std_hardreset,
.scr_read = vt8251_scr_read,
-diff -urNp linux-2.6.32.49/drivers/ata/sata_vsc.c linux-2.6.32.49/drivers/ata/sata_vsc.c
---- linux-2.6.32.49/drivers/ata/sata_vsc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ata/sata_vsc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -306,7 +306,7 @@ static struct scsi_host_template vsc_sat
+diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
+index 8b2a278..51e65d3 100644
+--- a/drivers/ata/sata_vsc.c
++++ b/drivers/ata/sata_vsc.c
+@@ -306,7 +306,7 @@ static struct scsi_host_template vsc_sata_sht = {
};
@@ -27763,10 +29072,11 @@ diff -urNp linux-2.6.32.49/drivers/ata/sata_vsc.c linux-2.6.32.49/drivers/ata/sa
.inherits = &ata_bmdma_port_ops,
/* The IRQ handling is not quite standard SFF behaviour so we
cannot use the default lost interrupt handler */
-diff -urNp linux-2.6.32.49/drivers/atm/adummy.c linux-2.6.32.49/drivers/atm/adummy.c
---- linux-2.6.32.49/drivers/atm/adummy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/adummy.c 2011-11-15 19:59:43.000000000 -0500
-@@ -77,7 +77,7 @@ adummy_send(struct atm_vcc *vcc, struct
+diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
+index 5effec6..7e4019a 100644
+--- a/drivers/atm/adummy.c
++++ b/drivers/atm/adummy.c
+@@ -77,7 +77,7 @@ adummy_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -27775,10 +29085,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/adummy.c linux-2.6.32.49/drivers/atm/adum
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/atm/ambassador.c linux-2.6.32.49/drivers/atm/ambassador.c
---- linux-2.6.32.49/drivers/atm/ambassador.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/ambassador.c 2011-11-15 19:59:43.000000000 -0500
-@@ -453,7 +453,7 @@ static void tx_complete (amb_dev * dev,
+diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
+index 66e1813..26a27c6 100644
+--- a/drivers/atm/ambassador.c
++++ b/drivers/atm/ambassador.c
+@@ -453,7 +453,7 @@ static void tx_complete (amb_dev * dev, tx_out * tx) {
PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx);
// VC layer stats
@@ -27787,7 +29098,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/ambassador.c linux-2.6.32.49/drivers/atm/
// free the descriptor
kfree (tx_descr);
-@@ -494,7 +494,7 @@ static void rx_complete (amb_dev * dev,
+@@ -494,7 +494,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
dump_skb ("<<<", vc, skb);
// VC layer stats
@@ -27796,7 +29107,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/ambassador.c linux-2.6.32.49/drivers/atm/
__net_timestamp(skb);
// end of our responsability
atm_vcc->push (atm_vcc, skb);
-@@ -509,7 +509,7 @@ static void rx_complete (amb_dev * dev,
+@@ -509,7 +509,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
} else {
PRINTK (KERN_INFO, "dropped over-size frame");
// should we count this?
@@ -27805,7 +29116,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/ambassador.c linux-2.6.32.49/drivers/atm/
}
} else {
-@@ -1341,7 +1341,7 @@ static int amb_send (struct atm_vcc * at
+@@ -1341,7 +1341,7 @@ static int amb_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
}
if (check_area (skb->data, skb->len)) {
@@ -27814,10 +29125,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/ambassador.c linux-2.6.32.49/drivers/atm/
return -ENOMEM; // ?
}
-diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmtcp.c
---- linux-2.6.32.49/drivers/atm/atmtcp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/atmtcp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -206,7 +206,7 @@ static int atmtcp_v_send(struct atm_vcc
+diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
+index 02ad83d..6daffeb 100644
+--- a/drivers/atm/atmtcp.c
++++ b/drivers/atm/atmtcp.c
+@@ -206,7 +206,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
if (dev_data) return 0;
@@ -27826,7 +29138,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmt
return -ENOLINK;
}
size = skb->len+sizeof(struct atmtcp_hdr);
-@@ -214,7 +214,7 @@ static int atmtcp_v_send(struct atm_vcc
+@@ -214,7 +214,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (!new_skb) {
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
@@ -27835,7 +29147,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmt
return -ENOBUFS;
}
hdr = (void *) skb_put(new_skb,sizeof(struct atmtcp_hdr));
-@@ -225,8 +225,8 @@ static int atmtcp_v_send(struct atm_vcc
+@@ -225,8 +225,8 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
out_vcc->push(out_vcc,new_skb);
@@ -27846,7 +29158,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmt
return 0;
}
-@@ -300,7 +300,7 @@ static int atmtcp_c_send(struct atm_vcc
+@@ -300,7 +300,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci));
read_unlock(&vcc_sklist_lock);
if (!out_vcc) {
@@ -27855,7 +29167,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmt
goto done;
}
skb_pull(skb,sizeof(struct atmtcp_hdr));
-@@ -312,8 +312,8 @@ static int atmtcp_c_send(struct atm_vcc
+@@ -312,8 +312,8 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
__net_timestamp(new_skb);
skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
out_vcc->push(out_vcc,new_skb);
@@ -27866,9 +29178,10 @@ diff -urNp linux-2.6.32.49/drivers/atm/atmtcp.c linux-2.6.32.49/drivers/atm/atmt
done:
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
-diff -urNp linux-2.6.32.49/drivers/atm/eni.c linux-2.6.32.49/drivers/atm/eni.c
---- linux-2.6.32.49/drivers/atm/eni.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/eni.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
+index 0c30261..3da356e 100644
+--- a/drivers/atm/eni.c
++++ b/drivers/atm/eni.c
@@ -525,7 +525,7 @@ static int rx_aal0(struct atm_vcc *vcc)
DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
vcc->dev->number);
@@ -27905,7 +29218,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/eni.c linux-2.6.32.49/drivers/atm/eni.c
}
wake_up(&eni_dev->rx_wait);
}
-@@ -1227,7 +1227,7 @@ static void dequeue_tx(struct atm_dev *d
+@@ -1227,7 +1227,7 @@ static void dequeue_tx(struct atm_dev *dev)
PCI_DMA_TODEVICE);
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb_irq(skb);
@@ -27923,10 +29236,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/eni.c linux-2.6.32.49/drivers/atm/eni.c
"MMF", "SMF", "MMF", "03?", /* 0- 3 */
"UTP", "05?", "06?", "07?", /* 4- 7 */
"TAXI","09?", "10?", "11?", /* 8-11 */
-diff -urNp linux-2.6.32.49/drivers/atm/firestream.c linux-2.6.32.49/drivers/atm/firestream.c
---- linux-2.6.32.49/drivers/atm/firestream.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/firestream.c 2011-11-15 19:59:43.000000000 -0500
-@@ -748,7 +748,7 @@ static void process_txdone_queue (struct
+diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
+index cd5049a..a51209f 100644
+--- a/drivers/atm/firestream.c
++++ b/drivers/atm/firestream.c
+@@ -748,7 +748,7 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q)
}
}
@@ -27935,7 +29249,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/firestream.c linux-2.6.32.49/drivers/atm/
fs_dprintk (FS_DEBUG_TXMEM, "i");
fs_dprintk (FS_DEBUG_ALLOC, "Free t-skb: %p\n", skb);
-@@ -815,7 +815,7 @@ static void process_incoming (struct fs_
+@@ -815,7 +815,7 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
#endif
skb_put (skb, qe->p1 & 0xffff);
ATM_SKB(skb)->vcc = atm_vcc;
@@ -27944,7 +29258,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/firestream.c linux-2.6.32.49/drivers/atm/
__net_timestamp(skb);
fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb);
atm_vcc->push (atm_vcc, skb);
-@@ -836,12 +836,12 @@ static void process_incoming (struct fs_
+@@ -836,12 +836,12 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
kfree (pe);
}
if (atm_vcc)
@@ -27959,10 +29273,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/firestream.c linux-2.6.32.49/drivers/atm/
break;
default: /* Hmm. Haven't written the code to handle the others yet... -- REW */
printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n",
-diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fore200e.c
---- linux-2.6.32.49/drivers/atm/fore200e.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/fore200e.c 2011-11-15 19:59:43.000000000 -0500
-@@ -931,9 +931,9 @@ fore200e_tx_irq(struct fore200e* fore200
+diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
+index f766cc4..a34002e 100644
+--- a/drivers/atm/fore200e.c
++++ b/drivers/atm/fore200e.c
+@@ -931,9 +931,9 @@ fore200e_tx_irq(struct fore200e* fore200e)
#endif
/* check error condition */
if (*entry->status & STATUS_ERROR)
@@ -27974,7 +29289,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fo
}
}
-@@ -1082,7 +1082,7 @@ fore200e_push_rpd(struct fore200e* fore2
+@@ -1082,7 +1082,7 @@ fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rp
if (skb == NULL) {
DPRINTK(2, "unable to alloc new skb, rx PDU length = %d\n", pdu_len);
@@ -27983,7 +29298,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fo
return -ENOMEM;
}
-@@ -1125,14 +1125,14 @@ fore200e_push_rpd(struct fore200e* fore2
+@@ -1125,14 +1125,14 @@ fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rp
dev_kfree_skb_any(skb);
@@ -28000,7 +29315,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fo
ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0);
-@@ -1210,7 +1210,7 @@ fore200e_rx_irq(struct fore200e* fore200
+@@ -1210,7 +1210,7 @@ fore200e_rx_irq(struct fore200e* fore200e)
DPRINTK(2, "damaged PDU on %d.%d.%d\n",
fore200e->atm_dev->number,
entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci);
@@ -28009,7 +29324,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fo
}
}
-@@ -1655,7 +1655,7 @@ fore200e_send(struct atm_vcc *vcc, struc
+@@ -1655,7 +1655,7 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
goto retry_here;
}
@@ -28018,10 +29333,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/fore200e.c linux-2.6.32.49/drivers/atm/fo
fore200e->tx_sat++;
DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
-diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
---- linux-2.6.32.49/drivers/atm/he.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/he.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1769,7 +1769,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+diff --git a/drivers/atm/he.c b/drivers/atm/he.c
+index 7066703..2b130de 100644
+--- a/drivers/atm/he.c
++++ b/drivers/atm/he.c
+@@ -1769,7 +1769,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
hprintk("HBUF_ERR! (cid 0x%x)\n", cid);
@@ -28030,7 +29346,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
goto return_host_buffers;
}
-@@ -1802,7 +1802,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+@@ -1802,7 +1802,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
RBRQ_LEN_ERR(he_dev->rbrq_head)
? "LEN_ERR" : "",
vcc->vpi, vcc->vci);
@@ -28039,7 +29355,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
goto return_host_buffers;
}
-@@ -1861,7 +1861,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+@@ -1861,7 +1861,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
vcc->push(vcc, skb);
spin_lock(&he_dev->global_lock);
@@ -28048,7 +29364,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
return_host_buffers:
++pdus_assembled;
-@@ -2206,7 +2206,7 @@ __enqueue_tpd(struct he_dev *he_dev, str
+@@ -2206,7 +2206,7 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
tpd->vcc->pop(tpd->vcc, tpd->skb);
else
dev_kfree_skb_any(tpd->skb);
@@ -28057,7 +29373,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
}
pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
return;
-@@ -2618,7 +2618,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2618,7 +2618,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -28066,7 +29382,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
return -EINVAL;
}
-@@ -2629,7 +2629,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2629,7 +2629,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -28075,7 +29391,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
return -EINVAL;
}
#endif
-@@ -2641,7 +2641,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2641,7 +2641,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -28084,7 +29400,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
spin_unlock_irqrestore(&he_dev->global_lock, flags);
return -ENOMEM;
}
-@@ -2683,7 +2683,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2683,7 +2683,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -28093,7 +29409,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
spin_unlock_irqrestore(&he_dev->global_lock, flags);
return -ENOMEM;
}
-@@ -2714,7 +2714,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2714,7 +2714,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
__enqueue_tpd(he_dev, tpd, cid);
spin_unlock_irqrestore(&he_dev->global_lock, flags);
@@ -28102,10 +29418,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/he.c linux-2.6.32.49/drivers/atm/he.c
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/atm/horizon.c linux-2.6.32.49/drivers/atm/horizon.c
---- linux-2.6.32.49/drivers/atm/horizon.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/horizon.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1033,7 +1033,7 @@ static void rx_schedule (hrz_dev * dev,
+diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
+index 4e49021..01b1512 100644
+--- a/drivers/atm/horizon.c
++++ b/drivers/atm/horizon.c
+@@ -1033,7 +1033,7 @@ static void rx_schedule (hrz_dev * dev, int irq) {
{
struct atm_vcc * vcc = ATM_SKB(skb)->vcc;
// VC layer stats
@@ -28114,7 +29431,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/horizon.c linux-2.6.32.49/drivers/atm/hor
__net_timestamp(skb);
// end of our responsability
vcc->push (vcc, skb);
-@@ -1185,7 +1185,7 @@ static void tx_schedule (hrz_dev * const
+@@ -1185,7 +1185,7 @@ static void tx_schedule (hrz_dev * const dev, int irq) {
dev->tx_iovec = NULL;
// VC layer stats
@@ -28123,10 +29440,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/horizon.c linux-2.6.32.49/drivers/atm/hor
// free the skb
hrz_kfree_skb (skb);
-diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/idt77252.c
---- linux-2.6.32.49/drivers/atm/idt77252.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/idt77252.c 2011-11-15 19:59:43.000000000 -0500
-@@ -810,7 +810,7 @@ drain_scq(struct idt77252_dev *card, str
+diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
+index e33ae00..9deb4ab 100644
+--- a/drivers/atm/idt77252.c
++++ b/drivers/atm/idt77252.c
+@@ -810,7 +810,7 @@ drain_scq(struct idt77252_dev *card, struct vc_map *vc)
else
dev_kfree_skb(skb);
@@ -28135,7 +29453,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
}
atomic_dec(&scq->used);
-@@ -1073,13 +1073,13 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1073,13 +1073,13 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
if ((sb = dev_alloc_skb(64)) == NULL) {
printk("%s: Can't allocate buffers for aal0.\n",
card->name);
@@ -28151,7 +29469,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
dev_kfree_skb(sb);
break;
}
-@@ -1096,7 +1096,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1096,7 +1096,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -28160,7 +29478,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
cell += ATM_CELL_PAYLOAD;
}
-@@ -1133,13 +1133,13 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1133,13 +1133,13 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
"(CDC: %08x)\n",
card->name, len, rpp->len, readl(SAR_REG_CDC));
recycle_rx_pool_skb(card, rpp);
@@ -28176,7 +29494,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
return;
}
if (skb_queue_len(&rpp->queue) > 1) {
-@@ -1150,7 +1150,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1150,7 +1150,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
RXPRINTK("%s: Can't alloc RX skb.\n",
card->name);
recycle_rx_pool_skb(card, rpp);
@@ -28185,7 +29503,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
return;
}
if (!atm_charge(vcc, skb->truesize)) {
-@@ -1169,7 +1169,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1169,7 +1169,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -28194,7 +29512,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
return;
}
-@@ -1191,7 +1191,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1191,7 +1191,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -28203,7 +29521,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
if (skb->truesize > SAR_FB_SIZE_3)
add_rx_skb(card, 3, SAR_FB_SIZE_3, 1);
-@@ -1303,14 +1303,14 @@ idt77252_rx_raw(struct idt77252_dev *car
+@@ -1303,14 +1303,14 @@ idt77252_rx_raw(struct idt77252_dev *card)
if (vcc->qos.aal != ATM_AAL0) {
RPRINTK("%s: raw cell for non AAL0 vc %u.%u\n",
card->name, vpi, vci);
@@ -28220,7 +29538,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
goto drop;
}
-@@ -1329,7 +1329,7 @@ idt77252_rx_raw(struct idt77252_dev *car
+@@ -1329,7 +1329,7 @@ idt77252_rx_raw(struct idt77252_dev *card)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -28229,7 +29547,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
drop:
skb_pull(queue, 64);
-@@ -1954,13 +1954,13 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1954,13 +1954,13 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
if (vc == NULL) {
printk("%s: NULL connection in send().\n", card->name);
@@ -28245,7 +29563,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
dev_kfree_skb(skb);
return -EINVAL;
}
-@@ -1972,14 +1972,14 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1972,14 +1972,14 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
break;
default:
printk("%s: Unsupported AAL: %d\n", card->name, vcc->qos.aal);
@@ -28262,7 +29580,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
dev_kfree_skb(skb);
return -EINVAL;
}
-@@ -1987,7 +1987,7 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1987,7 +1987,7 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
err = queue_skb(card, vc, skb, oam);
if (err) {
@@ -28271,7 +29589,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
dev_kfree_skb(skb);
return err;
}
-@@ -2010,7 +2010,7 @@ idt77252_send_oam(struct atm_vcc *vcc, v
+@@ -2010,7 +2010,7 @@ idt77252_send_oam(struct atm_vcc *vcc, void *cell, int flags)
skb = dev_alloc_skb(64);
if (!skb) {
printk("%s: Out of memory in send_oam().\n", card->name);
@@ -28280,10 +29598,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/idt77252.c linux-2.6.32.49/drivers/atm/id
return -ENOMEM;
}
atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/iphase.c
---- linux-2.6.32.49/drivers/atm/iphase.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/iphase.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1123,7 +1123,7 @@ static int rx_pkt(struct atm_dev *dev)
+diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
+index b2c1b37..faa672b 100644
+--- a/drivers/atm/iphase.c
++++ b/drivers/atm/iphase.c
+@@ -1123,7 +1123,7 @@ static int rx_pkt(struct atm_dev *dev)
status = (u_short) (buf_desc_ptr->desc_mode);
if (status & (RX_CER | RX_PTE | RX_OFL))
{
@@ -28292,7 +29611,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
IF_ERR(printk("IA: bad packet, dropping it");)
if (status & RX_CER) {
IF_ERR(printk(" cause: packet CRC error\n");)
-@@ -1146,7 +1146,7 @@ static int rx_pkt(struct atm_dev *dev)
+@@ -1146,7 +1146,7 @@ static int rx_pkt(struct atm_dev *dev)
len = dma_addr - buf_addr;
if (len > iadev->rx_buf_sz) {
printk("Over %d bytes sdu received, dropped!!!\n", iadev->rx_buf_sz);
@@ -28301,7 +29620,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
goto out_free_desc;
}
-@@ -1296,7 +1296,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1296,7 +1296,7 @@ static void rx_dle_intr(struct atm_dev *dev)
ia_vcc = INPH_IA_VCC(vcc);
if (ia_vcc == NULL)
{
@@ -28310,7 +29629,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
dev_kfree_skb_any(skb);
atm_return(vcc, atm_guess_pdu2truesize(len));
goto INCR_DLE;
-@@ -1308,7 +1308,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1308,7 +1308,7 @@ static void rx_dle_intr(struct atm_dev *dev)
if ((length > iadev->rx_buf_sz) || (length >
(skb->len - sizeof(struct cpcs_trailer))))
{
@@ -28319,7 +29638,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
IF_ERR(printk("rx_dle_intr: Bad AAL5 trailer %d (skb len %d)",
length, skb->len);)
dev_kfree_skb_any(skb);
-@@ -1324,7 +1324,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1324,7 +1324,7 @@ static void rx_dle_intr(struct atm_dev *dev)
IF_RX(printk("rx_dle_intr: skb push");)
vcc->push(vcc,skb);
@@ -28328,7 +29647,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
iadev->rx_pkt_cnt++;
}
INCR_DLE:
-@@ -2806,15 +2806,15 @@ static int ia_ioctl(struct atm_dev *dev,
+@@ -2806,15 +2806,15 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
{
struct k_sonet_stats *stats;
stats = &PRIV(_ia_dev[board])->sonet_stats;
@@ -28353,7 +29672,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
}
ia_cmds.status = 0;
break;
-@@ -2919,7 +2919,7 @@ static int ia_pkt_tx (struct atm_vcc *vc
+@@ -2919,7 +2919,7 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
if ((desc == 0) || (desc > iadev->num_tx_desc))
{
IF_ERR(printk(DEV_LABEL "invalid desc for send: %d\n", desc);)
@@ -28362,7 +29681,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
if (vcc->pop)
vcc->pop(vcc, skb);
else
-@@ -3024,14 +3024,14 @@ static int ia_pkt_tx (struct atm_vcc *vc
+@@ -3024,14 +3024,14 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
ATM_DESC(skb) = vcc->vci;
skb_queue_tail(&iadev->tx_dma_q, skb);
@@ -28379,10 +29698,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/iphase.c linux-2.6.32.49/drivers/atm/ipha
if (iavcc->vc_desc_cnt > 10) {
vcc->tx_quota = vcc->tx_quota * 3 / 4;
printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
-diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai.c
---- linux-2.6.32.49/drivers/atm/lanai.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/lanai.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1305,7 +1305,7 @@ static void lanai_send_one_aal5(struct l
+diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
+index cf97c34..8d30655 100644
+--- a/drivers/atm/lanai.c
++++ b/drivers/atm/lanai.c
+@@ -1305,7 +1305,7 @@ static void lanai_send_one_aal5(struct lanai_dev *lanai,
vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0);
lanai_endtx(lanai, lvcc);
lanai_free_skb(lvcc->tx.atmvcc, skb);
@@ -28391,7 +29711,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
}
/* Try to fill the buffer - don't call unless there is backlog */
-@@ -1428,7 +1428,7 @@ static void vcc_rx_aal5(struct lanai_vcc
+@@ -1428,7 +1428,7 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr)
ATM_SKB(skb)->vcc = lvcc->rx.atmvcc;
__net_timestamp(skb);
lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb);
@@ -28400,7 +29720,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
out:
lvcc->rx.buf.ptr = end;
cardvcc_write(lvcc, endptr, vcc_rxreadptr);
-@@ -1670,7 +1670,7 @@ static int handle_service(struct lanai_d
+@@ -1670,7 +1670,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
DPRINTK("(itf %d) got RX service entry 0x%X for non-AAL5 "
"vcc %d\n", lanai->number, (unsigned int) s, vci);
lanai->stats.service_rxnotaal5++;
@@ -28409,7 +29729,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
return 0;
}
if (likely(!(s & (SERVICE_TRASH | SERVICE_STREAM | SERVICE_CRCERR)))) {
-@@ -1682,7 +1682,7 @@ static int handle_service(struct lanai_d
+@@ -1682,7 +1682,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
int bytes;
read_unlock(&vcc_sklist_lock);
DPRINTK("got trashed rx pdu on vci %d\n", vci);
@@ -28418,7 +29738,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
lvcc->stats.x.aal5.service_trash++;
bytes = (SERVICE_GET_END(s) * 16) -
(((unsigned long) lvcc->rx.buf.ptr) -
-@@ -1694,7 +1694,7 @@ static int handle_service(struct lanai_d
+@@ -1694,7 +1694,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
}
if (s & SERVICE_STREAM) {
read_unlock(&vcc_sklist_lock);
@@ -28427,7 +29747,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
lvcc->stats.x.aal5.service_stream++;
printk(KERN_ERR DEV_LABEL "(itf %d): Got AAL5 stream "
"PDU on VCI %d!\n", lanai->number, vci);
-@@ -1702,7 +1702,7 @@ static int handle_service(struct lanai_d
+@@ -1702,7 +1702,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
return 0;
}
DPRINTK("got rx crc error on vci %d\n", vci);
@@ -28436,10 +29756,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/lanai.c linux-2.6.32.49/drivers/atm/lanai
lvcc->stats.x.aal5.service_rxcrc++;
lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4];
cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr);
-diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nicstar.c
---- linux-2.6.32.49/drivers/atm/nicstar.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/nicstar.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1723,7 +1723,7 @@ static int ns_send(struct atm_vcc *vcc,
+diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
+index 3da804b..d3b0eed 100644
+--- a/drivers/atm/nicstar.c
++++ b/drivers/atm/nicstar.c
+@@ -1723,7 +1723,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if ((vc = (vc_map *) vcc->dev_data) == NULL)
{
printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n", card->index);
@@ -28448,7 +29769,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1731,7 +1731,7 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1731,7 +1731,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (!vc->tx)
{
printk("nicstar%d: Trying to transmit on a non-tx VC.\n", card->index);
@@ -28457,7 +29778,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1739,7 +1739,7 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1739,7 +1739,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (vcc->qos.aal != ATM_AAL5 && vcc->qos.aal != ATM_AAL0)
{
printk("nicstar%d: Only AAL0 and AAL5 are supported.\n", card->index);
@@ -28466,7 +29787,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1747,7 +1747,7 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1747,7 +1747,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (skb_shinfo(skb)->nr_frags != 0)
{
printk("nicstar%d: No scatter-gather yet.\n", card->index);
@@ -28475,7 +29796,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1792,11 +1792,11 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1792,11 +1792,11 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (push_scqe(card, vc, scq, &scqe, skb) != 0)
{
@@ -28489,7 +29810,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
return 0;
}
-@@ -2111,14 +2111,14 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2111,14 +2111,14 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
{
printk("nicstar%d: Can't allocate buffers for aal0.\n",
card->index);
@@ -28506,7 +29827,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
dev_kfree_skb_any(sb);
break;
}
-@@ -2133,7 +2133,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2133,7 +2133,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -28515,7 +29836,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
cell += ATM_CELL_PAYLOAD;
}
-@@ -2152,7 +2152,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2152,7 +2152,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if (iovb == NULL)
{
printk("nicstar%d: Out of iovec buffers.\n", card->index);
@@ -28524,7 +29845,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_rx_buf(card, skb);
return;
}
-@@ -2182,7 +2182,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2182,7 +2182,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
else if (NS_SKB(iovb)->iovcnt >= NS_MAX_IOVECS)
{
printk("nicstar%d: received too big AAL5 SDU.\n", card->index);
@@ -28533,7 +29854,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS);
NS_SKB(iovb)->iovcnt = 0;
iovb->len = 0;
-@@ -2202,7 +2202,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2202,7 +2202,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
printk("nicstar%d: Expected a small buffer, and this is not one.\n",
card->index);
which_list(card, skb);
@@ -28542,7 +29863,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_rx_buf(card, skb);
vc->rx_iov = NULL;
recycle_iov_buf(card, iovb);
-@@ -2216,7 +2216,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2216,7 +2216,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
printk("nicstar%d: Expected a large buffer, and this is not one.\n",
card->index);
which_list(card, skb);
@@ -28551,7 +29872,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
NS_SKB(iovb)->iovcnt);
vc->rx_iov = NULL;
-@@ -2240,7 +2240,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2240,7 +2240,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
printk(" - PDU size mismatch.\n");
else
printk(".\n");
@@ -28560,7 +29881,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
NS_SKB(iovb)->iovcnt);
vc->rx_iov = NULL;
-@@ -2256,7 +2256,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2256,7 +2256,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if (!atm_charge(vcc, skb->truesize))
{
push_rxbufs(card, skb);
@@ -28569,7 +29890,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
else
{
-@@ -2268,7 +2268,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2268,7 +2268,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
ATM_SKB(skb)->vcc = vcc;
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -28578,7 +29899,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
}
else if (NS_SKB(iovb)->iovcnt == 2) /* One small plus one large buffer */
-@@ -2283,7 +2283,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2283,7 +2283,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if (!atm_charge(vcc, sb->truesize))
{
push_rxbufs(card, sb);
@@ -28587,7 +29908,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
else
{
-@@ -2295,7 +2295,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2295,7 +2295,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -28596,7 +29917,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
push_rxbufs(card, skb);
-@@ -2306,7 +2306,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2306,7 +2306,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if (!atm_charge(vcc, skb->truesize))
{
push_rxbufs(card, skb);
@@ -28605,7 +29926,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
else
{
-@@ -2320,7 +2320,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2320,7 +2320,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
ATM_SKB(skb)->vcc = vcc;
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -28614,7 +29935,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
push_rxbufs(card, sb);
-@@ -2342,7 +2342,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2342,7 +2342,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
if (hb == NULL)
{
printk("nicstar%d: Out of huge buffers.\n", card->index);
@@ -28623,7 +29944,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
NS_SKB(iovb)->iovcnt);
vc->rx_iov = NULL;
-@@ -2393,7 +2393,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2393,7 +2393,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
}
else
dev_kfree_skb_any(hb);
@@ -28632,7 +29953,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
else
{
-@@ -2427,7 +2427,7 @@ static void dequeue_rx(ns_dev *card, ns_
+@@ -2427,7 +2427,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
#endif /* NS_USE_DESTRUCTORS */
__net_timestamp(hb);
vcc->push(vcc, hb);
@@ -28641,9 +29962,10 @@ diff -urNp linux-2.6.32.49/drivers/atm/nicstar.c linux-2.6.32.49/drivers/atm/nic
}
}
-diff -urNp linux-2.6.32.49/drivers/atm/solos-pci.c linux-2.6.32.49/drivers/atm/solos-pci.c
---- linux-2.6.32.49/drivers/atm/solos-pci.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/solos-pci.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
+index 84c93ff..e6ed269 100644
+--- a/drivers/atm/solos-pci.c
++++ b/drivers/atm/solos-pci.c
@@ -708,7 +708,7 @@ void solos_bh(unsigned long card_arg)
}
atm_charge(vcc, skb->truesize);
@@ -28653,7 +29975,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/solos-pci.c linux-2.6.32.49/drivers/atm/s
break;
case PKT_STATUS:
-@@ -914,6 +914,8 @@ static int print_buffer(struct sk_buff *
+@@ -914,6 +914,8 @@ static int print_buffer(struct sk_buff *buf)
char msg[500];
char item[10];
@@ -28662,7 +29984,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/solos-pci.c linux-2.6.32.49/drivers/atm/s
len = buf->len;
for (i = 0; i < len; i++){
if(i % 8 == 0)
-@@ -1023,7 +1025,7 @@ static uint32_t fpga_tx(struct solos_car
+@@ -1023,7 +1025,7 @@ static uint32_t fpga_tx(struct solos_card *card)
vcc = SKB_CB(oldskb)->vcc;
if (vcc) {
@@ -28671,9 +29993,10 @@ diff -urNp linux-2.6.32.49/drivers/atm/solos-pci.c linux-2.6.32.49/drivers/atm/s
solos_pop(vcc, oldskb);
} else
dev_kfree_skb_irq(oldskb);
-diff -urNp linux-2.6.32.49/drivers/atm/suni.c linux-2.6.32.49/drivers/atm/suni.c
---- linux-2.6.32.49/drivers/atm/suni.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/suni.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c
+index 6dd3f59..ee377f3 100644
+--- a/drivers/atm/suni.c
++++ b/drivers/atm/suni.c
@@ -49,8 +49,8 @@ static DEFINE_SPINLOCK(sunis_lock);
@@ -28685,10 +30008,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/suni.c linux-2.6.32.49/drivers/atm/suni.c
static void suni_hz(unsigned long from_timer)
-diff -urNp linux-2.6.32.49/drivers/atm/uPD98402.c linux-2.6.32.49/drivers/atm/uPD98402.c
---- linux-2.6.32.49/drivers/atm/uPD98402.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/uPD98402.c 2011-11-15 19:59:43.000000000 -0500
-@@ -41,7 +41,7 @@ static int fetch_stats(struct atm_dev *d
+diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c
+index fc8cb07..4a80e53 100644
+--- a/drivers/atm/uPD98402.c
++++ b/drivers/atm/uPD98402.c
+@@ -41,7 +41,7 @@ static int fetch_stats(struct atm_dev *dev,struct sonet_stats __user *arg,int ze
struct sonet_stats tmp;
int error = 0;
@@ -28697,7 +30021,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/uPD98402.c linux-2.6.32.49/drivers/atm/uP
sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp);
if (arg) error = copy_to_user(arg,&tmp,sizeof(tmp));
if (zero && !error) {
-@@ -160,9 +160,9 @@ static int uPD98402_ioctl(struct atm_dev
+@@ -160,9 +160,9 @@ static int uPD98402_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
#define ADD_LIMITED(s,v) \
@@ -28710,7 +30034,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/uPD98402.c linux-2.6.32.49/drivers/atm/uP
static void stat_event(struct atm_dev *dev)
-@@ -193,7 +193,7 @@ static void uPD98402_int(struct atm_dev
+@@ -193,7 +193,7 @@ static void uPD98402_int(struct atm_dev *dev)
if (reason & uPD98402_INT_PFM) stat_event(dev);
if (reason & uPD98402_INT_PCO) {
(void) GET(PCOCR); /* clear interrupt cause */
@@ -28719,7 +30043,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/uPD98402.c linux-2.6.32.49/drivers/atm/uP
&PRIV(dev)->sonet_stats.uncorr_hcs);
}
if ((reason & uPD98402_INT_RFO) &&
-@@ -221,9 +221,9 @@ static int uPD98402_start(struct atm_dev
+@@ -221,9 +221,9 @@ static int uPD98402_start(struct atm_dev *dev)
PUT(~(uPD98402_INT_PFM | uPD98402_INT_ALM | uPD98402_INT_RFO |
uPD98402_INT_LOS),PIMR); /* enable them */
(void) fetch_stats(dev,NULL,1); /* clear kernel counters */
@@ -28732,10 +30056,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/uPD98402.c linux-2.6.32.49/drivers/atm/uP
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/atm/zatm.c linux-2.6.32.49/drivers/atm/zatm.c
---- linux-2.6.32.49/drivers/atm/zatm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/atm/zatm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -458,7 +458,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
+diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
+index 2e9635b..32927b4 100644
+--- a/drivers/atm/zatm.c
++++ b/drivers/atm/zatm.c
+@@ -458,7 +458,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]);
}
if (!size) {
dev_kfree_skb_irq(skb);
@@ -28744,7 +30069,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/zatm.c linux-2.6.32.49/drivers/atm/zatm.c
continue;
}
if (!atm_charge(vcc,skb->truesize)) {
-@@ -468,7 +468,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
+@@ -468,7 +468,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]);
skb->len = size;
ATM_SKB(skb)->vcc = vcc;
vcc->push(vcc,skb);
@@ -28753,7 +30078,7 @@ diff -urNp linux-2.6.32.49/drivers/atm/zatm.c linux-2.6.32.49/drivers/atm/zatm.c
}
zout(pos & 0xffff,MTA(mbx));
#if 0 /* probably a stupid idea */
-@@ -732,7 +732,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD
+@@ -732,7 +732,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD_V | uPD98401_TXPD_DP |
skb_queue_head(&zatm_vcc->backlog,skb);
break;
}
@@ -28762,10 +30087,11 @@ diff -urNp linux-2.6.32.49/drivers/atm/zatm.c linux-2.6.32.49/drivers/atm/zatm.c
wake_up(&zatm_vcc->tx_wait);
}
-diff -urNp linux-2.6.32.49/drivers/base/bus.c linux-2.6.32.49/drivers/base/bus.c
---- linux-2.6.32.49/drivers/base/bus.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/base/bus.c 2011-11-15 19:59:43.000000000 -0500
-@@ -70,7 +70,7 @@ static ssize_t drv_attr_store(struct kob
+diff --git a/drivers/base/bus.c b/drivers/base/bus.c
+index 63c143e..fece183 100644
+--- a/drivers/base/bus.c
++++ b/drivers/base/bus.c
+@@ -70,7 +70,7 @@ static ssize_t drv_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -28774,7 +30100,7 @@ diff -urNp linux-2.6.32.49/drivers/base/bus.c linux-2.6.32.49/drivers/base/bus.c
.show = drv_attr_show,
.store = drv_attr_store,
};
-@@ -115,7 +115,7 @@ static ssize_t bus_attr_store(struct kob
+@@ -115,7 +115,7 @@ static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -28783,7 +30109,7 @@ diff -urNp linux-2.6.32.49/drivers/base/bus.c linux-2.6.32.49/drivers/base/bus.c
.show = bus_attr_show,
.store = bus_attr_store,
};
-@@ -154,7 +154,7 @@ static int bus_uevent_filter(struct kset
+@@ -154,7 +154,7 @@ static int bus_uevent_filter(struct kset *kset, struct kobject *kobj)
return 0;
}
@@ -28792,10 +30118,11 @@ diff -urNp linux-2.6.32.49/drivers/base/bus.c linux-2.6.32.49/drivers/base/bus.c
.filter = bus_uevent_filter,
};
-diff -urNp linux-2.6.32.49/drivers/base/class.c linux-2.6.32.49/drivers/base/class.c
---- linux-2.6.32.49/drivers/base/class.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/base/class.c 2011-11-15 19:59:43.000000000 -0500
-@@ -63,7 +63,7 @@ static void class_release(struct kobject
+diff --git a/drivers/base/class.c b/drivers/base/class.c
+index 6e2c3b0..cb61871 100644
+--- a/drivers/base/class.c
++++ b/drivers/base/class.c
+@@ -63,7 +63,7 @@ static void class_release(struct kobject *kobj)
kfree(cp);
}
@@ -28804,10 +30131,11 @@ diff -urNp linux-2.6.32.49/drivers/base/class.c linux-2.6.32.49/drivers/base/cla
.show = class_attr_show,
.store = class_attr_store,
};
-diff -urNp linux-2.6.32.49/drivers/base/core.c linux-2.6.32.49/drivers/base/core.c
---- linux-2.6.32.49/drivers/base/core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/base/core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -100,7 +100,7 @@ static ssize_t dev_attr_store(struct kob
+diff --git a/drivers/base/core.c b/drivers/base/core.c
+index f33d768..a9358d0 100644
+--- a/drivers/base/core.c
++++ b/drivers/base/core.c
+@@ -100,7 +100,7 @@ static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -28816,7 +30144,7 @@ diff -urNp linux-2.6.32.49/drivers/base/core.c linux-2.6.32.49/drivers/base/core
.show = dev_attr_show,
.store = dev_attr_store,
};
-@@ -252,7 +252,7 @@ static int dev_uevent(struct kset *kset,
+@@ -252,7 +252,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
return retval;
}
@@ -28825,10 +30153,11 @@ diff -urNp linux-2.6.32.49/drivers/base/core.c linux-2.6.32.49/drivers/base/core
.filter = dev_uevent_filter,
.name = dev_uevent_name,
.uevent = dev_uevent,
-diff -urNp linux-2.6.32.49/drivers/base/memory.c linux-2.6.32.49/drivers/base/memory.c
---- linux-2.6.32.49/drivers/base/memory.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/base/memory.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,7 +44,7 @@ static int memory_uevent(struct kset *ks
+diff --git a/drivers/base/memory.c b/drivers/base/memory.c
+index 989429c..2272b00 100644
+--- a/drivers/base/memory.c
++++ b/drivers/base/memory.c
+@@ -44,7 +44,7 @@ static int memory_uevent(struct kset *kset, struct kobject *obj, struct kobj_uev
return retval;
}
@@ -28837,10 +30166,11 @@ diff -urNp linux-2.6.32.49/drivers/base/memory.c linux-2.6.32.49/drivers/base/me
.name = memory_uevent_name,
.uevent = memory_uevent,
};
-diff -urNp linux-2.6.32.49/drivers/base/sys.c linux-2.6.32.49/drivers/base/sys.c
---- linux-2.6.32.49/drivers/base/sys.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/base/sys.c 2011-11-26 19:45:05.000000000 -0500
-@@ -54,7 +54,7 @@ sysdev_store(struct kobject *kobj, struc
+diff --git a/drivers/base/sys.c b/drivers/base/sys.c
+index 3f202f7..61c4a6f 100644
+--- a/drivers/base/sys.c
++++ b/drivers/base/sys.c
+@@ -54,7 +54,7 @@ sysdev_store(struct kobject *kobj, struct attribute *attr,
return -EIO;
}
@@ -28849,7 +30179,7 @@ diff -urNp linux-2.6.32.49/drivers/base/sys.c linux-2.6.32.49/drivers/base/sys.c
.show = sysdev_show,
.store = sysdev_store,
};
-@@ -104,7 +104,7 @@ static ssize_t sysdev_class_store(struct
+@@ -104,7 +104,7 @@ static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr,
return -EIO;
}
@@ -28858,10 +30188,24 @@ diff -urNp linux-2.6.32.49/drivers/base/sys.c linux-2.6.32.49/drivers/base/sys.c
.show = sysdev_class_show,
.store = sysdev_class_store,
};
-diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/cciss.c
---- linux-2.6.32.49/drivers/block/cciss.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/cciss.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1011,6 +1011,8 @@ static int cciss_ioctl32_passthru(struct
+diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
+index eb4fa19..1954777 100644
+--- a/drivers/block/DAC960.c
++++ b/drivers/block/DAC960.c
+@@ -1973,6 +1973,8 @@ static bool DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
+ unsigned long flags;
+ int Channel, TargetID;
+
++ pax_track_stack();
++
+ if (!init_dma_loaf(Controller->PCIDevice, &local_dma,
+ DAC960_V1_MaxChannels*(sizeof(DAC960_V1_DCDB_T) +
+ sizeof(DAC960_SCSI_Inquiry_T) +
+diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
+index ca9c548..ca6899c 100644
+--- a/drivers/block/cciss.c
++++ b/drivers/block/cciss.c
+@@ -1011,6 +1011,8 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode,
int err;
u32 cp;
@@ -28870,7 +30214,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
err = 0;
err |=
copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
-@@ -2852,7 +2854,7 @@ static unsigned long pollcomplete(int ct
+@@ -2852,7 +2854,7 @@ static unsigned long pollcomplete(int ctlr)
/* Wait (up to 20 seconds) for a command to complete */
for (i = 20 * HZ; i > 0; i--) {
@@ -28879,7 +30223,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
if (done == FIFO_EMPTY)
schedule_timeout_uninterruptible(1);
else
-@@ -2876,7 +2878,7 @@ static int sendcmd_core(ctlr_info_t *h,
+@@ -2876,7 +2878,7 @@ static int sendcmd_core(ctlr_info_t *h, CommandList_struct *c)
resend_cmd1:
/* Disable interrupt on the board. */
@@ -28943,7 +30287,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
(h->interrupts_enabled == 0)));
}
-@@ -3892,7 +3894,7 @@ static int __devinit cciss_pci_init(ctlr
+@@ -3892,7 +3894,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
*/
c->max_commands = readl(&(c->cfgtable->CmdsOutMax));
c->product_name = products[prod_index].product_name;
@@ -28952,7 +30296,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
c->nr_cmds = c->max_commands - 4;
if ((readb(&c->cfgtable->Signature[0]) != 'C') ||
(readb(&c->cfgtable->Signature[1]) != 'I') ||
-@@ -4291,7 +4293,7 @@ static int __devinit cciss_init_one(stru
+@@ -4291,7 +4293,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
}
/* make sure the board interrupts are off */
@@ -28961,7 +30305,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr,
IRQF_DISABLED | IRQF_SHARED, hba[i]->devname, hba[i])) {
printk(KERN_ERR "cciss: Unable to get irq %d for %s\n",
-@@ -4341,7 +4343,7 @@ static int __devinit cciss_init_one(stru
+@@ -4341,7 +4343,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
cciss_scsi_setup(i);
/* Turn the interrupts on so we can service requests */
@@ -28970,10 +30314,11 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.c linux-2.6.32.49/drivers/block/c
/* Get the firmware version */
inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
-diff -urNp linux-2.6.32.49/drivers/block/cciss.h linux-2.6.32.49/drivers/block/cciss.h
---- linux-2.6.32.49/drivers/block/cciss.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/cciss.h 2011-11-15 19:59:43.000000000 -0500
-@@ -90,7 +90,7 @@ struct ctlr_info
+diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
+index 04d6bf8..36e712d 100644
+--- a/drivers/block/cciss.h
++++ b/drivers/block/cciss.h
+@@ -90,7 +90,7 @@ struct ctlr_info
// information about each logical volume
drive_info_struct *drv[CISS_MAX_LUN];
@@ -28982,10 +30327,11 @@ diff -urNp linux-2.6.32.49/drivers/block/cciss.h linux-2.6.32.49/drivers/block/c
/* queue and queue Info */
struct hlist_head reqQ;
-diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/block/cpqarray.c
---- linux-2.6.32.49/drivers/block/cpqarray.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/cpqarray.c 2011-11-15 19:59:43.000000000 -0500
-@@ -402,7 +402,7 @@ static int __init cpqarray_register_ctlr
+diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
+index 6422651..bb1bdef 100644
+--- a/drivers/block/cpqarray.c
++++ b/drivers/block/cpqarray.c
+@@ -402,7 +402,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev)
if (register_blkdev(COMPAQ_SMART2_MAJOR+i, hba[i]->devname)) {
goto Enomem4;
}
@@ -28994,7 +30340,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
if (request_irq(hba[i]->intr, do_ida_intr,
IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
{
-@@ -460,7 +460,7 @@ static int __init cpqarray_register_ctlr
+@@ -460,7 +460,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev)
add_timer(&hba[i]->timer);
/* Enable IRQ now that spinlock and rate limit timer are set up */
@@ -29012,7 +30358,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
break;
}
}
-@@ -793,7 +793,7 @@ static int __init cpqarray_eisa_detect(v
+@@ -793,7 +793,7 @@ static int __init cpqarray_eisa_detect(void)
hba[ctlr]->intr = intr;
sprintf(hba[ctlr]->devname, "ida%d", nr_ctlr);
hba[ctlr]->product_name = products[j].product_name;
@@ -29021,7 +30367,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
hba[ctlr]->ctlr = ctlr;
hba[ctlr]->board_id = board_id;
hba[ctlr]->pci_dev = NULL; /* not PCI */
-@@ -896,6 +896,8 @@ static void do_ida_request(struct reques
+@@ -896,6 +896,8 @@ static void do_ida_request(struct request_queue *q)
struct scatterlist tmp_sg[SG_MAX];
int i, dir, seg;
@@ -29048,7 +30394,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
/* Get onto the completion Q */
addQ(&h->cmpQ, c);
-@@ -1038,7 +1040,7 @@ static irqreturn_t do_ida_intr(int irq,
+@@ -1038,7 +1040,7 @@ static irqreturn_t do_ida_intr(int irq, void *dev_id)
unsigned long flags;
__u32 a,a1;
@@ -29057,7 +30403,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
/* Is this interrupt for us? */
if (istat == 0)
return IRQ_NONE;
-@@ -1049,7 +1051,7 @@ static irqreturn_t do_ida_intr(int irq,
+@@ -1049,7 +1051,7 @@ static irqreturn_t do_ida_intr(int irq, void *dev_id)
*/
spin_lock_irqsave(IDA_LOCK(h->ctlr), flags);
if (istat & FIFO_NOT_EMPTY) {
@@ -29089,7 +30435,7 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
complete = pollcomplete(ctlr);
pci_unmap_single(info_p->pci_dev, (dma_addr_t) c->req.sg[0].addr,
-@@ -1534,9 +1536,9 @@ static int revalidate_allvol(ctlr_info_t
+@@ -1534,9 +1536,9 @@ static int revalidate_allvol(ctlr_info_t *host)
* we check the new geometry. Then turn interrupts back on when
* we're done.
*/
@@ -29110,9 +30456,10 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.c linux-2.6.32.49/drivers/bloc
if (done == 0) {
udelay(10); /* a short fixed delay */
} else
-diff -urNp linux-2.6.32.49/drivers/block/cpqarray.h linux-2.6.32.49/drivers/block/cpqarray.h
---- linux-2.6.32.49/drivers/block/cpqarray.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/cpqarray.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/block/cpqarray.h b/drivers/block/cpqarray.h
+index be73e9d..7fbf140 100644
+--- a/drivers/block/cpqarray.h
++++ b/drivers/block/cpqarray.h
@@ -99,7 +99,7 @@ struct ctlr_info {
drv_info_t drv[NWD];
struct proc_dir_entry *proc;
@@ -29122,22 +30469,11 @@ diff -urNp linux-2.6.32.49/drivers/block/cpqarray.h linux-2.6.32.49/drivers/bloc
cmdlist_t *reqQ;
cmdlist_t *cmpQ;
-diff -urNp linux-2.6.32.49/drivers/block/DAC960.c linux-2.6.32.49/drivers/block/DAC960.c
---- linux-2.6.32.49/drivers/block/DAC960.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/DAC960.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1973,6 +1973,8 @@ static bool DAC960_V1_ReadDeviceConfigur
- unsigned long flags;
- int Channel, TargetID;
-
-+ pax_track_stack();
-+
- if (!init_dma_loaf(Controller->PCIDevice, &local_dma,
- DAC960_V1_MaxChannels*(sizeof(DAC960_V1_DCDB_T) +
- sizeof(DAC960_SCSI_Inquiry_T) +
-diff -urNp linux-2.6.32.49/drivers/block/loop.c linux-2.6.32.49/drivers/block/loop.c
---- linux-2.6.32.49/drivers/block/loop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/loop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -282,7 +282,7 @@ static int __do_lo_send_write(struct fil
+diff --git a/drivers/block/loop.c b/drivers/block/loop.c
+index 8ec2d70..2804b30 100644
+--- a/drivers/block/loop.c
++++ b/drivers/block/loop.c
+@@ -282,7 +282,7 @@ static int __do_lo_send_write(struct file *file,
mm_segment_t old_fs = get_fs();
set_fs(get_ds());
@@ -29146,10 +30482,11 @@ diff -urNp linux-2.6.32.49/drivers/block/loop.c linux-2.6.32.49/drivers/block/lo
set_fs(old_fs);
if (likely(bw == len))
return 0;
-diff -urNp linux-2.6.32.49/drivers/block/nbd.c linux-2.6.32.49/drivers/block/nbd.c
---- linux-2.6.32.49/drivers/block/nbd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/nbd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -155,6 +155,8 @@ static int sock_xmit(struct nbd_device *
+diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
+index 26ada47..083c480 100644
+--- a/drivers/block/nbd.c
++++ b/drivers/block/nbd.c
+@@ -155,6 +155,8 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
struct kvec iov;
sigset_t blocked, oldset;
@@ -29158,7 +30495,7 @@ diff -urNp linux-2.6.32.49/drivers/block/nbd.c linux-2.6.32.49/drivers/block/nbd
if (unlikely(!sock)) {
printk(KERN_ERR "%s: Attempted %s on closed socket in sock_xmit\n",
lo->disk->disk_name, (send ? "send" : "recv"));
-@@ -569,6 +571,8 @@ static void do_nbd_request(struct reques
+@@ -569,6 +571,8 @@ static void do_nbd_request(struct request_queue *q)
static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
unsigned int cmd, unsigned long arg)
{
@@ -29167,10 +30504,11 @@ diff -urNp linux-2.6.32.49/drivers/block/nbd.c linux-2.6.32.49/drivers/block/nbd
switch (cmd) {
case NBD_DISCONNECT: {
struct request sreq;
-diff -urNp linux-2.6.32.49/drivers/block/pktcdvd.c linux-2.6.32.49/drivers/block/pktcdvd.c
---- linux-2.6.32.49/drivers/block/pktcdvd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/block/pktcdvd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -284,7 +284,7 @@ static ssize_t kobj_pkt_store(struct kob
+diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
+index a5d585d..d087be3 100644
+--- a/drivers/block/pktcdvd.c
++++ b/drivers/block/pktcdvd.c
+@@ -284,7 +284,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj,
return len;
}
@@ -29179,10 +30517,33 @@ diff -urNp linux-2.6.32.49/drivers/block/pktcdvd.c linux-2.6.32.49/drivers/block
.show = kobj_pkt_show,
.store = kobj_pkt_store
};
-diff -urNp linux-2.6.32.49/drivers/char/agp/frontend.c linux-2.6.32.49/drivers/char/agp/frontend.c
---- linux-2.6.32.49/drivers/char/agp/frontend.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/agp/frontend.c 2011-11-15 19:59:43.000000000 -0500
-@@ -824,7 +824,7 @@ static int agpioc_reserve_wrap(struct ag
+diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
+index 6aad99e..89cd142 100644
+--- a/drivers/char/Kconfig
++++ b/drivers/char/Kconfig
+@@ -90,7 +90,8 @@ config VT_HW_CONSOLE_BINDING
+
+ config DEVKMEM
+ bool "/dev/kmem virtual device support"
+- default y
++ default n
++ depends on !GRKERNSEC_KMEM
+ help
+ Say Y here if you want to support the /dev/kmem device. The
+ /dev/kmem device is rarely used, but can be used for certain
+@@ -1114,6 +1115,7 @@ config DEVPORT
+ bool
+ depends on !M68K
+ depends on ISA || PCI
++ depends on !GRKERNSEC_KMEM
+ default y
+
+ source "drivers/s390/char/Kconfig"
+diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
+index a96f319..a778a5b 100644
+--- a/drivers/char/agp/frontend.c
++++ b/drivers/char/agp/frontend.c
+@@ -824,7 +824,7 @@ static int agpioc_reserve_wrap(struct agp_file_private *priv, void __user *arg)
if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
return -EFAULT;
@@ -29191,9 +30552,10 @@ diff -urNp linux-2.6.32.49/drivers/char/agp/frontend.c linux-2.6.32.49/drivers/c
return -EFAULT;
client = agp_find_client_by_pid(reserve.pid);
-diff -urNp linux-2.6.32.49/drivers/char/briq_panel.c linux-2.6.32.49/drivers/char/briq_panel.c
---- linux-2.6.32.49/drivers/char/briq_panel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/briq_panel.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c
+index d8cff90..9628e70 100644
+--- a/drivers/char/briq_panel.c
++++ b/drivers/char/briq_panel.c
@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/errno.h>
@@ -29210,7 +30572,7 @@ diff -urNp linux-2.6.32.49/drivers/char/briq_panel.c linux-2.6.32.49/drivers/cha
static void update_vfd(void)
{
-@@ -142,12 +144,15 @@ static ssize_t briq_panel_write(struct f
+@@ -142,12 +144,15 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
if (!vfd_is_open)
return -EBUSY;
@@ -29227,7 +30589,7 @@ diff -urNp linux-2.6.32.49/drivers/char/briq_panel.c linux-2.6.32.49/drivers/cha
if (esc) {
set_led(c);
esc = 0;
-@@ -177,6 +182,7 @@ static ssize_t briq_panel_write(struct f
+@@ -177,6 +182,7 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
buf++;
}
update_vfd();
@@ -29235,10 +30597,11 @@ diff -urNp linux-2.6.32.49/drivers/char/briq_panel.c linux-2.6.32.49/drivers/cha
return len;
}
-diff -urNp linux-2.6.32.49/drivers/char/genrtc.c linux-2.6.32.49/drivers/char/genrtc.c
---- linux-2.6.32.49/drivers/char/genrtc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/genrtc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -272,6 +272,7 @@ static int gen_rtc_ioctl(struct inode *i
+diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
+index 31e7c91..161afc0 100644
+--- a/drivers/char/genrtc.c
++++ b/drivers/char/genrtc.c
+@@ -272,6 +272,7 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file,
switch (cmd) {
case RTC_PLL_GET:
@@ -29246,10 +30609,11 @@ diff -urNp linux-2.6.32.49/drivers/char/genrtc.c linux-2.6.32.49/drivers/char/ge
if (get_rtc_pll(&pll))
return -EINVAL;
else
-diff -urNp linux-2.6.32.49/drivers/char/hpet.c linux-2.6.32.49/drivers/char/hpet.c
---- linux-2.6.32.49/drivers/char/hpet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hpet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -430,7 +430,7 @@ static int hpet_release(struct inode *in
+diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
+index 006466d..a2bb21c 100644
+--- a/drivers/char/hpet.c
++++ b/drivers/char/hpet.c
+@@ -430,7 +430,7 @@ static int hpet_release(struct inode *inode, struct file *file)
return 0;
}
@@ -29258,7 +30622,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hpet.c linux-2.6.32.49/drivers/char/hpet
static int
hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-@@ -565,7 +565,7 @@ static inline unsigned long hpet_time_di
+@@ -565,7 +565,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
}
static int
@@ -29267,7 +30631,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hpet.c linux-2.6.32.49/drivers/char/hpet
{
struct hpet_timer __iomem *timer;
struct hpet __iomem *hpet;
-@@ -608,11 +608,11 @@ hpet_ioctl_common(struct hpet_dev *devp,
+@@ -608,11 +608,11 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
{
struct hpet_info info;
@@ -29281,10 +30645,11 @@ diff -urNp linux-2.6.32.49/drivers/char/hpet.c linux-2.6.32.49/drivers/char/hpet
info.hi_flags =
readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
info.hi_hpet = hpetp->hp_which;
-diff -urNp linux-2.6.32.49/drivers/char/hvc_beat.c linux-2.6.32.49/drivers/char/hvc_beat.c
---- linux-2.6.32.49/drivers/char/hvc_beat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_beat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -84,7 +84,7 @@ static int hvc_beat_put_chars(uint32_t v
+diff --git a/drivers/char/hvc_beat.c b/drivers/char/hvc_beat.c
+index 0afc8b8..6913fc3 100644
+--- a/drivers/char/hvc_beat.c
++++ b/drivers/char/hvc_beat.c
+@@ -84,7 +84,7 @@ static int hvc_beat_put_chars(uint32_t vtermno, const char *buf, int cnt)
return cnt;
}
@@ -29293,10 +30658,11 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_beat.c linux-2.6.32.49/drivers/char/
.get_chars = hvc_beat_get_chars,
.put_chars = hvc_beat_put_chars,
};
-diff -urNp linux-2.6.32.49/drivers/char/hvc_console.c linux-2.6.32.49/drivers/char/hvc_console.c
---- linux-2.6.32.49/drivers/char/hvc_console.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_console.c 2011-11-15 19:59:43.000000000 -0500
-@@ -125,7 +125,7 @@ static struct hvc_struct *hvc_get_by_ind
+diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
+index 98097f2..407dddc 100644
+--- a/drivers/char/hvc_console.c
++++ b/drivers/char/hvc_console.c
+@@ -125,7 +125,7 @@ static struct hvc_struct *hvc_get_by_index(int index)
* console interfaces but can still be used as a tty device. This has to be
* static because kmalloc will not work during early console init.
*/
@@ -29305,7 +30671,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_console.c linux-2.6.32.49/drivers/ch
static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
{[0 ... MAX_NR_HVC_CONSOLES - 1] = -1};
-@@ -249,7 +249,7 @@ static void destroy_hvc_struct(struct kr
+@@ -249,7 +249,7 @@ static void destroy_hvc_struct(struct kref *kref)
* vty adapters do NOT get an hvc_instantiate() callback since they
* appear after early console init.
*/
@@ -29314,7 +30680,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_console.c linux-2.6.32.49/drivers/ch
{
struct hvc_struct *hp;
-@@ -758,7 +758,7 @@ static const struct tty_operations hvc_o
+@@ -758,7 +758,7 @@ static const struct tty_operations hvc_ops = {
};
struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
@@ -29323,9 +30689,10 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_console.c linux-2.6.32.49/drivers/ch
{
struct hvc_struct *hp;
int i;
-diff -urNp linux-2.6.32.49/drivers/char/hvc_console.h linux-2.6.32.49/drivers/char/hvc_console.h
---- linux-2.6.32.49/drivers/char/hvc_console.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_console.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/hvc_console.h b/drivers/char/hvc_console.h
+index 10950ca..ed176c3 100644
+--- a/drivers/char/hvc_console.h
++++ b/drivers/char/hvc_console.h
@@ -55,7 +55,7 @@ struct hvc_struct {
int outbuf_size;
int n_outbuf;
@@ -29349,9 +30716,10 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_console.h linux-2.6.32.49/drivers/ch
/* remove a vterm from hvc tty operation (module_exit or hotplug remove) */
extern int hvc_remove(struct hvc_struct *hp);
-diff -urNp linux-2.6.32.49/drivers/char/hvc_iseries.c linux-2.6.32.49/drivers/char/hvc_iseries.c
---- linux-2.6.32.49/drivers/char/hvc_iseries.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_iseries.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
+index 936d05b..fd02426 100644
+--- a/drivers/char/hvc_iseries.c
++++ b/drivers/char/hvc_iseries.c
@@ -197,7 +197,7 @@ done:
return sent;
}
@@ -29361,10 +30729,11 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_iseries.c linux-2.6.32.49/drivers/ch
.get_chars = get_chars,
.put_chars = put_chars,
.notifier_add = notifier_add_irq,
-diff -urNp linux-2.6.32.49/drivers/char/hvc_iucv.c linux-2.6.32.49/drivers/char/hvc_iucv.c
---- linux-2.6.32.49/drivers/char/hvc_iucv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_iucv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -924,7 +924,7 @@ static int hvc_iucv_pm_restore_thaw(stru
+diff --git a/drivers/char/hvc_iucv.c b/drivers/char/hvc_iucv.c
+index b0e168f..69cda2a 100644
+--- a/drivers/char/hvc_iucv.c
++++ b/drivers/char/hvc_iucv.c
+@@ -924,7 +924,7 @@ static int hvc_iucv_pm_restore_thaw(struct device *dev)
/* HVC operations */
@@ -29373,10 +30742,11 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_iucv.c linux-2.6.32.49/drivers/char/
.get_chars = hvc_iucv_get_chars,
.put_chars = hvc_iucv_put_chars,
.notifier_add = hvc_iucv_notifier_add,
-diff -urNp linux-2.6.32.49/drivers/char/hvc_rtas.c linux-2.6.32.49/drivers/char/hvc_rtas.c
---- linux-2.6.32.49/drivers/char/hvc_rtas.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_rtas.c 2011-11-15 19:59:43.000000000 -0500
-@@ -71,7 +71,7 @@ static int hvc_rtas_read_console(uint32_
+diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c
+index 88590d0..61c4a61 100644
+--- a/drivers/char/hvc_rtas.c
++++ b/drivers/char/hvc_rtas.c
+@@ -71,7 +71,7 @@ static int hvc_rtas_read_console(uint32_t vtermno, char *buf, int count)
return i;
}
@@ -29385,9 +30755,49 @@ diff -urNp linux-2.6.32.49/drivers/char/hvc_rtas.c linux-2.6.32.49/drivers/char/
.get_chars = hvc_rtas_read_console,
.put_chars = hvc_rtas_write_console,
};
-diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs.c
---- linux-2.6.32.49/drivers/char/hvcs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvcs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/hvc_udbg.c b/drivers/char/hvc_udbg.c
+index bd63ba8..b0957e6 100644
+--- a/drivers/char/hvc_udbg.c
++++ b/drivers/char/hvc_udbg.c
+@@ -58,7 +58,7 @@ static int hvc_udbg_get(uint32_t vtermno, char *buf, int count)
+ return i;
+ }
+
+-static struct hv_ops hvc_udbg_ops = {
++static const struct hv_ops hvc_udbg_ops = {
+ .get_chars = hvc_udbg_get,
+ .put_chars = hvc_udbg_put,
+ };
+diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
+index 10be343..27370e9 100644
+--- a/drivers/char/hvc_vio.c
++++ b/drivers/char/hvc_vio.c
+@@ -77,7 +77,7 @@ static int filtered_get_chars(uint32_t vtermno, char *buf, int count)
+ return got;
+ }
+
+-static struct hv_ops hvc_get_put_ops = {
++static const struct hv_ops hvc_get_put_ops = {
+ .get_chars = filtered_get_chars,
+ .put_chars = hvc_put_chars,
+ .notifier_add = notifier_add_irq,
+diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c
+index a6ee32b..94f8c26 100644
+--- a/drivers/char/hvc_xen.c
++++ b/drivers/char/hvc_xen.c
+@@ -120,7 +120,7 @@ static int read_console(uint32_t vtermno, char *buf, int len)
+ return recv;
+ }
+
+-static struct hv_ops hvc_ops = {
++static const struct hv_ops hvc_ops = {
+ .get_chars = read_console,
+ .put_chars = write_console,
+ .notifier_add = notifier_add_irq,
+diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
+index 266b858..f3ee0bb 100644
+--- a/drivers/char/hvcs.c
++++ b/drivers/char/hvcs.c
@@ -82,6 +82,7 @@
#include <asm/hvcserver.h>
#include <asm/uaccess.h>
@@ -29405,7 +30815,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
/*
* Used to tell the driver kernel_thread what operations need to take
-@@ -419,7 +420,7 @@ static ssize_t hvcs_vterm_state_store(st
+@@ -419,7 +420,7 @@ static ssize_t hvcs_vterm_state_store(struct device *dev, struct device_attribut
spin_lock_irqsave(&hvcsd->lock, flags);
@@ -29414,7 +30824,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
spin_unlock_irqrestore(&hvcsd->lock, flags);
printk(KERN_INFO "HVCS: vterm state unchanged. "
"The hvcs device node is still in use.\n");
-@@ -1135,7 +1136,7 @@ static int hvcs_open(struct tty_struct *
+@@ -1135,7 +1136,7 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp)
if ((retval = hvcs_partner_connect(hvcsd)))
goto error_release;
@@ -29432,7 +30842,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
hvcsd->todo_mask |= HVCS_SCHED_READ;
spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1213,7 +1214,7 @@ static void hvcs_close(struct tty_struct
+@@ -1213,7 +1214,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
hvcsd = tty->driver_data;
spin_lock_irqsave(&hvcsd->lock, flags);
@@ -29441,7 +30851,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
vio_disable_interrupts(hvcsd->vdev);
-@@ -1239,10 +1240,10 @@ static void hvcs_close(struct tty_struct
+@@ -1239,10 +1240,10 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
free_irq(irq, hvcsd);
kref_put(&hvcsd->kref, destroy_hvcs_struct);
return;
@@ -29454,7 +30864,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
}
spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1258,7 +1259,7 @@ static void hvcs_hangup(struct tty_struc
+@@ -1258,7 +1259,7 @@ static void hvcs_hangup(struct tty_struct * tty)
spin_lock_irqsave(&hvcsd->lock, flags);
/* Preserve this so that we know how many kref refs to put */
@@ -29463,7 +30873,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
/*
* Don't kref put inside the spinlock because the destruction
-@@ -1273,7 +1274,7 @@ static void hvcs_hangup(struct tty_struc
+@@ -1273,7 +1274,7 @@ static void hvcs_hangup(struct tty_struct * tty)
hvcsd->tty->driver_data = NULL;
hvcsd->tty = NULL;
@@ -29472,7 +30882,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
/* This will drop any buffered data on the floor which is OK in a hangup
* scenario. */
-@@ -1344,7 +1345,7 @@ static int hvcs_write(struct tty_struct
+@@ -1344,7 +1345,7 @@ static int hvcs_write(struct tty_struct *tty,
* the middle of a write operation? This is a crummy place to do this
* but we want to keep it all in the spinlock.
*/
@@ -29481,7 +30891,7 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
spin_unlock_irqrestore(&hvcsd->lock, flags);
return -ENODEV;
}
-@@ -1418,7 +1419,7 @@ static int hvcs_write_room(struct tty_st
+@@ -1418,7 +1419,7 @@ static int hvcs_write_room(struct tty_struct *tty)
{
struct hvcs_struct *hvcsd = tty->driver_data;
@@ -29490,45 +30900,10 @@ diff -urNp linux-2.6.32.49/drivers/char/hvcs.c linux-2.6.32.49/drivers/char/hvcs
return 0;
return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
-diff -urNp linux-2.6.32.49/drivers/char/hvc_udbg.c linux-2.6.32.49/drivers/char/hvc_udbg.c
---- linux-2.6.32.49/drivers/char/hvc_udbg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_udbg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -58,7 +58,7 @@ static int hvc_udbg_get(uint32_t vtermno
- return i;
- }
-
--static struct hv_ops hvc_udbg_ops = {
-+static const struct hv_ops hvc_udbg_ops = {
- .get_chars = hvc_udbg_get,
- .put_chars = hvc_udbg_put,
- };
-diff -urNp linux-2.6.32.49/drivers/char/hvc_vio.c linux-2.6.32.49/drivers/char/hvc_vio.c
---- linux-2.6.32.49/drivers/char/hvc_vio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_vio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -77,7 +77,7 @@ static int filtered_get_chars(uint32_t v
- return got;
- }
-
--static struct hv_ops hvc_get_put_ops = {
-+static const struct hv_ops hvc_get_put_ops = {
- .get_chars = filtered_get_chars,
- .put_chars = hvc_put_chars,
- .notifier_add = notifier_add_irq,
-diff -urNp linux-2.6.32.49/drivers/char/hvc_xen.c linux-2.6.32.49/drivers/char/hvc_xen.c
---- linux-2.6.32.49/drivers/char/hvc_xen.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/hvc_xen.c 2011-11-15 19:59:43.000000000 -0500
-@@ -120,7 +120,7 @@ static int read_console(uint32_t vtermno
- return recv;
- }
-
--static struct hv_ops hvc_ops = {
-+static const struct hv_ops hvc_ops = {
- .get_chars = read_console,
- .put_chars = write_console,
- .notifier_add = notifier_add_irq,
-diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c
---- linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
+index ec5e3f8..02455ba 100644
+--- a/drivers/char/ipmi/ipmi_msghandler.c
++++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -414,7 +414,7 @@ struct ipmi_smi {
struct proc_dir_entry *proc_dir;
char proc_dir_name[10];
@@ -29550,7 +30925,7 @@ diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.49/d
static int is_lan_addr(struct ipmi_addr *addr)
{
-@@ -2808,7 +2808,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
+@@ -2808,7 +2808,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
INIT_LIST_HEAD(&intf->cmd_rcvrs);
init_waitqueue_head(&intf->waitq);
for (i = 0; i < IPMI_NUM_STATS; i++)
@@ -29568,9 +30943,10 @@ diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.49/d
si = (struct ipmi_system_interface_addr *) &addr;
si->addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
si->channel = IPMI_BMC_CHANNEL;
-diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
+index abae8c9..8021979 100644
+--- a/drivers/char/ipmi/ipmi_si_intf.c
++++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -277,7 +277,7 @@ struct smi_info {
unsigned char slave_addr;
@@ -29592,7 +30968,7 @@ diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.49/driv
#define SI_MAX_PARMS 4
-@@ -2931,7 +2931,7 @@ static int try_smi_init(struct smi_info
+@@ -2931,7 +2931,7 @@ static int try_smi_init(struct smi_info *new_smi)
atomic_set(&new_smi->req_events, 0);
new_smi->run_to_completion = 0;
for (i = 0; i < SI_NUM_STATS; i++)
@@ -29601,10 +30977,11 @@ diff -urNp linux-2.6.32.49/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.49/driv
new_smi->interrupt_disabled = 0;
atomic_set(&new_smi->stop_operation, 0);
-diff -urNp linux-2.6.32.49/drivers/char/istallion.c linux-2.6.32.49/drivers/char/istallion.c
---- linux-2.6.32.49/drivers/char/istallion.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/istallion.c 2011-11-15 19:59:43.000000000 -0500
-@@ -187,7 +187,6 @@ static struct ktermios stli_deftermios
+diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
+index 402838f..55e2200 100644
+--- a/drivers/char/istallion.c
++++ b/drivers/char/istallion.c
+@@ -187,7 +187,6 @@ static struct ktermios stli_deftermios = {
* re-used for each stats call.
*/
static comstats_t stli_comstats;
@@ -29612,7 +30989,7 @@ diff -urNp linux-2.6.32.49/drivers/char/istallion.c linux-2.6.32.49/drivers/char
static struct asystats stli_cdkstats;
/*****************************************************************************/
-@@ -4058,6 +4057,7 @@ static int stli_getbrdstats(combrd_t __u
+@@ -4058,6 +4057,7 @@ static int stli_getbrdstats(combrd_t __user *bp)
{
struct stlibrd *brdp;
unsigned int i;
@@ -29620,7 +30997,7 @@ diff -urNp linux-2.6.32.49/drivers/char/istallion.c linux-2.6.32.49/drivers/char
if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t)))
return -EFAULT;
-@@ -4269,6 +4269,8 @@ static int stli_getportstruct(struct stl
+@@ -4269,6 +4269,8 @@ static int stli_getportstruct(struct stliport __user *arg)
struct stliport stli_dummyport;
struct stliport *portp;
@@ -29629,7 +31006,7 @@ diff -urNp linux-2.6.32.49/drivers/char/istallion.c linux-2.6.32.49/drivers/char
if (copy_from_user(&stli_dummyport, arg, sizeof(struct stliport)))
return -EFAULT;
portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr,
-@@ -4291,6 +4293,8 @@ static int stli_getbrdstruct(struct stli
+@@ -4291,6 +4293,8 @@ static int stli_getbrdstruct(struct stlibrd __user *arg)
struct stlibrd stli_dummybrd;
struct stlibrd *brdp;
@@ -29638,31 +31015,11 @@ diff -urNp linux-2.6.32.49/drivers/char/istallion.c linux-2.6.32.49/drivers/char
if (copy_from_user(&stli_dummybrd, arg, sizeof(struct stlibrd)))
return -EFAULT;
if (stli_dummybrd.brdnr >= STL_MAXBRDS)
-diff -urNp linux-2.6.32.49/drivers/char/Kconfig linux-2.6.32.49/drivers/char/Kconfig
---- linux-2.6.32.49/drivers/char/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -90,7 +90,8 @@ config VT_HW_CONSOLE_BINDING
-
- config DEVKMEM
- bool "/dev/kmem virtual device support"
-- default y
-+ default n
-+ depends on !GRKERNSEC_KMEM
- help
- Say Y here if you want to support the /dev/kmem device. The
- /dev/kmem device is rarely used, but can be used for certain
-@@ -1114,6 +1115,7 @@ config DEVPORT
- bool
- depends on !M68K
- depends on ISA || PCI
-+ depends on !GRKERNSEC_KMEM
- default y
-
- source "drivers/s390/char/Kconfig"
-diff -urNp linux-2.6.32.49/drivers/char/keyboard.c linux-2.6.32.49/drivers/char/keyboard.c
---- linux-2.6.32.49/drivers/char/keyboard.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/keyboard.c 2011-11-15 19:59:43.000000000 -0500
-@@ -635,6 +635,16 @@ static void k_spec(struct vc_data *vc, u
+diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
+index 950837c..e55a288 100644
+--- a/drivers/char/keyboard.c
++++ b/drivers/char/keyboard.c
+@@ -635,6 +635,16 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
kbd->kbdmode == VC_MEDIUMRAW) &&
value != KVAL(K_SAK))
return; /* SAK is allowed even in raw mode */
@@ -29679,7 +31036,7 @@ diff -urNp linux-2.6.32.49/drivers/char/keyboard.c linux-2.6.32.49/drivers/char/
fn_handler[value](vc);
}
-@@ -1386,7 +1396,7 @@ static const struct input_device_id kbd_
+@@ -1386,7 +1396,7 @@ static const struct input_device_id kbd_ids[] = {
.evbit = { BIT_MASK(EV_SND) },
},
@@ -29688,10 +31045,11 @@ diff -urNp linux-2.6.32.49/drivers/char/keyboard.c linux-2.6.32.49/drivers/char/
};
MODULE_DEVICE_TABLE(input, kbd_ids);
-diff -urNp linux-2.6.32.49/drivers/char/mbcs.c linux-2.6.32.49/drivers/char/mbcs.c
---- linux-2.6.32.49/drivers/char/mbcs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/mbcs.c 2011-11-18 18:01:55.000000000 -0500
-@@ -799,7 +799,7 @@ static int mbcs_remove(struct cx_dev *de
+diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
+index 87c67b4..230527a 100644
+--- a/drivers/char/mbcs.c
++++ b/drivers/char/mbcs.c
+@@ -799,7 +799,7 @@ static int mbcs_remove(struct cx_dev *dev)
return 0;
}
@@ -29700,9 +31058,10 @@ diff -urNp linux-2.6.32.49/drivers/char/mbcs.c linux-2.6.32.49/drivers/char/mbcs
{
.part_num = MBCS_PART_NUM,
.mfg_num = MBCS_MFG_NUM,
-diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
---- linux-2.6.32.49/drivers/char/mem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/mem.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/mem.c b/drivers/char/mem.c
+index 1270f64..8495f49 100644
+--- a/drivers/char/mem.c
++++ b/drivers/char/mem.c
@@ -18,6 +18,7 @@
#include <linux/raw.h>
#include <linux/tty.h>
@@ -29722,7 +31081,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
static inline unsigned long size_inside_page(unsigned long start,
unsigned long size)
{
-@@ -102,9 +107,13 @@ static inline int range_is_allowed(unsig
+@@ -102,9 +107,13 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
@@ -29736,7 +31095,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
return 0;
}
cursor += PAGE_SIZE;
-@@ -112,6 +121,11 @@ static inline int range_is_allowed(unsig
+@@ -112,6 +121,11 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
}
return 1;
}
@@ -29748,7 +31107,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
#else
static inline int range_is_allowed(unsigned long pfn, unsigned long size)
{
-@@ -155,6 +169,8 @@ static ssize_t read_mem(struct file * fi
+@@ -155,6 +169,8 @@ static ssize_t read_mem(struct file * file, char __user * buf,
#endif
while (count > 0) {
@@ -29757,7 +31116,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
/*
* Handle first page in case it's not aligned
*/
-@@ -177,11 +193,31 @@ static ssize_t read_mem(struct file * fi
+@@ -177,11 +193,31 @@ static ssize_t read_mem(struct file * file, char __user * buf,
if (!ptr)
return -EFAULT;
@@ -29790,7 +31149,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
unxlate_dev_mem_ptr(p, ptr);
buf += sz;
-@@ -419,9 +455,8 @@ static ssize_t read_kmem(struct file *fi
+@@ -419,9 +455,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
unsigned long p = *ppos;
@@ -29801,7 +31160,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
read = 0;
if (p < (unsigned long) high_memory) {
-@@ -444,6 +479,8 @@ static ssize_t read_kmem(struct file *fi
+@@ -444,6 +479,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
}
#endif
while (low_count > 0) {
@@ -29810,7 +31169,7 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
sz = size_inside_page(p, low_count);
/*
-@@ -453,7 +490,22 @@ static ssize_t read_kmem(struct file *fi
+@@ -453,7 +490,22 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
*/
kbuf = xlate_dev_kmem_ptr((char *)p);
@@ -29844,9 +31203,10 @@ diff -urNp linux-2.6.32.49/drivers/char/mem.c linux-2.6.32.49/drivers/char/mem.c
};
static int memory_open(struct inode *inode, struct file *filp)
-diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c
---- linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
+index 674b3ab..a8d1970 100644
+--- a/drivers/char/pcmcia/ipwireless/tty.c
++++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -29,6 +29,7 @@
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
@@ -29864,7 +31224,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
unsigned int control_lines;
struct mutex ipw_tty_mutex;
int tx_bytes_queued;
-@@ -127,10 +128,10 @@ static int ipw_open(struct tty_struct *l
+@@ -127,10 +128,10 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
mutex_unlock(&tty->ipw_tty_mutex);
return -ENODEV;
}
@@ -29877,7 +31237,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
tty->linux_tty = linux_tty;
linux_tty->driver_data = tty;
-@@ -146,9 +147,7 @@ static int ipw_open(struct tty_struct *l
+@@ -146,9 +147,7 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
static void do_ipw_close(struct ipw_tty *tty)
{
@@ -29888,7 +31248,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
struct tty_struct *linux_tty = tty->linux_tty;
if (linux_tty != NULL) {
-@@ -169,7 +168,7 @@ static void ipw_hangup(struct tty_struct
+@@ -169,7 +168,7 @@ static void ipw_hangup(struct tty_struct *linux_tty)
return;
mutex_lock(&tty->ipw_tty_mutex);
@@ -29897,7 +31257,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
-@@ -198,7 +197,7 @@ void ipwireless_tty_received(struct ipw_
+@@ -198,7 +197,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
return;
}
@@ -29906,7 +31266,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
-@@ -240,7 +239,7 @@ static int ipw_write(struct tty_struct *
+@@ -240,7 +239,7 @@ static int ipw_write(struct tty_struct *linux_tty,
return -ENODEV;
mutex_lock(&tty->ipw_tty_mutex);
@@ -29915,7 +31275,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
mutex_unlock(&tty->ipw_tty_mutex);
return -EINVAL;
}
-@@ -280,7 +279,7 @@ static int ipw_write_room(struct tty_str
+@@ -280,7 +279,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
if (!tty)
return -ENODEV;
@@ -29924,7 +31284,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
return -EINVAL;
room = IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;
-@@ -322,7 +321,7 @@ static int ipw_chars_in_buffer(struct tt
+@@ -322,7 +321,7 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty)
if (!tty)
return 0;
@@ -29933,7 +31293,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
return 0;
return tty->tx_bytes_queued;
-@@ -403,7 +402,7 @@ static int ipw_tiocmget(struct tty_struc
+@@ -403,7 +402,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file)
if (!tty)
return -ENODEV;
@@ -29942,7 +31302,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
return -EINVAL;
return get_control_lines(tty);
-@@ -419,7 +418,7 @@ ipw_tiocmset(struct tty_struct *linux_tt
+@@ -419,7 +418,7 @@ ipw_tiocmset(struct tty_struct *linux_tty, struct file *file,
if (!tty)
return -ENODEV;
@@ -29951,7 +31311,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
return -EINVAL;
return set_control_lines(tty, set, clear);
-@@ -433,7 +432,7 @@ static int ipw_ioctl(struct tty_struct *
+@@ -433,7 +432,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
if (!tty)
return -ENODEV;
@@ -29960,7 +31320,7 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
return -EINVAL;
/* FIXME: Exactly how is the tty object locked here .. */
-@@ -591,7 +590,7 @@ void ipwireless_tty_free(struct ipw_tty
+@@ -591,7 +590,7 @@ void ipwireless_tty_free(struct ipw_tty *tty)
against a parallel ioctl etc */
mutex_lock(&ttyj->ipw_tty_mutex);
}
@@ -29969,9 +31329,10 @@ diff -urNp linux-2.6.32.49/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.49/
do_ipw_close(ttyj);
ipwireless_disassociate_network_ttys(network,
ttyj->channel_idx);
-diff -urNp linux-2.6.32.49/drivers/char/pty.c linux-2.6.32.49/drivers/char/pty.c
---- linux-2.6.32.49/drivers/char/pty.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/pty.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/pty.c b/drivers/char/pty.c
+index 62f282e..e45c45c 100644
+--- a/drivers/char/pty.c
++++ b/drivers/char/pty.c
@@ -736,8 +736,10 @@ static void __init unix98_pty_init(void)
register_sysctl_table(pty_root_table);
@@ -29984,9 +31345,10 @@ diff -urNp linux-2.6.32.49/drivers/char/pty.c linux-2.6.32.49/drivers/char/pty.c
cdev_init(&ptmx_cdev, &ptmx_fops);
if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
-diff -urNp linux-2.6.32.49/drivers/char/random.c linux-2.6.32.49/drivers/char/random.c
---- linux-2.6.32.49/drivers/char/random.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/random.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index 3a19e2d..6ed09d3 100644
+--- a/drivers/char/random.c
++++ b/drivers/char/random.c
@@ -254,8 +254,13 @@
/*
* Configuration information
@@ -30028,10 +31390,11 @@ diff -urNp linux-2.6.32.49/drivers/char/random.c linux-2.6.32.49/drivers/char/ra
static int max_write_thresh = INPUT_POOL_WORDS * 32;
static char sysctl_bootid[16];
-diff -urNp linux-2.6.32.49/drivers/char/rocket.c linux-2.6.32.49/drivers/char/rocket.c
---- linux-2.6.32.49/drivers/char/rocket.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/rocket.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1266,6 +1266,8 @@ static int get_ports(struct r_port *info
+diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
+index 0e29a23..0efc2c2 100644
+--- a/drivers/char/rocket.c
++++ b/drivers/char/rocket.c
+@@ -1266,6 +1266,8 @@ static int get_ports(struct r_port *info, struct rocket_ports __user *retports)
struct rocket_ports tmp;
int board;
@@ -30040,9 +31403,10 @@ diff -urNp linux-2.6.32.49/drivers/char/rocket.c linux-2.6.32.49/drivers/char/ro
if (!retports)
return -EFAULT;
memset(&tmp, 0, sizeof (tmp));
-diff -urNp linux-2.6.32.49/drivers/char/sonypi.c linux-2.6.32.49/drivers/char/sonypi.c
---- linux-2.6.32.49/drivers/char/sonypi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/sonypi.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
+index 8c262aa..4d3b058 100644
+--- a/drivers/char/sonypi.c
++++ b/drivers/char/sonypi.c
@@ -55,6 +55,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -30060,7 +31424,7 @@ diff -urNp linux-2.6.32.49/drivers/char/sonypi.c linux-2.6.32.49/drivers/char/so
int model;
struct input_dev *input_jog_dev;
struct input_dev *input_key_dev;
-@@ -895,7 +896,7 @@ static int sonypi_misc_fasync(int fd, st
+@@ -895,7 +896,7 @@ static int sonypi_misc_fasync(int fd, struct file *filp, int on)
static int sonypi_misc_release(struct inode *inode, struct file *file)
{
mutex_lock(&sonypi_device.lock);
@@ -30069,7 +31433,7 @@ diff -urNp linux-2.6.32.49/drivers/char/sonypi.c linux-2.6.32.49/drivers/char/so
mutex_unlock(&sonypi_device.lock);
return 0;
}
-@@ -905,9 +906,9 @@ static int sonypi_misc_open(struct inode
+@@ -905,9 +906,9 @@ static int sonypi_misc_open(struct inode *inode, struct file *file)
lock_kernel();
mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */
@@ -30081,10 +31445,11 @@ diff -urNp linux-2.6.32.49/drivers/char/sonypi.c linux-2.6.32.49/drivers/char/so
mutex_unlock(&sonypi_device.lock);
unlock_kernel();
return 0;
-diff -urNp linux-2.6.32.49/drivers/char/stallion.c linux-2.6.32.49/drivers/char/stallion.c
---- linux-2.6.32.49/drivers/char/stallion.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/stallion.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2448,6 +2448,8 @@ static int stl_getportstruct(struct stlp
+diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
+index db6dcfa..13834cb 100644
+--- a/drivers/char/stallion.c
++++ b/drivers/char/stallion.c
+@@ -2448,6 +2448,8 @@ static int stl_getportstruct(struct stlport __user *arg)
struct stlport stl_dummyport;
struct stlport *portp;
@@ -30093,10 +31458,33 @@ diff -urNp linux-2.6.32.49/drivers/char/stallion.c linux-2.6.32.49/drivers/char/
if (copy_from_user(&stl_dummyport, arg, sizeof(struct stlport)))
return -EFAULT;
portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr,
-diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm_bios.c linux-2.6.32.49/drivers/char/tpm/tpm_bios.c
---- linux-2.6.32.49/drivers/char/tpm/tpm_bios.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/tpm/tpm_bios.c 2011-11-15 19:59:43.000000000 -0500
-@@ -172,7 +172,7 @@ static void *tpm_bios_measurements_start
+diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
+index a0789f6..cea3902 100644
+--- a/drivers/char/tpm/tpm.c
++++ b/drivers/char/tpm/tpm.c
+@@ -405,7 +405,7 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
+ chip->vendor.req_complete_val)
+ goto out_recv;
+
+- if ((status == chip->vendor.req_canceled)) {
++ if (status == chip->vendor.req_canceled) {
+ dev_err(chip->dev, "Operation Canceled\n");
+ rc = -ECANCELED;
+ goto out;
+@@ -824,6 +824,8 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,
+
+ struct tpm_chip *chip = dev_get_drvdata(dev);
+
++ pax_track_stack();
++
+ tpm_cmd.header.in = tpm_readpubek_header;
+ err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE,
+ "attempting to read the PUBEK");
+diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
+index bf2170f..ce8cab9 100644
+--- a/drivers/char/tpm/tpm_bios.c
++++ b/drivers/char/tpm/tpm_bios.c
+@@ -172,7 +172,7 @@ static void *tpm_bios_measurements_start(struct seq_file *m, loff_t *pos)
event = addr;
if ((event->event_type == 0 && event->event_size == 0) ||
@@ -30105,7 +31493,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm_bios.c linux-2.6.32.49/drivers/c
return NULL;
return addr;
-@@ -197,7 +197,7 @@ static void *tpm_bios_measurements_next(
+@@ -197,7 +197,7 @@ static void *tpm_bios_measurements_next(struct seq_file *m, void *v,
return NULL;
if ((event->event_type == 0 && event->event_size == 0) ||
@@ -30114,7 +31502,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm_bios.c linux-2.6.32.49/drivers/c
return NULL;
(*pos)++;
-@@ -290,7 +290,8 @@ static int tpm_binary_bios_measurements_
+@@ -290,7 +290,8 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
int i;
for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++)
@@ -30124,7 +31512,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm_bios.c linux-2.6.32.49/drivers/c
return 0;
}
-@@ -409,8 +410,13 @@ static int read_log(struct tpm_bios_log
+@@ -409,8 +410,13 @@ static int read_log(struct tpm_bios_log *log)
log->bios_event_log_end = log->bios_event_log + len;
virt = acpi_os_map_memory(start, len);
@@ -30139,30 +31527,10 @@ diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm_bios.c linux-2.6.32.49/drivers/c
acpi_os_unmap_memory(virt, len);
return 0;
-diff -urNp linux-2.6.32.49/drivers/char/tpm/tpm.c linux-2.6.32.49/drivers/char/tpm/tpm.c
---- linux-2.6.32.49/drivers/char/tpm/tpm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/tpm/tpm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -405,7 +405,7 @@ static ssize_t tpm_transmit(struct tpm_c
- chip->vendor.req_complete_val)
- goto out_recv;
-
-- if ((status == chip->vendor.req_canceled)) {
-+ if (status == chip->vendor.req_canceled) {
- dev_err(chip->dev, "Operation Canceled\n");
- rc = -ECANCELED;
- goto out;
-@@ -824,6 +824,8 @@ ssize_t tpm_show_pubek(struct device *de
-
- struct tpm_chip *chip = dev_get_drvdata(dev);
-
-+ pax_track_stack();
-+
- tpm_cmd.header.in = tpm_readpubek_header;
- err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE,
- "attempting to read the PUBEK");
-diff -urNp linux-2.6.32.49/drivers/char/tty_io.c linux-2.6.32.49/drivers/char/tty_io.c
---- linux-2.6.32.49/drivers/char/tty_io.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/tty_io.c 2011-11-26 19:45:05.000000000 -0500
+diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
+index 123cedf..137edef 100644
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
@@ -1774,6 +1774,7 @@ got_driver:
if (IS_ERR(tty)) {
@@ -30171,7 +31539,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_io.c linux-2.6.32.49/drivers/char/tt
return PTR_ERR(tty);
}
}
-@@ -2603,8 +2604,10 @@ long tty_ioctl(struct file *file, unsign
+@@ -2603,8 +2604,10 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return retval;
}
@@ -30183,7 +31551,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_io.c linux-2.6.32.49/drivers/char/tt
unsigned long arg)
{
struct inode *inode = file->f_dentry->d_inode;
-@@ -2628,6 +2631,8 @@ static long tty_compat_ioctl(struct file
+@@ -2628,6 +2631,8 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
return retval;
}
@@ -30201,10 +31569,11 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_io.c linux-2.6.32.49/drivers/char/tt
}
/*
-diff -urNp linux-2.6.32.49/drivers/char/tty_ldisc.c linux-2.6.32.49/drivers/char/tty_ldisc.c
---- linux-2.6.32.49/drivers/char/tty_ldisc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/tty_ldisc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -74,7 +74,7 @@ static void put_ldisc(struct tty_ldisc *
+diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
+index d814a3d..b55b9c9 100644
+--- a/drivers/char/tty_ldisc.c
++++ b/drivers/char/tty_ldisc.c
+@@ -74,7 +74,7 @@ static void put_ldisc(struct tty_ldisc *ld)
if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
struct tty_ldisc_ops *ldo = ld->ops;
@@ -30213,7 +31582,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_ldisc.c linux-2.6.32.49/drivers/char
module_put(ldo->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-@@ -109,7 +109,7 @@ int tty_register_ldisc(int disc, struct
+@@ -109,7 +109,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
spin_lock_irqsave(&tty_ldisc_lock, flags);
tty_ldiscs[disc] = new_ldisc;
new_ldisc->num = disc;
@@ -30231,7 +31600,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_ldisc.c linux-2.6.32.49/drivers/char
ret = -EBUSY;
else
tty_ldiscs[disc] = NULL;
-@@ -158,7 +158,7 @@ static struct tty_ldisc_ops *get_ldops(i
+@@ -158,7 +158,7 @@ static struct tty_ldisc_ops *get_ldops(int disc)
if (ldops) {
ret = ERR_PTR(-EAGAIN);
if (try_module_get(ldops->owner)) {
@@ -30240,7 +31609,7 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_ldisc.c linux-2.6.32.49/drivers/char
ret = ldops;
}
}
-@@ -171,7 +171,7 @@ static void put_ldops(struct tty_ldisc_o
+@@ -171,7 +171,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
unsigned long flags;
spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -30249,10 +31618,11 @@ diff -urNp linux-2.6.32.49/drivers/char/tty_ldisc.c linux-2.6.32.49/drivers/char
module_put(ldops->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
}
-diff -urNp linux-2.6.32.49/drivers/char/virtio_console.c linux-2.6.32.49/drivers/char/virtio_console.c
---- linux-2.6.32.49/drivers/char/virtio_console.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/virtio_console.c 2011-11-15 19:59:43.000000000 -0500
-@@ -133,7 +133,9 @@ static int get_chars(u32 vtermno, char *
+diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
+index a035ae3..c27fe2c 100644
+--- a/drivers/char/virtio_console.c
++++ b/drivers/char/virtio_console.c
+@@ -133,7 +133,9 @@ static int get_chars(u32 vtermno, char *buf, int count)
* virtqueue, so we let the drivers do some boutique early-output thing. */
int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int))
{
@@ -30263,7 +31633,7 @@ diff -urNp linux-2.6.32.49/drivers/char/virtio_console.c linux-2.6.32.49/drivers
return hvc_instantiate(0, 0, &virtio_cons);
}
-@@ -213,11 +215,13 @@ static int __devinit virtcons_probe(stru
+@@ -213,11 +215,13 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
out_vq = vqs[1];
/* Start using the new console output. */
@@ -30282,10 +31652,11 @@ diff -urNp linux-2.6.32.49/drivers/char/virtio_console.c linux-2.6.32.49/drivers
/* The first argument of hvc_alloc() is the virtual console number, so
* we use zero. The second argument is the parameter for the
-diff -urNp linux-2.6.32.49/drivers/char/vt.c linux-2.6.32.49/drivers/char/vt.c
---- linux-2.6.32.49/drivers/char/vt.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/vt.c 2011-11-15 19:59:43.000000000 -0500
-@@ -243,7 +243,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier
+diff --git a/drivers/char/vt.c b/drivers/char/vt.c
+index 0c80c68..53d59c1 100644
+--- a/drivers/char/vt.c
++++ b/drivers/char/vt.c
+@@ -243,7 +243,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier);
static void notify_write(struct vc_data *vc, unsigned int unicode)
{
@@ -30294,10 +31665,11 @@ diff -urNp linux-2.6.32.49/drivers/char/vt.c linux-2.6.32.49/drivers/char/vt.c
atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, &param);
}
-diff -urNp linux-2.6.32.49/drivers/char/vt_ioctl.c linux-2.6.32.49/drivers/char/vt_ioctl.c
---- linux-2.6.32.49/drivers/char/vt_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/char/vt_ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -210,9 +210,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __
+diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
+index 6351a26..999af95 100644
+--- a/drivers/char/vt_ioctl.c
++++ b/drivers/char/vt_ioctl.c
+@@ -210,9 +210,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
return -EFAULT;
@@ -30307,7 +31679,7 @@ diff -urNp linux-2.6.32.49/drivers/char/vt_ioctl.c linux-2.6.32.49/drivers/char/
switch (cmd) {
case KDGKBENT:
key_map = key_maps[s];
-@@ -224,8 +221,12 @@ do_kdsk_ioctl(int cmd, struct kbentry __
+@@ -224,8 +221,12 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
val = (i ? K_HOLE : K_NOSUCHMAP);
return put_user(val, &user_kbe->kb_value);
case KDSKBENT:
@@ -30320,7 +31692,7 @@ diff -urNp linux-2.6.32.49/drivers/char/vt_ioctl.c linux-2.6.32.49/drivers/char/
if (!i && v == K_NOSUCHMAP) {
/* deallocate map */
key_map = key_maps[s];
-@@ -325,9 +326,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
+@@ -325,9 +326,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
int i, j, k;
int ret;
@@ -30330,7 +31702,7 @@ diff -urNp linux-2.6.32.49/drivers/char/vt_ioctl.c linux-2.6.32.49/drivers/char/
kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
if (!kbs) {
ret = -ENOMEM;
-@@ -361,6 +359,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
+@@ -361,6 +359,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
kfree(kbs);
return ((p && *p) ? -EOVERFLOW : 0);
case KDSKBSENT:
@@ -30340,10 +31712,11 @@ diff -urNp linux-2.6.32.49/drivers/char/vt_ioctl.c linux-2.6.32.49/drivers/char/
if (!perm) {
ret = -EPERM;
goto reterr;
-diff -urNp linux-2.6.32.49/drivers/cpufreq/cpufreq.c linux-2.6.32.49/drivers/cpufreq/cpufreq.c
---- linux-2.6.32.49/drivers/cpufreq/cpufreq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/cpufreq/cpufreq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -750,7 +750,7 @@ static void cpufreq_sysfs_release(struct
+diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
+index c7ae026..1769c1d 100644
+--- a/drivers/cpufreq/cpufreq.c
++++ b/drivers/cpufreq/cpufreq.c
+@@ -750,7 +750,7 @@ static void cpufreq_sysfs_release(struct kobject *kobj)
complete(&policy->kobj_unregister);
}
@@ -30352,10 +31725,11 @@ diff -urNp linux-2.6.32.49/drivers/cpufreq/cpufreq.c linux-2.6.32.49/drivers/cpu
.show = show,
.store = store,
};
-diff -urNp linux-2.6.32.49/drivers/cpuidle/sysfs.c linux-2.6.32.49/drivers/cpuidle/sysfs.c
---- linux-2.6.32.49/drivers/cpuidle/sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/cpuidle/sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -191,7 +191,7 @@ static ssize_t cpuidle_store(struct kobj
+diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
+index 97b0038..2056670 100644
+--- a/drivers/cpuidle/sysfs.c
++++ b/drivers/cpuidle/sysfs.c
+@@ -191,7 +191,7 @@ static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr,
return ret;
}
@@ -30364,7 +31738,7 @@ diff -urNp linux-2.6.32.49/drivers/cpuidle/sysfs.c linux-2.6.32.49/drivers/cpuid
.show = cpuidle_show,
.store = cpuidle_store,
};
-@@ -277,7 +277,7 @@ static ssize_t cpuidle_state_show(struct
+@@ -277,7 +277,7 @@ static ssize_t cpuidle_state_show(struct kobject * kobj,
return ret;
}
@@ -30373,7 +31747,7 @@ diff -urNp linux-2.6.32.49/drivers/cpuidle/sysfs.c linux-2.6.32.49/drivers/cpuid
.show = cpuidle_state_show,
};
-@@ -294,7 +294,7 @@ static struct kobj_type ktype_state_cpui
+@@ -294,7 +294,7 @@ static struct kobj_type ktype_state_cpuidle = {
.release = cpuidle_state_sysfs_release,
};
@@ -30382,10 +31756,11 @@ diff -urNp linux-2.6.32.49/drivers/cpuidle/sysfs.c linux-2.6.32.49/drivers/cpuid
{
kobject_put(&device->kobjs[i]->kobj);
wait_for_completion(&device->kobjs[i]->kobj_unregister);
-diff -urNp linux-2.6.32.49/drivers/crypto/hifn_795x.c linux-2.6.32.49/drivers/crypto/hifn_795x.c
---- linux-2.6.32.49/drivers/crypto/hifn_795x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/crypto/hifn_795x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1655,6 +1655,8 @@ static int hifn_test(struct hifn_device
+diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
+index 5f753fc..0377ae9 100644
+--- a/drivers/crypto/hifn_795x.c
++++ b/drivers/crypto/hifn_795x.c
+@@ -1655,6 +1655,8 @@ static int hifn_test(struct hifn_device *dev, int encdec, u8 snum)
0xCA, 0x34, 0x2B, 0x2E};
struct scatterlist sg;
@@ -30394,10 +31769,11 @@ diff -urNp linux-2.6.32.49/drivers/crypto/hifn_795x.c linux-2.6.32.49/drivers/cr
memset(src, 0, sizeof(src));
memset(ctx.key, 0, sizeof(ctx.key));
-diff -urNp linux-2.6.32.49/drivers/crypto/padlock-aes.c linux-2.6.32.49/drivers/crypto/padlock-aes.c
---- linux-2.6.32.49/drivers/crypto/padlock-aes.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/crypto/padlock-aes.c 2011-11-15 19:59:43.000000000 -0500
-@@ -108,6 +108,8 @@ static int aes_set_key(struct crypto_tfm
+diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
+index 71e6482..de8d96c 100644
+--- a/drivers/crypto/padlock-aes.c
++++ b/drivers/crypto/padlock-aes.c
+@@ -108,6 +108,8 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
struct crypto_aes_ctx gen_aes;
int cpu;
@@ -30406,10 +31782,11 @@ diff -urNp linux-2.6.32.49/drivers/crypto/padlock-aes.c linux-2.6.32.49/drivers/
if (key_len % 8) {
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
-diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma.c linux-2.6.32.49/drivers/dma/ioat/dma.c
---- linux-2.6.32.49/drivers/dma/ioat/dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/dma/ioat/dma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1146,7 +1146,7 @@ ioat_attr_show(struct kobject *kobj, str
+diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
+index dcc4ab7..cc834bb 100644
+--- a/drivers/dma/ioat/dma.c
++++ b/drivers/dma/ioat/dma.c
+@@ -1146,7 +1146,7 @@ ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
return entry->show(&chan->common, page);
}
@@ -30418,10 +31795,11 @@ diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma.c linux-2.6.32.49/drivers/dma/io
.show = ioat_attr_show,
};
-diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma.h linux-2.6.32.49/drivers/dma/ioat/dma.h
---- linux-2.6.32.49/drivers/dma/ioat/dma.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/dma/ioat/dma.h 2011-11-15 19:59:43.000000000 -0500
-@@ -347,7 +347,7 @@ bool ioat_cleanup_preamble(struct ioat_c
+diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
+index bbc3e78..f2db62c 100644
+--- a/drivers/dma/ioat/dma.h
++++ b/drivers/dma/ioat/dma.h
+@@ -347,7 +347,7 @@ bool ioat_cleanup_preamble(struct ioat_chan_common *chan,
unsigned long *phys_complete);
void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type);
void ioat_kobject_del(struct ioatdma_device *device);
@@ -30430,9 +31808,10 @@ diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma.h linux-2.6.32.49/drivers/dma/io
extern struct ioat_sysfs_entry ioat_version_attr;
extern struct ioat_sysfs_entry ioat_cap_attr;
#endif /* IOATDMA_H */
-diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma_v3.c linux-2.6.32.49/drivers/dma/ioat/dma_v3.c
---- linux-2.6.32.49/drivers/dma/ioat/dma_v3.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/dma/ioat/dma_v3.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
+index 9908c9e..3ceb0e5 100644
+--- a/drivers/dma/ioat/dma_v3.c
++++ b/drivers/dma/ioat/dma_v3.c
@@ -71,10 +71,10 @@
/* provide a lookup table for setting the source address in the base or
* extended descriptor of an xor or pq descriptor
@@ -30448,10 +31827,11 @@ diff -urNp linux-2.6.32.49/drivers/dma/ioat/dma_v3.c linux-2.6.32.49/drivers/dma
static dma_addr_t xor_get_src(struct ioat_raw_descriptor *descs[2], int idx)
{
-diff -urNp linux-2.6.32.49/drivers/edac/amd64_edac.c linux-2.6.32.49/drivers/edac/amd64_edac.c
---- linux-2.6.32.49/drivers/edac/amd64_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/amd64_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -3099,7 +3099,7 @@ static void __devexit amd64_remove_one_i
+diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
+index 85c464a..afd1e73 100644
+--- a/drivers/edac/amd64_edac.c
++++ b/drivers/edac/amd64_edac.c
+@@ -3099,7 +3099,7 @@ static void __devexit amd64_remove_one_instance(struct pci_dev *pdev)
* PCI core identifies what devices are on a system during boot, and then
* inquiry this table to see if this driver is for a given device found.
*/
@@ -30460,10 +31840,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/amd64_edac.c linux-2.6.32.49/drivers/eda
{
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_K8_NB_MEMCTL,
-diff -urNp linux-2.6.32.49/drivers/edac/amd76x_edac.c linux-2.6.32.49/drivers/edac/amd76x_edac.c
---- linux-2.6.32.49/drivers/edac/amd76x_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/amd76x_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -322,7 +322,7 @@ static void __devexit amd76x_remove_one(
+diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
+index 2b95f1a..4f52793 100644
+--- a/drivers/edac/amd76x_edac.c
++++ b/drivers/edac/amd76x_edac.c
+@@ -322,7 +322,7 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30472,10 +31853,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/amd76x_edac.c linux-2.6.32.49/drivers/ed
{
PCI_VEND_DEV(AMD, FE_GATE_700C), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
AMD762},
-diff -urNp linux-2.6.32.49/drivers/edac/e752x_edac.c linux-2.6.32.49/drivers/edac/e752x_edac.c
---- linux-2.6.32.49/drivers/edac/e752x_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/e752x_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -1282,7 +1282,7 @@ static void __devexit e752x_remove_one(s
+diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
+index d205d49..74c9672 100644
+--- a/drivers/edac/e752x_edac.c
++++ b/drivers/edac/e752x_edac.c
+@@ -1282,7 +1282,7 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30484,10 +31866,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/e752x_edac.c linux-2.6.32.49/drivers/eda
{
PCI_VEND_DEV(INTEL, 7520_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
E7520},
-diff -urNp linux-2.6.32.49/drivers/edac/e7xxx_edac.c linux-2.6.32.49/drivers/edac/e7xxx_edac.c
---- linux-2.6.32.49/drivers/edac/e7xxx_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/e7xxx_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -526,7 +526,7 @@ static void __devexit e7xxx_remove_one(s
+diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
+index c7d11cc..c59c1ca 100644
+--- a/drivers/edac/e7xxx_edac.c
++++ b/drivers/edac/e7xxx_edac.c
+@@ -526,7 +526,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30496,10 +31879,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/e7xxx_edac.c linux-2.6.32.49/drivers/eda
{
PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
E7205},
-diff -urNp linux-2.6.32.49/drivers/edac/edac_device_sysfs.c linux-2.6.32.49/drivers/edac/edac_device_sysfs.c
---- linux-2.6.32.49/drivers/edac/edac_device_sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/edac_device_sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -137,7 +137,7 @@ static ssize_t edac_dev_ctl_info_store(s
+diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c
+index 5376457..5fdedbc 100644
+--- a/drivers/edac/edac_device_sysfs.c
++++ b/drivers/edac/edac_device_sysfs.c
+@@ -137,7 +137,7 @@ static ssize_t edac_dev_ctl_info_store(struct kobject *kobj,
}
/* edac_dev file operations for an 'ctl_info' */
@@ -30508,7 +31892,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_device_sysfs.c linux-2.6.32.49/driv
.show = edac_dev_ctl_info_show,
.store = edac_dev_ctl_info_store
};
-@@ -373,7 +373,7 @@ static ssize_t edac_dev_instance_store(s
+@@ -373,7 +373,7 @@ static ssize_t edac_dev_instance_store(struct kobject *kobj,
}
/* edac_dev file operations for an 'instance' */
@@ -30517,7 +31901,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_device_sysfs.c linux-2.6.32.49/driv
.show = edac_dev_instance_show,
.store = edac_dev_instance_store
};
-@@ -476,7 +476,7 @@ static ssize_t edac_dev_block_store(stru
+@@ -476,7 +476,7 @@ static ssize_t edac_dev_block_store(struct kobject *kobj,
}
/* edac_dev file operations for a 'block' */
@@ -30526,10 +31910,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_device_sysfs.c linux-2.6.32.49/driv
.show = edac_dev_block_show,
.store = edac_dev_block_store
};
-diff -urNp linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c
---- linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -245,7 +245,7 @@ static ssize_t csrowdev_store(struct kob
+diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
+index e1d4ce0..88840e9 100644
+--- a/drivers/edac/edac_mc_sysfs.c
++++ b/drivers/edac/edac_mc_sysfs.c
+@@ -245,7 +245,7 @@ static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr,
return -EIO;
}
@@ -30538,7 +31923,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c linux-2.6.32.49/drivers/
.show = csrowdev_show,
.store = csrowdev_store
};
-@@ -575,7 +575,7 @@ static ssize_t mcidev_store(struct kobje
+@@ -575,7 +575,7 @@ static ssize_t mcidev_store(struct kobject *kobj, struct attribute *attr,
}
/* Intermediate show/store table */
@@ -30547,10 +31932,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_mc_sysfs.c linux-2.6.32.49/drivers/
.show = mcidev_show,
.store = mcidev_store
};
-diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c
---- linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -25,8 +25,8 @@ static int edac_pci_log_pe = 1; /* log
+diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
+index 422728c..d8d9c88 100644
+--- a/drivers/edac/edac_pci_sysfs.c
++++ b/drivers/edac/edac_pci_sysfs.c
+@@ -25,8 +25,8 @@ static int edac_pci_log_pe = 1; /* log PCI parity errors */
static int edac_pci_log_npe = 1; /* log PCI non-parity error errors */
static int edac_pci_poll_msec = 1000; /* one second workq period */
@@ -30561,7 +31947,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
static struct kobject *edac_pci_top_main_kobj;
static atomic_t edac_pci_sysfs_refcount = ATOMIC_INIT(0);
-@@ -121,7 +121,7 @@ static ssize_t edac_pci_instance_store(s
+@@ -121,7 +121,7 @@ static ssize_t edac_pci_instance_store(struct kobject *kobj,
}
/* fs_ops table */
@@ -30570,7 +31956,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
.show = edac_pci_instance_show,
.store = edac_pci_instance_store
};
-@@ -261,7 +261,7 @@ static ssize_t edac_pci_dev_store(struct
+@@ -261,7 +261,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
return -EIO;
}
@@ -30579,7 +31965,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
.show = edac_pci_dev_show,
.store = edac_pci_dev_store
};
-@@ -579,7 +579,7 @@ static void edac_pci_dev_parity_test(str
+@@ -579,7 +579,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI,
"Signaled System Error on %s\n",
pci_name(dev));
@@ -30588,7 +31974,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -587,7 +587,7 @@ static void edac_pci_dev_parity_test(str
+@@ -587,7 +587,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on %s\n",
pci_name(dev));
@@ -30597,7 +31983,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -595,7 +595,7 @@ static void edac_pci_dev_parity_test(str
+@@ -595,7 +595,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -30606,7 +31992,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
}
}
-@@ -616,7 +616,7 @@ static void edac_pci_dev_parity_test(str
+@@ -616,7 +616,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
"Signaled System Error on %s\n",
pci_name(dev));
@@ -30615,7 +32001,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -624,7 +624,7 @@ static void edac_pci_dev_parity_test(str
+@@ -624,7 +624,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on "
"%s\n", pci_name(dev));
@@ -30624,7 +32010,7 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -632,7 +632,7 @@ static void edac_pci_dev_parity_test(str
+@@ -632,7 +632,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -30651,10 +32037,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/edac_pci_sysfs.c linux-2.6.32.49/drivers
panic("EDAC: PCI Parity Error");
}
}
-diff -urNp linux-2.6.32.49/drivers/edac/i3000_edac.c linux-2.6.32.49/drivers/edac/i3000_edac.c
---- linux-2.6.32.49/drivers/edac/i3000_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i3000_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -471,7 +471,7 @@ static void __devexit i3000_remove_one(s
+diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
+index 6c9a0f2..9c1cf7e 100644
+--- a/drivers/edac/i3000_edac.c
++++ b/drivers/edac/i3000_edac.c
+@@ -471,7 +471,7 @@ static void __devexit i3000_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30663,10 +32050,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i3000_edac.c linux-2.6.32.49/drivers/eda
{
PCI_VEND_DEV(INTEL, 3000_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I3000},
-diff -urNp linux-2.6.32.49/drivers/edac/i3200_edac.c linux-2.6.32.49/drivers/edac/i3200_edac.c
---- linux-2.6.32.49/drivers/edac/i3200_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i3200_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -444,7 +444,7 @@ static void __devexit i3200_remove_one(s
+diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
+index fde4db9..fe108f9 100644
+--- a/drivers/edac/i3200_edac.c
++++ b/drivers/edac/i3200_edac.c
+@@ -444,7 +444,7 @@ static void __devexit i3200_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30675,10 +32063,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i3200_edac.c linux-2.6.32.49/drivers/eda
{
PCI_VEND_DEV(INTEL, 3200_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I3200},
-diff -urNp linux-2.6.32.49/drivers/edac/i5000_edac.c linux-2.6.32.49/drivers/edac/i5000_edac.c
---- linux-2.6.32.49/drivers/edac/i5000_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i5000_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -1516,7 +1516,7 @@ static void __devexit i5000_remove_one(s
+diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
+index adc10a2..57d4ccf 100644
+--- a/drivers/edac/i5000_edac.c
++++ b/drivers/edac/i5000_edac.c
+@@ -1516,7 +1516,7 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev)
*
* The "E500P" device is the first device supported.
*/
@@ -30687,10 +32076,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i5000_edac.c linux-2.6.32.49/drivers/eda
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000_DEV16),
.driver_data = I5000P},
-diff -urNp linux-2.6.32.49/drivers/edac/i5100_edac.c linux-2.6.32.49/drivers/edac/i5100_edac.c
---- linux-2.6.32.49/drivers/edac/i5100_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i5100_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -944,7 +944,7 @@ static void __devexit i5100_remove_one(s
+diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
+index 22db05a..b2b5503 100644
+--- a/drivers/edac/i5100_edac.c
++++ b/drivers/edac/i5100_edac.c
+@@ -944,7 +944,7 @@ static void __devexit i5100_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30699,10 +32089,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i5100_edac.c linux-2.6.32.49/drivers/eda
/* Device 16, Function 0, Channel 0 Memory Map, Error Flag/Mask, ... */
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5100_16) },
{ 0, }
-diff -urNp linux-2.6.32.49/drivers/edac/i5400_edac.c linux-2.6.32.49/drivers/edac/i5400_edac.c
---- linux-2.6.32.49/drivers/edac/i5400_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i5400_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -1383,7 +1383,7 @@ static void __devexit i5400_remove_one(s
+diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
+index f99d106..f050710 100644
+--- a/drivers/edac/i5400_edac.c
++++ b/drivers/edac/i5400_edac.c
+@@ -1383,7 +1383,7 @@ static void __devexit i5400_remove_one(struct pci_dev *pdev)
*
* The "E500P" device is the first device supported.
*/
@@ -30711,10 +32102,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i5400_edac.c linux-2.6.32.49/drivers/eda
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR)},
{0,} /* 0 terminated list. */
};
-diff -urNp linux-2.6.32.49/drivers/edac/i82443bxgx_edac.c linux-2.6.32.49/drivers/edac/i82443bxgx_edac.c
---- linux-2.6.32.49/drivers/edac/i82443bxgx_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i82443bxgx_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -381,7 +381,7 @@ static void __devexit i82443bxgx_edacmc_
+diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
+index 577760a..9ce16ce 100644
+--- a/drivers/edac/i82443bxgx_edac.c
++++ b/drivers/edac/i82443bxgx_edac.c
+@@ -381,7 +381,7 @@ static void __devexit i82443bxgx_edacmc_remove_one(struct pci_dev *pdev)
EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_remove_one);
@@ -30723,10 +32115,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i82443bxgx_edac.c linux-2.6.32.49/driver
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0)},
-diff -urNp linux-2.6.32.49/drivers/edac/i82860_edac.c linux-2.6.32.49/drivers/edac/i82860_edac.c
---- linux-2.6.32.49/drivers/edac/i82860_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i82860_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -271,7 +271,7 @@ static void __devexit i82860_remove_one(
+diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
+index c0088ba..64a7b98 100644
+--- a/drivers/edac/i82860_edac.c
++++ b/drivers/edac/i82860_edac.c
+@@ -271,7 +271,7 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30735,10 +32128,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i82860_edac.c linux-2.6.32.49/drivers/ed
{
PCI_VEND_DEV(INTEL, 82860_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82860},
-diff -urNp linux-2.6.32.49/drivers/edac/i82875p_edac.c linux-2.6.32.49/drivers/edac/i82875p_edac.c
---- linux-2.6.32.49/drivers/edac/i82875p_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i82875p_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -512,7 +512,7 @@ static void __devexit i82875p_remove_one
+diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
+index b2d83b9..a34357b 100644
+--- a/drivers/edac/i82875p_edac.c
++++ b/drivers/edac/i82875p_edac.c
+@@ -512,7 +512,7 @@ static void __devexit i82875p_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30747,10 +32141,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i82875p_edac.c linux-2.6.32.49/drivers/e
{
PCI_VEND_DEV(INTEL, 82875_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82875P},
-diff -urNp linux-2.6.32.49/drivers/edac/i82975x_edac.c linux-2.6.32.49/drivers/edac/i82975x_edac.c
---- linux-2.6.32.49/drivers/edac/i82975x_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/i82975x_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -586,7 +586,7 @@ static void __devexit i82975x_remove_one
+diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
+index 2eed3ea..87bbbd1 100644
+--- a/drivers/edac/i82975x_edac.c
++++ b/drivers/edac/i82975x_edac.c
+@@ -586,7 +586,7 @@ static void __devexit i82975x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30759,10 +32154,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/i82975x_edac.c linux-2.6.32.49/drivers/e
{
PCI_VEND_DEV(INTEL, 82975_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82975X
-diff -urNp linux-2.6.32.49/drivers/edac/r82600_edac.c linux-2.6.32.49/drivers/edac/r82600_edac.c
---- linux-2.6.32.49/drivers/edac/r82600_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/r82600_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -374,7 +374,7 @@ static void __devexit r82600_remove_one(
+diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
+index 9900675..78ac2b6 100644
+--- a/drivers/edac/r82600_edac.c
++++ b/drivers/edac/r82600_edac.c
+@@ -374,7 +374,7 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30771,10 +32167,11 @@ diff -urNp linux-2.6.32.49/drivers/edac/r82600_edac.c linux-2.6.32.49/drivers/ed
{
PCI_DEVICE(PCI_VENDOR_ID_RADISYS, R82600_BRIDGE_ID)
},
-diff -urNp linux-2.6.32.49/drivers/edac/x38_edac.c linux-2.6.32.49/drivers/edac/x38_edac.c
---- linux-2.6.32.49/drivers/edac/x38_edac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/edac/x38_edac.c 2011-11-18 18:01:55.000000000 -0500
-@@ -441,7 +441,7 @@ static void __devexit x38_remove_one(str
+diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
+index d4ec605..4cfec4e 100644
+--- a/drivers/edac/x38_edac.c
++++ b/drivers/edac/x38_edac.c
+@@ -441,7 +441,7 @@ static void __devexit x38_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -30783,9 +32180,10 @@ diff -urNp linux-2.6.32.49/drivers/edac/x38_edac.c linux-2.6.32.49/drivers/edac/
{
PCI_VEND_DEV(INTEL, X38_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
X38},
-diff -urNp linux-2.6.32.49/drivers/firewire/core-card.c linux-2.6.32.49/drivers/firewire/core-card.c
---- linux-2.6.32.49/drivers/firewire/core-card.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firewire/core-card.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
+index 3fc2ceb..daf098f 100644
+--- a/drivers/firewire/core-card.c
++++ b/drivers/firewire/core-card.c
@@ -558,7 +558,7 @@ void fw_card_release(struct kref *kref)
void fw_core_remove_card(struct fw_card *card)
@@ -30795,10 +32193,11 @@ diff -urNp linux-2.6.32.49/drivers/firewire/core-card.c linux-2.6.32.49/drivers/
card->driver->update_phy_reg(card, 4,
PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
-diff -urNp linux-2.6.32.49/drivers/firewire/core-cdev.c linux-2.6.32.49/drivers/firewire/core-cdev.c
---- linux-2.6.32.49/drivers/firewire/core-cdev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firewire/core-cdev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1141,8 +1141,7 @@ static int init_iso_resource(struct clie
+diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
+index 4560d8f..36db24a 100644
+--- a/drivers/firewire/core-cdev.c
++++ b/drivers/firewire/core-cdev.c
+@@ -1141,8 +1141,7 @@ static int init_iso_resource(struct client *client,
int ret;
if ((request->channels == 0 && request->bandwidth == 0) ||
@@ -30808,20 +32207,10 @@ diff -urNp linux-2.6.32.49/drivers/firewire/core-cdev.c linux-2.6.32.49/drivers/
return -EINVAL;
r = kmalloc(sizeof(*r), GFP_KERNEL);
-diff -urNp linux-2.6.32.49/drivers/firewire/core.h linux-2.6.32.49/drivers/firewire/core.h
---- linux-2.6.32.49/drivers/firewire/core.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firewire/core.h 2011-11-15 19:59:43.000000000 -0500
-@@ -86,6 +86,7 @@ struct fw_card_driver {
-
- int (*stop_iso)(struct fw_iso_context *ctx);
- };
-+typedef struct fw_card_driver __no_const fw_card_driver_no_const;
-
- void fw_card_initialize(struct fw_card *card,
- const struct fw_card_driver *driver, struct device *device);
-diff -urNp linux-2.6.32.49/drivers/firewire/core-transaction.c linux-2.6.32.49/drivers/firewire/core-transaction.c
---- linux-2.6.32.49/drivers/firewire/core-transaction.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firewire/core-transaction.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
+index da628c7..cf54a2c 100644
+--- a/drivers/firewire/core-transaction.c
++++ b/drivers/firewire/core-transaction.c
@@ -36,6 +36,7 @@
#include <linux/string.h>
#include <linux/timer.h>
@@ -30830,7 +32219,7 @@ diff -urNp linux-2.6.32.49/drivers/firewire/core-transaction.c linux-2.6.32.49/d
#include <asm/byteorder.h>
-@@ -344,6 +345,8 @@ int fw_run_transaction(struct fw_card *c
+@@ -344,6 +345,8 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id,
struct transaction_callback_data d;
struct fw_transaction t;
@@ -30839,9 +32228,22 @@ diff -urNp linux-2.6.32.49/drivers/firewire/core-transaction.c linux-2.6.32.49/d
init_completion(&d.done);
d.payload = payload;
fw_send_request(card, &t, tcode, destination_id, generation, speed,
-diff -urNp linux-2.6.32.49/drivers/firmware/dmi_scan.c linux-2.6.32.49/drivers/firmware/dmi_scan.c
---- linux-2.6.32.49/drivers/firmware/dmi_scan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firmware/dmi_scan.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
+index 7ff6e75..a2965d9 100644
+--- a/drivers/firewire/core.h
++++ b/drivers/firewire/core.h
+@@ -86,6 +86,7 @@ struct fw_card_driver {
+
+ int (*stop_iso)(struct fw_iso_context *ctx);
+ };
++typedef struct fw_card_driver __no_const fw_card_driver_no_const;
+
+ void fw_card_initialize(struct fw_card *card,
+ const struct fw_card_driver *driver, struct device *device);
+diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
+index 3a2ccb0..82fd7c4 100644
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
@@ -391,11 +391,6 @@ void __init dmi_scan_machine(void)
}
}
@@ -30854,7 +32256,7 @@ diff -urNp linux-2.6.32.49/drivers/firmware/dmi_scan.c linux-2.6.32.49/drivers/f
p = dmi_ioremap(0xF0000, 0x10000);
if (p == NULL)
goto error;
-@@ -667,7 +662,7 @@ int dmi_walk(void (*decode)(const struct
+@@ -667,7 +662,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
if (buf == NULL)
return -1;
@@ -30863,10 +32265,11 @@ diff -urNp linux-2.6.32.49/drivers/firmware/dmi_scan.c linux-2.6.32.49/drivers/f
iounmap(buf);
return 0;
-diff -urNp linux-2.6.32.49/drivers/firmware/edd.c linux-2.6.32.49/drivers/firmware/edd.c
---- linux-2.6.32.49/drivers/firmware/edd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firmware/edd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -122,7 +122,7 @@ edd_attr_show(struct kobject * kobj, str
+diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
+index 9e4f59d..110e24e 100644
+--- a/drivers/firmware/edd.c
++++ b/drivers/firmware/edd.c
+@@ -122,7 +122,7 @@ edd_attr_show(struct kobject * kobj, struct attribute *attr, char *buf)
return ret;
}
@@ -30875,10 +32278,11 @@ diff -urNp linux-2.6.32.49/drivers/firmware/edd.c linux-2.6.32.49/drivers/firmwa
.show = edd_attr_show,
};
-diff -urNp linux-2.6.32.49/drivers/firmware/efivars.c linux-2.6.32.49/drivers/firmware/efivars.c
---- linux-2.6.32.49/drivers/firmware/efivars.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firmware/efivars.c 2011-11-15 19:59:43.000000000 -0500
-@@ -362,7 +362,7 @@ static ssize_t efivar_attr_store(struct
+diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
+index f4f709d..082f06e 100644
+--- a/drivers/firmware/efivars.c
++++ b/drivers/firmware/efivars.c
+@@ -362,7 +362,7 @@ static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -30887,10 +32291,11 @@ diff -urNp linux-2.6.32.49/drivers/firmware/efivars.c linux-2.6.32.49/drivers/fi
.show = efivar_attr_show,
.store = efivar_attr_store,
};
-diff -urNp linux-2.6.32.49/drivers/firmware/iscsi_ibft.c linux-2.6.32.49/drivers/firmware/iscsi_ibft.c
---- linux-2.6.32.49/drivers/firmware/iscsi_ibft.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firmware/iscsi_ibft.c 2011-11-15 19:59:43.000000000 -0500
-@@ -525,7 +525,7 @@ static ssize_t ibft_show_attribute(struc
+diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
+index 051d1eb..0a5d4e7 100644
+--- a/drivers/firmware/iscsi_ibft.c
++++ b/drivers/firmware/iscsi_ibft.c
+@@ -525,7 +525,7 @@ static ssize_t ibft_show_attribute(struct kobject *kobj,
return ret;
}
@@ -30899,9 +32304,10 @@ diff -urNp linux-2.6.32.49/drivers/firmware/iscsi_ibft.c linux-2.6.32.49/drivers
.show = ibft_show_attribute,
};
-diff -urNp linux-2.6.32.49/drivers/firmware/memmap.c linux-2.6.32.49/drivers/firmware/memmap.c
---- linux-2.6.32.49/drivers/firmware/memmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/firmware/memmap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
+index 56f9234..8c58c7b 100644
+--- a/drivers/firmware/memmap.c
++++ b/drivers/firmware/memmap.c
@@ -74,7 +74,7 @@ static struct attribute *def_attrs[] = {
NULL
};
@@ -30911,9 +32317,10 @@ diff -urNp linux-2.6.32.49/drivers/firmware/memmap.c linux-2.6.32.49/drivers/fir
.show = memmap_attr_show,
};
-diff -urNp linux-2.6.32.49/drivers/gpio/vr41xx_giu.c linux-2.6.32.49/drivers/gpio/vr41xx_giu.c
---- linux-2.6.32.49/drivers/gpio/vr41xx_giu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpio/vr41xx_giu.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpio/vr41xx_giu.c b/drivers/gpio/vr41xx_giu.c
+index b16c9a8..2af7d3f 100644
+--- a/drivers/gpio/vr41xx_giu.c
++++ b/drivers/gpio/vr41xx_giu.c
@@ -204,7 +204,7 @@ static int giu_get_irq(unsigned int irq)
printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
maskl, pendl, maskh, pendh);
@@ -30923,10 +32330,11 @@ diff -urNp linux-2.6.32.49/drivers/gpio/vr41xx_giu.c linux-2.6.32.49/drivers/gpi
return -EINVAL;
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1323,7 +1323,7 @@ int drm_mode_getconnector(struct drm_dev
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index bea6efc..3dc0f42 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
+@@ -1323,7 +1323,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
*/
if ((out_resp->count_modes >= mode_count) && mode_count) {
copied = 0;
@@ -30935,7 +32343,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
list_for_each_entry(mode, &connector->modes, head) {
drm_crtc_convert_to_umode(&u_mode, mode);
if (copy_to_user(mode_ptr + copied,
-@@ -1338,8 +1338,8 @@ int drm_mode_getconnector(struct drm_dev
+@@ -1338,8 +1338,8 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
if ((out_resp->count_props >= props_count) && props_count) {
copied = 0;
@@ -30946,7 +32354,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) {
if (connector->property_ids[i] != 0) {
if (put_user(connector->property_ids[i],
-@@ -1361,7 +1361,7 @@ int drm_mode_getconnector(struct drm_dev
+@@ -1361,7 +1361,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
if ((out_resp->count_encoders >= encoders_count) && encoders_count) {
copied = 0;
@@ -30955,7 +32363,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
if (connector->encoder_ids[i] != 0) {
if (put_user(connector->encoder_ids[i],
-@@ -1513,7 +1513,7 @@ int drm_mode_setcrtc(struct drm_device *
+@@ -1513,7 +1513,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
}
for (i = 0; i < crtc_req->count_connectors; i++) {
@@ -30964,7 +32372,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
if (get_user(out_id, &set_connectors_ptr[i])) {
ret = -EFAULT;
goto out;
-@@ -2118,7 +2118,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -2118,7 +2118,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
out_resp->flags = property->flags;
if ((out_resp->count_values >= value_count) && value_count) {
@@ -30973,7 +32381,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
for (i = 0; i < value_count; i++) {
if (copy_to_user(values_ptr + i, &property->values[i], sizeof(uint64_t))) {
ret = -EFAULT;
-@@ -2131,7 +2131,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -2131,7 +2131,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
if (property->flags & DRM_MODE_PROP_ENUM) {
if ((out_resp->count_enum_blobs >= enum_count) && enum_count) {
copied = 0;
@@ -30982,7 +32390,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
list_for_each_entry(prop_enum, &property->enum_blob_list, head) {
if (copy_to_user(&enum_ptr[copied].value, &prop_enum->value, sizeof(uint64_t))) {
-@@ -2154,7 +2154,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -2154,7 +2154,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
if ((out_resp->count_enum_blobs >= blob_count) && blob_count) {
copied = 0;
blob_id_ptr = (uint32_t *)(unsigned long)out_resp->enum_blob_ptr;
@@ -30991,7 +32399,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
list_for_each_entry(prop_blob, &property->enum_blob_list, head) {
if (put_user(prop_blob->base.id, blob_id_ptr + copied)) {
-@@ -2226,7 +2226,7 @@ int drm_mode_getblob_ioctl(struct drm_de
+@@ -2226,7 +2226,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
blob = obj_to_blob(obj);
if (out_resp->length == blob->length) {
@@ -31000,10 +32408,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc.c linux-2.6.32.49/drivers/gp
if (copy_to_user(blob_ptr, blob->data, blob->length)){
ret = -EFAULT;
goto done;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c 2011-11-15 19:59:43.000000000 -0500
-@@ -573,7 +573,7 @@ static bool drm_encoder_crtc_ok(struct d
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index 1b8745d..92fdbf6 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -573,7 +573,7 @@ static bool drm_encoder_crtc_ok(struct drm_encoder *encoder,
struct drm_crtc *tmp;
int crtc_mask = 1;
@@ -31012,7 +32421,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.32.49/dri
dev = crtc->dev;
-@@ -642,6 +642,8 @@ bool drm_crtc_helper_set_mode(struct drm
+@@ -642,6 +642,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
adjusted_mode = drm_mode_duplicate(dev, mode);
@@ -31021,10 +32430,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.32.49/dri
crtc->enabled = drm_helper_crtc_in_use(crtc);
if (!crtc->enabled)
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_drv.c linux-2.6.32.49/drivers/gpu/drm/drm_drv.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_drv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_drv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -417,7 +417,7 @@ int drm_ioctl(struct inode *inode, struc
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index 0e27d98..dec8768 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
+@@ -417,7 +417,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
char *kdata = NULL;
atomic_inc(&dev->ioctl_count);
@@ -31033,10 +32443,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_drv.c linux-2.6.32.49/drivers/gpu
++file_priv->ioctl_count;
DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gpu/drm/drm_fops.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_fops.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_fops.c 2011-11-15 19:59:43.000000000 -0500
-@@ -66,7 +66,7 @@ static int drm_setup(struct drm_device *
+diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
+index ba14553..182d0bb 100644
+--- a/drivers/gpu/drm/drm_fops.c
++++ b/drivers/gpu/drm/drm_fops.c
+@@ -66,7 +66,7 @@ static int drm_setup(struct drm_device * dev)
}
for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
@@ -31045,7 +32456,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gp
dev->sigdata.lock = NULL;
-@@ -130,9 +130,9 @@ int drm_open(struct inode *inode, struct
+@@ -130,9 +130,9 @@ int drm_open(struct inode *inode, struct file *filp)
retcode = drm_open_helper(inode, filp, dev);
if (!retcode) {
@@ -31057,7 +32468,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gp
spin_unlock(&dev->count_lock);
retcode = drm_setup(dev);
goto out;
-@@ -435,7 +435,7 @@ int drm_release(struct inode *inode, str
+@@ -435,7 +435,7 @@ int drm_release(struct inode *inode, struct file *filp)
lock_kernel();
@@ -31066,7 +32477,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gp
if (dev->driver->preclose)
dev->driver->preclose(dev, file_priv);
-@@ -447,7 +447,7 @@ int drm_release(struct inode *inode, str
+@@ -447,7 +447,7 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
task_pid_nr(current),
(long)old_encode_dev(file_priv->minor->device),
@@ -31075,7 +32486,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gp
/* if the master has gone away we can't do anything with the lock */
if (file_priv->minor->master)
-@@ -524,9 +524,9 @@ int drm_release(struct inode *inode, str
+@@ -524,9 +524,9 @@ int drm_release(struct inode *inode, struct file *filp)
* End inline drm_release
*/
@@ -31087,9 +32498,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_fops.c linux-2.6.32.49/drivers/gp
if (atomic_read(&dev->ioctl_count)) {
DRM_ERROR("Device busy: %d\n",
atomic_read(&dev->ioctl_count));
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_gem.c linux-2.6.32.49/drivers/gpu/drm/drm_gem.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_gem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_gem.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
+index 8bf3770..7942280 100644
+--- a/drivers/gpu/drm/drm_gem.c
++++ b/drivers/gpu/drm/drm_gem.c
@@ -83,11 +83,11 @@ drm_gem_init(struct drm_device *dev)
spin_lock_init(&dev->object_name_lock);
idr_init(&dev->object_name_idr);
@@ -31105,7 +32517,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_gem.c linux-2.6.32.49/drivers/gpu
mm = kzalloc(sizeof(struct drm_gem_mm), GFP_KERNEL);
if (!mm) {
-@@ -150,7 +150,7 @@ drm_gem_object_alloc(struct drm_device *
+@@ -150,7 +150,7 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size)
goto fput;
}
atomic_inc(&dev->object_count);
@@ -31123,10 +32535,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_gem.c linux-2.6.32.49/drivers/gpu
kfree(obj);
}
EXPORT_SYMBOL(drm_gem_object_free);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gpu/drm/drm_info.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_info.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_info.c 2011-11-15 19:59:43.000000000 -0500
-@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void
+diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
+index f0f6c6b..34af322 100644
+--- a/drivers/gpu/drm/drm_info.c
++++ b/drivers/gpu/drm/drm_info.c
+@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void *data)
struct drm_local_map *map;
struct drm_map_list *r_list;
@@ -31145,7 +32558,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gp
const char *type;
int i;
-@@ -89,7 +93,7 @@ int drm_vm_info(struct seq_file *m, void
+@@ -89,7 +93,7 @@ int drm_vm_info(struct seq_file *m, void *data)
map = r_list->map;
if (!map)
continue;
@@ -31154,7 +32567,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gp
type = "??";
else
type = types[map->type];
-@@ -265,10 +269,10 @@ int drm_gem_object_info(struct seq_file
+@@ -265,10 +269,10 @@ int drm_gem_object_info(struct seq_file *m, void* data)
struct drm_device *dev = node->minor->dev;
seq_printf(m, "%d objects\n", atomic_read(&dev->object_count));
@@ -31168,7 +32581,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gp
seq_printf(m, "%d gtt total\n", dev->gtt_total);
return 0;
}
-@@ -288,7 +292,11 @@ int drm_vma_info(struct seq_file *m, voi
+@@ -288,7 +292,11 @@ int drm_vma_info(struct seq_file *m, void *data)
mutex_lock(&dev->struct_mutex);
seq_printf(m, "vma use count: %d, high_memory = %p, 0x%08llx\n",
atomic_read(&dev->vma_count),
@@ -31180,7 +32593,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gp
list_for_each_entry(pt, &dev->vmalist, head) {
vma = pt->vma;
-@@ -296,14 +304,23 @@ int drm_vma_info(struct seq_file *m, voi
+@@ -296,14 +304,23 @@ int drm_vma_info(struct seq_file *m, void *data)
continue;
seq_printf(m,
"\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx000",
@@ -31205,10 +32618,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_info.c linux-2.6.32.49/drivers/gp
#if defined(__i386__)
pgprot = pgprot_val(vma->vm_page_prot);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -463,7 +463,7 @@ static int compat_drm_infobufs(struct fi
+diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
+index 282d9fd..71e5f11 100644
+--- a/drivers/gpu/drm/drm_ioc32.c
++++ b/drivers/gpu/drm/drm_ioc32.c
+@@ -463,7 +463,7 @@ static int compat_drm_infobufs(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(nbytes);
if (!access_ok(VERIFY_WRITE, request, nbytes))
return -EFAULT;
@@ -31217,7 +32631,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c linux-2.6.32.49/drivers/g
if (__put_user(count, &request->count)
|| __put_user(list, &request->list))
-@@ -525,7 +525,7 @@ static int compat_drm_mapbufs(struct fil
+@@ -525,7 +525,7 @@ static int compat_drm_mapbufs(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(nbytes);
if (!access_ok(VERIFY_WRITE, request, nbytes))
return -EFAULT;
@@ -31226,10 +32640,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_ioc32.c linux-2.6.32.49/drivers/g
if (__put_user(count, &request->count)
|| __put_user(list, &request->list))
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_ioctl.c linux-2.6.32.49/drivers/gpu/drm/drm_ioctl.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -283,7 +283,7 @@ int drm_getstats(struct drm_device *dev,
+diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
+index 9b9ff46..4ea724c 100644
+--- a/drivers/gpu/drm/drm_ioctl.c
++++ b/drivers/gpu/drm/drm_ioctl.c
+@@ -283,7 +283,7 @@ int drm_getstats(struct drm_device *dev, void *data,
stats->data[i].value =
(file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
else
@@ -31238,10 +32653,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_ioctl.c linux-2.6.32.49/drivers/g
stats->data[i].type = dev->types[i];
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_lock.c linux-2.6.32.49/drivers/gpu/drm/drm_lock.c
---- linux-2.6.32.49/drivers/gpu/drm/drm_lock.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/drm_lock.c 2011-11-15 19:59:43.000000000 -0500
-@@ -87,7 +87,7 @@ int drm_lock(struct drm_device *dev, voi
+diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
+index e2f70a5..c703e86 100644
+--- a/drivers/gpu/drm/drm_lock.c
++++ b/drivers/gpu/drm/drm_lock.c
+@@ -87,7 +87,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (drm_lock_take(&master->lock, lock->context)) {
master->lock.file_priv = file_priv;
master->lock.lock_time = jiffies;
@@ -31250,7 +32666,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_lock.c linux-2.6.32.49/drivers/gp
break; /* Got lock */
}
-@@ -165,7 +165,7 @@ int drm_unlock(struct drm_device *dev, v
+@@ -165,7 +165,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
return -EINVAL;
}
@@ -31259,10 +32675,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/drm_lock.c linux-2.6.32.49/drivers/gp
/* kernel_context_switch isn't used by any of the x86 drm
* modules but is required by the Sparc driver.
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c
---- linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -952,8 +952,8 @@ static int i810_dma_vertex(struct drm_de
+diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
+index 7d1d88c..b9131b2 100644
+--- a/drivers/gpu/drm/i810/i810_dma.c
++++ b/drivers/gpu/drm/i810/i810_dma.c
+@@ -952,8 +952,8 @@ static int i810_dma_vertex(struct drm_device *dev, void *data,
dma->buflist[vertex->idx],
vertex->discard, vertex->used);
@@ -31273,7 +32690,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.49/drive
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-@@ -1115,8 +1115,8 @@ static int i810_dma_mc(struct drm_device
+@@ -1115,8 +1115,8 @@ static int i810_dma_mc(struct drm_device *dev, void *data,
i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used,
mc->last_render);
@@ -31284,9 +32701,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.49/drive
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i810/i810_drv.h linux-2.6.32.49/drivers/gpu/drm/i810/i810_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/i810/i810_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i810/i810_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
+index 21e2691..7321edd 100644
+--- a/drivers/gpu/drm/i810/i810_drv.h
++++ b/drivers/gpu/drm/i810/i810_drv.h
@@ -108,8 +108,8 @@ typedef struct drm_i810_private {
int page_flipping;
@@ -31298,9 +32716,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i810/i810_drv.h linux-2.6.32.49/drive
int front_offset;
} drm_i810_private_t;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_drv.h linux-2.6.32.49/drivers/gpu/drm/i830/i830_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/i830/i830_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i830/i830_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/i830/i830_drv.h b/drivers/gpu/drm/i830/i830_drv.h
+index da82afe..48a45de 100644
+--- a/drivers/gpu/drm/i830/i830_drv.h
++++ b/drivers/gpu/drm/i830/i830_drv.h
@@ -115,8 +115,8 @@ typedef struct drm_i830_private {
int page_flipping;
@@ -31312,10 +32731,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_drv.h linux-2.6.32.49/drive
int use_mi_batchbuffer_start;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -47,7 +47,7 @@ irqreturn_t i830_driver_irq_handler(DRM_
+diff --git a/drivers/gpu/drm/i830/i830_irq.c b/drivers/gpu/drm/i830/i830_irq.c
+index 91ec2bb..6f21fab 100644
+--- a/drivers/gpu/drm/i830/i830_irq.c
++++ b/drivers/gpu/drm/i830/i830_irq.c
+@@ -47,7 +47,7 @@ irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS)
I830_WRITE16(I830REG_INT_IDENTITY_R, temp);
@@ -31324,7 +32744,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drive
wake_up_interruptible(&dev_priv->irq_queue);
return IRQ_HANDLED;
-@@ -60,14 +60,14 @@ static int i830_emit_irq(struct drm_devi
+@@ -60,14 +60,14 @@ static int i830_emit_irq(struct drm_device * dev)
DRM_DEBUG("%s\n", __func__);
@@ -31341,7 +32761,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drive
}
static int i830_wait_irq(struct drm_device * dev, int irq_nr)
-@@ -79,7 +79,7 @@ static int i830_wait_irq(struct drm_devi
+@@ -79,7 +79,7 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr)
DRM_DEBUG("%s\n", __func__);
@@ -31350,7 +32770,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drive
return 0;
dev_priv->sarea_priv->perf_boxes |= I830_BOX_WAIT;
-@@ -88,7 +88,7 @@ static int i830_wait_irq(struct drm_devi
+@@ -88,7 +88,7 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr)
for (;;) {
__set_current_state(TASK_INTERRUPTIBLE);
@@ -31359,7 +32779,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drive
break;
if ((signed)(end - jiffies) <= 0) {
DRM_ERROR("timeout iir %x imr %x ier %x hwstam %x\n",
-@@ -163,8 +163,8 @@ void i830_driver_irq_preinstall(struct d
+@@ -163,8 +163,8 @@ void i830_driver_irq_preinstall(struct drm_device * dev)
I830_WRITE16(I830REG_HWSTAM, 0xffff);
I830_WRITE16(I830REG_INT_MASK_R, 0x0);
I830_WRITE16(I830REG_INT_ENABLE_R, 0x0);
@@ -31370,33 +32790,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i830/i830_irq.c linux-2.6.32.49/drive
init_waitqueue_head(&dev_priv->irq_queue);
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7017.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7017.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7017.c 2011-11-15 19:59:43.000000000 -0500
-@@ -443,7 +443,7 @@ static void ch7017_destroy(struct intel_
- }
- }
-
--struct intel_dvo_dev_ops ch7017_ops = {
-+const struct intel_dvo_dev_ops ch7017_ops = {
- .init = ch7017_init,
- .detect = ch7017_detect,
- .mode_valid = ch7017_mode_valid,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7xxx.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -356,7 +356,7 @@ static void ch7xxx_destroy(struct intel_
- }
- }
-
--struct intel_dvo_dev_ops ch7xxx_ops = {
-+const struct intel_dvo_dev_ops ch7xxx_ops = {
- .init = ch7xxx_init,
- .detect = ch7xxx_detect,
- .mode_valid = ch7xxx_mode_valid,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo.h linux-2.6.32.49/drivers/gpu/drm/i915/dvo.h
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/i915/dvo.h b/drivers/gpu/drm/i915/dvo.h
+index 288fc50..c6092055 100644
+--- a/drivers/gpu/drm/i915/dvo.h
++++ b/drivers/gpu/drm/i915/dvo.h
@@ -135,23 +135,23 @@ struct intel_dvo_dev_ops {
*
* \return singly-linked list of modes or NULL if no modes found.
@@ -31429,10 +32826,37 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo.h linux-2.6.32.49/drivers/gp
+extern const struct intel_dvo_dev_ops ch7017_ops;
#endif /* _INTEL_DVO_H */
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ivch.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ivch.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ivch.c 2011-11-15 19:59:43.000000000 -0500
-@@ -430,7 +430,7 @@ static void ivch_destroy(struct intel_dv
+diff --git a/drivers/gpu/drm/i915/dvo_ch7017.c b/drivers/gpu/drm/i915/dvo_ch7017.c
+index 621815b..499d82e 100644
+--- a/drivers/gpu/drm/i915/dvo_ch7017.c
++++ b/drivers/gpu/drm/i915/dvo_ch7017.c
+@@ -443,7 +443,7 @@ static void ch7017_destroy(struct intel_dvo_device *dvo)
+ }
+ }
+
+-struct intel_dvo_dev_ops ch7017_ops = {
++const struct intel_dvo_dev_ops ch7017_ops = {
+ .init = ch7017_init,
+ .detect = ch7017_detect,
+ .mode_valid = ch7017_mode_valid,
+diff --git a/drivers/gpu/drm/i915/dvo_ch7xxx.c b/drivers/gpu/drm/i915/dvo_ch7xxx.c
+index a9b8962..ac769ba 100644
+--- a/drivers/gpu/drm/i915/dvo_ch7xxx.c
++++ b/drivers/gpu/drm/i915/dvo_ch7xxx.c
+@@ -356,7 +356,7 @@ static void ch7xxx_destroy(struct intel_dvo_device *dvo)
+ }
+ }
+
+-struct intel_dvo_dev_ops ch7xxx_ops = {
++const struct intel_dvo_dev_ops ch7xxx_ops = {
+ .init = ch7xxx_init,
+ .detect = ch7xxx_detect,
+ .mode_valid = ch7xxx_mode_valid,
+diff --git a/drivers/gpu/drm/i915/dvo_ivch.c b/drivers/gpu/drm/i915/dvo_ivch.c
+index aa176f9..ed2930c 100644
+--- a/drivers/gpu/drm/i915/dvo_ivch.c
++++ b/drivers/gpu/drm/i915/dvo_ivch.c
+@@ -430,7 +430,7 @@ static void ivch_destroy(struct intel_dvo_device *dvo)
}
}
@@ -31441,10 +32865,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.32.49/drive
.init = ivch_init,
.dpms = ivch_dpms,
.save = ivch_save,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.32.49/drivers/gpu/drm/i915/dvo_sil164.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo_sil164.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo_sil164.c 2011-11-15 19:59:43.000000000 -0500
-@@ -290,7 +290,7 @@ static void sil164_destroy(struct intel_
+diff --git a/drivers/gpu/drm/i915/dvo_sil164.c b/drivers/gpu/drm/i915/dvo_sil164.c
+index e1c1f73..7dbebcf 100644
+--- a/drivers/gpu/drm/i915/dvo_sil164.c
++++ b/drivers/gpu/drm/i915/dvo_sil164.c
+@@ -290,7 +290,7 @@ static void sil164_destroy(struct intel_dvo_device *dvo)
}
}
@@ -31453,10 +32878,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.32.49/dri
.init = sil164_init,
.detect = sil164_detect,
.mode_valid = sil164_mode_valid,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.32.49/drivers/gpu/drm/i915/dvo_tfp410.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/dvo_tfp410.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/dvo_tfp410.c 2011-11-15 19:59:43.000000000 -0500
-@@ -323,7 +323,7 @@ static void tfp410_destroy(struct intel_
+diff --git a/drivers/gpu/drm/i915/dvo_tfp410.c b/drivers/gpu/drm/i915/dvo_tfp410.c
+index 16dce84..7e1b6f8 100644
+--- a/drivers/gpu/drm/i915/dvo_tfp410.c
++++ b/drivers/gpu/drm/i915/dvo_tfp410.c
+@@ -323,7 +323,7 @@ static void tfp410_destroy(struct intel_dvo_device *dvo)
}
}
@@ -31465,10 +32891,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.32.49/dri
.init = tfp410_init,
.detect = tfp410_detect,
.mode_valid = tfp410_mode_valid,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_debugfs.c linux-2.6.32.49/drivers/gpu/drm/i915/i915_debugfs.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/i915_debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/i915_debugfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -192,7 +192,7 @@ static int i915_interrupt_info(struct se
+diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
+index 7e859d6..7d1cf2b 100644
+--- a/drivers/gpu/drm/i915/i915_debugfs.c
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -192,7 +192,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
I915_READ(GTIMR));
}
seq_printf(m, "Interrupts received: %d\n",
@@ -31477,9 +32904,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_debugfs.c linux-2.6.32.49/d
if (dev_priv->hw_status_page != NULL) {
seq_printf(m, "Current sequence: %d\n",
i915_get_gem_seqno(dev));
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.c linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index 5449239..7e4f68d 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -285,7 +285,7 @@ i915_pci_resume(struct pci_dev *pdev)
return i915_resume(dev);
}
@@ -31489,9 +32917,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.c linux-2.6.32.49/drive
.fault = i915_gem_fault,
.open = drm_gem_vm_open,
.close = drm_gem_vm_close,
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.h linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+index 97163f7..c24c7c7 100644
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -168,7 +168,7 @@ struct drm_i915_display_funcs {
/* display clock increase/decrease */
/* pll clock increase/decrease */
@@ -31510,10 +32939,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_drv.h linux-2.6.32.49/drive
/** Protects user_irq_refcount and irq_mask_reg */
spinlock_t user_irq_lock;
/** Refcount for i915_user_irq_get() versus i915_user_irq_put(). */
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c 2011-11-26 19:55:10.000000000 -0500
-@@ -102,7 +102,7 @@ i915_gem_get_aperture_ioctl(struct drm_d
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index 27a3074..eb3f959 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -102,7 +102,7 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
args->aper_size = dev->gtt_total;
args->aper_available_size = (args->aper_size -
@@ -31522,7 +32952,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
return 0;
}
-@@ -2058,7 +2058,7 @@ i915_gem_object_unbind(struct drm_gem_ob
+@@ -2058,7 +2058,7 @@ i915_gem_object_unbind(struct drm_gem_object *obj)
if (obj_priv->gtt_space) {
atomic_dec(&dev->gtt_count);
@@ -31531,7 +32961,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
drm_mm_put_block(obj_priv->gtt_space);
obj_priv->gtt_space = NULL;
-@@ -2701,7 +2701,7 @@ i915_gem_object_bind_to_gtt(struct drm_g
+@@ -2701,7 +2701,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
goto search_free;
}
atomic_inc(&dev->gtt_count);
@@ -31540,7 +32970,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
/* Assert that the object is not currently in any GPU domain. As it
* wasn't in the GTT, there shouldn't be any way it could have been in
-@@ -3755,9 +3755,9 @@ i915_gem_execbuffer(struct drm_device *d
+@@ -3755,9 +3755,9 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
"%d/%d gtt bytes\n",
atomic_read(&dev->object_count),
atomic_read(&dev->pin_count),
@@ -31553,7 +32983,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
dev->gtt_total);
}
goto err;
-@@ -3989,7 +3989,7 @@ i915_gem_object_pin(struct drm_gem_objec
+@@ -3989,7 +3989,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment)
*/
if (obj_priv->pin_count == 1) {
atomic_inc(&dev->pin_count);
@@ -31562,7 +32992,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
if (!obj_priv->active &&
(obj->write_domain & I915_GEM_GPU_DOMAINS) == 0 &&
!list_empty(&obj_priv->list))
-@@ -4022,7 +4022,7 @@ i915_gem_object_unpin(struct drm_gem_obj
+@@ -4022,7 +4022,7 @@ i915_gem_object_unpin(struct drm_gem_object *obj)
list_move_tail(&obj_priv->list,
&dev_priv->mm.inactive_list);
atomic_dec(&dev->pin_count);
@@ -31571,10 +33001,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.49/drive
}
i915_verify_inactive(dev, __FILE__, __LINE__);
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -528,7 +528,7 @@ irqreturn_t i915_driver_irq_handler(DRM_
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
+index 63f28ad..f5469da 100644
+--- a/drivers/gpu/drm/i915/i915_irq.c
++++ b/drivers/gpu/drm/i915/i915_irq.c
+@@ -528,7 +528,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
int irq_received;
int ret = IRQ_NONE;
@@ -31583,7 +33014,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c linux-2.6.32.49/drive
if (IS_IGDNG(dev))
return igdng_irq_handler(dev);
-@@ -1021,7 +1021,7 @@ void i915_driver_irq_preinstall(struct d
+@@ -1021,7 +1021,7 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -31592,10 +33023,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/i915_irq.c linux-2.6.32.49/drive
INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/intel_sdvo.c linux-2.6.32.49/drivers/gpu/drm/i915/intel_sdvo.c
---- linux-2.6.32.49/drivers/gpu/drm/i915/intel_sdvo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/i915/intel_sdvo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2795,7 +2795,9 @@ bool intel_sdvo_init(struct drm_device *
+diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
+index 5d9c6a7..d1b0e29 100644
+--- a/drivers/gpu/drm/i915/intel_sdvo.c
++++ b/drivers/gpu/drm/i915/intel_sdvo.c
+@@ -2795,7 +2795,9 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
sdvo_priv->slave_addr = intel_sdvo_get_slave_addr(dev, output_device);
/* Save the bit-banging i2c functionality for use by the DDC wrapper */
@@ -31606,9 +33038,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/i915/intel_sdvo.c linux-2.6.32.49/dri
/* Read the regs to test if we can talk to the device */
for (i = 0; i < 0x40; i++) {
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_drv.h linux-2.6.32.49/drivers/gpu/drm/mga/mga_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/mga/mga_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/mga/mga_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h
+index be6c6b9..8615d9c 100644
+--- a/drivers/gpu/drm/mga/mga_drv.h
++++ b/drivers/gpu/drm/mga/mga_drv.h
@@ -120,9 +120,9 @@ typedef struct drm_mga_private {
u32 clear_cmd;
u32 maccess;
@@ -31621,10 +33054,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_drv.h linux-2.6.32.49/drivers
u32 next_fence_to_post;
unsigned int fb_cpp;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,7 +44,7 @@ u32 mga_get_vblank_counter(struct drm_de
+diff --git a/drivers/gpu/drm/mga/mga_irq.c b/drivers/gpu/drm/mga/mga_irq.c
+index daa6041..a28a5da 100644
+--- a/drivers/gpu/drm/mga/mga_irq.c
++++ b/drivers/gpu/drm/mga/mga_irq.c
+@@ -44,7 +44,7 @@ u32 mga_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -31633,7 +33067,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c linux-2.6.32.49/drivers
}
-@@ -60,7 +60,7 @@ irqreturn_t mga_driver_irq_handler(DRM_I
+@@ -60,7 +60,7 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
/* VBLANK interrupt */
if (status & MGA_VLINEPEN) {
MGA_WRITE(MGA_ICLEAR, MGA_VLINEICLR);
@@ -31642,7 +33076,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c linux-2.6.32.49/drivers
drm_handle_vblank(dev, 0);
handled = 1;
}
-@@ -80,7 +80,7 @@ irqreturn_t mga_driver_irq_handler(DRM_I
+@@ -80,7 +80,7 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
MGA_WRITE(MGA_PRIMEND, prim_end);
}
@@ -31651,7 +33085,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c linux-2.6.32.49/drivers
DRM_WAKEUP(&dev_priv->fence_queue);
handled = 1;
}
-@@ -131,7 +131,7 @@ int mga_driver_fence_wait(struct drm_dev
+@@ -131,7 +131,7 @@ int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence)
* using fences.
*/
DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * DRM_HZ,
@@ -31660,10 +33094,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/mga/mga_irq.c linux-2.6.32.49/drivers
- *sequence) <= (1 << 23)));
*sequence = cur_fence;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_cce.c linux-2.6.32.49/drivers/gpu/drm/r128/r128_cce.c
---- linux-2.6.32.49/drivers/gpu/drm/r128/r128_cce.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/r128/r128_cce.c 2011-11-15 19:59:43.000000000 -0500
-@@ -377,7 +377,7 @@ static int r128_do_init_cce(struct drm_d
+diff --git a/drivers/gpu/drm/r128/r128_cce.c b/drivers/gpu/drm/r128/r128_cce.c
+index 4c39a40..b22a9ea 100644
+--- a/drivers/gpu/drm/r128/r128_cce.c
++++ b/drivers/gpu/drm/r128/r128_cce.c
+@@ -377,7 +377,7 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
/* GH: Simple idle check.
*/
@@ -31672,9 +33107,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_cce.c linux-2.6.32.49/drive
/* We don't support anything other than bus-mastering ring mode,
* but the ring can be in either AGP or PCI space for the ring
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_drv.h linux-2.6.32.49/drivers/gpu/drm/r128/r128_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/r128/r128_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/r128/r128_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
+index 3c60829..4faf484 100644
+--- a/drivers/gpu/drm/r128/r128_drv.h
++++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -90,14 +90,14 @@ typedef struct drm_r128_private {
int is_pci;
unsigned long cce_buffers_offset;
@@ -31692,10 +33128,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_drv.h linux-2.6.32.49/drive
u32 color_fmt;
unsigned int front_offset;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -42,7 +42,7 @@ u32 r128_get_vblank_counter(struct drm_d
+diff --git a/drivers/gpu/drm/r128/r128_irq.c b/drivers/gpu/drm/r128/r128_irq.c
+index 69810fb..97bf17a 100644
+--- a/drivers/gpu/drm/r128/r128_irq.c
++++ b/drivers/gpu/drm/r128/r128_irq.c
+@@ -42,7 +42,7 @@ u32 r128_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -31704,7 +33141,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c linux-2.6.32.49/drive
}
irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
-@@ -56,7 +56,7 @@ irqreturn_t r128_driver_irq_handler(DRM_
+@@ -56,7 +56,7 @@ irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
/* VBLANK interrupt */
if (status & R128_CRTC_VBLANK_INT) {
R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK);
@@ -31713,10 +33150,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_irq.c linux-2.6.32.49/drive
drm_handle_vblank(dev, 0);
return IRQ_HANDLED;
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_state.c linux-2.6.32.49/drivers/gpu/drm/r128/r128_state.c
---- linux-2.6.32.49/drivers/gpu/drm/r128/r128_state.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/r128/r128_state.c 2011-11-15 19:59:43.000000000 -0500
-@@ -323,10 +323,10 @@ static void r128_clear_box(drm_r128_priv
+diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c
+index af2665c..51922d2 100644
+--- a/drivers/gpu/drm/r128/r128_state.c
++++ b/drivers/gpu/drm/r128/r128_state.c
+@@ -323,10 +323,10 @@ static void r128_clear_box(drm_r128_private_t * dev_priv,
static void r128_cce_performance_boxes(drm_r128_private_t * dev_priv)
{
@@ -31729,10 +33167,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/r128/r128_state.c linux-2.6.32.49/dri
}
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/atom.c linux-2.6.32.49/drivers/gpu/drm/radeon/atom.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/atom.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/atom.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1115,6 +1115,8 @@ struct atom_context *atom_parse(struct c
+diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
+index dd72b91..8644b3c 100644
+--- a/drivers/gpu/drm/radeon/atom.c
++++ b/drivers/gpu/drm/radeon/atom.c
+@@ -1115,6 +1115,8 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
char name[512];
int i;
@@ -31741,10 +33180,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/atom.c linux-2.6.32.49/drivers
ctx->card = card;
ctx->bios = bios;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.32.49/drivers/gpu/drm/radeon/mkregtable.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/mkregtable.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/mkregtable.c 2011-11-15 19:59:43.000000000 -0500
-@@ -637,14 +637,14 @@ static int parser_auth(struct table *t,
+diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c
+index 0d79577..efaa7a5 100644
+--- a/drivers/gpu/drm/radeon/mkregtable.c
++++ b/drivers/gpu/drm/radeon/mkregtable.c
+@@ -637,14 +637,14 @@ static int parser_auth(struct table *t, const char *filename)
regex_t mask_rex;
regmatch_t match[4];
char buf[1024];
@@ -31761,10 +33201,33 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.32.49/d
if (regcomp
(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c 2011-11-15 19:59:43.000000000 -0500
-@@ -275,6 +275,8 @@ bool radeon_get_atom_connector_info_from
+diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
+index 6735213..38c2c67 100644
+--- a/drivers/gpu/drm/radeon/radeon.h
++++ b/drivers/gpu/drm/radeon/radeon.h
+@@ -149,7 +149,7 @@ int radeon_pm_init(struct radeon_device *rdev);
+ */
+ struct radeon_fence_driver {
+ uint32_t scratch_reg;
+- atomic_t seq;
++ atomic_unchecked_t seq;
+ uint32_t last_seq;
+ unsigned long count_timeout;
+ wait_queue_head_t queue;
+@@ -640,7 +640,7 @@ struct radeon_asic {
+ uint32_t offset, uint32_t obj_size);
+ int (*clear_surface_reg)(struct radeon_device *rdev, int reg);
+ void (*bandwidth_update)(struct radeon_device *rdev);
+-};
++} __no_const;
+
+ /*
+ * Asic structures
+diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
+index 4e928b9..d8b6008 100644
+--- a/drivers/gpu/drm/radeon/radeon_atombios.c
++++ b/drivers/gpu/drm/radeon/radeon_atombios.c
+@@ -275,6 +275,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
bool linkb;
struct radeon_i2c_bus_rec ddc_bus;
@@ -31773,7 +33236,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.32
atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset);
if (data_offset == 0)
-@@ -520,13 +522,13 @@ static uint16_t atombios_get_connector_o
+@@ -520,13 +522,13 @@ static uint16_t atombios_get_connector_object_id(struct drm_device *dev,
}
}
@@ -31789,7 +33252,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.32
bool radeon_get_atom_connector_info_from_supported_devices_table(struct
drm_device
-@@ -542,7 +544,6 @@ bool radeon_get_atom_connector_info_from
+@@ -542,7 +544,6 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
uint8_t dac;
union atom_supported_devices *supported_devices;
int i, j;
@@ -31797,10 +33260,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.32
atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_display.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_display.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_display.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_display.c 2011-11-15 19:59:43.000000000 -0500
-@@ -482,7 +482,7 @@ void radeon_compute_pll(struct radeon_pl
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index 083a181..ccccae0 100644
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -482,7 +482,7 @@ void radeon_compute_pll(struct radeon_pll *pll,
if (flags & RADEON_PLL_PREFER_CLOSEST_LOWER) {
error = freq - current_freq;
@@ -31809,9 +33273,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_display.c linux-2.6.32.
} else
error = abs(current_freq - freq);
vco_diff = abs(vco - best_vco);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_drv.h linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
+index 76e4070..193fa7f 100644
+--- a/drivers/gpu/drm/radeon/radeon_drv.h
++++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -253,7 +253,7 @@ typedef struct drm_radeon_private {
/* SW interrupt */
@@ -31821,10 +33286,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_drv.h linux-2.6.32.49/d
int vblank_crtc;
uint32_t irq_enable_reg;
uint32_t r500_disp_irq_reg;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c 2011-11-15 19:59:43.000000000 -0500
-@@ -47,7 +47,7 @@ int radeon_fence_emit(struct radeon_devi
+diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
+index 3beb26d..6ce9c4a 100644
+--- a/drivers/gpu/drm/radeon/radeon_fence.c
++++ b/drivers/gpu/drm/radeon/radeon_fence.c
+@@ -47,7 +47,7 @@ int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
write_unlock_irqrestore(&rdev->fence_drv.lock, irq_flags);
return 0;
}
@@ -31833,7 +33299,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c linux-2.6.32.49
if (!rdev->cp.ready) {
/* FIXME: cp is not running assume everythings is done right
* away
-@@ -364,7 +364,7 @@ int radeon_fence_driver_init(struct rade
+@@ -364,7 +364,7 @@ int radeon_fence_driver_init(struct radeon_device *rdev)
return r;
}
WREG32(rdev->fence_drv.scratch_reg, 0);
@@ -31842,31 +33308,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_fence.c linux-2.6.32.49
INIT_LIST_HEAD(&rdev->fence_drv.created);
INIT_LIST_HEAD(&rdev->fence_drv.emited);
INIT_LIST_HEAD(&rdev->fence_drv.signaled);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon.h linux-2.6.32.49/drivers/gpu/drm/radeon/radeon.h
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon.h 2011-11-15 19:59:43.000000000 -0500
-@@ -149,7 +149,7 @@ int radeon_pm_init(struct radeon_device
- */
- struct radeon_fence_driver {
- uint32_t scratch_reg;
-- atomic_t seq;
-+ atomic_unchecked_t seq;
- uint32_t last_seq;
- unsigned long count_timeout;
- wait_queue_head_t queue;
-@@ -640,7 +640,7 @@ struct radeon_asic {
- uint32_t offset, uint32_t obj_size);
- int (*clear_surface_reg)(struct radeon_device *rdev, int reg);
- void (*bandwidth_update)(struct radeon_device *rdev);
--};
-+} __no_const;
-
- /*
- * Asic structures
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ioc32.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ioc32.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ioc32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ioc32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -368,7 +368,7 @@ static int compat_radeon_cp_setparam(str
+diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
+index a1bf11d..4a123c0 100644
+--- a/drivers/gpu/drm/radeon/radeon_ioc32.c
++++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
+@@ -368,7 +368,7 @@ static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(sizeof(*request));
if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
|| __put_user(req32.param, &request->param)
@@ -31875,10 +33321,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ioc32.c linux-2.6.32.49
&request->value))
return -EFAULT;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -225,8 +225,8 @@ static int radeon_emit_irq(struct drm_de
+diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c
+index b79ecc4..8dab92d 100644
+--- a/drivers/gpu/drm/radeon/radeon_irq.c
++++ b/drivers/gpu/drm/radeon/radeon_irq.c
+@@ -225,8 +225,8 @@ static int radeon_emit_irq(struct drm_device * dev)
unsigned int ret;
RING_LOCALS;
@@ -31889,7 +33336,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c linux-2.6.32.49/d
BEGIN_RING(4);
OUT_RING_REG(RADEON_LAST_SWI_REG, ret);
-@@ -352,7 +352,7 @@ int radeon_driver_irq_postinstall(struct
+@@ -352,7 +352,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private;
@@ -31898,10 +33345,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_irq.c linux-2.6.32.49/d
DRM_INIT_WAITQUEUE(&dev_priv->swi_queue);
dev->max_vblank_count = 0x001fffff;
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_state.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_state.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_state.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3021,7 +3021,7 @@ static int radeon_cp_getparam(struct drm
+diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
+index 4747910..48ca4b3 100644
+--- a/drivers/gpu/drm/radeon/radeon_state.c
++++ b/drivers/gpu/drm/radeon/radeon_state.c
+@@ -3021,7 +3021,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
{
drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_getparam_t *param = data;
@@ -31910,10 +33358,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.32.49
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -535,27 +535,10 @@ void radeon_ttm_fini(struct radeon_devic
+diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
+index 1381e06..0e53b17 100644
+--- a/drivers/gpu/drm/radeon/radeon_ttm.c
++++ b/drivers/gpu/drm/radeon/radeon_ttm.c
+@@ -535,27 +535,10 @@ void radeon_ttm_fini(struct radeon_device *rdev)
DRM_INFO("radeon: ttm finalized\n");
}
@@ -31941,7 +33390,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.32.49/d
if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) {
return drm_mmap(filp, vma);
-@@ -563,20 +546,9 @@ int radeon_mmap(struct file *filp, struc
+@@ -563,20 +546,9 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
file_priv = (struct drm_file *)filp->private_data;
rdev = file_priv->minor->dev->dev_private;
@@ -31964,10 +33413,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.32.49/d
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/rs690.c linux-2.6.32.49/drivers/gpu/drm/radeon/rs690.c
---- linux-2.6.32.49/drivers/gpu/drm/radeon/rs690.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/radeon/rs690.c 2011-11-15 19:59:43.000000000 -0500
-@@ -302,9 +302,11 @@ void rs690_crtc_bandwidth_compute(struct
+diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
+index b12ff76..0bd0c6e 100644
+--- a/drivers/gpu/drm/radeon/rs690.c
++++ b/drivers/gpu/drm/radeon/rs690.c
+@@ -302,9 +302,11 @@ void rs690_crtc_bandwidth_compute(struct radeon_device *rdev,
if (rdev->pm.max_bandwidth.full > rdev->pm.sideport_bandwidth.full &&
rdev->pm.sideport_bandwidth.full)
rdev->pm.max_bandwidth = rdev->pm.sideport_bandwidth;
@@ -31980,10 +33430,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/radeon/rs690.c linux-2.6.32.49/driver
} else {
if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full &&
rdev->pm.k8_bandwidth.full)
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo.c
---- linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -67,7 +67,7 @@ static struct attribute *ttm_bo_global_a
+diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
+index 0ed436e..e6e7ce3 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -67,7 +67,7 @@ static struct attribute *ttm_bo_global_attrs[] = {
NULL
};
@@ -31992,10 +33443,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.32.49/drivers/
.show = &ttm_bo_global_show
};
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c
---- linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -73,7 +73,7 @@ static int ttm_bo_vm_fault(struct vm_are
+diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
+index 1c040d0..f9e4af8 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
++++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
+@@ -73,7 +73,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
vma->vm_private_data;
@@ -32004,7 +33456,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.32.49/drive
unsigned long bus_base;
unsigned long bus_offset;
unsigned long bus_size;
-@@ -88,6 +88,10 @@ static int ttm_bo_vm_fault(struct vm_are
+@@ -88,6 +88,10 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
unsigned long address = (unsigned long)vmf->virtual_address;
int retval = VM_FAULT_NOPAGE;
@@ -32015,9 +33467,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.32.49/drive
/*
* Work around locking order reversal in fault / nopfn
* between mmap_sem and bo_reserve: Perform a trylock operation
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c
---- linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/ttm/ttm_global.c b/drivers/gpu/drm/ttm/ttm_global.c
+index b170071..28ae90e 100644
+--- a/drivers/gpu/drm/ttm/ttm_global.c
++++ b/drivers/gpu/drm/ttm/ttm_global.c
@@ -36,7 +36,7 @@
struct ttm_global_item {
struct mutex mutex;
@@ -32045,7 +33498,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.49/driv
}
}
-@@ -70,7 +70,7 @@ int ttm_global_item_ref(struct ttm_globa
+@@ -70,7 +70,7 @@ int ttm_global_item_ref(struct ttm_global_reference *ref)
void *object;
mutex_lock(&item->mutex);
@@ -32054,7 +33507,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.49/driv
item->object = kzalloc(ref->size, GFP_KERNEL);
if (unlikely(item->object == NULL)) {
ret = -ENOMEM;
-@@ -83,7 +83,7 @@ int ttm_global_item_ref(struct ttm_globa
+@@ -83,7 +83,7 @@ int ttm_global_item_ref(struct ttm_global_reference *ref)
goto out_err;
}
@@ -32063,7 +33516,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.49/driv
ref->object = item->object;
object = item->object;
mutex_unlock(&item->mutex);
-@@ -100,9 +100,9 @@ void ttm_global_item_unref(struct ttm_gl
+@@ -100,9 +100,9 @@ void ttm_global_item_unref(struct ttm_global_reference *ref)
struct ttm_global_item *item = &glob[ref->global_type];
mutex_lock(&item->mutex);
@@ -32075,10 +33528,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.49/driv
ref->release(ref);
item->object = NULL;
}
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_memory.c linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_memory.c
---- linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_memory.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_memory.c 2011-11-15 19:59:43.000000000 -0500
-@@ -152,7 +152,7 @@ static struct attribute *ttm_mem_zone_at
+diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
+index 072c281..d8ef483 100644
+--- a/drivers/gpu/drm/ttm/ttm_memory.c
++++ b/drivers/gpu/drm/ttm/ttm_memory.c
+@@ -152,7 +152,7 @@ static struct attribute *ttm_mem_zone_attrs[] = {
NULL
};
@@ -32087,9 +33541,10 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/ttm/ttm_memory.c linux-2.6.32.49/driv
.show = &ttm_mem_zone_show,
.store = &ttm_mem_zone_store
};
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_drv.h linux-2.6.32.49/drivers/gpu/drm/via/via_drv.h
---- linux-2.6.32.49/drivers/gpu/drm/via/via_drv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/via/via_drv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
+index cafcb84..b8e66cc 100644
+--- a/drivers/gpu/drm/via/via_drv.h
++++ b/drivers/gpu/drm/via/via_drv.h
@@ -51,7 +51,7 @@ typedef struct drm_via_ring_buffer {
typedef uint32_t maskarray_t[5];
@@ -32108,10 +33563,11 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_drv.h linux-2.6.32.49/drivers
drm_via_state_t hc_state;
char pci_buf[VIA_PCI_BUF_SIZE];
const uint32_t *fire_offsets[VIA_FIRE_BUF_SIZE];
-diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c
---- linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -102,7 +102,7 @@ u32 via_get_vblank_counter(struct drm_de
+diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
+index 5935b88..127a8a6 100644
+--- a/drivers/gpu/drm/via/via_irq.c
++++ b/drivers/gpu/drm/via/via_irq.c
+@@ -102,7 +102,7 @@ u32 via_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -32120,7 +33576,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
}
irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
-@@ -117,8 +117,8 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -117,8 +117,8 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
status = VIA_READ(VIA_REG_INTERRUPT);
if (status & VIA_IRQ_VBLANK_PENDING) {
@@ -32131,7 +33587,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
do_gettimeofday(&cur_vblank);
if (dev_priv->last_vblank_valid) {
dev_priv->usec_per_vblank =
-@@ -128,7 +128,7 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -128,7 +128,7 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
dev_priv->last_vblank = cur_vblank;
dev_priv->last_vblank_valid = 1;
}
@@ -32140,7 +33596,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
DRM_DEBUG("US per vblank is: %u\n",
dev_priv->usec_per_vblank);
}
-@@ -138,7 +138,7 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -138,7 +138,7 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
for (i = 0; i < dev_priv->num_irqs; ++i) {
if (status & cur_irq->pending_mask) {
@@ -32149,7 +33605,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
DRM_WAKEUP(&cur_irq->irq_queue);
handled = 1;
if (dev_priv->irq_map[drm_via_irq_dma0_td] == i) {
-@@ -244,11 +244,11 @@ via_driver_irq_wait(struct drm_device *
+@@ -244,11 +244,11 @@ via_driver_irq_wait(struct drm_device * dev, unsigned int irq, int force_sequenc
DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * DRM_HZ,
((VIA_READ(masks[irq][2]) & masks[irq][3]) ==
masks[irq][4]));
@@ -32163,7 +33619,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
*sequence) <= (1 << 23)));
}
*sequence = cur_irq_sequence;
-@@ -286,7 +286,7 @@ void via_driver_irq_preinstall(struct dr
+@@ -286,7 +286,7 @@ void via_driver_irq_preinstall(struct drm_device * dev)
}
for (i = 0; i < dev_priv->num_irqs; ++i) {
@@ -32172,7 +33628,7 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
cur_irq->enable_mask = dev_priv->irq_masks[i][0];
cur_irq->pending_mask = dev_priv->irq_masks[i][1];
DRM_INIT_WAITQUEUE(&cur_irq->irq_queue);
-@@ -368,7 +368,7 @@ int via_wait_irq(struct drm_device *dev,
+@@ -368,7 +368,7 @@ int via_wait_irq(struct drm_device *dev, void *data, struct drm_file *file_priv)
switch (irqwait->request.type & ~VIA_IRQ_FLAGS_MASK) {
case VIA_IRQ_RELATIVE:
irqwait->request.sequence +=
@@ -32181,10 +33637,42 @@ diff -urNp linux-2.6.32.49/drivers/gpu/drm/via/via_irq.c linux-2.6.32.49/drivers
irqwait->request.type &= ~_DRM_VBLANK_RELATIVE;
case VIA_IRQ_ABSOLUTE:
break;
-diff -urNp linux-2.6.32.49/drivers/hid/hid-core.c linux-2.6.32.49/drivers/hid/hid-core.c
---- linux-2.6.32.49/drivers/hid/hid-core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hid/hid-core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1752,7 +1752,7 @@ static bool hid_ignore(struct hid_device
+diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
+index aa8688d..6a0140c 100644
+--- a/drivers/gpu/vga/vgaarb.c
++++ b/drivers/gpu/vga/vgaarb.c
+@@ -894,14 +894,20 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ uc = &priv->cards[i];
+ }
+
+- if (!uc)
+- return -EINVAL;
++ if (!uc) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+- if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0)
+- return -EINVAL;
++ if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+- if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0)
+- return -EINVAL;
++ if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+ vga_put(pdev, io_state);
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index f3f1415..e561d90 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -1752,7 +1752,7 @@ static bool hid_ignore(struct hid_device *hdev)
int hid_add_device(struct hid_device *hdev)
{
@@ -32193,7 +33681,7 @@ diff -urNp linux-2.6.32.49/drivers/hid/hid-core.c linux-2.6.32.49/drivers/hid/hi
int ret;
if (WARN_ON(hdev->status & HID_STAT_ADDED))
-@@ -1766,7 +1766,7 @@ int hid_add_device(struct hid_device *hd
+@@ -1766,7 +1766,7 @@ int hid_add_device(struct hid_device *hdev)
/* XXX hack, any other cleaner solution after the driver core
* is converted to allow more than 20 bytes as the device name? */
dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
@@ -32202,10 +33690,11 @@ diff -urNp linux-2.6.32.49/drivers/hid/hid-core.c linux-2.6.32.49/drivers/hid/hi
ret = device_add(&hdev->dev);
if (!ret)
-diff -urNp linux-2.6.32.49/drivers/hid/usbhid/hiddev.c linux-2.6.32.49/drivers/hid/usbhid/hiddev.c
---- linux-2.6.32.49/drivers/hid/usbhid/hiddev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hid/usbhid/hiddev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -617,7 +617,7 @@ static long hiddev_ioctl(struct file *fi
+diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
+index 8b6ee24..70f657d 100644
+--- a/drivers/hid/usbhid/hiddev.c
++++ b/drivers/hid/usbhid/hiddev.c
+@@ -617,7 +617,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return put_user(HID_VERSION, (int __user *)arg);
case HIDIOCAPPLICATION:
@@ -32214,10 +33703,11 @@ diff -urNp linux-2.6.32.49/drivers/hid/usbhid/hiddev.c linux-2.6.32.49/drivers/h
return -EINVAL;
for (i = 0; i < hid->maxcollection; i++)
-diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.c linux-2.6.32.49/drivers/hwmon/lis3lv02d.c
---- linux-2.6.32.49/drivers/hwmon/lis3lv02d.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hwmon/lis3lv02d.c 2011-11-15 19:59:43.000000000 -0500
-@@ -146,7 +146,7 @@ static irqreturn_t lis302dl_interrupt(in
+diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c
+index 5d5ed69..f40533e 100644
+--- a/drivers/hwmon/lis3lv02d.c
++++ b/drivers/hwmon/lis3lv02d.c
+@@ -146,7 +146,7 @@ static irqreturn_t lis302dl_interrupt(int irq, void *dummy)
* the lid is closed. This leads to interrupts as soon as a little move
* is done.
*/
@@ -32226,7 +33716,7 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.c linux-2.6.32.49/drivers/hwm
wake_up_interruptible(&lis3_dev.misc_wait);
kill_fasync(&lis3_dev.async_queue, SIGIO, POLL_IN);
-@@ -160,7 +160,7 @@ static int lis3lv02d_misc_open(struct in
+@@ -160,7 +160,7 @@ static int lis3lv02d_misc_open(struct inode *inode, struct file *file)
if (test_and_set_bit(0, &lis3_dev.misc_opened))
return -EBUSY; /* already open */
@@ -32235,7 +33725,7 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.c linux-2.6.32.49/drivers/hwm
/*
* The sensor can generate interrupts for free-fall and direction
-@@ -206,7 +206,7 @@ static ssize_t lis3lv02d_misc_read(struc
+@@ -206,7 +206,7 @@ static ssize_t lis3lv02d_misc_read(struct file *file, char __user *buf,
add_wait_queue(&lis3_dev.misc_wait, &wait);
while (true) {
set_current_state(TASK_INTERRUPTIBLE);
@@ -32253,9 +33743,10 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.c linux-2.6.32.49/drivers/hwm
return POLLIN | POLLRDNORM;
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.h linux-2.6.32.49/drivers/hwmon/lis3lv02d.h
---- linux-2.6.32.49/drivers/hwmon/lis3lv02d.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hwmon/lis3lv02d.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h
+index 7cdd76f..fe0efdf 100644
+--- a/drivers/hwmon/lis3lv02d.h
++++ b/drivers/hwmon/lis3lv02d.h
@@ -201,7 +201,7 @@ struct lis3lv02d {
struct input_polled_dev *idev; /* input device */
@@ -32265,9 +33756,10 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/lis3lv02d.h linux-2.6.32.49/drivers/hwm
int xcalib; /* calibrated null value for x */
int ycalib; /* calibrated null value for y */
int zcalib; /* calibrated null value for z */
-diff -urNp linux-2.6.32.49/drivers/hwmon/sht15.c linux-2.6.32.49/drivers/hwmon/sht15.c
---- linux-2.6.32.49/drivers/hwmon/sht15.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hwmon/sht15.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
+index 2040507..706ec1e 100644
+--- a/drivers/hwmon/sht15.c
++++ b/drivers/hwmon/sht15.c
@@ -112,7 +112,7 @@ struct sht15_data {
int supply_uV;
int supply_uV_valid;
@@ -32277,7 +33769,7 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/sht15.c linux-2.6.32.49/drivers/hwmon/s
};
/**
-@@ -245,13 +245,13 @@ static inline int sht15_update_single_va
+@@ -245,13 +245,13 @@ static inline int sht15_update_single_val(struct sht15_data *data,
return ret;
gpio_direction_input(data->pdata->gpio_data);
@@ -32293,7 +33785,7 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/sht15.c linux-2.6.32.49/drivers/hwmon/s
schedule_work(&data->read_work);
}
ret = wait_event_timeout(data->wait_queue,
-@@ -398,7 +398,7 @@ static irqreturn_t sht15_interrupt_fired
+@@ -398,7 +398,7 @@ static irqreturn_t sht15_interrupt_fired(int irq, void *d)
struct sht15_data *data = d;
/* First disable the interrupt */
disable_irq_nosync(irq);
@@ -32302,7 +33794,7 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/sht15.c linux-2.6.32.49/drivers/hwmon/s
/* Then schedule a reading work struct */
if (data->flag != SHT15_READING_NOTHING)
schedule_work(&data->read_work);
-@@ -449,11 +449,11 @@ static void sht15_bh_read_data(struct wo
+@@ -449,11 +449,11 @@ static void sht15_bh_read_data(struct work_struct *work_s)
here as could have gone low in meantime so verify
it hasn't!
*/
@@ -32316,10 +33808,11 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/sht15.c linux-2.6.32.49/drivers/hwmon/s
return;
}
/* Read the data back from the device */
-diff -urNp linux-2.6.32.49/drivers/hwmon/w83791d.c linux-2.6.32.49/drivers/hwmon/w83791d.c
---- linux-2.6.32.49/drivers/hwmon/w83791d.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/hwmon/w83791d.c 2011-11-15 19:59:43.000000000 -0500
-@@ -330,8 +330,8 @@ static int w83791d_detect(struct i2c_cli
+diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c
+index 97851c5..cb40626 100644
+--- a/drivers/hwmon/w83791d.c
++++ b/drivers/hwmon/w83791d.c
+@@ -330,8 +330,8 @@ static int w83791d_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int w83791d_remove(struct i2c_client *client);
@@ -32330,9 +33823,10 @@ diff -urNp linux-2.6.32.49/drivers/hwmon/w83791d.c linux-2.6.32.49/drivers/hwmon
static struct w83791d_data *w83791d_update_device(struct device *dev);
#ifdef DEBUG
-diff -urNp linux-2.6.32.49/drivers/i2c/busses/i2c-amd756-s4882.c linux-2.6.32.49/drivers/i2c/busses/i2c-amd756-s4882.c
---- linux-2.6.32.49/drivers/i2c/busses/i2c-amd756-s4882.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/i2c/busses/i2c-amd756-s4882.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
+index 378fcb5..5e91fa8 100644
+--- a/drivers/i2c/busses/i2c-amd756-s4882.c
++++ b/drivers/i2c/busses/i2c-amd756-s4882.c
@@ -43,7 +43,7 @@
extern struct i2c_adapter amd756_smbus;
@@ -32342,9 +33836,10 @@ diff -urNp linux-2.6.32.49/drivers/i2c/busses/i2c-amd756-s4882.c linux-2.6.32.49
/* Wrapper access functions for multiplexed SMBus */
static DEFINE_MUTEX(amd756_lock);
-diff -urNp linux-2.6.32.49/drivers/i2c/busses/i2c-nforce2-s4985.c linux-2.6.32.49/drivers/i2c/busses/i2c-nforce2-s4985.c
---- linux-2.6.32.49/drivers/i2c/busses/i2c-nforce2-s4985.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/i2c/busses/i2c-nforce2-s4985.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c
+index 29015eb..af2d8e9 100644
+--- a/drivers/i2c/busses/i2c-nforce2-s4985.c
++++ b/drivers/i2c/busses/i2c-nforce2-s4985.c
@@ -41,7 +41,7 @@
extern struct i2c_adapter *nforce2_smbus;
@@ -32354,10 +33849,11 @@ diff -urNp linux-2.6.32.49/drivers/i2c/busses/i2c-nforce2-s4985.c linux-2.6.32.4
/* Wrapper access functions for multiplexed SMBus */
static DEFINE_MUTEX(nforce2_lock);
-diff -urNp linux-2.6.32.49/drivers/ide/aec62xx.c linux-2.6.32.49/drivers/ide/aec62xx.c
---- linux-2.6.32.49/drivers/ide/aec62xx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/aec62xx.c 2011-11-18 18:01:55.000000000 -0500
-@@ -180,7 +180,7 @@ static const struct ide_port_ops atp86x_
+diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c
+index 878f8ec..12376fc 100644
+--- a/drivers/ide/aec62xx.c
++++ b/drivers/ide/aec62xx.c
+@@ -180,7 +180,7 @@ static const struct ide_port_ops atp86x_port_ops = {
.cable_detect = atp86x_cable_detect,
};
@@ -32366,10 +33862,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/aec62xx.c linux-2.6.32.49/drivers/ide/aec
{ /* 0: AEC6210 */
.name = DRV_NAME,
.init_chipset = init_chipset_aec62xx,
-diff -urNp linux-2.6.32.49/drivers/ide/alim15x3.c linux-2.6.32.49/drivers/ide/alim15x3.c
---- linux-2.6.32.49/drivers/ide/alim15x3.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/alim15x3.c 2011-11-18 18:01:55.000000000 -0500
-@@ -509,7 +509,7 @@ static const struct ide_dma_ops ali_dma_
+diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
+index e59b6de..4b4fc65 100644
+--- a/drivers/ide/alim15x3.c
++++ b/drivers/ide/alim15x3.c
+@@ -509,7 +509,7 @@ static const struct ide_dma_ops ali_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32378,10 +33875,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/alim15x3.c linux-2.6.32.49/drivers/ide/al
.name = DRV_NAME,
.init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3,
-diff -urNp linux-2.6.32.49/drivers/ide/amd74xx.c linux-2.6.32.49/drivers/ide/amd74xx.c
---- linux-2.6.32.49/drivers/ide/amd74xx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/amd74xx.c 2011-11-18 18:01:55.000000000 -0500
-@@ -221,7 +221,7 @@ static const struct ide_port_ops amd_por
+diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c
+index 628cd2e..087a414 100644
+--- a/drivers/ide/amd74xx.c
++++ b/drivers/ide/amd74xx.c
+@@ -221,7 +221,7 @@ static const struct ide_port_ops amd_port_ops = {
.udma_mask = udma, \
}
@@ -32390,10 +33888,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/amd74xx.c linux-2.6.32.49/drivers/ide/amd
/* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2),
/* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4),
/* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5),
-diff -urNp linux-2.6.32.49/drivers/ide/atiixp.c linux-2.6.32.49/drivers/ide/atiixp.c
---- linux-2.6.32.49/drivers/ide/atiixp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/atiixp.c 2011-11-18 18:01:55.000000000 -0500
-@@ -137,7 +137,7 @@ static const struct ide_port_ops atiixp_
+diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
+index 837322b..837fd71 100644
+--- a/drivers/ide/atiixp.c
++++ b/drivers/ide/atiixp.c
+@@ -137,7 +137,7 @@ static const struct ide_port_ops atiixp_port_ops = {
.cable_detect = atiixp_cable_detect,
};
@@ -32402,10 +33901,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/atiixp.c linux-2.6.32.49/drivers/ide/atii
{ /* 0: IXP200/300/400/700 */
.name = DRV_NAME,
.enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
-diff -urNp linux-2.6.32.49/drivers/ide/cmd64x.c linux-2.6.32.49/drivers/ide/cmd64x.c
---- linux-2.6.32.49/drivers/ide/cmd64x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/cmd64x.c 2011-11-18 18:01:55.000000000 -0500
-@@ -372,7 +372,7 @@ static const struct ide_dma_ops cmd646_r
+diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
+index ca0c46f..d55318a 100644
+--- a/drivers/ide/cmd64x.c
++++ b/drivers/ide/cmd64x.c
+@@ -372,7 +372,7 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32414,10 +33914,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/cmd64x.c linux-2.6.32.49/drivers/ide/cmd6
{ /* 0: CMD643 */
.name = DRV_NAME,
.init_chipset = init_chipset_cmd64x,
-diff -urNp linux-2.6.32.49/drivers/ide/cs5520.c linux-2.6.32.49/drivers/ide/cs5520.c
---- linux-2.6.32.49/drivers/ide/cs5520.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/cs5520.c 2011-11-18 18:01:55.000000000 -0500
-@@ -93,7 +93,7 @@ static const struct ide_port_ops cs5520_
+diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c
+index 09f98ed..cebc5bc 100644
+--- a/drivers/ide/cs5520.c
++++ b/drivers/ide/cs5520.c
+@@ -93,7 +93,7 @@ static const struct ide_port_ops cs5520_port_ops = {
.set_dma_mode = cs5520_set_dma_mode,
};
@@ -32426,10 +33927,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/cs5520.c linux-2.6.32.49/drivers/ide/cs55
.name = DRV_NAME,
.enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } },
.port_ops = &cs5520_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/cs5530.c linux-2.6.32.49/drivers/ide/cs5530.c
---- linux-2.6.32.49/drivers/ide/cs5530.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/cs5530.c 2011-11-18 18:01:55.000000000 -0500
-@@ -244,7 +244,7 @@ static const struct ide_port_ops cs5530_
+diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
+index 40bf05e..7d58ca0 100644
+--- a/drivers/ide/cs5530.c
++++ b/drivers/ide/cs5530.c
+@@ -244,7 +244,7 @@ static const struct ide_port_ops cs5530_port_ops = {
.udma_filter = cs5530_udma_filter,
};
@@ -32438,10 +33940,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/cs5530.c linux-2.6.32.49/drivers/ide/cs55
.name = DRV_NAME,
.init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530,
-diff -urNp linux-2.6.32.49/drivers/ide/cs5535.c linux-2.6.32.49/drivers/ide/cs5535.c
---- linux-2.6.32.49/drivers/ide/cs5535.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/cs5535.c 2011-11-18 18:01:55.000000000 -0500
-@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_
+diff --git a/drivers/ide/cs5535.c b/drivers/ide/cs5535.c
+index 983d957..53e6172 100644
+--- a/drivers/ide/cs5535.c
++++ b/drivers/ide/cs5535.c
+@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_port_ops = {
.cable_detect = cs5535_cable_detect,
};
@@ -32450,10 +33953,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/cs5535.c linux-2.6.32.49/drivers/ide/cs55
.name = DRV_NAME,
.port_ops = &cs5535_port_ops,
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE,
-diff -urNp linux-2.6.32.49/drivers/ide/cy82c693.c linux-2.6.32.49/drivers/ide/cy82c693.c
---- linux-2.6.32.49/drivers/ide/cy82c693.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/cy82c693.c 2011-11-18 18:01:55.000000000 -0500
-@@ -288,7 +288,7 @@ static const struct ide_port_ops cy82c69
+diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c
+index 74fc540..8e933d8 100644
+--- a/drivers/ide/cy82c693.c
++++ b/drivers/ide/cy82c693.c
+@@ -288,7 +288,7 @@ static const struct ide_port_ops cy82c693_port_ops = {
.set_dma_mode = cy82c693_set_dma_mode,
};
@@ -32462,10 +33966,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/cy82c693.c linux-2.6.32.49/drivers/ide/cy
.name = DRV_NAME,
.init_iops = init_iops_cy82c693,
.port_ops = &cy82c693_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt366.c
---- linux-2.6.32.49/drivers/ide/hpt366.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/hpt366.c 2011-11-18 18:01:55.000000000 -0500
-@@ -507,7 +507,7 @@ static struct hpt_timings hpt37x_timings
+diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
+index 7ce68ef..e78197d 100644
+--- a/drivers/ide/hpt366.c
++++ b/drivers/ide/hpt366.c
+@@ -507,7 +507,7 @@ static struct hpt_timings hpt37x_timings = {
}
};
@@ -32474,7 +33979,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT36x",
.chip_type = HPT36x,
.udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2,
-@@ -515,7 +515,7 @@ static const struct hpt_info hpt36x __de
+@@ -515,7 +515,7 @@ static const struct hpt_info hpt36x __devinitdata = {
.timings = &hpt36x_timings
};
@@ -32483,7 +33988,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT370",
.chip_type = HPT370,
.udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
-@@ -523,7 +523,7 @@ static const struct hpt_info hpt370 __de
+@@ -523,7 +523,7 @@ static const struct hpt_info hpt370 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32492,7 +33997,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT370A",
.chip_type = HPT370A,
.udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
-@@ -531,7 +531,7 @@ static const struct hpt_info hpt370a __d
+@@ -531,7 +531,7 @@ static const struct hpt_info hpt370a __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32501,7 +34006,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT374",
.chip_type = HPT374,
.udma_mask = ATA_UDMA5,
-@@ -539,7 +539,7 @@ static const struct hpt_info hpt374 __de
+@@ -539,7 +539,7 @@ static const struct hpt_info hpt374 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32510,7 +34015,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT372",
.chip_type = HPT372,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -547,7 +547,7 @@ static const struct hpt_info hpt372 __de
+@@ -547,7 +547,7 @@ static const struct hpt_info hpt372 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32519,7 +34024,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT372A",
.chip_type = HPT372A,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -555,7 +555,7 @@ static const struct hpt_info hpt372a __d
+@@ -555,7 +555,7 @@ static const struct hpt_info hpt372a __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32528,7 +34033,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT302",
.chip_type = HPT302,
.udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -563,7 +563,7 @@ static const struct hpt_info hpt302 __de
+@@ -563,7 +563,7 @@ static const struct hpt_info hpt302 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32537,7 +34042,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT371",
.chip_type = HPT371,
.udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -571,7 +571,7 @@ static const struct hpt_info hpt371 __de
+@@ -571,7 +571,7 @@ static const struct hpt_info hpt371 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32546,7 +34051,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT372N",
.chip_type = HPT372N,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -579,7 +579,7 @@ static const struct hpt_info hpt372n __d
+@@ -579,7 +579,7 @@ static const struct hpt_info hpt372n __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32555,7 +34060,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT302N",
.chip_type = HPT302N,
.udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -587,7 +587,7 @@ static const struct hpt_info hpt302n __d
+@@ -587,7 +587,7 @@ static const struct hpt_info hpt302n __devinitdata = {
.timings = &hpt37x_timings
};
@@ -32564,7 +34069,7 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
.chip_name = "HPT371N",
.chip_type = HPT371N,
.udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -1422,7 +1422,7 @@ static const struct ide_dma_ops hpt36x_d
+@@ -1422,7 +1422,7 @@ static const struct ide_dma_ops hpt36x_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32573,10 +34078,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/hpt366.c linux-2.6.32.49/drivers/ide/hpt3
{ /* 0: HPT36x */
.name = DRV_NAME,
.init_chipset = init_chipset_hpt366,
-diff -urNp linux-2.6.32.49/drivers/ide/ide-cd.c linux-2.6.32.49/drivers/ide/ide-cd.c
---- linux-2.6.32.49/drivers/ide/ide-cd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/ide-cd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -774,7 +774,7 @@ static void cdrom_do_block_pc(ide_drive_
+diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
+index 2de76cc..74186a1 100644
+--- a/drivers/ide/ide-cd.c
++++ b/drivers/ide/ide-cd.c
+@@ -774,7 +774,7 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
if ((unsigned long)buf & alignment
|| blk_rq_bytes(rq) & q->dma_pad_mask
@@ -32585,10 +34091,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/ide-cd.c linux-2.6.32.49/drivers/ide/ide-
drive->dma = 0;
}
}
-diff -urNp linux-2.6.32.49/drivers/ide/ide-floppy.c linux-2.6.32.49/drivers/ide/ide-floppy.c
---- linux-2.6.32.49/drivers/ide/ide-floppy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/ide-floppy.c 2011-11-15 19:59:43.000000000 -0500
-@@ -373,6 +373,8 @@ static int ide_floppy_get_capacity(ide_d
+diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
+index fefbdfc..62ff465 100644
+--- a/drivers/ide/ide-floppy.c
++++ b/drivers/ide/ide-floppy.c
+@@ -373,6 +373,8 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
u8 pc_buf[256], header_len, desc_cnt;
int i, rc = 1, blocks, length;
@@ -32597,10 +34104,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/ide-floppy.c linux-2.6.32.49/drivers/ide/
ide_debug_log(IDE_DBG_FUNC, "enter");
drive->bios_cyl = 0;
-diff -urNp linux-2.6.32.49/drivers/ide/ide-pci-generic.c linux-2.6.32.49/drivers/ide/ide-pci-generic.c
---- linux-2.6.32.49/drivers/ide/ide-pci-generic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/ide-pci-generic.c 2011-11-18 18:01:55.000000000 -0500
-@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell
+diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c
+index 39d4e01..11538ce 100644
+--- a/drivers/ide/ide-pci-generic.c
++++ b/drivers/ide/ide-pci-generic.c
+@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell_port_ops = {
.udma_mask = ATA_UDMA6, \
}
@@ -32609,10 +34117,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/ide-pci-generic.c linux-2.6.32.49/drivers
/* 0: Unknown */
DECLARE_GENERIC_PCI_DEV(0),
-diff -urNp linux-2.6.32.49/drivers/ide/it8172.c linux-2.6.32.49/drivers/ide/it8172.c
---- linux-2.6.32.49/drivers/ide/it8172.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/it8172.c 2011-11-18 18:01:55.000000000 -0500
-@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_
+diff --git a/drivers/ide/it8172.c b/drivers/ide/it8172.c
+index 0d266a5..aaca790 100644
+--- a/drivers/ide/it8172.c
++++ b/drivers/ide/it8172.c
+@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_port_ops = {
.set_dma_mode = it8172_set_dma_mode,
};
@@ -32621,10 +34130,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/it8172.c linux-2.6.32.49/drivers/ide/it81
.name = DRV_NAME,
.port_ops = &it8172_port_ops,
.enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} },
-diff -urNp linux-2.6.32.49/drivers/ide/it8213.c linux-2.6.32.49/drivers/ide/it8213.c
---- linux-2.6.32.49/drivers/ide/it8213.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/it8213.c 2011-11-18 18:01:55.000000000 -0500
-@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_
+diff --git a/drivers/ide/it8213.c b/drivers/ide/it8213.c
+index 4797616..4be488a 100644
+--- a/drivers/ide/it8213.c
++++ b/drivers/ide/it8213.c
+@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_port_ops = {
.cable_detect = it8213_cable_detect,
};
@@ -32633,10 +34143,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/it8213.c linux-2.6.32.49/drivers/ide/it82
.name = DRV_NAME,
.enablebits = { {0x41, 0x80, 0x80} },
.port_ops = &it8213_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/it821x.c linux-2.6.32.49/drivers/ide/it821x.c
---- linux-2.6.32.49/drivers/ide/it821x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/it821x.c 2011-11-18 18:01:55.000000000 -0500
-@@ -627,7 +627,7 @@ static const struct ide_port_ops it821x_
+diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
+index 51aa745..146ee60 100644
+--- a/drivers/ide/it821x.c
++++ b/drivers/ide/it821x.c
+@@ -627,7 +627,7 @@ static const struct ide_port_ops it821x_port_ops = {
.cable_detect = it821x_cable_detect,
};
@@ -32645,10 +34156,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/it821x.c linux-2.6.32.49/drivers/ide/it82
.name = DRV_NAME,
.init_chipset = init_chipset_it821x,
.init_hwif = init_hwif_it821x,
-diff -urNp linux-2.6.32.49/drivers/ide/jmicron.c linux-2.6.32.49/drivers/ide/jmicron.c
---- linux-2.6.32.49/drivers/ide/jmicron.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/jmicron.c 2011-11-18 18:01:55.000000000 -0500
-@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron
+diff --git a/drivers/ide/jmicron.c b/drivers/ide/jmicron.c
+index bf2be64..9270098 100644
+--- a/drivers/ide/jmicron.c
++++ b/drivers/ide/jmicron.c
+@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron_port_ops = {
.cable_detect = jmicron_cable_detect,
};
@@ -32657,10 +34169,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/jmicron.c linux-2.6.32.49/drivers/ide/jmi
.name = DRV_NAME,
.enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
.port_ops = &jmicron_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/ns87415.c linux-2.6.32.49/drivers/ide/ns87415.c
---- linux-2.6.32.49/drivers/ide/ns87415.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/ns87415.c 2011-11-18 18:01:55.000000000 -0500
-@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_
+diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
+index 95327a2..73f78d8 100644
+--- a/drivers/ide/ns87415.c
++++ b/drivers/ide/ns87415.c
+@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_dma_ops = {
.dma_sff_read_status = superio_dma_sff_read_status,
};
@@ -32669,10 +34182,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/ns87415.c linux-2.6.32.49/drivers/ide/ns8
.name = DRV_NAME,
.init_hwif = init_hwif_ns87415,
.tp_ops = &ns87415_tp_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/opti621.c linux-2.6.32.49/drivers/ide/opti621.c
---- linux-2.6.32.49/drivers/ide/opti621.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/opti621.c 2011-11-18 18:01:55.000000000 -0500
-@@ -202,7 +202,7 @@ static const struct ide_port_ops opti621
+diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c
+index f1d70d6..e1de05b 100644
+--- a/drivers/ide/opti621.c
++++ b/drivers/ide/opti621.c
+@@ -202,7 +202,7 @@ static const struct ide_port_ops opti621_port_ops = {
.set_pio_mode = opti621_set_pio_mode,
};
@@ -32681,10 +34195,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/opti621.c linux-2.6.32.49/drivers/ide/opt
.name = DRV_NAME,
.enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
.port_ops = &opti621_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/pdc202xx_new.c linux-2.6.32.49/drivers/ide/pdc202xx_new.c
---- linux-2.6.32.49/drivers/ide/pdc202xx_new.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/pdc202xx_new.c 2011-11-18 18:01:55.000000000 -0500
-@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_
+diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c
+index 65ba823..7311f4d 100644
+--- a/drivers/ide/pdc202xx_new.c
++++ b/drivers/ide/pdc202xx_new.c
+@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_port_ops = {
.udma_mask = udma, \
}
@@ -32693,10 +34208,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/pdc202xx_new.c linux-2.6.32.49/drivers/id
/* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5),
/* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6),
};
-diff -urNp linux-2.6.32.49/drivers/ide/pdc202xx_old.c linux-2.6.32.49/drivers/ide/pdc202xx_old.c
---- linux-2.6.32.49/drivers/ide/pdc202xx_old.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/pdc202xx_old.c 2011-11-18 18:01:55.000000000 -0500
-@@ -285,7 +285,7 @@ static const struct ide_dma_ops pdc2026x
+diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
+index cb812f3..af816ef 100644
+--- a/drivers/ide/pdc202xx_old.c
++++ b/drivers/ide/pdc202xx_old.c
+@@ -285,7 +285,7 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
.max_sectors = sectors, \
}
@@ -32705,10 +34221,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/pdc202xx_old.c linux-2.6.32.49/drivers/id
{ /* 0: PDC20246 */
.name = DRV_NAME,
.init_chipset = init_chipset_pdc202xx,
-diff -urNp linux-2.6.32.49/drivers/ide/piix.c linux-2.6.32.49/drivers/ide/piix.c
---- linux-2.6.32.49/drivers/ide/piix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/piix.c 2011-11-18 18:01:55.000000000 -0500
-@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_por
+diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
+index bf14f39..15c4b98 100644
+--- a/drivers/ide/piix.c
++++ b/drivers/ide/piix.c
+@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_port_ops = {
.udma_mask = udma, \
}
@@ -32717,10 +34234,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/piix.c linux-2.6.32.49/drivers/ide/piix.c
/* 0: MPIIX */
{ /*
* MPIIX actually has only a single IDE channel mapped to
-diff -urNp linux-2.6.32.49/drivers/ide/rz1000.c linux-2.6.32.49/drivers/ide/rz1000.c
---- linux-2.6.32.49/drivers/ide/rz1000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/rz1000.c 2011-11-18 18:01:55.000000000 -0500
-@@ -38,7 +38,7 @@ static int __devinit rz1000_disable_read
+diff --git a/drivers/ide/rz1000.c b/drivers/ide/rz1000.c
+index a6414a8..c04173e 100644
+--- a/drivers/ide/rz1000.c
++++ b/drivers/ide/rz1000.c
+@@ -38,7 +38,7 @@ static int __devinit rz1000_disable_readahead(struct pci_dev *dev)
}
}
@@ -32729,10 +34247,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/rz1000.c linux-2.6.32.49/drivers/ide/rz10
.name = DRV_NAME,
.host_flags = IDE_HFLAG_NO_DMA,
};
-diff -urNp linux-2.6.32.49/drivers/ide/sc1200.c linux-2.6.32.49/drivers/ide/sc1200.c
---- linux-2.6.32.49/drivers/ide/sc1200.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/sc1200.c 2011-11-18 18:01:55.000000000 -0500
-@@ -290,7 +290,7 @@ static const struct ide_dma_ops sc1200_d
+diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c
+index d467478..9203942 100644
+--- a/drivers/ide/sc1200.c
++++ b/drivers/ide/sc1200.c
+@@ -290,7 +290,7 @@ static const struct ide_dma_ops sc1200_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32741,10 +34260,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/sc1200.c linux-2.6.32.49/drivers/ide/sc12
.name = DRV_NAME,
.port_ops = &sc1200_port_ops,
.dma_ops = &sc1200_dma_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/scc_pata.c linux-2.6.32.49/drivers/ide/scc_pata.c
---- linux-2.6.32.49/drivers/ide/scc_pata.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/scc_pata.c 2011-11-18 18:01:55.000000000 -0500
-@@ -811,7 +811,7 @@ static const struct ide_dma_ops scc_dma_
+diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
+index 1104bb3..59c5194 100644
+--- a/drivers/ide/scc_pata.c
++++ b/drivers/ide/scc_pata.c
+@@ -811,7 +811,7 @@ static const struct ide_dma_ops scc_dma_ops = {
.dma_sff_read_status = scc_dma_sff_read_status,
};
@@ -32753,10 +34273,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/scc_pata.c linux-2.6.32.49/drivers/ide/sc
.name = "sccIDE",
.init_iops = init_iops_scc,
.init_dma = scc_init_dma,
-diff -urNp linux-2.6.32.49/drivers/ide/serverworks.c linux-2.6.32.49/drivers/ide/serverworks.c
---- linux-2.6.32.49/drivers/ide/serverworks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/serverworks.c 2011-11-18 18:01:55.000000000 -0500
-@@ -353,7 +353,7 @@ static const struct ide_port_ops svwks_p
+diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
+index b6554ef..6cc2cc3 100644
+--- a/drivers/ide/serverworks.c
++++ b/drivers/ide/serverworks.c
+@@ -353,7 +353,7 @@ static const struct ide_port_ops svwks_port_ops = {
.cable_detect = svwks_cable_detect,
};
@@ -32765,10 +34286,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/serverworks.c linux-2.6.32.49/drivers/ide
{ /* 0: OSB4 */
.name = DRV_NAME,
.init_chipset = init_chipset_svwks,
-diff -urNp linux-2.6.32.49/drivers/ide/setup-pci.c linux-2.6.32.49/drivers/ide/setup-pci.c
---- linux-2.6.32.49/drivers/ide/setup-pci.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/setup-pci.c 2011-11-15 19:59:43.000000000 -0500
-@@ -542,6 +542,8 @@ int ide_pci_init_two(struct pci_dev *dev
+diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
+index ab3db61..afed580 100644
+--- a/drivers/ide/setup-pci.c
++++ b/drivers/ide/setup-pci.c
+@@ -542,6 +542,8 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
int ret, i, n_ports = dev2 ? 4 : 2;
struct ide_hw hw[4], *hws[] = { NULL, NULL, NULL, NULL };
@@ -32777,10 +34299,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/setup-pci.c linux-2.6.32.49/drivers/ide/s
for (i = 0; i < n_ports / 2; i++) {
ret = ide_setup_pci_controller(pdev[i], d, !i);
if (ret < 0)
-diff -urNp linux-2.6.32.49/drivers/ide/siimage.c linux-2.6.32.49/drivers/ide/siimage.c
---- linux-2.6.32.49/drivers/ide/siimage.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/siimage.c 2011-11-18 18:01:55.000000000 -0500
-@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_
+diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
+index d95df52..0b03a39 100644
+--- a/drivers/ide/siimage.c
++++ b/drivers/ide/siimage.c
+@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_ops = {
.udma_mask = ATA_UDMA6, \
}
@@ -32789,10 +34312,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/siimage.c linux-2.6.32.49/drivers/ide/sii
/* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops),
/* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops)
};
-diff -urNp linux-2.6.32.49/drivers/ide/sis5513.c linux-2.6.32.49/drivers/ide/sis5513.c
---- linux-2.6.32.49/drivers/ide/sis5513.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/sis5513.c 2011-11-18 18:01:55.000000000 -0500
-@@ -561,7 +561,7 @@ static const struct ide_port_ops sis_ata
+diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c
+index 3b88eba..ca8699d 100644
+--- a/drivers/ide/sis5513.c
++++ b/drivers/ide/sis5513.c
+@@ -561,7 +561,7 @@ static const struct ide_port_ops sis_ata133_port_ops = {
.cable_detect = sis_cable_detect,
};
@@ -32801,10 +34325,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/sis5513.c linux-2.6.32.49/drivers/ide/sis
.name = DRV_NAME,
.init_chipset = init_chipset_sis5513,
.enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} },
-diff -urNp linux-2.6.32.49/drivers/ide/sl82c105.c linux-2.6.32.49/drivers/ide/sl82c105.c
---- linux-2.6.32.49/drivers/ide/sl82c105.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/sl82c105.c 2011-11-18 18:01:55.000000000 -0500
-@@ -319,7 +319,7 @@ static const struct ide_dma_ops sl82c105
+diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
+index d698da4..fca42a4 100644
+--- a/drivers/ide/sl82c105.c
++++ b/drivers/ide/sl82c105.c
+@@ -319,7 +319,7 @@ static const struct ide_dma_ops sl82c105_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32813,10 +34338,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/sl82c105.c linux-2.6.32.49/drivers/ide/sl
.name = DRV_NAME,
.init_chipset = init_chipset_sl82c105,
.enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
-diff -urNp linux-2.6.32.49/drivers/ide/slc90e66.c linux-2.6.32.49/drivers/ide/slc90e66.c
---- linux-2.6.32.49/drivers/ide/slc90e66.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/slc90e66.c 2011-11-18 18:01:55.000000000 -0500
-@@ -131,7 +131,7 @@ static const struct ide_port_ops slc90e6
+diff --git a/drivers/ide/slc90e66.c b/drivers/ide/slc90e66.c
+index 1ccfb40..83d5779 100644
+--- a/drivers/ide/slc90e66.c
++++ b/drivers/ide/slc90e66.c
+@@ -131,7 +131,7 @@ static const struct ide_port_ops slc90e66_port_ops = {
.cable_detect = slc90e66_cable_detect,
};
@@ -32825,10 +34351,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/slc90e66.c linux-2.6.32.49/drivers/ide/sl
.name = DRV_NAME,
.enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} },
.port_ops = &slc90e66_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/tc86c001.c linux-2.6.32.49/drivers/ide/tc86c001.c
---- linux-2.6.32.49/drivers/ide/tc86c001.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/tc86c001.c 2011-11-18 18:01:55.000000000 -0500
-@@ -190,7 +190,7 @@ static const struct ide_dma_ops tc86c001
+diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
+index 05a93d6..5f9e325 100644
+--- a/drivers/ide/tc86c001.c
++++ b/drivers/ide/tc86c001.c
+@@ -190,7 +190,7 @@ static const struct ide_dma_ops tc86c001_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -32837,10 +34364,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/tc86c001.c linux-2.6.32.49/drivers/ide/tc
.name = DRV_NAME,
.init_hwif = init_hwif_tc86c001,
.port_ops = &tc86c001_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/triflex.c linux-2.6.32.49/drivers/ide/triflex.c
---- linux-2.6.32.49/drivers/ide/triflex.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/triflex.c 2011-11-18 18:01:55.000000000 -0500
-@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex
+diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c
+index 8773c3b..7907d6c 100644
+--- a/drivers/ide/triflex.c
++++ b/drivers/ide/triflex.c
+@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex_port_ops = {
.set_dma_mode = triflex_set_mode,
};
@@ -32849,10 +34377,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/triflex.c linux-2.6.32.49/drivers/ide/tri
.name = DRV_NAME,
.enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
.port_ops = &triflex_port_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/trm290.c linux-2.6.32.49/drivers/ide/trm290.c
---- linux-2.6.32.49/drivers/ide/trm290.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/trm290.c 2011-11-18 18:01:55.000000000 -0500
-@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops
+diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
+index 4b42ca0..e494a98 100644
+--- a/drivers/ide/trm290.c
++++ b/drivers/ide/trm290.c
+@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops = {
.dma_check = trm290_dma_check,
};
@@ -32861,10 +34390,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/trm290.c linux-2.6.32.49/drivers/ide/trm2
.name = DRV_NAME,
.init_hwif = init_hwif_trm290,
.tp_ops = &trm290_tp_ops,
-diff -urNp linux-2.6.32.49/drivers/ide/via82cxxx.c linux-2.6.32.49/drivers/ide/via82cxxx.c
---- linux-2.6.32.49/drivers/ide/via82cxxx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ide/via82cxxx.c 2011-11-18 18:01:55.000000000 -0500
-@@ -374,7 +374,7 @@ static const struct ide_port_ops via_por
+diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
+index 028de26..520d5d5 100644
+--- a/drivers/ide/via82cxxx.c
++++ b/drivers/ide/via82cxxx.c
+@@ -374,7 +374,7 @@ static const struct ide_port_ops via_port_ops = {
.cable_detect = via82cxxx_cable_detect,
};
@@ -32873,10 +34403,11 @@ diff -urNp linux-2.6.32.49/drivers/ide/via82cxxx.c linux-2.6.32.49/drivers/ide/v
.name = DRV_NAME,
.init_chipset = init_chipset_via82cxxx,
.enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
-diff -urNp linux-2.6.32.49/drivers/ieee1394/dv1394.c linux-2.6.32.49/drivers/ieee1394/dv1394.c
---- linux-2.6.32.49/drivers/ieee1394/dv1394.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ieee1394/dv1394.c 2011-11-15 19:59:43.000000000 -0500
-@@ -739,7 +739,7 @@ static void frame_prepare(struct video_c
+diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
+index 2cd00b5..14de699 100644
+--- a/drivers/ieee1394/dv1394.c
++++ b/drivers/ieee1394/dv1394.c
+@@ -739,7 +739,7 @@ static void frame_prepare(struct video_card *video, unsigned int this_frame)
based upon DIF section and sequence
*/
@@ -32885,10 +34416,11 @@ diff -urNp linux-2.6.32.49/drivers/ieee1394/dv1394.c linux-2.6.32.49/drivers/iee
frame_put_packet (struct frame *f, struct packet *p)
{
int section_type = p->data[0] >> 5; /* section type is in bits 5 - 7 */
-diff -urNp linux-2.6.32.49/drivers/ieee1394/hosts.c linux-2.6.32.49/drivers/ieee1394/hosts.c
---- linux-2.6.32.49/drivers/ieee1394/hosts.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ieee1394/hosts.c 2011-11-15 19:59:43.000000000 -0500
-@@ -78,6 +78,7 @@ static int dummy_isoctl(struct hpsb_iso
+diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c
+index e947d8f..6a966b9 100644
+--- a/drivers/ieee1394/hosts.c
++++ b/drivers/ieee1394/hosts.c
+@@ -78,6 +78,7 @@ static int dummy_isoctl(struct hpsb_iso *iso, enum isoctl_cmd command,
}
static struct hpsb_host_driver dummy_driver = {
@@ -32896,10 +34428,11 @@ diff -urNp linux-2.6.32.49/drivers/ieee1394/hosts.c linux-2.6.32.49/drivers/ieee
.transmit_packet = dummy_transmit_packet,
.devctl = dummy_devctl,
.isoctl = dummy_isoctl
-diff -urNp linux-2.6.32.49/drivers/ieee1394/init_ohci1394_dma.c linux-2.6.32.49/drivers/ieee1394/init_ohci1394_dma.c
---- linux-2.6.32.49/drivers/ieee1394/init_ohci1394_dma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ieee1394/init_ohci1394_dma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -257,7 +257,7 @@ void __init init_ohci1394_dma_on_all_con
+diff --git a/drivers/ieee1394/init_ohci1394_dma.c b/drivers/ieee1394/init_ohci1394_dma.c
+index ddaab6e..8d37435 100644
+--- a/drivers/ieee1394/init_ohci1394_dma.c
++++ b/drivers/ieee1394/init_ohci1394_dma.c
+@@ -257,7 +257,7 @@ void __init init_ohci1394_dma_on_all_controllers(void)
for (func = 0; func < 8; func++) {
u32 class = read_pci_config(num,slot,func,
PCI_CLASS_REVISION);
@@ -32908,10 +34441,11 @@ diff -urNp linux-2.6.32.49/drivers/ieee1394/init_ohci1394_dma.c linux-2.6.32.49/
continue; /* No device at this func */
if (class>>8 != PCI_CLASS_SERIAL_FIREWIRE_OHCI)
-diff -urNp linux-2.6.32.49/drivers/ieee1394/ohci1394.c linux-2.6.32.49/drivers/ieee1394/ohci1394.c
---- linux-2.6.32.49/drivers/ieee1394/ohci1394.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ieee1394/ohci1394.c 2011-11-15 19:59:43.000000000 -0500
-@@ -147,9 +147,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_
+diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
+index 65c1429..5d8c11f 100644
+--- a/drivers/ieee1394/ohci1394.c
++++ b/drivers/ieee1394/ohci1394.c
+@@ -147,9 +147,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
/* Module Parameters */
@@ -32923,10 +34457,11 @@ diff -urNp linux-2.6.32.49/drivers/ieee1394/ohci1394.c linux-2.6.32.49/drivers/i
static void dma_trm_tasklet(unsigned long data);
static void dma_trm_reset(struct dma_trm_ctx *d);
-diff -urNp linux-2.6.32.49/drivers/ieee1394/sbp2.c linux-2.6.32.49/drivers/ieee1394/sbp2.c
---- linux-2.6.32.49/drivers/ieee1394/sbp2.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/ieee1394/sbp2.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2111,7 +2111,7 @@ MODULE_DESCRIPTION("IEEE-1394 SBP-2 prot
+diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
+index f199896..78c9fc8 100644
+--- a/drivers/ieee1394/sbp2.c
++++ b/drivers/ieee1394/sbp2.c
+@@ -2111,7 +2111,7 @@ MODULE_DESCRIPTION("IEEE-1394 SBP-2 protocol driver");
MODULE_SUPPORTED_DEVICE(SBP2_DEVICE_NAME);
MODULE_LICENSE("GPL");
@@ -32935,10 +34470,11 @@ diff -urNp linux-2.6.32.49/drivers/ieee1394/sbp2.c linux-2.6.32.49/drivers/ieee1
{
int ret;
-diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/infiniband/core/cm.c
---- linux-2.6.32.49/drivers/infiniband/core/cm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/core/cm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -112,7 +112,7 @@ static char const counter_group_names[CM
+diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
+index a5dea6b..0cefe8f 100644
+--- a/drivers/infiniband/core/cm.c
++++ b/drivers/infiniband/core/cm.c
+@@ -112,7 +112,7 @@ static char const counter_group_names[CM_COUNTER_GROUPS]
struct cm_counter_group {
struct kobject obj;
@@ -32947,7 +34483,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
};
struct cm_counter_attribute {
-@@ -1386,7 +1386,7 @@ static void cm_dup_req_handler(struct cm
+@@ -1386,7 +1386,7 @@ static void cm_dup_req_handler(struct cm_work *work,
struct ib_mad_send_buf *msg = NULL;
int ret;
@@ -32956,7 +34492,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_REQ_COUNTER]);
/* Quick state check to discard duplicate REQs. */
-@@ -1764,7 +1764,7 @@ static void cm_dup_rep_handler(struct cm
+@@ -1764,7 +1764,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
if (!cm_id_priv)
return;
@@ -32965,7 +34501,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_REP_COUNTER]);
ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
if (ret)
-@@ -1931,7 +1931,7 @@ static int cm_rtu_handler(struct cm_work
+@@ -1931,7 +1931,7 @@ static int cm_rtu_handler(struct cm_work *work)
if (cm_id_priv->id.state != IB_CM_REP_SENT &&
cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
spin_unlock_irq(&cm_id_priv->lock);
@@ -32974,7 +34510,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_RTU_COUNTER]);
goto out;
}
-@@ -2110,7 +2110,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2110,7 +2110,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
dreq_msg->local_comm_id);
if (!cm_id_priv) {
@@ -32983,7 +34519,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_DREQ_COUNTER]);
cm_issue_drep(work->port, work->mad_recv_wc);
return -EINVAL;
-@@ -2131,7 +2131,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2131,7 +2131,7 @@ static int cm_dreq_handler(struct cm_work *work)
case IB_CM_MRA_REP_RCVD:
break;
case IB_CM_TIMEWAIT:
@@ -32992,7 +34528,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_DREQ_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2145,7 +2145,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2145,7 +2145,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_DREQ_RCVD:
@@ -33001,7 +34537,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_DREQ_COUNTER]);
goto unlock;
default:
-@@ -2501,7 +2501,7 @@ static int cm_mra_handler(struct cm_work
+@@ -2501,7 +2501,7 @@ static int cm_mra_handler(struct cm_work *work)
ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv->msg, timeout)) {
if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
@@ -33010,7 +34546,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter_group[CM_RECV_DUPLICATES].
counter[CM_MRA_COUNTER]);
goto out;
-@@ -2510,7 +2510,7 @@ static int cm_mra_handler(struct cm_work
+@@ -2510,7 +2510,7 @@ static int cm_mra_handler(struct cm_work *work)
break;
case IB_CM_MRA_REQ_RCVD:
case IB_CM_MRA_REP_RCVD:
@@ -33019,7 +34555,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_MRA_COUNTER]);
/* fall through */
default:
-@@ -2672,7 +2672,7 @@ static int cm_lap_handler(struct cm_work
+@@ -2672,7 +2672,7 @@ static int cm_lap_handler(struct cm_work *work)
case IB_CM_LAP_IDLE:
break;
case IB_CM_MRA_LAP_SENT:
@@ -33028,7 +34564,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_LAP_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2688,7 +2688,7 @@ static int cm_lap_handler(struct cm_work
+@@ -2688,7 +2688,7 @@ static int cm_lap_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_LAP_RCVD:
@@ -33037,7 +34573,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_LAP_COUNTER]);
goto unlock;
default:
-@@ -2972,7 +2972,7 @@ static int cm_sidr_req_handler(struct cm
+@@ -2972,7 +2972,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
if (cur_cm_id_priv) {
spin_unlock_irq(&cm.lock);
@@ -33046,7 +34582,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[CM_SIDR_REQ_COUNTER]);
goto out; /* Duplicate message. */
}
-@@ -3184,10 +3184,10 @@ static void cm_send_handler(struct ib_ma
+@@ -3184,10 +3184,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
msg->retries = 1;
@@ -33059,7 +34595,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
&port->counter_group[CM_XMIT_RETRIES].
counter[attr_index]);
-@@ -3397,7 +3397,7 @@ static void cm_recv_handler(struct ib_ma
+@@ -3397,7 +3397,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
}
attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
@@ -33068,7 +34604,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
counter[attr_id - CM_ATTR_ID_OFFSET]);
work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
-@@ -3595,10 +3595,10 @@ static ssize_t cm_show_counter(struct ko
+@@ -3595,10 +3595,10 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
cm_attr = container_of(attr, struct cm_counter_attribute, attr);
return sprintf(buf, "%ld\n",
@@ -33081,9 +34617,10 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/cm.c linux-2.6.32.49/drivers/
.show = cm_show_counter
};
-diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c
---- linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
+index 4507043..14ad522 100644
+--- a/drivers/infiniband/core/fmr_pool.c
++++ b/drivers/infiniband/core/fmr_pool.c
@@ -97,8 +97,8 @@ struct ib_fmr_pool {
struct task_struct *thread;
@@ -33095,7 +34632,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
wait_queue_head_t force_wait;
};
-@@ -179,10 +179,10 @@ static int ib_fmr_cleanup_thread(void *p
+@@ -179,10 +179,10 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
struct ib_fmr_pool *pool = pool_ptr;
do {
@@ -33108,7 +34645,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
wake_up_interruptible(&pool->force_wait);
if (pool->flush_function)
-@@ -190,7 +190,7 @@ static int ib_fmr_cleanup_thread(void *p
+@@ -190,7 +190,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
}
set_current_state(TASK_INTERRUPTIBLE);
@@ -33117,7 +34654,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
!kthread_should_stop())
schedule();
__set_current_state(TASK_RUNNING);
-@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(s
+@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
pool->dirty_watermark = params->dirty_watermark;
pool->dirty_len = 0;
spin_lock_init(&pool->pool_lock);
@@ -33128,7 +34665,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
init_waitqueue_head(&pool->force_wait);
pool->thread = kthread_run(ib_fmr_cleanup_thread,
-@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool
+@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
}
spin_unlock_irq(&pool->pool_lock);
@@ -33142,7 +34679,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
return -EINTR;
return 0;
-@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr
+@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
} else {
list_add_tail(&fmr->list, &pool->dirty_list);
if (++pool->dirty_len >= pool->dirty_watermark) {
@@ -33151,10 +34688,11 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/fmr_pool.c linux-2.6.32.49/dr
wake_up_process(pool->thread);
}
}
-diff -urNp linux-2.6.32.49/drivers/infiniband/core/sysfs.c linux-2.6.32.49/drivers/infiniband/core/sysfs.c
---- linux-2.6.32.49/drivers/infiniband/core/sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/core/sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -79,7 +79,7 @@ static ssize_t port_attr_show(struct kob
+diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
+index 158a214..1558bb7 100644
+--- a/drivers/infiniband/core/sysfs.c
++++ b/drivers/infiniband/core/sysfs.c
+@@ -79,7 +79,7 @@ static ssize_t port_attr_show(struct kobject *kobj,
return port_attr->show(p, port_attr, buf);
}
@@ -33163,10 +34701,11 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/sysfs.c linux-2.6.32.49/drive
.show = port_attr_show
};
-diff -urNp linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c
---- linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c 2011-11-15 19:59:43.000000000 -0500
-@@ -40,18 +40,21 @@ void ib_copy_ah_attr_to_user(struct ib_u
+diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c
+index 5440da0..1194ecb 100644
+--- a/drivers/infiniband/core/uverbs_marshall.c
++++ b/drivers/infiniband/core/uverbs_marshall.c
+@@ -40,18 +40,21 @@ void ib_copy_ah_attr_to_user(struct ib_uverbs_ah_attr *dst,
dst->grh.sgid_index = src->grh.sgid_index;
dst->grh.hop_limit = src->grh.hop_limit;
dst->grh.traffic_class = src->grh.traffic_class;
@@ -33188,7 +34727,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c linux-2.6.3
dst->cur_qp_state = src->cur_qp_state;
dst->path_mtu = src->path_mtu;
dst->path_mig_state = src->path_mig_state;
-@@ -83,6 +86,7 @@ void ib_copy_qp_attr_to_user(struct ib_u
+@@ -83,6 +86,7 @@ void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst,
dst->rnr_retry = src->rnr_retry;
dst->alt_port_num = src->alt_port_num;
dst->alt_timeout = src->alt_timeout;
@@ -33196,10 +34735,11 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/core/uverbs_marshall.c linux-2.6.3
}
EXPORT_SYMBOL(ib_copy_qp_attr_to_user);
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/ipath/ipath_fs.c linux-2.6.32.49/drivers/infiniband/hw/ipath/ipath_fs.c
---- linux-2.6.32.49/drivers/infiniband/hw/ipath/ipath_fs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/ipath/ipath_fs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -110,6 +110,8 @@ static ssize_t atomic_counters_read(stru
+diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
+index 100da85..62e6b88 100644
+--- a/drivers/infiniband/hw/ipath/ipath_fs.c
++++ b/drivers/infiniband/hw/ipath/ipath_fs.c
+@@ -110,6 +110,8 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
struct infinipath_counters counters;
struct ipath_devdata *dd;
@@ -33208,10 +34748,11 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/ipath/ipath_fs.c linux-2.6.32.4
dd = file->f_path.dentry->d_inode->i_private;
dd->ipath_f_read_counters(dd, &counters);
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c
---- linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c 2011-11-15 19:59:43.000000000 -0500
-@@ -102,7 +102,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limi
+diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
+index cbde0cf..afaf55c 100644
+--- a/drivers/infiniband/hw/nes/nes.c
++++ b/drivers/infiniband/hw/nes/nes.c
+@@ -102,7 +102,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes");
LIST_HEAD(nes_adapter_list);
static LIST_HEAD(nes_dev_list);
@@ -33220,7 +34761,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c linux-2.6.32.49/drive
static unsigned int ee_flsh_adapter;
static unsigned int sysfs_nonidx_addr;
-@@ -259,7 +259,7 @@ static void nes_cqp_rem_ref_callback(str
+@@ -259,7 +259,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
struct nes_adapter *nesadapter = nesdev->nesadapter;
u32 qp_id;
@@ -33229,9 +34770,60 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes.c linux-2.6.32.49/drive
/* Free the control structures */
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c
---- linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
+index bcc6abc..9c76b2f 100644
+--- a/drivers/infiniband/hw/nes/nes.h
++++ b/drivers/infiniband/hw/nes/nes.h
+@@ -174,17 +174,17 @@ extern unsigned int nes_debug_level;
+ extern unsigned int wqm_quanta;
+ extern struct list_head nes_adapter_list;
+
+-extern atomic_t cm_connects;
+-extern atomic_t cm_accepts;
+-extern atomic_t cm_disconnects;
+-extern atomic_t cm_closes;
+-extern atomic_t cm_connecteds;
+-extern atomic_t cm_connect_reqs;
+-extern atomic_t cm_rejects;
+-extern atomic_t mod_qp_timouts;
+-extern atomic_t qps_created;
+-extern atomic_t qps_destroyed;
+-extern atomic_t sw_qps_destroyed;
++extern atomic_unchecked_t cm_connects;
++extern atomic_unchecked_t cm_accepts;
++extern atomic_unchecked_t cm_disconnects;
++extern atomic_unchecked_t cm_closes;
++extern atomic_unchecked_t cm_connecteds;
++extern atomic_unchecked_t cm_connect_reqs;
++extern atomic_unchecked_t cm_rejects;
++extern atomic_unchecked_t mod_qp_timouts;
++extern atomic_unchecked_t qps_created;
++extern atomic_unchecked_t qps_destroyed;
++extern atomic_unchecked_t sw_qps_destroyed;
+ extern u32 mh_detected;
+ extern u32 mh_pauses_sent;
+ extern u32 cm_packets_sent;
+@@ -196,11 +196,11 @@ extern u32 cm_packets_retrans;
+ extern u32 cm_listens_created;
+ extern u32 cm_listens_destroyed;
+ extern u32 cm_backlog_drops;
+-extern atomic_t cm_loopbacks;
+-extern atomic_t cm_nodes_created;
+-extern atomic_t cm_nodes_destroyed;
+-extern atomic_t cm_accel_dropped_pkts;
+-extern atomic_t cm_resets_recvd;
++extern atomic_unchecked_t cm_loopbacks;
++extern atomic_unchecked_t cm_nodes_created;
++extern atomic_unchecked_t cm_nodes_destroyed;
++extern atomic_unchecked_t cm_accel_dropped_pkts;
++extern atomic_unchecked_t cm_resets_recvd;
+
+ extern u32 int_mod_timer_init;
+ extern u32 int_mod_cq_depth_256;
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index 73473db..5ed06e8 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -69,11 +69,11 @@ u32 cm_packets_received;
u32 cm_listens_created;
u32 cm_listens_destroyed;
@@ -33270,7 +34862,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
/**
-@@ -1195,7 +1195,7 @@ static struct nes_cm_node *make_cm_node(
+@@ -1195,7 +1195,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
cm_node->rem_mac);
add_hte_node(cm_core, cm_node);
@@ -33279,7 +34871,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
return cm_node;
}
-@@ -1253,7 +1253,7 @@ static int rem_ref_cm_node(struct nes_cm
+@@ -1253,7 +1253,7 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core,
}
atomic_dec(&cm_core->node_cnt);
@@ -33288,7 +34880,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nesqp = cm_node->nesqp;
if (nesqp) {
nesqp->cm_node = NULL;
-@@ -1320,7 +1320,7 @@ static int process_options(struct nes_cm
+@@ -1320,7 +1320,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc,
static void drop_packet(struct sk_buff *skb)
{
@@ -33297,7 +34889,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
dev_kfree_skb_any(skb);
}
-@@ -1377,7 +1377,7 @@ static void handle_rst_pkt(struct nes_cm
+@@ -1377,7 +1377,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
int reset = 0; /* whether to send reset in case of err.. */
int passive_state;
@@ -33306,7 +34898,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_debug(NES_DBG_CM, "Received Reset, cm_node = %p, state = %u."
" refcnt=%d\n", cm_node, cm_node->state,
atomic_read(&cm_node->ref_count));
-@@ -2000,7 +2000,7 @@ static struct nes_cm_node *mini_cm_conne
+@@ -2000,7 +2000,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
rem_ref_cm_node(cm_node->cm_core, cm_node);
return NULL;
}
@@ -33315,7 +34907,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
loopbackremotenode->loopbackpartner = cm_node;
loopbackremotenode->tcp_cntxt.rcv_wscale =
NES_CM_DEFAULT_RCV_WND_SCALE;
-@@ -2262,7 +2262,7 @@ static int mini_cm_recv_pkt(struct nes_c
+@@ -2262,7 +2262,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core,
add_ref_cm_node(cm_node);
} else if (cm_node->state == NES_CM_STATE_TSA) {
rem_ref_cm_node(cm_core, cm_node);
@@ -33324,7 +34916,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
dev_kfree_skb_any(skb);
break;
}
-@@ -2568,7 +2568,7 @@ static int nes_cm_disconn_true(struct ne
+@@ -2568,7 +2568,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
if ((cm_id) && (cm_id->event_handler)) {
if (issue_disconn) {
@@ -33333,7 +34925,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
cm_event.event = IW_CM_EVENT_DISCONNECT;
cm_event.status = disconn_status;
cm_event.local_addr = cm_id->local_addr;
-@@ -2590,7 +2590,7 @@ static int nes_cm_disconn_true(struct ne
+@@ -2590,7 +2590,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
}
if (issue_close) {
@@ -33342,7 +34934,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_disconnect(nesqp, 1);
cm_id->provider_data = nesqp;
-@@ -2710,7 +2710,7 @@ int nes_accept(struct iw_cm_id *cm_id, s
+@@ -2710,7 +2710,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n",
nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener);
@@ -33351,7 +34943,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_debug(NES_DBG_CM, "netdev refcnt = %u.\n",
atomic_read(&nesvnic->netdev->refcnt));
-@@ -2919,7 +2919,7 @@ int nes_reject(struct iw_cm_id *cm_id, c
+@@ -2919,7 +2919,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
struct nes_cm_core *cm_core;
@@ -33360,7 +34952,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
cm_node = (struct nes_cm_node *) cm_id->provider_data;
loopback = cm_node->loopbackpartner;
cm_core = cm_node->cm_core;
-@@ -2982,7 +2982,7 @@ int nes_connect(struct iw_cm_id *cm_id,
+@@ -2982,7 +2982,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ntohl(cm_id->local_addr.sin_addr.s_addr),
ntohs(cm_id->local_addr.sin_port));
@@ -33369,7 +34961,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nesqp->active_conn = 1;
/* cache the cm_id in the qp */
-@@ -3195,7 +3195,7 @@ static void cm_event_connected(struct ne
+@@ -3195,7 +3195,7 @@ static void cm_event_connected(struct nes_cm_event *event)
if (nesqp->destroyed) {
return;
}
@@ -33378,7 +34970,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_debug(NES_DBG_CM, "QP%u attempting to connect to 0x%08X:0x%04X on"
" local port 0x%04X. jiffies = %lu.\n",
nesqp->hwqp.qp_id,
-@@ -3403,7 +3403,7 @@ static void cm_event_reset(struct nes_cm
+@@ -3403,7 +3403,7 @@ static void cm_event_reset(struct nes_cm_event *event)
ret = cm_id->event_handler(cm_id, &cm_event);
cm_id->add_ref(cm_id);
@@ -33387,7 +34979,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
cm_event.event = IW_CM_EVENT_CLOSE;
cm_event.status = IW_CM_EVENT_STATUS_OK;
cm_event.provider_data = cm_id->provider_data;
-@@ -3439,7 +3439,7 @@ static void cm_event_mpa_req(struct nes_
+@@ -3439,7 +3439,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -33396,7 +34988,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
cm_node, cm_id, jiffies);
-@@ -3477,7 +3477,7 @@ static void cm_event_mpa_reject(struct n
+@@ -3477,7 +3477,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -33405,59 +34997,11 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_cm.c linux-2.6.32.49/dr
nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
cm_node, cm_id, jiffies);
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes.h linux-2.6.32.49/drivers/infiniband/hw/nes/nes.h
---- linux-2.6.32.49/drivers/infiniband/hw/nes/nes.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/nes/nes.h 2011-11-15 19:59:43.000000000 -0500
-@@ -174,17 +174,17 @@ extern unsigned int nes_debug_level;
- extern unsigned int wqm_quanta;
- extern struct list_head nes_adapter_list;
-
--extern atomic_t cm_connects;
--extern atomic_t cm_accepts;
--extern atomic_t cm_disconnects;
--extern atomic_t cm_closes;
--extern atomic_t cm_connecteds;
--extern atomic_t cm_connect_reqs;
--extern atomic_t cm_rejects;
--extern atomic_t mod_qp_timouts;
--extern atomic_t qps_created;
--extern atomic_t qps_destroyed;
--extern atomic_t sw_qps_destroyed;
-+extern atomic_unchecked_t cm_connects;
-+extern atomic_unchecked_t cm_accepts;
-+extern atomic_unchecked_t cm_disconnects;
-+extern atomic_unchecked_t cm_closes;
-+extern atomic_unchecked_t cm_connecteds;
-+extern atomic_unchecked_t cm_connect_reqs;
-+extern atomic_unchecked_t cm_rejects;
-+extern atomic_unchecked_t mod_qp_timouts;
-+extern atomic_unchecked_t qps_created;
-+extern atomic_unchecked_t qps_destroyed;
-+extern atomic_unchecked_t sw_qps_destroyed;
- extern u32 mh_detected;
- extern u32 mh_pauses_sent;
- extern u32 cm_packets_sent;
-@@ -196,11 +196,11 @@ extern u32 cm_packets_retrans;
- extern u32 cm_listens_created;
- extern u32 cm_listens_destroyed;
- extern u32 cm_backlog_drops;
--extern atomic_t cm_loopbacks;
--extern atomic_t cm_nodes_created;
--extern atomic_t cm_nodes_destroyed;
--extern atomic_t cm_accel_dropped_pkts;
--extern atomic_t cm_resets_recvd;
-+extern atomic_unchecked_t cm_loopbacks;
-+extern atomic_unchecked_t cm_nodes_created;
-+extern atomic_unchecked_t cm_nodes_destroyed;
-+extern atomic_unchecked_t cm_accel_dropped_pkts;
-+extern atomic_unchecked_t cm_resets_recvd;
-
- extern u32 int_mod_timer_init;
- extern u32 int_mod_cq_depth_256;
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c
---- linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1210,17 +1210,17 @@ static void nes_netdev_get_ethtool_stats
+diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
+index e593af3..870694a 100644
+--- a/drivers/infiniband/hw/nes/nes_nic.c
++++ b/drivers/infiniband/hw/nes/nes_nic.c
+@@ -1210,17 +1210,17 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = mh_detected;
target_stat_values[++index] = mh_pauses_sent;
target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits;
@@ -33486,7 +35030,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c linux-2.6.32.49/d
target_stat_values[++index] = cm_packets_sent;
target_stat_values[++index] = cm_packets_bounced;
target_stat_values[++index] = cm_packets_created;
-@@ -1230,11 +1230,11 @@ static void nes_netdev_get_ethtool_stats
+@@ -1230,11 +1230,11 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = cm_listens_created;
target_stat_values[++index] = cm_listens_destroyed;
target_stat_values[++index] = cm_backlog_drops;
@@ -33503,9 +35047,10 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_nic.c linux-2.6.32.49/d
target_stat_values[++index] = int_mod_timer_init;
target_stat_values[++index] = int_mod_cq_depth_1;
target_stat_values[++index] = int_mod_cq_depth_4;
-diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c
---- linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
+index a680c42..f914deb 100644
+--- a/drivers/infiniband/hw/nes/nes_verbs.c
++++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -45,9 +45,9 @@
#include <rdma/ib_umem.h>
@@ -33519,7 +35064,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c linux-2.6.32.49
static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
-@@ -1240,7 +1240,7 @@ static struct ib_qp *nes_create_qp(struc
+@@ -1240,7 +1240,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
if (init_attr->create_flags)
return ERR_PTR(-EINVAL);
@@ -33528,7 +35073,7 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c linux-2.6.32.49
switch (init_attr->qp_type) {
case IB_QPT_RC:
if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
-@@ -1568,7 +1568,7 @@ static int nes_destroy_qp(struct ib_qp *
+@@ -1568,7 +1568,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
struct iw_cm_event cm_event;
int ret;
@@ -33537,9 +35082,10 @@ diff -urNp linux-2.6.32.49/drivers/infiniband/hw/nes/nes_verbs.c linux-2.6.32.49
nesqp->destroyed = 1;
/* Blow away the connection if it exists. */
-diff -urNp linux-2.6.32.49/drivers/input/gameport/gameport.c linux-2.6.32.49/drivers/input/gameport/gameport.c
---- linux-2.6.32.49/drivers/input/gameport/gameport.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/input/gameport/gameport.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
+index ac11be0..3883c04 100644
+--- a/drivers/input/gameport/gameport.c
++++ b/drivers/input/gameport/gameport.c
@@ -515,13 +515,13 @@ EXPORT_SYMBOL(gameport_set_phys);
*/
static void gameport_init_port(struct gameport *gameport)
@@ -33556,9 +35102,10 @@ diff -urNp linux-2.6.32.49/drivers/input/gameport/gameport.c linux-2.6.32.49/dri
gameport->dev.bus = &gameport_bus;
gameport->dev.release = gameport_release_port;
if (gameport->parent)
-diff -urNp linux-2.6.32.49/drivers/input/input.c linux-2.6.32.49/drivers/input/input.c
---- linux-2.6.32.49/drivers/input/input.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/input/input.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/input/input.c b/drivers/input/input.c
+index c82ae82..8cfb9cb 100644
+--- a/drivers/input/input.c
++++ b/drivers/input/input.c
@@ -1558,7 +1558,7 @@ EXPORT_SYMBOL(input_set_capability);
*/
int input_register_device(struct input_dev *dev)
@@ -33568,7 +35115,7 @@ diff -urNp linux-2.6.32.49/drivers/input/input.c linux-2.6.32.49/drivers/input/i
struct input_handler *handler;
const char *path;
int error;
-@@ -1585,7 +1585,7 @@ int input_register_device(struct input_d
+@@ -1585,7 +1585,7 @@ int input_register_device(struct input_dev *dev)
dev->setkeycode = input_default_setkeycode;
dev_set_name(&dev->dev, "input%ld",
@@ -33577,9 +35124,10 @@ diff -urNp linux-2.6.32.49/drivers/input/input.c linux-2.6.32.49/drivers/input/i
error = device_add(&dev->dev);
if (error)
-diff -urNp linux-2.6.32.49/drivers/input/joystick/sidewinder.c linux-2.6.32.49/drivers/input/joystick/sidewinder.c
---- linux-2.6.32.49/drivers/input/joystick/sidewinder.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/input/joystick/sidewinder.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
+index ca13a6b..b032b0c 100644
+--- a/drivers/input/joystick/sidewinder.c
++++ b/drivers/input/joystick/sidewinder.c
@@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
@@ -33597,10 +35145,11 @@ diff -urNp linux-2.6.32.49/drivers/input/joystick/sidewinder.c linux-2.6.32.49/d
i = sw_read_packet(sw->gameport, buf, sw->length, 0);
if (sw->type == SW_ID_3DP && sw->length == 66 && i != 66) { /* Broken packet, try to fix */
-diff -urNp linux-2.6.32.49/drivers/input/joystick/xpad.c linux-2.6.32.49/drivers/input/joystick/xpad.c
---- linux-2.6.32.49/drivers/input/joystick/xpad.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/input/joystick/xpad.c 2011-11-15 19:59:43.000000000 -0500
-@@ -621,7 +621,7 @@ static void xpad_led_set(struct led_clas
+diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
+index 79e3edc..01412b9 100644
+--- a/drivers/input/joystick/xpad.c
++++ b/drivers/input/joystick/xpad.c
+@@ -621,7 +621,7 @@ static void xpad_led_set(struct led_classdev *led_cdev,
static int xpad_led_probe(struct usb_xpad *xpad)
{
@@ -33609,7 +35158,7 @@ diff -urNp linux-2.6.32.49/drivers/input/joystick/xpad.c linux-2.6.32.49/drivers
long led_no;
struct xpad_led *led;
struct led_classdev *led_cdev;
-@@ -634,7 +634,7 @@ static int xpad_led_probe(struct usb_xpa
+@@ -634,7 +634,7 @@ static int xpad_led_probe(struct usb_xpad *xpad)
if (!led)
return -ENOMEM;
@@ -33618,10 +35167,11 @@ diff -urNp linux-2.6.32.49/drivers/input/joystick/xpad.c linux-2.6.32.49/drivers
snprintf(led->name, sizeof(led->name), "xpad%ld", led_no);
led->xpad = xpad;
-diff -urNp linux-2.6.32.49/drivers/input/serio/serio.c linux-2.6.32.49/drivers/input/serio/serio.c
---- linux-2.6.32.49/drivers/input/serio/serio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/input/serio/serio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -527,7 +527,7 @@ static void serio_release_port(struct de
+diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
+index 0236f0d..c7327f1 100644
+--- a/drivers/input/serio/serio.c
++++ b/drivers/input/serio/serio.c
+@@ -527,7 +527,7 @@ static void serio_release_port(struct device *dev)
*/
static void serio_init_port(struct serio *serio)
{
@@ -33630,7 +35180,7 @@ diff -urNp linux-2.6.32.49/drivers/input/serio/serio.c linux-2.6.32.49/drivers/i
__module_get(THIS_MODULE);
-@@ -536,7 +536,7 @@ static void serio_init_port(struct serio
+@@ -536,7 +536,7 @@ static void serio_init_port(struct serio *serio)
mutex_init(&serio->drv_mutex);
device_initialize(&serio->dev);
dev_set_name(&serio->dev, "serio%ld",
@@ -33639,10 +35189,11 @@ diff -urNp linux-2.6.32.49/drivers/input/serio/serio.c linux-2.6.32.49/drivers/i
serio->dev.bus = &serio_bus;
serio->dev.release = serio_release_port;
if (serio->parent) {
-diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/common.c linux-2.6.32.49/drivers/isdn/gigaset/common.c
---- linux-2.6.32.49/drivers/isdn/gigaset/common.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/gigaset/common.c 2011-11-15 19:59:43.000000000 -0500
-@@ -712,7 +712,7 @@ struct cardstate *gigaset_initcs(struct
+diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
+index 33dcd8d..2783d25 100644
+--- a/drivers/isdn/gigaset/common.c
++++ b/drivers/isdn/gigaset/common.c
+@@ -712,7 +712,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
cs->commands_pending = 0;
cs->cur_at_seq = 0;
cs->gotfwver = -1;
@@ -33651,9 +35202,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/common.c linux-2.6.32.49/drivers
cs->dev = NULL;
cs->tty = NULL;
cs->tty_dev = NULL;
-diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/gigaset.h linux-2.6.32.49/drivers/isdn/gigaset/gigaset.h
---- linux-2.6.32.49/drivers/isdn/gigaset/gigaset.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/gigaset/gigaset.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
+index a2f6125..6a70677 100644
+--- a/drivers/isdn/gigaset/gigaset.h
++++ b/drivers/isdn/gigaset/gigaset.h
@@ -34,6 +34,7 @@
#include <linux/tty_driver.h>
#include <linux/list.h>
@@ -33671,10 +35223,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/gigaset.h linux-2.6.32.49/driver
struct tty_struct *tty;
struct tasklet_struct if_wake_tasklet;
unsigned control_state;
-diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/drivers/isdn/gigaset/interface.c
---- linux-2.6.32.49/drivers/isdn/gigaset/interface.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/gigaset/interface.c 2011-11-15 19:59:43.000000000 -0500
-@@ -165,9 +165,7 @@ static int if_open(struct tty_struct *tt
+diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
+index b3065b8..c7e8cc9 100644
+--- a/drivers/isdn/gigaset/interface.c
++++ b/drivers/isdn/gigaset/interface.c
+@@ -165,9 +165,7 @@ static int if_open(struct tty_struct *tty, struct file *filp)
return -ERESTARTSYS; // FIXME -EINTR?
tty->driver_data = cs;
@@ -33685,7 +35238,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
spin_lock_irqsave(&cs->lock, flags);
cs->tty = tty;
spin_unlock_irqrestore(&cs->lock, flags);
-@@ -195,10 +193,10 @@ static void if_close(struct tty_struct *
+@@ -195,10 +193,10 @@ static void if_close(struct tty_struct *tty, struct file *filp)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -33698,7 +35251,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
spin_lock_irqsave(&cs->lock, flags);
cs->tty = NULL;
spin_unlock_irqrestore(&cs->lock, flags);
-@@ -233,7 +231,7 @@ static int if_ioctl(struct tty_struct *t
+@@ -233,7 +231,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,
if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
@@ -33707,7 +35260,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
retval = 0;
-@@ -361,7 +359,7 @@ static int if_write(struct tty_struct *t
+@@ -361,7 +359,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
@@ -33716,7 +35269,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n");
-@@ -395,7 +393,7 @@ static int if_write_room(struct tty_stru
+@@ -395,7 +393,7 @@ static int if_write_room(struct tty_struct *tty)
if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
@@ -33725,7 +35278,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n");
-@@ -425,7 +423,7 @@ static int if_chars_in_buffer(struct tty
+@@ -425,7 +423,7 @@ static int if_chars_in_buffer(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected");
@@ -33734,7 +35287,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED)
dev_warn(cs->dev, "can't write to unlocked device\n");
-@@ -453,7 +451,7 @@ static void if_throttle(struct tty_struc
+@@ -453,7 +451,7 @@ static void if_throttle(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -33743,7 +35296,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
//FIXME
-@@ -478,7 +476,7 @@ static void if_unthrottle(struct tty_str
+@@ -478,7 +476,7 @@ static void if_unthrottle(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -33752,7 +35305,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
//FIXME
-@@ -510,7 +508,7 @@ static void if_set_termios(struct tty_st
+@@ -510,7 +508,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
goto out;
}
@@ -33761,10 +35314,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/gigaset/interface.c linux-2.6.32.49/driv
dev_warn(cs->dev, "%s: device not opened\n", __func__);
goto out;
}
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c
---- linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c 2011-11-15 19:59:43.000000000 -0500
-@@ -173,7 +173,7 @@ int b1_load_t4file(avmcard *card, capilo
+diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
+index a7c0083..62a7cb6 100644
+--- a/drivers/isdn/hardware/avm/b1.c
++++ b/drivers/isdn/hardware/avm/b1.c
+@@ -173,7 +173,7 @@ int b1_load_t4file(avmcard *card, capiloaddatapart * t4file)
}
if (left) {
if (t4file->user) {
@@ -33773,7 +35327,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c linux-2.6.32.49/driver
return -EFAULT;
} else {
memcpy(buf, dp, left);
-@@ -221,7 +221,7 @@ int b1_load_config(avmcard *card, capilo
+@@ -221,7 +221,7 @@ int b1_load_config(avmcard *card, capiloaddatapart * config)
}
if (left) {
if (config->user) {
@@ -33782,10 +35336,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/avm/b1.c linux-2.6.32.49/driver
return -EFAULT;
} else {
memcpy(buf, dp, left);
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/capidtmf.c linux-2.6.32.49/drivers/isdn/hardware/eicon/capidtmf.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/capidtmf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/capidtmf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -498,6 +498,7 @@ void capidtmf_recv_block (t_capidtmf_sta
+diff --git a/drivers/isdn/hardware/eicon/capidtmf.c b/drivers/isdn/hardware/eicon/capidtmf.c
+index f130724..c373c68 100644
+--- a/drivers/isdn/hardware/eicon/capidtmf.c
++++ b/drivers/isdn/hardware/eicon/capidtmf.c
+@@ -498,6 +498,7 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
byte goertzel_result_buffer[CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT];
short windowed_sample_buffer[CAPIDTMF_RECV_WINDOWED_SAMPLES];
@@ -33793,9 +35348,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/capidtmf.c linux-2.6.32.4
if (p_state->recv.state & CAPIDTMF_RECV_STATE_DTMF_ACTIVE)
{
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/capifunc.c linux-2.6.32.49/drivers/isdn/hardware/eicon/capifunc.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/capifunc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/capifunc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
+index 4d425c6..a9be6c4 100644
+--- a/drivers/isdn/hardware/eicon/capifunc.c
++++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -1055,6 +1055,8 @@ static int divacapi_connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -33805,10 +35361,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/capifunc.c linux-2.6.32.4
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/diddfunc.c linux-2.6.32.49/drivers/isdn/hardware/eicon/diddfunc.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/diddfunc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/diddfunc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,6 +54,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c
+index 3029234..ef0d9e2 100644
+--- a/drivers/isdn/hardware/eicon/diddfunc.c
++++ b/drivers/isdn/hardware/eicon/diddfunc.c
+@@ -54,6 +54,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -33817,10 +35374,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/diddfunc.c linux-2.6.32.4
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/divasfunc.c linux-2.6.32.49/drivers/isdn/hardware/eicon/divasfunc.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/divasfunc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/divasfunc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -161,6 +161,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c
+index d36a4c0..11e7d1a 100644
+--- a/drivers/isdn/hardware/eicon/divasfunc.c
++++ b/drivers/isdn/hardware/eicon/divasfunc.c
+@@ -161,6 +161,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -33829,9 +35387,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/divasfunc.c linux-2.6.32.
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/divasync.h linux-2.6.32.49/drivers/isdn/hardware/eicon/divasync.h
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/divasync.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/divasync.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h
+index 85784a7..a19ca98 100644
+--- a/drivers/isdn/hardware/eicon/divasync.h
++++ b/drivers/isdn/hardware/eicon/divasync.h
@@ -146,7 +146,7 @@ typedef struct _diva_didd_add_adapter {
} diva_didd_add_adapter_t;
typedef struct _diva_didd_remove_adapter {
@@ -33841,10 +35400,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/divasync.h linux-2.6.32.4
typedef struct _diva_didd_read_adapter_array {
void * buffer;
dword length;
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/idifunc.c linux-2.6.32.49/drivers/isdn/hardware/eicon/idifunc.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/idifunc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/idifunc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -188,6 +188,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
+index db87d51..7d09acf 100644
+--- a/drivers/isdn/hardware/eicon/idifunc.c
++++ b/drivers/isdn/hardware/eicon/idifunc.c
+@@ -188,6 +188,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -33853,9 +35413,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/idifunc.c linux-2.6.32.49
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
+index ae89fb8..0fab299 100644
+--- a/drivers/isdn/hardware/eicon/message.c
++++ b/drivers/isdn/hardware/eicon/message.c
@@ -4889,6 +4889,8 @@ static void sig_ind(PLCI *plci)
dword d;
word w;
@@ -33865,7 +35426,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c linux-2.6.32.49
a = plci->adapter;
Id = ((word)plci->Id<<8)|a->Id;
PUT_WORD(&SS_Ind[4],0x0000);
-@@ -7484,6 +7486,8 @@ static word add_b1(PLCI *plci, API_PARSE
+@@ -7484,6 +7486,8 @@ static word add_b1(PLCI *plci, API_PARSE *bp, word b_channel_info,
word j, n, w;
dword d;
@@ -33874,7 +35435,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c linux-2.6.32.49
for(i=0;i<8;i++) bp_parms[i].length = 0;
for(i=0;i<2;i++) global_config[i].length = 0;
-@@ -7958,6 +7962,8 @@ static word add_b23(PLCI *plci, API_PARS
+@@ -7958,6 +7962,8 @@ static word add_b23(PLCI *plci, API_PARSE *bp)
const byte llc3[] = {4,3,2,2,6,6,0};
const byte header[] = {0,2,3,3,0,0,0};
@@ -33883,7 +35444,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c linux-2.6.32.49
for(i=0;i<8;i++) bp_parms[i].length = 0;
for(i=0;i<6;i++) b2_config_parms[i].length = 0;
for(i=0;i<5;i++) b3_config_parms[i].length = 0;
-@@ -14761,6 +14767,8 @@ static void group_optimization(DIVA_CAPI
+@@ -14761,6 +14767,8 @@ static void group_optimization(DIVA_CAPI_ADAPTER * a, PLCI * plci)
word appl_number_group_type[MAX_APPL];
PLCI *auxplci;
@@ -33892,10 +35453,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/message.c linux-2.6.32.49
set_group_ind_mask (plci); /* all APPLs within this inc. call are allowed to dial in */
if(!a->group_optimization_enabled)
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/mntfunc.c linux-2.6.32.49/drivers/isdn/hardware/eicon/mntfunc.c
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/mntfunc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/mntfunc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -79,6 +79,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
+index a564b75..f3cf8b5 100644
+--- a/drivers/isdn/hardware/eicon/mntfunc.c
++++ b/drivers/isdn/hardware/eicon/mntfunc.c
+@@ -79,6 +79,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -33904,9 +35466,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/mntfunc.c linux-2.6.32.49
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/xdi_adapter.h linux-2.6.32.49/drivers/isdn/hardware/eicon/xdi_adapter.h
---- linux-2.6.32.49/drivers/isdn/hardware/eicon/xdi_adapter.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/hardware/eicon/xdi_adapter.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/xdi_adapter.h b/drivers/isdn/hardware/eicon/xdi_adapter.h
+index a3bd163..8956575 100644
+--- a/drivers/isdn/hardware/eicon/xdi_adapter.h
++++ b/drivers/isdn/hardware/eicon/xdi_adapter.h
@@ -44,7 +44,7 @@ typedef struct _xdi_mbox_t {
typedef struct _diva_os_idi_adapter_interface {
diva_init_card_proc_t cleanup_adapter_proc;
@@ -33916,10 +35479,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/hardware/eicon/xdi_adapter.h linux-2.6.3
typedef struct _diva_os_xdi_adapter {
struct list_head link;
-diff -urNp linux-2.6.32.49/drivers/isdn/i4l/isdn_common.c linux-2.6.32.49/drivers/isdn/i4l/isdn_common.c
---- linux-2.6.32.49/drivers/isdn/i4l/isdn_common.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/i4l/isdn_common.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1290,6 +1290,8 @@ isdn_ioctl(struct inode *inode, struct f
+diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
+index adb1e8c..21b590b 100644
+--- a/drivers/isdn/i4l/isdn_common.c
++++ b/drivers/isdn/i4l/isdn_common.c
+@@ -1290,6 +1290,8 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
} iocpar;
void __user *argp = (void __user *)arg;
@@ -33928,10 +35492,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/i4l/isdn_common.c linux-2.6.32.49/driver
#define name iocpar.name
#define bname iocpar.bname
#define iocts iocpar.iocts
-diff -urNp linux-2.6.32.49/drivers/isdn/icn/icn.c linux-2.6.32.49/drivers/isdn/icn/icn.c
---- linux-2.6.32.49/drivers/isdn/icn/icn.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/icn/icn.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1044,7 +1044,7 @@ icn_writecmd(const u_char * buf, int len
+diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
+index bf7997a..cf091db 100644
+--- a/drivers/isdn/icn/icn.c
++++ b/drivers/isdn/icn/icn.c
+@@ -1044,7 +1044,7 @@ icn_writecmd(const u_char * buf, int len, int user, icn_card * card)
if (count > len)
count = len;
if (user) {
@@ -33940,10 +35505,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/icn/icn.c linux-2.6.32.49/drivers/isdn/i
return -EFAULT;
} else
memcpy(msg, buf, count);
-diff -urNp linux-2.6.32.49/drivers/isdn/mISDN/socket.c linux-2.6.32.49/drivers/isdn/mISDN/socket.c
---- linux-2.6.32.49/drivers/isdn/mISDN/socket.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/mISDN/socket.c 2011-11-15 19:59:43.000000000 -0500
-@@ -391,6 +391,7 @@ data_sock_ioctl(struct socket *sock, uns
+diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
+index feb0fa4..f76f830 100644
+--- a/drivers/isdn/mISDN/socket.c
++++ b/drivers/isdn/mISDN/socket.c
+@@ -391,6 +391,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if (dev) {
struct mISDN_devinfo di;
@@ -33951,7 +35517,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/mISDN/socket.c linux-2.6.32.49/drivers/i
di.id = dev->id;
di.Dprotocols = dev->Dprotocols;
di.Bprotocols = dev->Bprotocols | get_all_Bprotocols();
-@@ -671,6 +672,7 @@ base_sock_ioctl(struct socket *sock, uns
+@@ -671,6 +672,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if (dev) {
struct mISDN_devinfo di;
@@ -33959,10 +35525,11 @@ diff -urNp linux-2.6.32.49/drivers/isdn/mISDN/socket.c linux-2.6.32.49/drivers/i
di.id = dev->id;
di.Dprotocols = dev->Dprotocols;
di.Bprotocols = dev->Bprotocols | get_all_Bprotocols();
-diff -urNp linux-2.6.32.49/drivers/isdn/sc/interrupt.c linux-2.6.32.49/drivers/isdn/sc/interrupt.c
---- linux-2.6.32.49/drivers/isdn/sc/interrupt.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/isdn/sc/interrupt.c 2011-11-15 19:59:43.000000000 -0500
-@@ -112,11 +112,19 @@ irqreturn_t interrupt_handler(int dummy,
+diff --git a/drivers/isdn/sc/interrupt.c b/drivers/isdn/sc/interrupt.c
+index 485be8b..f0225bc 100644
+--- a/drivers/isdn/sc/interrupt.c
++++ b/drivers/isdn/sc/interrupt.c
+@@ -112,11 +112,19 @@ irqreturn_t interrupt_handler(int dummy, void *card_inst)
}
else if(callid>=0x0000 && callid<=0x7FFF)
{
@@ -33985,7 +35552,7 @@ diff -urNp linux-2.6.32.49/drivers/isdn/sc/interrupt.c linux-2.6.32.49/drivers/i
setup.si1 = 7;
setup.si2 = 0;
setup.plan = 0;
-@@ -176,7 +184,9 @@ irqreturn_t interrupt_handler(int dummy,
+@@ -176,7 +184,9 @@ irqreturn_t interrupt_handler(int dummy, void *card_inst)
* Handle a GetMyNumber Rsp
*/
if (IS_CE_MESSAGE(rcvmsg,Call,0,GetMyNumber)){
@@ -33996,9 +35563,10 @@ diff -urNp linux-2.6.32.49/drivers/isdn/sc/interrupt.c linux-2.6.32.49/drivers/i
continue;
}
-diff -urNp linux-2.6.32.49/drivers/lguest/core.c linux-2.6.32.49/drivers/lguest/core.c
---- linux-2.6.32.49/drivers/lguest/core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/lguest/core.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
+index 8744d24..d1f9a9a 100644
+--- a/drivers/lguest/core.c
++++ b/drivers/lguest/core.c
@@ -91,9 +91,17 @@ static __init int map_switcher(void)
* it's worked so far. The end address needs +1 because __get_vm_area
* allocates an extra guard page, so we need space for that.
@@ -34026,9 +35594,10 @@ diff -urNp linux-2.6.32.49/drivers/lguest/core.c linux-2.6.32.49/drivers/lguest/
end_switcher_text - start_switcher_text);
printk(KERN_INFO "lguest: mapped switcher at %p\n",
-diff -urNp linux-2.6.32.49/drivers/lguest/x86/core.c linux-2.6.32.49/drivers/lguest/x86/core.c
---- linux-2.6.32.49/drivers/lguest/x86/core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/lguest/x86/core.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
+index 6ae3888..8b38145 100644
+--- a/drivers/lguest/x86/core.c
++++ b/drivers/lguest/x86/core.c
@@ -59,7 +59,7 @@ static struct {
/* Offset from where switcher.S was compiled to where we've copied it */
static unsigned long switcher_offset(void)
@@ -34038,7 +35607,7 @@ diff -urNp linux-2.6.32.49/drivers/lguest/x86/core.c linux-2.6.32.49/drivers/lgu
}
/* This cpu's struct lguest_pages. */
-@@ -100,7 +100,13 @@ static void copy_in_guest_info(struct lg
+@@ -100,7 +100,13 @@ static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages)
* These copies are pretty cheap, so we do them unconditionally: */
/* Save the current Host top-level page directory.
*/
@@ -34070,9 +35639,10 @@ diff -urNp linux-2.6.32.49/drivers/lguest/x86/core.c linux-2.6.32.49/drivers/lgu
lguest_entry.segment = LGUEST_CS;
/*
-diff -urNp linux-2.6.32.49/drivers/lguest/x86/switcher_32.S linux-2.6.32.49/drivers/lguest/x86/switcher_32.S
---- linux-2.6.32.49/drivers/lguest/x86/switcher_32.S 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/lguest/x86/switcher_32.S 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/lguest/x86/switcher_32.S b/drivers/lguest/x86/switcher_32.S
+index 40634b0..4f5855e 100644
+--- a/drivers/lguest/x86/switcher_32.S
++++ b/drivers/lguest/x86/switcher_32.S
@@ -87,6 +87,7 @@
#include <asm/page.h>
#include <asm/segment.h>
@@ -34131,10 +35701,11 @@ diff -urNp linux-2.6.32.49/drivers/lguest/x86/switcher_32.S linux-2.6.32.49/driv
// Every interrupt can come to us here
// But we must truly tell each apart.
-diff -urNp linux-2.6.32.49/drivers/macintosh/macio_asic.c linux-2.6.32.49/drivers/macintosh/macio_asic.c
---- linux-2.6.32.49/drivers/macintosh/macio_asic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/macintosh/macio_asic.c 2011-11-18 18:01:55.000000000 -0500
-@@ -701,7 +701,7 @@ static void __devexit macio_pci_remove(s
+diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
+index 588a5b0..b71db89 100644
+--- a/drivers/macintosh/macio_asic.c
++++ b/drivers/macintosh/macio_asic.c
+@@ -701,7 +701,7 @@ static void __devexit macio_pci_remove(struct pci_dev* pdev)
* MacIO is matched against any Apple ID, it's probe() function
* will then decide wether it applies or not
*/
@@ -34143,9 +35714,10 @@ diff -urNp linux-2.6.32.49/drivers/macintosh/macio_asic.c linux-2.6.32.49/driver
.vendor = PCI_VENDOR_ID_APPLE,
.device = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
-diff -urNp linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c
---- linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
+index a348bb0..ecd9b3f 100644
+--- a/drivers/macintosh/via-pmu-backlight.c
++++ b/drivers/macintosh/via-pmu-backlight.c
@@ -15,7 +15,7 @@
#define MAX_PMU_LEVEL 0xFF
@@ -34155,7 +35727,7 @@ diff -urNp linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.49
static DEFINE_SPINLOCK(pmu_backlight_lock);
static int sleeping, uses_pmu_bl;
static u8 bl_curve[FB_BACKLIGHT_LEVELS];
-@@ -115,7 +115,7 @@ static int pmu_backlight_get_brightness(
+@@ -115,7 +115,7 @@ static int pmu_backlight_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -34164,10 +35736,11 @@ diff -urNp linux-2.6.32.49/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.49
.get_brightness = pmu_backlight_get_brightness,
.update_status = pmu_backlight_update_status,
-diff -urNp linux-2.6.32.49/drivers/macintosh/via-pmu.c linux-2.6.32.49/drivers/macintosh/via-pmu.c
---- linux-2.6.32.49/drivers/macintosh/via-pmu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/macintosh/via-pmu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2232,7 +2232,7 @@ static int pmu_sleep_valid(suspend_state
+diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
+index 6f308a4..b5f7ff7 100644
+--- a/drivers/macintosh/via-pmu.c
++++ b/drivers/macintosh/via-pmu.c
+@@ -2232,7 +2232,7 @@ static int pmu_sleep_valid(suspend_state_t state)
&& (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
}
@@ -34176,67 +35749,11 @@ diff -urNp linux-2.6.32.49/drivers/macintosh/via-pmu.c linux-2.6.32.49/drivers/m
.enter = powerbook_sleep,
.valid = pmu_sleep_valid,
};
-diff -urNp linux-2.6.32.49/drivers/md/dm.c linux-2.6.32.49/drivers/md/dm.c
---- linux-2.6.32.49/drivers/md/dm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -165,9 +165,9 @@ struct mapped_device {
- /*
- * Event handling.
- */
-- atomic_t event_nr;
-+ atomic_unchecked_t event_nr;
- wait_queue_head_t eventq;
-- atomic_t uevent_seq;
-+ atomic_unchecked_t uevent_seq;
- struct list_head uevent_list;
- spinlock_t uevent_lock; /* Protect access to uevent_list */
-
-@@ -1776,8 +1776,8 @@ static struct mapped_device *alloc_dev(i
- rwlock_init(&md->map_lock);
- atomic_set(&md->holders, 1);
- atomic_set(&md->open_count, 0);
-- atomic_set(&md->event_nr, 0);
-- atomic_set(&md->uevent_seq, 0);
-+ atomic_set_unchecked(&md->event_nr, 0);
-+ atomic_set_unchecked(&md->uevent_seq, 0);
- INIT_LIST_HEAD(&md->uevent_list);
- spin_lock_init(&md->uevent_lock);
-
-@@ -1927,7 +1927,7 @@ static void event_callback(void *context
-
- dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
-
-- atomic_inc(&md->event_nr);
-+ atomic_inc_unchecked(&md->event_nr);
- wake_up(&md->eventq);
- }
-
-@@ -2562,18 +2562,18 @@ void dm_kobject_uevent(struct mapped_dev
-
- uint32_t dm_next_uevent_seq(struct mapped_device *md)
- {
-- return atomic_add_return(1, &md->uevent_seq);
-+ return atomic_add_return_unchecked(1, &md->uevent_seq);
- }
-
- uint32_t dm_get_event_nr(struct mapped_device *md)
- {
-- return atomic_read(&md->event_nr);
-+ return atomic_read_unchecked(&md->event_nr);
- }
-
- int dm_wait_event(struct mapped_device *md, int event_nr)
- {
- return wait_event_interruptible(md->eventq,
-- (event_nr != atomic_read(&md->event_nr)));
-+ (event_nr != atomic_read_unchecked(&md->event_nr)));
- }
-
- void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
-diff -urNp linux-2.6.32.49/drivers/md/dm-ioctl.c linux-2.6.32.49/drivers/md/dm-ioctl.c
---- linux-2.6.32.49/drivers/md/dm-ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm-ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1437,7 +1437,7 @@ static int validate_params(uint cmd, str
+diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
+index 818b617..4656e38 100644
+--- a/drivers/md/dm-ioctl.c
++++ b/drivers/md/dm-ioctl.c
+@@ -1437,7 +1437,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
cmd == DM_LIST_VERSIONS_CMD)
return 0;
@@ -34245,9 +35762,10 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-ioctl.c linux-2.6.32.49/drivers/md/dm-i
if (!*param->name) {
DMWARN("name not supplied when creating device");
return -EINVAL;
-diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-raid1.c
---- linux-2.6.32.49/drivers/md/dm-raid1.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm-raid1.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
+index 6021d0a..a878643 100644
+--- a/drivers/md/dm-raid1.c
++++ b/drivers/md/dm-raid1.c
@@ -41,7 +41,7 @@ enum dm_raid1_error {
struct mirror {
@@ -34257,7 +35775,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
unsigned long error_type;
struct dm_dev *dev;
sector_t offset;
-@@ -203,7 +203,7 @@ static void fail_mirror(struct mirror *m
+@@ -203,7 +203,7 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type)
* simple way to tell if a device has encountered
* errors.
*/
@@ -34266,7 +35784,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
if (test_and_set_bit(error_type, &m->error_type))
return;
-@@ -225,7 +225,7 @@ static void fail_mirror(struct mirror *m
+@@ -225,7 +225,7 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type)
}
for (new = ms->mirror; new < ms->mirror + ms->nr_mirrors; new++)
@@ -34275,7 +35793,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
set_default_mirror(new);
break;
}
-@@ -363,7 +363,7 @@ static struct mirror *choose_mirror(stru
+@@ -363,7 +363,7 @@ static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector)
struct mirror *m = get_default_mirror(ms);
do {
@@ -34293,7 +35811,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
}
static int mirror_available(struct mirror_set *ms, struct bio *bio)
-@@ -484,7 +484,7 @@ static void do_reads(struct mirror_set *
+@@ -484,7 +484,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
*/
if (likely(region_in_sync(ms, region, 1)))
m = choose_mirror(ms, bio->bi_sector);
@@ -34302,7 +35820,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
m = NULL;
if (likely(m))
-@@ -855,7 +855,7 @@ static int get_mirror(struct mirror_set
+@@ -855,7 +855,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
}
ms->mirror[mirror].ms = ms;
@@ -34311,7 +35829,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
ms->mirror[mirror].error_type = 0;
ms->mirror[mirror].offset = offset;
-@@ -1241,7 +1241,7 @@ static void mirror_resume(struct dm_targ
+@@ -1241,7 +1241,7 @@ static void mirror_resume(struct dm_target *ti)
*/
static char device_status_char(struct mirror *m)
{
@@ -34320,9 +35838,10 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-raid1.c linux-2.6.32.49/drivers/md/dm-r
return 'A';
return (test_bit(DM_RAID1_WRITE_ERROR, &(m->error_type))) ? 'D' :
-diff -urNp linux-2.6.32.49/drivers/md/dm-stripe.c linux-2.6.32.49/drivers/md/dm-stripe.c
---- linux-2.6.32.49/drivers/md/dm-stripe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm-stripe.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
+index bd58703..9f26571 100644
+--- a/drivers/md/dm-stripe.c
++++ b/drivers/md/dm-stripe.c
@@ -20,7 +20,7 @@ struct stripe {
struct dm_dev *dev;
sector_t physical_start;
@@ -34332,7 +35851,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-stripe.c linux-2.6.32.49/drivers/md/dm-
};
struct stripe_c {
-@@ -188,7 +188,7 @@ static int stripe_ctr(struct dm_target *
+@@ -188,7 +188,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
kfree(sc);
return r;
}
@@ -34341,7 +35860,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-stripe.c linux-2.6.32.49/drivers/md/dm-
}
ti->private = sc;
-@@ -257,7 +257,7 @@ static int stripe_status(struct dm_targe
+@@ -257,7 +257,7 @@ static int stripe_status(struct dm_target *ti,
DMEMIT("%d ", sc->stripes);
for (i = 0; i < sc->stripes; i++) {
DMEMIT("%s ", sc->stripe[i].dev->name);
@@ -34350,7 +35869,7 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-stripe.c linux-2.6.32.49/drivers/md/dm-
'D' : 'A';
}
buffer[i] = '\0';
-@@ -304,8 +304,8 @@ static int stripe_end_io(struct dm_targe
+@@ -304,8 +304,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio,
*/
for (i = 0; i < sc->stripes; i++)
if (!strcmp(sc->stripe[i].dev->name, major_minor)) {
@@ -34361,9 +35880,10 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-stripe.c linux-2.6.32.49/drivers/md/dm-
DM_IO_ERROR_THRESHOLD)
queue_work(kstriped, &sc->kstriped_ws);
}
-diff -urNp linux-2.6.32.49/drivers/md/dm-sysfs.c linux-2.6.32.49/drivers/md/dm-sysfs.c
---- linux-2.6.32.49/drivers/md/dm-sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm-sysfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c
+index 4b04590..13a77b2 100644
+--- a/drivers/md/dm-sysfs.c
++++ b/drivers/md/dm-sysfs.c
@@ -75,7 +75,7 @@ static struct attribute *dm_attrs[] = {
NULL,
};
@@ -34373,10 +35893,11 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-sysfs.c linux-2.6.32.49/drivers/md/dm-s
.show = dm_attr_show,
};
-diff -urNp linux-2.6.32.49/drivers/md/dm-table.c linux-2.6.32.49/drivers/md/dm-table.c
---- linux-2.6.32.49/drivers/md/dm-table.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/dm-table.c 2011-11-15 19:59:43.000000000 -0500
-@@ -376,7 +376,7 @@ static int device_area_is_invalid(struct
+diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
+index 03345bb..332250d 100644
+--- a/drivers/md/dm-table.c
++++ b/drivers/md/dm-table.c
+@@ -376,7 +376,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
if (!dev_size)
return 0;
@@ -34385,9 +35906,68 @@ diff -urNp linux-2.6.32.49/drivers/md/dm-table.c linux-2.6.32.49/drivers/md/dm-t
DMWARN("%s: %s too small for target: "
"start=%llu, len=%llu, dev_size=%llu",
dm_device_name(ti->table->md), bdevname(bdev, b),
-diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
---- linux-2.6.32.49/drivers/md/md.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/md.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/md/dm.c b/drivers/md/dm.c
+index c988ac2..c418141 100644
+--- a/drivers/md/dm.c
++++ b/drivers/md/dm.c
+@@ -165,9 +165,9 @@ struct mapped_device {
+ /*
+ * Event handling.
+ */
+- atomic_t event_nr;
++ atomic_unchecked_t event_nr;
+ wait_queue_head_t eventq;
+- atomic_t uevent_seq;
++ atomic_unchecked_t uevent_seq;
+ struct list_head uevent_list;
+ spinlock_t uevent_lock; /* Protect access to uevent_list */
+
+@@ -1776,8 +1776,8 @@ static struct mapped_device *alloc_dev(int minor)
+ rwlock_init(&md->map_lock);
+ atomic_set(&md->holders, 1);
+ atomic_set(&md->open_count, 0);
+- atomic_set(&md->event_nr, 0);
+- atomic_set(&md->uevent_seq, 0);
++ atomic_set_unchecked(&md->event_nr, 0);
++ atomic_set_unchecked(&md->uevent_seq, 0);
+ INIT_LIST_HEAD(&md->uevent_list);
+ spin_lock_init(&md->uevent_lock);
+
+@@ -1927,7 +1927,7 @@ static void event_callback(void *context)
+
+ dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
+
+- atomic_inc(&md->event_nr);
++ atomic_inc_unchecked(&md->event_nr);
+ wake_up(&md->eventq);
+ }
+
+@@ -2562,18 +2562,18 @@ void dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
+
+ uint32_t dm_next_uevent_seq(struct mapped_device *md)
+ {
+- return atomic_add_return(1, &md->uevent_seq);
++ return atomic_add_return_unchecked(1, &md->uevent_seq);
+ }
+
+ uint32_t dm_get_event_nr(struct mapped_device *md)
+ {
+- return atomic_read(&md->event_nr);
++ return atomic_read_unchecked(&md->event_nr);
+ }
+
+ int dm_wait_event(struct mapped_device *md, int event_nr)
+ {
+ return wait_event_interruptible(md->eventq,
+- (event_nr != atomic_read(&md->event_nr)));
++ (event_nr != atomic_read_unchecked(&md->event_nr)));
+ }
+
+ void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
+diff --git a/drivers/md/md.c b/drivers/md/md.c
+index 4ce6e2f..7a9530a 100644
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
@@ -153,10 +153,10 @@ static int start_readonly;
* start build, activate spare
*/
@@ -34410,7 +35990,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
wake_up(&md_event_waiters);
}
-@@ -1226,7 +1226,7 @@ static int super_1_load(mdk_rdev_t *rdev
+@@ -1226,7 +1226,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
rdev->preferred_minor = 0xffff;
rdev->data_offset = le64_to_cpu(sb->data_offset);
@@ -34419,7 +35999,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
-@@ -1400,7 +1400,7 @@ static void super_1_sync(mddev_t *mddev,
+@@ -1400,7 +1400,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
else
sb->resync_offset = cpu_to_le64(0);
@@ -34428,7 +36008,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
sb->raid_disks = cpu_to_le32(mddev->raid_disks);
sb->size = cpu_to_le64(mddev->dev_sectors);
-@@ -2222,7 +2222,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_sho
+@@ -2222,7 +2222,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
static ssize_t
errors_show(mdk_rdev_t *rdev, char *page)
{
@@ -34437,7 +36017,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
}
static ssize_t
-@@ -2231,7 +2231,7 @@ errors_store(mdk_rdev_t *rdev, const cha
+@@ -2231,7 +2231,7 @@ errors_store(mdk_rdev_t *rdev, const char *buf, size_t len)
char *e;
unsigned long n = simple_strtoul(buf, &e, 10);
if (*buf && (*e == 0 || *e == '\n')) {
@@ -34446,7 +36026,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
return len;
}
return -EINVAL;
-@@ -2525,7 +2525,7 @@ static void rdev_free(struct kobject *ko
+@@ -2525,7 +2525,7 @@ static void rdev_free(struct kobject *ko)
mdk_rdev_t *rdev = container_of(ko, mdk_rdev_t, kobj);
kfree(rdev);
}
@@ -34455,7 +36035,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
.show = rdev_attr_show,
.store = rdev_attr_store,
};
-@@ -2574,8 +2574,8 @@ static mdk_rdev_t *md_import_device(dev_
+@@ -2574,8 +2574,8 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
rdev->data_offset = 0;
rdev->sb_events = 0;
atomic_set(&rdev->nr_pending, 0);
@@ -34485,7 +36065,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
return err;
}
-@@ -5962,7 +5963,7 @@ static int md_seq_show(struct seq_file *
+@@ -5962,7 +5963,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
spin_unlock(&pers_lock);
seq_printf(seq, "\n");
@@ -34494,7 +36074,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
return 0;
}
if (v == (void*)2) {
-@@ -6051,7 +6052,7 @@ static int md_seq_show(struct seq_file *
+@@ -6051,7 +6052,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
chunk_kb ? "KB" : "B");
if (bitmap->file) {
seq_printf(seq, ", file: ");
@@ -34503,7 +36083,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
}
seq_printf(seq, "\n");
-@@ -6085,7 +6086,7 @@ static int md_seq_open(struct inode *ino
+@@ -6085,7 +6086,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
else {
struct seq_file *p = file->private_data;
p->private = mi;
@@ -34512,7 +36092,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
}
return error;
}
-@@ -6101,7 +6102,7 @@ static unsigned int mdstat_poll(struct f
+@@ -6101,7 +6102,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
/* always allow read */
mask = POLLIN | POLLRDNORM;
@@ -34521,7 +36101,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
mask |= POLLERR | POLLPRI;
return mask;
}
-@@ -6145,7 +6146,7 @@ static int is_mddev_idle(mddev_t *mddev,
+@@ -6145,7 +6146,7 @@ static int is_mddev_idle(mddev_t *mddev, int init)
struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
(int)part_stat_read(&disk->part0, sectors[1]) -
@@ -34530,9 +36110,10 @@ diff -urNp linux-2.6.32.49/drivers/md/md.c linux-2.6.32.49/drivers/md/md.c
/* sync IO will cause sync_io to increase before the disk_stats
* as sync_io is counted when a request starts, and
* disk_stats is counted when it completes.
-diff -urNp linux-2.6.32.49/drivers/md/md.h linux-2.6.32.49/drivers/md/md.h
---- linux-2.6.32.49/drivers/md/md.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/md.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/md/md.h b/drivers/md/md.h
+index 87430fe..0024a4c 100644
+--- a/drivers/md/md.h
++++ b/drivers/md/md.h
@@ -94,10 +94,10 @@ struct mdk_rdev_s
* only maintained for arrays that
* support hot removal
@@ -34546,7 +36127,7 @@ diff -urNp linux-2.6.32.49/drivers/md/md.h linux-2.6.32.49/drivers/md/md.h
* for reporting to userspace and storing
* in superblock.
*/
-@@ -304,7 +304,7 @@ static inline void rdev_dec_pending(mdk_
+@@ -304,7 +304,7 @@ static inline void rdev_dec_pending(mdk_rdev_t *rdev, mddev_t *mddev)
static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
{
@@ -34555,31 +36136,11 @@ diff -urNp linux-2.6.32.49/drivers/md/md.h linux-2.6.32.49/drivers/md/md.h
}
struct mdk_personality
-diff -urNp linux-2.6.32.49/drivers/md/raid10.c linux-2.6.32.49/drivers/md/raid10.c
---- linux-2.6.32.49/drivers/md/raid10.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/raid10.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1255,7 +1255,7 @@ static void end_sync_read(struct bio *bi
- if (test_bit(BIO_UPTODATE, &bio->bi_flags))
- set_bit(R10BIO_Uptodate, &r10_bio->state);
- else {
-- atomic_add(r10_bio->sectors,
-+ atomic_add_unchecked(r10_bio->sectors,
- &conf->mirrors[d].rdev->corrected_errors);
- if (!test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery))
- md_error(r10_bio->mddev,
-@@ -1520,7 +1520,7 @@ static void fix_read_error(conf_t *conf,
- test_bit(In_sync, &rdev->flags)) {
- atomic_inc(&rdev->nr_pending);
- rcu_read_unlock();
-- atomic_add(s, &rdev->corrected_errors);
-+ atomic_add_unchecked(s, &rdev->corrected_errors);
- if (sync_page_io(rdev->bdev,
- r10_bio->devs[sl].addr +
- sect + rdev->data_offset,
-diff -urNp linux-2.6.32.49/drivers/md/raid1.c linux-2.6.32.49/drivers/md/raid1.c
---- linux-2.6.32.49/drivers/md/raid1.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/raid1.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1415,7 +1415,7 @@ static void sync_request_write(mddev_t *
+diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
+index 968cb14..f0ad2e4 100644
+--- a/drivers/md/raid1.c
++++ b/drivers/md/raid1.c
+@@ -1415,7 +1415,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
if (r1_bio->bios[d]->bi_end_io != end_sync_read)
continue;
rdev = conf->mirrors[d].rdev;
@@ -34588,7 +36149,7 @@ diff -urNp linux-2.6.32.49/drivers/md/raid1.c linux-2.6.32.49/drivers/md/raid1.c
if (sync_page_io(rdev->bdev,
sect + rdev->data_offset,
s<<9,
-@@ -1564,7 +1564,7 @@ static void fix_read_error(conf_t *conf,
+@@ -1564,7 +1564,7 @@ static void fix_read_error(conf_t *conf, int read_disk,
/* Well, this device is dead */
md_error(mddev, rdev);
else {
@@ -34597,10 +36158,33 @@ diff -urNp linux-2.6.32.49/drivers/md/raid1.c linux-2.6.32.49/drivers/md/raid1.c
printk(KERN_INFO
"raid1:%s: read error corrected "
"(%d sectors at %llu on %s)\n",
-diff -urNp linux-2.6.32.49/drivers/md/raid5.c linux-2.6.32.49/drivers/md/raid5.c
---- linux-2.6.32.49/drivers/md/raid5.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/md/raid5.c 2011-11-26 19:45:06.000000000 -0500
-@@ -482,7 +482,7 @@ static void ops_run_io(struct stripe_hea
+diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
+index 1b4e232..cf0f534 100644
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -1255,7 +1255,7 @@ static void end_sync_read(struct bio *bio, int error)
+ if (test_bit(BIO_UPTODATE, &bio->bi_flags))
+ set_bit(R10BIO_Uptodate, &r10_bio->state);
+ else {
+- atomic_add(r10_bio->sectors,
++ atomic_add_unchecked(r10_bio->sectors,
+ &conf->mirrors[d].rdev->corrected_errors);
+ if (!test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery))
+ md_error(r10_bio->mddev,
+@@ -1520,7 +1520,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
+ test_bit(In_sync, &rdev->flags)) {
+ atomic_inc(&rdev->nr_pending);
+ rcu_read_unlock();
+- atomic_add(s, &rdev->corrected_errors);
++ atomic_add_unchecked(s, &rdev->corrected_errors);
+ if (sync_page_io(rdev->bdev,
+ r10_bio->devs[sl].addr +
+ sect + rdev->data_offset,
+diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
+index 883215d..675bf47 100644
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -482,7 +482,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
bi->bi_next = NULL;
if ((rw & WRITE) &&
test_bit(R5_ReWrite, &sh->dev[i].flags))
@@ -34609,7 +36193,7 @@ diff -urNp linux-2.6.32.49/drivers/md/raid5.c linux-2.6.32.49/drivers/md/raid5.c
&rdev->corrected_errors);
generic_make_request(bi);
} else {
-@@ -1517,15 +1517,15 @@ static void raid5_end_read_request(struc
+@@ -1517,15 +1517,15 @@ static void raid5_end_read_request(struct bio * bi, int error)
clear_bit(R5_ReadError, &sh->dev[i].flags);
clear_bit(R5_ReWrite, &sh->dev[i].flags);
}
@@ -34628,7 +36212,7 @@ diff -urNp linux-2.6.32.49/drivers/md/raid5.c linux-2.6.32.49/drivers/md/raid5.c
if (conf->mddev->degraded >= conf->max_degraded)
printk_rl(KERN_WARNING
"raid5:%s: read error not correctable "
-@@ -1543,7 +1543,7 @@ static void raid5_end_read_request(struc
+@@ -1543,7 +1543,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
(unsigned long long)(sh->sector
+ rdev->data_offset),
bdn);
@@ -34637,7 +36221,7 @@ diff -urNp linux-2.6.32.49/drivers/md/raid5.c linux-2.6.32.49/drivers/md/raid5.c
> conf->max_nr_stripes)
printk(KERN_WARNING
"raid5:%s: Too many read errors, failing device %s.\n",
-@@ -1870,6 +1870,7 @@ static sector_t compute_blocknr(struct s
+@@ -1870,6 +1870,7 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
sector_t r_sector;
struct stripe_head sh2;
@@ -34645,10 +36229,11 @@ diff -urNp linux-2.6.32.49/drivers/md/raid5.c linux-2.6.32.49/drivers/md/raid5.c
chunk_offset = sector_div(new_sector, sectors_per_chunk);
stripe = new_sector;
-diff -urNp linux-2.6.32.49/drivers/media/common/saa7146_hlp.c linux-2.6.32.49/drivers/media/common/saa7146_hlp.c
---- linux-2.6.32.49/drivers/media/common/saa7146_hlp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/common/saa7146_hlp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -353,6 +353,8 @@ static void calculate_clipping_registers
+diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c
+index 05bde9c..2f31d40 100644
+--- a/drivers/media/common/saa7146_hlp.c
++++ b/drivers/media/common/saa7146_hlp.c
+@@ -353,6 +353,8 @@ static void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct sa
int x[32], y[32], w[32], h[32];
@@ -34657,10 +36242,11 @@ diff -urNp linux-2.6.32.49/drivers/media/common/saa7146_hlp.c linux-2.6.32.49/dr
/* clear out memory */
memset(&line_list[0], 0x00, sizeof(u32)*32);
memset(&pixel_list[0], 0x00, sizeof(u32)*32);
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
---- linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2011-11-15 19:59:43.000000000 -0500
-@@ -590,6 +590,8 @@ static int dvb_ca_en50221_read_data(stru
+diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+index cb22da5..82b686e 100644
+--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
++++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+@@ -590,6 +590,8 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * eb
u8 buf[HOST_LINK_BUF_SIZE];
int i;
@@ -34669,7 +36255,7 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-2.6
dprintk("%s\n", __func__);
/* check if we have space for a link buf in the rx_buffer */
-@@ -1285,6 +1287,8 @@ static ssize_t dvb_ca_en50221_io_write(s
+@@ -1285,6 +1287,8 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
unsigned long timeout;
int written;
@@ -34678,9 +36264,10 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-2.6
dprintk("%s\n", __func__);
/* Incoming packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_demux.h linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_demux.h
---- linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_demux.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_demux.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/dvb/dvb-core/dvb_demux.h b/drivers/media/dvb/dvb-core/dvb_demux.h
+index 2fe05d0..a3289c4 100644
+--- a/drivers/media/dvb/dvb-core/dvb_demux.h
++++ b/drivers/media/dvb/dvb-core/dvb_demux.h
@@ -71,7 +71,7 @@ struct dvb_demux_feed {
union {
dmx_ts_cb ts;
@@ -34690,10 +36277,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvb_demux.h linux-2.6.32.4
struct dvb_demux *demux;
void *priv;
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.32.49/drivers/media/dvb/dvb-core/dvbdev.c
---- linux-2.6.32.49/drivers/media/dvb/dvb-core/dvbdev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-core/dvbdev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -191,7 +191,7 @@ int dvb_register_device(struct dvb_adapt
+diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
+index 94159b9..376bd8e 100644
+--- a/drivers/media/dvb/dvb-core/dvbdev.c
++++ b/drivers/media/dvb/dvb-core/dvbdev.c
+@@ -191,7 +191,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
const struct dvb_device *template, void *priv, int type)
{
struct dvb_device *dvbdev;
@@ -34702,10 +36290,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.32.49/d
struct device *clsdev;
int minor;
int id;
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/cxusb.c linux-2.6.32.49/drivers/media/dvb/dvb-usb/cxusb.c
---- linux-2.6.32.49/drivers/media/dvb/dvb-usb/cxusb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-usb/cxusb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1040,7 +1040,7 @@ static struct dib0070_config dib7070p_di
+diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
+index 2a53dd0..db8c07a 100644
+--- a/drivers/media/dvb/dvb-usb/cxusb.c
++++ b/drivers/media/dvb/dvb-usb/cxusb.c
+@@ -1040,7 +1040,7 @@ static struct dib0070_config dib7070p_dib0070_config = {
struct dib0700_adapter_state {
int (*set_param_save) (struct dvb_frontend *,
struct dvb_frontend_parameters *);
@@ -34714,10 +36303,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/cxusb.c linux-2.6.32.49/dri
static int dib7070_set_param_override(struct dvb_frontend *fe,
struct dvb_frontend_parameters *fep)
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_core.c linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_core.c
---- linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -332,6 +332,8 @@ int dib0700_download_firmware(struct usb
+diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
+index db7f7f7..f55e96f 100644
+--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
++++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
+@@ -332,6 +332,8 @@ int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw
u8 buf[260];
@@ -34726,10 +36316,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_core.c linux-2.6.32
while ((ret = dvb_usb_get_hexline(fw, &hx, &pos)) > 0) {
deb_fwdata("writing to address 0x%08x (buffer: 0x%02x %02x)\n",hx.addr, hx.len, hx.chk);
-diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_devices.c linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_devices.c
---- linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_devices.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_devices.c 2011-11-15 19:59:43.000000000 -0500
-@@ -28,7 +28,7 @@ MODULE_PARM_DESC(force_lna_activation, "
+diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
+index 524acf5..5ffc403 100644
+--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
++++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
+@@ -28,7 +28,7 @@ MODULE_PARM_DESC(force_lna_activation, "force the activation of Low-Noise-Amplif
struct dib0700_adapter_state {
int (*set_param_save) (struct dvb_frontend *, struct dvb_frontend_parameters *);
@@ -34738,9 +36329,10 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/dvb-usb/dib0700_devices.c linux-2.6
/* Hauppauge Nova-T 500 (aka Bristol)
* has a LNA on GPIO0 which is enabled by setting 1 */
-diff -urNp linux-2.6.32.49/drivers/media/dvb/frontends/dib3000.h linux-2.6.32.49/drivers/media/dvb/frontends/dib3000.h
---- linux-2.6.32.49/drivers/media/dvb/frontends/dib3000.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/frontends/dib3000.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/dvb/frontends/dib3000.h b/drivers/media/dvb/frontends/dib3000.h
+index ba91735..4261d84 100644
+--- a/drivers/media/dvb/frontends/dib3000.h
++++ b/drivers/media/dvb/frontends/dib3000.h
@@ -39,7 +39,7 @@ struct dib_fe_xfer_ops
int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
@@ -34750,10 +36342,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/frontends/dib3000.h linux-2.6.32.49
#if defined(CONFIG_DVB_DIB3000MB) || (defined(CONFIG_DVB_DIB3000MB_MODULE) && defined(MODULE))
extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
-diff -urNp linux-2.6.32.49/drivers/media/dvb/frontends/or51211.c linux-2.6.32.49/drivers/media/dvb/frontends/or51211.c
---- linux-2.6.32.49/drivers/media/dvb/frontends/or51211.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/dvb/frontends/or51211.c 2011-11-15 19:59:43.000000000 -0500
-@@ -113,6 +113,8 @@ static int or51211_load_firmware (struct
+diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c
+index c709ce6..b3fe620 100644
+--- a/drivers/media/dvb/frontends/or51211.c
++++ b/drivers/media/dvb/frontends/or51211.c
+@@ -113,6 +113,8 @@ static int or51211_load_firmware (struct dvb_frontend* fe,
u8 tudata[585];
int i;
@@ -34762,10 +36355,11 @@ diff -urNp linux-2.6.32.49/drivers/media/dvb/frontends/or51211.c linux-2.6.32.49
dprintk("Firmware is %zd bytes\n",fw->size);
/* Get eprom data */
-diff -urNp linux-2.6.32.49/drivers/media/radio/radio-cadet.c linux-2.6.32.49/drivers/media/radio/radio-cadet.c
---- linux-2.6.32.49/drivers/media/radio/radio-cadet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/radio/radio-cadet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -347,7 +347,7 @@ static ssize_t cadet_read(struct file *f
+diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
+index 482d0f3..ee1e202 100644
+--- a/drivers/media/radio/radio-cadet.c
++++ b/drivers/media/radio/radio-cadet.c
+@@ -347,7 +347,7 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
while (i < count && dev->rdsin != dev->rdsout)
readbuf[i++] = dev->rdsbuf[dev->rdsout++];
@@ -34774,10 +36368,11 @@ diff -urNp linux-2.6.32.49/drivers/media/radio/radio-cadet.c linux-2.6.32.49/dri
return -EFAULT;
return i;
}
-diff -urNp linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c
---- linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c 2011-11-15 19:59:43.000000000 -0500
-@@ -56,7 +56,7 @@ static struct pci_device_id cx18_pci_tbl
+diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
+index 6dd51e2..0359b92 100644
+--- a/drivers/media/video/cx18/cx18-driver.c
++++ b/drivers/media/video/cx18/cx18-driver.c
+@@ -56,7 +56,7 @@ static struct pci_device_id cx18_pci_tbl[] __devinitdata = {
MODULE_DEVICE_TABLE(pci, cx18_pci_tbl);
@@ -34786,7 +36381,7 @@ diff -urNp linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c linux-2.6.32.4
/* Parameter declarations */
static int cardtype[CX18_MAX_CARDS];
-@@ -288,6 +288,8 @@ void cx18_read_eeprom(struct cx18 *cx, s
+@@ -288,6 +288,8 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
struct i2c_client c;
u8 eedata[256];
@@ -34795,7 +36390,7 @@ diff -urNp linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c linux-2.6.32.4
memset(&c, 0, sizeof(c));
strlcpy(c.name, "cx18 tveeprom tmp", sizeof(c.name));
c.adapter = &cx->i2c_adap[0];
-@@ -800,7 +802,7 @@ static int __devinit cx18_probe(struct p
+@@ -800,7 +802,7 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev,
struct cx18 *cx;
/* FIXME - module parameter arrays constrain max instances */
@@ -34804,10 +36399,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/cx18/cx18-driver.c linux-2.6.32.4
if (i >= CX18_MAX_CARDS) {
printk(KERN_ERR "cx18: cannot manage card %d, driver has a "
"limit of 0 - %d\n", i, CX18_MAX_CARDS - 1);
-diff -urNp linux-2.6.32.49/drivers/media/video/ivtv/ivtv-driver.c linux-2.6.32.49/drivers/media/video/ivtv/ivtv-driver.c
---- linux-2.6.32.49/drivers/media/video/ivtv/ivtv-driver.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/ivtv/ivtv-driver.c 2011-11-15 19:59:43.000000000 -0500
-@@ -79,7 +79,7 @@ static struct pci_device_id ivtv_pci_tbl
+diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
+index 463ec34..2f4625a 100644
+--- a/drivers/media/video/ivtv/ivtv-driver.c
++++ b/drivers/media/video/ivtv/ivtv-driver.c
+@@ -79,7 +79,7 @@ static struct pci_device_id ivtv_pci_tbl[] __devinitdata = {
MODULE_DEVICE_TABLE(pci,ivtv_pci_tbl);
/* ivtv instance counter */
@@ -34816,10 +36412,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/ivtv/ivtv-driver.c linux-2.6.32.4
/* Parameter declarations */
static int cardtype[IVTV_MAX_CARDS];
-diff -urNp linux-2.6.32.49/drivers/media/video/omap24xxcam.c linux-2.6.32.49/drivers/media/video/omap24xxcam.c
---- linux-2.6.32.49/drivers/media/video/omap24xxcam.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/omap24xxcam.c 2011-11-15 19:59:43.000000000 -0500
-@@ -401,7 +401,7 @@ static void omap24xxcam_vbq_complete(str
+diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
+index 5fc4ac0..652a54a 100644
+--- a/drivers/media/video/omap24xxcam.c
++++ b/drivers/media/video/omap24xxcam.c
+@@ -401,7 +401,7 @@ static void omap24xxcam_vbq_complete(struct omap24xxcam_sgdma *sgdma,
spin_unlock_irqrestore(&cam->core_enable_disable_lock, flags);
do_gettimeofday(&vb->ts);
@@ -34828,9 +36425,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/omap24xxcam.c linux-2.6.32.49/dri
if (csr & csr_error) {
vb->state = VIDEOBUF_ERROR;
if (!atomic_read(&fh->cam->in_reset)) {
-diff -urNp linux-2.6.32.49/drivers/media/video/omap24xxcam.h linux-2.6.32.49/drivers/media/video/omap24xxcam.h
---- linux-2.6.32.49/drivers/media/video/omap24xxcam.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/omap24xxcam.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/omap24xxcam.h b/drivers/media/video/omap24xxcam.h
+index 2ce67f5..cf26a5b 100644
+--- a/drivers/media/video/omap24xxcam.h
++++ b/drivers/media/video/omap24xxcam.h
@@ -533,7 +533,7 @@ struct omap24xxcam_fh {
spinlock_t vbq_lock; /* spinlock for the videobuf queue */
struct videobuf_queue vbq;
@@ -34840,10 +36438,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/omap24xxcam.h linux-2.6.32.49/dri
/* accessing cam here doesn't need serialisation: it's constant */
struct omap24xxcam_device *cam;
};
-diff -urNp linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-eeprom.c linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
---- linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-eeprom.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-eeprom.c 2011-11-15 19:59:43.000000000 -0500
-@@ -119,6 +119,8 @@ int pvr2_eeprom_analyze(struct pvr2_hdw
+diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+index 299afa4..eb47459 100644
+--- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+@@ -119,6 +119,8 @@ int pvr2_eeprom_analyze(struct pvr2_hdw *hdw)
u8 *eeprom;
struct tveeprom tvdata;
@@ -34852,9 +36451,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-eeprom.c linux-2.
memset(&tvdata,0,sizeof(tvdata));
eeprom = pvr2_eeprom_fetch(hdw);
-diff -urNp linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
---- linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+index 5b152ff..3320638 100644
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -195,7 +195,7 @@ struct pvr2_hdw {
/* I2C stuff */
@@ -34864,10 +36464,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h li
pvr2_i2c_func i2c_func[PVR2_I2C_FUNC_CNT];
int i2c_cx25840_hack_state;
int i2c_linked;
-diff -urNp linux-2.6.32.49/drivers/media/video/saa7134/saa6752hs.c linux-2.6.32.49/drivers/media/video/saa7134/saa6752hs.c
---- linux-2.6.32.49/drivers/media/video/saa7134/saa6752hs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/saa7134/saa6752hs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -683,6 +683,8 @@ static int saa6752hs_init(struct v4l2_su
+diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c
+index 1eabff6..8e2313a 100644
+--- a/drivers/media/video/saa7134/saa6752hs.c
++++ b/drivers/media/video/saa7134/saa6752hs.c
+@@ -683,6 +683,8 @@ static int saa6752hs_init(struct v4l2_subdev *sd, u32 leading_null_bytes)
unsigned char localPAT[256];
unsigned char localPMT[256];
@@ -34876,10 +36477,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/saa7134/saa6752hs.c linux-2.6.32.
/* Set video format - must be done first as it resets other settings */
set_reg8(client, 0x41, h->video_format);
-diff -urNp linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c
---- linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -87,6 +87,8 @@ int saa7164_irq_dequeue(struct saa7164_d
+diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c
+index 9c1d3ac..b1b49e9 100644
+--- a/drivers/media/video/saa7164/saa7164-cmd.c
++++ b/drivers/media/video/saa7164/saa7164-cmd.c
+@@ -87,6 +87,8 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev)
wait_queue_head_t *q = 0;
dprintk(DBGLVL_CMD, "%s()\n", __func__);
@@ -34888,7 +36490,7 @@ diff -urNp linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c linux-2.6.3
/* While any outstand message on the bus exists... */
do {
-@@ -126,6 +128,8 @@ int saa7164_cmd_dequeue(struct saa7164_d
+@@ -126,6 +128,8 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev)
u8 tmp[512];
dprintk(DBGLVL_CMD, "%s()\n", __func__);
@@ -34897,10 +36499,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/saa7164/saa7164-cmd.c linux-2.6.3
while (loop) {
tmComResInfo_t tRsp = { 0, 0, 0, 0, 0, 0 };
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/ibmcam.c linux-2.6.32.49/drivers/media/video/usbvideo/ibmcam.c
---- linux-2.6.32.49/drivers/media/video/usbvideo/ibmcam.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/ibmcam.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3947,15 +3947,15 @@ static struct usb_device_id id_table[] =
+diff --git a/drivers/media/video/usbvideo/ibmcam.c b/drivers/media/video/usbvideo/ibmcam.c
+index b085496..cde0270 100644
+--- a/drivers/media/video/usbvideo/ibmcam.c
++++ b/drivers/media/video/usbvideo/ibmcam.c
+@@ -3947,15 +3947,15 @@ static struct usb_device_id id_table[] = {
static int __init ibmcam_init(void)
{
struct usbvideo_cb cbTbl;
@@ -34925,10 +36528,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/ibmcam.c linux-2.6.32.49
return usbvideo_register(
&cams,
MAX_IBMCAM,
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/konicawc.c linux-2.6.32.49/drivers/media/video/usbvideo/konicawc.c
---- linux-2.6.32.49/drivers/media/video/usbvideo/konicawc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/konicawc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -225,7 +225,7 @@ static void konicawc_register_input(stru
+diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c
+index 31d57f2..600b735 100644
+--- a/drivers/media/video/usbvideo/konicawc.c
++++ b/drivers/media/video/usbvideo/konicawc.c
+@@ -225,7 +225,7 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
int error;
usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
@@ -34964,10 +36568,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/konicawc.c linux-2.6.32.
return usbvideo_register(
&cams,
MAX_CAMERAS,
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/quickcam_messenger.c linux-2.6.32.49/drivers/media/video/usbvideo/quickcam_messenger.c
---- linux-2.6.32.49/drivers/media/video/usbvideo/quickcam_messenger.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/quickcam_messenger.c 2011-11-15 19:59:43.000000000 -0500
-@@ -89,7 +89,7 @@ static void qcm_register_input(struct qc
+diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c
+index 803d3e4..c4d1b96 100644
+--- a/drivers/media/video/usbvideo/quickcam_messenger.c
++++ b/drivers/media/video/usbvideo/quickcam_messenger.c
+@@ -89,7 +89,7 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
int error;
usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
@@ -34976,9 +36581,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/quickcam_messenger.c lin
cam->input = input_dev = input_allocate_device();
if (!input_dev) {
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/ultracam.c linux-2.6.32.49/drivers/media/video/usbvideo/ultracam.c
---- linux-2.6.32.49/drivers/media/video/usbvideo/ultracam.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/ultracam.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/usbvideo/ultracam.c b/drivers/media/video/usbvideo/ultracam.c
+index fbd1b63..292f9f0 100644
+--- a/drivers/media/video/usbvideo/ultracam.c
++++ b/drivers/media/video/usbvideo/ultracam.c
@@ -655,14 +655,14 @@ static int __init ultracam_init(void)
{
struct usbvideo_cb cbTbl;
@@ -35002,9 +36608,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/ultracam.c linux-2.6.32.
return usbvideo_register(
&cams,
MAX_CAMERAS,
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.c linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.c
---- linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
+index dea8b32..34f6878 100644
+--- a/drivers/media/video/usbvideo/usbvideo.c
++++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -697,15 +697,15 @@ int usbvideo_register(
__func__, cams, base_size, num_cams);
@@ -35026,9 +36633,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.c linux-2.6.32.
cams->num_cameras = num_cams;
cams->cam = (struct uvd *) &cams[1];
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.h linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.h
---- linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h
+index c66985b..7fa143a 100644
+--- a/drivers/media/video/usbvideo/usbvideo.h
++++ b/drivers/media/video/usbvideo/usbvideo.h
@@ -268,7 +268,7 @@ struct usbvideo_cb {
int (*startDataPump)(struct uvd *uvd);
void (*stopDataPump)(struct uvd *uvd);
@@ -35038,10 +36646,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvideo/usbvideo.h linux-2.6.32.
struct usbvideo {
int num_cameras; /* As allocated */
-diff -urNp linux-2.6.32.49/drivers/media/video/usbvision/usbvision-core.c linux-2.6.32.49/drivers/media/video/usbvision/usbvision-core.c
---- linux-2.6.32.49/drivers/media/video/usbvision/usbvision-core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/usbvision/usbvision-core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -820,6 +820,8 @@ static enum ParseState usbvision_parse_c
+diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
+index e0f91e4..37554ea 100644
+--- a/drivers/media/video/usbvision/usbvision-core.c
++++ b/drivers/media/video/usbvision/usbvision-core.c
+@@ -820,6 +820,8 @@ static enum ParseState usbvision_parse_compress(struct usb_usbvision *usbvision,
unsigned char rv, gv, bv;
static unsigned char *Y, *U, *V;
@@ -35050,10 +36659,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/usbvision/usbvision-core.c linux-
frame = usbvision->curFrame;
imageSize = frame->frmwidth * frame->frmheight;
if ( (frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) ||
-diff -urNp linux-2.6.32.49/drivers/media/video/v4l2-device.c linux-2.6.32.49/drivers/media/video/v4l2-device.c
---- linux-2.6.32.49/drivers/media/video/v4l2-device.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/v4l2-device.c 2011-11-15 19:59:43.000000000 -0500
-@@ -50,9 +50,9 @@ int v4l2_device_register(struct device *
+diff --git a/drivers/media/video/v4l2-device.c b/drivers/media/video/v4l2-device.c
+index 0d06e7c..3d17d24 100644
+--- a/drivers/media/video/v4l2-device.c
++++ b/drivers/media/video/v4l2-device.c
+@@ -50,9 +50,9 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
EXPORT_SYMBOL_GPL(v4l2_device_register);
int v4l2_device_set_name(struct v4l2_device *v4l2_dev, const char *basename,
@@ -35065,9 +36675,10 @@ diff -urNp linux-2.6.32.49/drivers/media/video/v4l2-device.c linux-2.6.32.49/dri
int len = strlen(basename);
if (basename[len - 1] >= '0' && basename[len - 1] <= '9')
-diff -urNp linux-2.6.32.49/drivers/media/video/videobuf-dma-sg.c linux-2.6.32.49/drivers/media/video/videobuf-dma-sg.c
---- linux-2.6.32.49/drivers/media/video/videobuf-dma-sg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/media/video/videobuf-dma-sg.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
+index 032ebae..6a3532c 100644
+--- a/drivers/media/video/videobuf-dma-sg.c
++++ b/drivers/media/video/videobuf-dma-sg.c
@@ -693,6 +693,8 @@ void *videobuf_sg_alloc(size_t size)
{
struct videobuf_queue q;
@@ -35077,10 +36688,11 @@ diff -urNp linux-2.6.32.49/drivers/media/video/videobuf-dma-sg.c linux-2.6.32.49
/* Required to make generic handler to call __videobuf_alloc */
q.int_ops = &sg_ops;
-diff -urNp linux-2.6.32.49/drivers/message/fusion/mptbase.c linux-2.6.32.49/drivers/message/fusion/mptbase.c
---- linux-2.6.32.49/drivers/message/fusion/mptbase.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/fusion/mptbase.c 2011-11-15 19:59:43.000000000 -0500
-@@ -6709,8 +6709,14 @@ procmpt_iocinfo_read(char *buf, char **s
+diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
+index b6992b7..9fa7547 100644
+--- a/drivers/message/fusion/mptbase.c
++++ b/drivers/message/fusion/mptbase.c
+@@ -6709,8 +6709,14 @@ procmpt_iocinfo_read(char *buf, char **start, off_t offset, int request, int *eo
len += sprintf(buf+len, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
len += sprintf(buf+len, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
@@ -35095,10 +36707,11 @@ diff -urNp linux-2.6.32.49/drivers/message/fusion/mptbase.c linux-2.6.32.49/driv
/*
* Rounding UP to nearest 4-kB boundary here...
*/
-diff -urNp linux-2.6.32.49/drivers/message/fusion/mptsas.c linux-2.6.32.49/drivers/message/fusion/mptsas.c
---- linux-2.6.32.49/drivers/message/fusion/mptsas.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/fusion/mptsas.c 2011-11-15 19:59:43.000000000 -0500
-@@ -436,6 +436,23 @@ mptsas_is_end_device(struct mptsas_devin
+diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
+index 83873e3..e360e9a 100644
+--- a/drivers/message/fusion/mptsas.c
++++ b/drivers/message/fusion/mptsas.c
+@@ -436,6 +436,23 @@ mptsas_is_end_device(struct mptsas_devinfo * attached)
return 0;
}
@@ -35122,7 +36735,7 @@ diff -urNp linux-2.6.32.49/drivers/message/fusion/mptsas.c linux-2.6.32.49/drive
/* no mutex */
static void
mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details)
-@@ -474,23 +491,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *p
+@@ -474,23 +491,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *phy_info)
return NULL;
}
@@ -35146,9 +36759,10 @@ diff -urNp linux-2.6.32.49/drivers/message/fusion/mptsas.c linux-2.6.32.49/drive
static inline struct sas_port *
mptsas_get_port(struct mptsas_phyinfo *phy_info)
{
-diff -urNp linux-2.6.32.49/drivers/message/fusion/mptscsih.c linux-2.6.32.49/drivers/message/fusion/mptscsih.c
---- linux-2.6.32.49/drivers/message/fusion/mptscsih.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/fusion/mptscsih.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
+index bd096ca..332cf76 100644
+--- a/drivers/message/fusion/mptscsih.c
++++ b/drivers/message/fusion/mptscsih.c
@@ -1248,15 +1248,16 @@ mptscsih_info(struct Scsi_Host *SChost)
h = shost_priv(SChost);
@@ -35174,10 +36788,11 @@ diff -urNp linux-2.6.32.49/drivers/message/fusion/mptscsih.c linux-2.6.32.49/dri
return h->info_kbuf;
}
-diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_config.c linux-2.6.32.49/drivers/message/i2o/i2o_config.c
---- linux-2.6.32.49/drivers/message/i2o/i2o_config.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/i2o/i2o_config.c 2011-11-15 19:59:43.000000000 -0500
-@@ -787,6 +787,8 @@ static int i2o_cfg_passthru(unsigned lon
+diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
+index efba702..59b2c0f 100644
+--- a/drivers/message/i2o/i2o_config.c
++++ b/drivers/message/i2o/i2o_config.c
+@@ -787,6 +787,8 @@ static int i2o_cfg_passthru(unsigned long arg)
struct i2o_message *msg;
unsigned int iop;
@@ -35186,9 +36801,10 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_config.c linux-2.6.32.49/driv
if (get_user(iop, &cmd->iop) || get_user(user_msg, &cmd->msg))
return -EFAULT;
-diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/drivers/message/i2o/i2o_proc.c
---- linux-2.6.32.49/drivers/message/i2o/i2o_proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/i2o/i2o_proc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
+index 7045c45..c07b170 100644
+--- a/drivers/message/i2o/i2o_proc.c
++++ b/drivers/message/i2o/i2o_proc.c
@@ -259,13 +259,6 @@ static char *scsi_devices[] = {
"Array Controller Device"
};
@@ -35203,7 +36819,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
static int i2o_report_query_status(struct seq_file *seq, int block_status,
char *group)
{
-@@ -842,8 +835,7 @@ static int i2o_seq_show_ddm_table(struct
+@@ -842,8 +835,7 @@ static int i2o_seq_show_ddm_table(struct seq_file *seq, void *v)
seq_printf(seq, "%-#7x", ddm_table.i2o_vendor_id);
seq_printf(seq, "%-#8x", ddm_table.module_id);
@@ -35213,7 +36829,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
seq_printf(seq, "%9d ", ddm_table.data_size);
seq_printf(seq, "%8d", ddm_table.code_size);
-@@ -944,8 +936,8 @@ static int i2o_seq_show_drivers_stored(s
+@@ -944,8 +936,8 @@ static int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v)
seq_printf(seq, "%-#7x", dst->i2o_vendor_id);
seq_printf(seq, "%-#8x", dst->module_id);
@@ -35224,7 +36840,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
seq_printf(seq, "%8d ", dst->module_size);
seq_printf(seq, "%8d ", dst->mpb_size);
seq_printf(seq, "0x%04x", dst->module_flags);
-@@ -1276,14 +1268,10 @@ static int i2o_seq_show_dev_identity(str
+@@ -1276,14 +1268,10 @@ static int i2o_seq_show_dev_identity(struct seq_file *seq, void *v)
seq_printf(seq, "Device Class : %s\n", i2o_get_class_name(work16[0]));
seq_printf(seq, "Owner TID : %0#5x\n", work16[2]);
seq_printf(seq, "Parent TID : %0#5x\n", work16[3]);
@@ -35243,7 +36859,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
seq_printf(seq, "Serial number : ");
print_serial_number(seq, (u8 *) (work32 + 16),
-@@ -1328,10 +1316,8 @@ static int i2o_seq_show_ddm_identity(str
+@@ -1328,10 +1316,8 @@ static int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v)
}
seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid);
@@ -35256,7 +36872,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
seq_printf(seq, "Serial number : ");
print_serial_number(seq, result.serial_number, sizeof(result) - 36);
-@@ -1362,14 +1348,10 @@ static int i2o_seq_show_uinfo(struct seq
+@@ -1362,14 +1348,10 @@ static int i2o_seq_show_uinfo(struct seq_file *seq, void *v)
return 0;
}
@@ -35275,10 +36891,11 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/i2o_proc.c linux-2.6.32.49/driver
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/message/i2o/iop.c linux-2.6.32.49/drivers/message/i2o/iop.c
---- linux-2.6.32.49/drivers/message/i2o/iop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/message/i2o/iop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -110,10 +110,10 @@ u32 i2o_cntxt_list_add(struct i2o_contro
+diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
+index 27cf4af..b1205b8 100644
+--- a/drivers/message/i2o/iop.c
++++ b/drivers/message/i2o/iop.c
+@@ -110,10 +110,10 @@ u32 i2o_cntxt_list_add(struct i2o_controller * c, void *ptr)
spin_lock_irqsave(&c->context_list_lock, flags);
@@ -35292,7 +36909,7 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/iop.c linux-2.6.32.49/drivers/mes
list_add(&entry->list, &c->context_list);
-@@ -1076,7 +1076,7 @@ struct i2o_controller *i2o_iop_alloc(voi
+@@ -1076,7 +1076,7 @@ struct i2o_controller *i2o_iop_alloc(void)
#if BITS_PER_LONG == 64
spin_lock_init(&c->context_list_lock);
@@ -35301,9 +36918,10 @@ diff -urNp linux-2.6.32.49/drivers/message/i2o/iop.c linux-2.6.32.49/drivers/mes
INIT_LIST_HEAD(&c->context_list);
#endif
-diff -urNp linux-2.6.32.49/drivers/mfd/ab3100-core.c linux-2.6.32.49/drivers/mfd/ab3100-core.c
---- linux-2.6.32.49/drivers/mfd/ab3100-core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mfd/ab3100-core.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
+index 78e3e85..66c9a0d 100644
+--- a/drivers/mfd/ab3100-core.c
++++ b/drivers/mfd/ab3100-core.c
@@ -777,7 +777,7 @@ struct ab_family_id {
char *name;
};
@@ -35313,10 +36931,11 @@ diff -urNp linux-2.6.32.49/drivers/mfd/ab3100-core.c linux-2.6.32.49/drivers/mfd
/* AB3100 */
{
.id = 0xc0,
-diff -urNp linux-2.6.32.49/drivers/mfd/wm8350-i2c.c linux-2.6.32.49/drivers/mfd/wm8350-i2c.c
---- linux-2.6.32.49/drivers/mfd/wm8350-i2c.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mfd/wm8350-i2c.c 2011-11-15 19:59:43.000000000 -0500
-@@ -43,6 +43,8 @@ static int wm8350_i2c_write_device(struc
+diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c
+index 8d8c932..8104515 100644
+--- a/drivers/mfd/wm8350-i2c.c
++++ b/drivers/mfd/wm8350-i2c.c
+@@ -43,6 +43,8 @@ static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg,
u8 msg[(WM8350_MAX_REGISTER << 1) + 1];
int ret;
@@ -35325,9 +36944,10 @@ diff -urNp linux-2.6.32.49/drivers/mfd/wm8350-i2c.c linux-2.6.32.49/drivers/mfd/
if (bytes > ((WM8350_MAX_REGISTER << 1) + 1))
return -EINVAL;
-diff -urNp linux-2.6.32.49/drivers/misc/kgdbts.c linux-2.6.32.49/drivers/misc/kgdbts.c
---- linux-2.6.32.49/drivers/misc/kgdbts.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/kgdbts.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
+index e4ff50b..4cc3f04 100644
+--- a/drivers/misc/kgdbts.c
++++ b/drivers/misc/kgdbts.c
@@ -118,7 +118,7 @@
} while (0)
#define MAX_CONFIG_LEN 40
@@ -35337,7 +36957,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/kgdbts.c linux-2.6.32.49/drivers/misc/kg
static char get_buf[BUFMAX];
static int get_buf_cnt;
static char put_buf[BUFMAX];
-@@ -1102,7 +1102,7 @@ static void kgdbts_post_exp_handler(void
+@@ -1102,7 +1102,7 @@ static void kgdbts_post_exp_handler(void)
module_put(THIS_MODULE);
}
@@ -35346,10 +36966,11 @@ diff -urNp linux-2.6.32.49/drivers/misc/kgdbts.c linux-2.6.32.49/drivers/misc/kg
.name = "kgdbts",
.read_char = kgdbts_get_char,
.write_char = kgdbts_put_char,
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/gruhandles.c linux-2.6.32.49/drivers/misc/sgi-gru/gruhandles.c
---- linux-2.6.32.49/drivers/misc/sgi-gru/gruhandles.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-gru/gruhandles.c 2011-11-15 19:59:43.000000000 -0500
-@@ -39,8 +39,8 @@ struct mcs_op_statistic mcs_op_statistic
+diff --git a/drivers/misc/sgi-gru/gruhandles.c b/drivers/misc/sgi-gru/gruhandles.c
+index 37e7cfc..67cfb76 100644
+--- a/drivers/misc/sgi-gru/gruhandles.c
++++ b/drivers/misc/sgi-gru/gruhandles.c
+@@ -39,8 +39,8 @@ struct mcs_op_statistic mcs_op_statistics[mcsop_last];
static void update_mcs_stats(enum mcs_op op, unsigned long clks)
{
@@ -35360,9 +36981,10 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/gruhandles.c linux-2.6.32.49/dri
if (mcs_op_statistics[op].max < clks)
mcs_op_statistics[op].max = clks;
}
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c
---- linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/misc/sgi-gru/gruprocfs.c b/drivers/misc/sgi-gru/gruprocfs.c
+index 3f2375c..467c6e6 100644
+--- a/drivers/misc/sgi-gru/gruprocfs.c
++++ b/drivers/misc/sgi-gru/gruprocfs.c
@@ -32,9 +32,9 @@
#define printstat(s, f) printstat_val(s, &gru_stats.f, #f)
@@ -35375,7 +36997,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.49/driv
if (val)
seq_printf(s, "%16lu %s\n", val, id);
-@@ -136,8 +136,8 @@ static int mcs_statistics_show(struct se
+@@ -136,8 +136,8 @@ static int mcs_statistics_show(struct seq_file *s, void *p)
"cch_interrupt_sync", "cch_deallocate", "tgh_invalidate"};
for (op = 0; op < mcsop_last; op++) {
@@ -35386,9 +37008,10 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.49/driv
max = mcs_op_statistics[op].max;
seq_printf(s, "%-20s%12ld%12ld%12ld\n", id[op], count,
count ? total / count : 0, max);
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h
---- linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h
+index 46990bc..4a251b5 100644
+--- a/drivers/misc/sgi-gru/grutables.h
++++ b/drivers/misc/sgi-gru/grutables.h
@@ -167,84 +167,84 @@ extern unsigned int gru_max_gids;
* GRU statistics.
*/
@@ -35552,7 +37175,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h linux-2.6.32.49/driv
};
-@@ -252,8 +252,8 @@ enum mcs_op {cchop_allocate, cchop_start
+@@ -252,8 +252,8 @@ enum mcs_op {cchop_allocate, cchop_start, cchop_interrupt, cchop_interrupt_sync,
cchop_deallocate, tghop_invalidate, mcsop_last};
struct mcs_op_statistic {
@@ -35563,7 +37186,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h linux-2.6.32.49/driv
unsigned long max;
};
-@@ -276,7 +276,7 @@ extern struct mcs_op_statistic mcs_op_st
+@@ -276,7 +276,7 @@ extern struct mcs_op_statistic mcs_op_statistics[mcsop_last];
#define STAT(id) do { \
if (gru_options & OPT_STATS) \
@@ -35572,9 +37195,23 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-gru/grutables.h linux-2.6.32.49/driv
} while (0)
#ifdef CONFIG_SGI_GRU_DEBUG
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h
---- linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h 2011-11-18 18:05:51.000000000 -0500
+diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h
+index 2275126..12a9dbfb 100644
+--- a/drivers/misc/sgi-xp/xp.h
++++ b/drivers/misc/sgi-xp/xp.h
+@@ -289,7 +289,7 @@ struct xpc_interface {
+ xpc_notify_func, void *);
+ void (*received) (short, int, void *);
+ enum xp_retval (*partid_to_nasids) (short, void *);
+-};
++} __no_const;
+
+ extern struct xpc_interface xpc_interface;
+
+diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
+index b94d5f7..7f494c5 100644
+--- a/drivers/misc/sgi-xp/xpc.h
++++ b/drivers/misc/sgi-xp/xpc.h
@@ -835,6 +835,7 @@ struct xpc_arch_operations {
void (*received_payload) (struct xpc_channel *, void *);
void (*notify_senders_of_disconnect) (struct xpc_channel *);
@@ -35583,7 +37220,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h linux-2.6.32.49/drivers/mis
/* struct xpc_partition act_state values (for XPC HB) */
-@@ -876,7 +877,7 @@ extern struct xpc_registration xpc_regis
+@@ -876,7 +877,7 @@ extern struct xpc_registration xpc_registrations[];
/* found in xpc_main.c */
extern struct device *xpc_part;
extern struct device *xpc_chan;
@@ -35592,10 +37229,11 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc.h linux-2.6.32.49/drivers/mis
extern int xpc_disengage_timelimit;
extern int xpc_disengage_timedout;
extern int xpc_activate_IRQ_rcvd;
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_main.c linux-2.6.32.49/drivers/misc/sgi-xp/xpc_main.c
---- linux-2.6.32.49/drivers/misc/sgi-xp/xpc_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-xp/xpc_main.c 2011-11-18 18:05:28.000000000 -0500
-@@ -169,7 +169,7 @@ static struct notifier_block xpc_die_not
+diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
+index fd3688a..7e211a4 100644
+--- a/drivers/misc/sgi-xp/xpc_main.c
++++ b/drivers/misc/sgi-xp/xpc_main.c
+@@ -169,7 +169,7 @@ static struct notifier_block xpc_die_notifier = {
.notifier_call = xpc_system_die,
};
@@ -35604,10 +37242,11 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_main.c linux-2.6.32.49/driver
/*
* Timer function to enforce the timelimit on the partition disengage.
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.32.49/drivers/misc/sgi-xp/xpc_sn2.c
---- linux-2.6.32.49/drivers/misc/sgi-xp/xpc_sn2.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-xp/xpc_sn2.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2350,7 +2350,7 @@ xpc_received_payload_sn2(struct xpc_chan
+diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c
+index 8b70e03..700bda6 100644
+--- a/drivers/misc/sgi-xp/xpc_sn2.c
++++ b/drivers/misc/sgi-xp/xpc_sn2.c
+@@ -2350,7 +2350,7 @@ xpc_received_payload_sn2(struct xpc_channel *ch, void *payload)
xpc_acknowledge_msgs_sn2(ch, get, msg->flags);
}
@@ -35627,10 +37266,11 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.32.49/drivers
if (offsetof(struct xpc_msg_sn2, payload) > XPC_MSG_HDR_MAX_SIZE) {
dev_err(xpc_part, "header portion of struct xpc_msg_sn2 is "
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c
---- linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1669,7 +1669,7 @@ xpc_received_payload_uv(struct xpc_chann
+diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
+index 8e08d71..7cb8c9b 100644
+--- a/drivers/misc/sgi-xp/xpc_uv.c
++++ b/drivers/misc/sgi-xp/xpc_uv.c
+@@ -1669,7 +1669,7 @@ xpc_received_payload_uv(struct xpc_channel *ch, void *payload)
XPC_DEACTIVATE_PARTITION(&xpc_partitions[ch->partid], ret);
}
@@ -35639,7 +37279,7 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.32.49/drivers/
.setup_partitions = xpc_setup_partitions_uv,
.teardown_partitions = xpc_teardown_partitions_uv,
.process_activate_IRQ_rcvd = xpc_process_activate_IRQ_rcvd_uv,
-@@ -1729,7 +1729,9 @@ static struct xpc_arch_operations xpc_ar
+@@ -1729,7 +1729,9 @@ static struct xpc_arch_operations xpc_arch_ops_uv = {
int
xpc_init_uv(void)
{
@@ -35650,22 +37290,11 @@ diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.32.49/drivers/
if (sizeof(struct xpc_notify_mq_msghdr_uv) > XPC_MSG_HDR_MAX_SIZE) {
dev_err(xpc_part, "xpc_notify_mq_msghdr_uv is larger than %d\n",
-diff -urNp linux-2.6.32.49/drivers/misc/sgi-xp/xp.h linux-2.6.32.49/drivers/misc/sgi-xp/xp.h
---- linux-2.6.32.49/drivers/misc/sgi-xp/xp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/misc/sgi-xp/xp.h 2011-11-15 19:59:43.000000000 -0500
-@@ -289,7 +289,7 @@ struct xpc_interface {
- xpc_notify_func, void *);
- void (*received) (short, int, void *);
- enum xp_retval (*partid_to_nasids) (short, void *);
--};
-+} __no_const;
-
- extern struct xpc_interface xpc_interface;
-
-diff -urNp linux-2.6.32.49/drivers/mmc/host/sdhci-pci.c linux-2.6.32.49/drivers/mmc/host/sdhci-pci.c
---- linux-2.6.32.49/drivers/mmc/host/sdhci-pci.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mmc/host/sdhci-pci.c 2011-11-18 18:01:55.000000000 -0500
-@@ -297,7 +297,7 @@ static const struct sdhci_pci_fixes sdhc
+diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
+index 6fd20b42..650efe3 100644
+--- a/drivers/mmc/host/sdhci-pci.c
++++ b/drivers/mmc/host/sdhci-pci.c
+@@ -297,7 +297,7 @@ static const struct sdhci_pci_fixes sdhci_via = {
.probe = via_probe,
};
@@ -35674,10 +37303,11 @@ diff -urNp linux-2.6.32.49/drivers/mmc/host/sdhci-pci.c linux-2.6.32.49/drivers/
{
.vendor = PCI_VENDOR_ID_RICOH,
.device = PCI_DEVICE_ID_RICOH_R5C822,
-diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c
---- linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-15 19:59:43.000000000 -0500
-@@ -743,6 +743,8 @@ static int chip_ready (struct map_info *
+diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
+index e7563a9..5f90ce5 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0001.c
++++ b/drivers/mtd/chips/cfi_cmdset_0001.c
+@@ -743,6 +743,8 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long
struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
unsigned long timeo = jiffies + HZ;
@@ -35686,7 +37316,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.32.49/d
/* Prevent setting state FL_SYNCING for chip in suspended state. */
if (mode == FL_SYNCING && chip->oldstate != FL_READY)
goto sleep;
-@@ -1642,6 +1644,8 @@ static int __xipram do_write_buffer(stru
+@@ -1642,6 +1644,8 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long initial_adr;
int initial_len = len;
@@ -35695,7 +37325,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.32.49/d
wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
adr += chip->start;
initial_adr = adr;
-@@ -1860,6 +1864,8 @@ static int __xipram do_erase_oneblock(st
+@@ -1860,6 +1864,8 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
int retries = 3;
int ret;
@@ -35704,10 +37334,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0001.c linux-2.6.32.49/d
adr += chip->start;
retry:
-diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c
---- linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c 2011-11-15 19:59:43.000000000 -0500
-@@ -255,6 +255,8 @@ static inline int do_read_onechip(struct
+diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
+index 0667a67..3ab97ed 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0020.c
++++ b/drivers/mtd/chips/cfi_cmdset_0020.c
+@@ -255,6 +255,8 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof
unsigned long cmd_addr;
struct cfi_private *cfi = map->fldrv_priv;
@@ -35716,7 +37347,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/d
adr += chip->start;
/* Ensure cmd read/writes are aligned. */
-@@ -428,6 +430,8 @@ static inline int do_write_buffer(struct
+@@ -428,6 +430,8 @@ static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
DECLARE_WAITQUEUE(wait, current);
int wbufsize, z;
@@ -35725,7 +37356,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/d
/* M58LW064A requires bus alignment for buffer wriets -- saw */
if (adr & (map_bankwidth(map)-1))
return -EINVAL;
-@@ -742,6 +746,8 @@ static inline int do_erase_oneblock(stru
+@@ -742,6 +746,8 @@ static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, u
DECLARE_WAITQUEUE(wait, current);
int ret = 0;
@@ -35734,7 +37365,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/d
adr += chip->start;
/* Let's determine this according to the interleave only once */
-@@ -1047,6 +1053,8 @@ static inline int do_lock_oneblock(struc
+@@ -1047,6 +1053,8 @@ static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, un
unsigned long timeo = jiffies + HZ;
DECLARE_WAITQUEUE(wait, current);
@@ -35743,7 +37374,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/d
adr += chip->start;
/* Let's determine this according to the interleave only once */
-@@ -1196,6 +1204,8 @@ static inline int do_unlock_oneblock(str
+@@ -1196,6 +1204,8 @@ static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip,
unsigned long timeo = jiffies + HZ;
DECLARE_WAITQUEUE(wait, current);
@@ -35752,10 +37383,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/chips/cfi_cmdset_0020.c linux-2.6.32.49/d
adr += chip->start;
/* Let's determine this according to the interleave only once */
-diff -urNp linux-2.6.32.49/drivers/mtd/devices/doc2000.c linux-2.6.32.49/drivers/mtd/devices/doc2000.c
---- linux-2.6.32.49/drivers/mtd/devices/doc2000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/devices/doc2000.c 2011-11-15 19:59:43.000000000 -0500
-@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt
+diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
+index 5bf5f46..c5de373 100644
+--- a/drivers/mtd/devices/doc2000.c
++++ b/drivers/mtd/devices/doc2000.c
+@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
/* The ECC will not be calculated correctly if less than 512 is written */
/* DBB-
@@ -35764,10 +37396,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/devices/doc2000.c linux-2.6.32.49/drivers
printk(KERN_WARNING
"ECC needs a full sector write (adr: %lx size %lx)\n",
(long) to, (long) len);
-diff -urNp linux-2.6.32.49/drivers/mtd/devices/doc2001.c linux-2.6.32.49/drivers/mtd/devices/doc2001.c
---- linux-2.6.32.49/drivers/mtd/devices/doc2001.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/devices/doc2001.c 2011-11-15 19:59:43.000000000 -0500
-@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mt
+diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
+index 0990f78..bb4e8a4 100644
+--- a/drivers/mtd/devices/doc2001.c
++++ b/drivers/mtd/devices/doc2001.c
+@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len,
struct Nand *mychip = &this->chips[from >> (this->chipshift)];
/* Don't allow read past end of device */
@@ -35776,10 +37409,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/devices/doc2001.c linux-2.6.32.49/drivers
return -EINVAL;
/* Don't allow a single read to cross a 512-byte block boundary */
-diff -urNp linux-2.6.32.49/drivers/mtd/ftl.c linux-2.6.32.49/drivers/mtd/ftl.c
---- linux-2.6.32.49/drivers/mtd/ftl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/ftl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -474,6 +474,8 @@ static int copy_erase_unit(partition_t *
+diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
+index e56d6b4..f07e6cf 100644
+--- a/drivers/mtd/ftl.c
++++ b/drivers/mtd/ftl.c
+@@ -474,6 +474,8 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit,
loff_t offset;
uint16_t srcunitswap = cpu_to_le16(srcunit);
@@ -35788,10 +37422,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/ftl.c linux-2.6.32.49/drivers/mtd/ftl.c
eun = &part->EUNInfo[srcunit];
xfer = &part->XferInfo[xferunit];
DEBUG(2, "ftl_cs: copying block 0x%x to 0x%x\n",
-diff -urNp linux-2.6.32.49/drivers/mtd/inftlcore.c linux-2.6.32.49/drivers/mtd/inftlcore.c
---- linux-2.6.32.49/drivers/mtd/inftlcore.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/inftlcore.c 2011-11-15 19:59:43.000000000 -0500
-@@ -260,6 +260,8 @@ static u16 INFTL_foldchain(struct INFTLr
+diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
+index 8aca552..146446e 100755
+--- a/drivers/mtd/inftlcore.c
++++ b/drivers/mtd/inftlcore.c
+@@ -260,6 +260,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
struct inftl_oob oob;
size_t retlen;
@@ -35800,10 +37435,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/inftlcore.c linux-2.6.32.49/drivers/mtd/i
DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,"
"pending=%d)\n", inftl, thisVUC, pendingblock);
-diff -urNp linux-2.6.32.49/drivers/mtd/inftlmount.c linux-2.6.32.49/drivers/mtd/inftlmount.c
---- linux-2.6.32.49/drivers/mtd/inftlmount.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/inftlmount.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,6 +54,8 @@ static int find_boot_record(struct INFTL
+diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
+index 32e82ae..ed50953 100644
+--- a/drivers/mtd/inftlmount.c
++++ b/drivers/mtd/inftlmount.c
+@@ -54,6 +54,8 @@ static int find_boot_record(struct INFTLrecord *inftl)
struct INFTLPartition *ip;
size_t retlen;
@@ -35812,10 +37448,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/inftlmount.c linux-2.6.32.49/drivers/mtd/
DEBUG(MTD_DEBUG_LEVEL3, "INFTL: find_boot_record(inftl=%p)\n", inftl);
/*
-diff -urNp linux-2.6.32.49/drivers/mtd/lpddr/qinfo_probe.c linux-2.6.32.49/drivers/mtd/lpddr/qinfo_probe.c
---- linux-2.6.32.49/drivers/mtd/lpddr/qinfo_probe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/lpddr/qinfo_probe.c 2011-11-15 19:59:43.000000000 -0500
-@@ -106,6 +106,8 @@ static int lpddr_pfow_present(struct map
+diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c
+index 79bf40f..fe5f8fd 100644
+--- a/drivers/mtd/lpddr/qinfo_probe.c
++++ b/drivers/mtd/lpddr/qinfo_probe.c
+@@ -106,6 +106,8 @@ static int lpddr_pfow_present(struct map_info *map, struct lpddr_private *lpddr)
{
map_word pfow_val[4];
@@ -35824,10 +37461,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/lpddr/qinfo_probe.c linux-2.6.32.49/drive
/* Check identification string */
pfow_val[0] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_P);
pfow_val[1] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_F);
-diff -urNp linux-2.6.32.49/drivers/mtd/mtdchar.c linux-2.6.32.49/drivers/mtd/mtdchar.c
---- linux-2.6.32.49/drivers/mtd/mtdchar.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/mtdchar.c 2011-11-26 19:45:06.000000000 -0500
-@@ -461,6 +461,8 @@ static int mtd_ioctl(struct inode *inode
+diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
+index 726a1b8..f46b460 100644
+--- a/drivers/mtd/mtdchar.c
++++ b/drivers/mtd/mtdchar.c
+@@ -461,6 +461,8 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
u_long size;
struct mtd_info_user info;
@@ -35836,10 +37474,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/mtdchar.c linux-2.6.32.49/drivers/mtd/mtd
DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n");
size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
-diff -urNp linux-2.6.32.49/drivers/mtd/nftlcore.c linux-2.6.32.49/drivers/mtd/nftlcore.c
---- linux-2.6.32.49/drivers/mtd/nftlcore.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/nftlcore.c 2011-11-15 19:59:43.000000000 -0500
-@@ -254,6 +254,8 @@ static u16 NFTL_foldchain (struct NFTLre
+diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
+index 1002e18..26d82d5 100644
+--- a/drivers/mtd/nftlcore.c
++++ b/drivers/mtd/nftlcore.c
+@@ -254,6 +254,8 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p
int inplace = 1;
size_t retlen;
@@ -35848,9 +37487,10 @@ diff -urNp linux-2.6.32.49/drivers/mtd/nftlcore.c linux-2.6.32.49/drivers/mtd/nf
memset(BlockMap, 0xff, sizeof(BlockMap));
memset(BlockFreeFound, 0, sizeof(BlockFreeFound));
-diff -urNp linux-2.6.32.49/drivers/mtd/nftlmount.c linux-2.6.32.49/drivers/mtd/nftlmount.c
---- linux-2.6.32.49/drivers/mtd/nftlmount.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/nftlmount.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
+index 8b22b18..6fada85 100644
+--- a/drivers/mtd/nftlmount.c
++++ b/drivers/mtd/nftlmount.c
@@ -23,6 +23,7 @@
#include <asm/errno.h>
#include <linux/delay.h>
@@ -35859,7 +37499,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/nftlmount.c linux-2.6.32.49/drivers/mtd/n
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nftl.h>
-@@ -44,6 +45,8 @@ static int find_boot_record(struct NFTLr
+@@ -44,6 +45,8 @@ static int find_boot_record(struct NFTLrecord *nftl)
struct mtd_info *mtd = nftl->mbd.mtd;
unsigned int i;
@@ -35868,9 +37508,10 @@ diff -urNp linux-2.6.32.49/drivers/mtd/nftlmount.c linux-2.6.32.49/drivers/mtd/n
/* Assume logical EraseSize == physical erasesize for starting the scan.
We'll sort it out later if we find a MediaHeader which says otherwise */
/* Actually, we won't. The new DiskOnChip driver has already scanned
-diff -urNp linux-2.6.32.49/drivers/mtd/ubi/build.c linux-2.6.32.49/drivers/mtd/ubi/build.c
---- linux-2.6.32.49/drivers/mtd/ubi/build.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/mtd/ubi/build.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
+index 14cec04..d775b87 100644
+--- a/drivers/mtd/ubi/build.c
++++ b/drivers/mtd/ubi/build.c
@@ -1255,7 +1255,7 @@ module_exit(ubi_exit);
static int __init bytes_str_to_int(const char *str)
{
@@ -35880,7 +37521,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/ubi/build.c linux-2.6.32.49/drivers/mtd/u
result = simple_strtoul(str, &endp, 0);
if (str == endp || result >= INT_MAX) {
-@@ -1266,11 +1266,11 @@ static int __init bytes_str_to_int(const
+@@ -1266,11 +1266,11 @@ static int __init bytes_str_to_int(const char *str)
switch (*endp) {
case 'G':
@@ -35895,7 +37536,7 @@ diff -urNp linux-2.6.32.49/drivers/mtd/ubi/build.c linux-2.6.32.49/drivers/mtd/u
if (endp[1] == 'i' && endp[2] == 'B')
endp += 2;
case '\0':
-@@ -1281,7 +1281,13 @@ static int __init bytes_str_to_int(const
+@@ -1281,7 +1281,13 @@ static int __init bytes_str_to_int(const char *str)
return -EINVAL;
}
@@ -35910,10 +37551,11 @@ diff -urNp linux-2.6.32.49/drivers/mtd/ubi/build.c linux-2.6.32.49/drivers/mtd/u
}
/**
-diff -urNp linux-2.6.32.49/drivers/net/atlx/atl2.c linux-2.6.32.49/drivers/net/atlx/atl2.c
---- linux-2.6.32.49/drivers/net/atlx/atl2.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/atlx/atl2.c 2011-11-18 18:01:55.000000000 -0500
-@@ -2845,7 +2845,7 @@ static void atl2_force_ps(struct atl2_hw
+diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
+index ab68886..ca405e8 100644
+--- a/drivers/net/atlx/atl2.c
++++ b/drivers/net/atlx/atl2.c
+@@ -2845,7 +2845,7 @@ static void atl2_force_ps(struct atl2_hw *hw)
*/
#define ATL2_PARAM(X, desc) \
@@ -35922,9 +37564,10 @@ diff -urNp linux-2.6.32.49/drivers/net/atlx/atl2.c linux-2.6.32.49/drivers/net/a
MODULE_PARM(X, "1-" __MODULE_STRING(ATL2_MAX_NIC) "i"); \
MODULE_PARM_DESC(X, desc);
#else
-diff -urNp linux-2.6.32.49/drivers/net/bnx2.c linux-2.6.32.49/drivers/net/bnx2.c
---- linux-2.6.32.49/drivers/net/bnx2.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/bnx2.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
+index 4874b2b..67f8526 100644
+--- a/drivers/net/bnx2.c
++++ b/drivers/net/bnx2.c
@@ -5809,6 +5809,8 @@ bnx2_test_nvram(struct bnx2 *bp)
int rc = 0;
u32 magic, csum;
@@ -35934,10 +37577,11 @@ diff -urNp linux-2.6.32.49/drivers/net/bnx2.c linux-2.6.32.49/drivers/net/bnx2.c
if ((rc = bnx2_nvram_read(bp, 0, data, 4)) != 0)
goto test_nvram_done;
-diff -urNp linux-2.6.32.49/drivers/net/cxgb3/l2t.h linux-2.6.32.49/drivers/net/cxgb3/l2t.h
---- linux-2.6.32.49/drivers/net/cxgb3/l2t.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/cxgb3/l2t.h 2011-11-15 19:59:43.000000000 -0500
-@@ -86,7 +86,7 @@ typedef void (*arp_failure_handler_func)
+diff --git a/drivers/net/cxgb3/l2t.h b/drivers/net/cxgb3/l2t.h
+index fd3eb07..8a6978d 100644
+--- a/drivers/net/cxgb3/l2t.h
++++ b/drivers/net/cxgb3/l2t.h
+@@ -86,7 +86,7 @@ typedef void (*arp_failure_handler_func)(struct t3cdev * dev,
*/
struct l2t_skb_cb {
arp_failure_handler_func arp_failure_handler;
@@ -35946,10 +37590,11 @@ diff -urNp linux-2.6.32.49/drivers/net/cxgb3/l2t.h linux-2.6.32.49/drivers/net/c
#define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb)
-diff -urNp linux-2.6.32.49/drivers/net/cxgb3/t3_hw.c linux-2.6.32.49/drivers/net/cxgb3/t3_hw.c
---- linux-2.6.32.49/drivers/net/cxgb3/t3_hw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/cxgb3/t3_hw.c 2011-11-15 19:59:43.000000000 -0500
-@@ -699,6 +699,8 @@ static int get_vpd_params(struct adapter
+diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
+index 032cfe0..411af379 100644
+--- a/drivers/net/cxgb3/t3_hw.c
++++ b/drivers/net/cxgb3/t3_hw.c
+@@ -699,6 +699,8 @@ static int get_vpd_params(struct adapter *adapter, struct vpd_params *p)
int i, addr, ret;
struct t3_vpd vpd;
@@ -35958,10 +37603,11 @@ diff -urNp linux-2.6.32.49/drivers/net/cxgb3/t3_hw.c linux-2.6.32.49/drivers/net
/*
* Card information is normally at VPD_BASE but some early cards had
* it at 0.
-diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/net/e1000e/82571.c
---- linux-2.6.32.49/drivers/net/e1000e/82571.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/e1000e/82571.c 2011-11-15 19:59:43.000000000 -0500
-@@ -212,7 +212,7 @@ static s32 e1000_init_mac_params_82571(s
+diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
+index d1e0563..b9e129c 100644
+--- a/drivers/net/e1000e/82571.c
++++ b/drivers/net/e1000e/82571.c
+@@ -212,7 +212,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
@@ -35970,7 +37616,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
u32 swsm = 0;
u32 swsm2 = 0;
bool force_clear_smbi = false;
-@@ -1656,7 +1656,7 @@ static void e1000_clear_hw_cntrs_82571(s
+@@ -1656,7 +1656,7 @@ static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
temp = er32(ICRXDMTC);
}
@@ -35979,7 +37625,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
/* .check_mng_mode: mac type dependent */
/* .check_for_link: media type dependent */
.id_led_init = e1000e_id_led_init,
-@@ -1674,7 +1674,7 @@ static struct e1000_mac_operations e8257
+@@ -1674,7 +1674,7 @@ static struct e1000_mac_operations e82571_mac_ops = {
.setup_led = e1000e_setup_led_generic,
};
@@ -35988,7 +37634,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
.acquire_phy = e1000_get_hw_semaphore_82571,
.check_reset_block = e1000e_check_reset_block_generic,
.commit_phy = NULL,
-@@ -1691,7 +1691,7 @@ static struct e1000_phy_operations e82_p
+@@ -1691,7 +1691,7 @@ static struct e1000_phy_operations e82_phy_ops_igp = {
.cfg_on_link_up = NULL,
};
@@ -35997,7 +37643,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
.acquire_phy = e1000_get_hw_semaphore_82571,
.check_reset_block = e1000e_check_reset_block_generic,
.commit_phy = e1000e_phy_sw_reset,
-@@ -1708,7 +1708,7 @@ static struct e1000_phy_operations e82_p
+@@ -1708,7 +1708,7 @@ static struct e1000_phy_operations e82_phy_ops_m88 = {
.cfg_on_link_up = NULL,
};
@@ -36006,7 +37652,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
.acquire_phy = e1000_get_hw_semaphore_82571,
.check_reset_block = e1000e_check_reset_block_generic,
.commit_phy = e1000e_phy_sw_reset,
-@@ -1725,7 +1725,7 @@ static struct e1000_phy_operations e82_p
+@@ -1725,7 +1725,7 @@ static struct e1000_phy_operations e82_phy_ops_bm = {
.cfg_on_link_up = NULL,
};
@@ -36015,9 +37661,10 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/82571.c linux-2.6.32.49/drivers/ne
.acquire_nvm = e1000_acquire_nvm_82571,
.read_nvm = e1000e_read_nvm_eerd,
.release_nvm = e1000_release_nvm_82571,
-diff -urNp linux-2.6.32.49/drivers/net/e1000e/e1000.h linux-2.6.32.49/drivers/net/e1000e/e1000.h
---- linux-2.6.32.49/drivers/net/e1000e/e1000.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/e1000e/e1000.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
+index 47db9bd..fa58ccd 100644
+--- a/drivers/net/e1000e/e1000.h
++++ b/drivers/net/e1000e/e1000.h
@@ -375,9 +375,9 @@ struct e1000_info {
u32 pba;
u32 max_hw_frame_size;
@@ -36031,10 +37678,11 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/e1000.h linux-2.6.32.49/drivers/ne
};
/* hardware capability, feature, and workaround flags */
-diff -urNp linux-2.6.32.49/drivers/net/e1000e/es2lan.c linux-2.6.32.49/drivers/net/e1000e/es2lan.c
---- linux-2.6.32.49/drivers/net/e1000e/es2lan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/e1000e/es2lan.c 2011-11-15 19:59:43.000000000 -0500
-@@ -207,7 +207,7 @@ static s32 e1000_init_mac_params_80003es
+diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c
+index ae5d736..e9a93a1 100644
+--- a/drivers/net/e1000e/es2lan.c
++++ b/drivers/net/e1000e/es2lan.c
+@@ -207,7 +207,7 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
@@ -36043,7 +37691,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/es2lan.c linux-2.6.32.49/drivers/n
/* Set media type */
switch (adapter->pdev->device) {
-@@ -1365,7 +1365,7 @@ static void e1000_clear_hw_cntrs_80003es
+@@ -1365,7 +1365,7 @@ static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw)
temp = er32(ICRXDMTC);
}
@@ -36052,7 +37700,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/es2lan.c linux-2.6.32.49/drivers/n
.id_led_init = e1000e_id_led_init,
.check_mng_mode = e1000e_check_mng_mode_generic,
/* check_for_link dependent on media type */
-@@ -1383,7 +1383,7 @@ static struct e1000_mac_operations es2_m
+@@ -1383,7 +1383,7 @@ static struct e1000_mac_operations es2_mac_ops = {
.setup_led = e1000e_setup_led_generic,
};
@@ -36061,7 +37709,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/es2lan.c linux-2.6.32.49/drivers/n
.acquire_phy = e1000_acquire_phy_80003es2lan,
.check_reset_block = e1000e_check_reset_block_generic,
.commit_phy = e1000e_phy_sw_reset,
-@@ -1400,7 +1400,7 @@ static struct e1000_phy_operations es2_p
+@@ -1400,7 +1400,7 @@ static struct e1000_phy_operations es2_phy_ops = {
.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan,
};
@@ -36070,9 +37718,10 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/es2lan.c linux-2.6.32.49/drivers/n
.acquire_nvm = e1000_acquire_nvm_80003es2lan,
.read_nvm = e1000e_read_nvm_eerd,
.release_nvm = e1000_release_nvm_80003es2lan,
-diff -urNp linux-2.6.32.49/drivers/net/e1000e/hw.h linux-2.6.32.49/drivers/net/e1000e/hw.h
---- linux-2.6.32.49/drivers/net/e1000e/hw.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/e1000e/hw.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
+index 11f3b7c..6381887 100644
+--- a/drivers/net/e1000e/hw.h
++++ b/drivers/net/e1000e/hw.h
@@ -753,6 +753,7 @@ struct e1000_mac_operations {
s32 (*setup_physical_interface)(struct e1000_hw *);
s32 (*setup_led)(struct e1000_hw *);
@@ -36119,10 +37768,11 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/hw.h linux-2.6.32.49/drivers/net/e
enum e1000_nvm_type type;
enum e1000_nvm_override override;
-diff -urNp linux-2.6.32.49/drivers/net/e1000e/ich8lan.c linux-2.6.32.49/drivers/net/e1000e/ich8lan.c
---- linux-2.6.32.49/drivers/net/e1000e/ich8lan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/e1000e/ich8lan.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3463,7 +3463,7 @@ static void e1000_clear_hw_cntrs_ich8lan
+diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
+index de39f9a..e28d3e0 100644
+--- a/drivers/net/e1000e/ich8lan.c
++++ b/drivers/net/e1000e/ich8lan.c
+@@ -3463,7 +3463,7 @@ static void e1000_clear_hw_cntrs_ich8lan(struct e1000_hw *hw)
}
}
@@ -36131,7 +37781,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/ich8lan.c linux-2.6.32.49/drivers/
.id_led_init = e1000e_id_led_init,
.check_mng_mode = e1000_check_mng_mode_ich8lan,
.check_for_link = e1000_check_for_copper_link_ich8lan,
-@@ -3481,7 +3481,7 @@ static struct e1000_mac_operations ich8_
+@@ -3481,7 +3481,7 @@ static struct e1000_mac_operations ich8_mac_ops = {
/* id_led_init dependent on mac type */
};
@@ -36140,7 +37790,7 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/ich8lan.c linux-2.6.32.49/drivers/
.acquire_phy = e1000_acquire_swflag_ich8lan,
.check_reset_block = e1000_check_reset_block_ich8lan,
.commit_phy = NULL,
-@@ -3497,7 +3497,7 @@ static struct e1000_phy_operations ich8_
+@@ -3497,7 +3497,7 @@ static struct e1000_phy_operations ich8_phy_ops = {
.write_phy_reg = e1000e_write_phy_reg_igp,
};
@@ -36149,9 +37799,10 @@ diff -urNp linux-2.6.32.49/drivers/net/e1000e/ich8lan.c linux-2.6.32.49/drivers/
.acquire_nvm = e1000_acquire_nvm_ich8lan,
.read_nvm = e1000_read_nvm_ich8lan,
.release_nvm = e1000_release_nvm_ich8lan,
-diff -urNp linux-2.6.32.49/drivers/net/fealnx.c linux-2.6.32.49/drivers/net/fealnx.c
---- linux-2.6.32.49/drivers/net/fealnx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/fealnx.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
+index 18d5fbb..542d96d 100644
+--- a/drivers/net/fealnx.c
++++ b/drivers/net/fealnx.c
@@ -151,7 +151,7 @@ struct chip_info {
int flags;
};
@@ -36161,10 +37812,11 @@ diff -urNp linux-2.6.32.49/drivers/net/fealnx.c linux-2.6.32.49/drivers/net/feal
{ "100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
{ "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR },
{ "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
-diff -urNp linux-2.6.32.49/drivers/net/hamradio/6pack.c linux-2.6.32.49/drivers/net/hamradio/6pack.c
---- linux-2.6.32.49/drivers/net/hamradio/6pack.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/hamradio/6pack.c 2011-11-15 19:59:43.000000000 -0500
-@@ -461,6 +461,8 @@ static void sixpack_receive_buf(struct t
+diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
+index 0e5b54b..b503f82 100644
+--- a/drivers/net/hamradio/6pack.c
++++ b/drivers/net/hamradio/6pack.c
+@@ -461,6 +461,8 @@ static void sixpack_receive_buf(struct tty_struct *tty,
unsigned char buf[512];
int count1;
@@ -36173,10 +37825,11 @@ diff -urNp linux-2.6.32.49/drivers/net/hamradio/6pack.c linux-2.6.32.49/drivers/
if (!count)
return;
-diff -urNp linux-2.6.32.49/drivers/net/ibmveth.c linux-2.6.32.49/drivers/net/ibmveth.c
---- linux-2.6.32.49/drivers/net/ibmveth.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/ibmveth.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1577,7 +1577,7 @@ static struct attribute * veth_pool_attr
+diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
+index 5862282..7cce8cb 100644
+--- a/drivers/net/ibmveth.c
++++ b/drivers/net/ibmveth.c
+@@ -1577,7 +1577,7 @@ static struct attribute * veth_pool_attrs[] = {
NULL,
};
@@ -36185,10 +37838,11 @@ diff -urNp linux-2.6.32.49/drivers/net/ibmveth.c linux-2.6.32.49/drivers/net/ibm
.show = veth_pool_show,
.store = veth_pool_store,
};
-diff -urNp linux-2.6.32.49/drivers/net/igb/e1000_82575.c linux-2.6.32.49/drivers/net/igb/e1000_82575.c
---- linux-2.6.32.49/drivers/net/igb/e1000_82575.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/igb/e1000_82575.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1411,7 +1411,7 @@ void igb_vmdq_set_replication_pf(struct
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index d617f2d..57b5309 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -1411,7 +1411,7 @@ void igb_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable)
wr32(E1000_VT_CTL, vt_ctl);
}
@@ -36197,7 +37851,7 @@ diff -urNp linux-2.6.32.49/drivers/net/igb/e1000_82575.c linux-2.6.32.49/drivers
.reset_hw = igb_reset_hw_82575,
.init_hw = igb_init_hw_82575,
.check_for_link = igb_check_for_link_82575,
-@@ -1420,13 +1420,13 @@ static struct e1000_mac_operations e1000
+@@ -1420,13 +1420,13 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = {
.get_speed_and_duplex = igb_get_speed_and_duplex_copper,
};
@@ -36213,9 +37867,10 @@ diff -urNp linux-2.6.32.49/drivers/net/igb/e1000_82575.c linux-2.6.32.49/drivers
.acquire = igb_acquire_nvm_82575,
.read = igb_read_nvm_eerd,
.release = igb_release_nvm_82575,
-diff -urNp linux-2.6.32.49/drivers/net/igb/e1000_hw.h linux-2.6.32.49/drivers/net/igb/e1000_hw.h
---- linux-2.6.32.49/drivers/net/igb/e1000_hw.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/igb/e1000_hw.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index 72081df..d855cf5 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
@@ -288,6 +288,7 @@ struct e1000_mac_operations {
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*get_speed_and_duplex)(struct e1000_hw *, u16 *, u16 *);
@@ -36284,9 +37939,10 @@ diff -urNp linux-2.6.32.49/drivers/net/igb/e1000_hw.h linux-2.6.32.49/drivers/ne
struct e1000_mbx_stats stats;
u32 timeout;
u32 usec_delay;
-diff -urNp linux-2.6.32.49/drivers/net/igbvf/vf.h linux-2.6.32.49/drivers/net/igbvf/vf.h
---- linux-2.6.32.49/drivers/net/igbvf/vf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/igbvf/vf.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/igbvf/vf.h b/drivers/net/igbvf/vf.h
+index 1e8ce37..549c453 100644
+--- a/drivers/net/igbvf/vf.h
++++ b/drivers/net/igbvf/vf.h
@@ -187,9 +187,10 @@ struct e1000_mac_operations {
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*set_vfta)(struct e1000_hw *, u16, bool);
@@ -36316,10 +37972,11 @@ diff -urNp linux-2.6.32.49/drivers/net/igbvf/vf.h linux-2.6.32.49/drivers/net/ig
struct e1000_mbx_stats stats;
u32 timeout;
u32 usec_delay;
-diff -urNp linux-2.6.32.49/drivers/net/iseries_veth.c linux-2.6.32.49/drivers/net/iseries_veth.c
---- linux-2.6.32.49/drivers/net/iseries_veth.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/iseries_veth.c 2011-11-15 19:59:43.000000000 -0500
-@@ -384,7 +384,7 @@ static struct attribute *veth_cnx_defaul
+diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
+index aa7286b..a61394f 100644
+--- a/drivers/net/iseries_veth.c
++++ b/drivers/net/iseries_veth.c
+@@ -384,7 +384,7 @@ static struct attribute *veth_cnx_default_attrs[] = {
NULL
};
@@ -36328,7 +37985,7 @@ diff -urNp linux-2.6.32.49/drivers/net/iseries_veth.c linux-2.6.32.49/drivers/ne
.show = veth_cnx_attribute_show
};
-@@ -441,7 +441,7 @@ static struct attribute *veth_port_defau
+@@ -441,7 +441,7 @@ static struct attribute *veth_port_default_attrs[] = {
NULL
};
@@ -36337,10 +37994,11 @@ diff -urNp linux-2.6.32.49/drivers/net/iseries_veth.c linux-2.6.32.49/drivers/ne
.show = veth_port_attribute_show
};
-diff -urNp linux-2.6.32.49/drivers/net/ixgb/ixgb_main.c linux-2.6.32.49/drivers/net/ixgb/ixgb_main.c
---- linux-2.6.32.49/drivers/net/ixgb/ixgb_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/ixgb/ixgb_main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1052,6 +1052,8 @@ ixgb_set_multi(struct net_device *netdev
+diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
+index 8aa44dc..fa1e797 100644
+--- a/drivers/net/ixgb/ixgb_main.c
++++ b/drivers/net/ixgb/ixgb_main.c
+@@ -1052,6 +1052,8 @@ ixgb_set_multi(struct net_device *netdev)
u32 rctl;
int i;
@@ -36349,9 +38007,10 @@ diff -urNp linux-2.6.32.49/drivers/net/ixgb/ixgb_main.c linux-2.6.32.49/drivers/
/* Check for Promiscuous and All Multicast modes */
rctl = IXGB_READ_REG(hw, RCTL);
-diff -urNp linux-2.6.32.49/drivers/net/ixgb/ixgb_param.c linux-2.6.32.49/drivers/net/ixgb/ixgb_param.c
---- linux-2.6.32.49/drivers/net/ixgb/ixgb_param.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/ixgb/ixgb_param.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c
+index af35e1d..8781785 100644
+--- a/drivers/net/ixgb/ixgb_param.c
++++ b/drivers/net/ixgb/ixgb_param.c
@@ -260,6 +260,9 @@ void __devinit
ixgb_check_options(struct ixgb_adapter *adapter)
{
@@ -36362,9 +38021,10 @@ diff -urNp linux-2.6.32.49/drivers/net/ixgb/ixgb_param.c linux-2.6.32.49/drivers
if (bd >= IXGB_MAX_NIC) {
printk(KERN_NOTICE
"Warning: no configuration for board #%i\n", bd);
-diff -urNp linux-2.6.32.49/drivers/net/ixgbe/ixgbe_type.h linux-2.6.32.49/drivers/net/ixgbe/ixgbe_type.h
---- linux-2.6.32.49/drivers/net/ixgbe/ixgbe_type.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/ixgbe/ixgbe_type.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
+index b17aa73..ed74540 100644
+--- a/drivers/net/ixgbe/ixgbe_type.h
++++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -2327,6 +2327,7 @@ struct ixgbe_eeprom_operations {
s32 (*validate_checksum)(struct ixgbe_hw *, u16 *);
s32 (*update_checksum)(struct ixgbe_hw *);
@@ -36411,9 +38071,10 @@ diff -urNp linux-2.6.32.49/drivers/net/ixgbe/ixgbe_type.h linux-2.6.32.49/driver
struct mdio_if_info mdio;
enum ixgbe_phy_type type;
u32 id;
-diff -urNp linux-2.6.32.49/drivers/net/mlx4/main.c linux-2.6.32.49/drivers/net/mlx4/main.c
---- linux-2.6.32.49/drivers/net/mlx4/main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/mlx4/main.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
+index 291a505..2543756 100644
+--- a/drivers/net/mlx4/main.c
++++ b/drivers/net/mlx4/main.c
@@ -38,6 +38,7 @@
#include <linux/errno.h>
#include <linux/pci.h>
@@ -36422,7 +38083,7 @@ diff -urNp linux-2.6.32.49/drivers/net/mlx4/main.c linux-2.6.32.49/drivers/net/m
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
-@@ -730,6 +731,8 @@ static int mlx4_init_hca(struct mlx4_dev
+@@ -730,6 +731,8 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
u64 icm_size;
int err;
@@ -36431,10 +38092,11 @@ diff -urNp linux-2.6.32.49/drivers/net/mlx4/main.c linux-2.6.32.49/drivers/net/m
err = mlx4_QUERY_FW(dev);
if (err) {
if (err == -EACCES)
-diff -urNp linux-2.6.32.49/drivers/net/niu.c linux-2.6.32.49/drivers/net/niu.c
---- linux-2.6.32.49/drivers/net/niu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/niu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -9128,6 +9128,8 @@ static void __devinit niu_try_msix(struc
+diff --git a/drivers/net/niu.c b/drivers/net/niu.c
+index 2dce134..fa5ce75 100644
+--- a/drivers/net/niu.c
++++ b/drivers/net/niu.c
+@@ -9128,6 +9128,8 @@ static void __devinit niu_try_msix(struct niu *np, u8 *ldg_num_map)
int i, num_irqs, err;
u8 first_ldg;
@@ -36443,9 +38105,10 @@ diff -urNp linux-2.6.32.49/drivers/net/niu.c linux-2.6.32.49/drivers/net/niu.c
first_ldg = (NIU_NUM_LDG / parent->num_ports) * np->port;
for (i = 0; i < (NIU_NUM_LDG / parent->num_ports); i++)
ldg_num_map[i] = first_ldg + i;
-diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcnet32.c
---- linux-2.6.32.49/drivers/net/pcnet32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/pcnet32.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
+index c1b3f09..97cd8c4 100644
+--- a/drivers/net/pcnet32.c
++++ b/drivers/net/pcnet32.c
@@ -79,7 +79,7 @@ static int cards_found;
/*
* VLB I/O addresses
@@ -36464,7 +38127,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spinlock_t lock; /* Guard lock */
unsigned int cur_rx, cur_tx; /* The next free ring entry */
unsigned int rx_ring_size; /* current rx ring size */
-@@ -457,9 +457,9 @@ static void pcnet32_netif_start(struct n
+@@ -457,9 +457,9 @@ static void pcnet32_netif_start(struct net_device *dev)
u16 val;
netif_wake_queue(dev);
@@ -36476,7 +38139,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
napi_enable(&lp->napi);
}
-@@ -744,7 +744,7 @@ static u32 pcnet32_get_link(struct net_d
+@@ -744,7 +744,7 @@ static u32 pcnet32_get_link(struct net_device *dev)
r = mii_link_ok(&lp->mii_if);
} else if (lp->chip_version >= PCNET32_79C970A) {
ulong ioaddr = dev->base_addr; /* card base I/O address */
@@ -36485,7 +38148,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
} else { /* can not detect link on really old chips */
r = 1;
}
-@@ -806,7 +806,7 @@ static int pcnet32_set_ringparam(struct
+@@ -806,7 +806,7 @@ static int pcnet32_set_ringparam(struct net_device *dev,
pcnet32_netif_stop(dev);
spin_lock_irqsave(&lp->lock, flags);
@@ -36494,7 +38157,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
size = min(ering->tx_pending, (unsigned int)TX_MAX_RING_SIZE);
-@@ -886,7 +886,7 @@ static void pcnet32_ethtool_test(struct
+@@ -886,7 +886,7 @@ static void pcnet32_ethtool_test(struct net_device *dev,
static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
{
struct pcnet32_private *lp = netdev_priv(dev);
@@ -36503,7 +38166,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
ulong ioaddr = dev->base_addr; /* card base I/O address */
struct sk_buff *skb; /* sk buff */
int x, i; /* counters */
-@@ -906,21 +906,21 @@ static int pcnet32_loopback_test(struct
+@@ -906,21 +906,21 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
pcnet32_netif_stop(dev);
spin_lock_irqsave(&lp->lock, flags);
@@ -36530,7 +38193,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
/* Initialize Transmit buffers. */
size = data_len + 15;
-@@ -966,10 +966,10 @@ static int pcnet32_loopback_test(struct
+@@ -966,10 +966,10 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
/* set int loopback in CSR15 */
x = a->read_csr(ioaddr, CSR15) & 0xfffc;
@@ -36543,7 +38206,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
/* Check status of descriptors */
for (x = 0; x < numbuffs; x++) {
-@@ -990,7 +990,7 @@ static int pcnet32_loopback_test(struct
+@@ -990,7 +990,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
}
}
@@ -36552,7 +38215,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
wmb();
if (netif_msg_hw(lp) && netif_msg_pktdata(lp)) {
printk(KERN_DEBUG "%s: RX loopback packets:\n", dev->name);
-@@ -1039,7 +1039,7 @@ static int pcnet32_loopback_test(struct
+@@ -1039,7 +1039,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
pcnet32_restart(dev, CSR0_NORMAL);
} else {
pcnet32_purge_rx_ring(dev);
@@ -36561,7 +38224,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -1049,7 +1049,7 @@ static int pcnet32_loopback_test(struct
+@@ -1049,7 +1049,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
static void pcnet32_led_blink_callback(struct net_device *dev)
{
struct pcnet32_private *lp = netdev_priv(dev);
@@ -36570,7 +38233,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
ulong ioaddr = dev->base_addr;
unsigned long flags;
int i;
-@@ -1066,7 +1066,7 @@ static void pcnet32_led_blink_callback(s
+@@ -1066,7 +1066,7 @@ static void pcnet32_led_blink_callback(struct net_device *dev)
static int pcnet32_phys_id(struct net_device *dev, u32 data)
{
struct pcnet32_private *lp = netdev_priv(dev);
@@ -36579,7 +38242,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
ulong ioaddr = dev->base_addr;
unsigned long flags;
int i, regs[4];
-@@ -1112,7 +1112,7 @@ static int pcnet32_suspend(struct net_de
+@@ -1112,7 +1112,7 @@ static int pcnet32_suspend(struct net_device *dev, unsigned long *flags,
{
int csr5;
struct pcnet32_private *lp = netdev_priv(dev);
@@ -36588,7 +38251,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
ulong ioaddr = dev->base_addr;
int ticks;
-@@ -1388,8 +1388,8 @@ static int pcnet32_poll(struct napi_stru
+@@ -1388,8 +1388,8 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
spin_lock_irqsave(&lp->lock, flags);
if (pcnet32_tx(dev)) {
/* reset the chip to clear the error condition, then restart */
@@ -36599,7 +38262,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
pcnet32_restart(dev, CSR0_START);
netif_wake_queue(dev);
}
-@@ -1401,12 +1401,12 @@ static int pcnet32_poll(struct napi_stru
+@@ -1401,12 +1401,12 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
__napi_complete(napi);
/* clear interrupt masks */
@@ -36615,7 +38278,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spin_unlock_irqrestore(&lp->lock, flags);
}
-@@ -1429,7 +1429,7 @@ static void pcnet32_get_regs(struct net_
+@@ -1429,7 +1429,7 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
int i, csr0;
u16 *buff = ptr;
struct pcnet32_private *lp = netdev_priv(dev);
@@ -36624,7 +38287,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
ulong ioaddr = dev->base_addr;
unsigned long flags;
-@@ -1466,9 +1466,9 @@ static void pcnet32_get_regs(struct net_
+@@ -1466,9 +1466,9 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
for (j = 0; j < PCNET32_MAX_PHYS; j++) {
if (lp->phymask & (1 << j)) {
for (i = 0; i < PCNET32_REGS_PER_PHY; i++) {
@@ -36636,7 +38299,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
}
}
-@@ -1858,7 +1858,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1858,7 +1858,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
((cards_found >= MAX_UNITS) || full_duplex[cards_found]))
lp->options |= PCNET32_PORT_FD;
@@ -36645,7 +38308,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
/* prior to register_netdev, dev->name is not yet correct */
if (pcnet32_alloc_ring(dev, pci_name(lp->pci_dev))) {
-@@ -1917,7 +1917,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1917,7 +1917,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
if (lp->mii) {
/* lp->phycount and lp->phymask are set to 0 by memset above */
@@ -36654,7 +38317,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
/* scan for PHYs */
for (i = 0; i < PCNET32_MAX_PHYS; i++) {
unsigned short id1, id2;
-@@ -1938,7 +1938,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1938,7 +1938,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
"Found PHY %04x:%04x at address %d.\n",
id1, id2, i);
}
@@ -36663,7 +38326,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (lp->phycount > 1) {
lp->options |= PCNET32_PORT_MII;
}
-@@ -2109,10 +2109,10 @@ static int pcnet32_open(struct net_devic
+@@ -2109,10 +2109,10 @@ static int pcnet32_open(struct net_device *dev)
}
/* Reset the PCNET32 */
@@ -36676,7 +38339,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (netif_msg_ifup(lp))
printk(KERN_DEBUG
-@@ -2122,14 +2122,14 @@ static int pcnet32_open(struct net_devic
+@@ -2122,14 +2122,14 @@ static int pcnet32_open(struct net_device *dev)
(u32) (lp->init_dma_addr));
/* set/reset autoselect bit */
@@ -36694,7 +38357,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (lp->options & PCNET32_PORT_FD) {
val |= 1;
if (lp->options == (PCNET32_PORT_FD | PCNET32_PORT_AUI))
-@@ -2139,14 +2139,14 @@ static int pcnet32_open(struct net_devic
+@@ -2139,14 +2139,14 @@ static int pcnet32_open(struct net_device *dev)
if (lp->chip_version == 0x2627)
val |= 3;
}
@@ -36712,7 +38375,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
/* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
if (pdev && pdev->subsystem_vendor == PCI_VENDOR_ID_AT &&
-@@ -2167,24 +2167,24 @@ static int pcnet32_open(struct net_devic
+@@ -2167,24 +2167,24 @@ static int pcnet32_open(struct net_device *dev)
* duplex, and/or enable auto negotiation, and clear DANAS
*/
if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) {
@@ -36745,7 +38408,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
}
} else {
-@@ -2197,10 +2197,10 @@ static int pcnet32_open(struct net_devic
+@@ -2197,10 +2197,10 @@ static int pcnet32_open(struct net_device *dev)
* There is really no good other way to handle multiple PHYs
* other than turning off all automatics
*/
@@ -36760,7 +38423,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (!(lp->options & PCNET32_PORT_ASEL)) {
/* setup ecmd */
-@@ -2210,7 +2210,7 @@ static int pcnet32_open(struct net_devic
+@@ -2210,7 +2210,7 @@ static int pcnet32_open(struct net_device *dev)
ecmd.speed =
lp->
options & PCNET32_PORT_100 ? SPEED_100 : SPEED_10;
@@ -36769,7 +38432,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (lp->options & PCNET32_PORT_FD) {
ecmd.duplex = DUPLEX_FULL;
-@@ -2219,7 +2219,7 @@ static int pcnet32_open(struct net_devic
+@@ -2219,7 +2219,7 @@ static int pcnet32_open(struct net_device *dev)
ecmd.duplex = DUPLEX_HALF;
bcr9 |= ~(1 << 0);
}
@@ -36778,7 +38441,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
for (i = 0; i < PCNET32_MAX_PHYS; i++) {
-@@ -2252,9 +2252,9 @@ static int pcnet32_open(struct net_devic
+@@ -2252,9 +2252,9 @@ static int pcnet32_open(struct net_device *dev)
#ifdef DO_DXSUFLO
if (lp->dxsuflo) { /* Disable transmit stop on underflow */
@@ -36790,7 +38453,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
#endif
-@@ -2270,11 +2270,11 @@ static int pcnet32_open(struct net_devic
+@@ -2270,11 +2270,11 @@ static int pcnet32_open(struct net_device *dev)
napi_enable(&lp->napi);
/* Re-initialize the PCNET32, and start it when done. */
@@ -36806,7 +38469,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
netif_start_queue(dev);
-@@ -2286,20 +2286,20 @@ static int pcnet32_open(struct net_devic
+@@ -2286,20 +2286,20 @@ static int pcnet32_open(struct net_device *dev)
i = 0;
while (i++ < 100)
@@ -36830,7 +38493,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -2313,7 +2313,7 @@ static int pcnet32_open(struct net_devic
+@@ -2313,7 +2313,7 @@ static int pcnet32_open(struct net_device *dev)
* Switch back to 16bit mode to avoid problems with dumb
* DOS packet driver after a warm reboot
*/
@@ -36839,7 +38502,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
err_free_irq:
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -2420,7 +2420,7 @@ static void pcnet32_restart(struct net_d
+@@ -2420,7 +2420,7 @@ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
/* wait for stop */
for (i = 0; i < 100; i++)
@@ -36848,7 +38511,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
break;
if (i >= 100 && netif_msg_drv(lp))
-@@ -2433,13 +2433,13 @@ static void pcnet32_restart(struct net_d
+@@ -2433,13 +2433,13 @@ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
return;
/* ReInit Ring */
@@ -36865,7 +38528,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
static void pcnet32_tx_timeout(struct net_device *dev)
-@@ -2452,8 +2452,8 @@ static void pcnet32_tx_timeout(struct ne
+@@ -2452,8 +2452,8 @@ static void pcnet32_tx_timeout(struct net_device *dev)
if (pcnet32_debug & NETIF_MSG_DRV)
printk(KERN_ERR
"%s: transmit timed out, status %4.4x, resetting.\n",
@@ -36876,7 +38539,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
dev->stats.tx_errors++;
if (netif_msg_tx_err(lp)) {
int i;
-@@ -2497,7 +2497,7 @@ static netdev_tx_t pcnet32_start_xmit(st
+@@ -2497,7 +2497,7 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
if (netif_msg_tx_queued(lp)) {
printk(KERN_DEBUG
"%s: pcnet32_start_xmit() called, csr0 %4.4x.\n",
@@ -36885,7 +38548,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
/* Default status -- will not enable Successful-TxDone
-@@ -2528,7 +2528,7 @@ static netdev_tx_t pcnet32_start_xmit(st
+@@ -2528,7 +2528,7 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
dev->stats.tx_bytes += skb->len;
/* Trigger an immediate send poll. */
@@ -36940,7 +38603,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spin_unlock(&lp->lock);
-@@ -2627,21 +2627,21 @@ static int pcnet32_close(struct net_devi
+@@ -2627,21 +2627,21 @@ static int pcnet32_close(struct net_device *dev)
spin_lock_irqsave(&lp->lock, flags);
@@ -36966,7 +38629,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -2664,7 +2664,7 @@ static struct net_device_stats *pcnet32_
+@@ -2664,7 +2664,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *dev)
unsigned long flags;
spin_lock_irqsave(&lp->lock, flags);
@@ -36975,7 +38638,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
spin_unlock_irqrestore(&lp->lock, flags);
return &dev->stats;
-@@ -2686,10 +2686,10 @@ static void pcnet32_load_multicast(struc
+@@ -2686,10 +2686,10 @@ static void pcnet32_load_multicast(struct net_device *dev)
if (dev->flags & IFF_ALLMULTI) {
ib->filter[0] = cpu_to_le32(~0U);
ib->filter[1] = cpu_to_le32(~0U);
@@ -36990,7 +38653,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
return;
}
/* clear the multicast filter */
-@@ -2710,7 +2710,7 @@ static void pcnet32_load_multicast(struc
+@@ -2710,7 +2710,7 @@ static void pcnet32_load_multicast(struct net_device *dev)
mcast_table[crc >> 4] |= cpu_to_le16(1 << (crc & 0xf));
}
for (i = 0; i < 4; i++)
@@ -36999,7 +38662,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
le16_to_cpu(mcast_table[i]));
return;
}
-@@ -2726,7 +2726,7 @@ static void pcnet32_set_multicast_list(s
+@@ -2726,7 +2726,7 @@ static void pcnet32_set_multicast_list(struct net_device *dev)
spin_lock_irqsave(&lp->lock, flags);
suspended = pcnet32_suspend(dev, &flags, 0);
@@ -37008,7 +38671,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
if (dev->flags & IFF_PROMISC) {
/* Log any net taps. */
if (netif_msg_hw(lp))
-@@ -2735,21 +2735,21 @@ static void pcnet32_set_multicast_list(s
+@@ -2735,21 +2735,21 @@ static void pcnet32_set_multicast_list(struct net_device *dev)
lp->init_block->mode =
cpu_to_le16(0x8000 | (lp->options & PCNET32_PORT_PORTSEL) <<
7);
@@ -37035,7 +38698,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
pcnet32_restart(dev, CSR0_NORMAL);
netif_wake_queue(dev);
}
-@@ -2767,8 +2767,8 @@ static int mdio_read(struct net_device *
+@@ -2767,8 +2767,8 @@ static int mdio_read(struct net_device *dev, int phy_id, int reg_num)
if (!lp->mii)
return 0;
@@ -37046,7 +38709,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
return val_out;
}
-@@ -2782,8 +2782,8 @@ static void mdio_write(struct net_device
+@@ -2782,8 +2782,8 @@ static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val)
if (!lp->mii)
return;
@@ -37057,7 +38720,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-@@ -2862,7 +2862,7 @@ static void pcnet32_check_media(struct n
+@@ -2862,7 +2862,7 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
curr_link = mii_link_ok(&lp->mii_if);
} else {
ulong ioaddr = dev->base_addr; /* card base I/O address */
@@ -37066,7 +38729,7 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
if (!curr_link) {
if (prev_link || verbose) {
-@@ -2887,13 +2887,13 @@ static void pcnet32_check_media(struct n
+@@ -2887,13 +2887,13 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
(ecmd.duplex ==
DUPLEX_FULL) ? "full" : "half");
}
@@ -37082,10 +38745,11 @@ diff -urNp linux-2.6.32.49/drivers/net/pcnet32.c linux-2.6.32.49/drivers/net/pcn
}
} else {
if (netif_msg_link(lp))
-diff -urNp linux-2.6.32.49/drivers/net/sis190.c linux-2.6.32.49/drivers/net/sis190.c
---- linux-2.6.32.49/drivers/net/sis190.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/sis190.c 2011-11-18 18:01:55.000000000 -0500
-@@ -1598,7 +1598,7 @@ static int __devinit sis190_get_mac_addr
+diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
+index 7cc9898..6eb50d3 100644
+--- a/drivers/net/sis190.c
++++ b/drivers/net/sis190.c
+@@ -1598,7 +1598,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
struct net_device *dev)
{
@@ -37094,9 +38758,10 @@ diff -urNp linux-2.6.32.49/drivers/net/sis190.c linux-2.6.32.49/drivers/net/sis1
struct sis190_private *tp = netdev_priv(dev);
struct pci_dev *isa_bridge;
u8 reg, tmp8;
-diff -urNp linux-2.6.32.49/drivers/net/sundance.c linux-2.6.32.49/drivers/net/sundance.c
---- linux-2.6.32.49/drivers/net/sundance.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/sundance.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
+index e13685a..60c948c 100644
+--- a/drivers/net/sundance.c
++++ b/drivers/net/sundance.c
@@ -225,7 +225,7 @@ enum {
struct pci_id_info {
const char *name;
@@ -37106,9 +38771,10 @@ diff -urNp linux-2.6.32.49/drivers/net/sundance.c linux-2.6.32.49/drivers/net/su
{"D-Link DFE-550TX FAST Ethernet Adapter"},
{"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
{"D-Link DFE-580TX 4 port Server Adapter"},
-diff -urNp linux-2.6.32.49/drivers/net/tg3.h linux-2.6.32.49/drivers/net/tg3.h
---- linux-2.6.32.49/drivers/net/tg3.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tg3.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
+index 529f55a..cccaa18 100644
+--- a/drivers/net/tg3.h
++++ b/drivers/net/tg3.h
@@ -95,6 +95,7 @@
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A1 0x4001
@@ -37117,10 +38783,11 @@ diff -urNp linux-2.6.32.49/drivers/net/tg3.h linux-2.6.32.49/drivers/net/tg3.h
#define CHIPREV_ID_5750_C2 0x4202
#define CHIPREV_ID_5752_A0_HW 0x5000
#define CHIPREV_ID_5752_A0 0x6000
-diff -urNp linux-2.6.32.49/drivers/net/tokenring/abyss.c linux-2.6.32.49/drivers/net/tokenring/abyss.c
---- linux-2.6.32.49/drivers/net/tokenring/abyss.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tokenring/abyss.c 2011-11-15 19:59:43.000000000 -0500
-@@ -451,10 +451,12 @@ static struct pci_driver abyss_driver =
+diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
+index b9db1b5..720f9ce 100644
+--- a/drivers/net/tokenring/abyss.c
++++ b/drivers/net/tokenring/abyss.c
+@@ -451,10 +451,12 @@ static struct pci_driver abyss_driver = {
static int __init abyss_init (void)
{
@@ -37136,10 +38803,11 @@ diff -urNp linux-2.6.32.49/drivers/net/tokenring/abyss.c linux-2.6.32.49/drivers
return pci_register_driver(&abyss_driver);
}
-diff -urNp linux-2.6.32.49/drivers/net/tokenring/madgemc.c linux-2.6.32.49/drivers/net/tokenring/madgemc.c
---- linux-2.6.32.49/drivers/net/tokenring/madgemc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tokenring/madgemc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -755,9 +755,11 @@ static struct mca_driver madgemc_driver
+diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
+index 456f8bf..373e56d 100644
+--- a/drivers/net/tokenring/madgemc.c
++++ b/drivers/net/tokenring/madgemc.c
+@@ -755,9 +755,11 @@ static struct mca_driver madgemc_driver = {
static int __init madgemc_init (void)
{
@@ -37154,9 +38822,10 @@ diff -urNp linux-2.6.32.49/drivers/net/tokenring/madgemc.c linux-2.6.32.49/drive
return mca_register_driver (&madgemc_driver);
}
-diff -urNp linux-2.6.32.49/drivers/net/tokenring/proteon.c linux-2.6.32.49/drivers/net/tokenring/proteon.c
---- linux-2.6.32.49/drivers/net/tokenring/proteon.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tokenring/proteon.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
+index 16e8783..925bd49 100644
+--- a/drivers/net/tokenring/proteon.c
++++ b/drivers/net/tokenring/proteon.c
@@ -353,9 +353,11 @@ static int __init proteon_init(void)
struct platform_device *pdev;
int i, num = 0, err = 0;
@@ -37172,9 +38841,10 @@ diff -urNp linux-2.6.32.49/drivers/net/tokenring/proteon.c linux-2.6.32.49/drive
err = platform_driver_register(&proteon_driver);
if (err)
-diff -urNp linux-2.6.32.49/drivers/net/tokenring/skisa.c linux-2.6.32.49/drivers/net/tokenring/skisa.c
---- linux-2.6.32.49/drivers/net/tokenring/skisa.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tokenring/skisa.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
+index 46db5c5..37c1536 100644
+--- a/drivers/net/tokenring/skisa.c
++++ b/drivers/net/tokenring/skisa.c
@@ -363,9 +363,11 @@ static int __init sk_isa_init(void)
struct platform_device *pdev;
int i, num = 0, err = 0;
@@ -37190,10 +38860,11 @@ diff -urNp linux-2.6.32.49/drivers/net/tokenring/skisa.c linux-2.6.32.49/drivers
err = platform_driver_register(&sk_isa_driver);
if (err)
-diff -urNp linux-2.6.32.49/drivers/net/tulip/de2104x.c linux-2.6.32.49/drivers/net/tulip/de2104x.c
---- linux-2.6.32.49/drivers/net/tulip/de2104x.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tulip/de2104x.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1785,6 +1785,8 @@ static void __devinit de21041_get_srom_i
+diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
+index 74e5ba4..5cf6bc9 100644
+--- a/drivers/net/tulip/de2104x.c
++++ b/drivers/net/tulip/de2104x.c
+@@ -1785,6 +1785,8 @@ static void __devinit de21041_get_srom_info (struct de_private *de)
struct de_srom_info_leaf *il;
void *bufp;
@@ -37202,10 +38873,11 @@ diff -urNp linux-2.6.32.49/drivers/net/tulip/de2104x.c linux-2.6.32.49/drivers/n
/* download entire eeprom */
for (i = 0; i < DE_EEPROM_WORDS; i++)
((__le16 *)ee_data)[i] =
-diff -urNp linux-2.6.32.49/drivers/net/tulip/de4x5.c linux-2.6.32.49/drivers/net/tulip/de4x5.c
---- linux-2.6.32.49/drivers/net/tulip/de4x5.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tulip/de4x5.c 2011-11-15 19:59:43.000000000 -0500
-@@ -5472,7 +5472,7 @@ de4x5_ioctl(struct net_device *dev, stru
+diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
+index a8349b7..90f9dfe 100644
+--- a/drivers/net/tulip/de4x5.c
++++ b/drivers/net/tulip/de4x5.c
+@@ -5472,7 +5472,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
for (i=0; i<ETH_ALEN; i++) {
tmp.addr[i] = dev->dev_addr[i];
}
@@ -37214,7 +38886,7 @@ diff -urNp linux-2.6.32.49/drivers/net/tulip/de4x5.c linux-2.6.32.49/drivers/net
break;
case DE4X5_SET_HWADDR: /* Set the hardware address */
-@@ -5512,7 +5512,7 @@ de4x5_ioctl(struct net_device *dev, stru
+@@ -5512,7 +5512,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irqsave(&lp->lock, flags);
memcpy(&statbuf, &lp->pktStats, ioc->len);
spin_unlock_irqrestore(&lp->lock, flags);
@@ -37223,10 +38895,11 @@ diff -urNp linux-2.6.32.49/drivers/net/tulip/de4x5.c linux-2.6.32.49/drivers/net
return -EFAULT;
break;
}
-diff -urNp linux-2.6.32.49/drivers/net/tulip/eeprom.c linux-2.6.32.49/drivers/net/tulip/eeprom.c
---- linux-2.6.32.49/drivers/net/tulip/eeprom.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tulip/eeprom.c 2011-11-18 18:01:55.000000000 -0500
-@@ -80,7 +80,7 @@ static struct eeprom_fixup eeprom_fixups
+diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
+index 391acd3..56d11cd 100644
+--- a/drivers/net/tulip/eeprom.c
++++ b/drivers/net/tulip/eeprom.c
+@@ -80,7 +80,7 @@ static struct eeprom_fixup eeprom_fixups[] __devinitdata = {
{NULL}};
@@ -37235,9 +38908,10 @@ diff -urNp linux-2.6.32.49/drivers/net/tulip/eeprom.c linux-2.6.32.49/drivers/ne
"21140 non-MII",
"21140 MII PHY",
"21142 Serial PHY",
-diff -urNp linux-2.6.32.49/drivers/net/tulip/winbond-840.c linux-2.6.32.49/drivers/net/tulip/winbond-840.c
---- linux-2.6.32.49/drivers/net/tulip/winbond-840.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/tulip/winbond-840.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
+index b38d3b7..b1cff23 100644
+--- a/drivers/net/tulip/winbond-840.c
++++ b/drivers/net/tulip/winbond-840.c
@@ -235,7 +235,7 @@ struct pci_id_info {
int drv_flags; /* Driver use, intended as capability flags. */
};
@@ -37247,9 +38921,10 @@ diff -urNp linux-2.6.32.49/drivers/net/tulip/winbond-840.c linux-2.6.32.49/drive
{ /* Sometime a Level-One switch card. */
"Winbond W89c840", CanHaveMII | HasBrokenTx | FDXOnNoMII},
{ "Winbond W89c840", CanHaveMII | HasBrokenTx},
-diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb/hso.c
---- linux-2.6.32.49/drivers/net/usb/hso.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/usb/hso.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
+index f450bc9..2b747c8 100644
+--- a/drivers/net/usb/hso.c
++++ b/drivers/net/usb/hso.c
@@ -71,7 +71,7 @@
#include <asm/byteorder.h>
#include <linux/serial_core.h>
@@ -37268,7 +38943,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
spinlock_t serial_lock;
int (*write_data) (struct hso_serial *serial);
-@@ -1180,7 +1180,7 @@ static void put_rxbuf_data_and_resubmit_
+@@ -1180,7 +1180,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial)
struct urb *urb;
urb = serial->rx_urb[0];
@@ -37277,7 +38952,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
count = put_rxbuf_data(urb, serial);
if (count == -1)
return;
-@@ -1216,7 +1216,7 @@ static void hso_std_serial_read_bulk_cal
+@@ -1216,7 +1216,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
DUMP1(urb->transfer_buffer, urb->actual_length);
/* Anyone listening? */
@@ -37286,7 +38961,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
return;
if (status == 0) {
-@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_st
+@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
spin_unlock_irq(&serial->serial_lock);
/* check for port already opened, if not set the termios */
@@ -37296,7 +38971,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
tty->low_latency = 1;
serial->rx_state = RX_IDLE;
/* Force default termio settings */
-@@ -1325,7 +1324,7 @@ static int hso_serial_open(struct tty_st
+@@ -1325,7 +1324,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
result = hso_start_serial_device(serial->parent, GFP_KERNEL);
if (result) {
hso_stop_serial_device(serial->parent);
@@ -37305,7 +38980,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
kref_put(&serial->parent->ref, hso_serial_ref_free);
}
} else {
-@@ -1362,10 +1361,10 @@ static void hso_serial_close(struct tty_
+@@ -1362,10 +1361,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
/* reset the rts and dtr */
/* do the actual close */
@@ -37319,7 +38994,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
spin_lock_irq(&serial->serial_lock);
if (serial->tty == tty) {
serial->tty->driver_data = NULL;
-@@ -1447,7 +1446,7 @@ static void hso_serial_set_termios(struc
+@@ -1447,7 +1446,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
/* the actual setup */
spin_lock_irqsave(&serial->serial_lock, flags);
@@ -37328,7 +39003,7 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
_hso_serial_set_termios(tty, old);
else
tty->termios = old;
-@@ -3097,7 +3096,7 @@ static int hso_resume(struct usb_interfa
+@@ -3097,7 +3096,7 @@ static int hso_resume(struct usb_interface *iface)
/* Start all serial ports */
for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
if (serial_table[i] && (serial_table[i]->interface == iface)) {
@@ -37337,9 +39012,10 @@ diff -urNp linux-2.6.32.49/drivers/net/usb/hso.c linux-2.6.32.49/drivers/net/usb
result =
hso_start_serial_device(serial_table[i], GFP_NOIO);
hso_kick_transmit(dev2ser(serial_table[i]));
-diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-config.h linux-2.6.32.49/drivers/net/vxge/vxge-config.h
---- linux-2.6.32.49/drivers/net/vxge/vxge-config.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/vxge/vxge-config.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h
+index 3e94f0c..ffdd926 100644
+--- a/drivers/net/vxge/vxge-config.h
++++ b/drivers/net/vxge/vxge-config.h
@@ -474,7 +474,7 @@ struct vxge_hw_uld_cbs {
void (*link_down)(struct __vxge_hw_device *devh);
void (*crit_err)(struct __vxge_hw_device *devh,
@@ -37349,10 +39025,11 @@ diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-config.h linux-2.6.32.49/driver
/*
* struct __vxge_hw_blockpool_entry - Block private data structure
-diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-main.c linux-2.6.32.49/drivers/net/vxge/vxge-main.c
---- linux-2.6.32.49/drivers/net/vxge/vxge-main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/vxge/vxge-main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -93,6 +93,8 @@ static inline void VXGE_COMPLETE_VPATH_T
+diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
+index 068d7a9..35293de 100644
+--- a/drivers/net/vxge/vxge-main.c
++++ b/drivers/net/vxge/vxge-main.c
+@@ -93,6 +93,8 @@ static inline void VXGE_COMPLETE_VPATH_TX(struct vxge_fifo *fifo)
struct sk_buff *completed[NR_SKB_COMPLETED];
int more;
@@ -37361,7 +39038,7 @@ diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-main.c linux-2.6.32.49/drivers/
do {
more = 0;
skb_ptr = completed;
-@@ -1779,6 +1781,8 @@ static enum vxge_hw_status vxge_rth_conf
+@@ -1779,6 +1781,8 @@ static enum vxge_hw_status vxge_rth_configure(struct vxgedev *vdev)
u8 mtable[256] = {0}; /* CPU to vpath mapping */
int index;
@@ -37370,9 +39047,10 @@ diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-main.c linux-2.6.32.49/drivers/
/*
* Filling
* - itable with bucket numbers
-diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-traffic.h linux-2.6.32.49/drivers/net/vxge/vxge-traffic.h
---- linux-2.6.32.49/drivers/net/vxge/vxge-traffic.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/vxge/vxge-traffic.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/vxge/vxge-traffic.h b/drivers/net/vxge/vxge-traffic.h
+index 461742b..81be42e 100644
+--- a/drivers/net/vxge/vxge-traffic.h
++++ b/drivers/net/vxge/vxge-traffic.h
@@ -2123,7 +2123,7 @@ struct vxge_hw_mempool_cbs {
struct vxge_hw_mempool_dma *dma_object,
u32 index,
@@ -37382,10 +39060,11 @@ diff -urNp linux-2.6.32.49/drivers/net/vxge/vxge-traffic.h linux-2.6.32.49/drive
void
__vxge_hw_mempool_destroy(
-diff -urNp linux-2.6.32.49/drivers/net/wan/cycx_x25.c linux-2.6.32.49/drivers/net/wan/cycx_x25.c
---- linux-2.6.32.49/drivers/net/wan/cycx_x25.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wan/cycx_x25.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1017,6 +1017,8 @@ static void hex_dump(char *msg, unsigned
+diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
+index cd8cb95..4153b79 100644
+--- a/drivers/net/wan/cycx_x25.c
++++ b/drivers/net/wan/cycx_x25.c
+@@ -1017,6 +1017,8 @@ static void hex_dump(char *msg, unsigned char *p, int len)
unsigned char hex[1024],
* phex = hex;
@@ -37394,10 +39073,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wan/cycx_x25.c linux-2.6.32.49/drivers/ne
if (len >= (sizeof(hex) / 2))
len = (sizeof(hex) / 2) - 1;
-diff -urNp linux-2.6.32.49/drivers/net/wan/hdlc_x25.c linux-2.6.32.49/drivers/net/wan/hdlc_x25.c
---- linux-2.6.32.49/drivers/net/wan/hdlc_x25.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wan/hdlc_x25.c 2011-11-15 19:59:43.000000000 -0500
-@@ -136,16 +136,16 @@ static netdev_tx_t x25_xmit(struct sk_bu
+diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
+index aa9248f..a4e3c3b 100644
+--- a/drivers/net/wan/hdlc_x25.c
++++ b/drivers/net/wan/hdlc_x25.c
+@@ -136,16 +136,16 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
static int x25_open(struct net_device *dev)
{
@@ -37422,10 +39102,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wan/hdlc_x25.c linux-2.6.32.49/drivers/ne
result = lapb_register(dev, &cb);
if (result != LAPB_OK)
return result;
-diff -urNp linux-2.6.32.49/drivers/net/wimax/i2400m/usb-fw.c linux-2.6.32.49/drivers/net/wimax/i2400m/usb-fw.c
---- linux-2.6.32.49/drivers/net/wimax/i2400m/usb-fw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wimax/i2400m/usb-fw.c 2011-11-15 19:59:43.000000000 -0500
-@@ -263,6 +263,8 @@ ssize_t i2400mu_bus_bm_wait_for_ack(stru
+diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
+index 5ad287c..783b020 100644
+--- a/drivers/net/wimax/i2400m/usb-fw.c
++++ b/drivers/net/wimax/i2400m/usb-fw.c
+@@ -263,6 +263,8 @@ ssize_t i2400mu_bus_bm_wait_for_ack(struct i2400m *i2400m,
int do_autopm = 1;
DECLARE_COMPLETION_ONSTACK(notif_completion);
@@ -37434,10 +39115,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wimax/i2400m/usb-fw.c linux-2.6.32.49/dri
d_fnstart(8, dev, "(i2400m %p ack %p size %zu)\n",
i2400m, ack, ack_size);
BUG_ON(_ack == i2400m->bm_ack_buf);
-diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/net/wireless/airo.c
---- linux-2.6.32.49/drivers/net/wireless/airo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/airo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3003,6 +3003,8 @@ static void airo_process_scan_results (s
+diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
+index 6c26840..62c97c3 100644
+--- a/drivers/net/wireless/airo.c
++++ b/drivers/net/wireless/airo.c
+@@ -3003,6 +3003,8 @@ static void airo_process_scan_results (struct airo_info *ai) {
BSSListElement * loop_net;
BSSListElement * tmp_net;
@@ -37446,7 +39128,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
/* Blow away current list of scan results */
list_for_each_entry_safe (loop_net, tmp_net, &ai->network_list, list) {
list_move_tail (&loop_net->list, &ai->network_free_list);
-@@ -3783,6 +3785,8 @@ static u16 setup_card(struct airo_info *
+@@ -3783,6 +3785,8 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
WepKeyRid wkr;
int rc;
@@ -37455,7 +39137,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
memset( &mySsid, 0, sizeof( mySsid ) );
kfree (ai->flash);
ai->flash = NULL;
-@@ -4758,6 +4762,8 @@ static int proc_stats_rid_open( struct i
+@@ -4758,6 +4762,8 @@ static int proc_stats_rid_open( struct inode *inode,
__le32 *vals = stats.vals;
int len;
@@ -37464,7 +39146,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
return -ENOMEM;
data = (struct proc_data *)file->private_data;
-@@ -5487,6 +5493,8 @@ static int proc_BSSList_open( struct ino
+@@ -5487,6 +5493,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
/* If doLoseSync is not 1, we won't do a Lose Sync */
int doLoseSync = -1;
@@ -37473,7 +39155,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
return -ENOMEM;
data = (struct proc_data *)file->private_data;
-@@ -7193,6 +7201,8 @@ static int airo_get_aplist(struct net_de
+@@ -7193,6 +7201,8 @@ static int airo_get_aplist(struct net_device *dev,
int i;
int loseSync = capable(CAP_NET_ADMIN) ? 1: -1;
@@ -37482,7 +39164,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
qual = kmalloc(IW_MAX_AP * sizeof(*qual), GFP_KERNEL);
if (!qual)
return -ENOMEM;
-@@ -7753,6 +7763,8 @@ static void airo_read_wireless_stats(str
+@@ -7753,6 +7763,8 @@ static void airo_read_wireless_stats(struct airo_info *local)
CapabilityRid cap_rid;
__le32 *vals = stats_rid.vals;
@@ -37491,10 +39173,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/airo.c linux-2.6.32.49/drivers/n
/* Get stats out of the card */
clear_bit(JOB_WSTATS, &local->jobs);
if (local->power.event) {
-diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c
---- linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -205,6 +205,8 @@ static ssize_t read_file_beacon(struct f
+diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
+index 747508c..82e965d 100644
+--- a/drivers/net/wireless/ath/ath5k/debug.c
++++ b/drivers/net/wireless/ath/ath5k/debug.c
+@@ -205,6 +205,8 @@ static ssize_t read_file_beacon(struct file *file, char __user *user_buf,
unsigned int v;
u64 tsf;
@@ -37503,7 +39186,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c linux-2.6.32.4
v = ath5k_hw_reg_read(sc->ah, AR5K_BEACON);
len += snprintf(buf+len, sizeof(buf)-len,
"%-24s0x%08x\tintval: %d\tTIM: 0x%x\n",
-@@ -318,6 +320,8 @@ static ssize_t read_file_debug(struct fi
+@@ -318,6 +320,8 @@ static ssize_t read_file_debug(struct file *file, char __user *user_buf,
unsigned int len = 0;
unsigned int i;
@@ -37512,10 +39195,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath5k/debug.c linux-2.6.32.4
len += snprintf(buf+len, sizeof(buf)-len,
"DEBUG LEVEL: 0x%08x\n\n", sc->debug.level);
-diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c
---- linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -220,6 +220,8 @@ static ssize_t read_file_interrupt(struc
+diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
+index 2be4c22..593b1eb 100644
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -220,6 +220,8 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
char buf[512];
unsigned int len = 0;
@@ -37524,7 +39208,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c linux-2.6.32.4
len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RX", sc->debug.stats.istats.rxok);
len += snprintf(buf + len, sizeof(buf) - len,
-@@ -360,6 +362,8 @@ static ssize_t read_file_wiphy(struct fi
+@@ -360,6 +362,8 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
int i;
u8 addr[ETH_ALEN];
@@ -37533,9 +39217,10 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ath/ath9k/debug.c linux-2.6.32.4
len += snprintf(buf + len, sizeof(buf) - len,
"primary: %s (%s chan=%d ht=%d)\n",
wiphy_name(sc->pri_wiphy->hw->wiphy),
-diff -urNp linux-2.6.32.49/drivers/net/wireless/b43/debugfs.c linux-2.6.32.49/drivers/net/wireless/b43/debugfs.c
---- linux-2.6.32.49/drivers/net/wireless/b43/debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/b43/debugfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
+index 80b19a4..dab3a45 100644
+--- a/drivers/net/wireless/b43/debugfs.c
++++ b/drivers/net/wireless/b43/debugfs.c
@@ -43,7 +43,7 @@ static struct dentry *rootdir;
struct b43_debugfs_fops {
ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
@@ -37545,9 +39230,10 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/b43/debugfs.c linux-2.6.32.49/dr
/* Offset of struct b43_dfs_file in struct b43_dfsentry */
size_t file_struct_offset;
};
-diff -urNp linux-2.6.32.49/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.32.49/drivers/net/wireless/b43legacy/debugfs.c
---- linux-2.6.32.49/drivers/net/wireless/b43legacy/debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/b43legacy/debugfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c
+index 1f85ac5..c99b4b4 100644
+--- a/drivers/net/wireless/b43legacy/debugfs.c
++++ b/drivers/net/wireless/b43legacy/debugfs.c
@@ -44,7 +44,7 @@ static struct dentry *rootdir;
struct b43legacy_debugfs_fops {
ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
@@ -37557,10 +39243,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.32
/* Offset of struct b43legacy_dfs_file in struct b43legacy_dfsentry */
size_t file_struct_offset;
/* Take wl->irq_lock before calling read/write? */
-diff -urNp linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c
---- linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2014,6 +2014,8 @@ static int ipw2100_set_essid(struct ipw2
+diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
+index 43102bf..3b569c3 100644
+--- a/drivers/net/wireless/ipw2x00/ipw2100.c
++++ b/drivers/net/wireless/ipw2x00/ipw2100.c
+@@ -2014,6 +2014,8 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
int err;
DECLARE_SSID_BUF(ssid);
@@ -37569,7 +39256,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c linux-2.6.32.4
IPW_DEBUG_HC("SSID: '%s'\n", print_ssid(ssid, essid, ssid_len));
if (ssid_len)
-@@ -5380,6 +5382,8 @@ static int ipw2100_set_key(struct ipw210
+@@ -5380,6 +5382,8 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
struct ipw2100_wep_key *wep_key = (void *)cmd.host_command_parameters;
int err;
@@ -37578,10 +39265,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ipw2x00/ipw2100.c linux-2.6.32.4
IPW_DEBUG_HC("WEP_KEY_INFO: index = %d, len = %d/%d\n",
idx, keylen, len);
-diff -urNp linux-2.6.32.49/drivers/net/wireless/ipw2x00/libipw_rx.c linux-2.6.32.49/drivers/net/wireless/ipw2x00/libipw_rx.c
---- linux-2.6.32.49/drivers/net/wireless/ipw2x00/libipw_rx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/ipw2x00/libipw_rx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1566,6 +1566,8 @@ static void libipw_process_probe_respons
+diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
+index 282b1f7..169f0cf 100644
+--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
++++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
+@@ -1566,6 +1566,8 @@ static void libipw_process_probe_response(struct libipw_device
unsigned long flags;
DECLARE_SSID_BUF(ssid);
@@ -37590,10 +39278,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/ipw2x00/libipw_rx.c linux-2.6.32
LIBIPW_DEBUG_SCAN("'%s' (%pM"
"): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
print_ssid(ssid, info_element->data, info_element->len),
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-1000.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-1000.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-1000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-1000.c 2011-11-15 19:59:43.000000000 -0500
-@@ -137,7 +137,7 @@ static struct iwl_lib_ops iwl1000_lib =
+diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
+index 950267a..80d5fd2 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
++++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
+@@ -137,7 +137,7 @@ static struct iwl_lib_ops iwl1000_lib = {
},
};
@@ -37602,24 +39291,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-1000.c linux-2.6.32.
.ucode = &iwl5000_ucode,
.lib = &iwl1000_lib,
.hcmd = &iwl5000_hcmd,
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl3945-base.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl3945-base.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl3945-base.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3927,7 +3927,9 @@ static int iwl3945_pci_probe(struct pci_
- */
- if (iwl3945_mod_params.disable_hw_scan) {
- IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
-- iwl3945_hw_ops.hw_scan = NULL;
-+ pax_open_kernel();
-+ *(void **)&iwl3945_hw_ops.hw_scan = NULL;
-+ pax_close_kernel();
- }
-
-
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-3945.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-3945.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-3945.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-3945.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2874,7 +2874,7 @@ static struct iwl_hcmd_utils_ops iwl3945
+diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
+index 56bfcc3..b348020 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
++++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
+@@ -2874,7 +2874,7 @@ static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
.build_addsta_hcmd = iwl3945_build_addsta_hcmd,
};
@@ -37628,10 +39304,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-3945.c linux-2.6.32.
.ucode = &iwl3945_ucode,
.lib = &iwl3945_lib,
.hcmd = &iwl3945_hcmd,
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-4965.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-4965.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-4965.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-4965.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2345,7 +2345,7 @@ static struct iwl_lib_ops iwl4965_lib =
+diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
+index 585b8d4..e142963 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
++++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
+@@ -2345,7 +2345,7 @@ static struct iwl_lib_ops iwl4965_lib = {
},
};
@@ -37640,10 +39317,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-4965.c linux-2.6.32.
.ucode = &iwl4965_ucode,
.lib = &iwl4965_lib,
.hcmd = &iwl4965_hcmd,
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-5000.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1633,14 +1633,14 @@ static struct iwl_lib_ops iwl5150_lib =
+diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
+index 1f423f2..e37c192 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
+@@ -1633,14 +1633,14 @@ static struct iwl_lib_ops iwl5150_lib = {
},
};
@@ -37660,10 +39338,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.32.
.ucode = &iwl5000_ucode,
.lib = &iwl5150_lib,
.hcmd = &iwl5000_hcmd,
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-6000.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-6000.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-6000.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-6000.c 2011-11-15 19:59:43.000000000 -0500
-@@ -146,7 +146,7 @@ static struct iwl_hcmd_utils_ops iwl6000
+diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
+index 1473452..f07d5e1 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
+@@ -146,7 +146,7 @@ static struct iwl_hcmd_utils_ops iwl6000_hcmd_utils = {
.calc_rssi = iwl5000_calc_rssi,
};
@@ -37672,24 +39351,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-6000.c linux-2.6.32.
.ucode = &iwl5000_ucode,
.lib = &iwl6000_lib,
.hcmd = &iwl5000_hcmd,
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2911,7 +2911,9 @@ static int iwl_pci_probe(struct pci_dev
- if (iwl_debug_level & IWL_DL_INFO)
- dev_printk(KERN_DEBUG, &(pdev->dev),
- "Disabling hw_scan\n");
-- iwl_hw_ops.hw_scan = NULL;
-+ pax_open_kernel();
-+ *(void **)&iwl_hw_ops.hw_scan = NULL;
-+ pax_close_kernel();
- }
-
- hw = iwl_alloc_all(cfg, &iwl_hw_ops);
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -857,6 +857,8 @@ static void rs_tx_status(void *priv_r, s
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+index 1a3dfa2..b3e0a61 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+@@ -857,6 +857,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
u8 active_index = 0;
s32 tpt = 0;
@@ -37698,7 +39364,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.3
IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n");
if (!ieee80211_is_data(hdr->frame_control) ||
-@@ -2722,6 +2724,8 @@ static void rs_fill_link_cmd(struct iwl_
+@@ -2722,6 +2724,8 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
u8 valid_tx_ant = 0;
struct iwl_link_quality_cmd *lq_cmd = &lq_sta->lq;
@@ -37707,10 +39373,41 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.3
/* Override starting rate (index 0) if needed for debug purposes */
rs_dbgfs_set_mcs(lq_sta, &new_rate, index);
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -524,6 +524,8 @@ static ssize_t iwl_dbgfs_status_read(str
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
+index 0e56d78..6a3c107 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
+@@ -2911,7 +2911,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ if (iwl_debug_level & IWL_DL_INFO)
+ dev_printk(KERN_DEBUG, &(pdev->dev),
+ "Disabling hw_scan\n");
+- iwl_hw_ops.hw_scan = NULL;
++ pax_open_kernel();
++ *(void **)&iwl_hw_ops.hw_scan = NULL;
++ pax_close_kernel();
+ }
+
+ hw = iwl_alloc_all(cfg, &iwl_hw_ops);
+diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
+index cbc6290..eb323d7 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
++++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
+@@ -118,8 +118,8 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv);
+ #endif
+
+ #else
+-#define IWL_DEBUG(__priv, level, fmt, args...)
+-#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
++#define IWL_DEBUG(__priv, level, fmt, args...) do {} while (0)
++#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) do {} while (0)
+ static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
+ void *p, u32 len)
+ {}
+diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+index a198bcf..8e68233 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
++++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+@@ -524,6 +524,8 @@ static ssize_t iwl_dbgfs_status_read(struct file *file,
int pos = 0;
const size_t bufsz = sizeof(buf);
@@ -37719,7 +39416,7 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-2.6.
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_HCMD_ACTIVE:\t %d\n",
test_bit(STATUS_HCMD_ACTIVE, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_HCMD_SYNC_ACTIVE: %d\n",
-@@ -658,6 +660,8 @@ static ssize_t iwl_dbgfs_qos_read(struct
+@@ -658,6 +660,8 @@ static ssize_t iwl_dbgfs_qos_read(struct file *file, char __user *user_buf,
const size_t bufsz = sizeof(buf);
ssize_t ret;
@@ -37728,23 +39425,10 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-2.6.
for (i = 0; i < AC_NUM; i++) {
pos += scnprintf(buf + pos, bufsz - pos,
"\tcw_min\tcw_max\taifsn\ttxop\n");
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debug.h
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-11-15 19:59:43.000000000 -0500
-@@ -118,8 +118,8 @@ void iwl_dbgfs_unregister(struct iwl_pri
- #endif
-
- #else
--#define IWL_DEBUG(__priv, level, fmt, args...)
--#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
-+#define IWL_DEBUG(__priv, level, fmt, args...) do {} while (0)
-+#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) do {} while (0)
- static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
- void *p, u32 len)
- {}
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-dev.h
---- linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-dev.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-dev.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
+index 3539ea4..b174bfa 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
++++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -68,7 +68,7 @@ struct iwl_tx_queue;
/* shared structures from iwl-5000.c */
@@ -37754,10 +39438,26 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.32.4
extern struct iwl_ucode_ops iwl5000_ucode;
extern struct iwl_lib_ops iwl5000_lib;
extern struct iwl_hcmd_ops iwl5000_hcmd;
-diff -urNp linux-2.6.32.49/drivers/net/wireless/iwmc3200wifi/debugfs.c linux-2.6.32.49/drivers/net/wireless/iwmc3200wifi/debugfs.c
---- linux-2.6.32.49/drivers/net/wireless/iwmc3200wifi/debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/iwmc3200wifi/debugfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -299,6 +299,8 @@ static ssize_t iwm_debugfs_fw_err_read(s
+diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
+index 619590d..69235ee 100644
+--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
++++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
+@@ -3927,7 +3927,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
+ */
+ if (iwl3945_mod_params.disable_hw_scan) {
+ IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
+- iwl3945_hw_ops.hw_scan = NULL;
++ pax_open_kernel();
++ *(void **)&iwl3945_hw_ops.hw_scan = NULL;
++ pax_close_kernel();
+ }
+
+
+diff --git a/drivers/net/wireless/iwmc3200wifi/debugfs.c b/drivers/net/wireless/iwmc3200wifi/debugfs.c
+index 1465379..fe4d78b 100644
+--- a/drivers/net/wireless/iwmc3200wifi/debugfs.c
++++ b/drivers/net/wireless/iwmc3200wifi/debugfs.c
+@@ -299,6 +299,8 @@ static ssize_t iwm_debugfs_fw_err_read(struct file *filp,
int buf_len = 512;
size_t len = 0;
@@ -37766,9 +39466,10 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/iwmc3200wifi/debugfs.c linux-2.6
if (*ppos != 0)
return 0;
if (count < sizeof(buf))
-diff -urNp linux-2.6.32.49/drivers/net/wireless/libertas/debugfs.c linux-2.6.32.49/drivers/net/wireless/libertas/debugfs.c
---- linux-2.6.32.49/drivers/net/wireless/libertas/debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/libertas/debugfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
+index 893a55c..7f66a50 100644
+--- a/drivers/net/wireless/libertas/debugfs.c
++++ b/drivers/net/wireless/libertas/debugfs.c
@@ -708,7 +708,7 @@ out_unlock:
struct lbs_debugfs_files {
const char *name;
@@ -37778,10 +39479,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/libertas/debugfs.c linux-2.6.32.
};
static const struct lbs_debugfs_files debugfs_files[] = {
-diff -urNp linux-2.6.32.49/drivers/net/wireless/rndis_wlan.c linux-2.6.32.49/drivers/net/wireless/rndis_wlan.c
---- linux-2.6.32.49/drivers/net/wireless/rndis_wlan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/net/wireless/rndis_wlan.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1176,7 +1176,7 @@ static int set_rts_threshold(struct usbn
+diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
+index 2ecbedb..42704f0 100644
+--- a/drivers/net/wireless/rndis_wlan.c
++++ b/drivers/net/wireless/rndis_wlan.c
+@@ -1176,7 +1176,7 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold)
devdbg(usbdev, "set_rts_threshold %i", rts_threshold);
@@ -37790,10 +39492,11 @@ diff -urNp linux-2.6.32.49/drivers/net/wireless/rndis_wlan.c linux-2.6.32.49/dri
rts_threshold = 2347;
tmp = cpu_to_le32(rts_threshold);
-diff -urNp linux-2.6.32.49/drivers/oprofile/buffer_sync.c linux-2.6.32.49/drivers/oprofile/buffer_sync.c
---- linux-2.6.32.49/drivers/oprofile/buffer_sync.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/buffer_sync.c 2011-11-15 19:59:43.000000000 -0500
-@@ -341,7 +341,7 @@ static void add_data(struct op_entry *en
+diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
+index 5c4df24..3b42925 100644
+--- a/drivers/oprofile/buffer_sync.c
++++ b/drivers/oprofile/buffer_sync.c
+@@ -341,7 +341,7 @@ static void add_data(struct op_entry *entry, struct mm_struct *mm)
if (cookie == NO_COOKIE)
offset = pc;
if (cookie == INVALID_COOKIE) {
@@ -37802,7 +39505,7 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/buffer_sync.c linux-2.6.32.49/driver
offset = pc;
}
if (cookie != last_cookie) {
-@@ -385,14 +385,14 @@ add_sample(struct mm_struct *mm, struct
+@@ -385,14 +385,14 @@ add_sample(struct mm_struct *mm, struct op_sample *s, int in_kernel)
/* add userspace sample */
if (!mm) {
@@ -37828,10 +39531,11 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/buffer_sync.c linux-2.6.32.49/driver
}
}
release_mm(mm);
-diff -urNp linux-2.6.32.49/drivers/oprofile/event_buffer.c linux-2.6.32.49/drivers/oprofile/event_buffer.c
---- linux-2.6.32.49/drivers/oprofile/event_buffer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/event_buffer.c 2011-11-15 19:59:43.000000000 -0500
-@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value
+diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
+index 5df60a6..72f5c1c 100644
+--- a/drivers/oprofile/event_buffer.c
++++ b/drivers/oprofile/event_buffer.c
+@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value)
}
if (buffer_pos == buffer_size) {
@@ -37840,10 +39544,11 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/event_buffer.c linux-2.6.32.49/drive
return;
}
-diff -urNp linux-2.6.32.49/drivers/oprofile/oprof.c linux-2.6.32.49/drivers/oprofile/oprof.c
---- linux-2.6.32.49/drivers/oprofile/oprof.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/oprof.c 2011-11-15 19:59:43.000000000 -0500
-@@ -110,7 +110,7 @@ static void switch_worker(struct work_st
+diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
+index dc8a042..fe5f315 100644
+--- a/drivers/oprofile/oprof.c
++++ b/drivers/oprofile/oprof.c
+@@ -110,7 +110,7 @@ static void switch_worker(struct work_struct *work)
if (oprofile_ops.switch_events())
return;
@@ -37852,21 +39557,10 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/oprof.c linux-2.6.32.49/drivers/opro
start_switch_worker();
}
-diff -urNp linux-2.6.32.49/drivers/oprofile/oprofilefs.c linux-2.6.32.49/drivers/oprofile/oprofilefs.c
---- linux-2.6.32.49/drivers/oprofile/oprofilefs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/oprofilefs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -187,7 +187,7 @@ static const struct file_operations atom
-
-
- int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
-- char const *name, atomic_t *val)
-+ char const *name, atomic_unchecked_t *val)
- {
- struct dentry *d = __oprofilefs_create_file(sb, root, name,
- &atomic_ro_fops, 0444);
-diff -urNp linux-2.6.32.49/drivers/oprofile/oprofile_stats.c linux-2.6.32.49/drivers/oprofile/oprofile_stats.c
---- linux-2.6.32.49/drivers/oprofile/oprofile_stats.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/oprofile_stats.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
+index 61689e8..387f7f8 100644
+--- a/drivers/oprofile/oprofile_stats.c
++++ b/drivers/oprofile/oprofile_stats.c
@@ -30,11 +30,11 @@ void oprofile_reset_stats(void)
cpu_buf->sample_invalid_eip = 0;
}
@@ -37884,9 +39578,10 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/oprofile_stats.c linux-2.6.32.49/dri
}
-diff -urNp linux-2.6.32.49/drivers/oprofile/oprofile_stats.h linux-2.6.32.49/drivers/oprofile/oprofile_stats.h
---- linux-2.6.32.49/drivers/oprofile/oprofile_stats.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/oprofile/oprofile_stats.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h
+index 0b54e46..a37c527 100644
+--- a/drivers/oprofile/oprofile_stats.h
++++ b/drivers/oprofile/oprofile_stats.h
@@ -13,11 +13,11 @@
#include <asm/atomic.h>
@@ -37904,10 +39599,24 @@ diff -urNp linux-2.6.32.49/drivers/oprofile/oprofile_stats.h linux-2.6.32.49/dri
};
extern struct oprofile_stat_struct oprofile_stats;
-diff -urNp linux-2.6.32.49/drivers/parisc/pdc_stable.c linux-2.6.32.49/drivers/parisc/pdc_stable.c
---- linux-2.6.32.49/drivers/parisc/pdc_stable.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/parisc/pdc_stable.c 2011-11-15 19:59:43.000000000 -0500
-@@ -481,7 +481,7 @@ pdcspath_attr_store(struct kobject *kobj
+diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
+index 2766a6d..80c77e2 100644
+--- a/drivers/oprofile/oprofilefs.c
++++ b/drivers/oprofile/oprofilefs.c
+@@ -187,7 +187,7 @@ static const struct file_operations atomic_ro_fops = {
+
+
+ int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
+- char const *name, atomic_t *val)
++ char const *name, atomic_unchecked_t *val)
+ {
+ struct dentry *d = __oprofilefs_create_file(sb, root, name,
+ &atomic_ro_fops, 0444);
+diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
+index 13a64bc..ad62835 100644
+--- a/drivers/parisc/pdc_stable.c
++++ b/drivers/parisc/pdc_stable.c
+@@ -481,7 +481,7 @@ pdcspath_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -37916,10 +39625,11 @@ diff -urNp linux-2.6.32.49/drivers/parisc/pdc_stable.c linux-2.6.32.49/drivers/p
.show = pdcspath_attr_show,
.store = pdcspath_attr_store,
};
-diff -urNp linux-2.6.32.49/drivers/parport/procfs.c linux-2.6.32.49/drivers/parport/procfs.c
---- linux-2.6.32.49/drivers/parport/procfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/parport/procfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *t
+diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
+index 8eefe56..40751a7 100644
+--- a/drivers/parport/procfs.c
++++ b/drivers/parport/procfs.c
+@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *table, int write,
*ppos += len;
@@ -37928,7 +39638,7 @@ diff -urNp linux-2.6.32.49/drivers/parport/procfs.c linux-2.6.32.49/drivers/parp
}
#ifdef CONFIG_PARPORT_1284
-@@ -106,7 +106,7 @@ static int do_autoprobe(ctl_table *table
+@@ -106,7 +106,7 @@ static int do_autoprobe(ctl_table *table, int write,
*ppos += len;
@@ -37937,10 +39647,11 @@ diff -urNp linux-2.6.32.49/drivers/parport/procfs.c linux-2.6.32.49/drivers/parp
}
#endif /* IEEE1284.3 support. */
-diff -urNp linux-2.6.32.49/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.32.49/drivers/pci/hotplug/acpiphp_glue.c
---- linux-2.6.32.49/drivers/pci/hotplug/acpiphp_glue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/hotplug/acpiphp_glue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -111,7 +111,7 @@ static int post_dock_fixups(struct notif
+diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
+index 73e7d8e..c80f3d2 100644
+--- a/drivers/pci/hotplug/acpiphp_glue.c
++++ b/drivers/pci/hotplug/acpiphp_glue.c
+@@ -111,7 +111,7 @@ static int post_dock_fixups(struct notifier_block *nb, unsigned long val,
}
@@ -37949,9 +39660,10 @@ diff -urNp linux-2.6.32.49/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.32.49/dr
.handler = handle_hotplug_event_func,
};
-diff -urNp linux-2.6.32.49/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.32.49/drivers/pci/hotplug/cpci_hotplug.h
---- linux-2.6.32.49/drivers/pci/hotplug/cpci_hotplug.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/hotplug/cpci_hotplug.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/pci/hotplug/cpci_hotplug.h b/drivers/pci/hotplug/cpci_hotplug.h
+index 9fff878..ad0ad53 100644
+--- a/drivers/pci/hotplug/cpci_hotplug.h
++++ b/drivers/pci/hotplug/cpci_hotplug.h
@@ -59,7 +59,7 @@ struct cpci_hp_controller_ops {
int (*hardware_test) (struct slot* slot, u32 value);
u8 (*get_power) (struct slot* slot);
@@ -37961,10 +39673,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.32.49/dr
struct cpci_hp_controller {
unsigned int irq;
-diff -urNp linux-2.6.32.49/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.32.49/drivers/pci/hotplug/cpqphp_nvram.c
---- linux-2.6.32.49/drivers/pci/hotplug/cpqphp_nvram.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/hotplug/cpqphp_nvram.c 2011-11-15 19:59:43.000000000 -0500
-@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_
+diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
+index 76ba8a1..20ca857 100644
+--- a/drivers/pci/hotplug/cpqphp_nvram.c
++++ b/drivers/pci/hotplug/cpqphp_nvram.c
+@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_start)
void compaq_nvram_init (void __iomem *rom_start)
{
@@ -37978,10 +39691,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.32.49/dr
dbg("int15 entry = %p\n", compaq_int15_entry_point);
/* initialize our int15 lock */
-diff -urNp linux-2.6.32.49/drivers/pci/hotplug/fakephp.c linux-2.6.32.49/drivers/pci/hotplug/fakephp.c
---- linux-2.6.32.49/drivers/pci/hotplug/fakephp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/hotplug/fakephp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -73,7 +73,7 @@ static void legacy_release(struct kobjec
+diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
+index 6151389..0a894ef 100644
+--- a/drivers/pci/hotplug/fakephp.c
++++ b/drivers/pci/hotplug/fakephp.c
+@@ -73,7 +73,7 @@ static void legacy_release(struct kobject *kobj)
}
static struct kobj_type legacy_ktype = {
@@ -37990,9 +39704,10 @@ diff -urNp linux-2.6.32.49/drivers/pci/hotplug/fakephp.c linux-2.6.32.49/drivers
.store = legacy_store, .show = legacy_show
},
.release = &legacy_release,
-diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci/intel-iommu.c
---- linux-2.6.32.49/drivers/pci/intel-iommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/intel-iommu.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
+index 5b680df..fe05b7e 100644
+--- a/drivers/pci/intel-iommu.c
++++ b/drivers/pci/intel-iommu.c
@@ -2643,7 +2643,7 @@ error:
return 0;
}
@@ -38002,7 +39717,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
unsigned long offset, size_t size,
enum dma_data_direction dir,
struct dma_attrs *attrs)
-@@ -2719,7 +2719,7 @@ static void add_unmap(struct dmar_domain
+@@ -2719,7 +2719,7 @@ static void add_unmap(struct dmar_domain *dom, struct iova *iova)
spin_unlock_irqrestore(&async_umap_flush_lock, flags);
}
@@ -38011,7 +39726,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
-@@ -2768,7 +2768,7 @@ static void intel_unmap_page(struct devi
+@@ -2768,7 +2768,7 @@ static void intel_unmap_page(struct device *dev, dma_addr_t dev_addr,
}
}
@@ -38020,7 +39735,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
dma_addr_t *dma_handle, gfp_t flags)
{
void *vaddr;
-@@ -2800,7 +2800,7 @@ static void *intel_alloc_coherent(struct
+@@ -2800,7 +2800,7 @@ static void *intel_alloc_coherent(struct device *hwdev, size_t size,
return NULL;
}
@@ -38029,7 +39744,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
dma_addr_t dma_handle)
{
int order;
-@@ -2812,7 +2812,7 @@ static void intel_free_coherent(struct d
+@@ -2812,7 +2812,7 @@ static void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr,
free_pages((unsigned long)vaddr, order);
}
@@ -38038,7 +39753,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
int nelems, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
-@@ -2872,7 +2872,7 @@ static int intel_nontranslate_map_sg(str
+@@ -2872,7 +2872,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
return nelems;
}
@@ -38047,7 +39762,7 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
enum dma_data_direction dir, struct dma_attrs *attrs)
{
int i;
-@@ -2941,12 +2941,12 @@ static int intel_map_sg(struct device *h
+@@ -2941,12 +2941,12 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
return nelems;
}
@@ -38062,9 +39777,10 @@ diff -urNp linux-2.6.32.49/drivers/pci/intel-iommu.c linux-2.6.32.49/drivers/pci
.alloc_coherent = intel_alloc_coherent,
.free_coherent = intel_free_coherent,
.map_sg = intel_map_sg,
-diff -urNp linux-2.6.32.49/drivers/pci/pcie/aspm.c linux-2.6.32.49/drivers/pci/pcie/aspm.c
---- linux-2.6.32.49/drivers/pci/pcie/aspm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/pcie/aspm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
+index 5b7056c..607bc94 100644
+--- a/drivers/pci/pcie/aspm.c
++++ b/drivers/pci/pcie/aspm.c
@@ -27,9 +27,9 @@
#define MODULE_PARAM_PREFIX "pcie_aspm."
@@ -38078,10 +39794,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/pcie/aspm.c linux-2.6.32.49/drivers/pci/p
#define ASPM_STATE_L0S (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
#define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1)
-diff -urNp linux-2.6.32.49/drivers/pci/probe.c linux-2.6.32.49/drivers/pci/probe.c
---- linux-2.6.32.49/drivers/pci/probe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/probe.c 2011-11-15 19:59:43.000000000 -0500
-@@ -62,14 +62,14 @@ static ssize_t pci_bus_show_cpuaffinity(
+diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
+index 8105e32..ca10419 100644
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -62,14 +62,14 @@ static ssize_t pci_bus_show_cpuaffinity(struct device *dev,
return ret;
}
@@ -38098,10 +39815,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/probe.c linux-2.6.32.49/drivers/pci/probe
struct device_attribute *attr,
char *buf)
{
-diff -urNp linux-2.6.32.49/drivers/pci/proc.c linux-2.6.32.49/drivers/pci/proc.c
---- linux-2.6.32.49/drivers/pci/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -480,7 +480,16 @@ static const struct file_operations proc
+diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
+index a03ad8c..024b0da 100644
+--- a/drivers/pci/proc.c
++++ b/drivers/pci/proc.c
+@@ -480,7 +480,16 @@ static const struct file_operations proc_bus_pci_dev_operations = {
static int __init pci_proc_init(void)
{
struct pci_dev *dev = NULL;
@@ -38118,10 +39836,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/proc.c linux-2.6.32.49/drivers/pci/proc.c
proc_create("devices", 0, proc_bus_pci_dir,
&proc_bus_pci_dev_operations);
proc_initialized = 1;
-diff -urNp linux-2.6.32.49/drivers/pci/slot.c linux-2.6.32.49/drivers/pci/slot.c
---- linux-2.6.32.49/drivers/pci/slot.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pci/slot.c 2011-11-15 19:59:43.000000000 -0500
-@@ -29,7 +29,7 @@ static ssize_t pci_slot_attr_store(struc
+diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
+index 8c02b6c..5584d8e 100644
+--- a/drivers/pci/slot.c
++++ b/drivers/pci/slot.c
+@@ -29,7 +29,7 @@ static ssize_t pci_slot_attr_store(struct kobject *kobj,
return attribute->store ? attribute->store(slot, buf, len) : -EIO;
}
@@ -38130,10 +39849,11 @@ diff -urNp linux-2.6.32.49/drivers/pci/slot.c linux-2.6.32.49/drivers/pci/slot.c
.show = pci_slot_attr_show,
.store = pci_slot_attr_store,
};
-diff -urNp linux-2.6.32.49/drivers/pcmcia/pcmcia_ioctl.c linux-2.6.32.49/drivers/pcmcia/pcmcia_ioctl.c
---- linux-2.6.32.49/drivers/pcmcia/pcmcia_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pcmcia/pcmcia_ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -819,7 +819,7 @@ static int ds_ioctl(struct inode * inode
+diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
+index 30cf71d2..50938f1 100644
+--- a/drivers/pcmcia/pcmcia_ioctl.c
++++ b/drivers/pcmcia/pcmcia_ioctl.c
+@@ -819,7 +819,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
return -EFAULT;
}
}
@@ -38142,10 +39862,11 @@ diff -urNp linux-2.6.32.49/drivers/pcmcia/pcmcia_ioctl.c linux-2.6.32.49/drivers
if (!buf)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/drivers/platform/x86/acer-wmi.c linux-2.6.32.49/drivers/platform/x86/acer-wmi.c
---- linux-2.6.32.49/drivers/platform/x86/acer-wmi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/acer-wmi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -918,7 +918,7 @@ static int update_bl_status(struct backl
+diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
+index 52183c4..b224c69 100644
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -918,7 +918,7 @@ static int update_bl_status(struct backlight_device *bd)
return 0;
}
@@ -38154,22 +39875,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/acer-wmi.c linux-2.6.32.49/drive
.get_brightness = read_brightness,
.update_status = update_bl_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/asus_acpi.c linux-2.6.32.49/drivers/platform/x86/asus_acpi.c
---- linux-2.6.32.49/drivers/platform/x86/asus_acpi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/asus_acpi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1396,7 +1396,7 @@ static int asus_hotk_remove(struct acpi_
- return 0;
- }
-
--static struct backlight_ops asus_backlight_data = {
-+static const struct backlight_ops asus_backlight_data = {
- .get_brightness = read_brightness,
- .update_status = set_brightness_status,
- };
-diff -urNp linux-2.6.32.49/drivers/platform/x86/asus-laptop.c linux-2.6.32.49/drivers/platform/x86/asus-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/asus-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/asus-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -250,7 +250,7 @@ static struct backlight_device *asus_bac
+diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
+index 767cb61..a87380b 100644
+--- a/drivers/platform/x86/asus-laptop.c
++++ b/drivers/platform/x86/asus-laptop.c
+@@ -250,7 +250,7 @@ static struct backlight_device *asus_backlight_device;
*/
static int read_brightness(struct backlight_device *bd);
static int update_bl_status(struct backlight_device *bd);
@@ -38178,10 +39888,24 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/asus-laptop.c linux-2.6.32.49/dr
.get_brightness = read_brightness,
.update_status = update_bl_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/compal-laptop.c linux-2.6.32.49/drivers/platform/x86/compal-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/compal-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/compal-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -163,7 +163,7 @@ static int bl_update_status(struct backl
+diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c
+index d66c07a..a4abaac 100644
+--- a/drivers/platform/x86/asus_acpi.c
++++ b/drivers/platform/x86/asus_acpi.c
+@@ -1396,7 +1396,7 @@ static int asus_hotk_remove(struct acpi_device *device, int type)
+ return 0;
+ }
+
+-static struct backlight_ops asus_backlight_data = {
++static const struct backlight_ops asus_backlight_data = {
+ .get_brightness = read_brightness,
+ .update_status = set_brightness_status,
+ };
+diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
+index 11003bb..550ff1b 100644
+--- a/drivers/platform/x86/compal-laptop.c
++++ b/drivers/platform/x86/compal-laptop.c
+@@ -163,7 +163,7 @@ static int bl_update_status(struct backlight_device *b)
return set_lcd_level(b->props.brightness);
}
@@ -38190,10 +39914,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/compal-laptop.c linux-2.6.32.49/
.get_brightness = bl_get_brightness,
.update_status = bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/dell-laptop.c linux-2.6.32.49/drivers/platform/x86/dell-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/dell-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/dell-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -318,7 +318,7 @@ static int dell_get_intensity(struct bac
+diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
+index 07a74da..9dc99fa 100644
+--- a/drivers/platform/x86/dell-laptop.c
++++ b/drivers/platform/x86/dell-laptop.c
+@@ -318,7 +318,7 @@ static int dell_get_intensity(struct backlight_device *bd)
return buffer.output[1];
}
@@ -38202,10 +39927,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/dell-laptop.c linux-2.6.32.49/dr
.get_brightness = dell_get_intensity,
.update_status = dell_send_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/eeepc-laptop.c linux-2.6.32.49/drivers/platform/x86/eeepc-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/eeepc-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/eeepc-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -245,7 +245,7 @@ static struct device *eeepc_hwmon_device
+diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
+index c533b1c..5c81f22 100644
+--- a/drivers/platform/x86/eeepc-laptop.c
++++ b/drivers/platform/x86/eeepc-laptop.c
+@@ -245,7 +245,7 @@ static struct device *eeepc_hwmon_device;
*/
static int read_brightness(struct backlight_device *bd);
static int update_bl_status(struct backlight_device *bd);
@@ -38214,10 +39940,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/eeepc-laptop.c linux-2.6.32.49/d
.get_brightness = read_brightness,
.update_status = update_bl_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/fujitsu-laptop.c linux-2.6.32.49/drivers/platform/x86/fujitsu-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/fujitsu-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/fujitsu-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -436,7 +436,7 @@ static int bl_update_status(struct backl
+diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
+index bcd4ba8..a249b35 100644
+--- a/drivers/platform/x86/fujitsu-laptop.c
++++ b/drivers/platform/x86/fujitsu-laptop.c
+@@ -436,7 +436,7 @@ static int bl_update_status(struct backlight_device *b)
return ret;
}
@@ -38226,10 +39953,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/fujitsu-laptop.c linux-2.6.32.49
.get_brightness = bl_get_brightness,
.update_status = bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/msi-laptop.c linux-2.6.32.49/drivers/platform/x86/msi-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/msi-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/msi-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -161,7 +161,7 @@ static int bl_update_status(struct backl
+diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
+index 759763d..1093ba2 100644
+--- a/drivers/platform/x86/msi-laptop.c
++++ b/drivers/platform/x86/msi-laptop.c
+@@ -161,7 +161,7 @@ static int bl_update_status(struct backlight_device *b)
return set_lcd_level(b->props.brightness);
}
@@ -38238,10 +39966,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/msi-laptop.c linux-2.6.32.49/dri
.get_brightness = bl_get_brightness,
.update_status = bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/panasonic-laptop.c linux-2.6.32.49/drivers/platform/x86/panasonic-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/panasonic-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/panasonic-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -352,7 +352,7 @@ static int bl_set_status(struct backligh
+diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
+index fe7cf01..9012d8d 100644
+--- a/drivers/platform/x86/panasonic-laptop.c
++++ b/drivers/platform/x86/panasonic-laptop.c
+@@ -352,7 +352,7 @@ static int bl_set_status(struct backlight_device *bd)
return acpi_pcc_write_sset(pcc, SINF_DC_CUR_BRIGHT, bright);
}
@@ -38250,10 +39979,11 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/panasonic-laptop.c linux-2.6.32.
.get_brightness = bl_get,
.update_status = bl_set_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/sony-laptop.c linux-2.6.32.49/drivers/platform/x86/sony-laptop.c
---- linux-2.6.32.49/drivers/platform/x86/sony-laptop.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/sony-laptop.c 2011-11-15 19:59:43.000000000 -0500
-@@ -850,7 +850,7 @@ static int sony_backlight_get_brightness
+diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
+index a2a742c..b37e25e 100644
+--- a/drivers/platform/x86/sony-laptop.c
++++ b/drivers/platform/x86/sony-laptop.c
+@@ -850,7 +850,7 @@ static int sony_backlight_get_brightness(struct backlight_device *bd)
}
static struct backlight_device *sony_backlight_device;
@@ -38262,9 +39992,10 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/sony-laptop.c linux-2.6.32.49/dr
.update_status = sony_backlight_update_status,
.get_brightness = sony_backlight_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c
---- linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
+index 68271ae..5e8fb10 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2139,7 +2139,7 @@ static int hotkey_mask_get(void)
return 0;
}
@@ -38274,7 +40005,7 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c linux-2.6.32.49/
{
/* log only what the user can fix... */
const u32 wantedmask = hotkey_driver_mask &
-@@ -6125,7 +6125,7 @@ static void tpacpi_brightness_notify_cha
+@@ -6125,7 +6125,7 @@ static void tpacpi_brightness_notify_change(void)
BACKLIGHT_UPDATE_HOTKEY);
}
@@ -38283,9 +40014,10 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/thinkpad_acpi.c linux-2.6.32.49/
.get_brightness = brightness_get,
.update_status = brightness_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/platform/x86/toshiba_acpi.c linux-2.6.32.49/drivers/platform/x86/toshiba_acpi.c
---- linux-2.6.32.49/drivers/platform/x86/toshiba_acpi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/platform/x86/toshiba_acpi.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
+index 51c0a8b..0786629 100644
+--- a/drivers/platform/x86/toshiba_acpi.c
++++ b/drivers/platform/x86/toshiba_acpi.c
@@ -671,7 +671,7 @@ static acpi_status remove_device(void)
return AE_OK;
}
@@ -38295,9 +40027,10 @@ diff -urNp linux-2.6.32.49/drivers/platform/x86/toshiba_acpi.c linux-2.6.32.49/d
.get_brightness = get_lcd,
.update_status = set_lcd_status,
};
-diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c
---- linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
+index fc83783c..cf370d7 100644
+--- a/drivers/pnp/pnpbios/bioscalls.c
++++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -60,7 +60,7 @@ do { \
set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \
} while(0)
@@ -38307,7 +40040,7 @@ diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drive
(unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1);
/*
-@@ -97,7 +97,10 @@ static inline u16 call_pnp_bios(u16 func
+@@ -97,7 +97,10 @@ static inline u16 call_pnp_bios(u16 func, u16 arg1, u16 arg2, u16 arg3,
cpu = get_cpu();
save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8];
@@ -38318,7 +40051,7 @@ diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drive
/* On some boxes IRQ's during PnP BIOS calls are deadly. */
spin_lock_irqsave(&pnp_bios_lock, flags);
-@@ -135,7 +138,10 @@ static inline u16 call_pnp_bios(u16 func
+@@ -135,7 +138,10 @@ static inline u16 call_pnp_bios(u16 func, u16 arg1, u16 arg2, u16 arg3,
:"memory");
spin_unlock_irqrestore(&pnp_bios_lock, flags);
@@ -38329,7 +40062,7 @@ diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drive
put_cpu();
/* If we get here and this is set then the PnP BIOS faulted on us. */
-@@ -469,7 +475,7 @@ int pnp_bios_read_escd(char *data, u32 n
+@@ -469,7 +475,7 @@ int pnp_bios_read_escd(char *data, u32 nvram_base)
return status;
}
@@ -38338,7 +40071,7 @@ diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drive
{
int i;
-@@ -477,6 +483,8 @@ void pnpbios_calls_init(union pnp_bios_i
+@@ -477,6 +483,8 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
pnp_bios_callpoint.offset = header->fields.pm16offset;
pnp_bios_callpoint.segment = PNP_CS16;
@@ -38347,17 +40080,18 @@ diff -urNp linux-2.6.32.49/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.49/drive
for_each_possible_cpu(i) {
struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt)
-@@ -488,4 +496,6 @@ void pnpbios_calls_init(union pnp_bios_i
+@@ -488,4 +496,6 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS],
(unsigned long)__va(header->fields.pm16dseg));
}
+
+ pax_close_kernel();
}
-diff -urNp linux-2.6.32.49/drivers/pnp/resource.c linux-2.6.32.49/drivers/pnp/resource.c
---- linux-2.6.32.49/drivers/pnp/resource.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/pnp/resource.c 2011-11-15 19:59:43.000000000 -0500
-@@ -355,7 +355,7 @@ int pnp_check_irq(struct pnp_dev *dev, s
+diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
+index ba97654..66b99d4 100644
+--- a/drivers/pnp/resource.c
++++ b/drivers/pnp/resource.c
+@@ -355,7 +355,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
return 1;
/* check if the resource is valid */
@@ -38366,7 +40100,7 @@ diff -urNp linux-2.6.32.49/drivers/pnp/resource.c linux-2.6.32.49/drivers/pnp/re
return 0;
/* check if the resource is reserved */
-@@ -419,7 +419,7 @@ int pnp_check_dma(struct pnp_dev *dev, s
+@@ -419,7 +419,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
return 1;
/* check if the resource is valid */
@@ -38375,9 +40109,10 @@ diff -urNp linux-2.6.32.49/drivers/pnp/resource.c linux-2.6.32.49/drivers/pnp/re
return 0;
/* check if the resource is reserved */
-diff -urNp linux-2.6.32.49/drivers/power/bq27x00_battery.c linux-2.6.32.49/drivers/power/bq27x00_battery.c
---- linux-2.6.32.49/drivers/power/bq27x00_battery.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/power/bq27x00_battery.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
+index 62bb981..24a2dc9 100644
+--- a/drivers/power/bq27x00_battery.c
++++ b/drivers/power/bq27x00_battery.c
@@ -44,7 +44,7 @@ struct bq27x00_device_info;
struct bq27x00_access_methods {
int (*read)(u8 reg, int *rt_value, int b_single,
@@ -38387,9 +40122,10 @@ diff -urNp linux-2.6.32.49/drivers/power/bq27x00_battery.c linux-2.6.32.49/drive
struct bq27x00_device_info {
struct device *dev;
-diff -urNp linux-2.6.32.49/drivers/rtc/rtc-dev.c linux-2.6.32.49/drivers/rtc/rtc-dev.c
---- linux-2.6.32.49/drivers/rtc/rtc-dev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/rtc/rtc-dev.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
+index 62227cd..b5b538b 100644
+--- a/drivers/rtc/rtc-dev.c
++++ b/drivers/rtc/rtc-dev.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/rtc.h>
@@ -38398,7 +40134,7 @@ diff -urNp linux-2.6.32.49/drivers/rtc/rtc-dev.c linux-2.6.32.49/drivers/rtc/rtc
#include "rtc-core.h"
static dev_t rtc_devt;
-@@ -357,6 +358,8 @@ static long rtc_dev_ioctl(struct file *f
+@@ -357,6 +358,8 @@ static long rtc_dev_ioctl(struct file *file,
if (copy_from_user(&tm, uarg, sizeof(tm)))
return -EFAULT;
@@ -38407,10 +40143,11 @@ diff -urNp linux-2.6.32.49/drivers/rtc/rtc-dev.c linux-2.6.32.49/drivers/rtc/rtc
return rtc_set_time(rtc, &tm);
case RTC_PIE_ON:
-diff -urNp linux-2.6.32.49/drivers/s390/cio/qdio_perf.c linux-2.6.32.49/drivers/s390/cio/qdio_perf.c
---- linux-2.6.32.49/drivers/s390/cio/qdio_perf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/s390/cio/qdio_perf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -31,51 +31,51 @@ static struct proc_dir_entry *qdio_perf_
+diff --git a/drivers/s390/cio/qdio_perf.c b/drivers/s390/cio/qdio_perf.c
+index 968e3c7..fbc637a 100644
+--- a/drivers/s390/cio/qdio_perf.c
++++ b/drivers/s390/cio/qdio_perf.c
+@@ -31,51 +31,51 @@ static struct proc_dir_entry *qdio_perf_pde;
static int qdio_perf_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "Number of qdio interrupts\t\t\t: %li\n",
@@ -38485,9 +40222,10 @@ diff -urNp linux-2.6.32.49/drivers/s390/cio/qdio_perf.c linux-2.6.32.49/drivers/
seq_printf(m, "\n");
return 0;
}
-diff -urNp linux-2.6.32.49/drivers/s390/cio/qdio_perf.h linux-2.6.32.49/drivers/s390/cio/qdio_perf.h
---- linux-2.6.32.49/drivers/s390/cio/qdio_perf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/s390/cio/qdio_perf.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/s390/cio/qdio_perf.h b/drivers/s390/cio/qdio_perf.h
+index ff4504c..b3604c3 100644
+--- a/drivers/s390/cio/qdio_perf.h
++++ b/drivers/s390/cio/qdio_perf.h
@@ -13,46 +13,46 @@
struct qdio_perf_stats {
@@ -38560,9 +40298,23 @@ diff -urNp linux-2.6.32.49/drivers/s390/cio/qdio_perf.h linux-2.6.32.49/drivers/
}
int qdio_setup_perf_stats(void);
-diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/aacraid.h linux-2.6.32.49/drivers/scsi/aacraid/aacraid.h
---- linux-2.6.32.49/drivers/scsi/aacraid/aacraid.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/aacraid/aacraid.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
+index 1ddcf40..a85f062 100644
+--- a/drivers/scsi/BusLogic.c
++++ b/drivers/scsi/BusLogic.c
+@@ -961,6 +961,8 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
+ static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter
+ *PrototypeHostAdapter)
+ {
++ pax_track_stack();
++
+ /*
+ If a PCI BIOS is present, interrogate it for MultiMaster and FlashPoint
+ Host Adapters; otherwise, default to the standard ISA MultiMaster probe.
+diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
+index cdbdec9..b7d560b 100644
+--- a/drivers/scsi/aacraid/aacraid.h
++++ b/drivers/scsi/aacraid/aacraid.h
@@ -471,7 +471,7 @@ struct adapter_ops
int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd);
/* Administrative operations */
@@ -38572,10 +40324,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/aacraid.h linux-2.6.32.49/driver
/*
* Define which interrupt handler needs to be installed
-diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/commctrl.c linux-2.6.32.49/drivers/scsi/aacraid/commctrl.c
---- linux-2.6.32.49/drivers/scsi/aacraid/commctrl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/aacraid/commctrl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -481,6 +481,7 @@ static int aac_send_raw_srb(struct aac_d
+diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
+index a5b8e7b..a6a0e43 100644
+--- a/drivers/scsi/aacraid/commctrl.c
++++ b/drivers/scsi/aacraid/commctrl.c
+@@ -481,6 +481,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
u32 actual_fibsize64, actual_fibsize = 0;
int i;
@@ -38583,10 +40336,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/commctrl.c linux-2.6.32.49/drive
if (dev->in_reset) {
dprintk((KERN_DEBUG"aacraid: send raw srb -EBUSY\n"));
-diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/linit.c linux-2.6.32.49/drivers/scsi/aacraid/linit.c
---- linux-2.6.32.49/drivers/scsi/aacraid/linit.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/aacraid/linit.c 2011-11-18 18:01:55.000000000 -0500
-@@ -91,7 +91,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_
+diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
+index 9b97c3e..f099725 100644
+--- a/drivers/scsi/aacraid/linit.c
++++ b/drivers/scsi/aacraid/linit.c
+@@ -91,7 +91,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_tbl) = {
#elif defined(__devinitconst)
static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
#else
@@ -38595,10 +40349,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/aacraid/linit.c linux-2.6.32.49/drivers/
#endif
{ 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */
{ 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */
-diff -urNp linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c
---- linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-18 18:01:55.000000000 -0500
-@@ -485,7 +485,7 @@ static ssize_t asd_show_update_bios(stru
+diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
+index 996f722..9127845 100644
+--- a/drivers/scsi/aic94xx/aic94xx_init.c
++++ b/drivers/scsi/aic94xx/aic94xx_init.c
+@@ -485,7 +485,7 @@ static ssize_t asd_show_update_bios(struct device *dev,
flash_error_table[i].reason);
}
@@ -38607,7 +40362,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.32.49/d
asd_show_update_bios, asd_store_update_bios);
static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
-@@ -1011,7 +1011,7 @@ static struct sas_domain_function_templa
+@@ -1011,7 +1011,7 @@ static struct sas_domain_function_template aic94xx_transport_functions = {
.lldd_control_phy = asd_control_phy,
};
@@ -38616,21 +40371,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.32.49/d
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1},
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1},
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1},
-diff -urNp linux-2.6.32.49/drivers/scsi/bfa/bfa_iocfc.h linux-2.6.32.49/drivers/scsi/bfa/bfa_iocfc.h
---- linux-2.6.32.49/drivers/scsi/bfa/bfa_iocfc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/bfa/bfa_iocfc.h 2011-11-15 19:59:43.000000000 -0500
-@@ -61,7 +61,7 @@ struct bfa_hwif_s {
- void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix);
- void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap,
- u32 *nvecs, u32 *maxvec);
--};
-+} __no_const;
- typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
-
- struct bfa_iocfc_s {
-diff -urNp linux-2.6.32.49/drivers/scsi/bfa/bfa_ioc.h linux-2.6.32.49/drivers/scsi/bfa/bfa_ioc.h
---- linux-2.6.32.49/drivers/scsi/bfa/bfa_ioc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/bfa/bfa_ioc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h
+index 58efd4b..cb48dc7 100644
+--- a/drivers/scsi/bfa/bfa_ioc.h
++++ b/drivers/scsi/bfa/bfa_ioc.h
@@ -127,7 +127,7 @@ struct bfa_ioc_cbfn_s {
bfa_ioc_disable_cbfn_t disable_cbfn;
bfa_ioc_hbfail_cbfn_t hbfail_cbfn;
@@ -38640,22 +40384,24 @@ diff -urNp linux-2.6.32.49/drivers/scsi/bfa/bfa_ioc.h linux-2.6.32.49/drivers/sc
/**
* Heartbeat failure notification queue element.
-diff -urNp linux-2.6.32.49/drivers/scsi/BusLogic.c linux-2.6.32.49/drivers/scsi/BusLogic.c
---- linux-2.6.32.49/drivers/scsi/BusLogic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/BusLogic.c 2011-11-15 19:59:43.000000000 -0500
-@@ -961,6 +961,8 @@ static int __init BusLogic_InitializeFla
- static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter
- *PrototypeHostAdapter)
- {
-+ pax_track_stack();
-+
- /*
- If a PCI BIOS is present, interrogate it for MultiMaster and FlashPoint
- Host Adapters; otherwise, default to the standard ISA MultiMaster probe.
-diff -urNp linux-2.6.32.49/drivers/scsi/dpt_i2o.c linux-2.6.32.49/drivers/scsi/dpt_i2o.c
---- linux-2.6.32.49/drivers/scsi/dpt_i2o.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/dpt_i2o.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1804,6 +1804,8 @@ static int adpt_i2o_passthru(adpt_hba* p
+diff --git a/drivers/scsi/bfa/bfa_iocfc.h b/drivers/scsi/bfa/bfa_iocfc.h
+index 7ad177e..5503586 100644
+--- a/drivers/scsi/bfa/bfa_iocfc.h
++++ b/drivers/scsi/bfa/bfa_iocfc.h
+@@ -61,7 +61,7 @@ struct bfa_hwif_s {
+ void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix);
+ void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap,
+ u32 *nvecs, u32 *maxvec);
+-};
++} __no_const;
+ typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
+
+ struct bfa_iocfc_s {
+diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
+index 4967643..cbec06b 100644
+--- a/drivers/scsi/dpt_i2o.c
++++ b/drivers/scsi/dpt_i2o.c
+@@ -1804,6 +1804,8 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
dma_addr_t addr;
ulong flags = 0;
@@ -38664,7 +40410,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/dpt_i2o.c linux-2.6.32.49/drivers/scsi/d
memset(&msg, 0, MAX_MESSAGE_SIZE*4);
// get user msg size in u32s
if(get_user(size, &user_msg[0])){
-@@ -2297,6 +2299,8 @@ static s32 adpt_scsi_to_i2o(adpt_hba* pH
+@@ -2297,6 +2299,8 @@ static s32 adpt_scsi_to_i2o(adpt_hba* pHba, struct scsi_cmnd* cmd, struct adpt_d
s32 rcode;
dma_addr_t addr;
@@ -38673,10 +40419,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/dpt_i2o.c linux-2.6.32.49/drivers/scsi/d
memset(msg, 0 , sizeof(msg));
len = scsi_bufflen(cmd);
direction = 0x00000000;
-diff -urNp linux-2.6.32.49/drivers/scsi/eata.c linux-2.6.32.49/drivers/scsi/eata.c
---- linux-2.6.32.49/drivers/scsi/eata.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/eata.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1087,6 +1087,8 @@ static int port_detect(unsigned long por
+diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
+index c7076ce..e20c67c 100644
+--- a/drivers/scsi/eata.c
++++ b/drivers/scsi/eata.c
+@@ -1087,6 +1087,8 @@ static int port_detect(unsigned long port_base, unsigned int j,
struct hostdata *ha;
char name[16];
@@ -38685,10 +40432,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/eata.c linux-2.6.32.49/drivers/scsi/eata
sprintf(name, "%s%d", driver_name, j);
if (!request_region(port_base, REGION_SIZE, driver_name)) {
-diff -urNp linux-2.6.32.49/drivers/scsi/fcoe/libfcoe.c linux-2.6.32.49/drivers/scsi/fcoe/libfcoe.c
---- linux-2.6.32.49/drivers/scsi/fcoe/libfcoe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/fcoe/libfcoe.c 2011-11-15 19:59:43.000000000 -0500
-@@ -809,6 +809,8 @@ static void fcoe_ctlr_recv_els(struct fc
+diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
+index 11ae5c9..891daec 100644
+--- a/drivers/scsi/fcoe/libfcoe.c
++++ b/drivers/scsi/fcoe/libfcoe.c
+@@ -809,6 +809,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)
size_t rlen;
size_t dlen;
@@ -38697,10 +40445,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/fcoe/libfcoe.c linux-2.6.32.49/drivers/s
fiph = (struct fip_header *)skb->data;
sub = fiph->fip_subcode;
if (sub != FIP_SC_REQ && sub != FIP_SC_REP)
-diff -urNp linux-2.6.32.49/drivers/scsi/fnic/fnic_main.c linux-2.6.32.49/drivers/scsi/fnic/fnic_main.c
---- linux-2.6.32.49/drivers/scsi/fnic/fnic_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/fnic/fnic_main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -669,7 +669,7 @@ static int __devinit fnic_probe(struct p
+diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
+index 71c7bbe..e93088a 100644
+--- a/drivers/scsi/fnic/fnic_main.c
++++ b/drivers/scsi/fnic/fnic_main.c
+@@ -669,7 +669,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
/* Start local port initiatialization */
lp->link_up = 0;
@@ -38709,9 +40458,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/fnic/fnic_main.c linux-2.6.32.49/drivers
lp->max_retry_count = fnic->config.flogi_retries;
lp->max_rport_retry_count = fnic->config.plogi_retries;
-diff -urNp linux-2.6.32.49/drivers/scsi/gdth.c linux-2.6.32.49/drivers/scsi/gdth.c
---- linux-2.6.32.49/drivers/scsi/gdth.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/gdth.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
+index bb96d74..9ec3ce4 100644
+--- a/drivers/scsi/gdth.c
++++ b/drivers/scsi/gdth.c
@@ -4102,6 +4102,8 @@ static int ioc_lockdrv(void __user *arg)
ulong flags;
gdth_ha_str *ha;
@@ -38721,7 +40471,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/gdth.c linux-2.6.32.49/drivers/scsi/gdth
if (copy_from_user(&ldrv, arg, sizeof(gdth_ioctl_lockdrv)))
return -EFAULT;
ha = gdth_find_ha(ldrv.ionode);
-@@ -4134,6 +4136,8 @@ static int ioc_resetdrv(void __user *arg
+@@ -4134,6 +4136,8 @@ static int ioc_resetdrv(void __user *arg, char *cmnd)
gdth_ha_str *ha;
int rval;
@@ -38730,7 +40480,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/gdth.c linux-2.6.32.49/drivers/scsi/gdth
if (copy_from_user(&res, arg, sizeof(gdth_ioctl_reset)) ||
res.number >= MAX_HDRIVES)
return -EFAULT;
-@@ -4169,6 +4173,8 @@ static int ioc_general(void __user *arg,
+@@ -4169,6 +4173,8 @@ static int ioc_general(void __user *arg, char *cmnd)
gdth_ha_str *ha;
int rval;
@@ -38749,10 +40499,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/gdth.c linux-2.6.32.49/drivers/scsi/gdth
memset(cmnd, 0xff, MAX_COMMAND_SIZE);
TRACE2(("gdth_flush() hanum %d\n", ha->hanum));
-diff -urNp linux-2.6.32.49/drivers/scsi/gdth_proc.c linux-2.6.32.49/drivers/scsi/gdth_proc.c
---- linux-2.6.32.49/drivers/scsi/gdth_proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/gdth_proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -46,6 +46,9 @@ static int gdth_set_asc_info(struct Scsi
+diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
+index 1258da3..20d8ae6 100644
+--- a/drivers/scsi/gdth_proc.c
++++ b/drivers/scsi/gdth_proc.c
+@@ -46,6 +46,9 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer,
ulong64 paddr;
char cmnd[MAX_COMMAND_SIZE];
@@ -38762,7 +40513,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/gdth_proc.c linux-2.6.32.49/drivers/scsi
memset(cmnd, 0xff, 12);
memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
-@@ -174,6 +177,8 @@ static int gdth_get_info(char *buffer,ch
+@@ -174,6 +177,8 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
gdth_hget_str *phg;
char cmnd[MAX_COMMAND_SIZE];
@@ -38771,9 +40522,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/gdth_proc.c linux-2.6.32.49/drivers/scsi
gdtcmd = kmalloc(sizeof(*gdtcmd), GFP_KERNEL);
estr = kmalloc(sizeof(*estr), GFP_KERNEL);
if (!gdtcmd || !estr)
-diff -urNp linux-2.6.32.49/drivers/scsi/hosts.c linux-2.6.32.49/drivers/scsi/hosts.c
---- linux-2.6.32.49/drivers/scsi/hosts.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/hosts.c 2011-11-26 19:45:06.000000000 -0500
+diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
+index d03a926..f324286 100644
+--- a/drivers/scsi/hosts.c
++++ b/drivers/scsi/hosts.c
@@ -40,7 +40,7 @@
#include "scsi_logging.h"
@@ -38783,7 +40535,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/hosts.c linux-2.6.32.49/drivers/scsi/hos
static void scsi_host_cls_release(struct device *dev)
-@@ -347,7 +347,7 @@ struct Scsi_Host *scsi_host_alloc(struct
+@@ -347,7 +347,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
* subtract one because we increment first then return, but we need to
* know what the next host number was before increment
*/
@@ -38792,10 +40544,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/hosts.c linux-2.6.32.49/drivers/scsi/hos
shost->dma_channel = 0xff;
/* These three are default values which can be overridden */
-diff -urNp linux-2.6.32.49/drivers/scsi/ipr.c linux-2.6.32.49/drivers/scsi/ipr.c
---- linux-2.6.32.49/drivers/scsi/ipr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/ipr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -5286,7 +5286,7 @@ static bool ipr_qc_fill_rtf(struct ata_q
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index a601159..55e19d2 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -5286,7 +5286,7 @@ static bool ipr_qc_fill_rtf(struct ata_queued_cmd *qc)
return true;
}
@@ -38804,9 +40557,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/ipr.c linux-2.6.32.49/drivers/scsi/ipr.c
.phy_reset = ipr_ata_phy_reset,
.hardreset = ipr_sata_reset,
.post_internal_cmd = ipr_ata_post_internal,
-diff -urNp linux-2.6.32.49/drivers/scsi/ips.h linux-2.6.32.49/drivers/scsi/ips.h
---- linux-2.6.32.49/drivers/scsi/ips.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/ips.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
+index 4e49fbc..97907ff 100644
+--- a/drivers/scsi/ips.h
++++ b/drivers/scsi/ips.h
@@ -1027,7 +1027,7 @@ typedef struct {
int (*intr)(struct ips_ha *);
void (*enableint)(struct ips_ha *);
@@ -38816,9 +40570,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/ips.h linux-2.6.32.49/drivers/scsi/ips.h
typedef struct ips_ha {
uint8_t ha_id[IPS_MAX_CHANNELS+1];
-diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c
---- linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
+index c1c1574..a9c9348 100644
+--- a/drivers/scsi/libfc/fc_exch.c
++++ b/drivers/scsi/libfc/fc_exch.c
@@ -86,12 +86,12 @@ struct fc_exch_mgr {
* all together if not used XXX
*/
@@ -38838,7 +40593,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
} stats;
};
#define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
-@@ -510,7 +510,7 @@ static struct fc_exch *fc_exch_em_alloc(
+@@ -510,7 +510,7 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport,
/* allocate memory for exchange */
ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC);
if (!ep) {
@@ -38856,7 +40611,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
mempool_free(ep, mp->ep_pool);
return NULL;
}
-@@ -690,7 +690,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -690,7 +690,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
xid = ntohs(fh->fh_ox_id); /* we originated exch */
ep = fc_exch_find(mp, xid);
if (!ep) {
@@ -38865,7 +40620,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
reject = FC_RJT_OX_ID;
goto out;
}
-@@ -720,7 +720,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -720,7 +720,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
ep = fc_exch_find(mp, xid);
if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) {
if (ep) {
@@ -38874,7 +40629,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
reject = FC_RJT_RX_ID;
goto rel;
}
-@@ -731,7 +731,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -731,7 +731,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
}
xid = ep->xid; /* get our XID */
} else if (!ep) {
@@ -38883,7 +40638,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
reject = FC_RJT_RX_ID; /* XID not found */
goto out;
}
-@@ -752,7 +752,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -752,7 +752,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
@@ -38892,7 +40647,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
reject = FC_RJT_SEQ_ID; /* sequence/exch should exist */
goto rel;
}
-@@ -1163,22 +1163,22 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1163,22 +1163,22 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
ep = fc_exch_find(mp, ntohs(fh->fh_ox_id));
if (!ep) {
@@ -38919,7 +40674,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
goto rel;
}
sof = fr_sof(fp);
-@@ -1189,7 +1189,7 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1189,7 +1189,7 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
@@ -38928,7 +40683,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
goto rel;
}
}
-@@ -1249,9 +1249,9 @@ static void fc_exch_recv_resp(struct fc_
+@@ -1249,9 +1249,9 @@ static void fc_exch_recv_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */
if (!sp)
@@ -38940,10 +40695,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libfc/fc_exch.c linux-2.6.32.49/drivers/
fc_frame_free(fp);
}
-diff -urNp linux-2.6.32.49/drivers/scsi/libsas/sas_ata.c linux-2.6.32.49/drivers/scsi/libsas/sas_ata.c
---- linux-2.6.32.49/drivers/scsi/libsas/sas_ata.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/libsas/sas_ata.c 2011-11-15 19:59:43.000000000 -0500
-@@ -343,7 +343,7 @@ static int sas_ata_scr_read(struct ata_l
+diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
+index 0ee989f..a582241 100644
+--- a/drivers/scsi/libsas/sas_ata.c
++++ b/drivers/scsi/libsas/sas_ata.c
+@@ -343,7 +343,7 @@ static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in,
}
}
@@ -38952,9 +40708,43 @@ diff -urNp linux-2.6.32.49/drivers/scsi/libsas/sas_ata.c linux-2.6.32.49/drivers
.phy_reset = sas_ata_phy_reset,
.post_internal_cmd = sas_ata_post_internal,
.qc_defer = ata_std_qc_defer,
-diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c
---- linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
+index aa10f79..5cc79e4 100644
+--- a/drivers/scsi/lpfc/lpfc.h
++++ b/drivers/scsi/lpfc/lpfc.h
+@@ -400,7 +400,7 @@ struct lpfc_vport {
+ struct dentry *debug_nodelist;
+ struct dentry *vport_debugfs_root;
+ struct lpfc_debugfs_trc *disc_trc;
+- atomic_t disc_trc_cnt;
++ atomic_unchecked_t disc_trc_cnt;
+ #endif
+ uint8_t stat_data_enabled;
+ uint8_t stat_data_blocked;
+@@ -725,8 +725,8 @@ struct lpfc_hba {
+ struct timer_list fabric_block_timer;
+ unsigned long bit_flags;
+ #define FABRIC_COMANDS_BLOCKED 0
+- atomic_t num_rsrc_err;
+- atomic_t num_cmd_success;
++ atomic_unchecked_t num_rsrc_err;
++ atomic_unchecked_t num_cmd_success;
+ unsigned long last_rsrc_error_time;
+ unsigned long last_ramp_down_time;
+ unsigned long last_ramp_up_time;
+@@ -740,7 +740,7 @@ struct lpfc_hba {
+ struct dentry *debug_dumpDif; /* BlockGuard BPL*/
+ struct dentry *debug_slow_ring_trc;
+ struct lpfc_debugfs_trc *slow_ring_trc;
+- atomic_t slow_ring_trc_cnt;
++ atomic_unchecked_t slow_ring_trc_cnt;
+ #endif
+
+ /* Used for deferred freeing of ELS data buffers */
+diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
+index 8d0f0de..7c77a62 100644
+--- a/drivers/scsi/lpfc/lpfc_debugfs.c
++++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -124,7 +124,7 @@ struct lpfc_debug {
int len;
};
@@ -38964,7 +40754,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
static unsigned long lpfc_debugfs_start_time = 0L;
/**
-@@ -158,7 +158,7 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -158,7 +158,7 @@ lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size)
lpfc_debugfs_enable = 0;
len = 0;
@@ -38973,7 +40763,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
(lpfc_debugfs_max_disc_trc - 1);
for (i = index; i < lpfc_debugfs_max_disc_trc; i++) {
dtp = vport->disc_trc + i;
-@@ -219,7 +219,7 @@ lpfc_debugfs_slow_ring_trc_data(struct l
+@@ -219,7 +219,7 @@ lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size)
lpfc_debugfs_enable = 0;
len = 0;
@@ -38982,7 +40772,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
(lpfc_debugfs_max_slow_ring_trc - 1);
for (i = index; i < lpfc_debugfs_max_slow_ring_trc; i++) {
dtp = phba->slow_ring_trc + i;
-@@ -397,6 +397,8 @@ lpfc_debugfs_dumpHBASlim_data(struct lpf
+@@ -397,6 +397,8 @@ lpfc_debugfs_dumpHBASlim_data(struct lpfc_hba *phba, char *buf, int size)
uint32_t *ptr;
char buffer[1024];
@@ -38991,7 +40781,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
off = 0;
spin_lock_irq(&phba->hbalock);
-@@ -634,14 +636,14 @@ lpfc_debugfs_disc_trc(struct lpfc_vport
+@@ -634,14 +636,14 @@ lpfc_debugfs_disc_trc(struct lpfc_vport *vport, int mask, char *fmt,
!vport || !vport->disc_trc)
return;
@@ -39008,7 +40798,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
dtp->jif = jiffies;
#endif
return;
-@@ -672,14 +674,14 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_h
+@@ -672,14 +674,14 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_hba *phba, char *fmt,
!phba || !phba->slow_ring_trc)
return;
@@ -39025,7 +40815,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
dtp->jif = jiffies;
#endif
return;
-@@ -1364,7 +1366,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1364,7 +1366,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
"slow_ring buffer\n");
goto debug_failed;
}
@@ -39034,7 +40824,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
memset(phba->slow_ring_trc, 0,
(sizeof(struct lpfc_debugfs_trc) *
lpfc_debugfs_max_slow_ring_trc));
-@@ -1410,7 +1412,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1410,7 +1412,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
"buffer\n");
goto debug_failed;
}
@@ -39043,41 +40833,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.32.49/driv
snprintf(name, sizeof(name), "discovery_trace");
vport->debug_disc_trc =
-diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc.h linux-2.6.32.49/drivers/scsi/lpfc/lpfc.h
---- linux-2.6.32.49/drivers/scsi/lpfc/lpfc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/lpfc/lpfc.h 2011-11-15 19:59:43.000000000 -0500
-@@ -400,7 +400,7 @@ struct lpfc_vport {
- struct dentry *debug_nodelist;
- struct dentry *vport_debugfs_root;
- struct lpfc_debugfs_trc *disc_trc;
-- atomic_t disc_trc_cnt;
-+ atomic_unchecked_t disc_trc_cnt;
- #endif
- uint8_t stat_data_enabled;
- uint8_t stat_data_blocked;
-@@ -725,8 +725,8 @@ struct lpfc_hba {
- struct timer_list fabric_block_timer;
- unsigned long bit_flags;
- #define FABRIC_COMANDS_BLOCKED 0
-- atomic_t num_rsrc_err;
-- atomic_t num_cmd_success;
-+ atomic_unchecked_t num_rsrc_err;
-+ atomic_unchecked_t num_cmd_success;
- unsigned long last_rsrc_error_time;
- unsigned long last_ramp_down_time;
- unsigned long last_ramp_up_time;
-@@ -740,7 +740,7 @@ struct lpfc_hba {
- struct dentry *debug_dumpDif; /* BlockGuard BPL*/
- struct dentry *debug_slow_ring_trc;
- struct lpfc_debugfs_trc *slow_ring_trc;
-- atomic_t slow_ring_trc_cnt;
-+ atomic_unchecked_t slow_ring_trc_cnt;
- #endif
-
- /* Used for deferred freeing of ELS data buffers */
-diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_init.c linux-2.6.32.49/drivers/scsi/lpfc/lpfc_init.c
---- linux-2.6.32.49/drivers/scsi/lpfc/lpfc_init.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/lpfc/lpfc_init.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
+index 549bc7d..8189dbb 100644
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8021,8 +8021,10 @@ lpfc_init(void)
printk(LPFC_COPYRIGHT "\n");
@@ -39091,10 +40850,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_init.c linux-2.6.32.49/drivers
}
lpfc_transport_template =
fc_attach_transport(&lpfc_transport_functions);
-diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c
---- linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -259,7 +259,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hb
+diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
+index c88f59f..ff2a42f 100644
+--- a/drivers/scsi/lpfc/lpfc_scsi.c
++++ b/drivers/scsi/lpfc/lpfc_scsi.c
+@@ -259,7 +259,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
uint32_t evt_posted;
spin_lock_irqsave(&phba->hbalock, flags);
@@ -39103,7 +40863,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers
phba->last_rsrc_error_time = jiffies;
if ((phba->last_ramp_down_time + QUEUE_RAMP_DOWN_INTERVAL) > jiffies) {
-@@ -300,7 +300,7 @@ lpfc_rampup_queue_depth(struct lpfc_vpor
+@@ -300,7 +300,7 @@ lpfc_rampup_queue_depth(struct lpfc_vport *vport,
unsigned long flags;
struct lpfc_hba *phba = vport->phba;
uint32_t evt_posted;
@@ -39112,7 +40872,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers
if (vport->cfg_lun_queue_depth <= queue_depth)
return;
-@@ -343,8 +343,8 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -343,8 +343,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
int i;
struct lpfc_rport_data *rdata;
@@ -39123,7 +40883,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers
vports = lpfc_create_vport_work_array(phba);
if (vports != NULL)
-@@ -378,8 +378,8 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -378,8 +378,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
}
}
lpfc_destroy_vport_work_array(phba, vports);
@@ -39134,7 +40894,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers
}
/**
-@@ -427,8 +427,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -427,8 +427,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
}
}
lpfc_destroy_vport_work_array(phba, vports);
@@ -39145,10 +40905,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.32.49/drivers
}
/**
-diff -urNp linux-2.6.32.49/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.32.49/drivers/scsi/megaraid/megaraid_mbox.c
---- linux-2.6.32.49/drivers/scsi/megaraid/megaraid_mbox.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/megaraid/megaraid_mbox.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3503,6 +3503,8 @@ megaraid_cmm_register(adapter_t *adapter
+diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
+index 234f0b7..3020aea 100644
+--- a/drivers/scsi/megaraid/megaraid_mbox.c
++++ b/drivers/scsi/megaraid/megaraid_mbox.c
+@@ -3503,6 +3503,8 @@ megaraid_cmm_register(adapter_t *adapter)
int rval;
int i;
@@ -39157,10 +40918,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.32.49
// Allocate memory for the base list of scb for management module.
adapter->uscb_list = kcalloc(MBOX_MAX_USER_CMDS, sizeof(scb_t), GFP_KERNEL);
-diff -urNp linux-2.6.32.49/drivers/scsi/osd/osd_initiator.c linux-2.6.32.49/drivers/scsi/osd/osd_initiator.c
---- linux-2.6.32.49/drivers/scsi/osd/osd_initiator.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/osd/osd_initiator.c 2011-11-15 19:59:43.000000000 -0500
-@@ -94,6 +94,8 @@ static int _osd_print_system_info(struct
+diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
+index 7a117c1..ee01e9e 100644
+--- a/drivers/scsi/osd/osd_initiator.c
++++ b/drivers/scsi/osd/osd_initiator.c
+@@ -94,6 +94,8 @@ static int _osd_print_system_info(struct osd_dev *od, void *caps)
int nelem = ARRAY_SIZE(get_attrs), a = 0;
int ret;
@@ -39169,10 +40931,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/osd/osd_initiator.c linux-2.6.32.49/driv
or = osd_start_request(od, GFP_KERNEL);
if (!or)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.c linux-2.6.32.49/drivers/scsi/pmcraid.c
---- linux-2.6.32.49/drivers/scsi/pmcraid.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/pmcraid.c 2011-11-15 19:59:43.000000000 -0500
-@@ -189,8 +189,8 @@ static int pmcraid_slave_alloc(struct sc
+diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
+index 9ab8c86..9425ad3 100644
+--- a/drivers/scsi/pmcraid.c
++++ b/drivers/scsi/pmcraid.c
+@@ -189,8 +189,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
res->scsi_dev = scsi_dev;
scsi_dev->hostdata = res;
res->change_detected = 0;
@@ -39183,7 +40946,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.c linux-2.6.32.49/drivers/scsi/p
rc = 0;
}
spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags);
-@@ -2396,9 +2396,9 @@ static int pmcraid_error_handler(struct
+@@ -2396,9 +2396,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd)
/* If this was a SCSI read/write command keep count of errors */
if (SCSI_CMD_TYPE(scsi_cmd->cmnd[0]) == SCSI_READ_CMD)
@@ -39195,7 +40958,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.c linux-2.6.32.49/drivers/scsi/p
if (!RES_IS_GSCSI(res->cfg_entry) &&
masked_ioasc != PMCRAID_IOASC_HW_DEVICE_BUS_STATUS_ERROR) {
-@@ -4116,7 +4116,7 @@ static void pmcraid_worker_function(stru
+@@ -4116,7 +4116,7 @@ static void pmcraid_worker_function(struct work_struct *workp)
pinstance = container_of(workp, struct pmcraid_instance, worker_q);
/* add resources only after host is added into system */
@@ -39204,7 +40967,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.c linux-2.6.32.49/drivers/scsi/p
return;
spin_lock_irqsave(&pinstance->resource_lock, lock_flags);
-@@ -4850,7 +4850,7 @@ static int __devinit pmcraid_init_instan
+@@ -4850,7 +4850,7 @@ static int __devinit pmcraid_init_instance(
init_waitqueue_head(&pinstance->reset_wait_q);
atomic_set(&pinstance->outstanding_cmds, 0);
@@ -39222,9 +40985,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.c linux-2.6.32.49/drivers/scsi/p
schedule_work(&pinstance->worker_q);
return rc;
-diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.h linux-2.6.32.49/drivers/scsi/pmcraid.h
---- linux-2.6.32.49/drivers/scsi/pmcraid.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/pmcraid.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
+index 3441b3f..6cbe8f7 100644
+--- a/drivers/scsi/pmcraid.h
++++ b/drivers/scsi/pmcraid.h
@@ -690,7 +690,7 @@ struct pmcraid_instance {
atomic_t outstanding_cmds;
@@ -39245,9 +41009,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/pmcraid.h linux-2.6.32.49/drivers/scsi/p
/* To indicate add/delete/modify during CCN */
u8 change_detected;
-diff -urNp linux-2.6.32.49/drivers/scsi/qla2xxx/qla_def.h linux-2.6.32.49/drivers/scsi/qla2xxx/qla_def.h
---- linux-2.6.32.49/drivers/scsi/qla2xxx/qla_def.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/qla2xxx/qla_def.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index 2150618..7034215 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2089,7 +2089,7 @@ struct isp_operations {
int (*get_flash_version) (struct scsi_qla_host *, void *);
@@ -39257,9 +41022,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/qla2xxx/qla_def.h linux-2.6.32.49/driver
/* MSI-X Support *************************************************************/
-diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_def.h
---- linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_def.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_def.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
+index 81b5f29..2ae1fad 100644
+--- a/drivers/scsi/qla4xxx/ql4_def.h
++++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -240,7 +240,7 @@ struct ddb_entry {
atomic_t retry_relogin_timer; /* Min Time between relogins
* (4000 only) */
@@ -39269,10 +41035,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.32.49/driver
* retried */
uint16_t port;
-diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c
---- linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c 2011-11-15 19:59:43.000000000 -0500
-@@ -482,7 +482,7 @@ static struct ddb_entry * qla4xxx_alloc_
+diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
+index af8c323..515dd51 100644
+--- a/drivers/scsi/qla4xxx/ql4_init.c
++++ b/drivers/scsi/qla4xxx/ql4_init.c
+@@ -482,7 +482,7 @@ static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
atomic_set(&ddb_entry->port_down_timer, ha->port_down_retry_count);
atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
atomic_set(&ddb_entry->relogin_timer, 0);
@@ -39281,7 +41048,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.32.49/drive
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
list_add_tail(&ddb_entry->list, &ha->ddb_list);
ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
-@@ -1308,7 +1308,7 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1308,7 +1308,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha,
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
atomic_set(&ddb_entry->port_down_timer,
ha->port_down_retry_count);
@@ -39290,10 +41057,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.32.49/drive
atomic_set(&ddb_entry->relogin_timer, 0);
clear_bit(DF_RELOGIN, &ddb_entry->flags);
clear_bit(DF_NO_RELOGIN, &ddb_entry->flags);
-diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_os.c
---- linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_os.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_os.c 2011-11-15 19:59:43.000000000 -0500
-@@ -641,13 +641,13 @@ static void qla4xxx_timer(struct scsi_ql
+diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
+index 83c8b5e..a82b348 100644
+--- a/drivers/scsi/qla4xxx/ql4_os.c
++++ b/drivers/scsi/qla4xxx/ql4_os.c
+@@ -641,13 +641,13 @@ static void qla4xxx_timer(struct scsi_qla_host *ha)
ddb_entry->fw_ddb_device_state ==
DDB_DS_SESSION_FAILED) {
/* Reset retry relogin timer */
@@ -39309,10 +41077,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.32.49/drivers
relogin_retry_count))
);
start_dpc++;
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi.c linux-2.6.32.49/drivers/scsi/scsi.c
---- linux-2.6.32.49/drivers/scsi/scsi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -652,7 +652,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
+index dd098ca..686ce01 100644
+--- a/drivers/scsi/scsi.c
++++ b/drivers/scsi/scsi.c
+@@ -652,7 +652,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
unsigned long timeout;
int rtn = 0;
@@ -39321,10 +41090,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi.c linux-2.6.32.49/drivers/scsi/scsi
/* check if the device is still usable */
if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_debug.c linux-2.6.32.49/drivers/scsi/scsi_debug.c
---- linux-2.6.32.49/drivers/scsi/scsi_debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_debug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1395,6 +1395,8 @@ static int resp_mode_select(struct scsi_
+diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
+index bc3e363..e1a8e50 100644
+--- a/drivers/scsi/scsi_debug.c
++++ b/drivers/scsi/scsi_debug.c
+@@ -1395,6 +1395,8 @@ static int resp_mode_select(struct scsi_cmnd * scp, int mselect6,
unsigned char arr[SDEBUG_MAX_MSELECT_SZ];
unsigned char *cmd = (unsigned char *)scp->cmnd;
@@ -39333,7 +41103,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_debug.c linux-2.6.32.49/drivers/scs
if ((errsts = check_readiness(scp, 1, devip)))
return errsts;
memset(arr, 0, sizeof(arr));
-@@ -1492,6 +1494,8 @@ static int resp_log_sense(struct scsi_cm
+@@ -1492,6 +1494,8 @@ static int resp_log_sense(struct scsi_cmnd * scp,
unsigned char arr[SDEBUG_MAX_LSENSE_SZ];
unsigned char *cmd = (unsigned char *)scp->cmnd;
@@ -39342,10 +41112,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_debug.c linux-2.6.32.49/drivers/scs
if ((errsts = check_readiness(scp, 1, devip)))
return errsts;
memset(arr, 0, sizeof(arr));
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_lib.c linux-2.6.32.49/drivers/scsi/scsi_lib.c
---- linux-2.6.32.49/drivers/scsi/scsi_lib.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_lib.c 2011-11-26 19:45:06.000000000 -0500
-@@ -1384,7 +1384,7 @@ static void scsi_kill_request(struct req
+diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
+index 1ae7b7c..0a44924 100644
+--- a/drivers/scsi/scsi_lib.c
++++ b/drivers/scsi/scsi_lib.c
+@@ -1384,7 +1384,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
@@ -39354,7 +41125,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_lib.c linux-2.6.32.49/drivers/scsi/
/*
* SCSI request completion path will do scsi_device_unbusy(),
-@@ -1415,9 +1415,9 @@ static void scsi_softirq_done(struct req
+@@ -1415,9 +1415,9 @@ static void scsi_softirq_done(struct request *rq)
*/
cmd->serial_number = 0;
@@ -39366,10 +41137,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_lib.c linux-2.6.32.49/drivers/scsi/
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_sysfs.c linux-2.6.32.49/drivers/scsi/scsi_sysfs.c
---- linux-2.6.32.49/drivers/scsi/scsi_sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -662,7 +662,7 @@ show_iostat_##field(struct device *dev,
+diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
+index 91a93e0..eae0fe3 100644
+--- a/drivers/scsi/scsi_sysfs.c
++++ b/drivers/scsi/scsi_sysfs.c
+@@ -662,7 +662,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
struct scsi_device *sdev = to_scsi_device(dev); \
@@ -39378,10 +41150,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_sysfs.c linux-2.6.32.49/drivers/scs
return snprintf(buf, 20, "0x%llx\n", count); \
} \
static DEVICE_ATTR(field, S_IRUGO, show_iostat_##field, NULL)
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_tgt_lib.c linux-2.6.32.49/drivers/scsi/scsi_tgt_lib.c
---- linux-2.6.32.49/drivers/scsi/scsi_tgt_lib.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_tgt_lib.c 2011-11-15 19:59:43.000000000 -0500
-@@ -362,7 +362,7 @@ static int scsi_map_user_pages(struct sc
+diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
+index 1030327..f91fd30 100644
+--- a/drivers/scsi/scsi_tgt_lib.c
++++ b/drivers/scsi/scsi_tgt_lib.c
+@@ -362,7 +362,7 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
int err;
dprintk("%lx %u\n", uaddr, len);
@@ -39390,9 +41163,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_tgt_lib.c linux-2.6.32.49/drivers/s
if (err) {
/*
* TODO: need to fixup sg_tablesize, max_segment_size,
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c
---- linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
+index db02e31..1b42ea9 100644
+--- a/drivers/scsi/scsi_transport_fc.c
++++ b/drivers/scsi/scsi_transport_fc.c
@@ -480,7 +480,7 @@ MODULE_PARM_DESC(dev_loss_tmo,
* Netlink Infrastructure
*/
@@ -39411,7 +41185,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c linux-2.6.32.49/driv
}
EXPORT_SYMBOL(fc_get_event_number);
-@@ -641,7 +641,7 @@ static __init int fc_transport_init(void
+@@ -641,7 +641,7 @@ static __init int fc_transport_init(void)
{
int error;
@@ -39420,9 +41194,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_fc.c linux-2.6.32.49/driv
error = transport_class_register(&fc_host_class);
if (error)
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c
---- linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
+index de2f8c4..63c5278 100644
+--- a/drivers/scsi/scsi_transport_iscsi.c
++++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -81,7 +81,7 @@ struct iscsi_internal {
struct device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1];
};
@@ -39432,7 +41207,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c linux-2.6.32.49/d
static struct workqueue_struct *iscsi_eh_timer_workq;
/*
-@@ -728,7 +728,7 @@ int iscsi_add_session(struct iscsi_cls_s
+@@ -728,7 +728,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
int err;
ihost = shost->shost_data;
@@ -39441,7 +41216,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c linux-2.6.32.49/d
if (id == ISCSI_MAX_TARGET) {
for (id = 0; id < ISCSI_MAX_TARGET; id++) {
-@@ -2060,7 +2060,7 @@ static __init int iscsi_transport_init(v
+@@ -2060,7 +2060,7 @@ static __init int iscsi_transport_init(void)
printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
ISCSI_TRANSPORT_VERSION);
@@ -39450,9 +41225,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_iscsi.c linux-2.6.32.49/d
err = class_register(&iscsi_transport_class);
if (err)
-diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c
---- linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
+index 21a045e..ec89e03 100644
+--- a/drivers/scsi/scsi_transport_srp.c
++++ b/drivers/scsi/scsi_transport_srp.c
@@ -33,7 +33,7 @@
#include "scsi_transport_srp_internal.h"
@@ -39462,7 +41238,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c linux-2.6.32.49/dri
};
#define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data)
-@@ -62,7 +62,7 @@ static int srp_host_setup(struct transpo
+@@ -62,7 +62,7 @@ static int srp_host_setup(struct transport_container *tc, struct device *dev,
struct Scsi_Host *shost = dev_to_shost(dev);
struct srp_host_attrs *srp_host = to_srp_host_attrs(shost);
@@ -39471,7 +41247,7 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c linux-2.6.32.49/dri
return 0;
}
-@@ -211,7 +211,7 @@ struct srp_rport *srp_rport_add(struct S
+@@ -211,7 +211,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
memcpy(rport->port_id, ids->port_id, sizeof(rport->port_id));
rport->roles = ids->roles;
@@ -39480,10 +41256,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/scsi_transport_srp.c linux-2.6.32.49/dri
dev_set_name(&rport->dev, "port-%d:%d", shost->host_no, id);
transport_setup_device(&rport->dev);
-diff -urNp linux-2.6.32.49/drivers/scsi/sg.c linux-2.6.32.49/drivers/scsi/sg.c
---- linux-2.6.32.49/drivers/scsi/sg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/sg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1064,7 +1064,7 @@ sg_ioctl(struct inode *inode, struct fil
+diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
+index 040f751..98a5ed2 100644
+--- a/drivers/scsi/sg.c
++++ b/drivers/scsi/sg.c
+@@ -1064,7 +1064,7 @@ sg_ioctl(struct inode *inode, struct file *filp,
sdp->disk->disk_name,
MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
NULL,
@@ -39510,10 +41287,11 @@ diff -urNp linux-2.6.32.49/drivers/scsi/sg.c linux-2.6.32.49/drivers/scsi/sg.c
sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
if (!sg_proc_sgp)
-diff -urNp linux-2.6.32.49/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.32.49/drivers/scsi/sym53c8xx_2/sym_glue.c
---- linux-2.6.32.49/drivers/scsi/sym53c8xx_2/sym_glue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/scsi/sym53c8xx_2/sym_glue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1754,6 +1754,8 @@ static int __devinit sym2_probe(struct p
+diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
+index 45374d6..61ee484 100644
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
+@@ -1754,6 +1754,8 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
int do_iounmap = 0;
int do_disable_device = 1;
@@ -39522,9 +41300,10 @@ diff -urNp linux-2.6.32.49/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.32.49/d
memset(&sym_dev, 0, sizeof(sym_dev));
memset(&nvram, 0, sizeof(nvram));
sym_dev.pdev = pdev;
-diff -urNp linux-2.6.32.49/drivers/serial/kgdboc.c linux-2.6.32.49/drivers/serial/kgdboc.c
---- linux-2.6.32.49/drivers/serial/kgdboc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/serial/kgdboc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
+index eadc1ab..2d81457 100644
+--- a/drivers/serial/kgdboc.c
++++ b/drivers/serial/kgdboc.c
@@ -18,7 +18,7 @@
#define MAX_CONFIG_LEN 40
@@ -39534,7 +41313,7 @@ diff -urNp linux-2.6.32.49/drivers/serial/kgdboc.c linux-2.6.32.49/drivers/seria
/* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
static int configured = -1;
-@@ -154,7 +154,7 @@ static void kgdboc_post_exp_handler(void
+@@ -154,7 +154,7 @@ static void kgdboc_post_exp_handler(void)
module_put(THIS_MODULE);
}
@@ -39543,10 +41322,11 @@ diff -urNp linux-2.6.32.49/drivers/serial/kgdboc.c linux-2.6.32.49/drivers/seria
.name = "kgdboc",
.read_char = kgdboc_get_char,
.write_char = kgdboc_put_char,
-diff -urNp linux-2.6.32.49/drivers/spi/spi.c linux-2.6.32.49/drivers/spi/spi.c
---- linux-2.6.32.49/drivers/spi/spi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/spi/spi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -774,7 +774,7 @@ int spi_sync(struct spi_device *spi, str
+diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
+index b76f246..7f41af7 100644
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -774,7 +774,7 @@ int spi_sync(struct spi_device *spi, struct spi_message *message)
EXPORT_SYMBOL_GPL(spi_sync);
/* portable code must never pass more than 32 bytes */
@@ -39555,10 +41335,11 @@ diff -urNp linux-2.6.32.49/drivers/spi/spi.c linux-2.6.32.49/drivers/spi/spi.c
static u8 *buf;
-diff -urNp linux-2.6.32.49/drivers/staging/android/binder.c linux-2.6.32.49/drivers/staging/android/binder.c
---- linux-2.6.32.49/drivers/staging/android/binder.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/android/binder.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2756,7 +2756,7 @@ static void binder_vma_close(struct vm_a
+diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
+index 99010d4..6bad87b 100644
+--- a/drivers/staging/android/binder.c
++++ b/drivers/staging/android/binder.c
+@@ -2756,7 +2756,7 @@ static void binder_vma_close(struct vm_area_struct *vma)
binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES);
}
@@ -39567,10 +41348,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/android/binder.c linux-2.6.32.49/driv
.open = binder_vma_open,
.close = binder_vma_close,
};
-diff -urNp linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c
---- linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -455,7 +455,7 @@ static int b3dfg_vma_fault(struct vm_are
+diff --git a/drivers/staging/b3dfg/b3dfg.c b/drivers/staging/b3dfg/b3dfg.c
+index cda26bb..39fed3f 100644
+--- a/drivers/staging/b3dfg/b3dfg.c
++++ b/drivers/staging/b3dfg/b3dfg.c
+@@ -455,7 +455,7 @@ static int b3dfg_vma_fault(struct vm_area_struct *vma,
return VM_FAULT_NOPAGE;
}
@@ -39579,7 +41361,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c linux-2.6.32.49/drivers
.fault = b3dfg_vma_fault,
};
-@@ -848,7 +848,7 @@ static int b3dfg_mmap(struct file *filp,
+@@ -848,7 +848,7 @@ static int b3dfg_mmap(struct file *filp, struct vm_area_struct *vma)
return r;
}
@@ -39588,10 +41370,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/b3dfg/b3dfg.c linux-2.6.32.49/drivers
.owner = THIS_MODULE,
.open = b3dfg_open,
.release = b3dfg_release,
-diff -urNp linux-2.6.32.49/drivers/staging/comedi/comedi_fops.c linux-2.6.32.49/drivers/staging/comedi/comedi_fops.c
---- linux-2.6.32.49/drivers/staging/comedi/comedi_fops.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/comedi/comedi_fops.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1389,7 +1389,7 @@ void comedi_unmap(struct vm_area_struct
+diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
+index 80a1071..8c14e17 100644
+--- a/drivers/staging/comedi/comedi_fops.c
++++ b/drivers/staging/comedi/comedi_fops.c
+@@ -1389,7 +1389,7 @@ void comedi_unmap(struct vm_area_struct *area)
mutex_unlock(&dev->mutex);
}
@@ -39600,10 +41383,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/comedi/comedi_fops.c linux-2.6.32.49/
.close = comedi_unmap,
};
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/adsp_driver.c linux-2.6.32.49/drivers/staging/dream/qdsp5/adsp_driver.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/adsp_driver.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/adsp_driver.c 2011-11-15 19:59:43.000000000 -0500
-@@ -576,7 +576,7 @@ static struct adsp_device *inode_to_devi
+diff --git a/drivers/staging/dream/qdsp5/adsp_driver.c b/drivers/staging/dream/qdsp5/adsp_driver.c
+index e55a0db..577b776 100644
+--- a/drivers/staging/dream/qdsp5/adsp_driver.c
++++ b/drivers/staging/dream/qdsp5/adsp_driver.c
+@@ -576,7 +576,7 @@ static struct adsp_device *inode_to_device(struct inode *inode)
static dev_t adsp_devno;
static struct class *adsp_class;
@@ -39612,9 +41396,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/adsp_driver.c linux-2.6.3
.owner = THIS_MODULE,
.open = adsp_open,
.unlocked_ioctl = adsp_ioctl,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_aac.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_aac.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_aac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_aac.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/audio_aac.c b/drivers/staging/dream/qdsp5/audio_aac.c
+index ad2390f..4116ee8 100644
+--- a/drivers/staging/dream/qdsp5/audio_aac.c
++++ b/drivers/staging/dream/qdsp5/audio_aac.c
@@ -1022,7 +1022,7 @@ done:
return rc;
}
@@ -39624,9 +41409,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_aac.c linux-2.6.32.
.owner = THIS_MODULE,
.open = audio_open,
.release = audio_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_amrnb.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_amrnb.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_amrnb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_amrnb.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/audio_amrnb.c b/drivers/staging/dream/qdsp5/audio_amrnb.c
+index cd818a5..870b37b 100644
+--- a/drivers/staging/dream/qdsp5/audio_amrnb.c
++++ b/drivers/staging/dream/qdsp5/audio_amrnb.c
@@ -833,7 +833,7 @@ done:
return rc;
}
@@ -39636,9 +41422,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_amrnb.c linux-2.6.3
.owner = THIS_MODULE,
.open = audamrnb_open,
.release = audamrnb_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_evrc.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_evrc.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_evrc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_evrc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/audio_evrc.c b/drivers/staging/dream/qdsp5/audio_evrc.c
+index 4b43e18..cedafda 100644
+--- a/drivers/staging/dream/qdsp5/audio_evrc.c
++++ b/drivers/staging/dream/qdsp5/audio_evrc.c
@@ -805,7 +805,7 @@ dma_fail:
return rc;
}
@@ -39648,10 +41435,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_evrc.c linux-2.6.32
.owner = THIS_MODULE,
.open = audevrc_open,
.release = audevrc_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c 2011-11-15 19:59:43.000000000 -0500
-@@ -913,7 +913,7 @@ static int audpre_open(struct inode *ino
+diff --git a/drivers/staging/dream/qdsp5/audio_in.c b/drivers/staging/dream/qdsp5/audio_in.c
+index 3d950a2..9431118 100644
+--- a/drivers/staging/dream/qdsp5/audio_in.c
++++ b/drivers/staging/dream/qdsp5/audio_in.c
+@@ -913,7 +913,7 @@ static int audpre_open(struct inode *inode, struct file *file)
return 0;
}
@@ -39660,7 +41448,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.4
.owner = THIS_MODULE,
.open = audio_in_open,
.release = audio_in_release,
-@@ -922,7 +922,7 @@ static struct file_operations audio_fops
+@@ -922,7 +922,7 @@ static struct file_operations audio_fops = {
.unlocked_ioctl = audio_in_ioctl,
};
@@ -39669,9 +41457,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.4
.owner = THIS_MODULE,
.open = audpre_open,
.unlocked_ioctl = audpre_ioctl,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_mp3.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_mp3.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_mp3.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_mp3.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/audio_mp3.c b/drivers/staging/dream/qdsp5/audio_mp3.c
+index b95574f..286c2f4 100644
+--- a/drivers/staging/dream/qdsp5/audio_mp3.c
++++ b/drivers/staging/dream/qdsp5/audio_mp3.c
@@ -941,7 +941,7 @@ done:
return rc;
}
@@ -39681,10 +41470,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_mp3.c linux-2.6.32.
.owner = THIS_MODULE,
.open = audio_open,
.release = audio_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c 2011-11-15 19:59:43.000000000 -0500
-@@ -810,7 +810,7 @@ static int audpp_open(struct inode *inod
+diff --git a/drivers/staging/dream/qdsp5/audio_out.c b/drivers/staging/dream/qdsp5/audio_out.c
+index d1adcf6..f8f9833 100644
+--- a/drivers/staging/dream/qdsp5/audio_out.c
++++ b/drivers/staging/dream/qdsp5/audio_out.c
+@@ -810,7 +810,7 @@ static int audpp_open(struct inode *inode, struct file *file)
return 0;
}
@@ -39693,7 +41483,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.
.owner = THIS_MODULE,
.open = audio_open,
.release = audio_release,
-@@ -819,7 +819,7 @@ static struct file_operations audio_fops
+@@ -819,7 +819,7 @@ static struct file_operations audio_fops = {
.unlocked_ioctl = audio_ioctl,
};
@@ -39702,9 +41492,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.
.owner = THIS_MODULE,
.open = audpp_open,
.unlocked_ioctl = audpp_ioctl,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_qcelp.c linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_qcelp.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_qcelp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_qcelp.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/audio_qcelp.c b/drivers/staging/dream/qdsp5/audio_qcelp.c
+index f0f50e3..f6b9dbc 100644
+--- a/drivers/staging/dream/qdsp5/audio_qcelp.c
++++ b/drivers/staging/dream/qdsp5/audio_qcelp.c
@@ -816,7 +816,7 @@ err:
return rc;
}
@@ -39714,9 +41505,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/audio_qcelp.c linux-2.6.3
.owner = THIS_MODULE,
.open = audqcelp_open,
.release = audqcelp_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/snd.c linux-2.6.32.49/drivers/staging/dream/qdsp5/snd.c
---- linux-2.6.32.49/drivers/staging/dream/qdsp5/snd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/qdsp5/snd.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/dream/qdsp5/snd.c b/drivers/staging/dream/qdsp5/snd.c
+index 037d7ff..5469ec3 100644
+--- a/drivers/staging/dream/qdsp5/snd.c
++++ b/drivers/staging/dream/qdsp5/snd.c
@@ -242,7 +242,7 @@ err:
return rc;
}
@@ -39726,10 +41518,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/qdsp5/snd.c linux-2.6.32.49/dri
.owner = THIS_MODULE,
.open = snd_open,
.release = snd_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/smd/smd_qmi.c linux-2.6.32.49/drivers/staging/dream/smd/smd_qmi.c
---- linux-2.6.32.49/drivers/staging/dream/smd/smd_qmi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/smd/smd_qmi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -793,7 +793,7 @@ static int qmi_release(struct inode *ip,
+diff --git a/drivers/staging/dream/smd/smd_qmi.c b/drivers/staging/dream/smd/smd_qmi.c
+index d4e7d88..0ea632a 100644
+--- a/drivers/staging/dream/smd/smd_qmi.c
++++ b/drivers/staging/dream/smd/smd_qmi.c
+@@ -793,7 +793,7 @@ static int qmi_release(struct inode *ip, struct file *fp)
return 0;
}
@@ -39738,10 +41531,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/smd/smd_qmi.c linux-2.6.32.49/d
.owner = THIS_MODULE,
.read = qmi_read,
.write = qmi_write,
-diff -urNp linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c
---- linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c 2011-11-15 19:59:43.000000000 -0500
-@@ -214,7 +214,7 @@ static long rpcrouter_ioctl(struct file
+diff --git a/drivers/staging/dream/smd/smd_rpcrouter_device.c b/drivers/staging/dream/smd/smd_rpcrouter_device.c
+index cd3910b..ff053d3 100644
+--- a/drivers/staging/dream/smd/smd_rpcrouter_device.c
++++ b/drivers/staging/dream/smd/smd_rpcrouter_device.c
+@@ -214,7 +214,7 @@ static long rpcrouter_ioctl(struct file *filp, unsigned int cmd,
return rc;
}
@@ -39750,7 +41544,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c linu
.owner = THIS_MODULE,
.open = rpcrouter_open,
.release = rpcrouter_release,
-@@ -224,7 +224,7 @@ static struct file_operations rpcrouter_
+@@ -224,7 +224,7 @@ static struct file_operations rpcrouter_server_fops = {
.unlocked_ioctl = rpcrouter_ioctl,
};
@@ -39759,10 +41553,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dream/smd/smd_rpcrouter_device.c linu
.owner = THIS_MODULE,
.open = rpcrouter_open,
.release = rpcrouter_release,
-diff -urNp linux-2.6.32.49/drivers/staging/dst/dcore.c linux-2.6.32.49/drivers/staging/dst/dcore.c
---- linux-2.6.32.49/drivers/staging/dst/dcore.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dst/dcore.c 2011-11-15 19:59:43.000000000 -0500
-@@ -149,7 +149,7 @@ static int dst_bdev_release(struct gendi
+diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c
+index c24e4e0..07665be 100644
+--- a/drivers/staging/dst/dcore.c
++++ b/drivers/staging/dst/dcore.c
+@@ -149,7 +149,7 @@ static int dst_bdev_release(struct gendisk *disk, fmode_t mode)
return 0;
}
@@ -39771,7 +41566,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/dst/dcore.c linux-2.6.32.49/drivers/s
.open = dst_bdev_open,
.release = dst_bdev_release,
.owner = THIS_MODULE,
-@@ -588,7 +588,7 @@ static struct dst_node *dst_alloc_node(s
+@@ -588,7 +588,7 @@ static struct dst_node *dst_alloc_node(struct dst_ctl *ctl,
n->size = ctl->size;
atomic_set(&n->refcnt, 1);
@@ -39780,10 +41575,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dst/dcore.c linux-2.6.32.49/drivers/s
snprintf(n->name, sizeof(n->name), "%s", ctl->name);
err = dst_node_sysfs_init(n);
-diff -urNp linux-2.6.32.49/drivers/staging/dst/trans.c linux-2.6.32.49/drivers/staging/dst/trans.c
---- linux-2.6.32.49/drivers/staging/dst/trans.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/dst/trans.c 2011-11-15 19:59:43.000000000 -0500
-@@ -169,7 +169,7 @@ int dst_process_bio(struct dst_node *n,
+diff --git a/drivers/staging/dst/trans.c b/drivers/staging/dst/trans.c
+index 557d372..8d84422 100644
+--- a/drivers/staging/dst/trans.c
++++ b/drivers/staging/dst/trans.c
+@@ -169,7 +169,7 @@ int dst_process_bio(struct dst_node *n, struct bio *bio)
t->error = 0;
t->retries = 0;
atomic_set(&t->refcnt, 1);
@@ -39792,10 +41588,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/dst/trans.c linux-2.6.32.49/drivers/s
t->enc = bio_data_dir(bio);
dst_bio_to_cmd(bio, &t->cmd, DST_IO, t->gen);
-diff -urNp linux-2.6.32.49/drivers/staging/et131x/et1310_tx.c linux-2.6.32.49/drivers/staging/et131x/et1310_tx.c
---- linux-2.6.32.49/drivers/staging/et131x/et1310_tx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/et131x/et1310_tx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -710,11 +710,11 @@ inline void et131x_free_send_packet(stru
+diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c
+index 94f7752..d051514 100644
+--- a/drivers/staging/et131x/et1310_tx.c
++++ b/drivers/staging/et131x/et1310_tx.c
+@@ -710,11 +710,11 @@ inline void et131x_free_send_packet(struct et131x_adapter *etdev,
struct net_device_stats *stats = &etdev->net_stats;
if (pMpTcb->Flags & fMP_DEST_BROAD)
@@ -39810,9 +41607,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/et131x/et1310_tx.c linux-2.6.32.49/dr
if (pMpTcb->Packet) {
stats->tx_bytes += pMpTcb->Packet->len;
-diff -urNp linux-2.6.32.49/drivers/staging/et131x/et131x_adapter.h linux-2.6.32.49/drivers/staging/et131x/et131x_adapter.h
---- linux-2.6.32.49/drivers/staging/et131x/et131x_adapter.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/et131x/et131x_adapter.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
+index 1dfe06f..f469b4d 100644
+--- a/drivers/staging/et131x/et131x_adapter.h
++++ b/drivers/staging/et131x/et131x_adapter.h
@@ -145,11 +145,11 @@ typedef struct _ce_stats_t {
* operations
*/
@@ -39828,10 +41626,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/et131x/et131x_adapter.h linux-2.6.32.
u32 norcvbuf; /* # Rx packets discarded */
u32 noxmtbuf; /* # Tx packets discarded */
-diff -urNp linux-2.6.32.49/drivers/staging/go7007/go7007-v4l2.c linux-2.6.32.49/drivers/staging/go7007/go7007-v4l2.c
---- linux-2.6.32.49/drivers/staging/go7007/go7007-v4l2.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/go7007/go7007-v4l2.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1700,7 +1700,7 @@ static int go7007_vm_fault(struct vm_are
+diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c
+index 4bd353a..e28f455 100644
+--- a/drivers/staging/go7007/go7007-v4l2.c
++++ b/drivers/staging/go7007/go7007-v4l2.c
+@@ -1700,7 +1700,7 @@ static int go7007_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return 0;
}
@@ -39840,22 +41639,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/go7007/go7007-v4l2.c linux-2.6.32.49/
.open = go7007_vm_open,
.close = go7007_vm_close,
.fault = go7007_vm_fault,
-diff -urNp linux-2.6.32.49/drivers/staging/hv/blkvsc_drv.c linux-2.6.32.49/drivers/staging/hv/blkvsc_drv.c
---- linux-2.6.32.49/drivers/staging/hv/blkvsc_drv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/blkvsc_drv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -153,7 +153,7 @@ static int blkvsc_ringbuffer_size = BLKV
- /* The one and only one */
- static struct blkvsc_driver_context g_blkvsc_drv;
-
--static struct block_device_operations block_ops = {
-+static const struct block_device_operations block_ops = {
- .owner = THIS_MODULE,
- .open = blkvsc_open,
- .release = blkvsc_release,
-diff -urNp linux-2.6.32.49/drivers/staging/hv/Channel.c linux-2.6.32.49/drivers/staging/hv/Channel.c
---- linux-2.6.32.49/drivers/staging/hv/Channel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/Channel.c 2011-11-15 19:59:43.000000000 -0500
-@@ -464,8 +464,8 @@ int VmbusChannelEstablishGpadl(struct vm
+diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
+index 366dc95..b974d87 100644
+--- a/drivers/staging/hv/Channel.c
++++ b/drivers/staging/hv/Channel.c
+@@ -464,8 +464,8 @@ int VmbusChannelEstablishGpadl(struct vmbus_channel *Channel, void *Kbuffer,
DPRINT_ENTER(VMBUS);
@@ -39866,10 +41654,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/hv/Channel.c linux-2.6.32.49/drivers/
VmbusChannelCreateGpadlHeader(Kbuffer, Size, &msgInfo, &msgCount);
ASSERT(msgInfo != NULL);
-diff -urNp linux-2.6.32.49/drivers/staging/hv/Hv.c linux-2.6.32.49/drivers/staging/hv/Hv.c
---- linux-2.6.32.49/drivers/staging/hv/Hv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/Hv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -161,7 +161,7 @@ static u64 HvDoHypercall(u64 Control, vo
+diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
+index b12237f..01ae28a 100644
+--- a/drivers/staging/hv/Hv.c
++++ b/drivers/staging/hv/Hv.c
+@@ -161,7 +161,7 @@ static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
u64 outputAddress = (Output) ? virt_to_phys(Output) : 0;
u32 outputAddressHi = outputAddress >> 32;
u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
@@ -39878,9 +41667,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/hv/Hv.c linux-2.6.32.49/drivers/stagi
DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
Control, Input, Output);
-diff -urNp linux-2.6.32.49/drivers/staging/hv/VmbusApi.h linux-2.6.32.49/drivers/staging/hv/VmbusApi.h
---- linux-2.6.32.49/drivers/staging/hv/VmbusApi.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/VmbusApi.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h
+index d089bb1..2ebc158 100644
+--- a/drivers/staging/hv/VmbusApi.h
++++ b/drivers/staging/hv/VmbusApi.h
@@ -109,7 +109,7 @@ struct vmbus_channel_interface {
u32 *GpadlHandle);
int (*TeardownGpadl)(struct hv_device *device, u32 GpadlHandle);
@@ -39890,10 +41680,37 @@ diff -urNp linux-2.6.32.49/drivers/staging/hv/VmbusApi.h linux-2.6.32.49/drivers
/* Base driver object */
struct hv_driver {
-diff -urNp linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c
---- linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -532,7 +532,7 @@ static int vmbus_child_device_register(s
+diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
+index 5a37cce..6ecc88c 100644
+--- a/drivers/staging/hv/VmbusPrivate.h
++++ b/drivers/staging/hv/VmbusPrivate.h
+@@ -59,7 +59,7 @@ enum VMBUS_CONNECT_STATE {
+ struct VMBUS_CONNECTION {
+ enum VMBUS_CONNECT_STATE ConnectState;
+
+- atomic_t NextGpadlHandle;
++ atomic_unchecked_t NextGpadlHandle;
+
+ /*
+ * Represents channel interrupts. Each bit position represents a
+diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
+index 871a202..ca50ddf 100644
+--- a/drivers/staging/hv/blkvsc_drv.c
++++ b/drivers/staging/hv/blkvsc_drv.c
+@@ -153,7 +153,7 @@ static int blkvsc_ringbuffer_size = BLKVSC_RING_BUFFER_SIZE;
+ /* The one and only one */
+ static struct blkvsc_driver_context g_blkvsc_drv;
+
+-static struct block_device_operations block_ops = {
++static const struct block_device_operations block_ops = {
+ .owner = THIS_MODULE,
+ .open = blkvsc_open,
+ .release = blkvsc_release,
+diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
+index 6acc49a..fbc8d46 100644
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -532,7 +532,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
to_device_context(root_device_obj);
struct device_context *child_device_ctx =
to_device_context(child_device_obj);
@@ -39902,7 +41719,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c linux-2.6.32.49/driver
DPRINT_ENTER(VMBUS_DRV);
-@@ -541,7 +541,7 @@ static int vmbus_child_device_register(s
+@@ -541,7 +541,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
/* Set the device name. Otherwise, device_register() will fail. */
dev_set_name(&child_device_ctx->device, "vmbus_0_%d",
@@ -39911,21 +41728,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/hv/vmbus_drv.c linux-2.6.32.49/driver
/* The new device belongs to this bus */
child_device_ctx->device.bus = &g_vmbus_drv.bus; /* device->dev.bus; */
-diff -urNp linux-2.6.32.49/drivers/staging/hv/VmbusPrivate.h linux-2.6.32.49/drivers/staging/hv/VmbusPrivate.h
---- linux-2.6.32.49/drivers/staging/hv/VmbusPrivate.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/hv/VmbusPrivate.h 2011-11-15 19:59:43.000000000 -0500
-@@ -59,7 +59,7 @@ enum VMBUS_CONNECT_STATE {
- struct VMBUS_CONNECTION {
- enum VMBUS_CONNECT_STATE ConnectState;
-
-- atomic_t NextGpadlHandle;
-+ atomic_unchecked_t NextGpadlHandle;
-
- /*
- * Represents channel interrupts. Each bit position represents a
-diff -urNp linux-2.6.32.49/drivers/staging/iio/ring_generic.h linux-2.6.32.49/drivers/staging/iio/ring_generic.h
---- linux-2.6.32.49/drivers/staging/iio/ring_generic.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/iio/ring_generic.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h
+index d926189..17b19fd 100644
+--- a/drivers/staging/iio/ring_generic.h
++++ b/drivers/staging/iio/ring_generic.h
@@ -87,7 +87,7 @@ struct iio_ring_access_funcs {
int (*is_enabled)(struct iio_ring_buffer *ring);
@@ -39935,29 +41741,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/iio/ring_generic.h linux-2.6.32.49/dr
/**
* struct iio_ring_buffer - general ring buffer structure
-diff -urNp linux-2.6.32.49/drivers/staging/octeon/ethernet.c linux-2.6.32.49/drivers/staging/octeon/ethernet.c
---- linux-2.6.32.49/drivers/staging/octeon/ethernet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/octeon/ethernet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -294,11 +294,11 @@ static struct net_device_stats *cvm_oct_
- * since the RX tasklet also increments it.
- */
- #ifdef CONFIG_64BIT
-- atomic64_add(rx_status.dropped_packets,
-- (atomic64_t *)&priv->stats.rx_dropped);
-+ atomic64_add_unchecked(rx_status.dropped_packets,
-+ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
- #else
-- atomic_add(rx_status.dropped_packets,
-- (atomic_t *)&priv->stats.rx_dropped);
-+ atomic_add_unchecked(rx_status.dropped_packets,
-+ (atomic_unchecked_t *)&priv->stats.rx_dropped);
- #endif
- }
-
-diff -urNp linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c
---- linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -406,11 +406,11 @@ void cvm_oct_tasklet_rx(unsigned long un
+diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
+index 1b237b7..88c624e 100644
+--- a/drivers/staging/octeon/ethernet-rx.c
++++ b/drivers/staging/octeon/ethernet-rx.c
+@@ -406,11 +406,11 @@ void cvm_oct_tasklet_rx(unsigned long unused)
/* Increment RX stats for virtual ports */
if (work->ipprt >= CVMX_PIP_NUM_INPUT_PORTS) {
#ifdef CONFIG_64BIT
@@ -39973,7 +41761,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c linux-2.6.32.49/
#endif
}
netif_receive_skb(skb);
-@@ -424,9 +424,9 @@ void cvm_oct_tasklet_rx(unsigned long un
+@@ -424,9 +424,9 @@ void cvm_oct_tasklet_rx(unsigned long unused)
dev->name);
*/
#ifdef CONFIG_64BIT
@@ -39985,9 +41773,30 @@ diff -urNp linux-2.6.32.49/drivers/staging/octeon/ethernet-rx.c linux-2.6.32.49/
#endif
dev_kfree_skb_irq(skb);
}
-diff -urNp linux-2.6.32.49/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.32.49/drivers/staging/otus/80211core/pub_zfi.h
---- linux-2.6.32.49/drivers/staging/otus/80211core/pub_zfi.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/otus/80211core/pub_zfi.h 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
+index 492c502..d9909f1 100644
+--- a/drivers/staging/octeon/ethernet.c
++++ b/drivers/staging/octeon/ethernet.c
+@@ -294,11 +294,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
+ * since the RX tasklet also increments it.
+ */
+ #ifdef CONFIG_64BIT
+- atomic64_add(rx_status.dropped_packets,
+- (atomic64_t *)&priv->stats.rx_dropped);
++ atomic64_add_unchecked(rx_status.dropped_packets,
++ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
+ #else
+- atomic_add(rx_status.dropped_packets,
+- (atomic_t *)&priv->stats.rx_dropped);
++ atomic_add_unchecked(rx_status.dropped_packets,
++ (atomic_unchecked_t *)&priv->stats.rx_dropped);
+ #endif
+ }
+
+diff --git a/drivers/staging/otus/80211core/pub_zfi.h b/drivers/staging/otus/80211core/pub_zfi.h
+index a35bd5d..28fff45 100644
+--- a/drivers/staging/otus/80211core/pub_zfi.h
++++ b/drivers/staging/otus/80211core/pub_zfi.h
@@ -531,7 +531,7 @@ struct zsCbFuncTbl
u8_t (*zfcbClassifyTxPacket)(zdev_t* dev, zbuf_t* buf);
@@ -39997,10 +41806,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.32
extern void zfZeroMemory(u8_t* va, u16_t length);
#define ZM_INIT_CB_FUNC_TABLE(p) zfZeroMemory((u8_t *)p, sizeof(struct zsCbFuncTbl));
-diff -urNp linux-2.6.32.49/drivers/staging/panel/panel.c linux-2.6.32.49/drivers/staging/panel/panel.c
---- linux-2.6.32.49/drivers/staging/panel/panel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/panel/panel.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1305,7 +1305,7 @@ static int lcd_release(struct inode *ino
+diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
+index c39a25f..696f5aa 100644
+--- a/drivers/staging/panel/panel.c
++++ b/drivers/staging/panel/panel.c
+@@ -1305,7 +1305,7 @@ static int lcd_release(struct inode *inode, struct file *file)
return 0;
}
@@ -40009,7 +41819,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/panel/panel.c linux-2.6.32.49/drivers
.write = lcd_write,
.open = lcd_open,
.release = lcd_release,
-@@ -1565,7 +1565,7 @@ static int keypad_release(struct inode *
+@@ -1565,7 +1565,7 @@ static int keypad_release(struct inode *inode, struct file *file)
return 0;
}
@@ -40018,10 +41828,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/panel/panel.c linux-2.6.32.49/drivers
.read = keypad_read, /* read */
.open = keypad_open, /* open */
.release = keypad_release, /* close */
-diff -urNp linux-2.6.32.49/drivers/staging/phison/phison.c linux-2.6.32.49/drivers/staging/phison/phison.c
---- linux-2.6.32.49/drivers/staging/phison/phison.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/phison/phison.c 2011-11-15 19:59:43.000000000 -0500
-@@ -43,7 +43,7 @@ static struct scsi_host_template phison_
+diff --git a/drivers/staging/phison/phison.c b/drivers/staging/phison/phison.c
+index 270ebcb..37e46af 100644
+--- a/drivers/staging/phison/phison.c
++++ b/drivers/staging/phison/phison.c
+@@ -43,7 +43,7 @@ static struct scsi_host_template phison_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -40030,10 +41841,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/phison/phison.c linux-2.6.32.49/drive
.inherits = &ata_bmdma_port_ops,
.prereset = phison_pre_reset,
};
-diff -urNp linux-2.6.32.49/drivers/staging/poch/poch.c linux-2.6.32.49/drivers/staging/poch/poch.c
---- linux-2.6.32.49/drivers/staging/poch/poch.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/poch/poch.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1057,7 +1057,7 @@ static int poch_ioctl(struct inode *inod
+diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c
+index 2eb8e3d..57616a7 100644
+--- a/drivers/staging/poch/poch.c
++++ b/drivers/staging/poch/poch.c
+@@ -1057,7 +1057,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp,
return 0;
}
@@ -40042,10 +41854,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/poch/poch.c linux-2.6.32.49/drivers/s
.owner = THIS_MODULE,
.open = poch_open,
.release = poch_release,
-diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/inode.c linux-2.6.32.49/drivers/staging/pohmelfs/inode.c
---- linux-2.6.32.49/drivers/staging/pohmelfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/pohmelfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1850,7 +1850,7 @@ static int pohmelfs_fill_super(struct su
+diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
+index c94de31..19402bc 100644
+--- a/drivers/staging/pohmelfs/inode.c
++++ b/drivers/staging/pohmelfs/inode.c
+@@ -1850,7 +1850,7 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
mutex_init(&psb->mcache_lock);
psb->mcache_root = RB_ROOT;
psb->mcache_timeout = msecs_to_jiffies(5000);
@@ -40054,7 +41867,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/inode.c linux-2.6.32.49/driv
psb->trans_max_pages = 100;
-@@ -1865,7 +1865,7 @@ static int pohmelfs_fill_super(struct su
+@@ -1865,7 +1865,7 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
INIT_LIST_HEAD(&psb->crypto_ready_list);
INIT_LIST_HEAD(&psb->crypto_active_list);
@@ -40063,10 +41876,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/inode.c linux-2.6.32.49/driv
atomic_long_set(&psb->total_inodes, 0);
mutex_init(&psb->state_lock);
-diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/mcache.c linux-2.6.32.49/drivers/staging/pohmelfs/mcache.c
---- linux-2.6.32.49/drivers/staging/pohmelfs/mcache.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/pohmelfs/mcache.c 2011-11-15 19:59:43.000000000 -0500
-@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_
+diff --git a/drivers/staging/pohmelfs/mcache.c b/drivers/staging/pohmelfs/mcache.c
+index e22665c..a2a9390 100644
+--- a/drivers/staging/pohmelfs/mcache.c
++++ b/drivers/staging/pohmelfs/mcache.c
+@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_alloc(struct pohmelfs_sb *psb, u64 start
m->data = data;
m->start = start;
m->size = size;
@@ -40075,9 +41889,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/mcache.c linux-2.6.32.49/dri
mutex_lock(&psb->mcache_lock);
err = pohmelfs_mcache_insert(psb, m);
-diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/netfs.h linux-2.6.32.49/drivers/staging/pohmelfs/netfs.h
---- linux-2.6.32.49/drivers/staging/pohmelfs/netfs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/pohmelfs/netfs.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/pohmelfs/netfs.h b/drivers/staging/pohmelfs/netfs.h
+index 623a07d..4035c19 100644
+--- a/drivers/staging/pohmelfs/netfs.h
++++ b/drivers/staging/pohmelfs/netfs.h
@@ -570,14 +570,14 @@ struct pohmelfs_config;
struct pohmelfs_sb {
struct rb_root mcache_root;
@@ -40095,10 +41910,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/netfs.h linux-2.6.32.49/driv
unsigned int crypto_attached_size;
unsigned int crypto_align_size;
-diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/trans.c linux-2.6.32.49/drivers/staging/pohmelfs/trans.c
---- linux-2.6.32.49/drivers/staging/pohmelfs/trans.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/pohmelfs/trans.c 2011-11-15 19:59:43.000000000 -0500
-@@ -492,7 +492,7 @@ int netfs_trans_finish(struct netfs_tran
+diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c
+index 36a2535..0591bf4 100644
+--- a/drivers/staging/pohmelfs/trans.c
++++ b/drivers/staging/pohmelfs/trans.c
+@@ -492,7 +492,7 @@ int netfs_trans_finish(struct netfs_trans *t, struct pohmelfs_sb *psb)
int err;
struct netfs_cmd *cmd = t->iovec.iov_base;
@@ -40107,10 +41923,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/pohmelfs/trans.c linux-2.6.32.49/driv
cmd->size = t->iovec.iov_len - sizeof(struct netfs_cmd) +
t->attached_size + t->attached_pages * sizeof(struct netfs_cmd);
-diff -urNp linux-2.6.32.49/drivers/staging/sep/sep_driver.c linux-2.6.32.49/drivers/staging/sep/sep_driver.c
---- linux-2.6.32.49/drivers/staging/sep/sep_driver.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/sep/sep_driver.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2603,7 +2603,7 @@ static struct pci_driver sep_pci_driver
+diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
+index f890a16..509ece8 100644
+--- a/drivers/staging/sep/sep_driver.c
++++ b/drivers/staging/sep/sep_driver.c
+@@ -2603,7 +2603,7 @@ static struct pci_driver sep_pci_driver = {
static dev_t sep_devno;
/* the files operations structure of the driver */
@@ -40119,9 +41936,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/sep/sep_driver.c linux-2.6.32.49/driv
.owner = THIS_MODULE,
.ioctl = sep_ioctl,
.poll = sep_poll,
-diff -urNp linux-2.6.32.49/drivers/staging/usbip/usbip_common.h linux-2.6.32.49/drivers/staging/usbip/usbip_common.h
---- linux-2.6.32.49/drivers/staging/usbip/usbip_common.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/usbip/usbip_common.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h
+index 5e16bc3..7655b10 100644
+--- a/drivers/staging/usbip/usbip_common.h
++++ b/drivers/staging/usbip/usbip_common.h
@@ -374,7 +374,7 @@ struct usbip_device {
void (*shutdown)(struct usbip_device *);
void (*reset)(struct usbip_device *);
@@ -40131,9 +41949,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/usbip_common.h linux-2.6.32.49/
};
-diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci.h linux-2.6.32.49/drivers/staging/usbip/vhci.h
---- linux-2.6.32.49/drivers/staging/usbip/vhci.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/usbip/vhci.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/usbip/vhci.h b/drivers/staging/usbip/vhci.h
+index 57f7946..d9df23d 100644
+--- a/drivers/staging/usbip/vhci.h
++++ b/drivers/staging/usbip/vhci.h
@@ -92,7 +92,7 @@ struct vhci_hcd {
unsigned resuming:1;
unsigned long re_timeout;
@@ -40143,9 +41962,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci.h linux-2.6.32.49/drivers/
/*
* NOTE:
-diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c
---- linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
+index 20cd7db..c2693ff 100644
+--- a/drivers/staging/usbip/vhci_hcd.c
++++ b/drivers/staging/usbip/vhci_hcd.c
@@ -534,7 +534,7 @@ static void vhci_tx_urb(struct urb *urb)
return;
}
@@ -40155,7 +41975,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c linux-2.6.32.49/driv
if (priv->seqnum == 0xffff)
usbip_uinfo("seqnum max\n");
-@@ -793,7 +793,7 @@ static int vhci_urb_dequeue(struct usb_h
+@@ -793,7 +793,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
return -ENOMEM;
}
@@ -40164,7 +41984,7 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c linux-2.6.32.49/driv
if (unlink->seqnum == 0xffff)
usbip_uinfo("seqnum max\n");
-@@ -988,7 +988,7 @@ static int vhci_start(struct usb_hcd *hc
+@@ -988,7 +988,7 @@ static int vhci_start(struct usb_hcd *hcd)
vdev->rhport = rhport;
}
@@ -40173,10 +41993,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_hcd.c linux-2.6.32.49/driv
spin_lock_init(&vhci->lock);
-diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_rx.c linux-2.6.32.49/drivers/staging/usbip/vhci_rx.c
---- linux-2.6.32.49/drivers/staging/usbip/vhci_rx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/usbip/vhci_rx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -78,7 +78,7 @@ static void vhci_recv_ret_submit(struct
+diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c
+index 8ed5206..92469e3 100644
+--- a/drivers/staging/usbip/vhci_rx.c
++++ b/drivers/staging/usbip/vhci_rx.c
+@@ -78,7 +78,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
usbip_uerr("cannot find a urb of seqnum %u\n",
pdu->base.seqnum);
usbip_uinfo("max seqnum %d\n",
@@ -40185,10 +42006,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/usbip/vhci_rx.c linux-2.6.32.49/drive
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
return;
}
-diff -urNp linux-2.6.32.49/drivers/staging/vme/devices/vme_user.c linux-2.6.32.49/drivers/staging/vme/devices/vme_user.c
---- linux-2.6.32.49/drivers/staging/vme/devices/vme_user.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/vme/devices/vme_user.c 2011-11-15 19:59:43.000000000 -0500
-@@ -136,7 +136,7 @@ static int vme_user_ioctl(struct inode *
+diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
+index 7891288..8e31300 100644
+--- a/drivers/staging/vme/devices/vme_user.c
++++ b/drivers/staging/vme/devices/vme_user.c
+@@ -136,7 +136,7 @@ static int vme_user_ioctl(struct inode *, struct file *, unsigned int,
static int __init vme_user_probe(struct device *, int, int);
static int __exit vme_user_remove(struct device *, int, int);
@@ -40197,10 +42019,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/vme/devices/vme_user.c linux-2.6.32.4
.open = vme_user_open,
.release = vme_user_release,
.read = vme_user_read,
-diff -urNp linux-2.6.32.49/drivers/staging/vt6655/hostap.c linux-2.6.32.49/drivers/staging/vt6655/hostap.c
---- linux-2.6.32.49/drivers/staging/vt6655/hostap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/vt6655/hostap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -84,7 +84,7 @@ static int hostap_enable_hostapd(PSDevic
+diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
+index 58abf44..00c1fc8 100644
+--- a/drivers/staging/vt6655/hostap.c
++++ b/drivers/staging/vt6655/hostap.c
+@@ -84,7 +84,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
PSDevice apdev_priv;
struct net_device *dev = pDevice->dev;
int ret;
@@ -40209,10 +42032,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/vt6655/hostap.c linux-2.6.32.49/drive
.ndo_start_xmit = pDevice->tx_80211,
};
-diff -urNp linux-2.6.32.49/drivers/staging/vt6656/hostap.c linux-2.6.32.49/drivers/staging/vt6656/hostap.c
---- linux-2.6.32.49/drivers/staging/vt6656/hostap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/vt6656/hostap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -86,7 +86,7 @@ static int hostap_enable_hostapd(PSDevic
+diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
+index 0c8267a..db1f363 100644
+--- a/drivers/staging/vt6656/hostap.c
++++ b/drivers/staging/vt6656/hostap.c
+@@ -86,7 +86,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
PSDevice apdev_priv;
struct net_device *dev = pDevice->dev;
int ret;
@@ -40221,10 +42045,11 @@ diff -urNp linux-2.6.32.49/drivers/staging/vt6656/hostap.c linux-2.6.32.49/drive
.ndo_start_xmit = pDevice->tx_80211,
};
-diff -urNp linux-2.6.32.49/drivers/staging/wlan-ng/hfa384x_usb.c linux-2.6.32.49/drivers/staging/wlan-ng/hfa384x_usb.c
---- linux-2.6.32.49/drivers/staging/wlan-ng/hfa384x_usb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/staging/wlan-ng/hfa384x_usb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -205,7 +205,7 @@ static void unlocked_usbctlx_complete(hf
+diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
+index 925678b..da7f5ed 100644
+--- a/drivers/staging/wlan-ng/hfa384x_usb.c
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c
+@@ -205,7 +205,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
struct usbctlx_completor {
int (*complete) (struct usbctlx_completor *);
@@ -40233,9 +42058,10 @@ diff -urNp linux-2.6.32.49/drivers/staging/wlan-ng/hfa384x_usb.c linux-2.6.32.49
typedef struct usbctlx_completor usbctlx_completor_t;
static int
-diff -urNp linux-2.6.32.49/drivers/telephony/ixj.c linux-2.6.32.49/drivers/telephony/ixj.c
---- linux-2.6.32.49/drivers/telephony/ixj.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/telephony/ixj.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
+index 40de151..924f268 100644
+--- a/drivers/telephony/ixj.c
++++ b/drivers/telephony/ixj.c
@@ -4976,6 +4976,8 @@ static int ixj_daa_cid_read(IXJ *j)
bool mContinue;
char *pIn, *pOut;
@@ -40245,9 +42071,10 @@ diff -urNp linux-2.6.32.49/drivers/telephony/ixj.c linux-2.6.32.49/drivers/telep
if (!SCI_Prepare(j))
return 0;
-diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
---- linux-2.6.32.49/drivers/uio/uio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/uio/uio.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
+index e941367..b631f5a 100644
+--- a/drivers/uio/uio.c
++++ b/drivers/uio/uio.c
@@ -23,6 +23,7 @@
#include <linux/string.h>
#include <linux/kobject.h>
@@ -40269,7 +42096,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
struct uio_info *info;
struct kobject *map_dir;
struct kobject *portio_dir;
-@@ -129,7 +130,7 @@ static ssize_t map_type_show(struct kobj
+@@ -129,7 +130,7 @@ static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr,
return entry->show(mem, buf);
}
@@ -40278,7 +42105,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
.show = map_type_show,
};
-@@ -217,7 +218,7 @@ static ssize_t portio_type_show(struct k
+@@ -217,7 +218,7 @@ static ssize_t portio_type_show(struct kobject *kobj, struct attribute *attr,
return entry->show(port, buf);
}
@@ -40287,7 +42114,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
.show = portio_type_show,
};
-@@ -255,7 +256,7 @@ static ssize_t show_event(struct device
+@@ -255,7 +256,7 @@ static ssize_t show_event(struct device *dev,
struct uio_device *idev = dev_get_drvdata(dev);
if (idev)
return sprintf(buf, "%u\n",
@@ -40296,7 +42123,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
else
return -ENODEV;
}
-@@ -424,7 +425,7 @@ void uio_event_notify(struct uio_info *i
+@@ -424,7 +425,7 @@ void uio_event_notify(struct uio_info *info)
{
struct uio_device *idev = info->uio_dev;
@@ -40305,7 +42132,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
wake_up_interruptible(&idev->wait);
kill_fasync(&idev->async_queue, SIGIO, POLL_IN);
}
-@@ -477,7 +478,7 @@ static int uio_open(struct inode *inode,
+@@ -477,7 +478,7 @@ static int uio_open(struct inode *inode, struct file *filep)
}
listener->dev = idev;
@@ -40314,7 +42141,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
filep->private_data = listener;
if (idev->info->open) {
-@@ -528,7 +529,7 @@ static unsigned int uio_poll(struct file
+@@ -528,7 +529,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
return -EIO;
poll_wait(filep, &idev->wait, wait);
@@ -40323,7 +42150,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
return POLLIN | POLLRDNORM;
return 0;
}
-@@ -553,7 +554,7 @@ static ssize_t uio_read(struct file *fil
+@@ -553,7 +554,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
do {
set_current_state(TASK_INTERRUPTIBLE);
@@ -40332,7 +42159,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
if (event_count != listener->event_count) {
if (copy_to_user(buf, &event_count, count))
retval = -EFAULT;
-@@ -624,13 +625,13 @@ static int uio_find_mem_index(struct vm_
+@@ -624,13 +625,13 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
static void uio_vma_open(struct vm_area_struct *vma)
{
struct uio_device *idev = vma->vm_private_data;
@@ -40348,7 +42175,7 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
}
static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-@@ -840,7 +841,7 @@ int __uio_register_device(struct module
+@@ -840,7 +841,7 @@ int __uio_register_device(struct module *owner,
idev->owner = owner;
idev->info = info;
init_waitqueue_head(&idev->wait);
@@ -40357,10 +42184,11 @@ diff -urNp linux-2.6.32.49/drivers/uio/uio.c linux-2.6.32.49/drivers/uio/uio.c
ret = uio_get_minor(idev);
if (ret)
-diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/atm/usbatm.c
---- linux-2.6.32.49/drivers/usb/atm/usbatm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/atm/usbatm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(stru
+diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
+index fbea856..06efea6 100644
+--- a/drivers/usb/atm/usbatm.c
++++ b/drivers/usb/atm/usbatm.c
+@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (printk_ratelimit())
atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n",
__func__, vpi, vci);
@@ -40369,7 +42197,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
return;
}
-@@ -361,7 +361,7 @@ static void usbatm_extract_one_cell(stru
+@@ -361,7 +361,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (length > ATM_MAX_AAL5_PDU) {
atm_rldbg(instance, "%s: bogus length %u (vcc: 0x%p)!\n",
__func__, length, vcc);
@@ -40378,7 +42206,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
goto out;
}
-@@ -370,14 +370,14 @@ static void usbatm_extract_one_cell(stru
+@@ -370,14 +370,14 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (sarb->len < pdu_length) {
atm_rldbg(instance, "%s: bogus pdu_length %u (sarb->len: %u, vcc: 0x%p)!\n",
__func__, pdu_length, sarb->len, vcc);
@@ -40395,7 +42223,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
goto out;
}
-@@ -387,7 +387,7 @@ static void usbatm_extract_one_cell(stru
+@@ -387,7 +387,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (printk_ratelimit())
atm_err(instance, "%s: no memory for skb (length: %u)!\n",
__func__, length);
@@ -40404,7 +42232,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
goto out;
}
-@@ -412,7 +412,7 @@ static void usbatm_extract_one_cell(stru
+@@ -412,7 +412,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
vcc->push(vcc, skb);
@@ -40413,7 +42241,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
out:
skb_trim(sarb, 0);
}
-@@ -616,7 +616,7 @@ static void usbatm_tx_process(unsigned l
+@@ -616,7 +616,7 @@ static void usbatm_tx_process(unsigned long data)
struct atm_vcc *vcc = UDSL_SKB(skb)->atm.vcc;
usbatm_pop(vcc, skb);
@@ -40422,7 +42250,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
skb = skb_dequeue(&instance->sndqueue);
}
-@@ -775,11 +775,11 @@ static int usbatm_atm_proc_read(struct a
+@@ -775,11 +775,11 @@ static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *pag
if (!left--)
return sprintf(page,
"AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
@@ -40439,9 +42267,10 @@ diff -urNp linux-2.6.32.49/drivers/usb/atm/usbatm.c linux-2.6.32.49/drivers/usb/
if (!left--) {
if (instance->disconnected)
-diff -urNp linux-2.6.32.49/drivers/usb/class/cdc-wdm.c linux-2.6.32.49/drivers/usb/class/cdc-wdm.c
---- linux-2.6.32.49/drivers/usb/class/cdc-wdm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/class/cdc-wdm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
+index 3e564bf..949b448 100644
+--- a/drivers/usb/class/cdc-wdm.c
++++ b/drivers/usb/class/cdc-wdm.c
@@ -314,7 +314,7 @@ static ssize_t wdm_write
if (r < 0)
goto outnp;
@@ -40451,10 +42280,11 @@ diff -urNp linux-2.6.32.49/drivers/usb/class/cdc-wdm.c linux-2.6.32.49/drivers/u
r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE,
&desc->flags));
else
-diff -urNp linux-2.6.32.49/drivers/usb/core/hcd.c linux-2.6.32.49/drivers/usb/core/hcd.c
---- linux-2.6.32.49/drivers/usb/core/hcd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/core/hcd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2216,7 +2216,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd
+diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
+index 24e6205..fe5a5d4 100644
+--- a/drivers/usb/core/hcd.c
++++ b/drivers/usb/core/hcd.c
+@@ -2216,7 +2216,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown);
#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
@@ -40472,10 +42302,11 @@ diff -urNp linux-2.6.32.49/drivers/usb/core/hcd.c linux-2.6.32.49/drivers/usb/co
{
if (mon_ops)
-diff -urNp linux-2.6.32.49/drivers/usb/core/hcd.h linux-2.6.32.49/drivers/usb/core/hcd.h
---- linux-2.6.32.49/drivers/usb/core/hcd.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/core/hcd.h 2011-11-15 19:59:43.000000000 -0500
-@@ -486,13 +486,13 @@ static inline void usbfs_cleanup(void) {
+diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
+index bcbe104..9cfd1c6 100644
+--- a/drivers/usb/core/hcd.h
++++ b/drivers/usb/core/hcd.h
+@@ -486,13 +486,13 @@ static inline void usbfs_cleanup(void) { }
#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
struct usb_mon_operations {
@@ -40493,7 +42324,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/core/hcd.h linux-2.6.32.49/drivers/usb/co
static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
{
-@@ -514,7 +514,7 @@ static inline void usbmon_urb_complete(s
+@@ -514,7 +514,7 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb,
(*mon_ops->urb_complete)(bus, urb, status);
}
@@ -40502,10 +42333,11 @@ diff -urNp linux-2.6.32.49/drivers/usb/core/hcd.h linux-2.6.32.49/drivers/usb/co
void usb_mon_deregister(void);
#else
-diff -urNp linux-2.6.32.49/drivers/usb/core/message.c linux-2.6.32.49/drivers/usb/core/message.c
---- linux-2.6.32.49/drivers/usb/core/message.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/core/message.c 2011-11-15 19:59:43.000000000 -0500
-@@ -914,8 +914,8 @@ char *usb_cache_string(struct usb_device
+diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
+index 409cc94..a673bad 100644
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -914,8 +914,8 @@ char *usb_cache_string(struct usb_device *udev, int index)
buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
if (buf) {
len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
@@ -40516,10 +42348,11 @@ diff -urNp linux-2.6.32.49/drivers/usb/core/message.c linux-2.6.32.49/drivers/us
if (!smallbuf)
return buf;
memcpy(smallbuf, buf, len);
-diff -urNp linux-2.6.32.49/drivers/usb/misc/appledisplay.c linux-2.6.32.49/drivers/usb/misc/appledisplay.c
---- linux-2.6.32.49/drivers/usb/misc/appledisplay.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/misc/appledisplay.c 2011-11-15 19:59:43.000000000 -0500
-@@ -178,7 +178,7 @@ static int appledisplay_bl_get_brightnes
+diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
+index 62ff5e7..530b74e 100644
+--- a/drivers/usb/misc/appledisplay.c
++++ b/drivers/usb/misc/appledisplay.c
+@@ -178,7 +178,7 @@ static int appledisplay_bl_get_brightness(struct backlight_device *bd)
return pdata->msgdata[1];
}
@@ -40528,9 +42361,10 @@ diff -urNp linux-2.6.32.49/drivers/usb/misc/appledisplay.c linux-2.6.32.49/drive
.get_brightness = appledisplay_bl_get_brightness,
.update_status = appledisplay_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/usb/mon/mon_main.c linux-2.6.32.49/drivers/usb/mon/mon_main.c
---- linux-2.6.32.49/drivers/usb/mon/mon_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/mon/mon_main.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
+index e0c2db3..bd8cb66 100644
+--- a/drivers/usb/mon/mon_main.c
++++ b/drivers/usb/mon/mon_main.c
@@ -238,7 +238,7 @@ static struct notifier_block mon_nb = {
/*
* Ops
@@ -40540,9 +42374,10 @@ diff -urNp linux-2.6.32.49/drivers/usb/mon/mon_main.c linux-2.6.32.49/drivers/us
.urb_submit = mon_submit,
.urb_submit_error = mon_submit_error,
.urb_complete = mon_complete,
-diff -urNp linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h
---- linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/usb/wusbcore/wa-hc.h b/drivers/usb/wusbcore/wa-hc.h
+index d6bea3e..60b250e 100644
+--- a/drivers/usb/wusbcore/wa-hc.h
++++ b/drivers/usb/wusbcore/wa-hc.h
@@ -192,7 +192,7 @@ struct wahc {
struct list_head xfer_delayed_list;
spinlock_t xfer_list_lock;
@@ -40552,7 +42387,7 @@ diff -urNp linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h linux-2.6.32.49/drivers/
};
-@@ -246,7 +246,7 @@ static inline void wa_init(struct wahc *
+@@ -246,7 +246,7 @@ static inline void wa_init(struct wahc *wa)
INIT_LIST_HEAD(&wa->xfer_delayed_list);
spin_lock_init(&wa->xfer_list_lock);
INIT_WORK(&wa->xfer_work, wa_urb_enqueue_run);
@@ -40561,9 +42396,10 @@ diff -urNp linux-2.6.32.49/drivers/usb/wusbcore/wa-hc.h linux-2.6.32.49/drivers/
}
/**
-diff -urNp linux-2.6.32.49/drivers/usb/wusbcore/wa-xfer.c linux-2.6.32.49/drivers/usb/wusbcore/wa-xfer.c
---- linux-2.6.32.49/drivers/usb/wusbcore/wa-xfer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/usb/wusbcore/wa-xfer.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
+index 613a5fc..3174865 100644
+--- a/drivers/usb/wusbcore/wa-xfer.c
++++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -293,7 +293,7 @@ out:
*/
static void wa_xfer_id_init(struct wa_xfer *xfer)
@@ -40573,10 +42409,11 @@ diff -urNp linux-2.6.32.49/drivers/usb/wusbcore/wa-xfer.c linux-2.6.32.49/driver
}
/*
-diff -urNp linux-2.6.32.49/drivers/uwb/wlp/messages.c linux-2.6.32.49/drivers/uwb/wlp/messages.c
---- linux-2.6.32.49/drivers/uwb/wlp/messages.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/uwb/wlp/messages.c 2011-11-15 19:59:43.000000000 -0500
-@@ -903,7 +903,7 @@ int wlp_parse_f0(struct wlp *wlp, struct
+diff --git a/drivers/uwb/wlp/messages.c b/drivers/uwb/wlp/messages.c
+index aa42fce..f8a828c 100644
+--- a/drivers/uwb/wlp/messages.c
++++ b/drivers/uwb/wlp/messages.c
+@@ -903,7 +903,7 @@ int wlp_parse_f0(struct wlp *wlp, struct sk_buff *skb)
size_t len = skb->len;
size_t used;
ssize_t result;
@@ -40585,10 +42422,11 @@ diff -urNp linux-2.6.32.49/drivers/uwb/wlp/messages.c linux-2.6.32.49/drivers/uw
enum wlp_assc_error assc_err;
char enonce_buf[WLP_WSS_NONCE_STRSIZE];
char rnonce_buf[WLP_WSS_NONCE_STRSIZE];
-diff -urNp linux-2.6.32.49/drivers/uwb/wlp/sysfs.c linux-2.6.32.49/drivers/uwb/wlp/sysfs.c
---- linux-2.6.32.49/drivers/uwb/wlp/sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/uwb/wlp/sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -615,8 +615,7 @@ ssize_t wlp_wss_attr_store(struct kobjec
+diff --git a/drivers/uwb/wlp/sysfs.c b/drivers/uwb/wlp/sysfs.c
+index 0370399..6627c94 100644
+--- a/drivers/uwb/wlp/sysfs.c
++++ b/drivers/uwb/wlp/sysfs.c
+@@ -615,8 +615,7 @@ ssize_t wlp_wss_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -40598,10 +42436,11 @@ diff -urNp linux-2.6.32.49/drivers/uwb/wlp/sysfs.c linux-2.6.32.49/drivers/uwb/w
.show = wlp_wss_attr_show,
.store = wlp_wss_attr_store,
};
-diff -urNp linux-2.6.32.49/drivers/video/atmel_lcdfb.c linux-2.6.32.49/drivers/video/atmel_lcdfb.c
---- linux-2.6.32.49/drivers/video/atmel_lcdfb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/atmel_lcdfb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -110,7 +110,7 @@ static int atmel_bl_get_brightness(struc
+diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
+index d5e8010..5687b56 100644
+--- a/drivers/video/atmel_lcdfb.c
++++ b/drivers/video/atmel_lcdfb.c
+@@ -110,7 +110,7 @@ static int atmel_bl_get_brightness(struct backlight_device *bl)
return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
}
@@ -40610,9 +42449,10 @@ diff -urNp linux-2.6.32.49/drivers/video/atmel_lcdfb.c linux-2.6.32.49/drivers/v
.update_status = atmel_bl_update_status,
.get_brightness = atmel_bl_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/aty/aty128fb.c linux-2.6.32.49/drivers/video/aty/aty128fb.c
---- linux-2.6.32.49/drivers/video/aty/aty128fb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/aty/aty128fb.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
+index e4e4d43..66bcbcc 100644
+--- a/drivers/video/aty/aty128fb.c
++++ b/drivers/video/aty/aty128fb.c
@@ -149,7 +149,7 @@ enum {
};
@@ -40622,7 +42462,7 @@ diff -urNp linux-2.6.32.49/drivers/video/aty/aty128fb.c linux-2.6.32.49/drivers/
"AGP",
"PCI",
"PRO AGP",
-@@ -1787,7 +1787,7 @@ static int aty128_bl_get_brightness(stru
+@@ -1787,7 +1787,7 @@ static int aty128_bl_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -40631,10 +42471,11 @@ diff -urNp linux-2.6.32.49/drivers/video/aty/aty128fb.c linux-2.6.32.49/drivers/
.get_brightness = aty128_bl_get_brightness,
.update_status = aty128_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/aty/atyfb_base.c linux-2.6.32.49/drivers/video/aty/atyfb_base.c
---- linux-2.6.32.49/drivers/video/aty/atyfb_base.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/aty/atyfb_base.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2225,7 +2225,7 @@ static int aty_bl_get_brightness(struct
+diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
+index 913b4a4..9295a38 100644
+--- a/drivers/video/aty/atyfb_base.c
++++ b/drivers/video/aty/atyfb_base.c
+@@ -2225,7 +2225,7 @@ static int aty_bl_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -40643,10 +42484,11 @@ diff -urNp linux-2.6.32.49/drivers/video/aty/atyfb_base.c linux-2.6.32.49/driver
.get_brightness = aty_bl_get_brightness,
.update_status = aty_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/aty/radeon_backlight.c linux-2.6.32.49/drivers/video/aty/radeon_backlight.c
---- linux-2.6.32.49/drivers/video/aty/radeon_backlight.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/aty/radeon_backlight.c 2011-11-15 19:59:43.000000000 -0500
-@@ -127,7 +127,7 @@ static int radeon_bl_get_brightness(stru
+diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
+index 1a056ad..221bd6a 100644
+--- a/drivers/video/aty/radeon_backlight.c
++++ b/drivers/video/aty/radeon_backlight.c
+@@ -127,7 +127,7 @@ static int radeon_bl_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -40655,10 +42497,11 @@ diff -urNp linux-2.6.32.49/drivers/video/aty/radeon_backlight.c linux-2.6.32.49/
.get_brightness = radeon_bl_get_brightness,
.update_status = radeon_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/adp5520_bl.c linux-2.6.32.49/drivers/video/backlight/adp5520_bl.c
---- linux-2.6.32.49/drivers/video/backlight/adp5520_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/adp5520_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -84,7 +84,7 @@ static int adp5520_bl_get_brightness(str
+diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c
+index ad05da5..3cb2cb9 100644
+--- a/drivers/video/backlight/adp5520_bl.c
++++ b/drivers/video/backlight/adp5520_bl.c
+@@ -84,7 +84,7 @@ static int adp5520_bl_get_brightness(struct backlight_device *bl)
return error ? data->current_brightness : reg_val;
}
@@ -40667,10 +42510,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/adp5520_bl.c linux-2.6.32.49/
.update_status = adp5520_bl_update_status,
.get_brightness = adp5520_bl_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/adx_bl.c linux-2.6.32.49/drivers/video/backlight/adx_bl.c
---- linux-2.6.32.49/drivers/video/backlight/adx_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/adx_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -61,7 +61,7 @@ static int adx_backlight_check_fb(struct
+diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c
+index 2c3bdfc..d769b0b 100644
+--- a/drivers/video/backlight/adx_bl.c
++++ b/drivers/video/backlight/adx_bl.c
+@@ -61,7 +61,7 @@ static int adx_backlight_check_fb(struct fb_info *fb)
return 1;
}
@@ -40679,10 +42523,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/adx_bl.c linux-2.6.32.49/driv
.options = 0,
.update_status = adx_backlight_update_status,
.get_brightness = adx_backlight_get_brightness,
-diff -urNp linux-2.6.32.49/drivers/video/backlight/atmel-pwm-bl.c linux-2.6.32.49/drivers/video/backlight/atmel-pwm-bl.c
---- linux-2.6.32.49/drivers/video/backlight/atmel-pwm-bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/atmel-pwm-bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -113,7 +113,7 @@ static int atmel_pwm_bl_init_pwm(struct
+diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c
+index 505c082..6b6b3cc 100644
+--- a/drivers/video/backlight/atmel-pwm-bl.c
++++ b/drivers/video/backlight/atmel-pwm-bl.c
+@@ -113,7 +113,7 @@ static int atmel_pwm_bl_init_pwm(struct atmel_pwm_bl *pwmbl)
return pwm_channel_enable(&pwmbl->pwmc);
}
@@ -40691,9 +42536,10 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/atmel-pwm-bl.c linux-2.6.32.4
.get_brightness = atmel_pwm_bl_get_intensity,
.update_status = atmel_pwm_bl_set_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/backlight.c linux-2.6.32.49/drivers/video/backlight/backlight.c
---- linux-2.6.32.49/drivers/video/backlight/backlight.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/backlight.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
+index 5e20e6e..89025e6 100644
+--- a/drivers/video/backlight/backlight.c
++++ b/drivers/video/backlight/backlight.c
@@ -269,7 +269,7 @@ EXPORT_SYMBOL(backlight_force_update);
* ERR_PTR() or a pointer to the newly allocated device.
*/
@@ -40703,10 +42549,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/backlight.c linux-2.6.32.49/d
{
struct backlight_device *new_bd;
int rc;
-diff -urNp linux-2.6.32.49/drivers/video/backlight/corgi_lcd.c linux-2.6.32.49/drivers/video/backlight/corgi_lcd.c
---- linux-2.6.32.49/drivers/video/backlight/corgi_lcd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/corgi_lcd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -451,7 +451,7 @@ void corgi_lcd_limit_intensity(int limit
+diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
+index 9677494..b4bcf80 100644
+--- a/drivers/video/backlight/corgi_lcd.c
++++ b/drivers/video/backlight/corgi_lcd.c
+@@ -451,7 +451,7 @@ void corgi_lcd_limit_intensity(int limit)
}
EXPORT_SYMBOL(corgi_lcd_limit_intensity);
@@ -40715,10 +42562,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/corgi_lcd.c linux-2.6.32.49/d
.get_brightness = corgi_bl_get_intensity,
.update_status = corgi_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/cr_bllcd.c linux-2.6.32.49/drivers/video/backlight/cr_bllcd.c
---- linux-2.6.32.49/drivers/video/backlight/cr_bllcd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/cr_bllcd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -108,7 +108,7 @@ static int cr_backlight_get_intensity(st
+diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c
+index b9fe62b..2914bf1 100644
+--- a/drivers/video/backlight/cr_bllcd.c
++++ b/drivers/video/backlight/cr_bllcd.c
+@@ -108,7 +108,7 @@ static int cr_backlight_get_intensity(struct backlight_device *bd)
return intensity;
}
@@ -40727,10 +42575,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/cr_bllcd.c linux-2.6.32.49/dr
.get_brightness = cr_backlight_get_intensity,
.update_status = cr_backlight_set_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/da903x_bl.c linux-2.6.32.49/drivers/video/backlight/da903x_bl.c
---- linux-2.6.32.49/drivers/video/backlight/da903x_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/da903x_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -94,7 +94,7 @@ static int da903x_backlight_get_brightne
+diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c
+index 701a108..feacfd5 100644
+--- a/drivers/video/backlight/da903x_bl.c
++++ b/drivers/video/backlight/da903x_bl.c
+@@ -94,7 +94,7 @@ static int da903x_backlight_get_brightness(struct backlight_device *bl)
return data->current_brightness;
}
@@ -40739,9 +42588,10 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/da903x_bl.c linux-2.6.32.49/d
.update_status = da903x_backlight_update_status,
.get_brightness = da903x_backlight_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/generic_bl.c linux-2.6.32.49/drivers/video/backlight/generic_bl.c
---- linux-2.6.32.49/drivers/video/backlight/generic_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/generic_bl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c
+index 6d27f62..e6d348e 100644
+--- a/drivers/video/backlight/generic_bl.c
++++ b/drivers/video/backlight/generic_bl.c
@@ -70,7 +70,7 @@ void corgibl_limit_intensity(int limit)
}
EXPORT_SYMBOL(corgibl_limit_intensity);
@@ -40751,10 +42601,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/generic_bl.c linux-2.6.32.49/
.options = BL_CORE_SUSPENDRESUME,
.get_brightness = genericbl_get_intensity,
.update_status = genericbl_send_intensity,
-diff -urNp linux-2.6.32.49/drivers/video/backlight/hp680_bl.c linux-2.6.32.49/drivers/video/backlight/hp680_bl.c
---- linux-2.6.32.49/drivers/video/backlight/hp680_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/hp680_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -98,7 +98,7 @@ static int hp680bl_get_intensity(struct
+diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
+index 7fb4eef..f7cc528 100644
+--- a/drivers/video/backlight/hp680_bl.c
++++ b/drivers/video/backlight/hp680_bl.c
+@@ -98,7 +98,7 @@ static int hp680bl_get_intensity(struct backlight_device *bd)
return current_intensity;
}
@@ -40763,9 +42614,10 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/hp680_bl.c linux-2.6.32.49/dr
.get_brightness = hp680bl_get_intensity,
.update_status = hp680bl_set_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/jornada720_bl.c linux-2.6.32.49/drivers/video/backlight/jornada720_bl.c
---- linux-2.6.32.49/drivers/video/backlight/jornada720_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/jornada720_bl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
+index 7aed256..db9071f 100644
+--- a/drivers/video/backlight/jornada720_bl.c
++++ b/drivers/video/backlight/jornada720_bl.c
@@ -93,7 +93,7 @@ out:
return ret;
}
@@ -40775,10 +42627,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/jornada720_bl.c linux-2.6.32.
.get_brightness = jornada_bl_get_brightness,
.update_status = jornada_bl_update_status,
.options = BL_CORE_SUSPENDRESUME,
-diff -urNp linux-2.6.32.49/drivers/video/backlight/kb3886_bl.c linux-2.6.32.49/drivers/video/backlight/kb3886_bl.c
---- linux-2.6.32.49/drivers/video/backlight/kb3886_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/kb3886_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -134,7 +134,7 @@ static int kb3886bl_get_intensity(struct
+diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c
+index a38fda1..939e7b8 100644
+--- a/drivers/video/backlight/kb3886_bl.c
++++ b/drivers/video/backlight/kb3886_bl.c
+@@ -134,7 +134,7 @@ static int kb3886bl_get_intensity(struct backlight_device *bd)
return kb3886bl_intensity;
}
@@ -40787,10 +42640,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/kb3886_bl.c linux-2.6.32.49/d
.get_brightness = kb3886bl_get_intensity,
.update_status = kb3886bl_send_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/locomolcd.c linux-2.6.32.49/drivers/video/backlight/locomolcd.c
---- linux-2.6.32.49/drivers/video/backlight/locomolcd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/locomolcd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -141,7 +141,7 @@ static int locomolcd_get_intensity(struc
+diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
+index 6b488b8..00a9591 100644
+--- a/drivers/video/backlight/locomolcd.c
++++ b/drivers/video/backlight/locomolcd.c
+@@ -141,7 +141,7 @@ static int locomolcd_get_intensity(struct backlight_device *bd)
return current_intensity;
}
@@ -40799,9 +42653,10 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/locomolcd.c linux-2.6.32.49/d
.get_brightness = locomolcd_get_intensity,
.update_status = locomolcd_set_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/mbp_nvidia_bl.c linux-2.6.32.49/drivers/video/backlight/mbp_nvidia_bl.c
---- linux-2.6.32.49/drivers/video/backlight/mbp_nvidia_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/mbp_nvidia_bl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/backlight/mbp_nvidia_bl.c b/drivers/video/backlight/mbp_nvidia_bl.c
+index 99bdfa8..3dac448 100644
+--- a/drivers/video/backlight/mbp_nvidia_bl.c
++++ b/drivers/video/backlight/mbp_nvidia_bl.c
@@ -33,7 +33,7 @@ struct dmi_match_data {
unsigned long iostart;
unsigned long iolen;
@@ -40811,10 +42666,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/mbp_nvidia_bl.c linux-2.6.32.
};
/* Module parameters. */
-diff -urNp linux-2.6.32.49/drivers/video/backlight/omap1_bl.c linux-2.6.32.49/drivers/video/backlight/omap1_bl.c
---- linux-2.6.32.49/drivers/video/backlight/omap1_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/omap1_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -125,7 +125,7 @@ static int omapbl_get_intensity(struct b
+diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c
+index cbad67e..3cf900e 100644
+--- a/drivers/video/backlight/omap1_bl.c
++++ b/drivers/video/backlight/omap1_bl.c
+@@ -125,7 +125,7 @@ static int omapbl_get_intensity(struct backlight_device *dev)
return bl->current_intensity;
}
@@ -40823,10 +42679,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/omap1_bl.c linux-2.6.32.49/dr
.get_brightness = omapbl_get_intensity,
.update_status = omapbl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/progear_bl.c linux-2.6.32.49/drivers/video/backlight/progear_bl.c
---- linux-2.6.32.49/drivers/video/backlight/progear_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/progear_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -54,7 +54,7 @@ static int progearbl_get_intensity(struc
+diff --git a/drivers/video/backlight/progear_bl.c b/drivers/video/backlight/progear_bl.c
+index 9edaf24..075786e 100644
+--- a/drivers/video/backlight/progear_bl.c
++++ b/drivers/video/backlight/progear_bl.c
+@@ -54,7 +54,7 @@ static int progearbl_get_intensity(struct backlight_device *bd)
return intensity - HW_LEVEL_MIN;
}
@@ -40835,10 +42692,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/progear_bl.c linux-2.6.32.49/
.get_brightness = progearbl_get_intensity,
.update_status = progearbl_set_intensity,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/pwm_bl.c linux-2.6.32.49/drivers/video/backlight/pwm_bl.c
---- linux-2.6.32.49/drivers/video/backlight/pwm_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/pwm_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -56,7 +56,7 @@ static int pwm_backlight_get_brightness(
+diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
+index 8871662..df9e0b3 100644
+--- a/drivers/video/backlight/pwm_bl.c
++++ b/drivers/video/backlight/pwm_bl.c
+@@ -56,7 +56,7 @@ static int pwm_backlight_get_brightness(struct backlight_device *bl)
return bl->props.brightness;
}
@@ -40847,10 +42705,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/pwm_bl.c linux-2.6.32.49/driv
.update_status = pwm_backlight_update_status,
.get_brightness = pwm_backlight_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/tosa_bl.c linux-2.6.32.49/drivers/video/backlight/tosa_bl.c
---- linux-2.6.32.49/drivers/video/backlight/tosa_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/tosa_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -72,7 +72,7 @@ static int tosa_bl_get_brightness(struct
+diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
+index 43edbad..e14ce4d 100644
+--- a/drivers/video/backlight/tosa_bl.c
++++ b/drivers/video/backlight/tosa_bl.c
+@@ -72,7 +72,7 @@ static int tosa_bl_get_brightness(struct backlight_device *dev)
return props->brightness;
}
@@ -40859,10 +42718,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/tosa_bl.c linux-2.6.32.49/dri
.get_brightness = tosa_bl_get_brightness,
.update_status = tosa_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/backlight/wm831x_bl.c linux-2.6.32.49/drivers/video/backlight/wm831x_bl.c
---- linux-2.6.32.49/drivers/video/backlight/wm831x_bl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/backlight/wm831x_bl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -112,7 +112,7 @@ static int wm831x_backlight_get_brightne
+diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c
+index 467bdb7..e32add3 100644
+--- a/drivers/video/backlight/wm831x_bl.c
++++ b/drivers/video/backlight/wm831x_bl.c
+@@ -112,7 +112,7 @@ static int wm831x_backlight_get_brightness(struct backlight_device *bl)
return data->current_brightness;
}
@@ -40871,10 +42731,11 @@ diff -urNp linux-2.6.32.49/drivers/video/backlight/wm831x_bl.c linux-2.6.32.49/d
.options = BL_CORE_SUSPENDRESUME,
.update_status = wm831x_backlight_update_status,
.get_brightness = wm831x_backlight_get_brightness,
-diff -urNp linux-2.6.32.49/drivers/video/bf54x-lq043fb.c linux-2.6.32.49/drivers/video/bf54x-lq043fb.c
---- linux-2.6.32.49/drivers/video/bf54x-lq043fb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/bf54x-lq043fb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -463,7 +463,7 @@ static int bl_get_brightness(struct back
+diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
+index e49ae5e..db4e6f7 100644
+--- a/drivers/video/bf54x-lq043fb.c
++++ b/drivers/video/bf54x-lq043fb.c
+@@ -463,7 +463,7 @@ static int bl_get_brightness(struct backlight_device *bd)
return 0;
}
@@ -40883,10 +42744,11 @@ diff -urNp linux-2.6.32.49/drivers/video/bf54x-lq043fb.c linux-2.6.32.49/drivers
.get_brightness = bl_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/bfin-t350mcqb-fb.c linux-2.6.32.49/drivers/video/bfin-t350mcqb-fb.c
---- linux-2.6.32.49/drivers/video/bfin-t350mcqb-fb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/bfin-t350mcqb-fb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -381,7 +381,7 @@ static int bl_get_brightness(struct back
+diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
+index 2c72a7c..d523e52 100644
+--- a/drivers/video/bfin-t350mcqb-fb.c
++++ b/drivers/video/bfin-t350mcqb-fb.c
+@@ -381,7 +381,7 @@ static int bl_get_brightness(struct backlight_device *bd)
return 0;
}
@@ -40895,10 +42757,11 @@ diff -urNp linux-2.6.32.49/drivers/video/bfin-t350mcqb-fb.c linux-2.6.32.49/driv
.get_brightness = bl_get_brightness,
};
-diff -urNp linux-2.6.32.49/drivers/video/fbcmap.c linux-2.6.32.49/drivers/video/fbcmap.c
---- linux-2.6.32.49/drivers/video/fbcmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/fbcmap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -266,8 +266,7 @@ int fb_set_user_cmap(struct fb_cmap_user
+diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
+index f53b9f1..958bf4e 100644
+--- a/drivers/video/fbcmap.c
++++ b/drivers/video/fbcmap.c
+@@ -266,8 +266,7 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
rc = -ENODEV;
goto out;
}
@@ -40908,10 +42771,11 @@ diff -urNp linux-2.6.32.49/drivers/video/fbcmap.c linux-2.6.32.49/drivers/video/
rc = -EINVAL;
goto out1;
}
-diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/fbmem.c
---- linux-2.6.32.49/drivers/video/fbmem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/fbmem.c 2011-11-15 19:59:43.000000000 -0500
-@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_in
+diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
+index 99bbd28..ad3829e 100644
+--- a/drivers/video/fbmem.c
++++ b/drivers/video/fbmem.c
+@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dx += image->width + 8;
}
} else if (rotate == FB_ROTATE_UD) {
@@ -40920,7 +42784,7 @@ diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/f
info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8;
}
-@@ -415,7 +415,7 @@ static void fb_do_show_logo(struct fb_in
+@@ -415,7 +415,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dy += image->height + 8;
}
} else if (rotate == FB_ROTATE_CCW) {
@@ -40929,7 +42793,7 @@ diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/f
info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8;
}
-@@ -915,6 +915,8 @@ fb_set_var(struct fb_info *info, struct
+@@ -915,6 +915,8 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
int flags = info->flags;
int ret = 0;
@@ -40938,7 +42802,7 @@ diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/f
if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
-@@ -1040,6 +1042,8 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1040,6 +1042,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
void __user *argp = (void __user *)arg;
long ret = 0;
@@ -40947,7 +42811,7 @@ diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/f
switch (cmd) {
case FBIOGET_VSCREENINFO:
if (!lock_fb_info(info))
-@@ -1119,7 +1123,7 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1119,7 +1123,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return -EFAULT;
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
@@ -40956,9 +42820,10 @@ diff -urNp linux-2.6.32.49/drivers/video/fbmem.c linux-2.6.32.49/drivers/video/f
return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
-diff -urNp linux-2.6.32.49/drivers/video/geode/gx1fb_core.c linux-2.6.32.49/drivers/video/geode/gx1fb_core.c
---- linux-2.6.32.49/drivers/video/geode/gx1fb_core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/geode/gx1fb_core.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
+index f20eff8..3e4f622 100644
+--- a/drivers/video/geode/gx1fb_core.c
++++ b/drivers/video/geode/gx1fb_core.c
@@ -30,7 +30,7 @@ static int crt_option = 1;
static char panel_option[32] = "";
@@ -40968,9 +42833,10 @@ diff -urNp linux-2.6.32.49/drivers/video/geode/gx1fb_core.c linux-2.6.32.49/driv
/* 640x480-60 VESA */
{ NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
-diff -urNp linux-2.6.32.49/drivers/video/gxt4500.c linux-2.6.32.49/drivers/video/gxt4500.c
---- linux-2.6.32.49/drivers/video/gxt4500.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/gxt4500.c 2011-11-18 18:01:55.000000000 -0500
+diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
+index 896e53d..4d87d0b 100644
+--- a/drivers/video/gxt4500.c
++++ b/drivers/video/gxt4500.c
@@ -156,7 +156,7 @@ struct gxt4500_par {
static char *mode_option;
@@ -40980,7 +42846,7 @@ diff -urNp linux-2.6.32.49/drivers/video/gxt4500.c linux-2.6.32.49/drivers/video
.refresh = 60,
.xres = 1280,
.yres = 1024,
-@@ -581,7 +581,7 @@ static int gxt4500_blank(int blank, stru
+@@ -581,7 +581,7 @@ static int gxt4500_blank(int blank, struct fb_info *info)
return 0;
}
@@ -40989,10 +42855,11 @@ diff -urNp linux-2.6.32.49/drivers/video/gxt4500.c linux-2.6.32.49/drivers/video
.id = "IBM GXT4500P",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR,
-diff -urNp linux-2.6.32.49/drivers/video/i810/i810_accel.c linux-2.6.32.49/drivers/video/i810/i810_accel.c
---- linux-2.6.32.49/drivers/video/i810/i810_accel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/i810/i810_accel.c 2011-11-15 19:59:43.000000000 -0500
-@@ -73,6 +73,7 @@ static inline int wait_for_space(struct
+diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
+index f5bedee..28c6028 100644
+--- a/drivers/video/i810/i810_accel.c
++++ b/drivers/video/i810/i810_accel.c
+@@ -73,6 +73,7 @@ static inline int wait_for_space(struct fb_info *info, u32 space)
}
}
printk("ringbuffer lockup!!!\n");
@@ -41000,10 +42867,11 @@ diff -urNp linux-2.6.32.49/drivers/video/i810/i810_accel.c linux-2.6.32.49/drive
i810_report_error(mmio);
par->dev_flags |= LOCKUP;
info->pixmap.scan_align = 1;
-diff -urNp linux-2.6.32.49/drivers/video/i810/i810_main.c linux-2.6.32.49/drivers/video/i810/i810_main.c
---- linux-2.6.32.49/drivers/video/i810/i810_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/i810/i810_main.c 2011-11-18 18:01:55.000000000 -0500
-@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_
+diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
+index 5743ea2..457f82c 100644
+--- a/drivers/video/i810/i810_main.c
++++ b/drivers/video/i810/i810_main.c
+@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_mode, struct fb_info *info);
static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par);
/* PCI */
@@ -41012,9 +42880,10 @@ diff -urNp linux-2.6.32.49/drivers/video/i810/i810_main.c linux-2.6.32.49/driver
"Intel(R) 810 Framebuffer Device" ,
"Intel(R) 810-DC100 Framebuffer Device" ,
"Intel(R) 810E Framebuffer Device" ,
-diff -urNp linux-2.6.32.49/drivers/video/logo/logo_linux_clut224.ppm linux-2.6.32.49/drivers/video/logo/logo_linux_clut224.ppm
---- linux-2.6.32.49/drivers/video/logo/logo_linux_clut224.ppm 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/logo/logo_linux_clut224.ppm 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm
+index 3c14e43..eafa544 100644
+--- a/drivers/video/logo/logo_linux_clut224.ppm
++++ b/drivers/video/logo/logo_linux_clut224.ppm
@@ -1,1604 +1,1123 @@
P3
-# Standard 224-color Linux logo
@@ -43740,10 +45609,11 @@ diff -urNp linux-2.6.32.49/drivers/video/logo/logo_linux_clut224.ppm linux-2.6.3
+4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+4 4 4 4 4 4
-diff -urNp linux-2.6.32.49/drivers/video/nvidia/nv_backlight.c linux-2.6.32.49/drivers/video/nvidia/nv_backlight.c
---- linux-2.6.32.49/drivers/video/nvidia/nv_backlight.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/nvidia/nv_backlight.c 2011-11-15 19:59:43.000000000 -0500
-@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(stru
+diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c
+index 443e3c8..c443d6a 100644
+--- a/drivers/video/nvidia/nv_backlight.c
++++ b/drivers/video/nvidia/nv_backlight.c
+@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -43752,10 +45622,11 @@ diff -urNp linux-2.6.32.49/drivers/video/nvidia/nv_backlight.c linux-2.6.32.49/d
.get_brightness = nvidia_bl_get_brightness,
.update_status = nvidia_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/riva/fbdev.c linux-2.6.32.49/drivers/video/riva/fbdev.c
---- linux-2.6.32.49/drivers/video/riva/fbdev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/riva/fbdev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct
+diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
+index d94c57f..912984c 100644
+--- a/drivers/video/riva/fbdev.c
++++ b/drivers/video/riva/fbdev.c
+@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct backlight_device *bd)
return bd->props.brightness;
}
@@ -43764,9 +45635,10 @@ diff -urNp linux-2.6.32.49/drivers/video/riva/fbdev.c linux-2.6.32.49/drivers/vi
.get_brightness = riva_bl_get_brightness,
.update_status = riva_bl_update_status,
};
-diff -urNp linux-2.6.32.49/drivers/video/uvesafb.c linux-2.6.32.49/drivers/video/uvesafb.c
---- linux-2.6.32.49/drivers/video/uvesafb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/uvesafb.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
+index 54fbb29..2c108fc 100644
+--- a/drivers/video/uvesafb.c
++++ b/drivers/video/uvesafb.c
@@ -18,6 +18,7 @@
#include <linux/fb.h>
#include <linux/io.h>
@@ -43784,7 +45656,7 @@ diff -urNp linux-2.6.32.49/drivers/video/uvesafb.c linux-2.6.32.49/drivers/video
}
/*
-@@ -568,10 +569,32 @@ static int __devinit uvesafb_vbe_getpmi(
+@@ -568,10 +569,32 @@ static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
par->pmi_setpal = par->ypan = 0;
} else {
@@ -43829,7 +45701,7 @@ diff -urNp linux-2.6.32.49/drivers/video/uvesafb.c linux-2.6.32.49/drivers/video
framebuffer_release(info);
return err;
}
-@@ -1825,6 +1853,12 @@ static int uvesafb_remove(struct platfor
+@@ -1825,6 +1853,12 @@ static int uvesafb_remove(struct platform_device *dev)
kfree(par->vbe_state_orig);
if (par->vbe_state_saved)
kfree(par->vbe_state_saved);
@@ -43842,9 +45714,10 @@ diff -urNp linux-2.6.32.49/drivers/video/uvesafb.c linux-2.6.32.49/drivers/video
}
framebuffer_release(info);
-diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/vesafb.c
---- linux-2.6.32.49/drivers/video/vesafb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/video/vesafb.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
+index bd37ee1..cb827e8 100644
+--- a/drivers/video/vesafb.c
++++ b/drivers/video/vesafb.c
@@ -9,6 +9,7 @@
*/
@@ -43853,7 +45726,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
-@@ -53,8 +54,8 @@ static int vram_remap __initdata; /*
+@@ -53,8 +54,8 @@ static int vram_remap __initdata; /* Set amount of memory to be used */
static int vram_total __initdata; /* Set total amount of memory */
static int pmi_setpal __read_mostly = 1; /* pmi for palette changes ??? */
static int ypan __read_mostly; /* 0..nothing, 1..ypan, 2..ywrap */
@@ -43864,7 +45737,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
static int depth __read_mostly;
static int vga_compat __read_mostly;
/* --------------------------------------------------------------------- */
-@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct pl
+@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct platform_device *dev)
unsigned int size_vmode;
unsigned int size_remap;
unsigned int size_total;
@@ -43872,7 +45745,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
return -ENODEV;
-@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct pl
+@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct platform_device *dev)
size_remap = size_total;
vesafb_fix.smem_len = size_remap;
@@ -43883,7 +45756,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
printk(KERN_WARNING
"vesafb: cannot reserve video memory at 0x%lx\n",
-@@ -315,9 +313,21 @@ static int __init vesafb_probe(struct pl
+@@ -315,9 +313,21 @@ static int __init vesafb_probe(struct platform_device *dev)
printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages);
@@ -43907,7 +45780,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
}
if (screen_info.vesapm_seg < 0xc000)
-@@ -325,9 +335,25 @@ static int __init vesafb_probe(struct pl
+@@ -325,9 +335,25 @@ static int __init vesafb_probe(struct platform_device *dev)
if (ypan || pmi_setpal) {
unsigned short *pmi_base;
@@ -43935,7 +45808,7 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal);
if (pmi_base[3]) {
printk(KERN_INFO "vesafb: pmi: ports = ");
-@@ -469,6 +495,11 @@ static int __init vesafb_probe(struct pl
+@@ -469,6 +495,11 @@ static int __init vesafb_probe(struct platform_device *dev)
info->node, info->fix.id);
return 0;
err:
@@ -43947,10 +45820,11 @@ diff -urNp linux-2.6.32.49/drivers/video/vesafb.c linux-2.6.32.49/drivers/video/
if (info->screen_base)
iounmap(info->screen_base);
framebuffer_release(info);
-diff -urNp linux-2.6.32.49/drivers/xen/sys-hypervisor.c linux-2.6.32.49/drivers/xen/sys-hypervisor.c
---- linux-2.6.32.49/drivers/xen/sys-hypervisor.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/drivers/xen/sys-hypervisor.c 2011-11-15 19:59:43.000000000 -0500
-@@ -425,7 +425,7 @@ static ssize_t hyp_sysfs_store(struct ko
+diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
+index 88a60e0..6783cc2 100644
+--- a/drivers/xen/sys-hypervisor.c
++++ b/drivers/xen/sys-hypervisor.c
+@@ -425,7 +425,7 @@ static ssize_t hyp_sysfs_store(struct kobject *kobj,
return 0;
}
@@ -43959,10 +45833,11 @@ diff -urNp linux-2.6.32.49/drivers/xen/sys-hypervisor.c linux-2.6.32.49/drivers/
.show = hyp_sysfs_show,
.store = hyp_sysfs_store,
};
-diff -urNp linux-2.6.32.49/fs/9p/vfs_inode.c linux-2.6.32.49/fs/9p/vfs_inode.c
---- linux-2.6.32.49/fs/9p/vfs_inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/9p/vfs_inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1079,7 +1079,7 @@ static void *v9fs_vfs_follow_link(struct
+diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
+index 18f74ec..3227009 100644
+--- a/fs/9p/vfs_inode.c
++++ b/fs/9p/vfs_inode.c
+@@ -1079,7 +1079,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
static void
v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
@@ -43971,10 +45846,24 @@ diff -urNp linux-2.6.32.49/fs/9p/vfs_inode.c linux-2.6.32.49/fs/9p/vfs_inode.c
P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
IS_ERR(s) ? "<error>" : s);
-diff -urNp linux-2.6.32.49/fs/aio.c linux-2.6.32.49/fs/aio.c
---- linux-2.6.32.49/fs/aio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/aio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -115,7 +115,7 @@ static int aio_setup_ring(struct kioctx
+diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
+index bb4cc5b..df5eaa0 100644
+--- a/fs/Kconfig.binfmt
++++ b/fs/Kconfig.binfmt
+@@ -86,7 +86,7 @@ config HAVE_AOUT
+
+ config BINFMT_AOUT
+ tristate "Kernel support for a.out and ECOFF binaries"
+- depends on HAVE_AOUT
++ depends on HAVE_AOUT && BROKEN
+ ---help---
+ A.out (Assembler.OUTput) is a set of formats for libraries and
+ executables used in the earliest versions of UNIX. Linux used
+diff --git a/fs/aio.c b/fs/aio.c
+index 22a19ad..d484e5b 100644
+--- a/fs/aio.c
++++ b/fs/aio.c
+@@ -115,7 +115,7 @@ static int aio_setup_ring(struct kioctx *ctx)
size += sizeof(struct io_event) * nr_events;
nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT;
@@ -43983,7 +45872,7 @@ diff -urNp linux-2.6.32.49/fs/aio.c linux-2.6.32.49/fs/aio.c
return -EINVAL;
nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-@@ -1089,6 +1089,8 @@ static int read_events(struct kioctx *ct
+@@ -1089,6 +1089,8 @@ static int read_events(struct kioctx *ctx,
struct aio_timeout to;
int retry = 0;
@@ -43992,7 +45881,7 @@ diff -urNp linux-2.6.32.49/fs/aio.c linux-2.6.32.49/fs/aio.c
/* needed to zero any padding within an entry (there shouldn't be
* any, but C is fun!
*/
-@@ -1382,13 +1384,18 @@ static ssize_t aio_fsync(struct kiocb *i
+@@ -1382,13 +1384,18 @@ static ssize_t aio_fsync(struct kiocb *iocb)
static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb)
{
ssize_t ret;
@@ -44012,10 +45901,11 @@ diff -urNp linux-2.6.32.49/fs/aio.c linux-2.6.32.49/fs/aio.c
kiocb->ki_nr_segs = kiocb->ki_nbytes;
kiocb->ki_cur_seg = 0;
/* ki_nbytes/left now reflect bytes instead of segs */
-diff -urNp linux-2.6.32.49/fs/attr.c linux-2.6.32.49/fs/attr.c
---- linux-2.6.32.49/fs/attr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/attr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -83,6 +83,7 @@ int inode_newsize_ok(const struct inode
+diff --git a/fs/attr.c b/fs/attr.c
+index 96d394b..33cf5b4 100644
+--- a/fs/attr.c
++++ b/fs/attr.c
+@@ -83,6 +83,7 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset)
unsigned long limit;
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
@@ -44023,10 +45913,11 @@ diff -urNp linux-2.6.32.49/fs/attr.c linux-2.6.32.49/fs/attr.c
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
-diff -urNp linux-2.6.32.49/fs/autofs/root.c linux-2.6.32.49/fs/autofs/root.c
---- linux-2.6.32.49/fs/autofs/root.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/autofs/root.c 2011-11-15 19:59:43.000000000 -0500
-@@ -299,7 +299,8 @@ static int autofs_root_symlink(struct in
+diff --git a/fs/autofs/root.c b/fs/autofs/root.c
+index 4a1401c..05eb5ca 100644
+--- a/fs/autofs/root.c
++++ b/fs/autofs/root.c
+@@ -299,7 +299,8 @@ static int autofs_root_symlink(struct inode *dir, struct dentry *dentry, const c
set_bit(n,sbi->symlink_bitmap);
sl = &sbi->symlink[n];
sl->len = strlen(symname);
@@ -44036,9 +45927,10 @@ diff -urNp linux-2.6.32.49/fs/autofs/root.c linux-2.6.32.49/fs/autofs/root.c
if (!sl->data) {
clear_bit(n,sbi->symlink_bitmap);
unlock_kernel();
-diff -urNp linux-2.6.32.49/fs/autofs4/symlink.c linux-2.6.32.49/fs/autofs4/symlink.c
---- linux-2.6.32.49/fs/autofs4/symlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/autofs4/symlink.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/autofs4/symlink.c b/fs/autofs4/symlink.c
+index b4ea829..e63ef18 100644
+--- a/fs/autofs4/symlink.c
++++ b/fs/autofs4/symlink.c
@@ -15,7 +15,7 @@
static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -44048,10 +45940,11 @@ diff -urNp linux-2.6.32.49/fs/autofs4/symlink.c linux-2.6.32.49/fs/autofs4/symli
return NULL;
}
-diff -urNp linux-2.6.32.49/fs/autofs4/waitq.c linux-2.6.32.49/fs/autofs4/waitq.c
---- linux-2.6.32.49/fs/autofs4/waitq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/autofs4/waitq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -60,7 +60,7 @@ static int autofs4_write(struct file *fi
+diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
+index 2341375..df9d1c2 100644
+--- a/fs/autofs4/waitq.c
++++ b/fs/autofs4/waitq.c
+@@ -60,7 +60,7 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)
{
unsigned long sigpipe, flags;
mm_segment_t fs;
@@ -44060,10 +45953,11 @@ diff -urNp linux-2.6.32.49/fs/autofs4/waitq.c linux-2.6.32.49/fs/autofs4/waitq.c
ssize_t wr = 0;
/** WARNING: this is not safe for writing more than PIPE_BUF bytes! **/
-diff -urNp linux-2.6.32.49/fs/befs/linuxvfs.c linux-2.6.32.49/fs/befs/linuxvfs.c
---- linux-2.6.32.49/fs/befs/linuxvfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/befs/linuxvfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -498,7 +498,7 @@ static void befs_put_link(struct dentry
+diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
+index 9158c07..3f06659 100644
+--- a/fs/befs/linuxvfs.c
++++ b/fs/befs/linuxvfs.c
+@@ -498,7 +498,7 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
@@ -44072,9 +45966,10 @@ diff -urNp linux-2.6.32.49/fs/befs/linuxvfs.c linux-2.6.32.49/fs/befs/linuxvfs.c
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
---- linux-2.6.32.49/fs/binfmt_aout.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/binfmt_aout.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
+index 0133b5a..b3baa9f 100644
+--- a/fs/binfmt_aout.c
++++ b/fs/binfmt_aout.c
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/fs.h>
@@ -44083,7 +45978,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
-@@ -102,6 +103,8 @@ static int aout_core_dump(long signr, st
+@@ -102,6 +103,8 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, u
#endif
# define START_STACK(u) (u.start_stack)
@@ -44092,7 +45987,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
-@@ -113,10 +116,12 @@ static int aout_core_dump(long signr, st
+@@ -113,10 +116,12 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, u
/* If the size of the dump file exceeds the rlimit, then see what would happen
if we wrote the stack, but not the data area. */
@@ -44105,7 +46000,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
if ((dump.u_ssize + 1) * PAGE_SIZE > limit)
dump.u_ssize = 0;
-@@ -146,9 +151,7 @@ static int aout_core_dump(long signr, st
+@@ -146,9 +151,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, u
dump_size = dump.u_ssize << PAGE_SHIFT;
DUMP_WRITE(dump_start,dump_size);
}
@@ -44116,7 +46011,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
end_coredump:
set_fs(fs);
return has_dumped;
-@@ -249,6 +252,8 @@ static int load_aout_binary(struct linux
+@@ -249,6 +252,8 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
if (rlim >= RLIM_INFINITY)
rlim = ~0;
@@ -44125,7 +46020,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
if (ex.a_data + ex.a_bss > rlim)
return -ENOMEM;
-@@ -277,6 +282,27 @@ static int load_aout_binary(struct linux
+@@ -277,6 +282,27 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
install_exec_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
@@ -44153,7 +46048,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
if (N_MAGIC(ex) == OMAGIC) {
unsigned long text_addr, map_size;
loff_t pos;
-@@ -349,7 +375,7 @@ static int load_aout_binary(struct linux
+@@ -349,7 +375,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
down_write(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
@@ -44162,10 +46057,11 @@ diff -urNp linux-2.6.32.49/fs/binfmt_aout.c linux-2.6.32.49/fs/binfmt_aout.c
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up_write(&current->mm->mmap_sem);
-diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
---- linux-2.6.32.49/fs/binfmt_elf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/binfmt_elf.c 2011-11-18 18:51:56.000000000 -0500
-@@ -50,6 +50,10 @@ static int elf_core_dump(long signr, str
+diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+index 1ed37ba..32cc555 100644
+--- a/fs/binfmt_elf.c
++++ b/fs/binfmt_elf.c
+@@ -50,6 +50,10 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
#define elf_core_dump NULL
#endif
@@ -44176,7 +46072,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
#if ELF_EXEC_PAGESIZE > PAGE_SIZE
#define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
#else
-@@ -69,6 +73,11 @@ static struct linux_binfmt elf_format =
+@@ -69,6 +73,11 @@ static struct linux_binfmt elf_format = {
.load_binary = load_elf_binary,
.load_shlib = load_elf_library,
.core_dump = elf_core_dump,
@@ -44188,7 +46084,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
.min_coredump = ELF_EXEC_PAGESIZE,
.hasvdso = 1
};
-@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format =
+@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format = {
static int set_brk(unsigned long start, unsigned long end)
{
@@ -44197,7 +46093,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
start = ELF_PAGEALIGN(start);
end = ELF_PAGEALIGN(end);
if (end > start) {
-@@ -87,7 +98,7 @@ static int set_brk(unsigned long start,
+@@ -87,7 +98,7 @@ static int set_brk(unsigned long start, unsigned long end)
if (BAD_ADDR(addr))
return addr;
}
@@ -44206,7 +46102,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
return 0;
}
-@@ -148,12 +159,15 @@ create_elf_tables(struct linux_binprm *b
+@@ -148,12 +159,15 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
elf_addr_t __user *u_rand_bytes;
const char *k_platform = ELF_PLATFORM;
const char *k_base_platform = ELF_BASE_PLATFORM;
@@ -44223,7 +46119,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
/*
* In some cases (e.g. Hyper-Threading), we want to avoid L1
-@@ -195,8 +209,12 @@ create_elf_tables(struct linux_binprm *b
+@@ -195,8 +209,12 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
* Generate 16 random bytes for userspace PRNG seeding.
*/
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
@@ -44238,7 +46134,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
return -EFAULT;
-@@ -308,9 +326,11 @@ create_elf_tables(struct linux_binprm *b
+@@ -308,9 +326,11 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
return -EFAULT;
current->mm->env_end = p;
@@ -44251,7 +46147,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
return -EFAULT;
return 0;
}
-@@ -385,10 +405,10 @@ static unsigned long load_elf_interp(str
+@@ -385,10 +405,10 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
{
struct elf_phdr *elf_phdata;
struct elf_phdr *eppnt;
@@ -44264,7 +46160,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
unsigned long total_size;
int retval, i, size;
-@@ -434,6 +454,11 @@ static unsigned long load_elf_interp(str
+@@ -434,6 +454,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
goto out_close;
}
@@ -44276,7 +46172,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
eppnt = elf_phdata;
for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
if (eppnt->p_type == PT_LOAD) {
-@@ -477,8 +502,8 @@ static unsigned long load_elf_interp(str
+@@ -477,8 +502,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
k = load_addr + eppnt->p_vaddr;
if (BAD_ADDR(k) ||
eppnt->p_filesz > eppnt->p_memsz ||
@@ -44482,7 +46378,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -548,6 +761,11 @@ static unsigned long randomize_stack_top
+@@ -548,6 +761,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
{
unsigned int random_variable = 0;
@@ -44494,7 +46390,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
random_variable = get_random_int() & STACK_RND_MASK;
-@@ -566,7 +784,7 @@ static int load_elf_binary(struct linux_
+@@ -566,7 +784,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
@@ -44503,7 +46399,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retval, i;
-@@ -576,11 +794,11 @@ static int load_elf_binary(struct linux_
+@@ -576,11 +794,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
unsigned long start_code, end_code, start_data, end_data;
unsigned long reloc_func_desc = 0;
int executable_stack = EXSTACK_DEFAULT;
@@ -44516,7 +46412,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -718,11 +936,80 @@ static int load_elf_binary(struct linux_
+@@ -718,11 +936,80 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
/* OK, This is the point of no return */
current->flags &= ~PF_FORKNOEXEC;
@@ -44598,7 +46494,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
-@@ -800,10 +1087,27 @@ static int load_elf_binary(struct linux_
+@@ -800,10 +1087,27 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
* might try to exec. This is because the brk will
* follow the loader, and is not movable. */
#ifdef CONFIG_X86
@@ -44627,7 +46523,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
}
error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-@@ -836,9 +1140,9 @@ static int load_elf_binary(struct linux_
+@@ -836,9 +1140,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
@@ -44640,7 +46536,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
/* set_brk can never work. Avoid overflows. */
send_sig(SIGKILL, current, 0);
retval = -EINVAL;
-@@ -866,6 +1170,11 @@ static int load_elf_binary(struct linux_
+@@ -866,6 +1170,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
start_data += load_bias;
end_data += load_bias;
@@ -44652,7 +46548,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
/* Calling set_brk effectively mmaps the pages that we need
* for the bss and break sections. We must do this before
* mapping in the interpreter, to make sure it doesn't wind
-@@ -877,9 +1186,11 @@ static int load_elf_binary(struct linux_
+@@ -877,9 +1186,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
goto out_free_dentry;
}
if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -44667,7 +46563,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
}
if (elf_interpreter) {
-@@ -1112,8 +1423,10 @@ static int dump_seek(struct file *file,
+@@ -1112,8 +1423,10 @@ static int dump_seek(struct file *file, loff_t off)
unsigned long n = off;
if (n > PAGE_SIZE)
n = PAGE_SIZE;
@@ -44679,7 +46575,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
off -= n;
}
free_page((unsigned long)buf);
-@@ -1125,7 +1438,7 @@ static int dump_seek(struct file *file,
+@@ -1125,7 +1438,7 @@ static int dump_seek(struct file *file, loff_t off)
* Decide what to dump of a segment, part, all or none.
*/
static unsigned long vma_dump_size(struct vm_area_struct *vma,
@@ -44688,7 +46584,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
-@@ -1159,7 +1472,7 @@ static unsigned long vma_dump_size(struc
+@@ -1159,7 +1472,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
if (vma->vm_file == NULL)
return 0;
@@ -44697,7 +46593,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
goto whole;
/*
-@@ -1255,8 +1568,11 @@ static int writenote(struct memelfnote *
+@@ -1255,8 +1568,11 @@ static int writenote(struct memelfnote *men, struct file *file,
#undef DUMP_WRITE
#define DUMP_WRITE(addr, nr) \
@@ -44710,7 +46606,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
static void fill_elf_header(struct elfhdr *elf, int segs,
u16 machine, u32 flags, u8 osabi)
-@@ -1385,9 +1701,9 @@ static void fill_auxv_note(struct memelf
+@@ -1385,9 +1701,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
{
elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
int i = 0;
@@ -44722,7 +46618,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
}
-@@ -1973,7 +2289,7 @@ static int elf_core_dump(long signr, str
+@@ -1973,7 +2289,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
@@ -44731,7 +46627,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
phdr.p_memsz = vma->vm_end - vma->vm_start;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -2006,7 +2322,7 @@ static int elf_core_dump(long signr, str
+@@ -2006,7 +2322,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
unsigned long addr;
unsigned long end;
@@ -44740,7 +46636,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
struct page *page;
-@@ -2015,6 +2331,7 @@ static int elf_core_dump(long signr, str
+@@ -2015,6 +2331,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
page = get_dump_page(addr);
if (page) {
void *kaddr = kmap(page);
@@ -44846,10 +46742,11 @@ diff -urNp linux-2.6.32.49/fs/binfmt_elf.c linux-2.6.32.49/fs/binfmt_elf.c
static int __init init_elf_binfmt(void)
{
return register_binfmt(&elf_format);
-diff -urNp linux-2.6.32.49/fs/binfmt_flat.c linux-2.6.32.49/fs/binfmt_flat.c
---- linux-2.6.32.49/fs/binfmt_flat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/binfmt_flat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -564,7 +564,9 @@ static int load_flat_file(struct linux_b
+diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
+index ca88c46..f155a60 100644
+--- a/fs/binfmt_flat.c
++++ b/fs/binfmt_flat.c
+@@ -564,7 +564,9 @@ static int load_flat_file(struct linux_binprm * bprm,
realdatastart = (unsigned long) -ENOMEM;
printk("Unable to allocate RAM for process data, errno %d\n",
(int)-realdatastart);
@@ -44859,7 +46756,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_flat.c linux-2.6.32.49/fs/binfmt_flat.c
ret = realdatastart;
goto err;
}
-@@ -588,8 +590,10 @@ static int load_flat_file(struct linux_b
+@@ -588,8 +590,10 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if (IS_ERR_VALUE(result)) {
printk("Unable to read data+bss, errno %d\n", (int)-result);
@@ -44870,7 +46767,7 @@ diff -urNp linux-2.6.32.49/fs/binfmt_flat.c linux-2.6.32.49/fs/binfmt_flat.c
ret = result;
goto err;
}
-@@ -658,8 +662,10 @@ static int load_flat_file(struct linux_b
+@@ -658,8 +662,10 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if (IS_ERR_VALUE(result)) {
printk("Unable to read code+data+bss, errno %d\n",(int)-result);
@@ -44881,10 +46778,11 @@ diff -urNp linux-2.6.32.49/fs/binfmt_flat.c linux-2.6.32.49/fs/binfmt_flat.c
ret = result;
goto err;
}
-diff -urNp linux-2.6.32.49/fs/bio.c linux-2.6.32.49/fs/bio.c
---- linux-2.6.32.49/fs/bio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/bio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -78,7 +78,7 @@ static struct kmem_cache *bio_find_or_cr
+diff --git a/fs/bio.c b/fs/bio.c
+index e696713..83de133 100644
+--- a/fs/bio.c
++++ b/fs/bio.c
+@@ -78,7 +78,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size)
i = 0;
while (i < bio_slab_nr) {
@@ -44893,7 +46791,7 @@ diff -urNp linux-2.6.32.49/fs/bio.c linux-2.6.32.49/fs/bio.c
if (!bslab->slab && entry == -1)
entry = i;
-@@ -1236,7 +1236,7 @@ static void bio_copy_kern_endio(struct b
+@@ -1236,7 +1236,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err)
const int read = bio_data_dir(bio) == READ;
struct bio_map_data *bmd = bio->bi_private;
int i;
@@ -44902,10 +46800,11 @@ diff -urNp linux-2.6.32.49/fs/bio.c linux-2.6.32.49/fs/bio.c
__bio_for_each_segment(bvec, bio, i, 0) {
char *addr = page_address(bvec->bv_page);
-diff -urNp linux-2.6.32.49/fs/block_dev.c linux-2.6.32.49/fs/block_dev.c
---- linux-2.6.32.49/fs/block_dev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/block_dev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -664,7 +664,7 @@ int bd_claim(struct block_device *bdev,
+diff --git a/fs/block_dev.c b/fs/block_dev.c
+index e65efa2..04fae57 100644
+--- a/fs/block_dev.c
++++ b/fs/block_dev.c
+@@ -664,7 +664,7 @@ int bd_claim(struct block_device *bdev, void *holder)
else if (bdev->bd_contains == bdev)
res = 0; /* is a whole device which isn't held */
@@ -44914,10 +46813,11 @@ diff -urNp linux-2.6.32.49/fs/block_dev.c linux-2.6.32.49/fs/block_dev.c
res = 0; /* is a partition of a device that is being partitioned */
else if (bdev->bd_contains->bd_holder != NULL)
res = -EBUSY; /* is a partition of a held device */
-diff -urNp linux-2.6.32.49/fs/btrfs/ctree.c linux-2.6.32.49/fs/btrfs/ctree.c
---- linux-2.6.32.49/fs/btrfs/ctree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/ctree.c 2011-11-15 19:59:43.000000000 -0500
-@@ -461,9 +461,12 @@ static noinline int __btrfs_cow_block(st
+diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
+index c4bc570..42acd8d 100644
+--- a/fs/btrfs/ctree.c
++++ b/fs/btrfs/ctree.c
+@@ -461,9 +461,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
free_extent_buffer(buf);
add_root_to_dirty_list(root);
} else {
@@ -44933,7 +46833,7 @@ diff -urNp linux-2.6.32.49/fs/btrfs/ctree.c linux-2.6.32.49/fs/btrfs/ctree.c
parent_start = 0;
WARN_ON(trans->transid != btrfs_header_generation(parent));
-@@ -3645,7 +3648,6 @@ setup_items_for_insert(struct btrfs_tran
+@@ -3645,7 +3648,6 @@ setup_items_for_insert(struct btrfs_trans_handle *trans,
ret = 0;
if (slot == 0) {
@@ -44941,9 +46841,10 @@ diff -urNp linux-2.6.32.49/fs/btrfs/ctree.c linux-2.6.32.49/fs/btrfs/ctree.c
btrfs_cpu_key_to_disk(&disk_key, cpu_key);
ret = fixup_low_keys(trans, root, path, &disk_key, 1);
}
-diff -urNp linux-2.6.32.49/fs/btrfs/disk-io.c linux-2.6.32.49/fs/btrfs/disk-io.c
---- linux-2.6.32.49/fs/btrfs/disk-io.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/disk-io.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
+index f447188..59c17c5 100644
+--- a/fs/btrfs/disk-io.c
++++ b/fs/btrfs/disk-io.c
@@ -39,7 +39,7 @@
#include "tree-log.h"
#include "free-space-cache.h"
@@ -44962,10 +46863,26 @@ diff -urNp linux-2.6.32.49/fs/btrfs/disk-io.c linux-2.6.32.49/fs/btrfs/disk-io.c
.write_cache_pages_lock_hook = btree_lock_page_hook,
.readpage_end_io_hook = btree_readpage_end_io_hook,
.submit_bio_hook = btree_submit_bio_hook,
-diff -urNp linux-2.6.32.49/fs/btrfs/extent_io.h linux-2.6.32.49/fs/btrfs/extent_io.h
---- linux-2.6.32.49/fs/btrfs/extent_io.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/extent_io.h 2011-11-15 19:59:43.000000000 -0500
-@@ -49,36 +49,36 @@ typedef int (extent_submit_bio_hook_t)(s
+diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
+index 559f724..a026171 100644
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -7141,6 +7141,10 @@ static noinline int relocate_one_extent(struct btrfs_root *extent_root,
+ u64 group_start = group->key.objectid;
+ new_extents = kmalloc(sizeof(*new_extents),
+ GFP_NOFS);
++ if (!new_extents) {
++ ret = -ENOMEM;
++ goto out;
++ }
+ nr_extents = 1;
+ ret = get_new_locations(reloc_inode,
+ extent_key,
+diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
+index 36de250..7ec75c7 100644
+--- a/fs/btrfs/extent_io.h
++++ b/fs/btrfs/extent_io.h
+@@ -49,36 +49,36 @@ typedef int (extent_submit_bio_hook_t)(struct inode *inode, int rw,
struct bio *bio, int mirror_num,
unsigned long bio_flags);
struct extent_io_ops {
@@ -45025,24 +46942,11 @@ diff -urNp linux-2.6.32.49/fs/btrfs/extent_io.h linux-2.6.32.49/fs/btrfs/extent_
};
struct extent_state {
-diff -urNp linux-2.6.32.49/fs/btrfs/extent-tree.c linux-2.6.32.49/fs/btrfs/extent-tree.c
---- linux-2.6.32.49/fs/btrfs/extent-tree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/extent-tree.c 2011-11-15 19:59:43.000000000 -0500
-@@ -7141,6 +7141,10 @@ static noinline int relocate_one_extent(
- u64 group_start = group->key.objectid;
- new_extents = kmalloc(sizeof(*new_extents),
- GFP_NOFS);
-+ if (!new_extents) {
-+ ret = -ENOMEM;
-+ goto out;
-+ }
- nr_extents = 1;
- ret = get_new_locations(reloc_inode,
- extent_key,
-diff -urNp linux-2.6.32.49/fs/btrfs/free-space-cache.c linux-2.6.32.49/fs/btrfs/free-space-cache.c
---- linux-2.6.32.49/fs/btrfs/free-space-cache.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/free-space-cache.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1074,8 +1074,6 @@ u64 btrfs_alloc_from_cluster(struct btrf
+diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
+index cb2849f..3718fb4 100644
+--- a/fs/btrfs/free-space-cache.c
++++ b/fs/btrfs/free-space-cache.c
+@@ -1074,8 +1074,6 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group,
while(1) {
if (entry->bytes < bytes || entry->offset < min_start) {
@@ -45060,10 +46964,11 @@ diff -urNp linux-2.6.32.49/fs/btrfs/free-space-cache.c linux-2.6.32.49/fs/btrfs/
if (entry->bitmap && entry->bytes > bytes + empty_size) {
ret = btrfs_bitmap_cluster(block_group, entry, cluster,
-diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
---- linux-2.6.32.49/fs/btrfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -63,7 +63,7 @@ static const struct inode_operations btr
+diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
+index e03a836..323837e 100644
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
+@@ -63,7 +63,7 @@ static const struct inode_operations btrfs_file_inode_operations;
static const struct address_space_operations btrfs_aops;
static const struct address_space_operations btrfs_symlink_aops;
static const struct file_operations btrfs_dir_file_operations;
@@ -45072,7 +46977,7 @@ diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
static struct kmem_cache *btrfs_inode_cachep;
struct kmem_cache *btrfs_trans_handle_cachep;
-@@ -925,6 +925,7 @@ static int cow_file_range_async(struct i
+@@ -925,6 +925,7 @@ static int cow_file_range_async(struct inode *inode, struct page *locked_page,
1, 0, NULL, GFP_NOFS);
while (start < end) {
async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS);
@@ -45080,7 +46985,7 @@ diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
async_cow->inode = inode;
async_cow->root = root;
async_cow->locked_page = locked_page;
-@@ -4591,6 +4592,8 @@ static noinline int uncompress_inline(st
+@@ -4591,6 +4592,8 @@ static noinline int uncompress_inline(struct btrfs_path *path,
inline_size = btrfs_file_extent_inline_item_len(leaf,
btrfs_item_nr(leaf, path->slots[0]));
tmp = kmalloc(inline_size, GFP_NOFS);
@@ -45098,7 +47003,7 @@ diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
struct dentry *dentry, struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
-@@ -5422,6 +5425,14 @@ static int btrfs_getattr(struct vfsmount
+@@ -5422,6 +5425,14 @@ static int btrfs_getattr(struct vfsmount *mnt,
return 0;
}
@@ -45113,7 +47018,7 @@ diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
-@@ -5972,7 +5983,7 @@ static const struct file_operations btrf
+@@ -5972,7 +5983,7 @@ static const struct file_operations btrfs_dir_file_operations = {
.fsync = btrfs_sync_file,
};
@@ -45122,10 +47027,11 @@ diff -urNp linux-2.6.32.49/fs/btrfs/inode.c linux-2.6.32.49/fs/btrfs/inode.c
.fill_delalloc = run_delalloc_range,
.submit_bio_hook = btrfs_submit_bio_hook,
.merge_bio_hook = btrfs_merge_bio_hook,
-diff -urNp linux-2.6.32.49/fs/btrfs/relocation.c linux-2.6.32.49/fs/btrfs/relocation.c
---- linux-2.6.32.49/fs/btrfs/relocation.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/relocation.c 2011-11-15 19:59:43.000000000 -0500
-@@ -884,7 +884,7 @@ static int __update_reloc_root(struct bt
+diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
+index ab7ab53..94e0781 100644
+--- a/fs/btrfs/relocation.c
++++ b/fs/btrfs/relocation.c
+@@ -884,7 +884,7 @@ static int __update_reloc_root(struct btrfs_root *root, int del)
}
spin_unlock(&rc->reloc_root_tree.lock);
@@ -45134,10 +47040,11 @@ diff -urNp linux-2.6.32.49/fs/btrfs/relocation.c linux-2.6.32.49/fs/btrfs/reloca
if (!del) {
spin_lock(&rc->reloc_root_tree.lock);
-diff -urNp linux-2.6.32.49/fs/btrfs/sysfs.c linux-2.6.32.49/fs/btrfs/sysfs.c
---- linux-2.6.32.49/fs/btrfs/sysfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/btrfs/sysfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -164,12 +164,12 @@ static void btrfs_root_release(struct ko
+diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
+index a240b6f..4ce16ef 100644
+--- a/fs/btrfs/sysfs.c
++++ b/fs/btrfs/sysfs.c
+@@ -164,12 +164,12 @@ static void btrfs_root_release(struct kobject *kobj)
complete(&root->kobj_unregister);
}
@@ -45152,9 +47059,10 @@ diff -urNp linux-2.6.32.49/fs/btrfs/sysfs.c linux-2.6.32.49/fs/btrfs/sysfs.c
.show = btrfs_root_attr_show,
.store = btrfs_root_attr_store,
};
-diff -urNp linux-2.6.32.49/fs/buffer.c linux-2.6.32.49/fs/buffer.c
---- linux-2.6.32.49/fs/buffer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/buffer.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/buffer.c b/fs/buffer.c
+index 6fa5302..395d9f6 100644
+--- a/fs/buffer.c
++++ b/fs/buffer.c
@@ -25,6 +25,7 @@
#include <linux/percpu.h>
#include <linux/slab.h>
@@ -45163,10 +47071,11 @@ diff -urNp linux-2.6.32.49/fs/buffer.c linux-2.6.32.49/fs/buffer.c
#include <linux/blkdev.h>
#include <linux/file.h>
#include <linux/quotaops.h>
-diff -urNp linux-2.6.32.49/fs/cachefiles/bind.c linux-2.6.32.49/fs/cachefiles/bind.c
---- linux-2.6.32.49/fs/cachefiles/bind.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/bind.c 2011-11-15 19:59:43.000000000 -0500
-@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachef
+diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c
+index 3797e00..ce776f6 100644
+--- a/fs/cachefiles/bind.c
++++ b/fs/cachefiles/bind.c
+@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
args);
/* start by checking things over */
@@ -45182,10 +47091,11 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/bind.c linux-2.6.32.49/fs/cachefiles/bi
cache->bcull_percent < cache->brun_percent &&
cache->brun_percent < 100);
-diff -urNp linux-2.6.32.49/fs/cachefiles/daemon.c linux-2.6.32.49/fs/cachefiles/daemon.c
---- linux-2.6.32.49/fs/cachefiles/daemon.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/daemon.c 2011-11-15 19:59:43.000000000 -0500
-@@ -220,7 +220,7 @@ static ssize_t cachefiles_daemon_write(s
+diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
+index 4618516..bb30d01 100644
+--- a/fs/cachefiles/daemon.c
++++ b/fs/cachefiles/daemon.c
+@@ -220,7 +220,7 @@ static ssize_t cachefiles_daemon_write(struct file *file,
if (test_bit(CACHEFILES_DEAD, &cache->flags))
return -EIO;
@@ -45194,7 +47104,7 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/daemon.c linux-2.6.32.49/fs/cachefiles/
return -EOPNOTSUPP;
/* drag the command string into the kernel so we can parse it */
-@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struc
+@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -45203,7 +47113,7 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/daemon.c linux-2.6.32.49/fs/cachefiles/
return cachefiles_daemon_range_error(cache, args);
cache->fstop_percent = fstop;
-@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struc
+@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -45212,9 +47122,10 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/daemon.c linux-2.6.32.49/fs/cachefiles/
return cachefiles_daemon_range_error(cache, args);
cache->bstop_percent = bstop;
-diff -urNp linux-2.6.32.49/fs/cachefiles/internal.h linux-2.6.32.49/fs/cachefiles/internal.h
---- linux-2.6.32.49/fs/cachefiles/internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/internal.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h
+index f7c255f..fcd61de 100644
+--- a/fs/cachefiles/internal.h
++++ b/fs/cachefiles/internal.h
@@ -56,7 +56,7 @@ struct cachefiles_cache {
wait_queue_head_t daemon_pollwq; /* poll waitqueue for daemon */
struct rb_root active_nodes; /* active nodes (can't be culled) */
@@ -45224,7 +47135,7 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/internal.h linux-2.6.32.49/fs/cachefile
unsigned frun_percent; /* when to stop culling (% files) */
unsigned fcull_percent; /* when to start culling (% files) */
unsigned fstop_percent; /* when to stop allocating (% files) */
-@@ -168,19 +168,19 @@ extern int cachefiles_check_in_use(struc
+@@ -168,19 +168,19 @@ extern int cachefiles_check_in_use(struct cachefiles_cache *cache,
* proc.c
*/
#ifdef CONFIG_CACHEFILES_HISTOGRAM
@@ -45249,9 +47160,10 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/internal.h linux-2.6.32.49/fs/cachefile
}
#else
-diff -urNp linux-2.6.32.49/fs/cachefiles/namei.c linux-2.6.32.49/fs/cachefiles/namei.c
---- linux-2.6.32.49/fs/cachefiles/namei.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/namei.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
+index 14ac480..a62766c 100644
+--- a/fs/cachefiles/namei.c
++++ b/fs/cachefiles/namei.c
@@ -250,7 +250,7 @@ try_again:
/* first step is to make up a grave dentry in the graveyard */
sprintf(nbuffer, "%08x%08x",
@@ -45261,9 +47173,10 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/namei.c linux-2.6.32.49/fs/cachefiles/n
/* do the multiway lock magic */
trap = lock_rename(cache->graveyard, dir);
-diff -urNp linux-2.6.32.49/fs/cachefiles/proc.c linux-2.6.32.49/fs/cachefiles/proc.c
---- linux-2.6.32.49/fs/cachefiles/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/proc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cachefiles/proc.c b/fs/cachefiles/proc.c
+index eccd339..4c1d995 100644
+--- a/fs/cachefiles/proc.c
++++ b/fs/cachefiles/proc.c
@@ -14,9 +14,9 @@
#include <linux/seq_file.h>
#include "internal.h"
@@ -45277,7 +47190,7 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/proc.c linux-2.6.32.49/fs/cachefiles/pr
/*
* display the latency histogram
-@@ -35,9 +35,9 @@ static int cachefiles_histogram_show(str
+@@ -35,9 +35,9 @@ static int cachefiles_histogram_show(struct seq_file *m, void *v)
return 0;
default:
index = (unsigned long) v - 3;
@@ -45290,10 +47203,11 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/proc.c linux-2.6.32.49/fs/cachefiles/pr
if (x == 0 && y == 0 && z == 0)
return 0;
-diff -urNp linux-2.6.32.49/fs/cachefiles/rdwr.c linux-2.6.32.49/fs/cachefiles/rdwr.c
---- linux-2.6.32.49/fs/cachefiles/rdwr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cachefiles/rdwr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -946,7 +946,7 @@ int cachefiles_write_page(struct fscache
+diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
+index a6c8c6f..5cf8517 100644
+--- a/fs/cachefiles/rdwr.c
++++ b/fs/cachefiles/rdwr.c
+@@ -946,7 +946,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = file->f_op->write(
@@ -45302,10 +47216,11 @@ diff -urNp linux-2.6.32.49/fs/cachefiles/rdwr.c linux-2.6.32.49/fs/cachefiles/rd
set_fs(old_fs);
kunmap(page);
if (ret != len)
-diff -urNp linux-2.6.32.49/fs/cifs/cifs_debug.c linux-2.6.32.49/fs/cifs/cifs_debug.c
---- linux-2.6.32.49/fs/cifs/cifs_debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cifs/cifs_debug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -256,25 +256,25 @@ static ssize_t cifs_stats_proc_write(str
+diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
+index 42cec2a..2aba466 100644
+--- a/fs/cifs/cifs_debug.c
++++ b/fs/cifs/cifs_debug.c
+@@ -256,25 +256,25 @@ static ssize_t cifs_stats_proc_write(struct file *file,
tcon = list_entry(tmp3,
struct cifsTconInfo,
tcon_list);
@@ -45350,7 +47265,7 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifs_debug.c linux-2.6.32.49/fs/cifs/cifs_deb
}
}
}
-@@ -334,41 +334,41 @@ static int cifs_stats_proc_show(struct s
+@@ -334,41 +334,41 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
if (tcon->need_reconnect)
seq_puts(m, "\tDISCONNECTED ");
seq_printf(m, "\nSMBs: %d Oplock Breaks: %d",
@@ -45412,9 +47327,10 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifs_debug.c linux-2.6.32.49/fs/cifs/cifs_deb
}
}
}
-diff -urNp linux-2.6.32.49/fs/cifs/cifsfs.c linux-2.6.32.49/fs/cifs/cifsfs.c
---- linux-2.6.32.49/fs/cifs/cifsfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cifs/cifsfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
+index 1445407..68cb0dc 100644
+--- a/fs/cifs/cifsfs.c
++++ b/fs/cifs/cifsfs.c
@@ -869,7 +869,7 @@ cifs_init_request_bufs(void)
cifs_req_cachep = kmem_cache_create("cifs_request",
CIFSMaxBufSize +
@@ -45444,9 +47360,10 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifsfs.c linux-2.6.32.49/fs/cifs/cifsfs.c
#endif /* CONFIG_CIFS_STATS2 */
atomic_set(&midCount, 0);
-diff -urNp linux-2.6.32.49/fs/cifs/cifsglob.h linux-2.6.32.49/fs/cifs/cifsglob.h
---- linux-2.6.32.49/fs/cifs/cifsglob.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cifs/cifsglob.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+index e29581e..1c22bab 100644
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
@@ -252,28 +252,28 @@ struct cifsTconInfo {
__u16 Flags; /* optional support bits */
enum statusEnum tidStatus;
@@ -45498,7 +47415,7 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifsglob.h linux-2.6.32.49/fs/cifs/cifsglob.h
#ifdef CONFIG_CIFS_STATS2
unsigned long long time_writes;
unsigned long long time_reads;
-@@ -414,7 +414,7 @@ static inline char CIFS_DIR_SEP(const st
+@@ -414,7 +414,7 @@ static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb)
}
#ifdef CONFIG_CIFS_STATS
@@ -45507,7 +47424,7 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifsglob.h linux-2.6.32.49/fs/cifs/cifsglob.h
static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon,
unsigned int bytes)
-@@ -701,8 +701,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnect
+@@ -701,8 +701,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
/* Various Debug counters */
GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
#ifdef CONFIG_CIFS_STATS2
@@ -45518,10 +47435,11 @@ diff -urNp linux-2.6.32.49/fs/cifs/cifsglob.h linux-2.6.32.49/fs/cifs/cifsglob.h
#endif
GLOBAL_EXTERN atomic_t smBufAllocCount;
GLOBAL_EXTERN atomic_t midCount;
-diff -urNp linux-2.6.32.49/fs/cifs/link.c linux-2.6.32.49/fs/cifs/link.c
---- linux-2.6.32.49/fs/cifs/link.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cifs/link.c 2011-11-15 19:59:43.000000000 -0500
-@@ -215,7 +215,7 @@ cifs_symlink(struct inode *inode, struct
+diff --git a/fs/cifs/link.c b/fs/cifs/link.c
+index fc1e048..28b3441 100644
+--- a/fs/cifs/link.c
++++ b/fs/cifs/link.c
+@@ -215,7 +215,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
{
@@ -45530,9 +47448,10 @@ diff -urNp linux-2.6.32.49/fs/cifs/link.c linux-2.6.32.49/fs/cifs/link.c
if (!IS_ERR(p))
kfree(p);
}
-diff -urNp linux-2.6.32.49/fs/cifs/misc.c linux-2.6.32.49/fs/cifs/misc.c
---- linux-2.6.32.49/fs/cifs/misc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/cifs/misc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
+index d27d4ec..8d0a444 100644
+--- a/fs/cifs/misc.c
++++ b/fs/cifs/misc.c
@@ -155,7 +155,7 @@ cifs_buf_get(void)
memset(ret_buf, 0, sizeof(struct smb_hdr) + 3);
atomic_inc(&bufAllocCount);
@@ -45551,9 +47470,10 @@ diff -urNp linux-2.6.32.49/fs/cifs/misc.c linux-2.6.32.49/fs/cifs/misc.c
#endif /* CONFIG_CIFS_STATS2 */
}
-diff -urNp linux-2.6.32.49/fs/coda/cache.c linux-2.6.32.49/fs/coda/cache.c
---- linux-2.6.32.49/fs/coda/cache.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/coda/cache.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/coda/cache.c b/fs/coda/cache.c
+index a5bf577..6d19845 100644
+--- a/fs/coda/cache.c
++++ b/fs/coda/cache.c
@@ -24,14 +24,14 @@
#include <linux/coda_fs_i.h>
#include <linux/coda_cache.h>
@@ -45571,7 +47491,7 @@ diff -urNp linux-2.6.32.49/fs/coda/cache.c linux-2.6.32.49/fs/coda/cache.c
if (cii->c_uid != current_fsuid()) {
cii->c_uid = current_fsuid();
cii->c_cached_perm = mask;
-@@ -43,13 +43,13 @@ void coda_cache_enter(struct inode *inod
+@@ -43,13 +43,13 @@ void coda_cache_enter(struct inode *inode, int mask)
void coda_cache_clear_inode(struct inode *inode)
{
struct coda_inode_info *cii = ITOC(inode);
@@ -45587,7 +47507,7 @@ diff -urNp linux-2.6.32.49/fs/coda/cache.c linux-2.6.32.49/fs/coda/cache.c
}
-@@ -61,7 +61,7 @@ int coda_cache_check(struct inode *inode
+@@ -61,7 +61,7 @@ int coda_cache_check(struct inode *inode, int mask)
hit = (mask & cii->c_cached_perm) == mask &&
cii->c_uid == current_fsuid() &&
@@ -45596,26 +47516,11 @@ diff -urNp linux-2.6.32.49/fs/coda/cache.c linux-2.6.32.49/fs/coda/cache.c
return hit;
}
-diff -urNp linux-2.6.32.49/fs/compat_binfmt_elf.c linux-2.6.32.49/fs/compat_binfmt_elf.c
---- linux-2.6.32.49/fs/compat_binfmt_elf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/compat_binfmt_elf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -29,10 +29,12 @@
- #undef elfhdr
- #undef elf_phdr
- #undef elf_note
-+#undef elf_dyn
- #undef elf_addr_t
- #define elfhdr elf32_hdr
- #define elf_phdr elf32_phdr
- #define elf_note elf32_note
-+#define elf_dyn Elf32_Dyn
- #define elf_addr_t Elf32_Addr
-
- /*
-diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
---- linux-2.6.32.49/fs/compat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/compat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -133,8 +133,8 @@ asmlinkage long compat_sys_utimes(char _
+diff --git a/fs/compat.c b/fs/compat.c
+index d1e2411..27064e4 100644
+--- a/fs/compat.c
++++ b/fs/compat.c
+@@ -133,8 +133,8 @@ asmlinkage long compat_sys_utimes(char __user *filename, struct compat_timeval _
static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
{
compat_ino_t ino = stat->ino;
@@ -45626,7 +47531,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
int err;
SET_UID(uid, stat->uid);
-@@ -533,7 +533,7 @@ compat_sys_io_setup(unsigned nr_reqs, u3
+@@ -533,7 +533,7 @@ compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p)
set_fs(KERNEL_DS);
/* The __user pointer cast is valid because of the set_fs() */
@@ -45643,7 +47548,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
int result;
};
-@@ -847,6 +848,10 @@ static int compat_fillonedir(void *__buf
+@@ -847,6 +848,10 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen,
buf->result = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -45654,7 +47559,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
buf->result++;
dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, dirent,
-@@ -879,6 +884,7 @@ asmlinkage long compat_sys_old_readdir(u
+@@ -879,6 +884,7 @@ asmlinkage long compat_sys_old_readdir(unsigned int fd,
buf.result = 0;
buf.dirent = dirent;
@@ -45670,7 +47575,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
int count;
int error;
};
-@@ -919,6 +926,10 @@ static int compat_filldir(void *__buf, c
+@@ -919,6 +926,10 @@ static int compat_filldir(void *__buf, const char *name, int namlen,
buf->error = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -45681,7 +47586,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -966,6 +977,7 @@ asmlinkage long compat_sys_getdents(unsi
+@@ -966,6 +977,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -45697,7 +47602,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
int count;
int error;
};
-@@ -1003,6 +1016,10 @@ static int compat_filldir64(void * __buf
+@@ -1003,6 +1016,10 @@ static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
@@ -45708,7 +47613,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
dirent = buf->previous;
if (dirent) {
-@@ -1054,13 +1071,14 @@ asmlinkage long compat_sys_getdents64(un
+@@ -1054,13 +1071,14 @@ asmlinkage long compat_sys_getdents64(unsigned int fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -45724,7 +47629,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
if (__put_user_unaligned(d_off, &lastdirent->d_off))
error = -EFAULT;
else
-@@ -1098,7 +1116,7 @@ static ssize_t compat_do_readv_writev(in
+@@ -1098,7 +1116,7 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
* verify all the pointers
*/
ret = -EINVAL;
@@ -45842,7 +47747,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
out:
if (bprm->mm) {
acct_arg_size(bprm, 0);
-@@ -1711,6 +1801,8 @@ int compat_core_sys_select(int n, compat
+@@ -1711,6 +1801,8 @@ int compat_core_sys_select(int n, compat_ulong_t __user *inp,
struct fdtable *fdt;
long stack_fds[SELECT_STACK_ALLOC/sizeof(long)];
@@ -45851,7 +47756,7 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
if (n < 0)
goto out_nofds;
-@@ -2151,7 +2243,7 @@ asmlinkage long compat_sys_nfsservctl(in
+@@ -2151,7 +2243,7 @@ asmlinkage long compat_sys_nfsservctl(int cmd,
oldfs = get_fs();
set_fs(KERNEL_DS);
/* The __user pointer casts are valid because of the set_fs() */
@@ -45860,10 +47765,28 @@ diff -urNp linux-2.6.32.49/fs/compat.c linux-2.6.32.49/fs/compat.c
set_fs(oldfs);
if (err)
-diff -urNp linux-2.6.32.49/fs/compat_ioctl.c linux-2.6.32.49/fs/compat_ioctl.c
---- linux-2.6.32.49/fs/compat_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/compat_ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -234,6 +234,8 @@ static int do_video_set_spu_palette(unsi
+diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
+index 0adced2..bbb1b0d 100644
+--- a/fs/compat_binfmt_elf.c
++++ b/fs/compat_binfmt_elf.c
+@@ -29,10 +29,12 @@
+ #undef elfhdr
+ #undef elf_phdr
+ #undef elf_note
++#undef elf_dyn
+ #undef elf_addr_t
+ #define elfhdr elf32_hdr
+ #define elf_phdr elf32_phdr
+ #define elf_note elf32_note
++#define elf_dyn Elf32_Dyn
+ #define elf_addr_t Elf32_Addr
+
+ /*
+diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
+index d84e705..d8c364c 100644
+--- a/fs/compat_ioctl.c
++++ b/fs/compat_ioctl.c
+@@ -234,6 +234,8 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd, unsigned
up = (struct compat_video_spu_palette __user *) arg;
err = get_user(palp, &up->palette);
err |= get_user(length, &up->length);
@@ -45872,7 +47795,7 @@ diff -urNp linux-2.6.32.49/fs/compat_ioctl.c linux-2.6.32.49/fs/compat_ioctl.c
up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
err = put_user(compat_ptr(palp), &up_native->palette);
-@@ -1513,7 +1515,7 @@ static int serial_struct_ioctl(unsigned
+@@ -1513,7 +1515,7 @@ static int serial_struct_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
return -EFAULT;
if (__get_user(udata, &ss32->iomem_base))
return -EFAULT;
@@ -45881,7 +47804,7 @@ diff -urNp linux-2.6.32.49/fs/compat_ioctl.c linux-2.6.32.49/fs/compat_ioctl.c
if (__get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
__get_user(ss.port_high, &ss32->port_high))
return -EFAULT;
-@@ -1809,7 +1811,7 @@ static int compat_ioctl_preallocate(stru
+@@ -1809,7 +1811,7 @@ static int compat_ioctl_preallocate(struct file *file, unsigned long arg)
copy_in_user(&p->l_len, &p32->l_len, sizeof(s64)) ||
copy_in_user(&p->l_sysid, &p32->l_sysid, sizeof(s32)) ||
copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) ||
@@ -45890,10 +47813,11 @@ diff -urNp linux-2.6.32.49/fs/compat_ioctl.c linux-2.6.32.49/fs/compat_ioctl.c
return -EFAULT;
return ioctl_preallocate(file, p);
-diff -urNp linux-2.6.32.49/fs/configfs/dir.c linux-2.6.32.49/fs/configfs/dir.c
---- linux-2.6.32.49/fs/configfs/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/configfs/dir.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1572,7 +1572,8 @@ static int configfs_readdir(struct file
+diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
+index 8e48b52..f01ed91 100644
+--- a/fs/configfs/dir.c
++++ b/fs/configfs/dir.c
+@@ -1572,7 +1572,8 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
}
for (p=q->next; p!= &parent_sd->s_children; p=p->next) {
struct configfs_dirent *next;
@@ -45903,7 +47827,7 @@ diff -urNp linux-2.6.32.49/fs/configfs/dir.c linux-2.6.32.49/fs/configfs/dir.c
int len;
next = list_entry(p, struct configfs_dirent,
-@@ -1581,7 +1582,12 @@ static int configfs_readdir(struct file
+@@ -1581,7 +1582,12 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
continue;
name = configfs_get_name(next);
@@ -45917,9 +47841,10 @@ diff -urNp linux-2.6.32.49/fs/configfs/dir.c linux-2.6.32.49/fs/configfs/dir.c
if (next->s_dentry)
ino = next->s_dentry->d_inode->i_ino;
else
-diff -urNp linux-2.6.32.49/fs/dcache.c linux-2.6.32.49/fs/dcache.c
---- linux-2.6.32.49/fs/dcache.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/dcache.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 44c0aea..2529092 100644
+--- a/fs/dcache.c
++++ b/fs/dcache.c
@@ -45,8 +45,6 @@ EXPORT_SYMBOL(dcache_lock);
static struct kmem_cache *dentry_cache __read_mostly;
@@ -45929,7 +47854,7 @@ diff -urNp linux-2.6.32.49/fs/dcache.c linux-2.6.32.49/fs/dcache.c
/*
* This is the single most critical data structure when it comes
* to the dcache: the hashtable for lookups. Somebody should try
-@@ -2319,7 +2317,7 @@ void __init vfs_caches_init(unsigned lon
+@@ -2319,7 +2317,7 @@ void __init vfs_caches_init(unsigned long mempages)
mempages -= reserve;
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
@@ -45938,10 +47863,11 @@ diff -urNp linux-2.6.32.49/fs/dcache.c linux-2.6.32.49/fs/dcache.c
dcache_init();
inode_init();
-diff -urNp linux-2.6.32.49/fs/dlm/lockspace.c linux-2.6.32.49/fs/dlm/lockspace.c
---- linux-2.6.32.49/fs/dlm/lockspace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/dlm/lockspace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -148,7 +148,7 @@ static void lockspace_kobj_release(struc
+diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
+index c010ecf..a8d8c59 100644
+--- a/fs/dlm/lockspace.c
++++ b/fs/dlm/lockspace.c
+@@ -148,7 +148,7 @@ static void lockspace_kobj_release(struct kobject *k)
kfree(ls);
}
@@ -45950,10 +47876,11 @@ diff -urNp linux-2.6.32.49/fs/dlm/lockspace.c linux-2.6.32.49/fs/dlm/lockspace.c
.show = dlm_attr_show,
.store = dlm_attr_store,
};
-diff -urNp linux-2.6.32.49/fs/ecryptfs/inode.c linux-2.6.32.49/fs/ecryptfs/inode.c
---- linux-2.6.32.49/fs/ecryptfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ecryptfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -660,7 +660,7 @@ static int ecryptfs_readlink_lower(struc
+diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
+index 88ba4d4..073f003 100644
+--- a/fs/ecryptfs/inode.c
++++ b/fs/ecryptfs/inode.c
+@@ -660,7 +660,7 @@ static int ecryptfs_readlink_lower(struct dentry *dentry, char **buf,
old_fs = get_fs();
set_fs(get_ds());
rc = lower_dentry->d_inode->i_op->readlink(lower_dentry,
@@ -45962,7 +47889,7 @@ diff -urNp linux-2.6.32.49/fs/ecryptfs/inode.c linux-2.6.32.49/fs/ecryptfs/inode
lower_bufsiz);
set_fs(old_fs);
if (rc < 0)
-@@ -706,7 +706,7 @@ static void *ecryptfs_follow_link(struct
+@@ -706,7 +706,7 @@ static void *ecryptfs_follow_link(struct dentry *dentry, struct nameidata *nd)
}
old_fs = get_fs();
set_fs(get_ds());
@@ -45971,9 +47898,10 @@ diff -urNp linux-2.6.32.49/fs/ecryptfs/inode.c linux-2.6.32.49/fs/ecryptfs/inode
set_fs(old_fs);
if (rc < 0)
goto out_free;
-diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
---- linux-2.6.32.49/fs/exec.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/exec.c 2011-11-18 19:28:23.000000000 -0500
+diff --git a/fs/exec.c b/fs/exec.c
+index 86fafc6..b307bfa 100644
+--- a/fs/exec.c
++++ b/fs/exec.c
@@ -56,12 +56,24 @@
#include <linux/fsnotify.h>
#include <linux/fs_struct.h>
@@ -45999,7 +47927,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
int core_uses_pid;
char core_pattern[CORENAME_MAX_SIZE] = "core";
unsigned int core_pipe_limit;
-@@ -178,18 +190,10 @@ struct page *get_arg_page(struct linux_b
+@@ -178,18 +190,10 @@ struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
int write)
{
struct page *page;
@@ -46021,7 +47949,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
return NULL;
if (write) {
-@@ -263,6 +267,11 @@ static int __bprm_mm_init(struct linux_b
+@@ -263,6 +267,11 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
vma->vm_end = STACK_TOP_MAX;
vma->vm_start = vma->vm_end - PAGE_SIZE;
vma->vm_flags = VM_STACK_FLAGS;
@@ -46033,7 +47961,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
err = security_file_mmap(NULL, 0, 0, 0, vma->vm_start, 1);
-@@ -276,6 +285,12 @@ static int __bprm_mm_init(struct linux_b
+@@ -276,6 +285,12 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
mm->stack_vm = mm->total_vm = 1;
up_write(&mm->mmap_sem);
bprm->p = vma->vm_end - sizeof(void *);
@@ -46046,7 +47974,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
return 0;
err:
up_write(&mm->mmap_sem);
-@@ -510,7 +525,7 @@ int copy_strings_kernel(int argc,char **
+@@ -510,7 +525,7 @@ int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm)
int r;
mm_segment_t oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -46055,7 +47983,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
set_fs(oldfs);
return r;
}
-@@ -540,7 +555,8 @@ static int shift_arg_pages(struct vm_are
+@@ -540,7 +555,8 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
unsigned long new_end = old_end - shift;
struct mmu_gather *tlb;
@@ -46065,7 +47993,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
/*
* ensure there are no vmas between where we want to go
-@@ -549,6 +565,10 @@ static int shift_arg_pages(struct vm_are
+@@ -549,6 +565,10 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
if (vma != find_vma(mm, new_start))
return -EFAULT;
@@ -46076,7 +48004,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
/*
* cover the whole range: [new_start, old_end)
*/
-@@ -630,10 +650,6 @@ int setup_arg_pages(struct linux_binprm
+@@ -630,10 +650,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
stack_top = arch_align_stack(stack_top);
stack_top = PAGE_ALIGN(stack_top);
@@ -46087,7 +48015,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
stack_shift = vma->vm_end - stack_top;
bprm->p -= stack_shift;
-@@ -645,6 +661,14 @@ int setup_arg_pages(struct linux_binprm
+@@ -645,6 +661,14 @@ int setup_arg_pages(struct linux_binprm *bprm,
bprm->exec -= stack_shift;
down_write(&mm->mmap_sem);
@@ -46102,7 +48030,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
vm_flags = VM_STACK_FLAGS;
/*
-@@ -658,19 +682,24 @@ int setup_arg_pages(struct linux_binprm
+@@ -658,19 +682,24 @@ int setup_arg_pages(struct linux_binprm *bprm,
vm_flags &= ~VM_EXEC;
vm_flags |= mm->def_flags;
@@ -46134,7 +48062,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
stack_expand = EXTRA_STACK_VM_PAGES * PAGE_SIZE;
stack_size = vma->vm_end - vma->vm_start;
/*
-@@ -744,7 +773,7 @@ int kernel_read(struct file *file, loff_
+@@ -744,7 +773,7 @@ int kernel_read(struct file *file, loff_t offset,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -46143,7 +48071,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
set_fs(old_fs);
return result;
}
-@@ -1152,7 +1181,7 @@ int check_unsafe_exec(struct linux_binpr
+@@ -1152,7 +1181,7 @@ int check_unsafe_exec(struct linux_binprm *bprm)
}
rcu_read_unlock();
@@ -46484,7 +48412,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
static int zap_process(struct task_struct *start)
{
struct task_struct *t;
-@@ -1793,17 +2109,17 @@ static void wait_for_dump_helpers(struct
+@@ -1793,17 +2109,17 @@ static void wait_for_dump_helpers(struct file *file)
pipe = file->f_path.dentry->d_inode->i_pipe;
pipe_lock(pipe);
@@ -46507,7 +48435,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
pipe_unlock(pipe);
}
-@@ -1826,10 +2142,13 @@ void do_coredump(long signr, int exit_co
+@@ -1826,10 +2142,13 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
char **helper_argv = NULL;
int helper_argc = 0;
int dump_count = 0;
@@ -46522,7 +48450,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
binfmt = mm->binfmt;
if (!binfmt || !binfmt->core_dump)
goto fail;
-@@ -1874,6 +2193,8 @@ void do_coredump(long signr, int exit_co
+@@ -1874,6 +2193,8 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
*/
clear_thread_flag(TIF_SIGPENDING);
@@ -46531,7 +48459,7 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
/*
* lock_kernel() because format_corename() is controlled by sysctl, which
* uses lock_kernel()
-@@ -1908,7 +2229,7 @@ void do_coredump(long signr, int exit_co
+@@ -1908,7 +2229,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
goto fail_unlock;
}
@@ -46549,10 +48477,11 @@ diff -urNp linux-2.6.32.49/fs/exec.c linux-2.6.32.49/fs/exec.c
fail_unlock:
if (helper_argv)
argv_free(helper_argv);
-diff -urNp linux-2.6.32.49/fs/ext2/balloc.c linux-2.6.32.49/fs/ext2/balloc.c
---- linux-2.6.32.49/fs/ext2/balloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext2/balloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct e
+diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
+index 7f8d2e5..a1abdbb 100644
+--- a/fs/ext2/balloc.c
++++ b/fs/ext2/balloc.c
+@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct ext2_sb_info *sbi)
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -46561,10 +48490,11 @@ diff -urNp linux-2.6.32.49/fs/ext2/balloc.c linux-2.6.32.49/fs/ext2/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.32.49/fs/ext3/balloc.c linux-2.6.32.49/fs/ext3/balloc.c
---- linux-2.6.32.49/fs/ext3/balloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext3/balloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1421,7 +1421,7 @@ static int ext3_has_free_blocks(struct e
+diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
+index 27967f9..9f2a5fb 100644
+--- a/fs/ext3/balloc.c
++++ b/fs/ext3/balloc.c
+@@ -1421,7 +1421,7 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -46573,10 +48503,11 @@ diff -urNp linux-2.6.32.49/fs/ext3/balloc.c linux-2.6.32.49/fs/ext3/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.32.49/fs/ext4/balloc.c linux-2.6.32.49/fs/ext4/balloc.c
---- linux-2.6.32.49/fs/ext4/balloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext4/balloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -570,7 +570,7 @@ int ext4_has_free_blocks(struct ext4_sb_
+diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
+index e85b63c..80398e6 100644
+--- a/fs/ext4/balloc.c
++++ b/fs/ext4/balloc.c
+@@ -570,7 +570,7 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
/* Hm, nope. Are (enough) root reserved blocks available? */
if (sbi->s_resuid == current_fsuid() ||
((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
@@ -46585,9 +48516,10 @@ diff -urNp linux-2.6.32.49/fs/ext4/balloc.c linux-2.6.32.49/fs/ext4/balloc.c
if (free_blocks >= (nblocks + dirty_blocks))
return 1;
}
-diff -urNp linux-2.6.32.49/fs/ext4/ext4.h linux-2.6.32.49/fs/ext4/ext4.h
---- linux-2.6.32.49/fs/ext4/ext4.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext4/ext4.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
+index 67c46ed..1f237e5 100644
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
@@ -1077,19 +1077,19 @@ struct ext4_sb_info {
/* stats for buddy allocator */
@@ -46618,10 +48550,11 @@ diff -urNp linux-2.6.32.49/fs/ext4/ext4.h linux-2.6.32.49/fs/ext4/ext4.h
atomic_t s_lock_busy;
/* locality groups */
-diff -urNp linux-2.6.32.49/fs/ext4/file.c linux-2.6.32.49/fs/ext4/file.c
---- linux-2.6.32.49/fs/ext4/file.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext4/file.c 2011-11-15 19:59:43.000000000 -0500
-@@ -122,8 +122,8 @@ static int ext4_file_open(struct inode *
+diff --git a/fs/ext4/file.c b/fs/ext4/file.c
+index 2a60541..7439d61 100644
+--- a/fs/ext4/file.c
++++ b/fs/ext4/file.c
+@@ -122,8 +122,8 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
cp = d_path(&path, buf, sizeof(buf));
path_put(&path);
if (!IS_ERR(cp)) {
@@ -46632,10 +48565,11 @@ diff -urNp linux-2.6.32.49/fs/ext4/file.c linux-2.6.32.49/fs/ext4/file.c
sb->s_dirt = 1;
}
}
-diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
---- linux-2.6.32.49/fs/ext4/mballoc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext4/mballoc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1755,7 +1755,7 @@ void ext4_mb_simple_scan_group(struct ex
+diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
+index 42bac1b..0aab9d8 100644
+--- a/fs/ext4/mballoc.c
++++ b/fs/ext4/mballoc.c
+@@ -1755,7 +1755,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
BUG_ON(ac->ac_b_ex.fe_len != ac->ac_g_ex.fe_len);
if (EXT4_SB(sb)->s_mb_stats)
@@ -46653,7 +48587,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
goto repeat;
}
}
-@@ -2174,6 +2174,8 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2174,6 +2174,8 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
ext4_grpblk_t counters[16];
} sg;
@@ -46662,7 +48596,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
group--;
if (group == 0)
seq_printf(seq, "#%-5s: %-5s %-5s %-5s "
-@@ -2534,25 +2536,25 @@ int ext4_mb_release(struct super_block *
+@@ -2534,25 +2536,25 @@ int ext4_mb_release(struct super_block *sb)
if (sbi->s_mb_stats) {
printk(KERN_INFO
"EXT4-fs: mballoc: %u blocks %u reqs (%u success)\n",
@@ -46698,7 +48632,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
}
free_percpu(sbi->s_locality_groups);
-@@ -3034,16 +3036,16 @@ static void ext4_mb_collect_stats(struct
+@@ -3034,16 +3036,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) {
@@ -46721,7 +48655,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
}
if (ac->ac_op == EXT4_MB_HISTORY_ALLOC)
-@@ -3443,7 +3445,7 @@ ext4_mb_new_inode_pa(struct ext4_allocat
+@@ -3443,7 +3445,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
trace_ext4_mb_new_inode_pa(ac, pa);
ext4_mb_use_inode_pa(ac, pa);
@@ -46730,7 +48664,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
ei = EXT4_I(ac->ac_inode);
grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
-@@ -3503,7 +3505,7 @@ ext4_mb_new_group_pa(struct ext4_allocat
+@@ -3503,7 +3505,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
trace_ext4_mb_new_group_pa(ac, pa);
ext4_mb_use_group_pa(ac, pa);
@@ -46739,7 +48673,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
lg = ac->ac_lg;
-@@ -3607,7 +3609,7 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3607,7 +3609,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
* from the bitmap and continue.
*/
}
@@ -46748,7 +48682,7 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
return err;
}
-@@ -3626,7 +3628,7 @@ ext4_mb_release_group_pa(struct ext4_bud
+@@ -3626,7 +3628,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
@@ -46757,10 +48691,11 @@ diff -urNp linux-2.6.32.49/fs/ext4/mballoc.c linux-2.6.32.49/fs/ext4/mballoc.c
if (ac) {
ac->ac_sb = sb;
-diff -urNp linux-2.6.32.49/fs/ext4/super.c linux-2.6.32.49/fs/ext4/super.c
---- linux-2.6.32.49/fs/ext4/super.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ext4/super.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2287,7 +2287,7 @@ static void ext4_sb_release(struct kobje
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c
+index f27e045..be5a1c3 100644
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -2287,7 +2287,7 @@ static void ext4_sb_release(struct kobject *kobj)
}
@@ -46769,10 +48704,11 @@ diff -urNp linux-2.6.32.49/fs/ext4/super.c linux-2.6.32.49/fs/ext4/super.c
.show = ext4_attr_show,
.store = ext4_attr_store,
};
-diff -urNp linux-2.6.32.49/fs/fcntl.c linux-2.6.32.49/fs/fcntl.c
---- linux-2.6.32.49/fs/fcntl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fcntl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -223,6 +223,11 @@ int __f_setown(struct file *filp, struct
+diff --git a/fs/fcntl.c b/fs/fcntl.c
+index 97e01dc..e9aab2d 100644
+--- a/fs/fcntl.c
++++ b/fs/fcntl.c
+@@ -223,6 +223,11 @@ int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
if (err)
return err;
@@ -46793,7 +48729,7 @@ diff -urNp linux-2.6.32.49/fs/fcntl.c linux-2.6.32.49/fs/fcntl.c
struct f_owner_ex owner;
struct pid *pid;
int type;
-@@ -305,7 +310,7 @@ static int f_setown_ex(struct file *filp
+@@ -305,7 +310,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg)
static int f_getown_ex(struct file *filp, unsigned long arg)
{
@@ -46802,7 +48738,7 @@ diff -urNp linux-2.6.32.49/fs/fcntl.c linux-2.6.32.49/fs/fcntl.c
struct f_owner_ex owner;
int ret = 0;
-@@ -344,6 +349,7 @@ static long do_fcntl(int fd, unsigned in
+@@ -344,6 +349,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
switch (cmd) {
case F_DUPFD:
case F_DUPFD_CLOEXEC:
@@ -46810,10 +48746,11 @@ diff -urNp linux-2.6.32.49/fs/fcntl.c linux-2.6.32.49/fs/fcntl.c
if (arg >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
break;
err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0);
-diff -urNp linux-2.6.32.49/fs/fifo.c linux-2.6.32.49/fs/fifo.c
---- linux-2.6.32.49/fs/fifo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fifo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -59,10 +59,10 @@ static int fifo_open(struct inode *inode
+diff --git a/fs/fifo.c b/fs/fifo.c
+index f8f97b8..b1f2259 100644
+--- a/fs/fifo.c
++++ b/fs/fifo.c
+@@ -59,10 +59,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
*/
filp->f_op = &read_pipefifo_fops;
pipe->r_counter++;
@@ -46826,7 +48763,7 @@ diff -urNp linux-2.6.32.49/fs/fifo.c linux-2.6.32.49/fs/fifo.c
if ((filp->f_flags & O_NONBLOCK)) {
/* suppress POLLHUP until we have
* seen a writer */
-@@ -83,15 +83,15 @@ static int fifo_open(struct inode *inode
+@@ -83,15 +83,15 @@ static int fifo_open(struct inode *inode, struct file *filp)
* errno=ENXIO when there is no process reading the FIFO.
*/
ret = -ENXIO;
@@ -46845,7 +48782,7 @@ diff -urNp linux-2.6.32.49/fs/fifo.c linux-2.6.32.49/fs/fifo.c
wait_for_partner(inode, &pipe->r_counter);
if (signal_pending(current))
goto err_wr;
-@@ -107,11 +107,11 @@ static int fifo_open(struct inode *inode
+@@ -107,11 +107,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
*/
filp->f_op = &rdwr_pipefifo_fops;
@@ -46860,7 +48797,7 @@ diff -urNp linux-2.6.32.49/fs/fifo.c linux-2.6.32.49/fs/fifo.c
wake_up_partner(inode);
break;
-@@ -125,19 +125,19 @@ static int fifo_open(struct inode *inode
+@@ -125,19 +125,19 @@ static int fifo_open(struct inode *inode, struct file *filp)
return 0;
err_rd:
@@ -46883,9 +48820,10 @@ diff -urNp linux-2.6.32.49/fs/fifo.c linux-2.6.32.49/fs/fifo.c
free_pipe_info(inode);
err_nocleanup:
-diff -urNp linux-2.6.32.49/fs/file.c linux-2.6.32.49/fs/file.c
---- linux-2.6.32.49/fs/file.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/file.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/file.c b/fs/file.c
+index 87e1290..a930cc4 100644
+--- a/fs/file.c
++++ b/fs/file.c
@@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -46894,7 +48832,7 @@ diff -urNp linux-2.6.32.49/fs/file.c linux-2.6.32.49/fs/file.c
#include <linux/fdtable.h>
#include <linux/bitops.h>
#include <linux/interrupt.h>
-@@ -257,6 +258,8 @@ int expand_files(struct files_struct *fi
+@@ -257,6 +258,8 @@ int expand_files(struct files_struct *files, int nr)
* N.B. For clone tasks sharing a files structure, this test
* will limit the total number of files that can be opened.
*/
@@ -46903,10 +48841,11 @@ diff -urNp linux-2.6.32.49/fs/file.c linux-2.6.32.49/fs/file.c
if (nr >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
return -EMFILE;
-diff -urNp linux-2.6.32.49/fs/filesystems.c linux-2.6.32.49/fs/filesystems.c
---- linux-2.6.32.49/fs/filesystems.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/filesystems.c 2011-11-15 19:59:43.000000000 -0500
-@@ -272,7 +272,12 @@ struct file_system_type *get_fs_type(con
+diff --git a/fs/filesystems.c b/fs/filesystems.c
+index a24c58e..53f91ee 100644
+--- a/fs/filesystems.c
++++ b/fs/filesystems.c
+@@ -272,7 +272,12 @@ struct file_system_type *get_fs_type(const char *name)
int len = dot ? dot - name : strlen(name);
fs = __get_fs_type(name, len);
@@ -46919,10 +48858,94 @@ diff -urNp linux-2.6.32.49/fs/filesystems.c linux-2.6.32.49/fs/filesystems.c
fs = __get_fs_type(name, len);
if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
-diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie.c
---- linux-2.6.32.49/fs/fscache/cookie.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/cookie.c 2011-11-15 19:59:43.000000000 -0500
-@@ -68,11 +68,11 @@ struct fscache_cookie *__fscache_acquire
+diff --git a/fs/fs_struct.c b/fs/fs_struct.c
+index eee0590..ef5bc0e 100644
+--- a/fs/fs_struct.c
++++ b/fs/fs_struct.c
+@@ -4,6 +4,7 @@
+ #include <linux/path.h>
+ #include <linux/slab.h>
+ #include <linux/fs_struct.h>
++#include <linux/grsecurity.h>
+
+ /*
+ * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
+@@ -17,6 +18,7 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
+ old_root = fs->root;
+ fs->root = *path;
+ path_get(path);
++ gr_set_chroot_entries(current, path);
+ write_unlock(&fs->lock);
+ if (old_root.dentry)
+ path_put(&old_root);
+@@ -56,6 +58,7 @@ void chroot_fs_refs(struct path *old_root, struct path *new_root)
+ && fs->root.mnt == old_root->mnt) {
+ path_get(new_root);
+ fs->root = *new_root;
++ gr_set_chroot_entries(p, new_root);
+ count++;
+ }
+ if (fs->pwd.dentry == old_root->dentry
+@@ -89,7 +92,8 @@ void exit_fs(struct task_struct *tsk)
+ task_lock(tsk);
+ write_lock(&fs->lock);
+ tsk->fs = NULL;
+- kill = !--fs->users;
++ gr_clear_chroot_entries(tsk);
++ kill = !atomic_dec_return(&fs->users);
+ write_unlock(&fs->lock);
+ task_unlock(tsk);
+ if (kill)
+@@ -102,7 +106,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
+ struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
+ /* We don't need to lock fs - think why ;-) */
+ if (fs) {
+- fs->users = 1;
++ atomic_set(&fs->users, 1);
+ fs->in_exec = 0;
+ rwlock_init(&fs->lock);
+ fs->umask = old->umask;
+@@ -127,8 +131,9 @@ int unshare_fs_struct(void)
+
+ task_lock(current);
+ write_lock(&fs->lock);
+- kill = !--fs->users;
++ kill = !atomic_dec_return(&fs->users);
+ current->fs = new_fs;
++ gr_set_chroot_entries(current, &new_fs->root);
+ write_unlock(&fs->lock);
+ task_unlock(current);
+
+@@ -147,7 +152,7 @@ EXPORT_SYMBOL(current_umask);
+
+ /* to be mentioned only in INIT_TASK */
+ struct fs_struct init_fs = {
+- .users = 1,
++ .users = ATOMIC_INIT(1),
+ .lock = __RW_LOCK_UNLOCKED(init_fs.lock),
+ .umask = 0022,
+ };
+@@ -162,12 +167,13 @@ void daemonize_fs_struct(void)
+ task_lock(current);
+
+ write_lock(&init_fs.lock);
+- init_fs.users++;
++ atomic_inc(&init_fs.users);
+ write_unlock(&init_fs.lock);
+
+ write_lock(&fs->lock);
+ current->fs = &init_fs;
+- kill = !--fs->users;
++ gr_set_chroot_entries(current, &current->fs->root);
++ kill = !atomic_dec_return(&fs->users);
+ write_unlock(&fs->lock);
+
+ task_unlock(current);
+diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
+index 9905350..02eaec4 100644
+--- a/fs/fscache/cookie.c
++++ b/fs/fscache/cookie.c
+@@ -68,11 +68,11 @@ struct fscache_cookie *__fscache_acquire_cookie(
parent ? (char *) parent->def->name : "<no-parent>",
def->name, netfs_data);
@@ -46936,7 +48959,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" [no parent]");
return NULL;
}
-@@ -87,7 +87,7 @@ struct fscache_cookie *__fscache_acquire
+@@ -87,7 +87,7 @@ struct fscache_cookie *__fscache_acquire_cookie(
/* allocate and initialise a cookie */
cookie = kmem_cache_alloc(fscache_cookie_jar, GFP_KERNEL);
if (!cookie) {
@@ -46945,7 +48968,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" [ENOMEM]");
return NULL;
}
-@@ -109,13 +109,13 @@ struct fscache_cookie *__fscache_acquire
+@@ -109,13 +109,13 @@ struct fscache_cookie *__fscache_acquire_cookie(
switch (cookie->def->type) {
case FSCACHE_COOKIE_TYPE_INDEX:
@@ -46962,7 +48985,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
break;
}
-@@ -126,13 +126,13 @@ struct fscache_cookie *__fscache_acquire
+@@ -126,13 +126,13 @@ struct fscache_cookie *__fscache_acquire_cookie(
if (fscache_acquire_non_index_cookie(cookie) < 0) {
atomic_dec(&parent->n_children);
__fscache_cookie_put(cookie);
@@ -46978,7 +49001,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" = %p", cookie);
return cookie;
}
-@@ -168,7 +168,7 @@ static int fscache_acquire_non_index_coo
+@@ -168,7 +168,7 @@ static int fscache_acquire_non_index_cookie(struct fscache_cookie *cookie)
cache = fscache_select_cache_for_object(cookie->parent);
if (!cache) {
up_read(&fscache_addremove_sem);
@@ -46987,7 +49010,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" = -ENOMEDIUM [no cache]");
return -ENOMEDIUM;
}
-@@ -256,12 +256,12 @@ static int fscache_alloc_object(struct f
+@@ -256,12 +256,12 @@ static int fscache_alloc_object(struct fscache_cache *cache,
object = cache->ops->alloc_object(cache, cookie);
fscache_stat_d(&fscache_n_cop_alloc_object);
if (IS_ERR(object)) {
@@ -47002,7 +49025,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
object->debug_id = atomic_inc_return(&fscache_object_debug_id);
-@@ -377,10 +377,10 @@ void __fscache_update_cookie(struct fsca
+@@ -377,10 +377,10 @@ void __fscache_update_cookie(struct fscache_cookie *cookie)
struct fscache_object *object;
struct hlist_node *_p;
@@ -47015,7 +49038,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" [no cookie]");
return;
}
-@@ -414,12 +414,12 @@ void __fscache_relinquish_cookie(struct
+@@ -414,12 +414,12 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
struct fscache_object *object;
unsigned long event;
@@ -47031,7 +49054,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
_leave(" [no cookie]");
return;
}
-@@ -435,7 +435,7 @@ void __fscache_relinquish_cookie(struct
+@@ -435,7 +435,7 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
/* wait for the cookie to finish being instantiated (or to fail) */
if (test_bit(FSCACHE_COOKIE_CREATING, &cookie->flags)) {
@@ -47040,9 +49063,10 @@ diff -urNp linux-2.6.32.49/fs/fscache/cookie.c linux-2.6.32.49/fs/fscache/cookie
wait_on_bit(&cookie->flags, FSCACHE_COOKIE_CREATING,
fscache_wait_bit, TASK_UNINTERRUPTIBLE);
}
-diff -urNp linux-2.6.32.49/fs/fscache/internal.h linux-2.6.32.49/fs/fscache/internal.h
---- linux-2.6.32.49/fs/fscache/internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/internal.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
+index edd7434..0725e66 100644
+--- a/fs/fscache/internal.h
++++ b/fs/fscache/internal.h
@@ -136,94 +136,94 @@ extern void fscache_proc_cleanup(void);
extern atomic_t fscache_n_ops_processed[FSCACHE_MAX_THREADS];
extern atomic_t fscache_n_objs_processed[FSCACHE_MAX_THREADS];
@@ -47226,7 +49250,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/internal.h linux-2.6.32.49/fs/fscache/inte
extern atomic_t fscache_n_cop_alloc_object;
extern atomic_t fscache_n_cop_lookup_object;
-@@ -247,6 +247,11 @@ static inline void fscache_stat(atomic_t
+@@ -247,6 +247,11 @@ static inline void fscache_stat(atomic_t *stat)
atomic_inc(stat);
}
@@ -47238,7 +49262,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/internal.h linux-2.6.32.49/fs/fscache/inte
static inline void fscache_stat_d(atomic_t *stat)
{
atomic_dec(stat);
-@@ -259,6 +264,7 @@ extern const struct file_operations fsca
+@@ -259,6 +264,7 @@ extern const struct file_operations fscache_stats_fops;
#define __fscache_stat(stat) (NULL)
#define fscache_stat(stat) do {} while (0)
@@ -47246,10 +49270,11 @@ diff -urNp linux-2.6.32.49/fs/fscache/internal.h linux-2.6.32.49/fs/fscache/inte
#define fscache_stat_d(stat) do {} while (0)
#endif
-diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object.c
---- linux-2.6.32.49/fs/fscache/object.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/object.c 2011-11-15 19:59:43.000000000 -0500
-@@ -144,7 +144,7 @@ static void fscache_object_state_machine
+diff --git a/fs/fscache/object.c b/fs/fscache/object.c
+index e513ac5..e888d34 100644
+--- a/fs/fscache/object.c
++++ b/fs/fscache/object.c
+@@ -144,7 +144,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
/* update the object metadata on disk */
case FSCACHE_OBJECT_UPDATING:
clear_bit(FSCACHE_OBJECT_EV_UPDATE, &object->events);
@@ -47258,7 +49283,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
fscache_stat(&fscache_n_cop_update_object);
object->cache->ops->update_object(object);
fscache_stat_d(&fscache_n_cop_update_object);
-@@ -233,7 +233,7 @@ static void fscache_object_state_machine
+@@ -233,7 +233,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
spin_lock(&object->lock);
object->state = FSCACHE_OBJECT_DEAD;
spin_unlock(&object->lock);
@@ -47267,7 +49292,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
goto terminal_transit;
/* handle the parent cache of this object being withdrawn from
-@@ -248,7 +248,7 @@ static void fscache_object_state_machine
+@@ -248,7 +248,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
spin_lock(&object->lock);
object->state = FSCACHE_OBJECT_DEAD;
spin_unlock(&object->lock);
@@ -47276,7 +49301,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
goto terminal_transit;
/* complain about the object being woken up once it is
-@@ -492,7 +492,7 @@ static void fscache_lookup_object(struct
+@@ -492,7 +492,7 @@ static void fscache_lookup_object(struct fscache_object *object)
parent->cookie->def->name, cookie->def->name,
object->cache->tag->name);
@@ -47285,7 +49310,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
fscache_stat(&fscache_n_cop_lookup_object);
ret = object->cache->ops->lookup_object(object);
fscache_stat_d(&fscache_n_cop_lookup_object);
-@@ -503,7 +503,7 @@ static void fscache_lookup_object(struct
+@@ -503,7 +503,7 @@ static void fscache_lookup_object(struct fscache_object *object)
if (ret == -ETIMEDOUT) {
/* probably stuck behind another object, so move this one to
* the back of the queue */
@@ -47294,7 +49319,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
set_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
}
-@@ -526,7 +526,7 @@ void fscache_object_lookup_negative(stru
+@@ -526,7 +526,7 @@ void fscache_object_lookup_negative(struct fscache_object *object)
spin_lock(&object->lock);
if (object->state == FSCACHE_OBJECT_LOOKING_UP) {
@@ -47303,7 +49328,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
/* transit here to allow write requests to begin stacking up
* and read requests to begin returning ENODATA */
-@@ -572,7 +572,7 @@ void fscache_obtained_object(struct fsca
+@@ -572,7 +572,7 @@ void fscache_obtained_object(struct fscache_object *object)
* result, in which case there may be data available */
spin_lock(&object->lock);
if (object->state == FSCACHE_OBJECT_LOOKING_UP) {
@@ -47312,7 +49337,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
clear_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags);
-@@ -586,7 +586,7 @@ void fscache_obtained_object(struct fsca
+@@ -586,7 +586,7 @@ void fscache_obtained_object(struct fscache_object *object)
set_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
} else {
ASSERTCMP(object->state, ==, FSCACHE_OBJECT_CREATING);
@@ -47321,7 +49346,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
object->state = FSCACHE_OBJECT_AVAILABLE;
spin_unlock(&object->lock);
-@@ -633,7 +633,7 @@ static void fscache_object_available(str
+@@ -633,7 +633,7 @@ static void fscache_object_available(struct fscache_object *object)
fscache_enqueue_dependents(object);
fscache_hist(fscache_obj_instantiate_histogram, object->lookup_jif);
@@ -47330,7 +49355,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
_leave("");
}
-@@ -861,7 +861,7 @@ enum fscache_checkaux fscache_check_aux(
+@@ -861,7 +861,7 @@ enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
enum fscache_checkaux result;
if (!object->cookie->def->check_aux) {
@@ -47339,7 +49364,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
return FSCACHE_CHECKAUX_OKAY;
}
-@@ -870,17 +870,17 @@ enum fscache_checkaux fscache_check_aux(
+@@ -870,17 +870,17 @@ enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
switch (result) {
/* entry okay as is */
case FSCACHE_CHECKAUX_OKAY:
@@ -47360,9 +49385,10 @@ diff -urNp linux-2.6.32.49/fs/fscache/object.c linux-2.6.32.49/fs/fscache/object
break;
default:
-diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/operation.c
---- linux-2.6.32.49/fs/fscache/operation.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/operation.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
+index 313e79a..775240f 100644
+--- a/fs/fscache/operation.c
++++ b/fs/fscache/operation.c
@@ -16,7 +16,7 @@
#include <linux/seq_file.h>
#include "internal.h"
@@ -47372,7 +49398,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
EXPORT_SYMBOL(fscache_op_debug_id);
/**
-@@ -39,7 +39,7 @@ void fscache_enqueue_operation(struct fs
+@@ -39,7 +39,7 @@ void fscache_enqueue_operation(struct fscache_operation *op)
ASSERTCMP(op->object->state, >=, FSCACHE_OBJECT_AVAILABLE);
ASSERTCMP(atomic_read(&op->usage), >, 0);
@@ -47381,7 +49407,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
switch (op->flags & FSCACHE_OP_TYPE) {
case FSCACHE_OP_FAST:
_debug("queue fast");
-@@ -76,7 +76,7 @@ static void fscache_run_op(struct fscach
+@@ -76,7 +76,7 @@ static void fscache_run_op(struct fscache_object *object,
wake_up_bit(&op->flags, FSCACHE_OP_WAITING);
if (op->processor)
fscache_enqueue_operation(op);
@@ -47390,7 +49416,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
}
/*
-@@ -107,11 +107,11 @@ int fscache_submit_exclusive_op(struct f
+@@ -107,11 +107,11 @@ int fscache_submit_exclusive_op(struct fscache_object *object,
if (object->n_ops > 0) {
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -47404,7 +49430,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
fscache_start_operations(object);
} else {
ASSERTCMP(object->n_in_progress, ==, 0);
-@@ -127,7 +127,7 @@ int fscache_submit_exclusive_op(struct f
+@@ -127,7 +127,7 @@ int fscache_submit_exclusive_op(struct fscache_object *object,
object->n_exclusive++; /* reads and writes must wait */
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -47413,7 +49439,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
ret = 0;
} else {
/* not allowed to submit ops in any other state */
-@@ -214,11 +214,11 @@ int fscache_submit_op(struct fscache_obj
+@@ -214,11 +214,11 @@ int fscache_submit_op(struct fscache_object *object,
if (object->n_exclusive > 0) {
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -47427,7 +49453,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
fscache_start_operations(object);
} else {
ASSERTCMP(object->n_exclusive, ==, 0);
-@@ -230,12 +230,12 @@ int fscache_submit_op(struct fscache_obj
+@@ -230,12 +230,12 @@ int fscache_submit_op(struct fscache_object *object,
object->n_ops++;
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -47442,7 +49468,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
ret = -ENOBUFS;
} else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) {
fscache_report_unexpected_submission(object, op, ostate);
-@@ -305,7 +305,7 @@ int fscache_cancel_op(struct fscache_ope
+@@ -305,7 +305,7 @@ int fscache_cancel_op(struct fscache_operation *op)
ret = -EBUSY;
if (!list_empty(&op->pend_link)) {
@@ -47451,7 +49477,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
list_del_init(&op->pend_link);
object->n_ops--;
if (test_bit(FSCACHE_OP_EXCLUSIVE, &op->flags))
-@@ -344,7 +344,7 @@ void fscache_put_operation(struct fscach
+@@ -344,7 +344,7 @@ void fscache_put_operation(struct fscache_operation *op)
if (test_and_set_bit(FSCACHE_OP_DEAD, &op->flags))
BUG();
@@ -47460,7 +49486,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
if (op->release) {
op->release(op);
-@@ -361,7 +361,7 @@ void fscache_put_operation(struct fscach
+@@ -361,7 +361,7 @@ void fscache_put_operation(struct fscache_operation *op)
* lock, and defer it otherwise */
if (!spin_trylock(&object->lock)) {
_debug("defer put");
@@ -47469,7 +49495,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
cache = object->cache;
spin_lock(&cache->op_gc_list_lock);
-@@ -423,7 +423,7 @@ void fscache_operation_gc(struct work_st
+@@ -423,7 +423,7 @@ void fscache_operation_gc(struct work_struct *work)
_debug("GC DEFERRED REL OBJ%x OP%x",
object->debug_id, op->debug_id);
@@ -47478,10 +49504,11 @@ diff -urNp linux-2.6.32.49/fs/fscache/operation.c linux-2.6.32.49/fs/fscache/ope
ASSERTCMP(atomic_read(&op->usage), ==, 0);
-diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
---- linux-2.6.32.49/fs/fscache/page.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/page.c 2011-11-15 19:59:43.000000000 -0500
-@@ -59,7 +59,7 @@ bool __fscache_maybe_release_page(struct
+diff --git a/fs/fscache/page.c b/fs/fscache/page.c
+index c598ea4..6aac13e 100644
+--- a/fs/fscache/page.c
++++ b/fs/fscache/page.c
+@@ -59,7 +59,7 @@ bool __fscache_maybe_release_page(struct fscache_cookie *cookie,
val = radix_tree_lookup(&cookie->stores, page->index);
if (!val) {
rcu_read_unlock();
@@ -47490,7 +49517,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
__fscache_uncache_page(cookie, page);
return true;
}
-@@ -89,11 +89,11 @@ bool __fscache_maybe_release_page(struct
+@@ -89,11 +89,11 @@ bool __fscache_maybe_release_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->stores_lock);
if (xpage) {
@@ -47514,7 +49541,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
return false;
}
EXPORT_SYMBOL(__fscache_maybe_release_page);
-@@ -130,7 +130,7 @@ static void fscache_end_page_write(struc
+@@ -130,7 +130,7 @@ static void fscache_end_page_write(struct fscache_object *object,
FSCACHE_COOKIE_STORING_TAG);
if (!radix_tree_tag_get(&cookie->stores, page->index,
FSCACHE_COOKIE_PENDING_TAG)) {
@@ -47523,7 +49550,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
xpage = radix_tree_delete(&cookie->stores, page->index);
}
spin_unlock(&cookie->stores_lock);
-@@ -151,7 +151,7 @@ static void fscache_attr_changed_op(stru
+@@ -151,7 +151,7 @@ static void fscache_attr_changed_op(struct fscache_operation *op)
_enter("{OBJ%x OP%x}", object->debug_id, op->debug_id);
@@ -47532,7 +49559,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
if (fscache_object_is_active(object)) {
fscache_set_op_state(op, "CallFS");
-@@ -178,11 +178,11 @@ int __fscache_attr_changed(struct fscach
+@@ -178,11 +178,11 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
@@ -47546,7 +49573,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ENOMEM");
return -ENOMEM;
}
-@@ -202,7 +202,7 @@ int __fscache_attr_changed(struct fscach
+@@ -202,7 +202,7 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
if (fscache_submit_exclusive_op(object, op) < 0)
goto nobufs;
spin_unlock(&cookie->lock);
@@ -47555,7 +49582,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
fscache_put_operation(op);
_leave(" = 0");
return 0;
-@@ -210,7 +210,7 @@ int __fscache_attr_changed(struct fscach
+@@ -210,7 +210,7 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
nobufs:
spin_unlock(&cookie->lock);
kfree(op);
@@ -47564,7 +49591,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = %d", -ENOBUFS);
return -ENOBUFS;
}
-@@ -264,7 +264,7 @@ static struct fscache_retrieval *fscache
+@@ -264,7 +264,7 @@ static struct fscache_retrieval *fscache_alloc_retrieval(
/* allocate a retrieval operation and attempt to submit it */
op = kzalloc(sizeof(*op), GFP_NOIO);
if (!op) {
@@ -47573,7 +49600,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
return NULL;
}
-@@ -294,13 +294,13 @@ static int fscache_wait_for_deferred_loo
+@@ -294,13 +294,13 @@ static int fscache_wait_for_deferred_lookup(struct fscache_cookie *cookie)
return 0;
}
@@ -47589,7 +49616,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ERESTARTSYS");
return -ERESTARTSYS;
}
-@@ -318,8 +318,8 @@ static int fscache_wait_for_deferred_loo
+@@ -318,8 +318,8 @@ static int fscache_wait_for_deferred_lookup(struct fscache_cookie *cookie)
*/
static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
struct fscache_retrieval *op,
@@ -47600,7 +49627,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
{
int ret;
-@@ -327,7 +327,7 @@ static int fscache_wait_for_retrieval_ac
+@@ -327,7 +327,7 @@ static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
goto check_if_dead;
_debug(">>> WT");
@@ -47609,7 +49636,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
if (wait_on_bit(&op->op.flags, FSCACHE_OP_WAITING,
fscache_wait_bit_interruptible,
TASK_INTERRUPTIBLE) < 0) {
-@@ -344,7 +344,7 @@ static int fscache_wait_for_retrieval_ac
+@@ -344,7 +344,7 @@ static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
check_if_dead:
if (unlikely(fscache_object_is_dead(object))) {
@@ -47618,7 +49645,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
return -ENOBUFS;
}
return 0;
-@@ -371,7 +371,7 @@ int __fscache_read_or_alloc_page(struct
+@@ -371,7 +371,7 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
_enter("%p,%p,,,", cookie, page);
@@ -47627,7 +49654,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -405,7 +405,7 @@ int __fscache_read_or_alloc_page(struct
+@@ -405,7 +405,7 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -47636,7 +49663,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
/* pin the netfs read context in case we need to do the actual netfs
* read because we've encountered a cache read failure */
-@@ -435,15 +435,15 @@ int __fscache_read_or_alloc_page(struct
+@@ -435,15 +435,15 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
error:
if (ret == -ENOMEM)
@@ -47666,7 +49693,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -491,7 +491,7 @@ int __fscache_read_or_alloc_pages(struct
+@@ -491,7 +491,7 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
_enter("%p,,%d,,,", cookie, *nr_pages);
@@ -47675,7 +49702,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -522,7 +522,7 @@ int __fscache_read_or_alloc_pages(struct
+@@ -522,7 +522,7 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -47684,7 +49711,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
/* pin the netfs read context in case we need to do the actual netfs
* read because we've encountered a cache read failure */
-@@ -552,15 +552,15 @@ int __fscache_read_or_alloc_pages(struct
+@@ -552,15 +552,15 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
error:
if (ret == -ENOMEM)
@@ -47714,7 +49741,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -594,7 +594,7 @@ int __fscache_alloc_page(struct fscache_
+@@ -594,7 +594,7 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
_enter("%p,%p,,,", cookie, page);
@@ -47723,7 +49750,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -621,7 +621,7 @@ int __fscache_alloc_page(struct fscache_
+@@ -621,7 +621,7 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -47732,7 +49759,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
ret = fscache_wait_for_retrieval_activation(
object, op,
-@@ -637,11 +637,11 @@ int __fscache_alloc_page(struct fscache_
+@@ -637,11 +637,11 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
error:
if (ret == -ERESTARTSYS)
@@ -47756,7 +49783,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -694,7 +694,7 @@ static void fscache_write_op(struct fsca
+@@ -694,7 +694,7 @@ static void fscache_write_op(struct fscache_operation *_op)
spin_lock(&cookie->stores_lock);
@@ -47765,7 +49792,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
/* find a page to store */
page = NULL;
-@@ -705,7 +705,7 @@ static void fscache_write_op(struct fsca
+@@ -705,7 +705,7 @@ static void fscache_write_op(struct fscache_operation *_op)
page = results[0];
_debug("gang %d [%lx]", n, page->index);
if (page->index > op->store_limit) {
@@ -47774,7 +49801,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
goto superseded;
}
-@@ -721,7 +721,7 @@ static void fscache_write_op(struct fsca
+@@ -721,7 +721,7 @@ static void fscache_write_op(struct fscache_operation *_op)
if (page) {
fscache_set_op_state(&op->op, "Store");
@@ -47783,7 +49810,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
fscache_stat(&fscache_n_cop_write_page);
ret = object->cache->ops->write_page(op, page);
fscache_stat_d(&fscache_n_cop_write_page);
-@@ -792,7 +792,7 @@ int __fscache_write_page(struct fscache_
+@@ -792,7 +792,7 @@ int __fscache_write_page(struct fscache_cookie *cookie,
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ASSERT(PageFsCache(page));
@@ -47792,7 +49819,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
op = kzalloc(sizeof(*op), GFP_NOIO);
if (!op)
-@@ -844,7 +844,7 @@ int __fscache_write_page(struct fscache_
+@@ -844,7 +844,7 @@ int __fscache_write_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->stores_lock);
spin_unlock(&object->lock);
@@ -47801,7 +49828,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
op->store_limit = object->store_limit;
if (fscache_submit_op(object, &op->op) < 0)
-@@ -852,8 +852,8 @@ int __fscache_write_page(struct fscache_
+@@ -852,8 +852,8 @@ int __fscache_write_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->lock);
radix_tree_preload_end();
@@ -47812,7 +49839,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
/* the slow work queue now carries its own ref on the object */
fscache_put_operation(&op->op);
-@@ -861,14 +861,14 @@ int __fscache_write_page(struct fscache_
+@@ -861,14 +861,14 @@ int __fscache_write_page(struct fscache_cookie *cookie,
return 0;
already_queued:
@@ -47846,7 +49873,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
_leave(" = -ENOMEM");
return -ENOMEM;
}
-@@ -911,7 +911,7 @@ void __fscache_uncache_page(struct fscac
+@@ -911,7 +911,7 @@ void __fscache_uncache_page(struct fscache_cookie *cookie, struct page *page)
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ASSERTCMP(page, !=, NULL);
@@ -47855,7 +49882,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
/* cache withdrawal may beat us to it */
if (!PageFsCache(page))
-@@ -964,7 +964,7 @@ void fscache_mark_pages_cached(struct fs
+@@ -964,7 +964,7 @@ void fscache_mark_pages_cached(struct fscache_retrieval *op,
unsigned long loop;
#ifdef CONFIG_FSCACHE_STATS
@@ -47864,9 +49891,10 @@ diff -urNp linux-2.6.32.49/fs/fscache/page.c linux-2.6.32.49/fs/fscache/page.c
#endif
for (loop = 0; loop < pagevec->nr; loop++) {
-diff -urNp linux-2.6.32.49/fs/fscache/stats.c linux-2.6.32.49/fs/fscache/stats.c
---- linux-2.6.32.49/fs/fscache/stats.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fscache/stats.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
+index 46435f3..8cddf18 100644
+--- a/fs/fscache/stats.c
++++ b/fs/fscache/stats.c
@@ -18,95 +18,95 @@
/*
* operation counters
@@ -48052,7 +50080,7 @@ diff -urNp linux-2.6.32.49/fs/fscache/stats.c linux-2.6.32.49/fs/fscache/stats.c
atomic_t fscache_n_cop_alloc_object;
atomic_t fscache_n_cop_lookup_object;
-@@ -133,113 +133,113 @@ static int fscache_stats_show(struct seq
+@@ -133,113 +133,113 @@ static int fscache_stats_show(struct seq_file *m, void *v)
seq_puts(m, "FS-Cache statistics\n");
seq_printf(m, "Cookies: idx=%u dat=%u spc=%u\n",
@@ -48242,91 +50270,10 @@ diff -urNp linux-2.6.32.49/fs/fscache/stats.c linux-2.6.32.49/fs/fscache/stats.c
seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n",
atomic_read(&fscache_n_cop_alloc_object),
-diff -urNp linux-2.6.32.49/fs/fs_struct.c linux-2.6.32.49/fs/fs_struct.c
---- linux-2.6.32.49/fs/fs_struct.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fs_struct.c 2011-11-15 19:59:43.000000000 -0500
-@@ -4,6 +4,7 @@
- #include <linux/path.h>
- #include <linux/slab.h>
- #include <linux/fs_struct.h>
-+#include <linux/grsecurity.h>
-
- /*
- * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
-@@ -17,6 +18,7 @@ void set_fs_root(struct fs_struct *fs, s
- old_root = fs->root;
- fs->root = *path;
- path_get(path);
-+ gr_set_chroot_entries(current, path);
- write_unlock(&fs->lock);
- if (old_root.dentry)
- path_put(&old_root);
-@@ -56,6 +58,7 @@ void chroot_fs_refs(struct path *old_roo
- && fs->root.mnt == old_root->mnt) {
- path_get(new_root);
- fs->root = *new_root;
-+ gr_set_chroot_entries(p, new_root);
- count++;
- }
- if (fs->pwd.dentry == old_root->dentry
-@@ -89,7 +92,8 @@ void exit_fs(struct task_struct *tsk)
- task_lock(tsk);
- write_lock(&fs->lock);
- tsk->fs = NULL;
-- kill = !--fs->users;
-+ gr_clear_chroot_entries(tsk);
-+ kill = !atomic_dec_return(&fs->users);
- write_unlock(&fs->lock);
- task_unlock(tsk);
- if (kill)
-@@ -102,7 +106,7 @@ struct fs_struct *copy_fs_struct(struct
- struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
- /* We don't need to lock fs - think why ;-) */
- if (fs) {
-- fs->users = 1;
-+ atomic_set(&fs->users, 1);
- fs->in_exec = 0;
- rwlock_init(&fs->lock);
- fs->umask = old->umask;
-@@ -127,8 +131,9 @@ int unshare_fs_struct(void)
-
- task_lock(current);
- write_lock(&fs->lock);
-- kill = !--fs->users;
-+ kill = !atomic_dec_return(&fs->users);
- current->fs = new_fs;
-+ gr_set_chroot_entries(current, &new_fs->root);
- write_unlock(&fs->lock);
- task_unlock(current);
-
-@@ -147,7 +152,7 @@ EXPORT_SYMBOL(current_umask);
-
- /* to be mentioned only in INIT_TASK */
- struct fs_struct init_fs = {
-- .users = 1,
-+ .users = ATOMIC_INIT(1),
- .lock = __RW_LOCK_UNLOCKED(init_fs.lock),
- .umask = 0022,
- };
-@@ -162,12 +167,13 @@ void daemonize_fs_struct(void)
- task_lock(current);
-
- write_lock(&init_fs.lock);
-- init_fs.users++;
-+ atomic_inc(&init_fs.users);
- write_unlock(&init_fs.lock);
-
- write_lock(&fs->lock);
- current->fs = &init_fs;
-- kill = !--fs->users;
-+ gr_set_chroot_entries(current, &current->fs->root);
-+ kill = !atomic_dec_return(&fs->users);
- write_unlock(&fs->lock);
-
- task_unlock(current);
-diff -urNp linux-2.6.32.49/fs/fuse/cuse.c linux-2.6.32.49/fs/fuse/cuse.c
---- linux-2.6.32.49/fs/fuse/cuse.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fuse/cuse.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
+index de792dc..448b532 100644
+--- a/fs/fuse/cuse.c
++++ b/fs/fuse/cuse.c
@@ -576,10 +576,12 @@ static int __init cuse_init(void)
INIT_LIST_HEAD(&cuse_conntbl[i]);
@@ -48344,10 +50291,11 @@ diff -urNp linux-2.6.32.49/fs/fuse/cuse.c linux-2.6.32.49/fs/fuse/cuse.c
cuse_class = class_create(THIS_MODULE, "cuse");
if (IS_ERR(cuse_class))
-diff -urNp linux-2.6.32.49/fs/fuse/dev.c linux-2.6.32.49/fs/fuse/dev.c
---- linux-2.6.32.49/fs/fuse/dev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fuse/dev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -885,7 +885,7 @@ static int fuse_notify_inval_entry(struc
+diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
+index 1facb39..7f48557 100644
+--- a/fs/fuse/dev.c
++++ b/fs/fuse/dev.c
+@@ -885,7 +885,7 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size,
{
struct fuse_notify_inval_entry_out outarg;
int err = -EINVAL;
@@ -48356,7 +50304,7 @@ diff -urNp linux-2.6.32.49/fs/fuse/dev.c linux-2.6.32.49/fs/fuse/dev.c
struct qstr name;
if (size < sizeof(outarg))
-@@ -899,6 +899,11 @@ static int fuse_notify_inval_entry(struc
+@@ -899,6 +899,11 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size,
if (outarg.namelen > FUSE_NAME_MAX)
goto err;
@@ -48368,7 +50316,7 @@ diff -urNp linux-2.6.32.49/fs/fuse/dev.c linux-2.6.32.49/fs/fuse/dev.c
err = -EINVAL;
if (size != sizeof(outarg) + outarg.namelen + 1)
goto err;
-@@ -914,17 +919,15 @@ static int fuse_notify_inval_entry(struc
+@@ -914,17 +919,15 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size,
down_read(&fc->killsb);
err = -ENOENT;
@@ -48390,10 +50338,11 @@ diff -urNp linux-2.6.32.49/fs/fuse/dev.c linux-2.6.32.49/fs/fuse/dev.c
return err;
}
-diff -urNp linux-2.6.32.49/fs/fuse/dir.c linux-2.6.32.49/fs/fuse/dir.c
---- linux-2.6.32.49/fs/fuse/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/fuse/dir.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1127,7 +1127,7 @@ static char *read_link(struct dentry *de
+diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
+index 4787ae6..73efff7 100644
+--- a/fs/fuse/dir.c
++++ b/fs/fuse/dir.c
+@@ -1127,7 +1127,7 @@ static char *read_link(struct dentry *dentry)
return link;
}
@@ -48402,10 +50351,11 @@ diff -urNp linux-2.6.32.49/fs/fuse/dir.c linux-2.6.32.49/fs/fuse/dir.c
{
if (!IS_ERR(link))
free_page((unsigned long) link);
-diff -urNp linux-2.6.32.49/fs/gfs2/ops_inode.c linux-2.6.32.49/fs/gfs2/ops_inode.c
---- linux-2.6.32.49/fs/gfs2/ops_inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/gfs2/ops_inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -752,6 +752,8 @@ static int gfs2_rename(struct inode *odi
+diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
+index 247436c..e650ccb 100644
+--- a/fs/gfs2/ops_inode.c
++++ b/fs/gfs2/ops_inode.c
+@@ -752,6 +752,8 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
unsigned int x;
int error;
@@ -48414,10 +50364,11 @@ diff -urNp linux-2.6.32.49/fs/gfs2/ops_inode.c linux-2.6.32.49/fs/gfs2/ops_inode
if (ndentry->d_inode) {
nip = GFS2_I(ndentry->d_inode);
if (ip == nip)
-diff -urNp linux-2.6.32.49/fs/gfs2/sys.c linux-2.6.32.49/fs/gfs2/sys.c
---- linux-2.6.32.49/fs/gfs2/sys.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/gfs2/sys.c 2011-11-15 19:59:43.000000000 -0500
-@@ -49,7 +49,7 @@ static ssize_t gfs2_attr_store(struct ko
+diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
+index 4463297..4fed53b 100644
+--- a/fs/gfs2/sys.c
++++ b/fs/gfs2/sys.c
+@@ -49,7 +49,7 @@ static ssize_t gfs2_attr_store(struct kobject *kobj, struct attribute *attr,
return a->store ? a->store(sdp, buf, len) : len;
}
@@ -48426,7 +50377,7 @@ diff -urNp linux-2.6.32.49/fs/gfs2/sys.c linux-2.6.32.49/fs/gfs2/sys.c
.show = gfs2_attr_show,
.store = gfs2_attr_store,
};
-@@ -584,7 +584,7 @@ static int gfs2_uevent(struct kset *kset
+@@ -584,7 +584,7 @@ static int gfs2_uevent(struct kset *kset, struct kobject *kobj,
return 0;
}
@@ -48435,10 +50386,11 @@ diff -urNp linux-2.6.32.49/fs/gfs2/sys.c linux-2.6.32.49/fs/gfs2/sys.c
.uevent = gfs2_uevent,
};
-diff -urNp linux-2.6.32.49/fs/hfs/btree.c linux-2.6.32.49/fs/hfs/btree.c
---- linux-2.6.32.49/fs/hfs/btree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfs/btree.c 2011-11-18 18:49:57.000000000 -0500
-@@ -45,11 +45,27 @@ struct hfs_btree *hfs_btree_open(struct
+diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
+index 052f214..2462c5b 100644
+--- a/fs/hfs/btree.c
++++ b/fs/hfs/btree.c
+@@ -45,11 +45,27 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
case HFS_EXT_CNID:
hfs_inode_read_fork(tree->inode, mdb->drXTExtRec, mdb->drXTFlSize,
mdb->drXTFlSize, be32_to_cpu(mdb->drXTClpSiz));
@@ -48466,7 +50418,7 @@ diff -urNp linux-2.6.32.49/fs/hfs/btree.c linux-2.6.32.49/fs/hfs/btree.c
tree->inode->i_mapping->a_ops = &hfs_btree_aops;
break;
default:
-@@ -58,11 +74,6 @@ struct hfs_btree *hfs_btree_open(struct
+@@ -58,11 +74,6 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
}
unlock_new_inode(tree->inode);
@@ -48478,10 +50430,11 @@ diff -urNp linux-2.6.32.49/fs/hfs/btree.c linux-2.6.32.49/fs/hfs/btree.c
mapping = tree->inode->i_mapping;
page = read_mapping_page(mapping, 0, NULL);
if (IS_ERR(page))
-diff -urNp linux-2.6.32.49/fs/hfsplus/catalog.c linux-2.6.32.49/fs/hfsplus/catalog.c
---- linux-2.6.32.49/fs/hfsplus/catalog.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfsplus/catalog.c 2011-11-15 19:59:43.000000000 -0500
-@@ -157,6 +157,8 @@ int hfsplus_find_cat(struct super_block
+diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
+index f6874ac..7cd98a8 100644
+--- a/fs/hfsplus/catalog.c
++++ b/fs/hfsplus/catalog.c
+@@ -157,6 +157,8 @@ int hfsplus_find_cat(struct super_block *sb, u32 cnid,
int err;
u16 type;
@@ -48490,7 +50443,7 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/catalog.c linux-2.6.32.49/fs/hfsplus/catal
hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL);
err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry));
if (err)
-@@ -186,6 +188,8 @@ int hfsplus_create_cat(u32 cnid, struct
+@@ -186,6 +188,8 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, struct ino
int entry_size;
int err;
@@ -48508,10 +50461,11 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/catalog.c linux-2.6.32.49/fs/hfsplus/catal
dprint(DBG_CAT_MOD, "rename_cat: %u - %lu,%s - %lu,%s\n", cnid, src_dir->i_ino, src_name->name,
dst_dir->i_ino, dst_name->name);
sb = src_dir->i_sb;
-diff -urNp linux-2.6.32.49/fs/hfsplus/dir.c linux-2.6.32.49/fs/hfsplus/dir.c
---- linux-2.6.32.49/fs/hfsplus/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfsplus/dir.c 2011-11-15 19:59:43.000000000 -0500
-@@ -121,6 +121,8 @@ static int hfsplus_readdir(struct file *
+diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
+index 5f40236..dac3421 100644
+--- a/fs/hfsplus/dir.c
++++ b/fs/hfsplus/dir.c
+@@ -121,6 +121,8 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct hfsplus_readdir_data *rd;
u16 type;
@@ -48520,10 +50474,11 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/dir.c linux-2.6.32.49/fs/hfsplus/dir.c
if (filp->f_pos >= inode->i_size)
return 0;
-diff -urNp linux-2.6.32.49/fs/hfsplus/inode.c linux-2.6.32.49/fs/hfsplus/inode.c
---- linux-2.6.32.49/fs/hfsplus/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfsplus/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -399,6 +399,8 @@ int hfsplus_cat_read_inode(struct inode
+diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
+index 1bcf597..905a251 100644
+--- a/fs/hfsplus/inode.c
++++ b/fs/hfsplus/inode.c
+@@ -399,6 +399,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
int res = 0;
u16 type;
@@ -48532,7 +50487,7 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/inode.c linux-2.6.32.49/fs/hfsplus/inode.c
type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset);
HFSPLUS_I(inode).dev = 0;
-@@ -461,6 +463,8 @@ int hfsplus_cat_write_inode(struct inode
+@@ -461,6 +463,8 @@ int hfsplus_cat_write_inode(struct inode *inode)
struct hfs_find_data fd;
hfsplus_cat_entry entry;
@@ -48541,10 +50496,11 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/inode.c linux-2.6.32.49/fs/hfsplus/inode.c
if (HFSPLUS_IS_RSRC(inode))
main_inode = HFSPLUS_I(inode).rsrc_inode;
-diff -urNp linux-2.6.32.49/fs/hfsplus/ioctl.c linux-2.6.32.49/fs/hfsplus/ioctl.c
---- linux-2.6.32.49/fs/hfsplus/ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfsplus/ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -101,6 +101,8 @@ int hfsplus_setxattr(struct dentry *dent
+diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
+index f457d2c..7ef4ad5 100644
+--- a/fs/hfsplus/ioctl.c
++++ b/fs/hfsplus/ioctl.c
+@@ -101,6 +101,8 @@ int hfsplus_setxattr(struct dentry *dentry, const char *name,
struct hfsplus_cat_file *file;
int res;
@@ -48553,7 +50509,7 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/ioctl.c linux-2.6.32.49/fs/hfsplus/ioctl.c
if (!S_ISREG(inode->i_mode) || HFSPLUS_IS_RSRC(inode))
return -EOPNOTSUPP;
-@@ -143,6 +145,8 @@ ssize_t hfsplus_getxattr(struct dentry *
+@@ -143,6 +145,8 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
struct hfsplus_cat_file *file;
ssize_t res = 0;
@@ -48562,10 +50518,11 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/ioctl.c linux-2.6.32.49/fs/hfsplus/ioctl.c
if (!S_ISREG(inode->i_mode) || HFSPLUS_IS_RSRC(inode))
return -EOPNOTSUPP;
-diff -urNp linux-2.6.32.49/fs/hfsplus/super.c linux-2.6.32.49/fs/hfsplus/super.c
---- linux-2.6.32.49/fs/hfsplus/super.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hfsplus/super.c 2011-11-15 19:59:43.000000000 -0500
-@@ -312,6 +312,8 @@ static int hfsplus_fill_super(struct sup
+diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
+index 43022f3..7298079 100644
+--- a/fs/hfsplus/super.c
++++ b/fs/hfsplus/super.c
+@@ -312,6 +312,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
struct nls_table *nls = NULL;
int err = -EINVAL;
@@ -48574,10 +50531,11 @@ diff -urNp linux-2.6.32.49/fs/hfsplus/super.c linux-2.6.32.49/fs/hfsplus/super.c
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/fs/hugetlbfs/inode.c linux-2.6.32.49/fs/hugetlbfs/inode.c
---- linux-2.6.32.49/fs/hugetlbfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/hugetlbfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -909,7 +909,7 @@ static struct file_system_type hugetlbfs
+diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
+index 87a1258..5694d91 100644
+--- a/fs/hugetlbfs/inode.c
++++ b/fs/hugetlbfs/inode.c
+@@ -909,7 +909,7 @@ static struct file_system_type hugetlbfs_fs_type = {
.kill_sb = kill_litter_super,
};
@@ -48586,10 +50544,11 @@ diff -urNp linux-2.6.32.49/fs/hugetlbfs/inode.c linux-2.6.32.49/fs/hugetlbfs/ino
static int can_do_hugetlb_shm(void)
{
-diff -urNp linux-2.6.32.49/fs/ioctl.c linux-2.6.32.49/fs/ioctl.c
---- linux-2.6.32.49/fs/ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -97,7 +97,7 @@ int fiemap_fill_next_extent(struct fiema
+diff --git a/fs/ioctl.c b/fs/ioctl.c
+index 6c75110..19d2c3c 100644
+--- a/fs/ioctl.c
++++ b/fs/ioctl.c
+@@ -97,7 +97,7 @@ int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical,
u64 phys, u64 len, u32 flags)
{
struct fiemap_extent extent;
@@ -48598,7 +50557,7 @@ diff -urNp linux-2.6.32.49/fs/ioctl.c linux-2.6.32.49/fs/ioctl.c
/* only count the extents */
if (fieinfo->fi_extents_max == 0) {
-@@ -207,7 +207,7 @@ static int ioctl_fiemap(struct file *fil
+@@ -207,7 +207,7 @@ static int ioctl_fiemap(struct file *filp, unsigned long arg)
fieinfo.fi_flags = fiemap.fm_flags;
fieinfo.fi_extents_max = fiemap.fm_extent_count;
@@ -48607,7 +50566,7 @@ diff -urNp linux-2.6.32.49/fs/ioctl.c linux-2.6.32.49/fs/ioctl.c
if (fiemap.fm_extent_count != 0 &&
!access_ok(VERIFY_WRITE, fieinfo.fi_extents_start,
-@@ -220,7 +220,7 @@ static int ioctl_fiemap(struct file *fil
+@@ -220,7 +220,7 @@ static int ioctl_fiemap(struct file *filp, unsigned long arg)
error = inode->i_op->fiemap(inode, &fieinfo, fiemap.fm_start, len);
fiemap.fm_flags = fieinfo.fi_flags;
fiemap.fm_mapped_extents = fieinfo.fi_extents_mapped;
@@ -48616,10 +50575,11 @@ diff -urNp linux-2.6.32.49/fs/ioctl.c linux-2.6.32.49/fs/ioctl.c
error = -EFAULT;
return error;
-diff -urNp linux-2.6.32.49/fs/jbd/checkpoint.c linux-2.6.32.49/fs/jbd/checkpoint.c
---- linux-2.6.32.49/fs/jbd/checkpoint.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jbd/checkpoint.c 2011-11-15 19:59:43.000000000 -0500
-@@ -348,6 +348,8 @@ int log_do_checkpoint(journal_t *journal
+diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
+index b0435dd..81ee0be 100644
+--- a/fs/jbd/checkpoint.c
++++ b/fs/jbd/checkpoint.c
+@@ -348,6 +348,8 @@ int log_do_checkpoint(journal_t *journal)
tid_t this_tid;
int result;
@@ -48628,10 +50588,11 @@ diff -urNp linux-2.6.32.49/fs/jbd/checkpoint.c linux-2.6.32.49/fs/jbd/checkpoint
jbd_debug(1, "Start checkpoint\n");
/*
-diff -urNp linux-2.6.32.49/fs/jffs2/compr_rtime.c linux-2.6.32.49/fs/jffs2/compr_rtime.c
---- linux-2.6.32.49/fs/jffs2/compr_rtime.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jffs2/compr_rtime.c 2011-11-15 19:59:43.000000000 -0500
-@@ -37,6 +37,8 @@ static int jffs2_rtime_compress(unsigned
+diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c
+index 546d153..736896c 100644
+--- a/fs/jffs2/compr_rtime.c
++++ b/fs/jffs2/compr_rtime.c
+@@ -37,6 +37,8 @@ static int jffs2_rtime_compress(unsigned char *data_in,
int outpos = 0;
int pos=0;
@@ -48640,7 +50601,7 @@ diff -urNp linux-2.6.32.49/fs/jffs2/compr_rtime.c linux-2.6.32.49/fs/jffs2/compr
memset(positions,0,sizeof(positions));
while (pos < (*sourcelen) && outpos <= (*dstlen)-2) {
-@@ -79,6 +81,8 @@ static int jffs2_rtime_decompress(unsign
+@@ -79,6 +81,8 @@ static int jffs2_rtime_decompress(unsigned char *data_in,
int outpos = 0;
int pos=0;
@@ -48649,10 +50610,11 @@ diff -urNp linux-2.6.32.49/fs/jffs2/compr_rtime.c linux-2.6.32.49/fs/jffs2/compr
memset(positions,0,sizeof(positions));
while (outpos<destlen) {
-diff -urNp linux-2.6.32.49/fs/jffs2/compr_rubin.c linux-2.6.32.49/fs/jffs2/compr_rubin.c
---- linux-2.6.32.49/fs/jffs2/compr_rubin.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jffs2/compr_rubin.c 2011-11-15 19:59:43.000000000 -0500
-@@ -314,6 +314,8 @@ static int jffs2_dynrubin_compress(unsig
+diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
+index 170d289..3254b98 100644
+--- a/fs/jffs2/compr_rubin.c
++++ b/fs/jffs2/compr_rubin.c
+@@ -314,6 +314,8 @@ static int jffs2_dynrubin_compress(unsigned char *data_in,
int ret;
uint32_t mysrclen, mydstlen;
@@ -48661,10 +50623,11 @@ diff -urNp linux-2.6.32.49/fs/jffs2/compr_rubin.c linux-2.6.32.49/fs/jffs2/compr
mysrclen = *sourcelen;
mydstlen = *dstlen - 8;
-diff -urNp linux-2.6.32.49/fs/jffs2/erase.c linux-2.6.32.49/fs/jffs2/erase.c
---- linux-2.6.32.49/fs/jffs2/erase.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jffs2/erase.c 2011-11-15 19:59:43.000000000 -0500
-@@ -434,7 +434,8 @@ static void jffs2_mark_erased_block(stru
+diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
+index b47679b..00d65d3 100644
+--- a/fs/jffs2/erase.c
++++ b/fs/jffs2/erase.c
+@@ -434,7 +434,8 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -48674,10 +50637,11 @@ diff -urNp linux-2.6.32.49/fs/jffs2/erase.c linux-2.6.32.49/fs/jffs2/erase.c
};
jffs2_prealloc_raw_node_refs(c, jeb, 1);
-diff -urNp linux-2.6.32.49/fs/jffs2/wbuf.c linux-2.6.32.49/fs/jffs2/wbuf.c
---- linux-2.6.32.49/fs/jffs2/wbuf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jffs2/wbuf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o
+diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
+index 5ef7bac..4fd1e3c 100644
+--- a/fs/jffs2/wbuf.c
++++ b/fs/jffs2/wbuf.c
+@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node oob_cleanmarker =
{
.magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = constant_cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -48687,10 +50651,11 @@ diff -urNp linux-2.6.32.49/fs/jffs2/wbuf.c linux-2.6.32.49/fs/jffs2/wbuf.c
};
/*
-diff -urNp linux-2.6.32.49/fs/jffs2/xattr.c linux-2.6.32.49/fs/jffs2/xattr.c
---- linux-2.6.32.49/fs/jffs2/xattr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jffs2/xattr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -773,6 +773,8 @@ void jffs2_build_xattr_subsystem(struct
+diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
+index 082e844..52012a1 100644
+--- a/fs/jffs2/xattr.c
++++ b/fs/jffs2/xattr.c
+@@ -773,6 +773,8 @@ void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
@@ -48699,9 +50664,10 @@ diff -urNp linux-2.6.32.49/fs/jffs2/xattr.c linux-2.6.32.49/fs/jffs2/xattr.c
/* Phase.1 : Merge same xref */
for (i=0; i < XREF_TMPHASH_SIZE; i++)
xref_tmphash[i] = NULL;
-diff -urNp linux-2.6.32.49/fs/jfs/super.c linux-2.6.32.49/fs/jfs/super.c
---- linux-2.6.32.49/fs/jfs/super.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/jfs/super.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/jfs/super.c b/fs/jfs/super.c
+index 2234c73..f6e6e6b 100644
+--- a/fs/jfs/super.c
++++ b/fs/jfs/super.c
@@ -793,7 +793,7 @@ static int __init init_jfs_fs(void)
jfs_inode_cachep =
@@ -48711,22 +50677,11 @@ diff -urNp linux-2.6.32.49/fs/jfs/super.c linux-2.6.32.49/fs/jfs/super.c
init_once);
if (jfs_inode_cachep == NULL)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/fs/Kconfig.binfmt linux-2.6.32.49/fs/Kconfig.binfmt
---- linux-2.6.32.49/fs/Kconfig.binfmt 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/Kconfig.binfmt 2011-11-15 19:59:43.000000000 -0500
-@@ -86,7 +86,7 @@ config HAVE_AOUT
-
- config BINFMT_AOUT
- tristate "Kernel support for a.out and ECOFF binaries"
-- depends on HAVE_AOUT
-+ depends on HAVE_AOUT && BROKEN
- ---help---
- A.out (Assembler.OUTput) is a set of formats for libraries and
- executables used in the earliest versions of UNIX. Linux used
-diff -urNp linux-2.6.32.49/fs/libfs.c linux-2.6.32.49/fs/libfs.c
---- linux-2.6.32.49/fs/libfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/libfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -157,12 +157,20 @@ int dcache_readdir(struct file * filp, v
+diff --git a/fs/libfs.c b/fs/libfs.c
+index ba36e93..3153fce 100644
+--- a/fs/libfs.c
++++ b/fs/libfs.c
+@@ -157,12 +157,20 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
for (p=q->next; p != &dentry->d_subdirs; p=p->next) {
struct dentry *next;
@@ -48748,10 +50703,11 @@ diff -urNp linux-2.6.32.49/fs/libfs.c linux-2.6.32.49/fs/libfs.c
next->d_name.len, filp->f_pos,
next->d_inode->i_ino,
dt_type(next->d_inode)) < 0)
-diff -urNp linux-2.6.32.49/fs/lockd/clntproc.c linux-2.6.32.49/fs/lockd/clntproc.c
---- linux-2.6.32.49/fs/lockd/clntproc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/lockd/clntproc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -36,11 +36,11 @@ static const struct rpc_call_ops nlmclnt
+diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
+index c325a83..d15b07b 100644
+--- a/fs/lockd/clntproc.c
++++ b/fs/lockd/clntproc.c
+@@ -36,11 +36,11 @@ static const struct rpc_call_ops nlmclnt_cancel_ops;
/*
* Cookie counter for NLM requests
*/
@@ -48765,7 +50721,7 @@ diff -urNp linux-2.6.32.49/fs/lockd/clntproc.c linux-2.6.32.49/fs/lockd/clntproc
memcpy(c->data, &cookie, 4);
c->len=4;
-@@ -621,6 +621,8 @@ nlmclnt_reclaim(struct nlm_host *host, s
+@@ -621,6 +621,8 @@ nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl)
struct nlm_rqst reqst, *req;
int status;
@@ -48774,9 +50730,10 @@ diff -urNp linux-2.6.32.49/fs/lockd/clntproc.c linux-2.6.32.49/fs/lockd/clntproc
req = &reqst;
memset(req, 0, sizeof(*req));
locks_init_lock(&req->a_args.lock.fl);
-diff -urNp linux-2.6.32.49/fs/lockd/svc.c linux-2.6.32.49/fs/lockd/svc.c
---- linux-2.6.32.49/fs/lockd/svc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/lockd/svc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
+index 1a54ae1..6a16c27 100644
+--- a/fs/lockd/svc.c
++++ b/fs/lockd/svc.c
@@ -43,7 +43,7 @@
static struct svc_program nlmsvc_program;
@@ -48786,9 +50743,10 @@ diff -urNp linux-2.6.32.49/fs/lockd/svc.c linux-2.6.32.49/fs/lockd/svc.c
EXPORT_SYMBOL_GPL(nlmsvc_ops);
static DEFINE_MUTEX(nlmsvc_mutex);
-diff -urNp linux-2.6.32.49/fs/locks.c linux-2.6.32.49/fs/locks.c
---- linux-2.6.32.49/fs/locks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/locks.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/locks.c b/fs/locks.c
+index a8794f2..4041e55 100644
+--- a/fs/locks.c
++++ b/fs/locks.c
@@ -145,10 +145,28 @@ static LIST_HEAD(blocked_list);
static struct kmem_cache *filelock_cache __read_mostly;
@@ -48819,7 +50777,7 @@ diff -urNp linux-2.6.32.49/fs/locks.c linux-2.6.32.49/fs/locks.c
}
void locks_release_private(struct file_lock *fl)
-@@ -183,17 +201,9 @@ void locks_init_lock(struct file_lock *f
+@@ -183,17 +201,9 @@ void locks_init_lock(struct file_lock *fl)
INIT_LIST_HEAD(&fl->fl_link);
INIT_LIST_HEAD(&fl->fl_block);
init_waitqueue_head(&fl->fl_wait);
@@ -48838,7 +50796,7 @@ diff -urNp linux-2.6.32.49/fs/locks.c linux-2.6.32.49/fs/locks.c
}
EXPORT_SYMBOL(locks_init_lock);
-@@ -2007,16 +2017,16 @@ void locks_remove_flock(struct file *fil
+@@ -2007,16 +2017,16 @@ void locks_remove_flock(struct file *filp)
return;
if (filp->f_op && filp->f_op->flock) {
@@ -48859,10 +50817,11 @@ diff -urNp linux-2.6.32.49/fs/locks.c linux-2.6.32.49/fs/locks.c
}
lock_kernel();
-diff -urNp linux-2.6.32.49/fs/mbcache.c linux-2.6.32.49/fs/mbcache.c
---- linux-2.6.32.49/fs/mbcache.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/mbcache.c 2011-11-15 19:59:43.000000000 -0500
-@@ -266,9 +266,9 @@ mb_cache_create(const char *name, struct
+diff --git a/fs/mbcache.c b/fs/mbcache.c
+index ec88ff3..b843a82 100644
+--- a/fs/mbcache.c
++++ b/fs/mbcache.c
+@@ -266,9 +266,9 @@ mb_cache_create(const char *name, struct mb_cache_op *cache_op,
if (!cache)
goto fail;
cache->c_name = name;
@@ -48874,10 +50833,11 @@ diff -urNp linux-2.6.32.49/fs/mbcache.c linux-2.6.32.49/fs/mbcache.c
atomic_set(&cache->c_entry_count, 0);
cache->c_bucket_bits = bucket_bits;
#ifdef MB_CACHE_INDEXES_COUNT
-diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
---- linux-2.6.32.49/fs/namei.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/namei.c 2011-11-18 19:36:31.000000000 -0500
-@@ -224,14 +224,6 @@ int generic_permission(struct inode *ino
+diff --git a/fs/namei.c b/fs/namei.c
+index b0afbd4..8d065a1 100644
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -224,14 +224,6 @@ int generic_permission(struct inode *inode, int mask,
return ret;
/*
@@ -48892,7 +50852,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
* Searching includes executable on directories, else just read.
*/
mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
-@@ -239,6 +231,14 @@ int generic_permission(struct inode *ino
+@@ -239,6 +231,14 @@ int generic_permission(struct inode *inode, int mask,
if (capable(CAP_DAC_READ_SEARCH))
return 0;
@@ -48907,7 +50867,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
return -EACCES;
}
-@@ -458,7 +458,8 @@ static int exec_permission_lite(struct i
+@@ -458,7 +458,8 @@ static int exec_permission_lite(struct inode *inode)
if (!ret)
goto ok;
@@ -48917,7 +50877,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
goto ok;
return ret;
-@@ -638,7 +639,7 @@ static __always_inline int __do_follow_l
+@@ -638,7 +639,7 @@ static __always_inline int __do_follow_link(struct path *path, struct nameidata
cookie = dentry->d_inode->i_op->follow_link(dentry, nd);
error = PTR_ERR(cookie);
if (!IS_ERR(cookie)) {
@@ -48926,7 +50886,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = 0;
if (s)
error = __vfs_follow_link(nd, s);
-@@ -669,6 +670,13 @@ static inline int do_follow_link(struct
+@@ -669,6 +670,13 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
err = security_inode_follow_link(path->dentry, nd);
if (err)
goto loop;
@@ -48960,7 +50920,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
path_put(&nd->path);
return_err:
return err;
-@@ -1091,13 +1107,20 @@ static int do_path_lookup(int dfd, const
+@@ -1091,13 +1107,20 @@ static int do_path_lookup(int dfd, const char *name,
int retval = path_init(dfd, name, flags, nd);
if (!retval)
retval = path_walk(name, nd);
@@ -48984,7 +50944,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
return retval;
}
-@@ -1576,6 +1599,20 @@ int may_open(struct path *path, int acc_
+@@ -1576,6 +1599,20 @@ int may_open(struct path *path, int acc_mode, int flag)
if (error)
goto err_out;
@@ -49005,7 +50965,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
if (flag & O_TRUNC) {
error = get_write_access(inode);
if (error)
-@@ -1620,6 +1657,17 @@ static int __open_namei_create(struct na
+@@ -1620,6 +1657,17 @@ static int __open_namei_create(struct nameidata *nd, struct path *path,
{
int error;
struct dentry *dir = nd->path.dentry;
@@ -49023,7 +50983,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
if (!IS_POSIXACL(dir->d_inode))
mode &= ~current_umask();
-@@ -1627,6 +1675,8 @@ static int __open_namei_create(struct na
+@@ -1627,6 +1675,8 @@ static int __open_namei_create(struct nameidata *nd, struct path *path,
if (error)
goto out_unlock;
error = vfs_create(dir->d_inode, path->dentry, mode, nd);
@@ -49032,7 +50992,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
out_unlock:
mutex_unlock(&dir->d_inode->i_mutex);
dput(nd->path.dentry);
-@@ -1709,6 +1759,22 @@ struct file *do_filp_open(int dfd, const
+@@ -1709,6 +1759,22 @@ struct file *do_filp_open(int dfd, const char *pathname,
&nd, flag);
if (error)
return ERR_PTR(error);
@@ -49089,7 +51049,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = __do_follow_link(&path, &nd);
if (error) {
/* Does someone understand code flow here? Or it is only
-@@ -1984,6 +2070,10 @@ struct dentry *lookup_create(struct name
+@@ -1984,6 +2070,10 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir)
}
return dentry;
eexist:
@@ -49100,7 +51060,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
dput(dentry);
dentry = ERR_PTR(-EEXIST);
fail:
-@@ -2061,6 +2151,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2061,6 +2151,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode,
error = may_mknod(mode);
if (error)
goto out_dput;
@@ -49118,7 +51078,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2081,6 +2182,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2081,6 +2182,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode,
}
out_drop_write:
mnt_drop_write(nd.path.mnt);
@@ -49128,7 +51088,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
out_dput:
dput(dentry);
out_unlock:
-@@ -2134,6 +2238,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2134,6 +2238,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode)
if (IS_ERR(dentry))
goto out_unlock;
@@ -49140,7 +51100,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
if (!IS_POSIXACL(nd.path.dentry->d_inode))
mode &= ~current_umask();
error = mnt_want_write(nd.path.mnt);
-@@ -2145,6 +2254,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2145,6 +2254,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode)
error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
out_drop_write:
mnt_drop_write(nd.path.mnt);
@@ -49151,7 +51111,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
out_dput:
dput(dentry);
out_unlock:
-@@ -2226,6 +2339,8 @@ static long do_rmdir(int dfd, const char
+@@ -2226,6 +2339,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
char * name;
struct dentry *dentry;
struct nameidata nd;
@@ -49160,7 +51120,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2250,6 +2365,17 @@ static long do_rmdir(int dfd, const char
+@@ -2250,6 +2365,17 @@ static long do_rmdir(int dfd, const char __user *pathname)
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
goto exit2;
@@ -49178,7 +51138,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit3;
-@@ -2257,6 +2383,8 @@ static long do_rmdir(int dfd, const char
+@@ -2257,6 +2383,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
if (error)
goto exit4;
error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
@@ -49187,7 +51147,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
exit4:
mnt_drop_write(nd.path.mnt);
exit3:
-@@ -2318,6 +2446,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2318,6 +2446,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
@@ -49196,7 +51156,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2337,8 +2467,19 @@ static long do_unlinkat(int dfd, const c
+@@ -2337,8 +2467,19 @@ static long do_unlinkat(int dfd, const char __user *pathname)
if (nd.last.name[nd.last.len])
goto slashes;
inode = dentry->d_inode;
@@ -49217,7 +51177,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit2;
-@@ -2346,6 +2487,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2346,6 +2487,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
if (error)
goto exit3;
error = vfs_unlink(nd.path.dentry->d_inode, dentry);
@@ -49226,7 +51186,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
exit3:
mnt_drop_write(nd.path.mnt);
exit2:
-@@ -2424,6 +2567,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -2424,6 +2567,11 @@ SYSCALL_DEFINE3(symlinkat, const char __user *, oldname,
if (IS_ERR(dentry))
goto out_unlock;
@@ -49238,7 +51198,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2431,6 +2579,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -2431,6 +2579,8 @@ SYSCALL_DEFINE3(symlinkat, const char __user *, oldname,
if (error)
goto out_drop_write;
error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
@@ -49247,7 +51207,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2524,6 +2674,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2524,6 +2674,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
goto out_unlock;
@@ -49268,7 +51228,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2531,6 +2695,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2531,6 +2695,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
if (error)
goto out_drop_write;
error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
@@ -49277,7 +51237,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2708,6 +2874,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -2708,6 +2874,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
char *to;
int error;
@@ -49286,7 +51246,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = user_path_parent(olddfd, oldname, &oldnd, &from);
if (error)
goto exit;
-@@ -2764,6 +2932,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -2764,6 +2932,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
if (new_dentry == trap)
goto exit5;
@@ -49299,7 +51259,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
error = mnt_want_write(oldnd.path.mnt);
if (error)
goto exit5;
-@@ -2773,6 +2947,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -2773,6 +2947,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
goto exit6;
error = vfs_rename(old_dir->d_inode, old_dentry,
new_dir->d_inode, new_dentry);
@@ -49309,7 +51269,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
exit6:
mnt_drop_write(oldnd.path.mnt);
exit5:
-@@ -2798,6 +2975,8 @@ SYSCALL_DEFINE2(rename, const char __use
+@@ -2798,6 +2975,8 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna
int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link)
{
@@ -49318,7 +51278,7 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
int len;
len = PTR_ERR(link);
-@@ -2807,7 +2986,14 @@ int vfs_readlink(struct dentry *dentry,
+@@ -2807,7 +2986,14 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
len = strlen(link);
if (len > (unsigned) buflen)
len = buflen;
@@ -49334,10 +51294,11 @@ diff -urNp linux-2.6.32.49/fs/namei.c linux-2.6.32.49/fs/namei.c
len = -EFAULT;
out:
return len;
-diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
---- linux-2.6.32.49/fs/namespace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/namespace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1083,6 +1083,9 @@ static int do_umount(struct vfsmount *mn
+diff --git a/fs/namespace.c b/fs/namespace.c
+index 2beb0fb..11a95a5 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1083,6 +1083,9 @@ static int do_umount(struct vfsmount *mnt, int flags)
if (!(sb->s_flags & MS_RDONLY))
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
up_write(&sb->s_umount);
@@ -49347,7 +51308,7 @@ diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
return retval;
}
-@@ -1104,6 +1107,9 @@ static int do_umount(struct vfsmount *mn
+@@ -1104,6 +1107,9 @@ static int do_umount(struct vfsmount *mnt, int flags)
security_sb_umount_busy(mnt);
up_write(&namespace_sem);
release_mounts(&umount_list);
@@ -49357,7 +51318,7 @@ diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
return retval;
}
-@@ -1962,6 +1968,16 @@ long do_mount(char *dev_name, char *dir_
+@@ -1962,6 +1968,16 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
if (retval)
goto dput_out;
@@ -49374,7 +51335,7 @@ diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
-@@ -1976,6 +1992,9 @@ long do_mount(char *dev_name, char *dir_
+@@ -1976,6 +1992,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
dev_name, data_page);
dput_out:
path_put(&path);
@@ -49384,7 +51345,7 @@ diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
return retval;
}
-@@ -2182,6 +2201,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -2182,6 +2201,12 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
goto out1;
}
@@ -49397,10 +51358,11 @@ diff -urNp linux-2.6.32.49/fs/namespace.c linux-2.6.32.49/fs/namespace.c
read_lock(&current->fs->lock);
root = current->fs->root;
path_get(&current->fs->root);
-diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
---- linux-2.6.32.49/fs/ncpfs/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ncpfs/dir.c 2011-11-15 19:59:43.000000000 -0500
-@@ -275,6 +275,8 @@ __ncp_lookup_validate(struct dentry *den
+diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
+index b8b5b30..2bd9ccb 100644
+--- a/fs/ncpfs/dir.c
++++ b/fs/ncpfs/dir.c
+@@ -275,6 +275,8 @@ __ncp_lookup_validate(struct dentry *dentry)
int res, val = 0, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -49409,7 +51371,7 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
parent = dget_parent(dentry);
dir = parent->d_inode;
-@@ -799,6 +801,8 @@ static struct dentry *ncp_lookup(struct
+@@ -799,6 +801,8 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, struc
int error, res, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -49418,7 +51380,7 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
lock_kernel();
error = -EIO;
if (!ncp_conn_valid(server))
-@@ -883,10 +887,12 @@ int ncp_create_new(struct inode *dir, st
+@@ -883,10 +887,12 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, int mode,
int error, result, len;
int opmode;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -49432,7 +51394,7 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
error = -EIO;
lock_kernel();
if (!ncp_conn_valid(server))
-@@ -952,6 +958,8 @@ static int ncp_mkdir(struct inode *dir,
+@@ -952,6 +958,8 @@ static int ncp_mkdir(struct inode *dir, struct dentry *dentry, int mode)
int error, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -49441,7 +51403,7 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
DPRINTK("ncp_mkdir: making %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
-@@ -960,6 +968,8 @@ static int ncp_mkdir(struct inode *dir,
+@@ -960,6 +968,8 @@ static int ncp_mkdir(struct inode *dir, struct dentry *dentry, int mode)
if (!ncp_conn_valid(server))
goto out;
@@ -49450,7 +51412,7 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
ncp_age_dentry(server, dentry);
len = sizeof(__name);
error = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-@@ -1114,6 +1124,8 @@ static int ncp_rename(struct inode *old_
+@@ -1114,6 +1124,8 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
int old_len, new_len;
__u8 __old_name[NCP_MAXPATHLEN + 1], __new_name[NCP_MAXPATHLEN + 1];
@@ -49459,10 +51421,11 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/dir.c linux-2.6.32.49/fs/ncpfs/dir.c
DPRINTK("ncp_rename: %s/%s to %s/%s\n",
old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
new_dentry->d_parent->d_name.name, new_dentry->d_name.name);
-diff -urNp linux-2.6.32.49/fs/ncpfs/inode.c linux-2.6.32.49/fs/ncpfs/inode.c
---- linux-2.6.32.49/fs/ncpfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ncpfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -445,6 +445,8 @@ static int ncp_fill_super(struct super_b
+diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
+index cf98da1..da890a9 100644
+--- a/fs/ncpfs/inode.c
++++ b/fs/ncpfs/inode.c
+@@ -445,6 +445,8 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
#endif
struct ncp_entry_info finfo;
@@ -49471,10 +51434,11 @@ diff -urNp linux-2.6.32.49/fs/ncpfs/inode.c linux-2.6.32.49/fs/ncpfs/inode.c
data.wdog_pid = NULL;
server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
if (!server)
-diff -urNp linux-2.6.32.49/fs/nfs/inode.c linux-2.6.32.49/fs/nfs/inode.c
---- linux-2.6.32.49/fs/nfs/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nfs/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -156,7 +156,7 @@ static void nfs_zap_caches_locked(struct
+diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
+index bfaef7b..e9d03ca 100644
+--- a/fs/nfs/inode.c
++++ b/fs/nfs/inode.c
+@@ -156,7 +156,7 @@ static void nfs_zap_caches_locked(struct inode *inode)
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
nfsi->attrtimeo_timestamp = jiffies;
@@ -49483,7 +51447,7 @@ diff -urNp linux-2.6.32.49/fs/nfs/inode.c linux-2.6.32.49/fs/nfs/inode.c
if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
else
-@@ -973,16 +973,16 @@ static int nfs_size_need_update(const st
+@@ -973,16 +973,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
}
@@ -49503,9 +51467,10 @@ diff -urNp linux-2.6.32.49/fs/nfs/inode.c linux-2.6.32.49/fs/nfs/inode.c
}
void nfs_fattr_init(struct nfs_fattr *fattr)
-diff -urNp linux-2.6.32.49/fs/nfsd/lockd.c linux-2.6.32.49/fs/nfsd/lockd.c
---- linux-2.6.32.49/fs/nfsd/lockd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nfsd/lockd.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
+index cc2f505..f6a236f 100644
+--- a/fs/nfsd/lockd.c
++++ b/fs/nfsd/lockd.c
@@ -66,7 +66,7 @@ nlm_fclose(struct file *filp)
fput(filp);
}
@@ -49515,10 +51480,11 @@ diff -urNp linux-2.6.32.49/fs/nfsd/lockd.c linux-2.6.32.49/fs/nfsd/lockd.c
.fopen = nlm_fopen, /* open file for locking */
.fclose = nlm_fclose, /* close file */
};
-diff -urNp linux-2.6.32.49/fs/nfsd/nfs4state.c linux-2.6.32.49/fs/nfsd/nfs4state.c
---- linux-2.6.32.49/fs/nfsd/nfs4state.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nfsd/nfs4state.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3459,6 +3459,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
+diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
+index cfc3391..dcc083a 100644
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -3459,6 +3459,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
unsigned int cmd;
int err;
@@ -49527,10 +51493,11 @@ diff -urNp linux-2.6.32.49/fs/nfsd/nfs4state.c linux-2.6.32.49/fs/nfsd/nfs4state
dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n",
(long long) lock->lk_offset,
(long long) lock->lk_length);
-diff -urNp linux-2.6.32.49/fs/nfsd/nfs4xdr.c linux-2.6.32.49/fs/nfsd/nfs4xdr.c
---- linux-2.6.32.49/fs/nfsd/nfs4xdr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nfsd/nfs4xdr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1751,6 +1751,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
+diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
+index 4a82a96..0d5fb49 100644
+--- a/fs/nfsd/nfs4xdr.c
++++ b/fs/nfsd/nfs4xdr.c
+@@ -1751,6 +1751,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
struct nfsd4_compoundres *resp = rqstp->rq_resp;
u32 minorversion = resp->cstate.minorversion;
@@ -49539,10 +51506,11 @@ diff -urNp linux-2.6.32.49/fs/nfsd/nfs4xdr.c linux-2.6.32.49/fs/nfsd/nfs4xdr.c
BUG_ON(bmval1 & NFSD_WRITEONLY_ATTRS_WORD1);
BUG_ON(bmval0 & ~nfsd_suppattrs0(minorversion));
BUG_ON(bmval1 & ~nfsd_suppattrs1(minorversion));
-diff -urNp linux-2.6.32.49/fs/nfsd/vfs.c linux-2.6.32.49/fs/nfsd/vfs.c
---- linux-2.6.32.49/fs/nfsd/vfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nfsd/vfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -937,7 +937,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
+index 2e09588..596421d 100644
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -937,7 +937,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
} else {
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -49551,7 +51519,7 @@ diff -urNp linux-2.6.32.49/fs/nfsd/vfs.c linux-2.6.32.49/fs/nfsd/vfs.c
set_fs(oldfs);
}
-@@ -1060,7 +1060,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1060,7 +1060,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -49560,7 +51528,7 @@ diff -urNp linux-2.6.32.49/fs/nfsd/vfs.c linux-2.6.32.49/fs/nfsd/vfs.c
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
-@@ -1542,7 +1542,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
+@@ -1542,7 +1542,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
*/
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -49569,10 +51537,11 @@ diff -urNp linux-2.6.32.49/fs/nfsd/vfs.c linux-2.6.32.49/fs/nfsd/vfs.c
set_fs(oldfs);
if (host_err < 0)
-diff -urNp linux-2.6.32.49/fs/nilfs2/ioctl.c linux-2.6.32.49/fs/nilfs2/ioctl.c
---- linux-2.6.32.49/fs/nilfs2/ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/nilfs2/ioctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -480,7 +480,7 @@ static int nilfs_ioctl_clean_segments(st
+diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
+index f6af760..d6b2b83 100644
+--- a/fs/nilfs2/ioctl.c
++++ b/fs/nilfs2/ioctl.c
+@@ -480,7 +480,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
unsigned int cmd, void __user *argp)
{
struct nilfs_argv argv[5];
@@ -49581,10 +51550,11 @@ diff -urNp linux-2.6.32.49/fs/nilfs2/ioctl.c linux-2.6.32.49/fs/nilfs2/ioctl.c
sizeof(struct nilfs_vdesc),
sizeof(struct nilfs_period),
sizeof(__u64),
-diff -urNp linux-2.6.32.49/fs/notify/dnotify/dnotify.c linux-2.6.32.49/fs/notify/dnotify/dnotify.c
---- linux-2.6.32.49/fs/notify/dnotify/dnotify.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/notify/dnotify/dnotify.c 2011-11-15 19:59:43.000000000 -0500
-@@ -173,7 +173,7 @@ static void dnotify_free_mark(struct fsn
+diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
+index 7e54e52..9337248 100644
+--- a/fs/notify/dnotify/dnotify.c
++++ b/fs/notify/dnotify/dnotify.c
+@@ -173,7 +173,7 @@ static void dnotify_free_mark(struct fsnotify_mark_entry *entry)
kmem_cache_free(dnotify_mark_entry_cache, dnentry);
}
@@ -49593,10 +51563,11 @@ diff -urNp linux-2.6.32.49/fs/notify/dnotify/dnotify.c linux-2.6.32.49/fs/notify
.handle_event = dnotify_handle_event,
.should_send_event = dnotify_should_send_event,
.free_group_priv = NULL,
-diff -urNp linux-2.6.32.49/fs/notify/notification.c linux-2.6.32.49/fs/notify/notification.c
---- linux-2.6.32.49/fs/notify/notification.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/notify/notification.c 2011-11-15 19:59:43.000000000 -0500
-@@ -57,7 +57,7 @@ static struct kmem_cache *fsnotify_event
+diff --git a/fs/notify/notification.c b/fs/notify/notification.c
+index b8bf53b..c518688 100644
+--- a/fs/notify/notification.c
++++ b/fs/notify/notification.c
+@@ -57,7 +57,7 @@ static struct kmem_cache *fsnotify_event_holder_cachep;
* get set to 0 so it will never get 'freed'
*/
static struct fsnotify_event q_overflow_event;
@@ -49605,7 +51576,7 @@ diff -urNp linux-2.6.32.49/fs/notify/notification.c linux-2.6.32.49/fs/notify/no
/**
* fsnotify_get_cookie - return a unique cookie for use in synchronizing events.
-@@ -65,7 +65,7 @@ static atomic_t fsnotify_sync_cookie = A
+@@ -65,7 +65,7 @@ static atomic_t fsnotify_sync_cookie = ATOMIC_INIT(0);
*/
u32 fsnotify_get_cookie(void)
{
@@ -49614,9 +51585,10 @@ diff -urNp linux-2.6.32.49/fs/notify/notification.c linux-2.6.32.49/fs/notify/no
}
EXPORT_SYMBOL_GPL(fsnotify_get_cookie);
-diff -urNp linux-2.6.32.49/fs/ntfs/dir.c linux-2.6.32.49/fs/ntfs/dir.c
---- linux-2.6.32.49/fs/ntfs/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ntfs/dir.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
+index 5a9e344..0f8cd28 100644
+--- a/fs/ntfs/dir.c
++++ b/fs/ntfs/dir.c
@@ -1328,7 +1328,7 @@ find_next_index_buffer:
ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
~(s64)(ndir->itype.index.block_size - 1)));
@@ -49626,10 +51598,11 @@ diff -urNp linux-2.6.32.49/fs/ntfs/dir.c linux-2.6.32.49/fs/ntfs/dir.c
ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
"inode 0x%lx or driver bug.", vdir->i_ino);
goto err_out;
-diff -urNp linux-2.6.32.49/fs/ntfs/file.c linux-2.6.32.49/fs/ntfs/file.c
---- linux-2.6.32.49/fs/ntfs/file.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ntfs/file.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2243,6 +2243,6 @@ const struct inode_operations ntfs_file_
+diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
+index 663c0e3..b6868e9 100644
+--- a/fs/ntfs/file.c
++++ b/fs/ntfs/file.c
+@@ -2243,6 +2243,6 @@ const struct inode_operations ntfs_file_inode_ops = {
#endif /* NTFS_RW */
};
@@ -49638,10 +51611,11 @@ diff -urNp linux-2.6.32.49/fs/ntfs/file.c linux-2.6.32.49/fs/ntfs/file.c
-const struct inode_operations ntfs_empty_inode_ops = {};
+const struct inode_operations ntfs_empty_inode_ops __read_only;
-diff -urNp linux-2.6.32.49/fs/ocfs2/cluster/masklog.c linux-2.6.32.49/fs/ocfs2/cluster/masklog.c
---- linux-2.6.32.49/fs/ocfs2/cluster/masklog.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/cluster/masklog.c 2011-11-15 19:59:43.000000000 -0500
-@@ -135,7 +135,7 @@ static ssize_t mlog_store(struct kobject
+diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c
+index 1cd2934..880b5d2 100644
+--- a/fs/ocfs2/cluster/masklog.c
++++ b/fs/ocfs2/cluster/masklog.c
+@@ -135,7 +135,7 @@ static ssize_t mlog_store(struct kobject *obj, struct attribute *attr,
return mlog_mask_store(mlog_attr->mask, buf, count);
}
@@ -49650,10 +51624,11 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/cluster/masklog.c linux-2.6.32.49/fs/ocfs2/c
.show = mlog_show,
.store = mlog_store,
};
-diff -urNp linux-2.6.32.49/fs/ocfs2/localalloc.c linux-2.6.32.49/fs/ocfs2/localalloc.c
---- linux-2.6.32.49/fs/ocfs2/localalloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/localalloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1188,7 +1188,7 @@ static int ocfs2_local_alloc_slide_windo
+diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
+index ac10f83..2cd2607 100644
+--- a/fs/ocfs2/localalloc.c
++++ b/fs/ocfs2/localalloc.c
+@@ -1188,7 +1188,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
goto bail;
}
@@ -49662,10 +51637,11 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/localalloc.c linux-2.6.32.49/fs/ocfs2/locala
status = 0;
bail:
-diff -urNp linux-2.6.32.49/fs/ocfs2/namei.c linux-2.6.32.49/fs/ocfs2/namei.c
---- linux-2.6.32.49/fs/ocfs2/namei.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/namei.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1043,6 +1043,8 @@ static int ocfs2_rename(struct inode *ol
+diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
+index f010b22..9f9ed34 100644
+--- a/fs/ocfs2/namei.c
++++ b/fs/ocfs2/namei.c
+@@ -1043,6 +1043,8 @@ static int ocfs2_rename(struct inode *old_dir,
struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
struct ocfs2_dir_lookup_result target_insert = { NULL, };
@@ -49674,9 +51650,10 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/namei.c linux-2.6.32.49/fs/ocfs2/namei.c
/* At some point it might be nice to break this function up a
* bit. */
-diff -urNp linux-2.6.32.49/fs/ocfs2/ocfs2.h linux-2.6.32.49/fs/ocfs2/ocfs2.h
---- linux-2.6.32.49/fs/ocfs2/ocfs2.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/ocfs2.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
+index d963d86..914cfbd 100644
+--- a/fs/ocfs2/ocfs2.h
++++ b/fs/ocfs2/ocfs2.h
@@ -217,11 +217,11 @@ enum ocfs2_vol_state
struct ocfs2_alloc_stats
@@ -49694,10 +51671,11 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/ocfs2.h linux-2.6.32.49/fs/ocfs2/ocfs2.h
};
enum ocfs2_local_alloc_state
-diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc.c
---- linux-2.6.32.49/fs/ocfs2/suballoc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/suballoc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -623,7 +623,7 @@ static int ocfs2_reserve_suballoc_bits(s
+diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
+index 79b5dac..d322952 100644
+--- a/fs/ocfs2/suballoc.c
++++ b/fs/ocfs2/suballoc.c
+@@ -623,7 +623,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
mlog_errno(status);
goto bail;
}
@@ -49706,7 +51684,7 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc
/* You should never ask for this much metadata */
BUG_ON(bits_wanted >
-@@ -1654,7 +1654,7 @@ int ocfs2_claim_metadata(struct ocfs2_su
+@@ -1654,7 +1654,7 @@ int ocfs2_claim_metadata(struct ocfs2_super *osb,
mlog_errno(status);
goto bail;
}
@@ -49715,7 +51693,7 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc
*blkno_start = bg_blkno + (u64) *suballoc_bit_start;
ac->ac_bits_given += (*num_bits);
-@@ -1728,7 +1728,7 @@ int ocfs2_claim_new_inode(struct ocfs2_s
+@@ -1728,7 +1728,7 @@ int ocfs2_claim_new_inode(struct ocfs2_super *osb,
mlog_errno(status);
goto bail;
}
@@ -49724,7 +51702,7 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc
BUG_ON(num_bits != 1);
-@@ -1830,7 +1830,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
+@@ -1830,7 +1830,7 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb,
cluster_start,
num_clusters);
if (!status)
@@ -49733,7 +51711,7 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc
} else {
if (min_clusters > (osb->bitmap_cpg - 1)) {
/* The only paths asking for contiguousness
-@@ -1858,7 +1858,7 @@ int __ocfs2_claim_clusters(struct ocfs2_
+@@ -1858,7 +1858,7 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb,
ocfs2_desc_bitmap_to_cluster_off(ac->ac_inode,
bg_blkno,
bg_bit_off);
@@ -49742,10 +51720,11 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/suballoc.c linux-2.6.32.49/fs/ocfs2/suballoc
}
}
if (status < 0) {
-diff -urNp linux-2.6.32.49/fs/ocfs2/super.c linux-2.6.32.49/fs/ocfs2/super.c
---- linux-2.6.32.49/fs/ocfs2/super.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/ocfs2/super.c 2011-11-15 19:59:43.000000000 -0500
-@@ -284,11 +284,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
+diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
+index 9f55be4..a3f8048 100644
+--- a/fs/ocfs2/super.c
++++ b/fs/ocfs2/super.c
+@@ -284,11 +284,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
"%10s => GlobalAllocs: %d LocalAllocs: %d "
"SubAllocs: %d LAWinMoves: %d SAExtends: %d\n",
"Stats",
@@ -49762,7 +51741,7 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/super.c linux-2.6.32.49/fs/ocfs2/super.c
out += snprintf(buf + out, len - out,
"%10s => State: %u Descriptor: %llu Size: %u bits "
-@@ -2002,11 +2002,11 @@ static int ocfs2_initialize_super(struct
+@@ -2002,11 +2002,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
spin_lock_init(&osb->osb_xattr_lock);
ocfs2_init_inode_steal_slot(osb);
@@ -49779,10 +51758,11 @@ diff -urNp linux-2.6.32.49/fs/ocfs2/super.c linux-2.6.32.49/fs/ocfs2/super.c
/* Copy the blockcheck stats from the superblock probe */
osb->osb_ecc_stats = *stats;
-diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
---- linux-2.6.32.49/fs/open.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/open.c 2011-11-18 19:28:37.000000000 -0500
-@@ -275,6 +275,10 @@ static long do_sys_truncate(const char _
+diff --git a/fs/open.c b/fs/open.c
+index 4f01e06..091f6c3 100644
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -275,6 +275,10 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
error = locks_verify_truncate(inode, NULL, length);
if (!error)
error = security_path_truncate(&path, length, 0);
@@ -49793,7 +51773,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
if (!error) {
vfs_dq_init(inode);
error = do_truncate(path.dentry, length, 0, NULL);
-@@ -511,6 +515,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con
+@@ -511,6 +515,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
if (__mnt_is_readonly(path.mnt))
res = -EROFS;
@@ -49803,7 +51783,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
out_path_release:
path_put(&path);
out:
-@@ -537,6 +544,8 @@ SYSCALL_DEFINE1(chdir, const char __user
+@@ -537,6 +544,8 @@ SYSCALL_DEFINE1(chdir, const char __user *, filename)
if (error)
goto dput_and_out;
@@ -49812,7 +51792,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
set_fs_pwd(current->fs, &path);
dput_and_out:
-@@ -563,6 +572,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd
+@@ -563,6 +572,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
goto out_putf;
error = inode_permission(inode, MAY_EXEC | MAY_ACCESS);
@@ -49826,7 +51806,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
if (!error)
set_fs_pwd(current->fs, &file->f_path);
out_putf:
-@@ -588,7 +604,13 @@ SYSCALL_DEFINE1(chroot, const char __use
+@@ -588,7 +604,13 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
if (!capable(CAP_SYS_CHROOT))
goto dput_and_out;
@@ -49840,7 +51820,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
error = 0;
dput_and_out:
path_put(&path);
-@@ -616,12 +638,27 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
+@@ -616,12 +638,27 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode)
err = mnt_want_write_file(file);
if (err)
goto out_putf;
@@ -49868,7 +51848,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mutex_unlock(&inode->i_mutex);
mnt_drop_write(file->f_path.mnt);
out_putf:
-@@ -645,12 +682,27 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
+@@ -645,12 +682,27 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode)
error = mnt_want_write(path.mnt);
if (error)
goto dput_and_out;
@@ -49896,7 +51876,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mutex_unlock(&inode->i_mutex);
mnt_drop_write(path.mnt);
dput_and_out:
-@@ -664,12 +716,15 @@ SYSCALL_DEFINE2(chmod, const char __user
+@@ -664,12 +716,15 @@ SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode)
return sys_fchmodat(AT_FDCWD, filename, mode);
}
@@ -49913,7 +51893,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
newattrs.ia_valid = ATTR_CTIME;
if (user != (uid_t) -1) {
newattrs.ia_valid |= ATTR_UID;
-@@ -700,7 +755,7 @@ SYSCALL_DEFINE3(chown, const char __user
+@@ -700,7 +755,7 @@ SYSCALL_DEFINE3(chown, const char __user *, filename, uid_t, user, gid_t, group)
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
@@ -49922,7 +51902,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -725,7 +780,7 @@ SYSCALL_DEFINE5(fchownat, int, dfd, cons
+@@ -725,7 +780,7 @@ SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user,
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
@@ -49931,7 +51911,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -744,7 +799,7 @@ SYSCALL_DEFINE3(lchown, const char __use
+@@ -744,7 +799,7 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group
error = mnt_want_write(path.mnt);
if (error)
goto out_release;
@@ -49940,7 +51920,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mnt_drop_write(path.mnt);
out_release:
path_put(&path);
-@@ -767,7 +822,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd
+@@ -767,7 +822,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
goto out_fput;
dentry = file->f_path.dentry;
audit_inode(NULL, dentry);
@@ -49949,7 +51929,7 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
mnt_drop_write(file->f_path.mnt);
out_fput:
fput(file);
-@@ -1036,7 +1091,7 @@ long do_sys_open(int dfd, const char __u
+@@ -1036,7 +1091,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
if (!IS_ERR(tmp)) {
fd = get_unused_fd_flags(flags);
if (fd >= 0) {
@@ -49958,10 +51938,11 @@ diff -urNp linux-2.6.32.49/fs/open.c linux-2.6.32.49/fs/open.c
if (IS_ERR(f)) {
put_unused_fd(fd);
fd = PTR_ERR(f);
-diff -urNp linux-2.6.32.49/fs/partitions/ldm.c linux-2.6.32.49/fs/partitions/ldm.c
---- linux-2.6.32.49/fs/partitions/ldm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/partitions/ldm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1311,6 +1311,7 @@ static bool ldm_frag_add (const u8 *data
+diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c
+index dd6efdb..3babc6c 100644
+--- a/fs/partitions/ldm.c
++++ b/fs/partitions/ldm.c
+@@ -1311,6 +1311,7 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
ldm_error ("A VBLK claims to have %d parts.", num);
return false;
}
@@ -49969,7 +51950,7 @@ diff -urNp linux-2.6.32.49/fs/partitions/ldm.c linux-2.6.32.49/fs/partitions/ldm
if (rec >= num) {
ldm_error("REC value (%d) exceeds NUM value (%d)", rec, num);
return false;
-@@ -1322,7 +1323,7 @@ static bool ldm_frag_add (const u8 *data
+@@ -1322,7 +1323,7 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
goto found;
}
@@ -49978,10 +51959,11 @@ diff -urNp linux-2.6.32.49/fs/partitions/ldm.c linux-2.6.32.49/fs/partitions/ldm
if (!f) {
ldm_crit ("Out of memory.");
return false;
-diff -urNp linux-2.6.32.49/fs/partitions/mac.c linux-2.6.32.49/fs/partitions/mac.c
---- linux-2.6.32.49/fs/partitions/mac.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/partitions/mac.c 2011-11-15 19:59:43.000000000 -0500
-@@ -59,11 +59,11 @@ int mac_partition(struct parsed_partitio
+diff --git a/fs/partitions/mac.c b/fs/partitions/mac.c
+index 5765198..7f8e9e0 100644
+--- a/fs/partitions/mac.c
++++ b/fs/partitions/mac.c
+@@ -59,11 +59,11 @@ int mac_partition(struct parsed_partitions *state, struct block_device *bdev)
return 0; /* not a MacOS disk */
}
blocks_in_map = be32_to_cpu(part->map_count);
@@ -49994,9 +51976,10 @@ diff -urNp linux-2.6.32.49/fs/partitions/mac.c linux-2.6.32.49/fs/partitions/mac
for (slot = 1; slot <= blocks_in_map; ++slot) {
int pos = slot * secsize;
put_dev_sector(sect);
-diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
---- linux-2.6.32.49/fs/pipe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/pipe.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/pipe.c b/fs/pipe.c
+index d0cc080..8a6f211 100644
+--- a/fs/pipe.c
++++ b/fs/pipe.c
@@ -401,9 +401,9 @@ redo:
}
if (bufs) /* More to do? */
@@ -50009,7 +51992,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
/* syscall merging: Usually we must not sleep
* if O_NONBLOCK is set, or if we got some data.
* But if a writer sleeps in kernel space, then
-@@ -462,7 +462,7 @@ pipe_write(struct kiocb *iocb, const str
+@@ -462,7 +462,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
mutex_lock(&inode->i_mutex);
pipe = inode->i_pipe;
@@ -50039,7 +52022,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
}
out:
mutex_unlock(&inode->i_mutex);
-@@ -666,7 +666,7 @@ pipe_poll(struct file *filp, poll_table
+@@ -666,7 +666,7 @@ pipe_poll(struct file *filp, poll_table *wait)
mask = 0;
if (filp->f_mode & FMODE_READ) {
mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
@@ -50048,7 +52031,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
mask |= POLLHUP;
}
-@@ -676,7 +676,7 @@ pipe_poll(struct file *filp, poll_table
+@@ -676,7 +676,7 @@ pipe_poll(struct file *filp, poll_table *wait)
* Most Unices do not set POLLERR for FIFOs but on Linux they
* behave exactly like pipes for poll().
*/
@@ -50057,7 +52040,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
mask |= POLLERR;
}
-@@ -690,10 +690,10 @@ pipe_release(struct inode *inode, int de
+@@ -690,10 +690,10 @@ pipe_release(struct inode *inode, int decr, int decw)
mutex_lock(&inode->i_mutex);
pipe = inode->i_pipe;
@@ -50071,7 +52054,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
free_pipe_info(inode);
} else {
wake_up_interruptible_sync(&pipe->wait);
-@@ -783,7 +783,7 @@ pipe_read_open(struct inode *inode, stru
+@@ -783,7 +783,7 @@ pipe_read_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
@@ -50080,7 +52063,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
}
mutex_unlock(&inode->i_mutex);
-@@ -800,7 +800,7 @@ pipe_write_open(struct inode *inode, str
+@@ -800,7 +800,7 @@ pipe_write_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
@@ -50089,7 +52072,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
}
mutex_unlock(&inode->i_mutex);
-@@ -818,9 +818,9 @@ pipe_rdwr_open(struct inode *inode, stru
+@@ -818,9 +818,9 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
if (filp->f_mode & FMODE_READ)
@@ -50110,7 +52093,7 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
static int pipefs_delete_dentry(struct dentry *dentry)
{
/*
-@@ -945,7 +945,8 @@ static struct inode * get_pipe_inode(voi
+@@ -945,7 +945,8 @@ static struct inode * get_pipe_inode(void)
goto fail_iput;
inode->i_pipe = pipe;
@@ -50120,9 +52103,41 @@ diff -urNp linux-2.6.32.49/fs/pipe.c linux-2.6.32.49/fs/pipe.c
inode->i_fop = &rdwr_pipefifo_fops;
/*
-diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
---- linux-2.6.32.49/fs/proc/array.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/array.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
+index 50f8f06..c5755df 100644
+--- a/fs/proc/Kconfig
++++ b/fs/proc/Kconfig
+@@ -30,12 +30,12 @@ config PROC_FS
+
+ config PROC_KCORE
+ bool "/proc/kcore support" if !ARM
+- depends on PROC_FS && MMU
++ depends on PROC_FS && MMU && !GRKERNSEC_PROC_ADD
+
+ config PROC_VMCORE
+ bool "/proc/vmcore support (EXPERIMENTAL)"
+- depends on PROC_FS && CRASH_DUMP
+- default y
++ depends on PROC_FS && CRASH_DUMP && !GRKERNSEC
++ default n
+ help
+ Exports the dump image of crashed kernel in ELF format.
+
+@@ -59,8 +59,8 @@ config PROC_SYSCTL
+ limited in memory.
+
+ config PROC_PAGE_MONITOR
+- default y
+- depends on PROC_FS && MMU
++ default n
++ depends on PROC_FS && MMU && !GRKERNSEC
+ bool "Enable /proc page monitoring" if EMBEDDED
+ help
+ Various /proc files exist to monitor process memory utilization:
+diff --git a/fs/proc/array.c b/fs/proc/array.c
+index c5ef152..1363194 100644
+--- a/fs/proc/array.c
++++ b/fs/proc/array.c
@@ -60,6 +60,7 @@
#include <linux/tty.h>
#include <linux/string.h>
@@ -50131,7 +52146,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
#include <linux/proc_fs.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
-@@ -321,6 +322,21 @@ static inline void task_context_switch_c
+@@ -321,6 +322,21 @@ static inline void task_context_switch_counts(struct seq_file *m,
p->nivcsw);
}
@@ -50153,7 +52168,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task)
{
-@@ -337,9 +353,24 @@ int proc_pid_status(struct seq_file *m,
+@@ -337,9 +353,24 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
task_cap(m, task);
cpuset_task_status_allowed(m, task);
task_context_switch_counts(m, task);
@@ -50178,7 +52193,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task, int whole)
{
-@@ -358,9 +389,11 @@ static int do_task_stat(struct seq_file
+@@ -358,9 +389,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
cputime_t cutime, cstime, utime, stime;
cputime_t cgtime, gtime;
unsigned long rsslim = 0;
@@ -50191,7 +52206,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
state = *get_task_state(task);
vsize = eip = esp = 0;
permitted = ptrace_may_access(task, PTRACE_MODE_READ);
-@@ -433,6 +466,19 @@ static int do_task_stat(struct seq_file
+@@ -433,6 +466,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
gtime = task_gtime(task);
}
@@ -50211,7 +52226,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
priority = task_prio(task);
-@@ -473,9 +519,15 @@ static int do_task_stat(struct seq_file
+@@ -473,9 +519,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
vsize,
mm ? get_mm_rss(mm) : 0,
rsslim,
@@ -50227,7 +52242,7 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
esp,
eip,
/* The signal information here is obsolete.
-@@ -528,3 +580,18 @@ int proc_pid_statm(struct seq_file *m, s
+@@ -528,3 +580,18 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
return 0;
}
@@ -50246,9 +52261,10 @@ diff -urNp linux-2.6.32.49/fs/proc/array.c linux-2.6.32.49/fs/proc/array.c
+ return sprintf(buffer, "%pI4\n", &curr_ip);
+}
+#endif
-diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
---- linux-2.6.32.49/fs/proc/base.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/base.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/proc/base.c b/fs/proc/base.c
+index 67f7dc0..7171c9a 100644
+--- a/fs/proc/base.c
++++ b/fs/proc/base.c
@@ -102,6 +102,22 @@ struct pid_entry {
union proc_op op;
};
@@ -50272,7 +52288,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
#define NOD(NAME, MODE, IOP, FOP, OP) { \
.name = (NAME), \
.len = sizeof(NAME) - 1, \
-@@ -213,6 +229,9 @@ static int check_mem_permission(struct t
+@@ -213,6 +229,9 @@ static int check_mem_permission(struct task_struct *task)
if (task == current)
return 0;
@@ -50282,7 +52298,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
/*
* If current is actively ptrace'ing, and would also be
* permitted to freshly attach with ptrace now, permit it.
-@@ -260,6 +279,9 @@ static int proc_pid_cmdline(struct task_
+@@ -260,6 +279,9 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
if (!mm->arg_end)
goto out_mm; /* Shh! No looking before we're done */
@@ -50321,7 +52337,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
do {
nwords += 2;
} while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
-@@ -306,7 +344,7 @@ static int proc_pid_auxv(struct task_str
+@@ -306,7 +344,7 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
}
@@ -50330,7 +52346,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
/*
* Provides a wchan file via kallsyms in a proper one-value-per-file format.
* Returns the resolved symbol. If that fails, simply return the address.
-@@ -345,7 +383,7 @@ static void unlock_trace(struct task_str
+@@ -345,7 +383,7 @@ static void unlock_trace(struct task_struct *task)
mutex_unlock(&task->cred_guard_mutex);
}
@@ -50339,7 +52355,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
#define MAX_STACK_TRACE_DEPTH 64
-@@ -545,7 +583,7 @@ static int proc_pid_limits(struct task_s
+@@ -545,7 +583,7 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)
return count;
}
@@ -50348,7 +52364,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
static int proc_pid_syscall(struct task_struct *task, char *buffer)
{
long nr;
-@@ -574,7 +612,7 @@ static int proc_pid_syscall(struct task_
+@@ -574,7 +612,7 @@ static int proc_pid_syscall(struct task_struct *task, char *buffer)
/************************************************************************/
/* permission checks */
@@ -50357,7 +52373,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
{
struct task_struct *task;
int allowed = 0;
-@@ -584,7 +622,10 @@ static int proc_fd_access_allowed(struct
+@@ -584,7 +622,10 @@ static int proc_fd_access_allowed(struct inode *inode)
*/
task = get_proc_task(inode);
if (task) {
@@ -50369,7 +52385,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
put_task_struct(task);
}
return allowed;
-@@ -963,6 +1004,9 @@ static ssize_t environ_read(struct file
+@@ -963,6 +1004,9 @@ static ssize_t environ_read(struct file *file, char __user *buf,
if (!task)
goto out_no_task;
@@ -50379,7 +52395,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
if (!ptrace_may_access(task, PTRACE_MODE_READ))
goto out;
-@@ -1377,7 +1421,7 @@ static void *proc_pid_follow_link(struct
+@@ -1377,7 +1421,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
path_put(&nd->path);
/* Are we allowed to snoop on the tasks file descriptors? */
@@ -50388,7 +52404,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
goto out;
error = PROC_I(inode)->op.proc_get_link(inode, &nd->path);
-@@ -1417,8 +1461,18 @@ static int proc_pid_readlink(struct dent
+@@ -1417,8 +1461,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
struct path path;
/* Are we allowed to snoop on the tasks file descriptors? */
@@ -50409,7 +52425,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
error = PROC_I(inode)->op.proc_get_link(inode, &path);
if (error)
-@@ -1483,7 +1537,11 @@ static struct inode *proc_pid_make_inode
+@@ -1483,7 +1537,11 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
rcu_read_lock();
cred = __task_cred(task);
inode->i_uid = cred->euid;
@@ -50421,7 +52437,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
rcu_read_unlock();
}
security_task_to_inode(task, inode);
-@@ -1501,6 +1559,9 @@ static int pid_getattr(struct vfsmount *
+@@ -1501,6 +1559,9 @@ static int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat
struct inode *inode = dentry->d_inode;
struct task_struct *task;
const struct cred *cred;
@@ -50431,7 +52447,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
generic_fillattr(inode, stat);
-@@ -1508,13 +1569,41 @@ static int pid_getattr(struct vfsmount *
+@@ -1508,13 +1569,41 @@ static int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat
stat->uid = 0;
stat->gid = 0;
task = pid_task(proc_pid(inode), PIDTYPE_PID);
@@ -50474,7 +52490,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
}
rcu_read_unlock();
return 0;
-@@ -1545,11 +1634,20 @@ static int pid_revalidate(struct dentry
+@@ -1545,11 +1634,20 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
if (task) {
if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -50495,7 +52511,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
rcu_read_unlock();
} else {
inode->i_uid = 0;
-@@ -1670,7 +1768,8 @@ static int proc_fd_info(struct inode *in
+@@ -1670,7 +1768,8 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
int fd = proc_fd(inode);
if (task) {
@@ -50505,7 +52521,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
put_task_struct(task);
}
if (files) {
-@@ -1922,12 +2021,22 @@ static const struct file_operations proc
+@@ -1922,12 +2021,22 @@ static const struct file_operations proc_fd_operations = {
static int proc_fd_permission(struct inode *inode, int mask)
{
int rv;
@@ -50530,7 +52546,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
return rv;
}
-@@ -2036,6 +2145,9 @@ static struct dentry *proc_pident_lookup
+@@ -2036,6 +2145,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
if (!task)
goto out_no_task;
@@ -50540,7 +52556,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
/*
* Yes, it does not scale. And it should not. Don't add
* new entries into /proc/<tgid>/ without very good reasons.
-@@ -2080,6 +2192,9 @@ static int proc_pident_readdir(struct fi
+@@ -2080,6 +2192,9 @@ static int proc_pident_readdir(struct file *filp,
if (!task)
goto out_no_task;
@@ -50550,7 +52566,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
ret = 0;
i = filp->f_pos;
switch (i) {
-@@ -2347,7 +2462,7 @@ static void *proc_self_follow_link(struc
+@@ -2347,7 +2462,7 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd,
void *cookie)
{
@@ -50559,7 +52575,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
if (!IS_ERR(s))
__putname(s);
}
-@@ -2553,7 +2668,7 @@ static const struct pid_entry tgid_base_
+@@ -2553,7 +2668,7 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -50568,7 +52584,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
INF("syscall", S_IRUGO, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2578,10 +2693,10 @@ static const struct pid_entry tgid_base_
+@@ -2578,10 +2693,10 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -50581,7 +52597,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
ONE("stack", S_IRUGO, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-@@ -2611,6 +2726,9 @@ static const struct pid_entry tgid_base_
+@@ -2611,6 +2726,9 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_TASK_IO_ACCOUNTING
INF("io", S_IRUSR, proc_tgid_io_accounting),
#endif
@@ -50591,7 +52607,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
};
static int proc_tgid_base_readdir(struct file * filp,
-@@ -2735,7 +2853,14 @@ static struct dentry *proc_pid_instantia
+@@ -2735,7 +2853,14 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
if (!inode)
goto out;
@@ -50606,7 +52622,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -2777,7 +2902,14 @@ struct dentry *proc_pid_lookup(struct in
+@@ -2777,7 +2902,14 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
if (!task)
goto out;
@@ -50621,7 +52637,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
put_task_struct(task);
out:
return result;
-@@ -2842,6 +2974,11 @@ int proc_pid_readdir(struct file * filp,
+@@ -2842,6 +2974,11 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
unsigned int nr;
struct task_struct *reaper;
@@ -50633,7 +52649,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
struct tgid_iter iter;
struct pid_namespace *ns;
-@@ -2865,8 +3002,27 @@ int proc_pid_readdir(struct file * filp,
+@@ -2865,8 +3002,27 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
for (iter = next_tgid(ns, iter);
iter.task;
iter.tgid += 1, iter = next_tgid(ns, iter)) {
@@ -50662,7 +52678,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
put_task_struct(iter.task);
goto out;
}
-@@ -2892,7 +3048,7 @@ static const struct pid_entry tid_base_s
+@@ -2892,7 +3048,7 @@ static const struct pid_entry tid_base_stuff[] = {
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -50671,7 +52687,7 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
INF("syscall", S_IRUGO, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2916,10 +3072,10 @@ static const struct pid_entry tid_base_s
+@@ -2916,10 +3072,10 @@ static const struct pid_entry tid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -50684,10 +52700,11 @@ diff -urNp linux-2.6.32.49/fs/proc/base.c linux-2.6.32.49/fs/proc/base.c
ONE("stack", S_IRUGO, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-diff -urNp linux-2.6.32.49/fs/proc/cmdline.c linux-2.6.32.49/fs/proc/cmdline.c
---- linux-2.6.32.49/fs/proc/cmdline.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/cmdline.c 2011-11-15 19:59:43.000000000 -0500
-@@ -23,7 +23,11 @@ static const struct file_operations cmdl
+diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
+index 82676e3..5f8518a 100644
+--- a/fs/proc/cmdline.c
++++ b/fs/proc/cmdline.c
+@@ -23,7 +23,11 @@ static const struct file_operations cmdline_proc_fops = {
static int __init proc_cmdline_init(void)
{
@@ -50699,10 +52716,11 @@ diff -urNp linux-2.6.32.49/fs/proc/cmdline.c linux-2.6.32.49/fs/proc/cmdline.c
return 0;
}
module_init(proc_cmdline_init);
-diff -urNp linux-2.6.32.49/fs/proc/devices.c linux-2.6.32.49/fs/proc/devices.c
---- linux-2.6.32.49/fs/proc/devices.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/devices.c 2011-11-15 19:59:43.000000000 -0500
-@@ -64,7 +64,11 @@ static const struct file_operations proc
+diff --git a/fs/proc/devices.c b/fs/proc/devices.c
+index 59ee7da..469b4b6 100644
+--- a/fs/proc/devices.c
++++ b/fs/proc/devices.c
+@@ -64,7 +64,11 @@ static const struct file_operations proc_devinfo_operations = {
static int __init proc_devices_init(void)
{
@@ -50714,9 +52732,10 @@ diff -urNp linux-2.6.32.49/fs/proc/devices.c linux-2.6.32.49/fs/proc/devices.c
return 0;
}
module_init(proc_devices_init);
-diff -urNp linux-2.6.32.49/fs/proc/inode.c linux-2.6.32.49/fs/proc/inode.c
---- linux-2.6.32.49/fs/proc/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/inode.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/proc/inode.c b/fs/proc/inode.c
+index d78ade3..81767f9 100644
+--- a/fs/proc/inode.c
++++ b/fs/proc/inode.c
@@ -18,12 +18,19 @@
#include <linux/module.h>
#include <linux/smp_lock.h>
@@ -50737,7 +52756,7 @@ diff -urNp linux-2.6.32.49/fs/proc/inode.c linux-2.6.32.49/fs/proc/inode.c
struct proc_dir_entry *de_get(struct proc_dir_entry *de)
{
atomic_inc(&de->count);
-@@ -62,6 +69,13 @@ static void proc_delete_inode(struct ino
+@@ -62,6 +69,13 @@ static void proc_delete_inode(struct inode *inode)
de_put(de);
if (PROC_I(inode)->sysctl)
sysctl_head_put(PROC_I(inode)->sysctl);
@@ -50751,7 +52770,7 @@ diff -urNp linux-2.6.32.49/fs/proc/inode.c linux-2.6.32.49/fs/proc/inode.c
clear_inode(inode);
}
-@@ -457,7 +471,11 @@ struct inode *proc_get_inode(struct supe
+@@ -457,7 +471,11 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
if (de->mode) {
inode->i_mode = de->mode;
inode->i_uid = de->uid;
@@ -50763,10 +52782,11 @@ diff -urNp linux-2.6.32.49/fs/proc/inode.c linux-2.6.32.49/fs/proc/inode.c
}
if (de->size)
inode->i_size = de->size;
-diff -urNp linux-2.6.32.49/fs/proc/internal.h linux-2.6.32.49/fs/proc/internal.h
---- linux-2.6.32.49/fs/proc/internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/internal.h 2011-11-15 19:59:43.000000000 -0500
-@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi
+diff --git a/fs/proc/internal.h b/fs/proc/internal.h
+index 753ca37..26bcf3b 100644
+--- a/fs/proc/internal.h
++++ b/fs/proc/internal.h
+@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
@@ -50776,40 +52796,11 @@ diff -urNp linux-2.6.32.49/fs/proc/internal.h linux-2.6.32.49/fs/proc/internal.h
extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
extern const struct file_operations proc_maps_operations;
-diff -urNp linux-2.6.32.49/fs/proc/Kconfig linux-2.6.32.49/fs/proc/Kconfig
---- linux-2.6.32.49/fs/proc/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -30,12 +30,12 @@ config PROC_FS
-
- config PROC_KCORE
- bool "/proc/kcore support" if !ARM
-- depends on PROC_FS && MMU
-+ depends on PROC_FS && MMU && !GRKERNSEC_PROC_ADD
-
- config PROC_VMCORE
- bool "/proc/vmcore support (EXPERIMENTAL)"
-- depends on PROC_FS && CRASH_DUMP
-- default y
-+ depends on PROC_FS && CRASH_DUMP && !GRKERNSEC
-+ default n
- help
- Exports the dump image of crashed kernel in ELF format.
-
-@@ -59,8 +59,8 @@ config PROC_SYSCTL
- limited in memory.
-
- config PROC_PAGE_MONITOR
-- default y
-- depends on PROC_FS && MMU
-+ default n
-+ depends on PROC_FS && MMU && !GRKERNSEC
- bool "Enable /proc page monitoring" if EMBEDDED
- help
- Various /proc files exist to monitor process memory utilization:
-diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
---- linux-2.6.32.49/fs/proc/kcore.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/kcore.c 2011-11-15 19:59:43.000000000 -0500
-@@ -320,6 +320,8 @@ static void elf_kcore_store_hdr(char *bu
+diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
+index b442dac..aab29cb 100644
+--- a/fs/proc/kcore.c
++++ b/fs/proc/kcore.c
+@@ -320,6 +320,8 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
off_t offset = 0;
struct kcore_list *m;
@@ -50818,7 +52809,7 @@ diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
/* setup ELF header */
elf = (struct elfhdr *) bufp;
bufp += sizeof(struct elfhdr);
-@@ -477,9 +479,10 @@ read_kcore(struct file *file, char __use
+@@ -477,9 +479,10 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
* the addresses in the elf_phdr on our list.
*/
start = kc_offset_to_vaddr(*fpos - elf_buflen);
@@ -50831,14 +52822,12 @@ diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
while (buflen) {
struct kcore_list *m;
-@@ -508,20 +511,23 @@ read_kcore(struct file *file, char __use
+@@ -508,20 +511,23 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
kfree(elf_buf);
} else {
if (kern_addr_valid(start)) {
- unsigned long n;
-+ char *elf_buf;
-+ mm_segment_t oldfs;
-
+-
- n = copy_to_user(buffer, (char *)start, tsz);
- /*
- * We cannot distingush between fault on source
@@ -50849,6 +52838,9 @@ diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
- if (n) {
- if (clear_user(buffer + tsz - n,
- n))
++ char *elf_buf;
++ mm_segment_t oldfs;
++
+ elf_buf = kmalloc(tsz, GFP_KERNEL);
+ if (!elf_buf)
+ return -ENOMEM;
@@ -50866,7 +52858,7 @@ diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
} else {
if (clear_user(buffer, tsz))
return -EFAULT;
-@@ -541,6 +547,9 @@ read_kcore(struct file *file, char __use
+@@ -541,6 +547,9 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
static int open_kcore(struct inode *inode, struct file *filp)
{
@@ -50876,10 +52868,11 @@ diff -urNp linux-2.6.32.49/fs/proc/kcore.c linux-2.6.32.49/fs/proc/kcore.c
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if (kcore_need_update)
-diff -urNp linux-2.6.32.49/fs/proc/meminfo.c linux-2.6.32.49/fs/proc/meminfo.c
---- linux-2.6.32.49/fs/proc/meminfo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/meminfo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -29,6 +29,8 @@ static int meminfo_proc_show(struct seq_
+diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
+index a65239c..ad1182a 100644
+--- a/fs/proc/meminfo.c
++++ b/fs/proc/meminfo.c
+@@ -29,6 +29,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
unsigned long pages[NR_LRU_LISTS];
int lru;
@@ -50888,7 +52881,7 @@ diff -urNp linux-2.6.32.49/fs/proc/meminfo.c linux-2.6.32.49/fs/proc/meminfo.c
/*
* display in kilobytes.
*/
-@@ -149,7 +151,7 @@ static int meminfo_proc_show(struct seq_
+@@ -149,7 +151,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
vmi.used >> 10,
vmi.largest_chunk >> 10
#ifdef CONFIG_MEMORY_FAILURE
@@ -50897,10 +52890,11 @@ diff -urNp linux-2.6.32.49/fs/proc/meminfo.c linux-2.6.32.49/fs/proc/meminfo.c
#endif
);
-diff -urNp linux-2.6.32.49/fs/proc/nommu.c linux-2.6.32.49/fs/proc/nommu.c
---- linux-2.6.32.49/fs/proc/nommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/nommu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -67,7 +67,7 @@ static int nommu_region_show(struct seq_
+diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
+index 9fe7d7e..cdb62c9 100644
+--- a/fs/proc/nommu.c
++++ b/fs/proc/nommu.c
+@@ -67,7 +67,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
if (len < 1)
len = 1;
seq_printf(m, "%*c", len, ' ');
@@ -50909,10 +52903,11 @@ diff -urNp linux-2.6.32.49/fs/proc/nommu.c linux-2.6.32.49/fs/proc/nommu.c
}
seq_putc(m, '\n');
-diff -urNp linux-2.6.32.49/fs/proc/proc_net.c linux-2.6.32.49/fs/proc/proc_net.c
---- linux-2.6.32.49/fs/proc/proc_net.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/proc_net.c 2011-11-15 19:59:43.000000000 -0500
-@@ -104,6 +104,17 @@ static struct net *get_proc_task_net(str
+diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
+index 04d1270..25e1173 100644
+--- a/fs/proc/proc_net.c
++++ b/fs/proc/proc_net.c
+@@ -104,6 +104,17 @@ static struct net *get_proc_task_net(struct inode *dir)
struct task_struct *task;
struct nsproxy *ns;
struct net *net = NULL;
@@ -50930,9 +52925,10 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_net.c linux-2.6.32.49/fs/proc/proc_net.c
rcu_read_lock();
task = pid_task(proc_pid(dir), PIDTYPE_PID);
-diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sysctl.c
---- linux-2.6.32.49/fs/proc/proc_sysctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/proc_sysctl.c 2011-11-18 18:45:06.000000000 -0500
+diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
+index f667e8a..55f4d96 100644
+--- a/fs/proc/proc_sysctl.c
++++ b/fs/proc/proc_sysctl.c
@@ -7,11 +7,13 @@
#include <linux/security.h>
#include "internal.h"
@@ -50949,7 +52945,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
static struct inode *proc_sys_make_inode(struct super_block *sb,
struct ctl_table_header *head, struct ctl_table *table)
-@@ -109,6 +111,9 @@ static struct dentry *proc_sys_lookup(st
+@@ -109,6 +111,9 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
if (!p)
goto out;
@@ -50959,7 +52955,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
err = ERR_PTR(-ENOMEM);
inode = proc_sys_make_inode(dir->i_sb, h ? h : head, p);
if (h)
-@@ -119,6 +124,9 @@ static struct dentry *proc_sys_lookup(st
+@@ -119,6 +124,9 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
err = NULL;
dentry->d_op = &proc_sys_dentry_operations;
@@ -50969,7 +52965,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
d_add(dentry, inode);
out:
-@@ -200,6 +208,9 @@ static int proc_sys_fill_cache(struct fi
+@@ -200,6 +208,9 @@ static int proc_sys_fill_cache(struct file *filp, void *dirent,
return -ENOMEM;
} else {
child->d_op = &proc_sys_dentry_operations;
@@ -50979,7 +52975,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
d_add(child, inode);
}
} else {
-@@ -228,6 +239,9 @@ static int scan(struct ctl_table_header
+@@ -228,6 +239,9 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
if (*pos < file->f_pos)
continue;
@@ -50989,7 +52985,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
res = proc_sys_fill_cache(file, dirent, filldir, head, table);
if (res)
return res;
-@@ -344,6 +358,9 @@ static int proc_sys_getattr(struct vfsmo
+@@ -344,6 +358,9 @@ static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
if (IS_ERR(head))
return PTR_ERR(head);
@@ -50999,7 +52995,7 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
generic_fillattr(inode, stat);
if (table)
stat->mode = (stat->mode & S_IFMT) | table->mode;
-@@ -358,17 +375,18 @@ static const struct file_operations proc
+@@ -358,17 +375,18 @@ static const struct file_operations proc_sys_file_operations = {
};
static const struct file_operations proc_sys_dir_file_operations = {
@@ -51020,9 +53016,10 @@ diff -urNp linux-2.6.32.49/fs/proc/proc_sysctl.c linux-2.6.32.49/fs/proc/proc_sy
.lookup = proc_sys_lookup,
.permission = proc_sys_permission,
.setattr = proc_sys_setattr,
-diff -urNp linux-2.6.32.49/fs/proc/root.c linux-2.6.32.49/fs/proc/root.c
---- linux-2.6.32.49/fs/proc/root.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/root.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/proc/root.c b/fs/proc/root.c
+index b080b79..d957e63 100644
+--- a/fs/proc/root.c
++++ b/fs/proc/root.c
@@ -134,7 +134,15 @@ void __init proc_root_init(void)
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
@@ -51039,10 +53036,11 @@ diff -urNp linux-2.6.32.49/fs/proc/root.c linux-2.6.32.49/fs/proc/root.c
proc_sys_init();
}
-diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
---- linux-2.6.32.49/fs/proc/task_mmu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/task_mmu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -46,15 +46,26 @@ void task_mem(struct seq_file *m, struct
+diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
+index 3b7b82a..7dbb571 100644
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -46,15 +46,26 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
"VmStk:\t%8lu kB\n"
"VmExe:\t%8lu kB\n"
"VmLib:\t%8lu kB\n"
@@ -51072,7 +53070,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
}
unsigned long task_vsize(struct mm_struct *mm)
-@@ -175,7 +186,8 @@ static void m_stop(struct seq_file *m, v
+@@ -175,7 +186,8 @@ static void m_stop(struct seq_file *m, void *v)
struct proc_maps_private *priv = m->private;
struct vm_area_struct *vma = v;
@@ -51082,7 +53080,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
if (priv->task)
put_task_struct(priv->task);
}
-@@ -199,6 +211,12 @@ static int do_maps_open(struct inode *in
+@@ -199,6 +211,12 @@ static int do_maps_open(struct inode *inode, struct file *file,
return ret;
}
@@ -51095,7 +53093,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
{
struct mm_struct *mm = vma->vm_mm;
-@@ -206,7 +224,6 @@ static void show_map_vma(struct seq_file
+@@ -206,7 +224,6 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
int flags = vma->vm_flags;
unsigned long ino = 0;
unsigned long long pgoff = 0;
@@ -51103,7 +53101,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
dev_t dev = 0;
int len;
-@@ -217,20 +234,23 @@ static void show_map_vma(struct seq_file
+@@ -217,20 +234,23 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
}
@@ -51134,7 +53132,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
MAJOR(dev), MINOR(dev), ino, &len);
/*
-@@ -239,7 +259,7 @@ static void show_map_vma(struct seq_file
+@@ -239,7 +259,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
*/
if (file) {
pad_len_spaces(m, len);
@@ -51143,7 +53141,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
} else {
const char *name = arch_vma_name(vma);
if (!name) {
-@@ -247,8 +267,9 @@ static void show_map_vma(struct seq_file
+@@ -247,8 +267,9 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
if (vma->vm_start <= mm->brk &&
vma->vm_end >= mm->start_brk) {
name = "[heap]";
@@ -51155,7 +53153,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
name = "[stack]";
}
} else {
-@@ -391,9 +412,16 @@ static int show_smap(struct seq_file *m,
+@@ -391,9 +412,16 @@ static int show_smap(struct seq_file *m, void *v)
};
memset(&mss, 0, sizeof mss);
@@ -51175,7 +53173,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
show_map_vma(m, vma);
-@@ -409,7 +437,11 @@ static int show_smap(struct seq_file *m,
+@@ -409,7 +437,11 @@ static int show_smap(struct seq_file *m, void *v)
"Swap: %8lu kB\n"
"KernelPageSize: %8lu kB\n"
"MMUPageSize: %8lu kB\n",
@@ -51187,10 +53185,11 @@ diff -urNp linux-2.6.32.49/fs/proc/task_mmu.c linux-2.6.32.49/fs/proc/task_mmu.c
mss.resident >> 10,
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
mss.shared_clean >> 10,
-diff -urNp linux-2.6.32.49/fs/proc/task_nommu.c linux-2.6.32.49/fs/proc/task_nommu.c
---- linux-2.6.32.49/fs/proc/task_nommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/proc/task_nommu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -50,7 +50,7 @@ void task_mem(struct seq_file *m, struct
+diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
+index 8f5c05d..c99c76d 100644
+--- a/fs/proc/task_nommu.c
++++ b/fs/proc/task_nommu.c
+@@ -50,7 +50,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
else
bytes += kobjsize(mm);
@@ -51199,7 +53198,7 @@ diff -urNp linux-2.6.32.49/fs/proc/task_nommu.c linux-2.6.32.49/fs/proc/task_nom
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
-@@ -154,7 +154,7 @@ static int nommu_vma_show(struct seq_fil
+@@ -154,7 +154,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
if (len < 1)
len = 1;
seq_printf(m, "%*c", len, ' ');
@@ -51208,9 +53207,10 @@ diff -urNp linux-2.6.32.49/fs/proc/task_nommu.c linux-2.6.32.49/fs/proc/task_nom
}
seq_putc(m, '\n');
-diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
---- linux-2.6.32.49/fs/readdir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/readdir.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/readdir.c b/fs/readdir.c
+index 7723401..30059a6 100644
+--- a/fs/readdir.c
++++ b/fs/readdir.c
@@ -16,6 +16,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
@@ -51227,7 +53227,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
int result;
};
-@@ -84,6 +86,10 @@ static int fillonedir(void * __buf, cons
+@@ -84,6 +86,10 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
buf->result = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -51238,7 +53238,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
buf->result++;
dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, dirent,
-@@ -116,6 +122,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned in
+@@ -116,6 +122,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
buf.result = 0;
buf.dirent = dirent;
@@ -51254,7 +53254,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
int count;
int error;
};
-@@ -162,6 +170,10 @@ static int filldir(void * __buf, const c
+@@ -162,6 +170,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
buf->error = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -51265,7 +53265,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -209,6 +221,7 @@ SYSCALL_DEFINE3(getdents, unsigned int,
+@@ -209,6 +221,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -51281,7 +53281,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
int count;
int error;
};
-@@ -242,6 +256,10 @@ static int filldir64(void * __buf, const
+@@ -242,6 +256,10 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
@@ -51292,7 +53292,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -289,6 +307,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int
+@@ -289,6 +307,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd,
buf.current_dir = dirent;
buf.previous = NULL;
@@ -51300,7 +53300,7 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
buf.count = count;
buf.error = 0;
-@@ -297,7 +316,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int
+@@ -297,7 +316,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd,
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
@@ -51309,10 +53309,11 @@ diff -urNp linux-2.6.32.49/fs/readdir.c linux-2.6.32.49/fs/readdir.c
if (__put_user(d_off, &lastdirent->d_off))
error = -EFAULT;
else
-diff -urNp linux-2.6.32.49/fs/reiserfs/dir.c linux-2.6.32.49/fs/reiserfs/dir.c
---- linux-2.6.32.49/fs/reiserfs/dir.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/dir.c 2011-11-15 19:59:43.000000000 -0500
-@@ -66,6 +66,8 @@ int reiserfs_readdir_dentry(struct dentr
+diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
+index d42c30c..4fd8718 100644
+--- a/fs/reiserfs/dir.c
++++ b/fs/reiserfs/dir.c
+@@ -66,6 +66,8 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,
struct reiserfs_dir_entry de;
int ret = 0;
@@ -51321,10 +53322,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/dir.c linux-2.6.32.49/fs/reiserfs/dir.c
reiserfs_write_lock(inode->i_sb);
reiserfs_check_lock_depth(inode->i_sb, "readdir");
-diff -urNp linux-2.6.32.49/fs/reiserfs/do_balan.c linux-2.6.32.49/fs/reiserfs/do_balan.c
---- linux-2.6.32.49/fs/reiserfs/do_balan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/do_balan.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2058,7 +2058,7 @@ void do_balance(struct tree_balance *tb,
+diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
+index 128d3f7..8840d44 100644
+--- a/fs/reiserfs/do_balan.c
++++ b/fs/reiserfs/do_balan.c
+@@ -2058,7 +2058,7 @@ void do_balance(struct tree_balance *tb, /* tree_balance structure */
return;
}
@@ -51333,10 +53335,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/do_balan.c linux-2.6.32.49/fs/reiserfs/do
do_balance_starts(tb);
/* balance leaf returns 0 except if combining L R and S into
-diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/item_ops.c
---- linux-2.6.32.49/fs/reiserfs/item_ops.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/item_ops.c 2011-11-15 19:59:43.000000000 -0500
-@@ -102,7 +102,7 @@ static void sd_print_vi(struct virtual_i
+diff --git a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c
+index 72cb1cc..d0e3181 100644
+--- a/fs/reiserfs/item_ops.c
++++ b/fs/reiserfs/item_ops.c
+@@ -102,7 +102,7 @@ static void sd_print_vi(struct virtual_item *vi)
vi->vi_index, vi->vi_type, vi->vi_ih);
}
@@ -51345,7 +53348,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
.bytes_number = sd_bytes_number,
.decrement_key = sd_decrement_key,
.is_left_mergeable = sd_is_left_mergeable,
-@@ -196,7 +196,7 @@ static void direct_print_vi(struct virtu
+@@ -196,7 +196,7 @@ static void direct_print_vi(struct virtual_item *vi)
vi->vi_index, vi->vi_type, vi->vi_ih);
}
@@ -51354,7 +53357,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
.bytes_number = direct_bytes_number,
.decrement_key = direct_decrement_key,
.is_left_mergeable = direct_is_left_mergeable,
-@@ -341,7 +341,7 @@ static void indirect_print_vi(struct vir
+@@ -341,7 +341,7 @@ static void indirect_print_vi(struct virtual_item *vi)
vi->vi_index, vi->vi_type, vi->vi_ih);
}
@@ -51363,7 +53366,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
.bytes_number = indirect_bytes_number,
.decrement_key = indirect_decrement_key,
.is_left_mergeable = indirect_is_left_mergeable,
-@@ -628,7 +628,7 @@ static void direntry_print_vi(struct vir
+@@ -628,7 +628,7 @@ static void direntry_print_vi(struct virtual_item *vi)
printk("\n");
}
@@ -51372,7 +53375,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
.bytes_number = direntry_bytes_number,
.decrement_key = direntry_decrement_key,
.is_left_mergeable = direntry_is_left_mergeable,
-@@ -724,7 +724,7 @@ static void errcatch_print_vi(struct vir
+@@ -724,7 +724,7 @@ static void errcatch_print_vi(struct virtual_item *vi)
"Invalid item type observed, run fsck ASAP");
}
@@ -51381,7 +53384,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
errcatch_bytes_number,
errcatch_decrement_key,
errcatch_is_left_mergeable,
-@@ -746,7 +746,7 @@ static struct item_operations errcatch_o
+@@ -746,7 +746,7 @@ static struct item_operations errcatch_ops = {
#error Item types must use disk-format assigned values.
#endif
@@ -51390,10 +53393,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/item_ops.c linux-2.6.32.49/fs/reiserfs/it
&stat_data_ops,
&indirect_ops,
&direct_ops,
-diff -urNp linux-2.6.32.49/fs/reiserfs/journal.c linux-2.6.32.49/fs/reiserfs/journal.c
---- linux-2.6.32.49/fs/reiserfs/journal.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/journal.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2329,6 +2329,8 @@ static struct buffer_head *reiserfs_brea
+diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
+index b5fe0aa..e0e25c4 100644
+--- a/fs/reiserfs/journal.c
++++ b/fs/reiserfs/journal.c
+@@ -2329,6 +2329,8 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev,
struct buffer_head *bh;
int i, j;
@@ -51402,10 +53406,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/journal.c linux-2.6.32.49/fs/reiserfs/jou
bh = __getblk(dev, block, bufsize);
if (buffer_uptodate(bh))
return (bh);
-diff -urNp linux-2.6.32.49/fs/reiserfs/namei.c linux-2.6.32.49/fs/reiserfs/namei.c
---- linux-2.6.32.49/fs/reiserfs/namei.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/namei.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1214,6 +1214,8 @@ static int reiserfs_rename(struct inode
+diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
+index 2715791..b8996db 100644
+--- a/fs/reiserfs/namei.c
++++ b/fs/reiserfs/namei.c
+@@ -1214,6 +1214,8 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
unsigned long savelink = 1;
struct timespec ctime;
@@ -51414,10 +53419,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/namei.c linux-2.6.32.49/fs/reiserfs/namei
/* three balancings: (1) old name removal, (2) new name insertion
and (3) maybe "save" link insertion
stat data updates: (1) old directory,
-diff -urNp linux-2.6.32.49/fs/reiserfs/procfs.c linux-2.6.32.49/fs/reiserfs/procfs.c
---- linux-2.6.32.49/fs/reiserfs/procfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/procfs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -123,7 +123,7 @@ static int show_super(struct seq_file *m
+diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
+index 9229e55..3d2e3b7 100644
+--- a/fs/reiserfs/procfs.c
++++ b/fs/reiserfs/procfs.c
+@@ -123,7 +123,7 @@ static int show_super(struct seq_file *m, struct super_block *sb)
"SMALL_TAILS " : "NO_TAILS ",
replay_only(sb) ? "REPLAY_ONLY " : "",
convert_reiserfs(sb) ? "CONV " : "",
@@ -51426,7 +53432,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/procfs.c linux-2.6.32.49/fs/reiserfs/proc
SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes),
SF(s_do_balance), SF(s_unneeded_left_neighbor),
SF(s_good_search_by_key_reada), SF(s_bmaps),
-@@ -309,6 +309,8 @@ static int show_journal(struct seq_file
+@@ -309,6 +309,8 @@ static int show_journal(struct seq_file *m, struct super_block *sb)
struct journal_params *jp = &rs->s_v1.s_journal;
char b[BDEVNAME_SIZE];
@@ -51435,10 +53441,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/procfs.c linux-2.6.32.49/fs/reiserfs/proc
seq_printf(m, /* on-disk fields */
"jp_journal_1st_block: \t%i\n"
"jp_journal_dev: \t%s[%x]\n"
-diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree.c
---- linux-2.6.32.49/fs/reiserfs/stree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/stree.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1159,6 +1159,8 @@ int reiserfs_delete_item(struct reiserfs
+diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
+index d036ee5..4c7dca1 100644
+--- a/fs/reiserfs/stree.c
++++ b/fs/reiserfs/stree.c
+@@ -1159,6 +1159,8 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
int iter = 0;
#endif
@@ -51447,7 +53454,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree
BUG_ON(!th->t_trans_id);
init_tb_struct(th, &s_del_balance, sb, path,
-@@ -1296,6 +1298,8 @@ void reiserfs_delete_solid_item(struct r
+@@ -1296,6 +1298,8 @@ void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th,
int retval;
int quota_cut_bytes = 0;
@@ -51456,7 +53463,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree
BUG_ON(!th->t_trans_id);
le_key2cpu_key(&cpu_key, key);
-@@ -1525,6 +1529,8 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1525,6 +1529,8 @@ int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th,
int quota_cut_bytes;
loff_t tail_pos = 0;
@@ -51465,7 +53472,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree
BUG_ON(!th->t_trans_id);
init_tb_struct(th, &s_cut_balance, inode->i_sb, path,
-@@ -1920,6 +1926,8 @@ int reiserfs_paste_into_item(struct reis
+@@ -1920,6 +1926,8 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct tree
int retval;
int fs_gen;
@@ -51474,7 +53481,7 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree
BUG_ON(!th->t_trans_id);
fs_gen = get_generation(inode->i_sb);
-@@ -2007,6 +2015,8 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2007,6 +2015,8 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
int fs_gen = 0;
int quota_bytes = 0;
@@ -51483,10 +53490,11 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/stree.c linux-2.6.32.49/fs/reiserfs/stree
BUG_ON(!th->t_trans_id);
if (inode) { /* Do we count quotas for item? */
-diff -urNp linux-2.6.32.49/fs/reiserfs/super.c linux-2.6.32.49/fs/reiserfs/super.c
---- linux-2.6.32.49/fs/reiserfs/super.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/reiserfs/super.c 2011-11-15 19:59:43.000000000 -0500
-@@ -912,6 +912,8 @@ static int reiserfs_parse_options(struct
+diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
+index f0ad05f..af3306f 100644
+--- a/fs/reiserfs/super.c
++++ b/fs/reiserfs/super.c
+@@ -912,6 +912,8 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
{.option_name = NULL}
};
@@ -51495,9 +53503,10 @@ diff -urNp linux-2.6.32.49/fs/reiserfs/super.c linux-2.6.32.49/fs/reiserfs/super
*blocks = 0;
if (!options || !*options)
/* use default configuration: create tails, journaling on, no
-diff -urNp linux-2.6.32.49/fs/select.c linux-2.6.32.49/fs/select.c
---- linux-2.6.32.49/fs/select.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/select.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/select.c b/fs/select.c
+index fd38ce2..f5381b8 100644
+--- a/fs/select.c
++++ b/fs/select.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/slab.h>
@@ -51506,7 +53515,7 @@ diff -urNp linux-2.6.32.49/fs/select.c linux-2.6.32.49/fs/select.c
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
#include <linux/fdtable.h>
-@@ -401,6 +402,8 @@ int do_select(int n, fd_set_bits *fds, s
+@@ -401,6 +402,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
int retval, i, timed_out = 0;
unsigned long slack = 0;
@@ -51515,7 +53524,7 @@ diff -urNp linux-2.6.32.49/fs/select.c linux-2.6.32.49/fs/select.c
rcu_read_lock();
retval = max_select_fd(n, fds);
rcu_read_unlock();
-@@ -529,6 +532,8 @@ int core_sys_select(int n, fd_set __user
+@@ -529,6 +532,8 @@ int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
/* Allocate small arguments on the stack to save memory and be faster */
long stack_fds[SELECT_STACK_ALLOC/sizeof(long)];
@@ -51524,7 +53533,7 @@ diff -urNp linux-2.6.32.49/fs/select.c linux-2.6.32.49/fs/select.c
ret = -EINVAL;
if (n < 0)
goto out_nofds;
-@@ -821,6 +826,9 @@ int do_sys_poll(struct pollfd __user *uf
+@@ -821,6 +826,9 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
struct poll_list *walk = head;
unsigned long todo = nfds;
@@ -51534,10 +53543,11 @@ diff -urNp linux-2.6.32.49/fs/select.c linux-2.6.32.49/fs/select.c
if (nfds > current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
return -EINVAL;
-diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
---- linux-2.6.32.49/fs/seq_file.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/seq_file.c 2011-11-15 19:59:43.000000000 -0500
-@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m,
+diff --git a/fs/seq_file.c b/fs/seq_file.c
+index eae7d9d..679f099 100644
+--- a/fs/seq_file.c
++++ b/fs/seq_file.c
+@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m, loff_t offset)
return 0;
}
if (!m->buf) {
@@ -51547,7 +53557,7 @@ diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
if (!m->buf)
return -ENOMEM;
}
-@@ -116,7 +117,8 @@ static int traverse(struct seq_file *m,
+@@ -116,7 +117,8 @@ static int traverse(struct seq_file *m, loff_t offset)
Eoverflow:
m->op->stop(m, p);
kfree(m->buf);
@@ -51557,7 +53567,7 @@ diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
return !m->buf ? -ENOMEM : -EAGAIN;
}
-@@ -169,7 +171,8 @@ ssize_t seq_read(struct file *file, char
+@@ -169,7 +171,8 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
m->version = file->f_version;
/* grab buffer if we didn't have one */
if (!m->buf) {
@@ -51567,7 +53577,7 @@ diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
if (!m->buf)
goto Enomem;
}
-@@ -210,7 +213,8 @@ ssize_t seq_read(struct file *file, char
+@@ -210,7 +213,8 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
goto Fill;
m->op->stop(m, p);
kfree(m->buf);
@@ -51577,7 +53587,7 @@ diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
if (!m->buf)
goto Enomem;
m->count = 0;
-@@ -551,7 +555,7 @@ static void single_stop(struct seq_file
+@@ -551,7 +555,7 @@ static void single_stop(struct seq_file *p, void *v)
int single_open(struct file *file, int (*show)(struct seq_file *, void *),
void *data)
{
@@ -51586,10 +53596,11 @@ diff -urNp linux-2.6.32.49/fs/seq_file.c linux-2.6.32.49/fs/seq_file.c
int res = -ENOMEM;
if (op) {
-diff -urNp linux-2.6.32.49/fs/smbfs/proc.c linux-2.6.32.49/fs/smbfs/proc.c
---- linux-2.6.32.49/fs/smbfs/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/smbfs/proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -266,9 +266,9 @@ int smb_setcodepage(struct smb_sb_info *
+diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c
+index 71c29b6..54694dd 100644
+--- a/fs/smbfs/proc.c
++++ b/fs/smbfs/proc.c
+@@ -266,9 +266,9 @@ int smb_setcodepage(struct smb_sb_info *server, struct smb_nls_codepage *cp)
out:
if (server->local_nls != NULL && server->remote_nls != NULL)
@@ -51601,7 +53612,7 @@ diff -urNp linux-2.6.32.49/fs/smbfs/proc.c linux-2.6.32.49/fs/smbfs/proc.c
smb_unlock_server(server);
return n;
-@@ -933,9 +933,9 @@ smb_newconn(struct smb_sb_info *server,
+@@ -933,9 +933,9 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
/* FIXME: the win9x code wants to modify these ... (seek/trunc bug) */
if (server->mnt->flags & SMB_MOUNT_OLDATTR) {
@@ -51622,10 +53633,11 @@ diff -urNp linux-2.6.32.49/fs/smbfs/proc.c linux-2.6.32.49/fs/smbfs/proc.c
}
/* < LANMAN2 */
-diff -urNp linux-2.6.32.49/fs/smbfs/symlink.c linux-2.6.32.49/fs/smbfs/symlink.c
---- linux-2.6.32.49/fs/smbfs/symlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/smbfs/symlink.c 2011-11-15 19:59:43.000000000 -0500
-@@ -55,7 +55,7 @@ static void *smb_follow_link(struct dent
+diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c
+index 00b2909..2ace383 100644
+--- a/fs/smbfs/symlink.c
++++ b/fs/smbfs/symlink.c
+@@ -55,7 +55,7 @@ static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd)
static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
@@ -51634,10 +53646,11 @@ diff -urNp linux-2.6.32.49/fs/smbfs/symlink.c linux-2.6.32.49/fs/smbfs/symlink.c
if (!IS_ERR(s))
__putname(s);
}
-diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
---- linux-2.6.32.49/fs/splice.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/splice.c 2011-11-15 19:59:43.000000000 -0500
-@@ -185,7 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode
+diff --git a/fs/splice.c b/fs/splice.c
+index bb92b7c..5aa72b0 100644
+--- a/fs/splice.c
++++ b/fs/splice.c
+@@ -185,7 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
pipe_lock(pipe);
for (;;) {
@@ -51646,7 +53659,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -239,9 +239,9 @@ ssize_t splice_to_pipe(struct pipe_inode
+@@ -239,9 +239,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
do_wakeup = 0;
}
@@ -51658,7 +53671,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
}
pipe_unlock(pipe);
-@@ -285,6 +285,8 @@ __generic_file_splice_read(struct file *
+@@ -285,6 +285,8 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
.spd_release = spd_release_page,
};
@@ -51667,7 +53680,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
index = *ppos >> PAGE_CACHE_SHIFT;
loff = *ppos & ~PAGE_CACHE_MASK;
req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-@@ -521,7 +523,7 @@ static ssize_t kernel_readv(struct file
+@@ -521,7 +523,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -51676,7 +53689,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
set_fs(old_fs);
return res;
-@@ -536,7 +538,7 @@ static ssize_t kernel_write(struct file
+@@ -536,7 +538,7 @@ static ssize_t kernel_write(struct file *file, const char *buf, size_t count,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -51685,7 +53698,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
set_fs(old_fs);
return res;
-@@ -565,6 +567,8 @@ ssize_t default_file_splice_read(struct
+@@ -565,6 +567,8 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
.spd_release = spd_release_page,
};
@@ -51694,7 +53707,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
index = *ppos >> PAGE_CACHE_SHIFT;
offset = *ppos & ~PAGE_CACHE_MASK;
nr_pages = (len + offset + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-@@ -578,7 +582,7 @@ ssize_t default_file_splice_read(struct
+@@ -578,7 +582,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
goto err;
this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
@@ -51716,7 +53729,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
return 0;
if (sd->flags & SPLICE_F_NONBLOCK)
-@@ -1140,7 +1144,7 @@ ssize_t splice_direct_to_actor(struct fi
+@@ -1140,7 +1144,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
* out of the pipe right after the splice_to_pipe(). So set
* PIPE_READERS appropriately.
*/
@@ -51725,7 +53738,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
current->splice_pipe = pipe;
}
-@@ -1593,6 +1597,8 @@ static long vmsplice_to_pipe(struct file
+@@ -1593,6 +1597,8 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov,
.spd_release = spd_release_page,
};
@@ -51734,7 +53747,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
pipe = pipe_info(file->f_path.dentry->d_inode);
if (!pipe)
return -EBADF;
-@@ -1701,9 +1707,9 @@ static int ipipe_prep(struct pipe_inode_
+@@ -1701,9 +1707,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -51746,7 +53759,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
if (flags & SPLICE_F_NONBLOCK) {
ret = -EAGAIN;
break;
-@@ -1735,7 +1741,7 @@ static int opipe_prep(struct pipe_inode_
+@@ -1735,7 +1741,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
pipe_lock(pipe);
while (pipe->nrbufs >= PIPE_BUFFERS) {
@@ -51755,7 +53768,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
break;
-@@ -1748,9 +1754,9 @@ static int opipe_prep(struct pipe_inode_
+@@ -1748,9 +1754,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -51784,7 +53797,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
break;
/*
-@@ -1893,7 +1899,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1893,7 +1899,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
pipe_double_lock(ipipe, opipe);
do {
@@ -51793,7 +53806,7 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -1938,7 +1944,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1938,7 +1944,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
* return EAGAIN if we have the potential of some data in the
* future, otherwise just return 0
*/
@@ -51802,10 +53815,11 @@ diff -urNp linux-2.6.32.49/fs/splice.c linux-2.6.32.49/fs/splice.c
ret = -EAGAIN;
pipe_unlock(ipipe);
-diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
---- linux-2.6.32.49/fs/sysfs/file.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/sysfs/file.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(sysfs_open_dirent
+diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
+index 7118a38..70af853 100644
+--- a/fs/sysfs/file.c
++++ b/fs/sysfs/file.c
+@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(sysfs_open_dirent_lock);
struct sysfs_open_dirent {
atomic_t refcnt;
@@ -51823,7 +53837,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
struct mutex mutex;
int needs_read_fill;
int event;
-@@ -75,7 +75,7 @@ static int fill_read_buffer(struct dentr
+@@ -75,7 +75,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
{
struct sysfs_dirent *attr_sd = dentry->d_fsdata;
struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
@@ -51832,7 +53846,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
int ret = 0;
ssize_t count;
-@@ -88,7 +88,7 @@ static int fill_read_buffer(struct dentr
+@@ -88,7 +88,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
if (!sysfs_get_active_two(attr_sd))
return -ENODEV;
@@ -51841,7 +53855,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page);
sysfs_put_active_two(attr_sd);
-@@ -199,7 +199,7 @@ flush_write_buffer(struct dentry * dentr
+@@ -199,7 +199,7 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t
{
struct sysfs_dirent *attr_sd = dentry->d_fsdata;
struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
@@ -51850,7 +53864,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
int rc;
/* need attr_sd for attr and ops, its parent for kobj */
-@@ -294,7 +294,7 @@ static int sysfs_get_open_dirent(struct
+@@ -294,7 +294,7 @@ static int sysfs_get_open_dirent(struct sysfs_dirent *sd,
return -ENOMEM;
atomic_set(&new_od->refcnt, 0);
@@ -51859,7 +53873,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
init_waitqueue_head(&new_od->poll);
INIT_LIST_HEAD(&new_od->buffers);
goto retry;
-@@ -335,7 +335,7 @@ static int sysfs_open_file(struct inode
+@@ -335,7 +335,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata;
struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
struct sysfs_buffer *buffer;
@@ -51868,7 +53882,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
int error = -EACCES;
char *p;
-@@ -444,7 +444,7 @@ static unsigned int sysfs_poll(struct fi
+@@ -444,7 +444,7 @@ static unsigned int sysfs_poll(struct file *filp, poll_table *wait)
sysfs_put_active_two(attr_sd);
@@ -51877,7 +53891,7 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
goto trigger;
return DEFAULT_POLLMASK;
-@@ -463,7 +463,7 @@ void sysfs_notify_dirent(struct sysfs_di
+@@ -463,7 +463,7 @@ void sysfs_notify_dirent(struct sysfs_dirent *sd)
od = sd->s_attr.open;
if (od) {
@@ -51886,9 +53900,10 @@ diff -urNp linux-2.6.32.49/fs/sysfs/file.c linux-2.6.32.49/fs/sysfs/file.c
wake_up_interruptible(&od->poll);
}
-diff -urNp linux-2.6.32.49/fs/sysfs/mount.c linux-2.6.32.49/fs/sysfs/mount.c
---- linux-2.6.32.49/fs/sysfs/mount.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/sysfs/mount.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
+index 4974995..c26609c 100644
+--- a/fs/sysfs/mount.c
++++ b/fs/sysfs/mount.c
@@ -36,7 +36,11 @@ struct sysfs_dirent sysfs_root = {
.s_name = "",
.s_count = ATOMIC_INIT(1),
@@ -51901,10 +53916,11 @@ diff -urNp linux-2.6.32.49/fs/sysfs/mount.c linux-2.6.32.49/fs/sysfs/mount.c
.s_ino = 1,
};
-diff -urNp linux-2.6.32.49/fs/sysfs/symlink.c linux-2.6.32.49/fs/sysfs/symlink.c
---- linux-2.6.32.49/fs/sysfs/symlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/sysfs/symlink.c 2011-11-15 19:59:43.000000000 -0500
-@@ -204,7 +204,7 @@ static void *sysfs_follow_link(struct de
+diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
+index c5081ad..342ea86 100644
+--- a/fs/sysfs/symlink.c
++++ b/fs/sysfs/symlink.c
+@@ -204,7 +204,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
{
@@ -51913,10 +53929,11 @@ diff -urNp linux-2.6.32.49/fs/sysfs/symlink.c linux-2.6.32.49/fs/sysfs/symlink.c
if (!IS_ERR(page))
free_page((unsigned long)page);
}
-diff -urNp linux-2.6.32.49/fs/udf/balloc.c linux-2.6.32.49/fs/udf/balloc.c
---- linux-2.6.32.49/fs/udf/balloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/udf/balloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -172,9 +172,7 @@ static void udf_bitmap_free_blocks(struc
+diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
+index 1e06853..b06d325 100644
+--- a/fs/udf/balloc.c
++++ b/fs/udf/balloc.c
+@@ -172,9 +172,7 @@ static void udf_bitmap_free_blocks(struct super_block *sb,
mutex_lock(&sbi->s_alloc_mutex);
partmap = &sbi->s_partmaps[bloc->partitionReferenceNum];
@@ -51927,7 +53944,7 @@ diff -urNp linux-2.6.32.49/fs/udf/balloc.c linux-2.6.32.49/fs/udf/balloc.c
udf_debug("%d < %d || %d + %d > %d\n",
bloc->logicalBlockNum, 0, bloc->logicalBlockNum,
count, partmap->s_partition_len);
-@@ -436,9 +434,7 @@ static void udf_table_free_blocks(struct
+@@ -436,9 +434,7 @@ static void udf_table_free_blocks(struct super_block *sb,
mutex_lock(&sbi->s_alloc_mutex);
partmap = &sbi->s_partmaps[bloc->partitionReferenceNum];
@@ -51938,10 +53955,11 @@ diff -urNp linux-2.6.32.49/fs/udf/balloc.c linux-2.6.32.49/fs/udf/balloc.c
udf_debug("%d < %d || %d + %d > %d\n",
bloc.logicalBlockNum, 0, bloc.logicalBlockNum, count,
partmap->s_partition_len);
-diff -urNp linux-2.6.32.49/fs/udf/inode.c linux-2.6.32.49/fs/udf/inode.c
---- linux-2.6.32.49/fs/udf/inode.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/udf/inode.c 2011-11-15 19:59:43.000000000 -0500
-@@ -484,6 +484,8 @@ static struct buffer_head *inode_getblk(
+diff --git a/fs/udf/inode.c b/fs/udf/inode.c
+index 6d24c2c..fff470f 100644
+--- a/fs/udf/inode.c
++++ b/fs/udf/inode.c
+@@ -484,6 +484,8 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
int goal = 0, pgoal = iinfo->i_location.logicalBlockNum;
int lastblock = 0;
@@ -51950,10 +53968,11 @@ diff -urNp linux-2.6.32.49/fs/udf/inode.c linux-2.6.32.49/fs/udf/inode.c
prev_epos.offset = udf_file_entry_alloc_offset(inode);
prev_epos.block = iinfo->i_location;
prev_epos.bh = NULL;
-diff -urNp linux-2.6.32.49/fs/udf/misc.c linux-2.6.32.49/fs/udf/misc.c
---- linux-2.6.32.49/fs/udf/misc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/udf/misc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -286,7 +286,7 @@ void udf_new_tag(char *data, uint16_t id
+diff --git a/fs/udf/misc.c b/fs/udf/misc.c
+index 9215700..bf1f68e 100644
+--- a/fs/udf/misc.c
++++ b/fs/udf/misc.c
+@@ -286,7 +286,7 @@ void udf_new_tag(char *data, uint16_t ident, uint16_t version, uint16_t snum,
u8 udf_tag_checksum(const struct tag *t)
{
@@ -51962,9 +53981,10 @@ diff -urNp linux-2.6.32.49/fs/udf/misc.c linux-2.6.32.49/fs/udf/misc.c
u8 checksum = 0;
int i;
for (i = 0; i < sizeof(struct tag); ++i)
-diff -urNp linux-2.6.32.49/fs/utimes.c linux-2.6.32.49/fs/utimes.c
---- linux-2.6.32.49/fs/utimes.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/utimes.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/utimes.c b/fs/utimes.c
+index e4c75db..b4df0e0 100644
+--- a/fs/utimes.c
++++ b/fs/utimes.c
@@ -1,6 +1,7 @@
#include <linux/compiler.h>
#include <linux/file.h>
@@ -51973,7 +53993,7 @@ diff -urNp linux-2.6.32.49/fs/utimes.c linux-2.6.32.49/fs/utimes.c
#include <linux/linkage.h>
#include <linux/mount.h>
#include <linux/namei.h>
-@@ -101,6 +102,12 @@ static int utimes_common(struct path *pa
+@@ -101,6 +102,12 @@ static int utimes_common(struct path *path, struct timespec *times)
goto mnt_drop_write_and_out;
}
}
@@ -51986,23 +54006,10 @@ diff -urNp linux-2.6.32.49/fs/utimes.c linux-2.6.32.49/fs/utimes.c
mutex_lock(&inode->i_mutex);
error = notify_change(path->dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-diff -urNp linux-2.6.32.49/fs/xattr_acl.c linux-2.6.32.49/fs/xattr_acl.c
---- linux-2.6.32.49/fs/xattr_acl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xattr_acl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -17,8 +17,8 @@
- struct posix_acl *
- posix_acl_from_xattr(const void *value, size_t size)
- {
-- posix_acl_xattr_header *header = (posix_acl_xattr_header *)value;
-- posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
-+ const posix_acl_xattr_header *header = (const posix_acl_xattr_header *)value;
-+ const posix_acl_xattr_entry *entry = (const posix_acl_xattr_entry *)(header+1), *end;
- int count;
- struct posix_acl *acl;
- struct posix_acl_entry *acl_e;
-diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
---- linux-2.6.32.49/fs/xattr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xattr.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/xattr.c b/fs/xattr.c
+index 6d4f6d3..cda3958 100644
+--- a/fs/xattr.c
++++ b/fs/xattr.c
@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
* Extended attribute SET operations
*/
@@ -52012,7 +54019,7 @@ diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
size_t size, int flags)
{
int error;
-@@ -271,7 +271,13 @@ setxattr(struct dentry *d, const char __
+@@ -271,7 +271,13 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
return PTR_ERR(kvalue);
}
@@ -52027,7 +54034,7 @@ diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
kfree(kvalue);
return error;
}
-@@ -288,7 +294,7 @@ SYSCALL_DEFINE5(setxattr, const char __u
+@@ -288,7 +294,7 @@ SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -52036,7 +54043,7 @@ diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -307,7 +313,7 @@ SYSCALL_DEFINE5(lsetxattr, const char __
+@@ -307,7 +313,7 @@ SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname,
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -52045,7 +54052,7 @@ diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -318,17 +324,15 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, cons
+@@ -318,17 +324,15 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
const void __user *,value, size_t, size, int, flags)
{
struct file *f;
@@ -52065,20 +54072,25 @@ diff -urNp linux-2.6.32.49/fs/xattr.c linux-2.6.32.49/fs/xattr.c
mnt_drop_write(f->f_path.mnt);
}
fput(f);
-diff -urNp linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl32.c linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl32.c
---- linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -75,6 +75,7 @@ xfs_compat_ioc_fsgeometry_v1(
- xfs_fsop_geom_t fsgeo;
- int error;
-
-+ memset(&fsgeo, 0, sizeof(fsgeo));
- error = xfs_fs_geometry(mp, &fsgeo, 3);
- if (error)
- return -error;
-diff -urNp linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl.c
---- linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/xattr_acl.c b/fs/xattr_acl.c
+index c6ad7c7..f2847a7 100644
+--- a/fs/xattr_acl.c
++++ b/fs/xattr_acl.c
+@@ -17,8 +17,8 @@
+ struct posix_acl *
+ posix_acl_from_xattr(const void *value, size_t size)
+ {
+- posix_acl_xattr_header *header = (posix_acl_xattr_header *)value;
+- posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
++ const posix_acl_xattr_header *header = (const posix_acl_xattr_header *)value;
++ const posix_acl_xattr_entry *entry = (const posix_acl_xattr_entry *)(header+1), *end;
+ int count;
+ struct posix_acl *acl;
+ struct posix_acl_entry *acl_e;
+diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
+index 942362f..88f96f5 100644
+--- a/fs/xfs/linux-2.6/xfs_ioctl.c
++++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -134,7 +134,7 @@ xfs_find_handle(
}
@@ -52106,9 +54118,22 @@ diff -urNp linux-2.6.32.49/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.32.49/fs/xfs/l
int error;
error = xfs_fs_geometry(mp, &fsgeo, 3);
-diff -urNp linux-2.6.32.49/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.32.49/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.32.49/fs/xfs/linux-2.6/xfs_iops.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/linux-2.6/xfs_iops.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
+index bad485a..479bd32 100644
+--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
++++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
+@@ -75,6 +75,7 @@ xfs_compat_ioc_fsgeometry_v1(
+ xfs_fsop_geom_t fsgeo;
+ int error;
+
++ memset(&fsgeo, 0, sizeof(fsgeo));
+ error = xfs_fs_geometry(mp, &fsgeo, 3);
+ if (error)
+ return -error;
+diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
+index 1f3b4b8..6102f6d 100644
+--- a/fs/xfs/linux-2.6/xfs_iops.c
++++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -468,7 +468,7 @@ xfs_vn_put_link(
struct nameidata *nd,
void *p)
@@ -52118,9 +54143,10 @@ diff -urNp linux-2.6.32.49/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.32.49/fs/xfs/li
if (!IS_ERR(s))
kfree(s);
-diff -urNp linux-2.6.32.49/fs/xfs/xfs_bmap.c linux-2.6.32.49/fs/xfs/xfs_bmap.c
---- linux-2.6.32.49/fs/xfs/xfs_bmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/xfs_bmap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
+index 8971fb0..5fc1eb2 100644
+--- a/fs/xfs/xfs_bmap.c
++++ b/fs/xfs/xfs_bmap.c
@@ -360,7 +360,7 @@ xfs_bmap_validate_ret(
int nmap,
int ret_nmap);
@@ -52130,9 +54156,10 @@ diff -urNp linux-2.6.32.49/fs/xfs/xfs_bmap.c linux-2.6.32.49/fs/xfs/xfs_bmap.c
#endif /* DEBUG */
#if defined(XFS_RW_TRACE)
-diff -urNp linux-2.6.32.49/fs/xfs/xfs_dir2_sf.c linux-2.6.32.49/fs/xfs/xfs_dir2_sf.c
---- linux-2.6.32.49/fs/xfs/xfs_dir2_sf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/xfs_dir2_sf.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c
+index e89734e..5e84d8d 100644
+--- a/fs/xfs/xfs_dir2_sf.c
++++ b/fs/xfs/xfs_dir2_sf.c
@@ -779,7 +779,15 @@ xfs_dir2_sf_getdents(
}
@@ -52150,9 +54177,10 @@ diff -urNp linux-2.6.32.49/fs/xfs/xfs_dir2_sf.c linux-2.6.32.49/fs/xfs/xfs_dir2_
off & 0x7fffffff, ino, DT_UNKNOWN)) {
*offset = off & 0x7fffffff;
return 0;
-diff -urNp linux-2.6.32.49/fs/xfs/xfs_vnodeops.c linux-2.6.32.49/fs/xfs/xfs_vnodeops.c
---- linux-2.6.32.49/fs/xfs/xfs_vnodeops.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/fs/xfs/xfs_vnodeops.c 2011-11-18 18:59:38.000000000 -0500
+diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
+index 8f32f50..859e8a3 100644
+--- a/fs/xfs/xfs_vnodeops.c
++++ b/fs/xfs/xfs_vnodeops.c
@@ -564,13 +564,17 @@ xfs_readlink(
xfs_ilock(ip, XFS_ILOCK_SHARED);
@@ -52174,118 +54202,1095 @@ diff -urNp linux-2.6.32.49/fs/xfs/xfs_vnodeops.c linux-2.6.32.49/fs/xfs/xfs_vnod
if (ip->i_df.if_flags & XFS_IFINLINE) {
memcpy(link, ip->i_df.if_u1.if_data, pathlen);
link[pathlen] = '\0';
-diff -urNp linux-2.6.32.49/grsecurity/gracl_alloc.c linux-2.6.32.49/grsecurity/gracl_alloc.c
---- linux-2.6.32.49/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_alloc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -0,0 +1,105 @@
-+#include <linux/kernel.h>
-+#include <linux/mm.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
-+#include <linux/gracl.h>
-+#include <linux/grsecurity.h>
+diff --git a/grsecurity/Kconfig b/grsecurity/Kconfig
+new file mode 100644
+index 0000000..f27a8e8
+--- /dev/null
++++ b/grsecurity/Kconfig
+@@ -0,0 +1,1036 @@
++#
++# grecurity configuration
++#
+
-+static unsigned long alloc_stack_next = 1;
-+static unsigned long alloc_stack_size = 1;
-+static void **alloc_stack;
++menu "Grsecurity"
+
-+static __inline__ int
-+alloc_pop(void)
-+{
-+ if (alloc_stack_next == 1)
-+ return 0;
++config GRKERNSEC
++ bool "Grsecurity"
++ select CRYPTO
++ select CRYPTO_SHA256
++ help
++ If you say Y here, you will be able to configure many features
++ that will enhance the security of your system. It is highly
++ recommended that you say Y here and read through the help
++ for each option so that you fully understand the features and
++ can evaluate their usefulness for your machine.
+
-+ kfree(alloc_stack[alloc_stack_next - 2]);
++choice
++ prompt "Security Level"
++ depends on GRKERNSEC
++ default GRKERNSEC_CUSTOM
+
-+ alloc_stack_next--;
++config GRKERNSEC_LOW
++ bool "Low"
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_CHDIR
+
-+ return 1;
-+}
++ help
++ If you choose this option, several of the grsecurity options will
++ be enabled that will give you greater protection against a number
++ of attacks, while assuring that none of your software will have any
++ conflicts with the additional security measures. If you run a lot
++ of unusual software, or you are having problems with the higher
++ security levels, you should say Y here. With this option, the
++ following features are enabled:
+
-+static __inline__ int
-+alloc_push(void *buf)
-+{
-+ if (alloc_stack_next >= alloc_stack_size)
-+ return 1;
++ - Linking restrictions
++ - FIFO restrictions
++ - Restricted dmesg
++ - Enforced chdir("/") on chroot
++ - Runtime module disabling
+
-+ alloc_stack[alloc_stack_next - 1] = buf;
++config GRKERNSEC_MEDIUM
++ bool "Medium"
++ select PAX
++ select PAX_EI_PAX
++ select PAX_PT_PAX_FLAGS
++ select PAX_HAVE_ACL_FLAGS
++ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_SYSCTL
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_FORKFAIL
++ select GRKERNSEC_TIME
++ select GRKERNSEC_SIGNAL
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_UNIX
++ select GRKERNSEC_CHROOT_MOUNT
++ select GRKERNSEC_CHROOT_PIVOT
++ select GRKERNSEC_CHROOT_DOUBLE
++ select GRKERNSEC_CHROOT_CHDIR
++ select GRKERNSEC_CHROOT_MKNOD
++ select GRKERNSEC_PROC
++ select GRKERNSEC_PROC_USERGROUP
++ select PAX_RANDUSTACK
++ select PAX_ASLR
++ select PAX_RANDMMAP
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
+
-+ alloc_stack_next++;
++ help
++ If you say Y here, several features in addition to those included
++ in the low additional security level will be enabled. These
++ features provide even more security to your system, though in rare
++ cases they may be incompatible with very old or poorly written
++ software. If you enable this option, make sure that your auth
++ service (identd) is running as gid 1001. With this option,
++ the following features (in addition to those provided in the
++ low additional security level) will be enabled:
+
-+ return 0;
-+}
++ - Failed fork logging
++ - Time change logging
++ - Signal logging
++ - Deny mounts in chroot
++ - Deny double chrooting
++ - Deny sysctl writes in chroot
++ - Deny mknod in chroot
++ - Deny access to abstract AF_UNIX sockets out of chroot
++ - Deny pivot_root in chroot
++ - Denied reads/writes of /dev/kmem, /dev/mem, and /dev/port
++ - /proc restrictions with special GID set to 10 (usually wheel)
++ - Address Space Layout Randomization (ASLR)
++ - Prevent exploitation of most refcount overflows
++ - Bounds checking of copying between the kernel and userland
+
-+void *
-+acl_alloc(unsigned long len)
-+{
-+ void *ret = NULL;
++config GRKERNSEC_HIGH
++ bool "High"
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_FORKFAIL
++ select GRKERNSEC_TIME
++ select GRKERNSEC_SIGNAL
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_SHMAT
++ select GRKERNSEC_CHROOT_UNIX
++ select GRKERNSEC_CHROOT_MOUNT
++ select GRKERNSEC_CHROOT_FCHDIR
++ select GRKERNSEC_CHROOT_PIVOT
++ select GRKERNSEC_CHROOT_DOUBLE
++ select GRKERNSEC_CHROOT_CHDIR
++ select GRKERNSEC_CHROOT_MKNOD
++ select GRKERNSEC_CHROOT_CAPS
++ select GRKERNSEC_CHROOT_SYSCTL
++ select GRKERNSEC_CHROOT_FINDTASK
++ select GRKERNSEC_SYSFS_RESTRICT
++ select GRKERNSEC_PROC
++ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
++ select GRKERNSEC_HIDESYM
++ select GRKERNSEC_BRUTE
++ select GRKERNSEC_PROC_USERGROUP
++ select GRKERNSEC_KMEM
++ select GRKERNSEC_RESLOG
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_PROC_ADD
++ select GRKERNSEC_CHROOT_CHMOD
++ select GRKERNSEC_CHROOT_NICE
++ select GRKERNSEC_AUDIT_MOUNT
++ select GRKERNSEC_MODHARDEN if (MODULES)
++ select GRKERNSEC_HARDEN_PTRACE
++ select GRKERNSEC_VM86 if (X86_32)
++ select GRKERNSEC_KERN_LOCKOUT if (X86 || ARM || PPC || SPARC)
++ select PAX
++ select PAX_RANDUSTACK
++ select PAX_ASLR
++ select PAX_RANDMMAP
++ select PAX_NOEXEC
++ select PAX_MPROTECT
++ select PAX_EI_PAX
++ select PAX_PT_PAX_FLAGS
++ select PAX_HAVE_ACL_FLAGS
++ select PAX_KERNEXEC if ((PPC || X86) && (!X86_32 || X86_WP_WORKS_OK) && !XEN)
++ select PAX_MEMORY_UDEREF if (X86 && !XEN)
++ select PAX_RANDKSTACK if (X86_TSC && X86)
++ select PAX_SEGMEXEC if (X86_32)
++ select PAX_PAGEEXEC
++ select PAX_EMUPLT if (ALPHA || PARISC || SPARC)
++ select PAX_EMUTRAMP if (PARISC)
++ select PAX_EMUSIGRT if (PARISC)
++ select PAX_ETEXECRELOCS if (ALPHA || IA64 || PARISC)
++ select PAX_ELFRELOCS if (PAX_ETEXECRELOCS || (IA64 || PPC || X86))
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
++ help
++ If you say Y here, many of the features of grsecurity will be
++ enabled, which will protect you against many kinds of attacks
++ against your system. The heightened security comes at a cost
++ of an increased chance of incompatibilities with rare software
++ on your machine. Since this security level enables PaX, you should
++ view <http://pax.grsecurity.net> and read about the PaX
++ project. While you are there, download chpax and run it on
++ binaries that cause problems with PaX. Also remember that
++ since the /proc restrictions are enabled, you must run your
++ identd as gid 1001. This security level enables the following
++ features in addition to those listed in the low and medium
++ security levels:
+
-+ if (!len || len > PAGE_SIZE)
-+ goto out;
++ - Additional /proc restrictions
++ - Chmod restrictions in chroot
++ - No signals, ptrace, or viewing of processes outside of chroot
++ - Capability restrictions in chroot
++ - Deny fchdir out of chroot
++ - Priority restrictions in chroot
++ - Segmentation-based implementation of PaX
++ - Mprotect restrictions
++ - Removal of addresses from /proc/<pid>/[smaps|maps|stat]
++ - Kernel stack randomization
++ - Mount/unmount/remount logging
++ - Kernel symbol hiding
++ - Hardening of module auto-loading
++ - Ptrace restrictions
++ - Restricted vm86 mode
++ - Restricted sysfs/debugfs
++ - Active kernel exploit response
+
-+ ret = kmalloc(len, GFP_KERNEL);
++config GRKERNSEC_CUSTOM
++ bool "Custom"
++ help
++ If you say Y here, you will be able to configure every grsecurity
++ option, which allows you to enable many more features that aren't
++ covered in the basic security levels. These additional features
++ include TPE, socket restrictions, and the sysctl system for
++ grsecurity. It is advised that you read through the help for
++ each option to determine its usefulness in your situation.
+
-+ if (ret) {
-+ if (alloc_push(ret)) {
-+ kfree(ret);
-+ ret = NULL;
-+ }
-+ }
++endchoice
+
-+out:
-+ return ret;
-+}
++menu "Address Space Protection"
++depends on GRKERNSEC
+
-+void *
-+acl_alloc_num(unsigned long num, unsigned long len)
-+{
-+ if (!len || (num > (PAGE_SIZE / len)))
-+ return NULL;
++config GRKERNSEC_KMEM
++ bool "Deny reading/writing to /dev/kmem, /dev/mem, and /dev/port"
++ select STRICT_DEVMEM if (X86 || ARM || TILE || S390)
++ help
++ If you say Y here, /dev/kmem and /dev/mem won't be allowed to
++ be written to or read from to modify or leak the contents of the running
++ kernel. /dev/port will also not be allowed to be opened. If you have module
++ support disabled, enabling this will close up four ways that are
++ currently used to insert malicious code into the running kernel.
++ Even with all these features enabled, we still highly recommend that
++ you use the RBAC system, as it is still possible for an attacker to
++ modify the running kernel through privileged I/O granted by ioperm/iopl.
++ If you are not using XFree86, you may be able to stop this additional
++ case by enabling the 'Disable privileged I/O' option. Though nothing
++ legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
++ but only to video memory, which is the only writing we allow in this
++ case. If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
++ not be allowed to mprotect it with PROT_WRITE later.
++ It is highly recommended that you say Y here if you meet all the
++ conditions above.
+
-+ return acl_alloc(num * len);
-+}
++config GRKERNSEC_VM86
++ bool "Restrict VM86 mode"
++ depends on X86_32
+
-+void
-+acl_free_all(void)
-+{
-+ if (gr_acl_is_enabled() || !alloc_stack)
-+ return;
++ help
++ If you say Y here, only processes with CAP_SYS_RAWIO will be able to
++ make use of a special execution mode on 32bit x86 processors called
++ Virtual 8086 (VM86) mode. XFree86 may need vm86 mode for certain
++ video cards and will still work with this option enabled. The purpose
++ of the option is to prevent exploitation of emulation errors in
++ virtualization of vm86 mode like the one discovered in VMWare in 2009.
++ Nearly all users should be able to enable this option.
+
-+ while (alloc_pop()) ;
++config GRKERNSEC_IO
++ bool "Disable privileged I/O"
++ depends on X86
++ select RTC_CLASS
++ select RTC_INTF_DEV
++ select RTC_DRV_CMOS
+
-+ if (alloc_stack) {
-+ if ((alloc_stack_size * sizeof (void *)) <= PAGE_SIZE)
-+ kfree(alloc_stack);
-+ else
-+ vfree(alloc_stack);
-+ }
++ help
++ If you say Y here, all ioperm and iopl calls will return an error.
++ Ioperm and iopl can be used to modify the running kernel.
++ Unfortunately, some programs need this access to operate properly,
++ the most notable of which are XFree86 and hwclock. hwclock can be
++ remedied by having RTC support in the kernel, so real-time
++ clock support is enabled if this option is enabled, to ensure
++ that hwclock operates correctly. XFree86 still will not
++ operate correctly with this option enabled, so DO NOT CHOOSE Y
++ IF YOU USE XFree86. If you use XFree86 and you still want to
++ protect your kernel against modification, use the RBAC system.
+
-+ alloc_stack = NULL;
-+ alloc_stack_size = 1;
-+ alloc_stack_next = 1;
++config GRKERNSEC_PROC_MEMMAP
++ bool "Remove addresses from /proc/<pid>/[smaps|maps|stat]"
++ default y if (PAX_NOEXEC || PAX_ASLR)
++ depends on PAX_NOEXEC || PAX_ASLR
++ help
++ If you say Y here, the /proc/<pid>/maps and /proc/<pid>/stat files will
++ give no information about the addresses of its mappings if
++ PaX features that rely on random addresses are enabled on the task.
++ If you use PaX it is greatly recommended that you say Y here as it
++ closes up a hole that makes the full ASLR useless for suid
++ binaries.
+
-+ return;
-+}
++config GRKERNSEC_BRUTE
++ bool "Deter exploit bruteforcing"
++ help
++ If you say Y here, attempts to bruteforce exploits against forking
++ daemons such as apache or sshd, as well as against suid/sgid binaries
++ will be deterred. When a child of a forking daemon is killed by PaX
++ or crashes due to an illegal instruction or other suspicious signal,
++ the parent process will be delayed 30 seconds upon every subsequent
++ fork until the administrator is able to assess the situation and
++ restart the daemon.
++ In the suid/sgid case, the attempt is logged, the user has all their
++ processes terminated, and they are prevented from executing any further
++ processes for 15 minutes.
++ It is recommended that you also enable signal logging in the auditing
++ section so that logs are generated when a process triggers a suspicious
++ signal.
++ If the sysctl option is enabled, a sysctl option with name
++ "deter_bruteforce" is created.
+
-+int
-+acl_alloc_stack_init(unsigned long size)
-+{
-+ if ((size * sizeof (void *)) <= PAGE_SIZE)
-+ alloc_stack =
-+ (void **) kmalloc(size * sizeof (void *), GFP_KERNEL);
-+ else
-+ alloc_stack = (void **) vmalloc(size * sizeof (void *));
++config GRKERNSEC_MODHARDEN
++ bool "Harden module auto-loading"
++ depends on MODULES
++ help
++ If you say Y here, module auto-loading in response to use of some
++ feature implemented by an unloaded module will be restricted to
++ root users. Enabling this option helps defend against attacks
++ by unprivileged users who abuse the auto-loading behavior to
++ cause a vulnerable module to load that is then exploited.
+
-+ alloc_stack_size = size;
++ If this option prevents a legitimate use of auto-loading for a
++ non-root user, the administrator can execute modprobe manually
++ with the exact name of the module mentioned in the alert log.
++ Alternatively, the administrator can add the module to the list
++ of modules loaded at boot by modifying init scripts.
+
-+ if (!alloc_stack)
-+ return 0;
-+ else
-+ return 1;
-+}
-diff -urNp linux-2.6.32.49/grsecurity/gracl.c linux-2.6.32.49/grsecurity/gracl.c
---- linux-2.6.32.49/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl.c 2011-11-16 17:55:28.000000000 -0500
++ Modification of init scripts will most likely be needed on
++ Ubuntu servers with encrypted home directory support enabled,
++ as the first non-root user logging in will cause the ecb(aes),
++ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded.
++
++config GRKERNSEC_HIDESYM
++ bool "Hide kernel symbols"
++ help
++ If you say Y here, getting information on loaded modules, and
++ displaying all kernel symbols through a syscall will be restricted
++ to users with CAP_SYS_MODULE. For software compatibility reasons,
++ /proc/kallsyms will be restricted to the root user. The RBAC
++ system can hide that entry even from root.
++
++ This option also prevents leaking of kernel addresses through
++ several /proc entries.
++
++ Note that this option is only effective provided the following
++ conditions are met:
++ 1) The kernel using grsecurity is not precompiled by some distribution
++ 2) You have also enabled GRKERNSEC_DMESG
++ 3) You are using the RBAC system and hiding other files such as your
++ kernel image and System.map. Alternatively, enabling this option
++ causes the permissions on /boot, /lib/modules, and the kernel
++ source directory to change at compile time to prevent
++ reading by non-root users.
++ If the above conditions are met, this option will aid in providing a
++ useful protection against local kernel exploitation of overflows
++ and arbitrary read/write vulnerabilities.
++
++config GRKERNSEC_KERN_LOCKOUT
++ bool "Active kernel exploit response"
++ depends on X86 || ARM || PPC || SPARC
++ help
++ If you say Y here, when a PaX alert is triggered due to suspicious
++ activity in the kernel (from KERNEXEC/UDEREF/USERCOPY)
++ or an OOPs occurs due to bad memory accesses, instead of just
++ terminating the offending process (and potentially allowing
++ a subsequent exploit from the same user), we will take one of two
++ actions:
++ If the user was root, we will panic the system
++ If the user was non-root, we will log the attempt, terminate
++ all processes owned by the user, then prevent them from creating
++ any new processes until the system is restarted
++ This deters repeated kernel exploitation/bruteforcing attempts
++ and is useful for later forensics.
++
++endmenu
++menu "Role Based Access Control Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_RBAC_DEBUG
++ bool
++
++config GRKERNSEC_NO_RBAC
++ bool "Disable RBAC system"
++ help
++ If you say Y here, the /dev/grsec device will be removed from the kernel,
++ preventing the RBAC system from being enabled. You should only say Y
++ here if you have no intention of using the RBAC system, so as to prevent
++ an attacker with root access from misusing the RBAC system to hide files
++ and processes when loadable module support and /dev/[k]mem have been
++ locked down.
++
++config GRKERNSEC_ACL_HIDEKERN
++ bool "Hide kernel processes"
++ help
++ If you say Y here, all kernel threads will be hidden to all
++ processes but those whose subject has the "view hidden processes"
++ flag.
++
++config GRKERNSEC_ACL_MAXTRIES
++ int "Maximum tries before password lockout"
++ default 3
++ help
++ This option enforces the maximum number of times a user can attempt
++ to authorize themselves with the grsecurity RBAC system before being
++ denied the ability to attempt authorization again for a specified time.
++ The lower the number, the harder it will be to brute-force a password.
++
++config GRKERNSEC_ACL_TIMEOUT
++ int "Time to wait after max password tries, in seconds"
++ default 30
++ help
++ This option specifies the time the user must wait after attempting to
++ authorize to the RBAC system with the maximum number of invalid
++ passwords. The higher the number, the harder it will be to brute-force
++ a password.
++
++endmenu
++menu "Filesystem Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_PROC
++ bool "Proc restrictions"
++ help
++ If you say Y here, the permissions of the /proc filesystem
++ will be altered to enhance system security and privacy. You MUST
++ choose either a user only restriction or a user and group restriction.
++ Depending upon the option you choose, you can either restrict users to
++ see only the processes they themselves run, or choose a group that can
++ view all processes and files normally restricted to root if you choose
++ the "restrict to user only" option. NOTE: If you're running identd as
++ a non-root user, you will have to run it as the group you specify here.
++
++config GRKERNSEC_PROC_USER
++ bool "Restrict /proc to user only"
++ depends on GRKERNSEC_PROC
++ help
++ If you say Y here, non-root users will only be able to view their own
++ processes, and restricts them from viewing network-related information,
++ and viewing kernel symbol and module information.
++
++config GRKERNSEC_PROC_USERGROUP
++ bool "Allow special group"
++ depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
++ help
++ If you say Y here, you will be able to select a group that will be
++ able to view all processes and network-related information. If you've
++ enabled GRKERNSEC_HIDESYM, kernel and symbol information may still
++ remain hidden. This option is useful if you want to run identd as
++ a non-root user.
++
++config GRKERNSEC_PROC_GID
++ int "GID for special group"
++ depends on GRKERNSEC_PROC_USERGROUP
++ default 1001
++
++config GRKERNSEC_PROC_ADD
++ bool "Additional restrictions"
++ depends on GRKERNSEC_PROC_USER || GRKERNSEC_PROC_USERGROUP
++ help
++ If you say Y here, additional restrictions will be placed on
++ /proc that keep normal users from viewing device information and
++ slabinfo information that could be useful for exploits.
++
++config GRKERNSEC_LINK
++ bool "Linking restrictions"
++ help
++ If you say Y here, /tmp race exploits will be prevented, since users
++ will no longer be able to follow symlinks owned by other users in
++ world-writable +t directories (e.g. /tmp), unless the owner of the
++ symlink is the owner of the directory. users will also not be
++ able to hardlink to files they do not own. If the sysctl option is
++ enabled, a sysctl option with name "linking_restrictions" is created.
++
++config GRKERNSEC_FIFO
++ bool "FIFO restrictions"
++ help
++ If you say Y here, users will not be able to write to FIFOs they don't
++ own in world-writable +t directories (e.g. /tmp), unless the owner of
++ the FIFO is the same owner of the directory it's held in. If the sysctl
++ option is enabled, a sysctl option with name "fifo_restrictions" is
++ created.
++
++config GRKERNSEC_SYSFS_RESTRICT
++ bool "Sysfs/debugfs restriction"
++ depends on SYSFS
++ help
++ If you say Y here, sysfs (the pseudo-filesystem mounted at /sys) and
++ any filesystem normally mounted under it (e.g. debugfs) will only
++ be accessible by root. These filesystems generally provide access
++ to hardware and debug information that isn't appropriate for unprivileged
++ users of the system. Sysfs and debugfs have also become a large source
++ of new vulnerabilities, ranging from infoleaks to local compromise.
++ There has been very little oversight with an eye toward security involved
++ in adding new exporters of information to these filesystems, so their
++ use is discouraged.
++ This option is equivalent to a chmod 0700 of the mount paths.
++
++config GRKERNSEC_ROFS
++ bool "Runtime read-only mount protection"
++ help
++ If you say Y here, a sysctl option with name "romount_protect" will
++ be created. By setting this option to 1 at runtime, filesystems
++ will be protected in the following ways:
++ * No new writable mounts will be allowed
++ * Existing read-only mounts won't be able to be remounted read/write
++ * Write operations will be denied on all block devices
++ This option acts independently of grsec_lock: once it is set to 1,
++ it cannot be turned off. Therefore, please be mindful of the resulting
++ behavior if this option is enabled in an init script on a read-only
++ filesystem. This feature is mainly intended for secure embedded systems.
++
++config GRKERNSEC_CHROOT
++ bool "Chroot jail restrictions"
++ help
++ If you say Y here, you will be able to choose several options that will
++ make breaking out of a chrooted jail much more difficult. If you
++ encounter no software incompatibilities with the following options, it
++ is recommended that you enable each one.
++
++config GRKERNSEC_CHROOT_MOUNT
++ bool "Deny mounts"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ mount or remount filesystems. If the sysctl option is enabled, a
++ sysctl option with name "chroot_deny_mount" is created.
++
++config GRKERNSEC_CHROOT_DOUBLE
++ bool "Deny double-chroots"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to chroot
++ again outside the chroot. This is a widely used method of breaking
++ out of a chroot jail and should not be allowed. If the sysctl
++ option is enabled, a sysctl option with name
++ "chroot_deny_chroot" is created.
++
++config GRKERNSEC_CHROOT_PIVOT
++ bool "Deny pivot_root in chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to use
++ a function called pivot_root() that was introduced in Linux 2.3.41. It
++ works similar to chroot in that it changes the root filesystem. This
++ function could be misused in a chrooted process to attempt to break out
++ of the chroot, and therefore should not be allowed. If the sysctl
++ option is enabled, a sysctl option with name "chroot_deny_pivot" is
++ created.
++
++config GRKERNSEC_CHROOT_CHDIR
++ bool "Enforce chdir(\"/\") on all chroots"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, the current working directory of all newly-chrooted
++ applications will be set to the the root directory of the chroot.
++ The man page on chroot(2) states:
++ Note that this call does not change the current working
++ directory, so that `.' can be outside the tree rooted at
++ `/'. In particular, the super-user can escape from a
++ `chroot jail' by doing `mkdir foo; chroot foo; cd ..'.
++
++ It is recommended that you say Y here, since it's not known to break
++ any software. If the sysctl option is enabled, a sysctl option with
++ name "chroot_enforce_chdir" is created.
++
++config GRKERNSEC_CHROOT_CHMOD
++ bool "Deny (f)chmod +s"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to chmod
++ or fchmod files to make them have suid or sgid bits. This protects
++ against another published method of breaking a chroot. If the sysctl
++ option is enabled, a sysctl option with name "chroot_deny_chmod" is
++ created.
++
++config GRKERNSEC_CHROOT_FCHDIR
++ bool "Deny fchdir out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, a well-known method of breaking chroots by fchdir'ing
++ to a file descriptor of the chrooting process that points to a directory
++ outside the filesystem will be stopped. If the sysctl option
++ is enabled, a sysctl option with name "chroot_deny_fchdir" is created.
++
++config GRKERNSEC_CHROOT_MKNOD
++ bool "Deny mknod"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be allowed to
++ mknod. The problem with using mknod inside a chroot is that it
++ would allow an attacker to create a device entry that is the same
++ as one on the physical root of your system, which could range from
++ anything from the console device to a device for your harddrive (which
++ they could then use to wipe the drive or steal data). It is recommended
++ that you say Y here, unless you run into software incompatibilities.
++ If the sysctl option is enabled, a sysctl option with name
++ "chroot_deny_mknod" is created.
++
++config GRKERNSEC_CHROOT_SHMAT
++ bool "Deny shmat() out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to attach
++ to shared memory segments that were created outside of the chroot jail.
++ It is recommended that you say Y here. If the sysctl option is enabled,
++ a sysctl option with name "chroot_deny_shmat" is created.
++
++config GRKERNSEC_CHROOT_UNIX
++ bool "Deny access to abstract AF_UNIX sockets out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ connect to abstract (meaning not belonging to a filesystem) Unix
++ domain sockets that were bound outside of a chroot. It is recommended
++ that you say Y here. If the sysctl option is enabled, a sysctl option
++ with name "chroot_deny_unix" is created.
++
++config GRKERNSEC_CHROOT_FINDTASK
++ bool "Protect outside processes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ kill, send signals with fcntl, ptrace, capget, getpgid, setpgid,
++ getsid, or view any process outside of the chroot. If the sysctl
++ option is enabled, a sysctl option with name "chroot_findtask" is
++ created.
++
++config GRKERNSEC_CHROOT_NICE
++ bool "Restrict priority changes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to raise
++ the priority of processes in the chroot, or alter the priority of
++ processes outside the chroot. This provides more security than simply
++ removing CAP_SYS_NICE from the process' capability set. If the
++ sysctl option is enabled, a sysctl option with name "chroot_restrict_nice"
++ is created.
++
++config GRKERNSEC_CHROOT_SYSCTL
++ bool "Deny sysctl writes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, an attacker in a chroot will not be able to
++ write to sysctl entries, either by sysctl(2) or through a /proc
++ interface. It is strongly recommended that you say Y here. If the
++ sysctl option is enabled, a sysctl option with name
++ "chroot_deny_sysctl" is created.
++
++config GRKERNSEC_CHROOT_CAPS
++ bool "Capability restrictions"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, the capabilities on all processes within a
++ chroot jail will be lowered to stop module insertion, raw i/o,
++ system and net admin tasks, rebooting the system, modifying immutable
++ files, modifying IPC owned by another, and changing the system time.
++ This is left an option because it can break some apps. Disable this
++ if your chrooted apps are having problems performing those kinds of
++ tasks. If the sysctl option is enabled, a sysctl option with
++ name "chroot_caps" is created.
++
++endmenu
++menu "Kernel Auditing"
++depends on GRKERNSEC
++
++config GRKERNSEC_AUDIT_GROUP
++ bool "Single group for auditing"
++ help
++ If you say Y here, the exec, chdir, and (un)mount logging features
++ will only operate on a group you specify. This option is recommended
++ if you only want to watch certain users instead of having a large
++ amount of logs from the entire system. If the sysctl option is enabled,
++ a sysctl option with name "audit_group" is created.
++
++config GRKERNSEC_AUDIT_GID
++ int "GID for auditing"
++ depends on GRKERNSEC_AUDIT_GROUP
++ default 1007
++
++config GRKERNSEC_EXECLOG
++ bool "Exec logging"
++ help
++ If you say Y here, all execve() calls will be logged (since the
++ other exec*() calls are frontends to execve(), all execution
++ will be logged). Useful for shell-servers that like to keep track
++ of their users. If the sysctl option is enabled, a sysctl option with
++ name "exec_logging" is created.
++ WARNING: This option when enabled will produce a LOT of logs, especially
++ on an active system.
++
++config GRKERNSEC_RESLOG
++ bool "Resource logging"
++ help
++ If you say Y here, all attempts to overstep resource limits will
++ be logged with the resource name, the requested size, and the current
++ limit. It is highly recommended that you say Y here. If the sysctl
++ option is enabled, a sysctl option with name "resource_logging" is
++ created. If the RBAC system is enabled, the sysctl value is ignored.
++
++config GRKERNSEC_CHROOT_EXECLOG
++ bool "Log execs within chroot"
++ help
++ If you say Y here, all executions inside a chroot jail will be logged
++ to syslog. This can cause a large amount of logs if certain
++ applications (eg. djb's daemontools) are installed on the system, and
++ is therefore left as an option. If the sysctl option is enabled, a
++ sysctl option with name "chroot_execlog" is created.
++
++config GRKERNSEC_AUDIT_PTRACE
++ bool "Ptrace logging"
++ help
++ If you say Y here, all attempts to attach to a process via ptrace
++ will be logged. If the sysctl option is enabled, a sysctl option
++ with name "audit_ptrace" is created.
++
++config GRKERNSEC_AUDIT_CHDIR
++ bool "Chdir logging"
++ help
++ If you say Y here, all chdir() calls will be logged. If the sysctl
++ option is enabled, a sysctl option with name "audit_chdir" is created.
++
++config GRKERNSEC_AUDIT_MOUNT
++ bool "(Un)Mount logging"
++ help
++ If you say Y here, all mounts and unmounts will be logged. If the
++ sysctl option is enabled, a sysctl option with name "audit_mount" is
++ created.
++
++config GRKERNSEC_SIGNAL
++ bool "Signal logging"
++ help
++ If you say Y here, certain important signals will be logged, such as
++ SIGSEGV, which will as a result inform you of when a error in a program
++ occurred, which in some cases could mean a possible exploit attempt.
++ If the sysctl option is enabled, a sysctl option with name
++ "signal_logging" is created.
++
++config GRKERNSEC_FORKFAIL
++ bool "Fork failure logging"
++ help
++ If you say Y here, all failed fork() attempts will be logged.
++ This could suggest a fork bomb, or someone attempting to overstep
++ their process limit. If the sysctl option is enabled, a sysctl option
++ with name "forkfail_logging" is created.
++
++config GRKERNSEC_TIME
++ bool "Time change logging"
++ help
++ If you say Y here, any changes of the system clock will be logged.
++ If the sysctl option is enabled, a sysctl option with name
++ "timechange_logging" is created.
++
++config GRKERNSEC_PROC_IPADDR
++ bool "/proc/<pid>/ipaddr support"
++ help
++ If you say Y here, a new entry will be added to each /proc/<pid>
++ directory that contains the IP address of the person using the task.
++ The IP is carried across local TCP and AF_UNIX stream sockets.
++ This information can be useful for IDS/IPSes to perform remote response
++ to a local attack. The entry is readable by only the owner of the
++ process (and root if he has CAP_DAC_OVERRIDE, which can be removed via
++ the RBAC system), and thus does not create privacy concerns.
++
++config GRKERNSEC_RWXMAP_LOG
++ bool 'Denied RWX mmap/mprotect logging'
++ depends on PAX_MPROTECT && !PAX_EMUPLT && !PAX_EMUSIGRT
++ help
++ If you say Y here, calls to mmap() and mprotect() with explicit
++ usage of PROT_WRITE and PROT_EXEC together will be logged when
++ denied by the PAX_MPROTECT feature. If the sysctl option is
++ enabled, a sysctl option with name "rwxmap_logging" is created.
++
++config GRKERNSEC_AUDIT_TEXTREL
++ bool 'ELF text relocations logging (READ HELP)'
++ depends on PAX_MPROTECT
++ help
++ If you say Y here, text relocations will be logged with the filename
++ of the offending library or binary. The purpose of the feature is
++ to help Linux distribution developers get rid of libraries and
++ binaries that need text relocations which hinder the future progress
++ of PaX. Only Linux distribution developers should say Y here, and
++ never on a production machine, as this option creates an information
++ leak that could aid an attacker in defeating the randomization of
++ a single memory region. If the sysctl option is enabled, a sysctl
++ option with name "audit_textrel" is created.
++
++endmenu
++
++menu "Executable Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_DMESG
++ bool "Dmesg(8) restriction"
++ help
++ If you say Y here, non-root users will not be able to use dmesg(8)
++ to view up to the last 4kb of messages in the kernel's log buffer.
++ The kernel's log buffer often contains kernel addresses and other
++ identifying information useful to an attacker in fingerprinting a
++ system for a targeted exploit.
++ If the sysctl option is enabled, a sysctl option with name "dmesg" is
++ created.
++
++config GRKERNSEC_HARDEN_PTRACE
++ bool "Deter ptrace-based process snooping"
++ help
++ If you say Y here, TTY sniffers and other malicious monitoring
++ programs implemented through ptrace will be defeated. If you
++ have been using the RBAC system, this option has already been
++ enabled for several years for all users, with the ability to make
++ fine-grained exceptions.
++
++ This option only affects the ability of non-root users to ptrace
++ processes that are not a descendent of the ptracing process.
++ This means that strace ./binary and gdb ./binary will still work,
++ but attaching to arbitrary processes will not. If the sysctl
++ option is enabled, a sysctl option with name "harden_ptrace" is
++ created.
++
++config GRKERNSEC_TPE
++ bool "Trusted Path Execution (TPE)"
++ help
++ If you say Y here, you will be able to choose a gid to add to the
++ supplementary groups of users you want to mark as "untrusted."
++ These users will not be able to execute any files that are not in
++ root-owned directories writable only by root. If the sysctl option
++ is enabled, a sysctl option with name "tpe" is created.
++
++config GRKERNSEC_TPE_ALL
++ bool "Partially restrict all non-root users"
++ depends on GRKERNSEC_TPE
++ help
++ If you say Y here, all non-root users will be covered under
++ a weaker TPE restriction. This is separate from, and in addition to,
++ the main TPE options that you have selected elsewhere. Thus, if a
++ "trusted" GID is chosen, this restriction applies to even that GID.
++ Under this restriction, all non-root users will only be allowed to
++ execute files in directories they own that are not group or
++ world-writable, or in directories owned by root and writable only by
++ root. If the sysctl option is enabled, a sysctl option with name
++ "tpe_restrict_all" is created.
++
++config GRKERNSEC_TPE_INVERT
++ bool "Invert GID option"
++ depends on GRKERNSEC_TPE
++ help
++ If you say Y here, the group you specify in the TPE configuration will
++ decide what group TPE restrictions will be *disabled* for. This
++ option is useful if you want TPE restrictions to be applied to most
++ users on the system. If the sysctl option is enabled, a sysctl option
++ with name "tpe_invert" is created. Unlike other sysctl options, this
++ entry will default to on for backward-compatibility.
++
++config GRKERNSEC_TPE_GID
++ int "GID for untrusted users"
++ depends on GRKERNSEC_TPE && !GRKERNSEC_TPE_INVERT
++ default 1005
++ help
++ Setting this GID determines what group TPE restrictions will be
++ *enabled* for. If the sysctl option is enabled, a sysctl option
++ with name "tpe_gid" is created.
++
++config GRKERNSEC_TPE_GID
++ int "GID for trusted users"
++ depends on GRKERNSEC_TPE && GRKERNSEC_TPE_INVERT
++ default 1005
++ help
++ Setting this GID determines what group TPE restrictions will be
++ *disabled* for. If the sysctl option is enabled, a sysctl option
++ with name "tpe_gid" is created.
++
++endmenu
++menu "Network Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_RANDNET
++ bool "Larger entropy pools"
++ help
++ If you say Y here, the entropy pools used for many features of Linux
++ and grsecurity will be doubled in size. Since several grsecurity
++ features use additional randomness, it is recommended that you say Y
++ here. Saying Y here has a similar effect as modifying
++ /proc/sys/kernel/random/poolsize.
++
++config GRKERNSEC_BLACKHOLE
++ bool "TCP/UDP blackhole and LAST_ACK DoS prevention"
++ depends on NET
++ help
++ If you say Y here, neither TCP resets nor ICMP
++ destination-unreachable packets will be sent in response to packets
++ sent to ports for which no associated listening process exists.
++ This feature supports both IPV4 and IPV6 and exempts the
++ loopback interface from blackholing. Enabling this feature
++ makes a host more resilient to DoS attacks and reduces network
++ visibility against scanners.
++
++ The blackhole feature as-implemented is equivalent to the FreeBSD
++ blackhole feature, as it prevents RST responses to all packets, not
++ just SYNs. Under most application behavior this causes no
++ problems, but applications (like haproxy) may not close certain
++ connections in a way that cleanly terminates them on the remote
++ end, leaving the remote host in LAST_ACK state. Because of this
++ side-effect and to prevent intentional LAST_ACK DoSes, this
++ feature also adds automatic mitigation against such attacks.
++ The mitigation drastically reduces the amount of time a socket
++ can spend in LAST_ACK state. If you're using haproxy and not
++ all servers it connects to have this option enabled, consider
++ disabling this feature on the haproxy host.
++
++ If the sysctl option is enabled, two sysctl options with names
++ "ip_blackhole" and "lastack_retries" will be created.
++ While "ip_blackhole" takes the standard zero/non-zero on/off
++ toggle, "lastack_retries" uses the same kinds of values as
++ "tcp_retries1" and "tcp_retries2". The default value of 4
++ prevents a socket from lasting more than 45 seconds in LAST_ACK
++ state.
++
++config GRKERNSEC_SOCKET
++ bool "Socket restrictions"
++ depends on NET
++ help
++ If you say Y here, you will be able to choose from several options.
++ If you assign a GID on your system and add it to the supplementary
++ groups of users you want to restrict socket access to, this patch
++ will perform up to three things, based on the option(s) you choose.
++
++config GRKERNSEC_SOCKET_ALL
++ bool "Deny any sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to connect to other hosts from your machine or run server
++ applications from your machine. If the sysctl option is enabled, a
++ sysctl option with name "socket_all" is created.
++
++config GRKERNSEC_SOCKET_ALL_GID
++ int "GID to deny all sockets for"
++ depends on GRKERNSEC_SOCKET_ALL
++ default 1004
++ help
++ Here you can choose the GID to disable socket access for. Remember to
++ add the users you want socket access disabled for to the GID
++ specified here. If the sysctl option is enabled, a sysctl option
++ with name "socket_all_gid" is created.
++
++config GRKERNSEC_SOCKET_CLIENT
++ bool "Deny client sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to connect to other hosts from your machine, but will be
++ able to run servers. If this option is enabled, all users in the group
++ you specify will have to use passive mode when initiating ftp transfers
++ from the shell on your machine. If the sysctl option is enabled, a
++ sysctl option with name "socket_client" is created.
++
++config GRKERNSEC_SOCKET_CLIENT_GID
++ int "GID to deny client sockets for"
++ depends on GRKERNSEC_SOCKET_CLIENT
++ default 1003
++ help
++ Here you can choose the GID to disable client socket access for.
++ Remember to add the users you want client socket access disabled for to
++ the GID specified here. If the sysctl option is enabled, a sysctl
++ option with name "socket_client_gid" is created.
++
++config GRKERNSEC_SOCKET_SERVER
++ bool "Deny server sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to run server applications from your machine. If the sysctl
++ option is enabled, a sysctl option with name "socket_server" is created.
++
++config GRKERNSEC_SOCKET_SERVER_GID
++ int "GID to deny server sockets for"
++ depends on GRKERNSEC_SOCKET_SERVER
++ default 1002
++ help
++ Here you can choose the GID to disable server socket access for.
++ Remember to add the users you want server socket access disabled for to
++ the GID specified here. If the sysctl option is enabled, a sysctl
++ option with name "socket_server_gid" is created.
++
++endmenu
++menu "Sysctl support"
++depends on GRKERNSEC && SYSCTL
++
++config GRKERNSEC_SYSCTL
++ bool "Sysctl support"
++ help
++ If you say Y here, you will be able to change the options that
++ grsecurity runs with at bootup, without having to recompile your
++ kernel. You can echo values to files in /proc/sys/kernel/grsecurity
++ to enable (1) or disable (0) various features. All the sysctl entries
++ are mutable until the "grsec_lock" entry is set to a non-zero value.
++ All features enabled in the kernel configuration are disabled at boot
++ if you do not say Y to the "Turn on features by default" option.
++ All options should be set at startup, and the grsec_lock entry should
++ be set to a non-zero value after all the options are set.
++ *THIS IS EXTREMELY IMPORTANT*
++
++config GRKERNSEC_SYSCTL_DISTRO
++ bool "Extra sysctl support for distro makers (READ HELP)"
++ depends on GRKERNSEC_SYSCTL && GRKERNSEC_IO
++ help
++ If you say Y here, additional sysctl options will be created
++ for features that affect processes running as root. Therefore,
++ it is critical when using this option that the grsec_lock entry be
++ enabled after boot. Only distros with prebuilt kernel packages
++ with this option enabled that can ensure grsec_lock is enabled
++ after boot should use this option.
++ *Failure to set grsec_lock after boot makes all grsec features
++ this option covers useless*
++
++ Currently this option creates the following sysctl entries:
++ "Disable Privileged I/O": "disable_priv_io"
++
++config GRKERNSEC_SYSCTL_ON
++ bool "Turn on features by default"
++ depends on GRKERNSEC_SYSCTL
++ help
++ If you say Y here, instead of having all features enabled in the
++ kernel configuration disabled at boot time, the features will be
++ enabled at boot time. It is recommended you say Y here unless
++ there is some reason you would want all sysctl-tunable features to
++ be disabled by default. As mentioned elsewhere, it is important
++ to enable the grsec_lock entry once you have finished modifying
++ the sysctl entries.
++
++endmenu
++menu "Logging Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_FLOODTIME
++ int "Seconds in between log messages (minimum)"
++ default 10
++ help
++ This option allows you to enforce the number of seconds between
++ grsecurity log messages. The default should be suitable for most
++ people, however, if you choose to change it, choose a value small enough
++ to allow informative logs to be produced, but large enough to
++ prevent flooding.
++
++config GRKERNSEC_FLOODBURST
++ int "Number of messages in a burst (maximum)"
++ default 6
++ help
++ This option allows you to choose the maximum number of messages allowed
++ within the flood time interval you chose in a separate option. The
++ default should be suitable for most people, however if you find that
++ many of your logs are being interpreted as flooding, you may want to
++ raise this value.
++
++endmenu
++
++endmenu
+diff --git a/grsecurity/Makefile b/grsecurity/Makefile
+new file mode 100644
+index 0000000..be9ae3a
+--- /dev/null
++++ b/grsecurity/Makefile
+@@ -0,0 +1,36 @@
++# grsecurity's ACL system was originally written in 2001 by Michael Dalton
++# during 2001-2009 it has been completely redesigned by Brad Spengler
++# into an RBAC system
++#
++# All code in this directory and various hooks inserted throughout the kernel
++# are copyright Brad Spengler - Open Source Security, Inc., and released
++# under the GPL v2 or higher
++
++obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
++ grsec_mount.o grsec_sig.o grsec_sysctl.o \
++ grsec_time.o grsec_tpe.o grsec_link.o grsec_pax.o grsec_ptrace.o
++
++obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_segv.o \
++ gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
++ gracl_learn.o grsec_log.o
++obj-$(CONFIG_GRKERNSEC_RESLOG) += gracl_res.o
++
++ifdef CONFIG_NET
++obj-y += grsec_sock.o
++obj-$(CONFIG_GRKERNSEC) += gracl_ip.o
++endif
++
++ifndef CONFIG_GRKERNSEC
++obj-y += grsec_disabled.o
++endif
++
++ifdef CONFIG_GRKERNSEC_HIDESYM
++extra-y := grsec_hidesym.o
++$(obj)/grsec_hidesym.o:
++ @-chmod -f 500 /boot
++ @-chmod -f 500 /lib/modules
++ @-chmod -f 500 /lib64/modules
++ @-chmod -f 500 /lib32/modules
++ @-chmod -f 700 .
++ @echo ' grsec: protected kernel image paths'
++endif
+diff --git a/grsecurity/gracl.c b/grsecurity/gracl.c
+new file mode 100644
+index 0000000..6bd68d6
+--- /dev/null
++++ b/grsecurity/gracl.c
@@ -0,0 +1,4141 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -56428,9 +59433,122 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl.c linux-2.6.32.49/grsecurity/gracl.c
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
+
-diff -urNp linux-2.6.32.49/grsecurity/gracl_cap.c linux-2.6.32.49/grsecurity/gracl_cap.c
---- linux-2.6.32.49/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_cap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/gracl_alloc.c b/grsecurity/gracl_alloc.c
+new file mode 100644
+index 0000000..34fefda
+--- /dev/null
++++ b/grsecurity/gracl_alloc.c
+@@ -0,0 +1,105 @@
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++
++static unsigned long alloc_stack_next = 1;
++static unsigned long alloc_stack_size = 1;
++static void **alloc_stack;
++
++static __inline__ int
++alloc_pop(void)
++{
++ if (alloc_stack_next == 1)
++ return 0;
++
++ kfree(alloc_stack[alloc_stack_next - 2]);
++
++ alloc_stack_next--;
++
++ return 1;
++}
++
++static __inline__ int
++alloc_push(void *buf)
++{
++ if (alloc_stack_next >= alloc_stack_size)
++ return 1;
++
++ alloc_stack[alloc_stack_next - 1] = buf;
++
++ alloc_stack_next++;
++
++ return 0;
++}
++
++void *
++acl_alloc(unsigned long len)
++{
++ void *ret = NULL;
++
++ if (!len || len > PAGE_SIZE)
++ goto out;
++
++ ret = kmalloc(len, GFP_KERNEL);
++
++ if (ret) {
++ if (alloc_push(ret)) {
++ kfree(ret);
++ ret = NULL;
++ }
++ }
++
++out:
++ return ret;
++}
++
++void *
++acl_alloc_num(unsigned long num, unsigned long len)
++{
++ if (!len || (num > (PAGE_SIZE / len)))
++ return NULL;
++
++ return acl_alloc(num * len);
++}
++
++void
++acl_free_all(void)
++{
++ if (gr_acl_is_enabled() || !alloc_stack)
++ return;
++
++ while (alloc_pop()) ;
++
++ if (alloc_stack) {
++ if ((alloc_stack_size * sizeof (void *)) <= PAGE_SIZE)
++ kfree(alloc_stack);
++ else
++ vfree(alloc_stack);
++ }
++
++ alloc_stack = NULL;
++ alloc_stack_size = 1;
++ alloc_stack_next = 1;
++
++ return;
++}
++
++int
++acl_alloc_stack_init(unsigned long size)
++{
++ if ((size * sizeof (void *)) <= PAGE_SIZE)
++ alloc_stack =
++ (void **) kmalloc(size * sizeof (void *), GFP_KERNEL);
++ else
++ alloc_stack = (void **) vmalloc(size * sizeof (void *));
++
++ alloc_stack_size = size;
++
++ if (!alloc_stack)
++ return 0;
++ else
++ return 1;
++}
+diff --git a/grsecurity/gracl_cap.c b/grsecurity/gracl_cap.c
+new file mode 100644
+index 0000000..955ddfb
+--- /dev/null
++++ b/grsecurity/gracl_cap.c
@@ -0,0 +1,101 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -56533,9 +59651,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_cap.c linux-2.6.32.49/grsecurity/gra
+ return 0;
+}
+
-diff -urNp linux-2.6.32.49/grsecurity/gracl_fs.c linux-2.6.32.49/grsecurity/gracl_fs.c
---- linux-2.6.32.49/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_fs.c 2011-11-18 19:29:57.000000000 -0500
+diff --git a/grsecurity/gracl_fs.c b/grsecurity/gracl_fs.c
+new file mode 100644
+index 0000000..d5f210c
+--- /dev/null
++++ b/grsecurity/gracl_fs.c
@@ -0,0 +1,433 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -56970,9 +60090,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_fs.c linux-2.6.32.49/grsecurity/grac
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/gracl_ip.c linux-2.6.32.49/grsecurity/gracl_ip.c
---- linux-2.6.32.49/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_ip.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/gracl_ip.c b/grsecurity/gracl_ip.c
+new file mode 100644
+index 0000000..cd07b96
+--- /dev/null
++++ b/grsecurity/gracl_ip.c
@@ -0,0 +1,382 @@
+#include <linux/kernel.h>
+#include <asm/uaccess.h>
@@ -57356,9 +60478,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_ip.c linux-2.6.32.49/grsecurity/grac
+
+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
+}
-diff -urNp linux-2.6.32.49/grsecurity/gracl_learn.c linux-2.6.32.49/grsecurity/gracl_learn.c
---- linux-2.6.32.49/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_learn.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/gracl_learn.c b/grsecurity/gracl_learn.c
+new file mode 100644
+index 0000000..34bdd46
+--- /dev/null
++++ b/grsecurity/gracl_learn.c
@@ -0,0 +1,208 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -57568,9 +60692,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_learn.c linux-2.6.32.49/grsecurity/g
+ .release = close_learn,
+ .poll = poll_learn,
+};
-diff -urNp linux-2.6.32.49/grsecurity/gracl_res.c linux-2.6.32.49/grsecurity/gracl_res.c
---- linux-2.6.32.49/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_res.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/gracl_res.c b/grsecurity/gracl_res.c
+new file mode 100644
+index 0000000..70b2179
+--- /dev/null
++++ b/grsecurity/gracl_res.c
@@ -0,0 +1,67 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -57639,9 +60765,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_res.c linux-2.6.32.49/grsecurity/gra
+ rcu_read_unlock();
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/gracl_segv.c linux-2.6.32.49/grsecurity/gracl_segv.c
---- linux-2.6.32.49/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_segv.c 2011-11-17 20:48:17.000000000 -0500
+diff --git a/grsecurity/gracl_segv.c b/grsecurity/gracl_segv.c
+new file mode 100644
+index 0000000..1d1b734
+--- /dev/null
++++ b/grsecurity/gracl_segv.c
@@ -0,0 +1,284 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -57927,9 +61055,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_segv.c linux-2.6.32.49/grsecurity/gr
+
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/gracl_shm.c linux-2.6.32.49/grsecurity/gracl_shm.c
---- linux-2.6.32.49/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/gracl_shm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/gracl_shm.c b/grsecurity/gracl_shm.c
+new file mode 100644
+index 0000000..9d83a69
+--- /dev/null
++++ b/grsecurity/gracl_shm.c
@@ -0,0 +1,40 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -57971,9 +61101,11 @@ diff -urNp linux-2.6.32.49/grsecurity/gracl_shm.c linux-2.6.32.49/grsecurity/gra
+
+ return 1;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_chdir.c linux-2.6.32.49/grsecurity/grsec_chdir.c
---- linux-2.6.32.49/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_chdir.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_chdir.c b/grsecurity/grsec_chdir.c
+new file mode 100644
+index 0000000..bc0be01
+--- /dev/null
++++ b/grsecurity/grsec_chdir.c
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -57994,9 +61126,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_chdir.c linux-2.6.32.49/grsecurity/g
+#endif
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_chroot.c linux-2.6.32.49/grsecurity/grsec_chroot.c
---- linux-2.6.32.49/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_chroot.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_chroot.c b/grsecurity/grsec_chroot.c
+new file mode 100644
+index 0000000..197bdd5
+--- /dev/null
++++ b/grsecurity/grsec_chroot.c
@@ -0,0 +1,386 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -58384,9 +61518,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_chroot.c linux-2.6.32.49/grsecurity/
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_disabled.c linux-2.6.32.49/grsecurity/grsec_disabled.c
---- linux-2.6.32.49/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_disabled.c 2011-11-18 19:30:15.000000000 -0500
+diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c
+new file mode 100644
+index 0000000..b81db5b
+--- /dev/null
++++ b/grsecurity/grsec_disabled.c
@@ -0,0 +1,439 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -58827,9 +61963,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_disabled.c linux-2.6.32.49/grsecurit
+EXPORT_SYMBOL(gr_check_user_change);
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
-diff -urNp linux-2.6.32.49/grsecurity/grsec_exec.c linux-2.6.32.49/grsecurity/grsec_exec.c
---- linux-2.6.32.49/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_exec.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_exec.c b/grsecurity/grsec_exec.c
+new file mode 100644
+index 0000000..a96e155
+--- /dev/null
++++ b/grsecurity/grsec_exec.c
@@ -0,0 +1,204 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59035,9 +62173,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_exec.c linux-2.6.32.49/grsecurity/gr
+
+EXPORT_SYMBOL(gr_is_capable);
+EXPORT_SYMBOL(gr_is_capable_nolog);
-diff -urNp linux-2.6.32.49/grsecurity/grsec_fifo.c linux-2.6.32.49/grsecurity/grsec_fifo.c
---- linux-2.6.32.49/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_fifo.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_fifo.c b/grsecurity/grsec_fifo.c
+new file mode 100644
+index 0000000..d3ee748
+--- /dev/null
++++ b/grsecurity/grsec_fifo.c
@@ -0,0 +1,24 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59063,9 +62203,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_fifo.c linux-2.6.32.49/grsecurity/gr
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_fork.c linux-2.6.32.49/grsecurity/grsec_fork.c
---- linux-2.6.32.49/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_fork.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_fork.c b/grsecurity/grsec_fork.c
+new file mode 100644
+index 0000000..8ca18bf
+--- /dev/null
++++ b/grsecurity/grsec_fork.c
@@ -0,0 +1,23 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59090,9 +62232,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_fork.c linux-2.6.32.49/grsecurity/gr
+#endif
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_init.c linux-2.6.32.49/grsecurity/grsec_init.c
---- linux-2.6.32.49/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_init.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_init.c b/grsecurity/grsec_init.c
+new file mode 100644
+index 0000000..f813c26
+--- /dev/null
++++ b/grsecurity/grsec_init.c
@@ -0,0 +1,270 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59364,9 +62508,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_init.c linux-2.6.32.49/grsecurity/gr
+
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_link.c linux-2.6.32.49/grsecurity/grsec_link.c
---- linux-2.6.32.49/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_link.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_link.c b/grsecurity/grsec_link.c
+new file mode 100644
+index 0000000..3efe141
+--- /dev/null
++++ b/grsecurity/grsec_link.c
@@ -0,0 +1,43 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59411,9 +62557,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_link.c linux-2.6.32.49/grsecurity/gr
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_log.c linux-2.6.32.49/grsecurity/grsec_log.c
---- linux-2.6.32.49/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_log.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_log.c b/grsecurity/grsec_log.c
+new file mode 100644
+index 0000000..a45d2e9
+--- /dev/null
++++ b/grsecurity/grsec_log.c
@@ -0,0 +1,322 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59737,9 +62885,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_log.c linux-2.6.32.49/grsecurity/grs
+ gr_log_end(audit, 1);
+ END_LOCKS(audit);
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_mem.c linux-2.6.32.49/grsecurity/grsec_mem.c
---- linux-2.6.32.49/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_mem.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_mem.c b/grsecurity/grsec_mem.c
+new file mode 100644
+index 0000000..6c0416b
+--- /dev/null
++++ b/grsecurity/grsec_mem.c
@@ -0,0 +1,33 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59774,9 +62924,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_mem.c linux-2.6.32.49/grsecurity/grs
+ gr_log_noargs(GR_DONT_AUDIT, GR_VM86_MSG);
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_mount.c linux-2.6.32.49/grsecurity/grsec_mount.c
---- linux-2.6.32.49/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_mount.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_mount.c b/grsecurity/grsec_mount.c
+new file mode 100644
+index 0000000..2131422
+--- /dev/null
++++ b/grsecurity/grsec_mount.c
@@ -0,0 +1,62 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59840,9 +62992,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_mount.c linux-2.6.32.49/grsecurity/g
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_pax.c linux-2.6.32.49/grsecurity/grsec_pax.c
---- linux-2.6.32.49/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_pax.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_pax.c b/grsecurity/grsec_pax.c
+new file mode 100644
+index 0000000..a3b12a0
+--- /dev/null
++++ b/grsecurity/grsec_pax.c
@@ -0,0 +1,36 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59880,9 +63034,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_pax.c linux-2.6.32.49/grsecurity/grs
+#endif
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_ptrace.c linux-2.6.32.49/grsecurity/grsec_ptrace.c
---- linux-2.6.32.49/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_ptrace.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_ptrace.c b/grsecurity/grsec_ptrace.c
+new file mode 100644
+index 0000000..472c1d6
+--- /dev/null
++++ b/grsecurity/grsec_ptrace.c
@@ -0,0 +1,14 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -59898,9 +63054,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_ptrace.c linux-2.6.32.49/grsecurity/
+#endif
+ return;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_sig.c linux-2.6.32.49/grsecurity/grsec_sig.c
---- linux-2.6.32.49/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_sig.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_sig.c b/grsecurity/grsec_sig.c
+new file mode 100644
+index 0000000..dc73fe9
+--- /dev/null
++++ b/grsecurity/grsec_sig.c
@@ -0,0 +1,205 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -60107,9 +63265,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_sig.c linux-2.6.32.49/grsecurity/grs
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_sock.c linux-2.6.32.49/grsecurity/grsec_sock.c
---- linux-2.6.32.49/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_sock.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_sock.c b/grsecurity/grsec_sock.c
+new file mode 100644
+index 0000000..7512ea9
+--- /dev/null
++++ b/grsecurity/grsec_sock.c
@@ -0,0 +1,275 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -60386,9 +63546,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_sock.c linux-2.6.32.49/grsecurity/gr
+ return current_cap();
+#endif
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsec_sysctl.c linux-2.6.32.49/grsecurity/grsec_sysctl.c
---- linux-2.6.32.49/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_sysctl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_sysctl.c b/grsecurity/grsec_sysctl.c
+new file mode 100644
+index 0000000..2753505
+--- /dev/null
++++ b/grsecurity/grsec_sysctl.c
@@ -0,0 +1,479 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -60869,9 +64031,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_sysctl.c linux-2.6.32.49/grsecurity/
+ { .ctl_name = 0 }
+};
+#endif
-diff -urNp linux-2.6.32.49/grsecurity/grsec_time.c linux-2.6.32.49/grsecurity/grsec_time.c
---- linux-2.6.32.49/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_time.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_time.c b/grsecurity/grsec_time.c
+new file mode 100644
+index 0000000..0dc13c3
+--- /dev/null
++++ b/grsecurity/grsec_time.c
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -60889,9 +64053,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_time.c linux-2.6.32.49/grsecurity/gr
+}
+
+EXPORT_SYMBOL(gr_log_timechange);
-diff -urNp linux-2.6.32.49/grsecurity/grsec_tpe.c linux-2.6.32.49/grsecurity/grsec_tpe.c
---- linux-2.6.32.49/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsec_tpe.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsec_tpe.c b/grsecurity/grsec_tpe.c
+new file mode 100644
+index 0000000..4a78774
+--- /dev/null
++++ b/grsecurity/grsec_tpe.c
@@ -0,0 +1,39 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -60932,9 +64098,11 @@ diff -urNp linux-2.6.32.49/grsecurity/grsec_tpe.c linux-2.6.32.49/grsecurity/grs
+#endif
+ return 1;
+}
-diff -urNp linux-2.6.32.49/grsecurity/grsum.c linux-2.6.32.49/grsecurity/grsum.c
---- linux-2.6.32.49/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/grsum.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/grsecurity/grsum.c b/grsecurity/grsum.c
+new file mode 100644
+index 0000000..9f7b1ac
+--- /dev/null
++++ b/grsecurity/grsum.c
@@ -0,0 +1,61 @@
+#include <linux/err.h>
+#include <linux/kernel.h>
@@ -60997,1089 +64165,10 @@ diff -urNp linux-2.6.32.49/grsecurity/grsum.c linux-2.6.32.49/grsecurity/grsum.c
+
+ return retval;
+}
-diff -urNp linux-2.6.32.49/grsecurity/Kconfig linux-2.6.32.49/grsecurity/Kconfig
---- linux-2.6.32.49/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -0,0 +1,1036 @@
-+#
-+# grecurity configuration
-+#
-+
-+menu "Grsecurity"
-+
-+config GRKERNSEC
-+ bool "Grsecurity"
-+ select CRYPTO
-+ select CRYPTO_SHA256
-+ help
-+ If you say Y here, you will be able to configure many features
-+ that will enhance the security of your system. It is highly
-+ recommended that you say Y here and read through the help
-+ for each option so that you fully understand the features and
-+ can evaluate their usefulness for your machine.
-+
-+choice
-+ prompt "Security Level"
-+ depends on GRKERNSEC
-+ default GRKERNSEC_CUSTOM
-+
-+config GRKERNSEC_LOW
-+ bool "Low"
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_CHDIR
-+
-+ help
-+ If you choose this option, several of the grsecurity options will
-+ be enabled that will give you greater protection against a number
-+ of attacks, while assuring that none of your software will have any
-+ conflicts with the additional security measures. If you run a lot
-+ of unusual software, or you are having problems with the higher
-+ security levels, you should say Y here. With this option, the
-+ following features are enabled:
-+
-+ - Linking restrictions
-+ - FIFO restrictions
-+ - Restricted dmesg
-+ - Enforced chdir("/") on chroot
-+ - Runtime module disabling
-+
-+config GRKERNSEC_MEDIUM
-+ bool "Medium"
-+ select PAX
-+ select PAX_EI_PAX
-+ select PAX_PT_PAX_FLAGS
-+ select PAX_HAVE_ACL_FLAGS
-+ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_SYSCTL
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_FORKFAIL
-+ select GRKERNSEC_TIME
-+ select GRKERNSEC_SIGNAL
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_UNIX
-+ select GRKERNSEC_CHROOT_MOUNT
-+ select GRKERNSEC_CHROOT_PIVOT
-+ select GRKERNSEC_CHROOT_DOUBLE
-+ select GRKERNSEC_CHROOT_CHDIR
-+ select GRKERNSEC_CHROOT_MKNOD
-+ select GRKERNSEC_PROC
-+ select GRKERNSEC_PROC_USERGROUP
-+ select PAX_RANDUSTACK
-+ select PAX_ASLR
-+ select PAX_RANDMMAP
-+ select PAX_REFCOUNT if (X86 || SPARC64)
-+ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
-+
-+ help
-+ If you say Y here, several features in addition to those included
-+ in the low additional security level will be enabled. These
-+ features provide even more security to your system, though in rare
-+ cases they may be incompatible with very old or poorly written
-+ software. If you enable this option, make sure that your auth
-+ service (identd) is running as gid 1001. With this option,
-+ the following features (in addition to those provided in the
-+ low additional security level) will be enabled:
-+
-+ - Failed fork logging
-+ - Time change logging
-+ - Signal logging
-+ - Deny mounts in chroot
-+ - Deny double chrooting
-+ - Deny sysctl writes in chroot
-+ - Deny mknod in chroot
-+ - Deny access to abstract AF_UNIX sockets out of chroot
-+ - Deny pivot_root in chroot
-+ - Denied reads/writes of /dev/kmem, /dev/mem, and /dev/port
-+ - /proc restrictions with special GID set to 10 (usually wheel)
-+ - Address Space Layout Randomization (ASLR)
-+ - Prevent exploitation of most refcount overflows
-+ - Bounds checking of copying between the kernel and userland
-+
-+config GRKERNSEC_HIGH
-+ bool "High"
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_FORKFAIL
-+ select GRKERNSEC_TIME
-+ select GRKERNSEC_SIGNAL
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_SHMAT
-+ select GRKERNSEC_CHROOT_UNIX
-+ select GRKERNSEC_CHROOT_MOUNT
-+ select GRKERNSEC_CHROOT_FCHDIR
-+ select GRKERNSEC_CHROOT_PIVOT
-+ select GRKERNSEC_CHROOT_DOUBLE
-+ select GRKERNSEC_CHROOT_CHDIR
-+ select GRKERNSEC_CHROOT_MKNOD
-+ select GRKERNSEC_CHROOT_CAPS
-+ select GRKERNSEC_CHROOT_SYSCTL
-+ select GRKERNSEC_CHROOT_FINDTASK
-+ select GRKERNSEC_SYSFS_RESTRICT
-+ select GRKERNSEC_PROC
-+ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
-+ select GRKERNSEC_HIDESYM
-+ select GRKERNSEC_BRUTE
-+ select GRKERNSEC_PROC_USERGROUP
-+ select GRKERNSEC_KMEM
-+ select GRKERNSEC_RESLOG
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_PROC_ADD
-+ select GRKERNSEC_CHROOT_CHMOD
-+ select GRKERNSEC_CHROOT_NICE
-+ select GRKERNSEC_AUDIT_MOUNT
-+ select GRKERNSEC_MODHARDEN if (MODULES)
-+ select GRKERNSEC_HARDEN_PTRACE
-+ select GRKERNSEC_VM86 if (X86_32)
-+ select GRKERNSEC_KERN_LOCKOUT if (X86 || ARM || PPC || SPARC)
-+ select PAX
-+ select PAX_RANDUSTACK
-+ select PAX_ASLR
-+ select PAX_RANDMMAP
-+ select PAX_NOEXEC
-+ select PAX_MPROTECT
-+ select PAX_EI_PAX
-+ select PAX_PT_PAX_FLAGS
-+ select PAX_HAVE_ACL_FLAGS
-+ select PAX_KERNEXEC if ((PPC || X86) && (!X86_32 || X86_WP_WORKS_OK) && !XEN)
-+ select PAX_MEMORY_UDEREF if (X86 && !XEN)
-+ select PAX_RANDKSTACK if (X86_TSC && X86)
-+ select PAX_SEGMEXEC if (X86_32)
-+ select PAX_PAGEEXEC
-+ select PAX_EMUPLT if (ALPHA || PARISC || SPARC)
-+ select PAX_EMUTRAMP if (PARISC)
-+ select PAX_EMUSIGRT if (PARISC)
-+ select PAX_ETEXECRELOCS if (ALPHA || IA64 || PARISC)
-+ select PAX_ELFRELOCS if (PAX_ETEXECRELOCS || (IA64 || PPC || X86))
-+ select PAX_REFCOUNT if (X86 || SPARC64)
-+ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
-+ help
-+ If you say Y here, many of the features of grsecurity will be
-+ enabled, which will protect you against many kinds of attacks
-+ against your system. The heightened security comes at a cost
-+ of an increased chance of incompatibilities with rare software
-+ on your machine. Since this security level enables PaX, you should
-+ view <http://pax.grsecurity.net> and read about the PaX
-+ project. While you are there, download chpax and run it on
-+ binaries that cause problems with PaX. Also remember that
-+ since the /proc restrictions are enabled, you must run your
-+ identd as gid 1001. This security level enables the following
-+ features in addition to those listed in the low and medium
-+ security levels:
-+
-+ - Additional /proc restrictions
-+ - Chmod restrictions in chroot
-+ - No signals, ptrace, or viewing of processes outside of chroot
-+ - Capability restrictions in chroot
-+ - Deny fchdir out of chroot
-+ - Priority restrictions in chroot
-+ - Segmentation-based implementation of PaX
-+ - Mprotect restrictions
-+ - Removal of addresses from /proc/<pid>/[smaps|maps|stat]
-+ - Kernel stack randomization
-+ - Mount/unmount/remount logging
-+ - Kernel symbol hiding
-+ - Hardening of module auto-loading
-+ - Ptrace restrictions
-+ - Restricted vm86 mode
-+ - Restricted sysfs/debugfs
-+ - Active kernel exploit response
-+
-+config GRKERNSEC_CUSTOM
-+ bool "Custom"
-+ help
-+ If you say Y here, you will be able to configure every grsecurity
-+ option, which allows you to enable many more features that aren't
-+ covered in the basic security levels. These additional features
-+ include TPE, socket restrictions, and the sysctl system for
-+ grsecurity. It is advised that you read through the help for
-+ each option to determine its usefulness in your situation.
-+
-+endchoice
-+
-+menu "Address Space Protection"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_KMEM
-+ bool "Deny reading/writing to /dev/kmem, /dev/mem, and /dev/port"
-+ select STRICT_DEVMEM if (X86 || ARM || TILE || S390)
-+ help
-+ If you say Y here, /dev/kmem and /dev/mem won't be allowed to
-+ be written to or read from to modify or leak the contents of the running
-+ kernel. /dev/port will also not be allowed to be opened. If you have module
-+ support disabled, enabling this will close up four ways that are
-+ currently used to insert malicious code into the running kernel.
-+ Even with all these features enabled, we still highly recommend that
-+ you use the RBAC system, as it is still possible for an attacker to
-+ modify the running kernel through privileged I/O granted by ioperm/iopl.
-+ If you are not using XFree86, you may be able to stop this additional
-+ case by enabling the 'Disable privileged I/O' option. Though nothing
-+ legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
-+ but only to video memory, which is the only writing we allow in this
-+ case. If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
-+ not be allowed to mprotect it with PROT_WRITE later.
-+ It is highly recommended that you say Y here if you meet all the
-+ conditions above.
-+
-+config GRKERNSEC_VM86
-+ bool "Restrict VM86 mode"
-+ depends on X86_32
-+
-+ help
-+ If you say Y here, only processes with CAP_SYS_RAWIO will be able to
-+ make use of a special execution mode on 32bit x86 processors called
-+ Virtual 8086 (VM86) mode. XFree86 may need vm86 mode for certain
-+ video cards and will still work with this option enabled. The purpose
-+ of the option is to prevent exploitation of emulation errors in
-+ virtualization of vm86 mode like the one discovered in VMWare in 2009.
-+ Nearly all users should be able to enable this option.
-+
-+config GRKERNSEC_IO
-+ bool "Disable privileged I/O"
-+ depends on X86
-+ select RTC_CLASS
-+ select RTC_INTF_DEV
-+ select RTC_DRV_CMOS
-+
-+ help
-+ If you say Y here, all ioperm and iopl calls will return an error.
-+ Ioperm and iopl can be used to modify the running kernel.
-+ Unfortunately, some programs need this access to operate properly,
-+ the most notable of which are XFree86 and hwclock. hwclock can be
-+ remedied by having RTC support in the kernel, so real-time
-+ clock support is enabled if this option is enabled, to ensure
-+ that hwclock operates correctly. XFree86 still will not
-+ operate correctly with this option enabled, so DO NOT CHOOSE Y
-+ IF YOU USE XFree86. If you use XFree86 and you still want to
-+ protect your kernel against modification, use the RBAC system.
-+
-+config GRKERNSEC_PROC_MEMMAP
-+ bool "Remove addresses from /proc/<pid>/[smaps|maps|stat]"
-+ default y if (PAX_NOEXEC || PAX_ASLR)
-+ depends on PAX_NOEXEC || PAX_ASLR
-+ help
-+ If you say Y here, the /proc/<pid>/maps and /proc/<pid>/stat files will
-+ give no information about the addresses of its mappings if
-+ PaX features that rely on random addresses are enabled on the task.
-+ If you use PaX it is greatly recommended that you say Y here as it
-+ closes up a hole that makes the full ASLR useless for suid
-+ binaries.
-+
-+config GRKERNSEC_BRUTE
-+ bool "Deter exploit bruteforcing"
-+ help
-+ If you say Y here, attempts to bruteforce exploits against forking
-+ daemons such as apache or sshd, as well as against suid/sgid binaries
-+ will be deterred. When a child of a forking daemon is killed by PaX
-+ or crashes due to an illegal instruction or other suspicious signal,
-+ the parent process will be delayed 30 seconds upon every subsequent
-+ fork until the administrator is able to assess the situation and
-+ restart the daemon.
-+ In the suid/sgid case, the attempt is logged, the user has all their
-+ processes terminated, and they are prevented from executing any further
-+ processes for 15 minutes.
-+ It is recommended that you also enable signal logging in the auditing
-+ section so that logs are generated when a process triggers a suspicious
-+ signal.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "deter_bruteforce" is created.
-+
-+config GRKERNSEC_MODHARDEN
-+ bool "Harden module auto-loading"
-+ depends on MODULES
-+ help
-+ If you say Y here, module auto-loading in response to use of some
-+ feature implemented by an unloaded module will be restricted to
-+ root users. Enabling this option helps defend against attacks
-+ by unprivileged users who abuse the auto-loading behavior to
-+ cause a vulnerable module to load that is then exploited.
-+
-+ If this option prevents a legitimate use of auto-loading for a
-+ non-root user, the administrator can execute modprobe manually
-+ with the exact name of the module mentioned in the alert log.
-+ Alternatively, the administrator can add the module to the list
-+ of modules loaded at boot by modifying init scripts.
-+
-+ Modification of init scripts will most likely be needed on
-+ Ubuntu servers with encrypted home directory support enabled,
-+ as the first non-root user logging in will cause the ecb(aes),
-+ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded.
-+
-+config GRKERNSEC_HIDESYM
-+ bool "Hide kernel symbols"
-+ help
-+ If you say Y here, getting information on loaded modules, and
-+ displaying all kernel symbols through a syscall will be restricted
-+ to users with CAP_SYS_MODULE. For software compatibility reasons,
-+ /proc/kallsyms will be restricted to the root user. The RBAC
-+ system can hide that entry even from root.
-+
-+ This option also prevents leaking of kernel addresses through
-+ several /proc entries.
-+
-+ Note that this option is only effective provided the following
-+ conditions are met:
-+ 1) The kernel using grsecurity is not precompiled by some distribution
-+ 2) You have also enabled GRKERNSEC_DMESG
-+ 3) You are using the RBAC system and hiding other files such as your
-+ kernel image and System.map. Alternatively, enabling this option
-+ causes the permissions on /boot, /lib/modules, and the kernel
-+ source directory to change at compile time to prevent
-+ reading by non-root users.
-+ If the above conditions are met, this option will aid in providing a
-+ useful protection against local kernel exploitation of overflows
-+ and arbitrary read/write vulnerabilities.
-+
-+config GRKERNSEC_KERN_LOCKOUT
-+ bool "Active kernel exploit response"
-+ depends on X86 || ARM || PPC || SPARC
-+ help
-+ If you say Y here, when a PaX alert is triggered due to suspicious
-+ activity in the kernel (from KERNEXEC/UDEREF/USERCOPY)
-+ or an OOPs occurs due to bad memory accesses, instead of just
-+ terminating the offending process (and potentially allowing
-+ a subsequent exploit from the same user), we will take one of two
-+ actions:
-+ If the user was root, we will panic the system
-+ If the user was non-root, we will log the attempt, terminate
-+ all processes owned by the user, then prevent them from creating
-+ any new processes until the system is restarted
-+ This deters repeated kernel exploitation/bruteforcing attempts
-+ and is useful for later forensics.
-+
-+endmenu
-+menu "Role Based Access Control Options"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_RBAC_DEBUG
-+ bool
-+
-+config GRKERNSEC_NO_RBAC
-+ bool "Disable RBAC system"
-+ help
-+ If you say Y here, the /dev/grsec device will be removed from the kernel,
-+ preventing the RBAC system from being enabled. You should only say Y
-+ here if you have no intention of using the RBAC system, so as to prevent
-+ an attacker with root access from misusing the RBAC system to hide files
-+ and processes when loadable module support and /dev/[k]mem have been
-+ locked down.
-+
-+config GRKERNSEC_ACL_HIDEKERN
-+ bool "Hide kernel processes"
-+ help
-+ If you say Y here, all kernel threads will be hidden to all
-+ processes but those whose subject has the "view hidden processes"
-+ flag.
-+
-+config GRKERNSEC_ACL_MAXTRIES
-+ int "Maximum tries before password lockout"
-+ default 3
-+ help
-+ This option enforces the maximum number of times a user can attempt
-+ to authorize themselves with the grsecurity RBAC system before being
-+ denied the ability to attempt authorization again for a specified time.
-+ The lower the number, the harder it will be to brute-force a password.
-+
-+config GRKERNSEC_ACL_TIMEOUT
-+ int "Time to wait after max password tries, in seconds"
-+ default 30
-+ help
-+ This option specifies the time the user must wait after attempting to
-+ authorize to the RBAC system with the maximum number of invalid
-+ passwords. The higher the number, the harder it will be to brute-force
-+ a password.
-+
-+endmenu
-+menu "Filesystem Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_PROC
-+ bool "Proc restrictions"
-+ help
-+ If you say Y here, the permissions of the /proc filesystem
-+ will be altered to enhance system security and privacy. You MUST
-+ choose either a user only restriction or a user and group restriction.
-+ Depending upon the option you choose, you can either restrict users to
-+ see only the processes they themselves run, or choose a group that can
-+ view all processes and files normally restricted to root if you choose
-+ the "restrict to user only" option. NOTE: If you're running identd as
-+ a non-root user, you will have to run it as the group you specify here.
-+
-+config GRKERNSEC_PROC_USER
-+ bool "Restrict /proc to user only"
-+ depends on GRKERNSEC_PROC
-+ help
-+ If you say Y here, non-root users will only be able to view their own
-+ processes, and restricts them from viewing network-related information,
-+ and viewing kernel symbol and module information.
-+
-+config GRKERNSEC_PROC_USERGROUP
-+ bool "Allow special group"
-+ depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
-+ help
-+ If you say Y here, you will be able to select a group that will be
-+ able to view all processes and network-related information. If you've
-+ enabled GRKERNSEC_HIDESYM, kernel and symbol information may still
-+ remain hidden. This option is useful if you want to run identd as
-+ a non-root user.
-+
-+config GRKERNSEC_PROC_GID
-+ int "GID for special group"
-+ depends on GRKERNSEC_PROC_USERGROUP
-+ default 1001
-+
-+config GRKERNSEC_PROC_ADD
-+ bool "Additional restrictions"
-+ depends on GRKERNSEC_PROC_USER || GRKERNSEC_PROC_USERGROUP
-+ help
-+ If you say Y here, additional restrictions will be placed on
-+ /proc that keep normal users from viewing device information and
-+ slabinfo information that could be useful for exploits.
-+
-+config GRKERNSEC_LINK
-+ bool "Linking restrictions"
-+ help
-+ If you say Y here, /tmp race exploits will be prevented, since users
-+ will no longer be able to follow symlinks owned by other users in
-+ world-writable +t directories (e.g. /tmp), unless the owner of the
-+ symlink is the owner of the directory. users will also not be
-+ able to hardlink to files they do not own. If the sysctl option is
-+ enabled, a sysctl option with name "linking_restrictions" is created.
-+
-+config GRKERNSEC_FIFO
-+ bool "FIFO restrictions"
-+ help
-+ If you say Y here, users will not be able to write to FIFOs they don't
-+ own in world-writable +t directories (e.g. /tmp), unless the owner of
-+ the FIFO is the same owner of the directory it's held in. If the sysctl
-+ option is enabled, a sysctl option with name "fifo_restrictions" is
-+ created.
-+
-+config GRKERNSEC_SYSFS_RESTRICT
-+ bool "Sysfs/debugfs restriction"
-+ depends on SYSFS
-+ help
-+ If you say Y here, sysfs (the pseudo-filesystem mounted at /sys) and
-+ any filesystem normally mounted under it (e.g. debugfs) will only
-+ be accessible by root. These filesystems generally provide access
-+ to hardware and debug information that isn't appropriate for unprivileged
-+ users of the system. Sysfs and debugfs have also become a large source
-+ of new vulnerabilities, ranging from infoleaks to local compromise.
-+ There has been very little oversight with an eye toward security involved
-+ in adding new exporters of information to these filesystems, so their
-+ use is discouraged.
-+ This option is equivalent to a chmod 0700 of the mount paths.
-+
-+config GRKERNSEC_ROFS
-+ bool "Runtime read-only mount protection"
-+ help
-+ If you say Y here, a sysctl option with name "romount_protect" will
-+ be created. By setting this option to 1 at runtime, filesystems
-+ will be protected in the following ways:
-+ * No new writable mounts will be allowed
-+ * Existing read-only mounts won't be able to be remounted read/write
-+ * Write operations will be denied on all block devices
-+ This option acts independently of grsec_lock: once it is set to 1,
-+ it cannot be turned off. Therefore, please be mindful of the resulting
-+ behavior if this option is enabled in an init script on a read-only
-+ filesystem. This feature is mainly intended for secure embedded systems.
-+
-+config GRKERNSEC_CHROOT
-+ bool "Chroot jail restrictions"
-+ help
-+ If you say Y here, you will be able to choose several options that will
-+ make breaking out of a chrooted jail much more difficult. If you
-+ encounter no software incompatibilities with the following options, it
-+ is recommended that you enable each one.
-+
-+config GRKERNSEC_CHROOT_MOUNT
-+ bool "Deny mounts"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ mount or remount filesystems. If the sysctl option is enabled, a
-+ sysctl option with name "chroot_deny_mount" is created.
-+
-+config GRKERNSEC_CHROOT_DOUBLE
-+ bool "Deny double-chroots"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to chroot
-+ again outside the chroot. This is a widely used method of breaking
-+ out of a chroot jail and should not be allowed. If the sysctl
-+ option is enabled, a sysctl option with name
-+ "chroot_deny_chroot" is created.
-+
-+config GRKERNSEC_CHROOT_PIVOT
-+ bool "Deny pivot_root in chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to use
-+ a function called pivot_root() that was introduced in Linux 2.3.41. It
-+ works similar to chroot in that it changes the root filesystem. This
-+ function could be misused in a chrooted process to attempt to break out
-+ of the chroot, and therefore should not be allowed. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_deny_pivot" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_CHDIR
-+ bool "Enforce chdir(\"/\") on all chroots"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, the current working directory of all newly-chrooted
-+ applications will be set to the the root directory of the chroot.
-+ The man page on chroot(2) states:
-+ Note that this call does not change the current working
-+ directory, so that `.' can be outside the tree rooted at
-+ `/'. In particular, the super-user can escape from a
-+ `chroot jail' by doing `mkdir foo; chroot foo; cd ..'.
-+
-+ It is recommended that you say Y here, since it's not known to break
-+ any software. If the sysctl option is enabled, a sysctl option with
-+ name "chroot_enforce_chdir" is created.
-+
-+config GRKERNSEC_CHROOT_CHMOD
-+ bool "Deny (f)chmod +s"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to chmod
-+ or fchmod files to make them have suid or sgid bits. This protects
-+ against another published method of breaking a chroot. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_deny_chmod" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_FCHDIR
-+ bool "Deny fchdir out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, a well-known method of breaking chroots by fchdir'ing
-+ to a file descriptor of the chrooting process that points to a directory
-+ outside the filesystem will be stopped. If the sysctl option
-+ is enabled, a sysctl option with name "chroot_deny_fchdir" is created.
-+
-+config GRKERNSEC_CHROOT_MKNOD
-+ bool "Deny mknod"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be allowed to
-+ mknod. The problem with using mknod inside a chroot is that it
-+ would allow an attacker to create a device entry that is the same
-+ as one on the physical root of your system, which could range from
-+ anything from the console device to a device for your harddrive (which
-+ they could then use to wipe the drive or steal data). It is recommended
-+ that you say Y here, unless you run into software incompatibilities.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "chroot_deny_mknod" is created.
-+
-+config GRKERNSEC_CHROOT_SHMAT
-+ bool "Deny shmat() out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to attach
-+ to shared memory segments that were created outside of the chroot jail.
-+ It is recommended that you say Y here. If the sysctl option is enabled,
-+ a sysctl option with name "chroot_deny_shmat" is created.
-+
-+config GRKERNSEC_CHROOT_UNIX
-+ bool "Deny access to abstract AF_UNIX sockets out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ connect to abstract (meaning not belonging to a filesystem) Unix
-+ domain sockets that were bound outside of a chroot. It is recommended
-+ that you say Y here. If the sysctl option is enabled, a sysctl option
-+ with name "chroot_deny_unix" is created.
-+
-+config GRKERNSEC_CHROOT_FINDTASK
-+ bool "Protect outside processes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ kill, send signals with fcntl, ptrace, capget, getpgid, setpgid,
-+ getsid, or view any process outside of the chroot. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_findtask" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_NICE
-+ bool "Restrict priority changes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to raise
-+ the priority of processes in the chroot, or alter the priority of
-+ processes outside the chroot. This provides more security than simply
-+ removing CAP_SYS_NICE from the process' capability set. If the
-+ sysctl option is enabled, a sysctl option with name "chroot_restrict_nice"
-+ is created.
-+
-+config GRKERNSEC_CHROOT_SYSCTL
-+ bool "Deny sysctl writes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, an attacker in a chroot will not be able to
-+ write to sysctl entries, either by sysctl(2) or through a /proc
-+ interface. It is strongly recommended that you say Y here. If the
-+ sysctl option is enabled, a sysctl option with name
-+ "chroot_deny_sysctl" is created.
-+
-+config GRKERNSEC_CHROOT_CAPS
-+ bool "Capability restrictions"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, the capabilities on all processes within a
-+ chroot jail will be lowered to stop module insertion, raw i/o,
-+ system and net admin tasks, rebooting the system, modifying immutable
-+ files, modifying IPC owned by another, and changing the system time.
-+ This is left an option because it can break some apps. Disable this
-+ if your chrooted apps are having problems performing those kinds of
-+ tasks. If the sysctl option is enabled, a sysctl option with
-+ name "chroot_caps" is created.
-+
-+endmenu
-+menu "Kernel Auditing"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_AUDIT_GROUP
-+ bool "Single group for auditing"
-+ help
-+ If you say Y here, the exec, chdir, and (un)mount logging features
-+ will only operate on a group you specify. This option is recommended
-+ if you only want to watch certain users instead of having a large
-+ amount of logs from the entire system. If the sysctl option is enabled,
-+ a sysctl option with name "audit_group" is created.
-+
-+config GRKERNSEC_AUDIT_GID
-+ int "GID for auditing"
-+ depends on GRKERNSEC_AUDIT_GROUP
-+ default 1007
-+
-+config GRKERNSEC_EXECLOG
-+ bool "Exec logging"
-+ help
-+ If you say Y here, all execve() calls will be logged (since the
-+ other exec*() calls are frontends to execve(), all execution
-+ will be logged). Useful for shell-servers that like to keep track
-+ of their users. If the sysctl option is enabled, a sysctl option with
-+ name "exec_logging" is created.
-+ WARNING: This option when enabled will produce a LOT of logs, especially
-+ on an active system.
-+
-+config GRKERNSEC_RESLOG
-+ bool "Resource logging"
-+ help
-+ If you say Y here, all attempts to overstep resource limits will
-+ be logged with the resource name, the requested size, and the current
-+ limit. It is highly recommended that you say Y here. If the sysctl
-+ option is enabled, a sysctl option with name "resource_logging" is
-+ created. If the RBAC system is enabled, the sysctl value is ignored.
-+
-+config GRKERNSEC_CHROOT_EXECLOG
-+ bool "Log execs within chroot"
-+ help
-+ If you say Y here, all executions inside a chroot jail will be logged
-+ to syslog. This can cause a large amount of logs if certain
-+ applications (eg. djb's daemontools) are installed on the system, and
-+ is therefore left as an option. If the sysctl option is enabled, a
-+ sysctl option with name "chroot_execlog" is created.
-+
-+config GRKERNSEC_AUDIT_PTRACE
-+ bool "Ptrace logging"
-+ help
-+ If you say Y here, all attempts to attach to a process via ptrace
-+ will be logged. If the sysctl option is enabled, a sysctl option
-+ with name "audit_ptrace" is created.
-+
-+config GRKERNSEC_AUDIT_CHDIR
-+ bool "Chdir logging"
-+ help
-+ If you say Y here, all chdir() calls will be logged. If the sysctl
-+ option is enabled, a sysctl option with name "audit_chdir" is created.
-+
-+config GRKERNSEC_AUDIT_MOUNT
-+ bool "(Un)Mount logging"
-+ help
-+ If you say Y here, all mounts and unmounts will be logged. If the
-+ sysctl option is enabled, a sysctl option with name "audit_mount" is
-+ created.
-+
-+config GRKERNSEC_SIGNAL
-+ bool "Signal logging"
-+ help
-+ If you say Y here, certain important signals will be logged, such as
-+ SIGSEGV, which will as a result inform you of when a error in a program
-+ occurred, which in some cases could mean a possible exploit attempt.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "signal_logging" is created.
-+
-+config GRKERNSEC_FORKFAIL
-+ bool "Fork failure logging"
-+ help
-+ If you say Y here, all failed fork() attempts will be logged.
-+ This could suggest a fork bomb, or someone attempting to overstep
-+ their process limit. If the sysctl option is enabled, a sysctl option
-+ with name "forkfail_logging" is created.
-+
-+config GRKERNSEC_TIME
-+ bool "Time change logging"
-+ help
-+ If you say Y here, any changes of the system clock will be logged.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "timechange_logging" is created.
-+
-+config GRKERNSEC_PROC_IPADDR
-+ bool "/proc/<pid>/ipaddr support"
-+ help
-+ If you say Y here, a new entry will be added to each /proc/<pid>
-+ directory that contains the IP address of the person using the task.
-+ The IP is carried across local TCP and AF_UNIX stream sockets.
-+ This information can be useful for IDS/IPSes to perform remote response
-+ to a local attack. The entry is readable by only the owner of the
-+ process (and root if he has CAP_DAC_OVERRIDE, which can be removed via
-+ the RBAC system), and thus does not create privacy concerns.
-+
-+config GRKERNSEC_RWXMAP_LOG
-+ bool 'Denied RWX mmap/mprotect logging'
-+ depends on PAX_MPROTECT && !PAX_EMUPLT && !PAX_EMUSIGRT
-+ help
-+ If you say Y here, calls to mmap() and mprotect() with explicit
-+ usage of PROT_WRITE and PROT_EXEC together will be logged when
-+ denied by the PAX_MPROTECT feature. If the sysctl option is
-+ enabled, a sysctl option with name "rwxmap_logging" is created.
-+
-+config GRKERNSEC_AUDIT_TEXTREL
-+ bool 'ELF text relocations logging (READ HELP)'
-+ depends on PAX_MPROTECT
-+ help
-+ If you say Y here, text relocations will be logged with the filename
-+ of the offending library or binary. The purpose of the feature is
-+ to help Linux distribution developers get rid of libraries and
-+ binaries that need text relocations which hinder the future progress
-+ of PaX. Only Linux distribution developers should say Y here, and
-+ never on a production machine, as this option creates an information
-+ leak that could aid an attacker in defeating the randomization of
-+ a single memory region. If the sysctl option is enabled, a sysctl
-+ option with name "audit_textrel" is created.
-+
-+endmenu
-+
-+menu "Executable Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_DMESG
-+ bool "Dmesg(8) restriction"
-+ help
-+ If you say Y here, non-root users will not be able to use dmesg(8)
-+ to view up to the last 4kb of messages in the kernel's log buffer.
-+ The kernel's log buffer often contains kernel addresses and other
-+ identifying information useful to an attacker in fingerprinting a
-+ system for a targeted exploit.
-+ If the sysctl option is enabled, a sysctl option with name "dmesg" is
-+ created.
-+
-+config GRKERNSEC_HARDEN_PTRACE
-+ bool "Deter ptrace-based process snooping"
-+ help
-+ If you say Y here, TTY sniffers and other malicious monitoring
-+ programs implemented through ptrace will be defeated. If you
-+ have been using the RBAC system, this option has already been
-+ enabled for several years for all users, with the ability to make
-+ fine-grained exceptions.
-+
-+ This option only affects the ability of non-root users to ptrace
-+ processes that are not a descendent of the ptracing process.
-+ This means that strace ./binary and gdb ./binary will still work,
-+ but attaching to arbitrary processes will not. If the sysctl
-+ option is enabled, a sysctl option with name "harden_ptrace" is
-+ created.
-+
-+config GRKERNSEC_TPE
-+ bool "Trusted Path Execution (TPE)"
-+ help
-+ If you say Y here, you will be able to choose a gid to add to the
-+ supplementary groups of users you want to mark as "untrusted."
-+ These users will not be able to execute any files that are not in
-+ root-owned directories writable only by root. If the sysctl option
-+ is enabled, a sysctl option with name "tpe" is created.
-+
-+config GRKERNSEC_TPE_ALL
-+ bool "Partially restrict all non-root users"
-+ depends on GRKERNSEC_TPE
-+ help
-+ If you say Y here, all non-root users will be covered under
-+ a weaker TPE restriction. This is separate from, and in addition to,
-+ the main TPE options that you have selected elsewhere. Thus, if a
-+ "trusted" GID is chosen, this restriction applies to even that GID.
-+ Under this restriction, all non-root users will only be allowed to
-+ execute files in directories they own that are not group or
-+ world-writable, or in directories owned by root and writable only by
-+ root. If the sysctl option is enabled, a sysctl option with name
-+ "tpe_restrict_all" is created.
-+
-+config GRKERNSEC_TPE_INVERT
-+ bool "Invert GID option"
-+ depends on GRKERNSEC_TPE
-+ help
-+ If you say Y here, the group you specify in the TPE configuration will
-+ decide what group TPE restrictions will be *disabled* for. This
-+ option is useful if you want TPE restrictions to be applied to most
-+ users on the system. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_invert" is created. Unlike other sysctl options, this
-+ entry will default to on for backward-compatibility.
-+
-+config GRKERNSEC_TPE_GID
-+ int "GID for untrusted users"
-+ depends on GRKERNSEC_TPE && !GRKERNSEC_TPE_INVERT
-+ default 1005
-+ help
-+ Setting this GID determines what group TPE restrictions will be
-+ *enabled* for. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_gid" is created.
-+
-+config GRKERNSEC_TPE_GID
-+ int "GID for trusted users"
-+ depends on GRKERNSEC_TPE && GRKERNSEC_TPE_INVERT
-+ default 1005
-+ help
-+ Setting this GID determines what group TPE restrictions will be
-+ *disabled* for. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_gid" is created.
-+
-+endmenu
-+menu "Network Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_RANDNET
-+ bool "Larger entropy pools"
-+ help
-+ If you say Y here, the entropy pools used for many features of Linux
-+ and grsecurity will be doubled in size. Since several grsecurity
-+ features use additional randomness, it is recommended that you say Y
-+ here. Saying Y here has a similar effect as modifying
-+ /proc/sys/kernel/random/poolsize.
-+
-+config GRKERNSEC_BLACKHOLE
-+ bool "TCP/UDP blackhole and LAST_ACK DoS prevention"
-+ depends on NET
-+ help
-+ If you say Y here, neither TCP resets nor ICMP
-+ destination-unreachable packets will be sent in response to packets
-+ sent to ports for which no associated listening process exists.
-+ This feature supports both IPV4 and IPV6 and exempts the
-+ loopback interface from blackholing. Enabling this feature
-+ makes a host more resilient to DoS attacks and reduces network
-+ visibility against scanners.
-+
-+ The blackhole feature as-implemented is equivalent to the FreeBSD
-+ blackhole feature, as it prevents RST responses to all packets, not
-+ just SYNs. Under most application behavior this causes no
-+ problems, but applications (like haproxy) may not close certain
-+ connections in a way that cleanly terminates them on the remote
-+ end, leaving the remote host in LAST_ACK state. Because of this
-+ side-effect and to prevent intentional LAST_ACK DoSes, this
-+ feature also adds automatic mitigation against such attacks.
-+ The mitigation drastically reduces the amount of time a socket
-+ can spend in LAST_ACK state. If you're using haproxy and not
-+ all servers it connects to have this option enabled, consider
-+ disabling this feature on the haproxy host.
-+
-+ If the sysctl option is enabled, two sysctl options with names
-+ "ip_blackhole" and "lastack_retries" will be created.
-+ While "ip_blackhole" takes the standard zero/non-zero on/off
-+ toggle, "lastack_retries" uses the same kinds of values as
-+ "tcp_retries1" and "tcp_retries2". The default value of 4
-+ prevents a socket from lasting more than 45 seconds in LAST_ACK
-+ state.
-+
-+config GRKERNSEC_SOCKET
-+ bool "Socket restrictions"
-+ depends on NET
-+ help
-+ If you say Y here, you will be able to choose from several options.
-+ If you assign a GID on your system and add it to the supplementary
-+ groups of users you want to restrict socket access to, this patch
-+ will perform up to three things, based on the option(s) you choose.
-+
-+config GRKERNSEC_SOCKET_ALL
-+ bool "Deny any sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to connect to other hosts from your machine or run server
-+ applications from your machine. If the sysctl option is enabled, a
-+ sysctl option with name "socket_all" is created.
-+
-+config GRKERNSEC_SOCKET_ALL_GID
-+ int "GID to deny all sockets for"
-+ depends on GRKERNSEC_SOCKET_ALL
-+ default 1004
-+ help
-+ Here you can choose the GID to disable socket access for. Remember to
-+ add the users you want socket access disabled for to the GID
-+ specified here. If the sysctl option is enabled, a sysctl option
-+ with name "socket_all_gid" is created.
-+
-+config GRKERNSEC_SOCKET_CLIENT
-+ bool "Deny client sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to connect to other hosts from your machine, but will be
-+ able to run servers. If this option is enabled, all users in the group
-+ you specify will have to use passive mode when initiating ftp transfers
-+ from the shell on your machine. If the sysctl option is enabled, a
-+ sysctl option with name "socket_client" is created.
-+
-+config GRKERNSEC_SOCKET_CLIENT_GID
-+ int "GID to deny client sockets for"
-+ depends on GRKERNSEC_SOCKET_CLIENT
-+ default 1003
-+ help
-+ Here you can choose the GID to disable client socket access for.
-+ Remember to add the users you want client socket access disabled for to
-+ the GID specified here. If the sysctl option is enabled, a sysctl
-+ option with name "socket_client_gid" is created.
-+
-+config GRKERNSEC_SOCKET_SERVER
-+ bool "Deny server sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to run server applications from your machine. If the sysctl
-+ option is enabled, a sysctl option with name "socket_server" is created.
-+
-+config GRKERNSEC_SOCKET_SERVER_GID
-+ int "GID to deny server sockets for"
-+ depends on GRKERNSEC_SOCKET_SERVER
-+ default 1002
-+ help
-+ Here you can choose the GID to disable server socket access for.
-+ Remember to add the users you want server socket access disabled for to
-+ the GID specified here. If the sysctl option is enabled, a sysctl
-+ option with name "socket_server_gid" is created.
-+
-+endmenu
-+menu "Sysctl support"
-+depends on GRKERNSEC && SYSCTL
-+
-+config GRKERNSEC_SYSCTL
-+ bool "Sysctl support"
-+ help
-+ If you say Y here, you will be able to change the options that
-+ grsecurity runs with at bootup, without having to recompile your
-+ kernel. You can echo values to files in /proc/sys/kernel/grsecurity
-+ to enable (1) or disable (0) various features. All the sysctl entries
-+ are mutable until the "grsec_lock" entry is set to a non-zero value.
-+ All features enabled in the kernel configuration are disabled at boot
-+ if you do not say Y to the "Turn on features by default" option.
-+ All options should be set at startup, and the grsec_lock entry should
-+ be set to a non-zero value after all the options are set.
-+ *THIS IS EXTREMELY IMPORTANT*
-+
-+config GRKERNSEC_SYSCTL_DISTRO
-+ bool "Extra sysctl support for distro makers (READ HELP)"
-+ depends on GRKERNSEC_SYSCTL && GRKERNSEC_IO
-+ help
-+ If you say Y here, additional sysctl options will be created
-+ for features that affect processes running as root. Therefore,
-+ it is critical when using this option that the grsec_lock entry be
-+ enabled after boot. Only distros with prebuilt kernel packages
-+ with this option enabled that can ensure grsec_lock is enabled
-+ after boot should use this option.
-+ *Failure to set grsec_lock after boot makes all grsec features
-+ this option covers useless*
-+
-+ Currently this option creates the following sysctl entries:
-+ "Disable Privileged I/O": "disable_priv_io"
-+
-+config GRKERNSEC_SYSCTL_ON
-+ bool "Turn on features by default"
-+ depends on GRKERNSEC_SYSCTL
-+ help
-+ If you say Y here, instead of having all features enabled in the
-+ kernel configuration disabled at boot time, the features will be
-+ enabled at boot time. It is recommended you say Y here unless
-+ there is some reason you would want all sysctl-tunable features to
-+ be disabled by default. As mentioned elsewhere, it is important
-+ to enable the grsec_lock entry once you have finished modifying
-+ the sysctl entries.
-+
-+endmenu
-+menu "Logging Options"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_FLOODTIME
-+ int "Seconds in between log messages (minimum)"
-+ default 10
-+ help
-+ This option allows you to enforce the number of seconds between
-+ grsecurity log messages. The default should be suitable for most
-+ people, however, if you choose to change it, choose a value small enough
-+ to allow informative logs to be produced, but large enough to
-+ prevent flooding.
-+
-+config GRKERNSEC_FLOODBURST
-+ int "Number of messages in a burst (maximum)"
-+ default 6
-+ help
-+ This option allows you to choose the maximum number of messages allowed
-+ within the flood time interval you chose in a separate option. The
-+ default should be suitable for most people, however if you find that
-+ many of your logs are being interpreted as flooding, you may want to
-+ raise this value.
-+
-+endmenu
-+
-+endmenu
-diff -urNp linux-2.6.32.49/grsecurity/Makefile linux-2.6.32.49/grsecurity/Makefile
---- linux-2.6.32.49/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/grsecurity/Makefile 2011-11-15 19:59:43.000000000 -0500
-@@ -0,0 +1,36 @@
-+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
-+# during 2001-2009 it has been completely redesigned by Brad Spengler
-+# into an RBAC system
-+#
-+# All code in this directory and various hooks inserted throughout the kernel
-+# are copyright Brad Spengler - Open Source Security, Inc., and released
-+# under the GPL v2 or higher
-+
-+obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
-+ grsec_mount.o grsec_sig.o grsec_sysctl.o \
-+ grsec_time.o grsec_tpe.o grsec_link.o grsec_pax.o grsec_ptrace.o
-+
-+obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_segv.o \
-+ gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
-+ gracl_learn.o grsec_log.o
-+obj-$(CONFIG_GRKERNSEC_RESLOG) += gracl_res.o
-+
-+ifdef CONFIG_NET
-+obj-y += grsec_sock.o
-+obj-$(CONFIG_GRKERNSEC) += gracl_ip.o
-+endif
-+
-+ifndef CONFIG_GRKERNSEC
-+obj-y += grsec_disabled.o
-+endif
-+
-+ifdef CONFIG_GRKERNSEC_HIDESYM
-+extra-y := grsec_hidesym.o
-+$(obj)/grsec_hidesym.o:
-+ @-chmod -f 500 /boot
-+ @-chmod -f 500 /lib/modules
-+ @-chmod -f 500 /lib64/modules
-+ @-chmod -f 500 /lib32/modules
-+ @-chmod -f 700 .
-+ @echo ' grsec: protected kernel image paths'
-+endif
-diff -urNp linux-2.6.32.49/include/acpi/acpi_bus.h linux-2.6.32.49/include/acpi/acpi_bus.h
---- linux-2.6.32.49/include/acpi/acpi_bus.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/acpi/acpi_bus.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
+index 3cd9ccd..fe16d47 100644
+--- a/include/acpi/acpi_bus.h
++++ b/include/acpi/acpi_bus.h
@@ -107,7 +107,7 @@ struct acpi_device_ops {
acpi_op_bind bind;
acpi_op_unbind unbind;
@@ -62089,10 +64178,11 @@ diff -urNp linux-2.6.32.49/include/acpi/acpi_bus.h linux-2.6.32.49/include/acpi/
#define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */
-diff -urNp linux-2.6.32.49/include/acpi/acpi_drivers.h linux-2.6.32.49/include/acpi/acpi_drivers.h
---- linux-2.6.32.49/include/acpi/acpi_drivers.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/acpi/acpi_drivers.h 2011-11-15 19:59:43.000000000 -0500
-@@ -119,8 +119,8 @@ int acpi_processor_set_thermal_limit(acp
+diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
+index f4906f6..71feb73 100644
+--- a/include/acpi/acpi_drivers.h
++++ b/include/acpi/acpi_drivers.h
+@@ -119,8 +119,8 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
Dock Station
-------------------------------------------------------------------------- */
struct acpi_dock_ops {
@@ -62103,7 +64193,7 @@ diff -urNp linux-2.6.32.49/include/acpi/acpi_drivers.h linux-2.6.32.49/include/a
};
#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
-@@ -128,7 +128,7 @@ extern int is_dock_device(acpi_handle ha
+@@ -128,7 +128,7 @@ extern int is_dock_device(acpi_handle handle);
extern int register_dock_notifier(struct notifier_block *nb);
extern void unregister_dock_notifier(struct notifier_block *nb);
extern int register_hotplug_dock_device(acpi_handle handle,
@@ -62112,7 +64202,7 @@ diff -urNp linux-2.6.32.49/include/acpi/acpi_drivers.h linux-2.6.32.49/include/a
void *context);
extern void unregister_hotplug_dock_device(acpi_handle handle);
#else
-@@ -144,7 +144,7 @@ static inline void unregister_dock_notif
+@@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
static inline int register_hotplug_dock_device(acpi_handle handle,
@@ -62121,9 +64211,10 @@ diff -urNp linux-2.6.32.49/include/acpi/acpi_drivers.h linux-2.6.32.49/include/a
void *context)
{
return -ENODEV;
-diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/include/asm-generic/atomic-long.h
---- linux-2.6.32.49/include/asm-generic/atomic-long.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/atomic-long.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
+index b7babf0..a9ac9fc 100644
+--- a/include/asm-generic/atomic-long.h
++++ b/include/asm-generic/atomic-long.h
@@ -22,6 +22,12 @@
typedef atomic64_t atomic_long_t;
@@ -62137,7 +64228,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
#define ATOMIC_LONG_INIT(i) ATOMIC64_INIT(i)
static inline long atomic_long_read(atomic_long_t *l)
-@@ -31,6 +37,15 @@ static inline long atomic_long_read(atom
+@@ -31,6 +37,15 @@ static inline long atomic_long_read(atomic_long_t *l)
return (long)atomic64_read(v);
}
@@ -62153,7 +64244,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_set(atomic_long_t *l, long i)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -38,6 +53,15 @@ static inline void atomic_long_set(atomi
+@@ -38,6 +53,15 @@ static inline void atomic_long_set(atomic_long_t *l, long i)
atomic64_set(v, i);
}
@@ -62169,7 +64260,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_inc(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -45,6 +69,15 @@ static inline void atomic_long_inc(atomi
+@@ -45,6 +69,15 @@ static inline void atomic_long_inc(atomic_long_t *l)
atomic64_inc(v);
}
@@ -62185,7 +64276,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_dec(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -52,6 +85,15 @@ static inline void atomic_long_dec(atomi
+@@ -52,6 +85,15 @@ static inline void atomic_long_dec(atomic_long_t *l)
atomic64_dec(v);
}
@@ -62201,7 +64292,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_add(long i, atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -59,6 +101,15 @@ static inline void atomic_long_add(long
+@@ -59,6 +101,15 @@ static inline void atomic_long_add(long i, atomic_long_t *l)
atomic64_add(i, v);
}
@@ -62217,7 +64308,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_sub(long i, atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -115,6 +166,15 @@ static inline long atomic_long_inc_retur
+@@ -115,6 +166,15 @@ static inline long atomic_long_inc_return(atomic_long_t *l)
return (long)atomic64_inc_return(v);
}
@@ -62233,7 +64324,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline long atomic_long_dec_return(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -140,6 +200,12 @@ static inline long atomic_long_add_unles
+@@ -140,6 +200,12 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
typedef atomic_t atomic_long_t;
@@ -62246,7 +64337,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
#define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i)
static inline long atomic_long_read(atomic_long_t *l)
{
-@@ -148,6 +214,15 @@ static inline long atomic_long_read(atom
+@@ -148,6 +214,15 @@ static inline long atomic_long_read(atomic_long_t *l)
return (long)atomic_read(v);
}
@@ -62262,7 +64353,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_set(atomic_long_t *l, long i)
{
atomic_t *v = (atomic_t *)l;
-@@ -155,6 +230,15 @@ static inline void atomic_long_set(atomi
+@@ -155,6 +230,15 @@ static inline void atomic_long_set(atomic_long_t *l, long i)
atomic_set(v, i);
}
@@ -62278,7 +64369,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_inc(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -162,6 +246,15 @@ static inline void atomic_long_inc(atomi
+@@ -162,6 +246,15 @@ static inline void atomic_long_inc(atomic_long_t *l)
atomic_inc(v);
}
@@ -62294,7 +64385,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_dec(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -169,6 +262,15 @@ static inline void atomic_long_dec(atomi
+@@ -169,6 +262,15 @@ static inline void atomic_long_dec(atomic_long_t *l)
atomic_dec(v);
}
@@ -62310,7 +64401,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_add(long i, atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -176,6 +278,15 @@ static inline void atomic_long_add(long
+@@ -176,6 +278,15 @@ static inline void atomic_long_add(long i, atomic_long_t *l)
atomic_add(i, v);
}
@@ -62326,7 +64417,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline void atomic_long_sub(long i, atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -232,6 +343,15 @@ static inline long atomic_long_inc_retur
+@@ -232,6 +343,15 @@ static inline long atomic_long_inc_return(atomic_long_t *l)
return (long)atomic_inc_return(v);
}
@@ -62342,7 +64433,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
static inline long atomic_long_dec_return(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -255,4 +375,47 @@ static inline long atomic_long_add_unles
+@@ -255,4 +375,47 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
#endif /* BITS_PER_LONG == 64 */
@@ -62390,10 +64481,11 @@ diff -urNp linux-2.6.32.49/include/asm-generic/atomic-long.h linux-2.6.32.49/inc
+#endif
+
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */
-diff -urNp linux-2.6.32.49/include/asm-generic/bug.h linux-2.6.32.49/include/asm-generic/bug.h
---- linux-2.6.32.49/include/asm-generic/bug.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/bug.h 2011-11-15 19:59:43.000000000 -0500
-@@ -105,11 +105,11 @@ extern void warn_slowpath_null(const cha
+diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
+index d48ddf0..656a0ac 100644
+--- a/include/asm-generic/bug.h
++++ b/include/asm-generic/bug.h
+@@ -105,11 +105,11 @@ extern void warn_slowpath_null(const char *file, const int line);
#else /* !CONFIG_BUG */
#ifndef HAVE_ARCH_BUG
@@ -62407,9 +64499,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/bug.h linux-2.6.32.49/include/asm
#endif
#ifndef HAVE_ARCH_WARN_ON
-diff -urNp linux-2.6.32.49/include/asm-generic/cache.h linux-2.6.32.49/include/asm-generic/cache.h
---- linux-2.6.32.49/include/asm-generic/cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/cache.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/cache.h b/include/asm-generic/cache.h
+index 1bfcfe5..e04c5c9 100644
+--- a/include/asm-generic/cache.h
++++ b/include/asm-generic/cache.h
@@ -6,7 +6,7 @@
* cache lines need to provide their own cache.h.
*/
@@ -62420,10 +64513,11 @@ diff -urNp linux-2.6.32.49/include/asm-generic/cache.h linux-2.6.32.49/include/a
+#define L1_CACHE_BYTES (1UL << L1_CACHE_SHIFT)
#endif /* __ASM_GENERIC_CACHE_H */
-diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32.49/include/asm-generic/dma-mapping-common.h
---- linux-2.6.32.49/include/asm-generic/dma-mapping-common.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/dma-mapping-common.h 2011-11-15 19:59:43.000000000 -0500
-@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_
+diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
+index 6920695..41038bc 100644
+--- a/include/asm-generic/dma-mapping-common.h
++++ b/include/asm-generic/dma-mapping-common.h
+@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
enum dma_data_direction dir,
struct dma_attrs *attrs)
{
@@ -62432,7 +64526,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
dma_addr_t addr;
kmemcheck_mark_initialized(ptr, size);
-@@ -30,7 +30,7 @@ static inline void dma_unmap_single_attr
+@@ -30,7 +30,7 @@ static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr,
enum dma_data_direction dir,
struct dma_attrs *attrs)
{
@@ -62441,7 +64535,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->unmap_page)
-@@ -42,7 +42,7 @@ static inline int dma_map_sg_attrs(struc
+@@ -42,7 +42,7 @@ static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
@@ -62450,7 +64544,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
int i, ents;
struct scatterlist *s;
-@@ -59,7 +59,7 @@ static inline void dma_unmap_sg_attrs(st
+@@ -59,7 +59,7 @@ static inline void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
@@ -62459,7 +64553,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
debug_dma_unmap_sg(dev, sg, nents, dir);
-@@ -71,7 +71,7 @@ static inline dma_addr_t dma_map_page(st
+@@ -71,7 +71,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
size_t offset, size_t size,
enum dma_data_direction dir)
{
@@ -62468,7 +64562,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
dma_addr_t addr;
kmemcheck_mark_initialized(page_address(page) + offset, size);
-@@ -85,7 +85,7 @@ static inline dma_addr_t dma_map_page(st
+@@ -85,7 +85,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
size_t size, enum dma_data_direction dir)
{
@@ -62477,7 +64571,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->unmap_page)
-@@ -97,7 +97,7 @@ static inline void dma_sync_single_for_c
+@@ -97,7 +97,7 @@ static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
size_t size,
enum dma_data_direction dir)
{
@@ -62486,7 +64580,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_single_for_cpu)
-@@ -109,7 +109,7 @@ static inline void dma_sync_single_for_d
+@@ -109,7 +109,7 @@ static inline void dma_sync_single_for_device(struct device *dev,
dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
@@ -62495,7 +64589,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_single_for_device)
-@@ -123,7 +123,7 @@ static inline void dma_sync_single_range
+@@ -123,7 +123,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
size_t size,
enum dma_data_direction dir)
{
@@ -62504,7 +64598,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_single_range_for_cpu) {
-@@ -140,7 +140,7 @@ static inline void dma_sync_single_range
+@@ -140,7 +140,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
size_t size,
enum dma_data_direction dir)
{
@@ -62531,9 +64625,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/dma-mapping-common.h linux-2.6.32
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_sg_for_device)
-diff -urNp linux-2.6.32.49/include/asm-generic/emergency-restart.h linux-2.6.32.49/include/asm-generic/emergency-restart.h
---- linux-2.6.32.49/include/asm-generic/emergency-restart.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/emergency-restart.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/emergency-restart.h b/include/asm-generic/emergency-restart.h
+index 0d68a1e..b74a761 100644
+--- a/include/asm-generic/emergency-restart.h
++++ b/include/asm-generic/emergency-restart.h
@@ -1,7 +1,7 @@
#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
#define _ASM_GENERIC_EMERGENCY_RESTART_H
@@ -62543,9 +64638,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/emergency-restart.h linux-2.6.32.
{
machine_restart(NULL);
}
-diff -urNp linux-2.6.32.49/include/asm-generic/futex.h linux-2.6.32.49/include/asm-generic/futex.h
---- linux-2.6.32.49/include/asm-generic/futex.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/futex.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h
+index 3c2344f..4590a7d 100644
+--- a/include/asm-generic/futex.h
++++ b/include/asm-generic/futex.h
@@ -6,7 +6,7 @@
#include <asm/errno.h>
@@ -62555,7 +64651,7 @@ diff -urNp linux-2.6.32.49/include/asm-generic/futex.h linux-2.6.32.49/include/a
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
-@@ -48,7 +48,7 @@ futex_atomic_op_inuser (int encoded_op,
+@@ -48,7 +48,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
}
static inline int
@@ -62564,9 +64660,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/futex.h linux-2.6.32.49/include/a
{
return -ENOSYS;
}
-diff -urNp linux-2.6.32.49/include/asm-generic/int-l64.h linux-2.6.32.49/include/asm-generic/int-l64.h
---- linux-2.6.32.49/include/asm-generic/int-l64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/int-l64.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h
+index 1ca3efc..e3dc852 100644
+--- a/include/asm-generic/int-l64.h
++++ b/include/asm-generic/int-l64.h
@@ -46,6 +46,8 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
@@ -62576,9 +64673,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/int-l64.h linux-2.6.32.49/include
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.32.49/include/asm-generic/int-ll64.h linux-2.6.32.49/include/asm-generic/int-ll64.h
---- linux-2.6.32.49/include/asm-generic/int-ll64.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/int-ll64.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
+index f394147..b6152b9 100644
+--- a/include/asm-generic/int-ll64.h
++++ b/include/asm-generic/int-ll64.h
@@ -51,6 +51,8 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
@@ -62588,9 +64686,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/int-ll64.h linux-2.6.32.49/includ
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.32.49/include/asm-generic/kmap_types.h linux-2.6.32.49/include/asm-generic/kmap_types.h
---- linux-2.6.32.49/include/asm-generic/kmap_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/kmap_types.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h
+index e5f234a..cdb16b3 100644
+--- a/include/asm-generic/kmap_types.h
++++ b/include/asm-generic/kmap_types.h
@@ -28,7 +28,8 @@ KMAP_D(15) KM_UML_USERCOPY,
KMAP_D(16) KM_IRQ_PTE,
KMAP_D(17) KM_NMI,
@@ -62601,27 +64700,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/kmap_types.h linux-2.6.32.49/incl
};
#undef KMAP_D
-diff -urNp linux-2.6.32.49/include/asm-generic/pgtable.h linux-2.6.32.49/include/asm-generic/pgtable.h
---- linux-2.6.32.49/include/asm-generic/pgtable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/pgtable.h 2011-11-15 19:59:43.000000000 -0500
-@@ -344,6 +344,14 @@ extern void untrack_pfn_vma(struct vm_ar
- unsigned long size);
- #endif
-
-+#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
-+static inline unsigned long pax_open_kernel(void) { return 0; }
-+#endif
-+
-+#ifndef __HAVE_ARCH_PAX_CLOSE_KERNEL
-+static inline unsigned long pax_close_kernel(void) { return 0; }
-+#endif
-+
- #endif /* !__ASSEMBLY__ */
-
- #endif /* _ASM_GENERIC_PGTABLE_H */
-diff -urNp linux-2.6.32.49/include/asm-generic/pgtable-nopmd.h linux-2.6.32.49/include/asm-generic/pgtable-nopmd.h
---- linux-2.6.32.49/include/asm-generic/pgtable-nopmd.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/pgtable-nopmd.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
+index 725612b..9cc513a 100644
+--- a/include/asm-generic/pgtable-nopmd.h
++++ b/include/asm-generic/pgtable-nopmd.h
@@ -1,14 +1,19 @@
#ifndef _PGTABLE_NOPMD_H
#define _PGTABLE_NOPMD_H
@@ -62658,9 +64740,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/pgtable-nopmd.h linux-2.6.32.49/i
/*
* The "pud_xxx()" functions here are trivial for a folded two-level
* setup: the pmd is never bad, and a pmd always exists (as it's folded
-diff -urNp linux-2.6.32.49/include/asm-generic/pgtable-nopud.h linux-2.6.32.49/include/asm-generic/pgtable-nopud.h
---- linux-2.6.32.49/include/asm-generic/pgtable-nopud.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/pgtable-nopud.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
+index 810431d..ccc3638 100644
+--- a/include/asm-generic/pgtable-nopud.h
++++ b/include/asm-generic/pgtable-nopud.h
@@ -1,10 +1,15 @@
#ifndef _PGTABLE_NOPUD_H
#define _PGTABLE_NOPUD_H
@@ -62691,9 +64774,29 @@ diff -urNp linux-2.6.32.49/include/asm-generic/pgtable-nopud.h linux-2.6.32.49/i
/*
* The "pgd_xxx()" functions here are trivial for a folded two-level
* setup: the pud is never bad, and a pud always exists (as it's folded
-diff -urNp linux-2.6.32.49/include/asm-generic/vmlinux.lds.h linux-2.6.32.49/include/asm-generic/vmlinux.lds.h
---- linux-2.6.32.49/include/asm-generic/vmlinux.lds.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/asm-generic/vmlinux.lds.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
+index e2bd73e..fea8ed3 100644
+--- a/include/asm-generic/pgtable.h
++++ b/include/asm-generic/pgtable.h
+@@ -344,6 +344,14 @@ extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
+ unsigned long size);
+ #endif
+
++#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
++static inline unsigned long pax_open_kernel(void) { return 0; }
++#endif
++
++#ifndef __HAVE_ARCH_PAX_CLOSE_KERNEL
++static inline unsigned long pax_close_kernel(void) { return 0; }
++#endif
++
+ #endif /* !__ASSEMBLY__ */
+
+ #endif /* _ASM_GENERIC_PGTABLE_H */
+diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
+index b6e818f..21aa58a 100644
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
@@ -199,6 +199,7 @@
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
@@ -62732,30 +64835,10 @@ diff -urNp linux-2.6.32.49/include/asm-generic/vmlinux.lds.h linux-2.6.32.49/inc
/**
* PERCPU - define output section for percpu area, simple version
-diff -urNp linux-2.6.32.49/include/drm/drm_crtc_helper.h linux-2.6.32.49/include/drm/drm_crtc_helper.h
---- linux-2.6.32.49/include/drm/drm_crtc_helper.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/drm/drm_crtc_helper.h 2011-11-15 19:59:43.000000000 -0500
-@@ -64,7 +64,7 @@ struct drm_crtc_helper_funcs {
-
- /* reload the current crtc LUT */
- void (*load_lut)(struct drm_crtc *crtc);
--};
-+} __no_const;
-
- struct drm_encoder_helper_funcs {
- void (*dpms)(struct drm_encoder *encoder, int mode);
-@@ -85,7 +85,7 @@ struct drm_encoder_helper_funcs {
- struct drm_connector *connector);
- /* disable encoder when not in use - more explicit than dpms off */
- void (*disable)(struct drm_encoder *encoder);
--};
-+} __no_const;
-
- struct drm_connector_helper_funcs {
- int (*get_modes)(struct drm_connector *connector);
-diff -urNp linux-2.6.32.49/include/drm/drmP.h linux-2.6.32.49/include/drm/drmP.h
---- linux-2.6.32.49/include/drm/drmP.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/drm/drmP.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/drm/drmP.h b/include/drm/drmP.h
+index 66713c6..98c0460 100644
+--- a/include/drm/drmP.h
++++ b/include/drm/drmP.h
@@ -71,6 +71,7 @@
#include <linux/workqueue.h>
#include <linux/poll.h>
@@ -62815,9 +64898,32 @@ diff -urNp linux-2.6.32.49/include/drm/drmP.h linux-2.6.32.49/include/drm/drmP.h
uint32_t gtt_total;
uint32_t invalidate_domains; /* domains pending invalidation */
uint32_t flush_domains; /* domains pending flush */
-diff -urNp linux-2.6.32.49/include/drm/ttm/ttm_memory.h linux-2.6.32.49/include/drm/ttm/ttm_memory.h
---- linux-2.6.32.49/include/drm/ttm/ttm_memory.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/drm/ttm/ttm_memory.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
+index b29e201..3413cc9 100644
+--- a/include/drm/drm_crtc_helper.h
++++ b/include/drm/drm_crtc_helper.h
+@@ -64,7 +64,7 @@ struct drm_crtc_helper_funcs {
+
+ /* reload the current crtc LUT */
+ void (*load_lut)(struct drm_crtc *crtc);
+-};
++} __no_const;
+
+ struct drm_encoder_helper_funcs {
+ void (*dpms)(struct drm_encoder *encoder, int mode);
+@@ -85,7 +85,7 @@ struct drm_encoder_helper_funcs {
+ struct drm_connector *connector);
+ /* disable encoder when not in use - more explicit than dpms off */
+ void (*disable)(struct drm_encoder *encoder);
+-};
++} __no_const;
+
+ struct drm_connector_helper_funcs {
+ int (*get_modes)(struct drm_connector *connector);
+diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
+index b199170..6f9e64c 100644
+--- a/include/drm/ttm/ttm_memory.h
++++ b/include/drm/ttm/ttm_memory.h
@@ -47,7 +47,7 @@
struct ttm_mem_shrink {
@@ -62827,9 +64933,10 @@ diff -urNp linux-2.6.32.49/include/drm/ttm/ttm_memory.h linux-2.6.32.49/include/
/**
* struct ttm_mem_global - Global memory accounting structure.
-diff -urNp linux-2.6.32.49/include/linux/a.out.h linux-2.6.32.49/include/linux/a.out.h
---- linux-2.6.32.49/include/linux/a.out.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/a.out.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/a.out.h b/include/linux/a.out.h
+index e86dfca..40cc55f 100644
+--- a/include/linux/a.out.h
++++ b/include/linux/a.out.h
@@ -39,6 +39,14 @@ enum machine_type {
M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
};
@@ -62845,9 +64952,10 @@ diff -urNp linux-2.6.32.49/include/linux/a.out.h linux-2.6.32.49/include/linux/a
#if !defined (N_MAGIC)
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
#endif
-diff -urNp linux-2.6.32.49/include/linux/atmdev.h linux-2.6.32.49/include/linux/atmdev.h
---- linux-2.6.32.49/include/linux/atmdev.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/atmdev.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
+index 817b237..62c10bc 100644
+--- a/include/linux/atmdev.h
++++ b/include/linux/atmdev.h
@@ -237,7 +237,7 @@ struct compat_atm_iobuf {
#endif
@@ -62857,9 +64965,10 @@ diff -urNp linux-2.6.32.49/include/linux/atmdev.h linux-2.6.32.49/include/linux/
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.32.49/include/linux/backlight.h linux-2.6.32.49/include/linux/backlight.h
---- linux-2.6.32.49/include/linux/backlight.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/backlight.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/backlight.h b/include/linux/backlight.h
+index 0f5f578..8c4f884 100644
+--- a/include/linux/backlight.h
++++ b/include/linux/backlight.h
@@ -36,18 +36,18 @@ struct backlight_device;
struct fb_info;
@@ -62892,7 +65001,7 @@ diff -urNp linux-2.6.32.49/include/linux/backlight.h linux-2.6.32.49/include/lin
/* The framebuffer notifier block */
struct notifier_block fb_notif;
-@@ -103,7 +103,7 @@ static inline void backlight_update_stat
+@@ -103,7 +103,7 @@ static inline void backlight_update_status(struct backlight_device *bd)
}
extern struct backlight_device *backlight_device_register(const char *name,
@@ -62901,9 +65010,10 @@ diff -urNp linux-2.6.32.49/include/linux/backlight.h linux-2.6.32.49/include/lin
extern void backlight_device_unregister(struct backlight_device *bd);
extern void backlight_force_update(struct backlight_device *bd,
enum backlight_update_reason reason);
-diff -urNp linux-2.6.32.49/include/linux/binfmts.h linux-2.6.32.49/include/linux/binfmts.h
---- linux-2.6.32.49/include/linux/binfmts.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/binfmts.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
+index a3d802e..482f69c 100644
+--- a/include/linux/binfmts.h
++++ b/include/linux/binfmts.h
@@ -83,6 +83,7 @@ struct linux_binfmt {
int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
int (*load_shlib)(struct file *);
@@ -62912,9 +65022,10 @@ diff -urNp linux-2.6.32.49/include/linux/binfmts.h linux-2.6.32.49/include/linux
unsigned long min_coredump; /* minimal dump size */
int hasvdso;
};
-diff -urNp linux-2.6.32.49/include/linux/blkdev.h linux-2.6.32.49/include/linux/blkdev.h
---- linux-2.6.32.49/include/linux/blkdev.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/blkdev.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index a06bfab..4fa38bb 100644
+--- a/include/linux/blkdev.h
++++ b/include/linux/blkdev.h
@@ -1278,7 +1278,7 @@ struct block_device_operations {
int (*revalidate_disk) (struct gendisk *);
int (*getgeo)(struct block_device *, struct hd_geometry *);
@@ -62924,9 +65035,10 @@ diff -urNp linux-2.6.32.49/include/linux/blkdev.h linux-2.6.32.49/include/linux/
extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
unsigned long);
-diff -urNp linux-2.6.32.49/include/linux/blktrace_api.h linux-2.6.32.49/include/linux/blktrace_api.h
---- linux-2.6.32.49/include/linux/blktrace_api.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/blktrace_api.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
+index 3b73b99..629d21b 100644
+--- a/include/linux/blktrace_api.h
++++ b/include/linux/blktrace_api.h
@@ -160,7 +160,7 @@ struct blk_trace {
struct dentry *dir;
struct dentry *dropped_file;
@@ -62936,9 +65048,10 @@ diff -urNp linux-2.6.32.49/include/linux/blktrace_api.h linux-2.6.32.49/include/
};
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
-diff -urNp linux-2.6.32.49/include/linux/byteorder/little_endian.h linux-2.6.32.49/include/linux/byteorder/little_endian.h
---- linux-2.6.32.49/include/linux/byteorder/little_endian.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/byteorder/little_endian.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h
+index 83195fb..0b0f77d 100644
+--- a/include/linux/byteorder/little_endian.h
++++ b/include/linux/byteorder/little_endian.h
@@ -42,51 +42,51 @@
static inline __le64 __cpu_to_le64p(const __u64 *p)
@@ -63003,9 +65116,10 @@ diff -urNp linux-2.6.32.49/include/linux/byteorder/little_endian.h linux-2.6.32.
}
#define __cpu_to_le64s(x) do { (void)(x); } while (0)
#define __le64_to_cpus(x) do { (void)(x); } while (0)
-diff -urNp linux-2.6.32.49/include/linux/cache.h linux-2.6.32.49/include/linux/cache.h
---- linux-2.6.32.49/include/linux/cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/cache.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/cache.h b/include/linux/cache.h
+index 97e2488..e7576b9 100644
+--- a/include/linux/cache.h
++++ b/include/linux/cache.h
@@ -16,6 +16,10 @@
#define __read_mostly
#endif
@@ -63017,10 +65131,11 @@ diff -urNp linux-2.6.32.49/include/linux/cache.h linux-2.6.32.49/include/linux/c
#ifndef ____cacheline_aligned
#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
-diff -urNp linux-2.6.32.49/include/linux/capability.h linux-2.6.32.49/include/linux/capability.h
---- linux-2.6.32.49/include/linux/capability.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/capability.h 2011-11-15 19:59:43.000000000 -0500
-@@ -563,6 +563,7 @@ extern const kernel_cap_t __cap_init_eff
+diff --git a/include/linux/capability.h b/include/linux/capability.h
+index c8f2a5f7..1618a5c 100644
+--- a/include/linux/capability.h
++++ b/include/linux/capability.h
+@@ -563,6 +563,7 @@ extern const kernel_cap_t __cap_init_eff_set;
(security_real_capable_noaudit((t), (cap)) == 0)
extern int capable(int cap);
@@ -63028,9 +65143,10 @@ diff -urNp linux-2.6.32.49/include/linux/capability.h linux-2.6.32.49/include/li
/* audit system wants to get cap info from files as well */
struct dentry;
-diff -urNp linux-2.6.32.49/include/linux/compiler-gcc4.h linux-2.6.32.49/include/linux/compiler-gcc4.h
---- linux-2.6.32.49/include/linux/compiler-gcc4.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/compiler-gcc4.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
+index 450fa59..86019fb 100644
+--- a/include/linux/compiler-gcc4.h
++++ b/include/linux/compiler-gcc4.h
@@ -36,4 +36,16 @@
the kernel context */
#define __cold __attribute__((__cold__))
@@ -63048,9 +65164,10 @@ diff -urNp linux-2.6.32.49/include/linux/compiler-gcc4.h linux-2.6.32.49/include
+#endif
+
#endif
-diff -urNp linux-2.6.32.49/include/linux/compiler.h linux-2.6.32.49/include/linux/compiler.h
---- linux-2.6.32.49/include/linux/compiler.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/compiler.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/compiler.h b/include/linux/compiler.h
+index 04fb513..fd6477b 100644
+--- a/include/linux/compiler.h
++++ b/include/linux/compiler.h
@@ -5,11 +5,14 @@
#ifdef __CHECKER__
@@ -63101,7 +65218,7 @@ diff -urNp linux-2.6.32.49/include/linux/compiler.h linux-2.6.32.49/include/linu
# define __chk_user_ptr(x) (void)0
# define __chk_io_ptr(x) (void)0
# define __builtin_warning(x, y...) (1)
-@@ -247,6 +271,14 @@ void ftrace_likely_update(struct ftrace_
+@@ -247,6 +271,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
# define __attribute_const__ /* unimplemented */
#endif
@@ -63116,7 +65233,7 @@ diff -urNp linux-2.6.32.49/include/linux/compiler.h linux-2.6.32.49/include/linu
/*
* Tell gcc if a function is cold. The compiler will assume any path
* directly leading to the call is unlikely.
-@@ -256,6 +288,22 @@ void ftrace_likely_update(struct ftrace_
+@@ -256,6 +288,22 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
#define __cold
#endif
@@ -63139,7 +65256,7 @@ diff -urNp linux-2.6.32.49/include/linux/compiler.h linux-2.6.32.49/include/linu
/* Simple shorthand for a section definition */
#ifndef __section
# define __section(S) __attribute__ ((__section__(#S)))
-@@ -278,6 +326,7 @@ void ftrace_likely_update(struct ftrace_
+@@ -278,6 +326,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
* use is to mediate communication between process-level code and irq/NMI
* handlers, all running on the same CPU.
*/
@@ -63148,9 +65265,10 @@ diff -urNp linux-2.6.32.49/include/linux/compiler.h linux-2.6.32.49/include/linu
+#define ACCESS_ONCE_RW(x) (*(volatile typeof(x) *)&(x))
#endif /* __LINUX_COMPILER_H */
-diff -urNp linux-2.6.32.49/include/linux/crypto.h linux-2.6.32.49/include/linux/crypto.h
---- linux-2.6.32.49/include/linux/crypto.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/crypto.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/crypto.h b/include/linux/crypto.h
+index fd92988..a3164bd 100644
+--- a/include/linux/crypto.h
++++ b/include/linux/crypto.h
@@ -394,7 +394,7 @@ struct cipher_tfm {
const u8 *key, unsigned int keylen);
void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
@@ -63176,9 +65294,10 @@ diff -urNp linux-2.6.32.49/include/linux/crypto.h linux-2.6.32.49/include/linux/
#define crt_ablkcipher crt_u.ablkcipher
#define crt_aead crt_u.aead
-diff -urNp linux-2.6.32.49/include/linux/dcache.h linux-2.6.32.49/include/linux/dcache.h
---- linux-2.6.32.49/include/linux/dcache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/dcache.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/dcache.h b/include/linux/dcache.h
+index 30b93b2..cd7a8db 100644
+--- a/include/linux/dcache.h
++++ b/include/linux/dcache.h
@@ -119,6 +119,8 @@ struct dentry {
unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
};
@@ -63188,9 +65307,10 @@ diff -urNp linux-2.6.32.49/include/linux/dcache.h linux-2.6.32.49/include/linux/
/*
* dentry->d_lock spinlock nesting subclasses:
*
-diff -urNp linux-2.6.32.49/include/linux/decompress/mm.h linux-2.6.32.49/include/linux/decompress/mm.h
---- linux-2.6.32.49/include/linux/decompress/mm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/decompress/mm.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
+index 3e9bd6a..f4e1aa0 100644
+--- a/include/linux/decompress/mm.h
++++ b/include/linux/decompress/mm.h
@@ -78,7 +78,7 @@ static void free(void *where)
* warnings when not needed (indeed large_malloc / large_free are not
* needed by inflate */
@@ -63200,9 +65320,10 @@ diff -urNp linux-2.6.32.49/include/linux/decompress/mm.h linux-2.6.32.49/include
#define free(a) kfree(a)
#define large_malloc(a) vmalloc(a)
-diff -urNp linux-2.6.32.49/include/linux/dma-mapping.h linux-2.6.32.49/include/linux/dma-mapping.h
---- linux-2.6.32.49/include/linux/dma-mapping.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/dma-mapping.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
+index 91b7618..92a93d32 100644
+--- a/include/linux/dma-mapping.h
++++ b/include/linux/dma-mapping.h
@@ -16,51 +16,51 @@ enum dma_data_direction {
};
@@ -63270,9 +65391,10 @@ diff -urNp linux-2.6.32.49/include/linux/dma-mapping.h linux-2.6.32.49/include/l
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
-diff -urNp linux-2.6.32.49/include/linux/dst.h linux-2.6.32.49/include/linux/dst.h
---- linux-2.6.32.49/include/linux/dst.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/dst.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/dst.h b/include/linux/dst.h
+index e26fed8..b976d9f 100644
+--- a/include/linux/dst.h
++++ b/include/linux/dst.h
@@ -380,7 +380,7 @@ struct dst_node
struct thread_pool *pool;
@@ -63282,9 +65404,10 @@ diff -urNp linux-2.6.32.49/include/linux/dst.h linux-2.6.32.49/include/linux/dst
/*
* How frequently and how many times transaction
-diff -urNp linux-2.6.32.49/include/linux/elf.h linux-2.6.32.49/include/linux/elf.h
---- linux-2.6.32.49/include/linux/elf.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/elf.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/elf.h b/include/linux/elf.h
+index 90a4ed0..d652617 100644
+--- a/include/linux/elf.h
++++ b/include/linux/elf.h
@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword;
#define PT_GNU_EH_FRAME 0x6474e550
@@ -63357,31 +65480,11 @@ diff -urNp linux-2.6.32.49/include/linux/elf.h linux-2.6.32.49/include/linux/elf
#endif
-diff -urNp linux-2.6.32.49/include/linux/fscache-cache.h linux-2.6.32.49/include/linux/fscache-cache.h
---- linux-2.6.32.49/include/linux/fscache-cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/fscache-cache.h 2011-11-15 19:59:43.000000000 -0500
-@@ -116,7 +116,7 @@ struct fscache_operation {
- #endif
- };
-
--extern atomic_t fscache_op_debug_id;
-+extern atomic_unchecked_t fscache_op_debug_id;
- extern const struct slow_work_ops fscache_op_slow_work_ops;
-
- extern void fscache_enqueue_operation(struct fscache_operation *);
-@@ -134,7 +134,7 @@ static inline void fscache_operation_ini
- fscache_operation_release_t release)
- {
- atomic_set(&op->usage, 1);
-- op->debug_id = atomic_inc_return(&fscache_op_debug_id);
-+ op->debug_id = atomic_inc_return_unchecked(&fscache_op_debug_id);
- op->release = release;
- INIT_LIST_HEAD(&op->pend_link);
- fscache_set_op_state(op, "Init");
-diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
---- linux-2.6.32.49/include/linux/fs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/fs.h 2011-11-18 19:28:58.000000000 -0500
-@@ -568,41 +568,41 @@ typedef int (*read_actor_t)(read_descrip
+diff --git a/include/linux/fs.h b/include/linux/fs.h
+index 1b9a47a..6fe2934 100644
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -568,41 +568,41 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
unsigned long, unsigned long);
struct address_space_operations {
@@ -63440,7 +65543,7 @@ diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
};
/*
-@@ -1031,19 +1031,19 @@ static inline int file_check_writeable(s
+@@ -1031,19 +1031,19 @@ static inline int file_check_writeable(struct file *filp)
typedef struct files_struct *fl_owner_t;
struct file_lock_operations {
@@ -63489,15 +65592,13 @@ diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
struct inode_operations {
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
-@@ -1559,30 +1560,30 @@ extern ssize_t vfs_writev(struct file *,
+@@ -1559,30 +1560,30 @@ extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
unsigned long, loff_t *);
struct super_operations {
- struct inode *(*alloc_inode)(struct super_block *sb);
- void (*destroy_inode)(struct inode *);
-+ struct inode *(* const alloc_inode)(struct super_block *sb);
-+ void (* const destroy_inode)(struct inode *);
-
+-
- void (*dirty_inode) (struct inode *);
- int (*write_inode) (struct inode *, int);
- void (*drop_inode) (struct inode *);
@@ -63511,6 +65612,12 @@ diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
- int (*remount_fs) (struct super_block *, int *, char *);
- void (*clear_inode) (struct inode *);
- void (*umount_begin) (struct super_block *);
+-
+- int (*show_options)(struct seq_file *, struct vfsmount *);
+- int (*show_stats)(struct seq_file *, struct vfsmount *);
++ struct inode *(* const alloc_inode)(struct super_block *sb);
++ void (* const destroy_inode)(struct inode *);
++
+ void (* const dirty_inode) (struct inode *);
+ int (* const write_inode) (struct inode *, int);
+ void (* const drop_inode) (struct inode *);
@@ -63524,9 +65631,7 @@ diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
+ int (* const remount_fs) (struct super_block *, int *, char *);
+ void (* const clear_inode) (struct inode *);
+ void (* const umount_begin) (struct super_block *);
-
-- int (*show_options)(struct seq_file *, struct vfsmount *);
-- int (*show_stats)(struct seq_file *, struct vfsmount *);
++
+ int (* const show_options)(struct seq_file *, struct vfsmount *);
+ int (* const show_stats)(struct seq_file *, struct vfsmount *);
#ifdef CONFIG_QUOTA
@@ -63540,9 +65645,10 @@ diff -urNp linux-2.6.32.49/include/linux/fs.h linux-2.6.32.49/include/linux/fs.h
};
/*
-diff -urNp linux-2.6.32.49/include/linux/fs_struct.h linux-2.6.32.49/include/linux/fs_struct.h
---- linux-2.6.32.49/include/linux/fs_struct.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/fs_struct.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
+index 78a05bf..2a7d3e1 100644
+--- a/include/linux/fs_struct.h
++++ b/include/linux/fs_struct.h
@@ -4,7 +4,7 @@
#include <linux/path.h>
@@ -63552,10 +65658,33 @@ diff -urNp linux-2.6.32.49/include/linux/fs_struct.h linux-2.6.32.49/include/lin
rwlock_t lock;
int umask;
int in_exec;
-diff -urNp linux-2.6.32.49/include/linux/ftrace_event.h linux-2.6.32.49/include/linux/ftrace_event.h
---- linux-2.6.32.49/include/linux/ftrace_event.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/ftrace_event.h 2011-11-15 19:59:43.000000000 -0500
-@@ -163,7 +163,7 @@ extern int trace_define_field(struct ftr
+diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h
+index 7be0c6f..2f63a2b 100644
+--- a/include/linux/fscache-cache.h
++++ b/include/linux/fscache-cache.h
+@@ -116,7 +116,7 @@ struct fscache_operation {
+ #endif
+ };
+
+-extern atomic_t fscache_op_debug_id;
++extern atomic_unchecked_t fscache_op_debug_id;
+ extern const struct slow_work_ops fscache_op_slow_work_ops;
+
+ extern void fscache_enqueue_operation(struct fscache_operation *);
+@@ -134,7 +134,7 @@ static inline void fscache_operation_init(struct fscache_operation *op,
+ fscache_operation_release_t release)
+ {
+ atomic_set(&op->usage, 1);
+- op->debug_id = atomic_inc_return(&fscache_op_debug_id);
++ op->debug_id = atomic_inc_return_unchecked(&fscache_op_debug_id);
+ op->release = release;
+ INIT_LIST_HEAD(&op->pend_link);
+ fscache_set_op_state(op, "Init");
+diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
+index 4ec5e67..42f1eb9 100644
+--- a/include/linux/ftrace_event.h
++++ b/include/linux/ftrace_event.h
+@@ -163,7 +163,7 @@ extern int trace_define_field(struct ftrace_event_call *call,
int filter_type);
extern int trace_define_common_fields(struct ftrace_event_call *call);
@@ -63564,9 +65693,10 @@ diff -urNp linux-2.6.32.49/include/linux/ftrace_event.h linux-2.6.32.49/include/
int trace_set_clr_event(const char *system, const char *event, int set);
-diff -urNp linux-2.6.32.49/include/linux/genhd.h linux-2.6.32.49/include/linux/genhd.h
---- linux-2.6.32.49/include/linux/genhd.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/genhd.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/genhd.h b/include/linux/genhd.h
+index 297df45..b6a74ff 100644
+--- a/include/linux/genhd.h
++++ b/include/linux/genhd.h
@@ -161,7 +161,7 @@ struct gendisk {
struct timer_rand_state *random;
@@ -63576,9 +65706,11 @@ diff -urNp linux-2.6.32.49/include/linux/genhd.h linux-2.6.32.49/include/linux/g
struct work_struct async_notify;
#ifdef CONFIG_BLK_DEV_INTEGRITY
struct blk_integrity *integrity;
-diff -urNp linux-2.6.32.49/include/linux/gracl.h linux-2.6.32.49/include/linux/gracl.h
---- linux-2.6.32.49/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/gracl.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/gracl.h b/include/linux/gracl.h
+new file mode 100644
+index 0000000..0dc3943
+--- /dev/null
++++ b/include/linux/gracl.h
@@ -0,0 +1,317 @@
+#ifndef GR_ACL_H
+#define GR_ACL_H
@@ -63897,9 +66029,11 @@ diff -urNp linux-2.6.32.49/include/linux/gracl.h linux-2.6.32.49/include/linux/g
+
+#endif
+
-diff -urNp linux-2.6.32.49/include/linux/gralloc.h linux-2.6.32.49/include/linux/gralloc.h
---- linux-2.6.32.49/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/gralloc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/gralloc.h b/include/linux/gralloc.h
+new file mode 100644
+index 0000000..323ecf2
+--- /dev/null
++++ b/include/linux/gralloc.h
@@ -0,0 +1,9 @@
+#ifndef __GRALLOC_H
+#define __GRALLOC_H
@@ -63910,9 +66044,11 @@ diff -urNp linux-2.6.32.49/include/linux/gralloc.h linux-2.6.32.49/include/linux
+void *acl_alloc_num(unsigned long num, unsigned long len);
+
+#endif
-diff -urNp linux-2.6.32.49/include/linux/grdefs.h linux-2.6.32.49/include/linux/grdefs.h
---- linux-2.6.32.49/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/grdefs.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/grdefs.h b/include/linux/grdefs.h
+new file mode 100644
+index 0000000..70d6cd5
+--- /dev/null
++++ b/include/linux/grdefs.h
@@ -0,0 +1,140 @@
+#ifndef GRDEFS_H
+#define GRDEFS_H
@@ -64054,9 +66190,11 @@ diff -urNp linux-2.6.32.49/include/linux/grdefs.h linux-2.6.32.49/include/linux/
+};
+
+#endif
-diff -urNp linux-2.6.32.49/include/linux/grinternal.h linux-2.6.32.49/include/linux/grinternal.h
---- linux-2.6.32.49/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/grinternal.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/grinternal.h b/include/linux/grinternal.h
+new file mode 100644
+index 0000000..e5817d7
+--- /dev/null
++++ b/include/linux/grinternal.h
@@ -0,0 +1,218 @@
+#ifndef __GRINTERNAL_H
+#define __GRINTERNAL_H
@@ -64276,9 +66414,11 @@ diff -urNp linux-2.6.32.49/include/linux/grinternal.h linux-2.6.32.49/include/li
+#endif
+
+#endif
-diff -urNp linux-2.6.32.49/include/linux/grmsg.h linux-2.6.32.49/include/linux/grmsg.h
---- linux-2.6.32.49/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/grmsg.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/grmsg.h b/include/linux/grmsg.h
+new file mode 100644
+index 0000000..9d5fd4a
+--- /dev/null
++++ b/include/linux/grmsg.h
@@ -0,0 +1,108 @@
+#define DEFAULTSECMSG "%.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u, parent %.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u"
+#define GR_ACL_PROCACCT_MSG "%.256s[%.16s:%d] IP:%pI4 TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u run time:[%ud %uh %um %us] cpu time:[%ud %uh %um %us] %s with exit code %ld, parent %.256s[%.16s:%d] IP:%pI4 TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u"
@@ -64388,9 +66528,11 @@ diff -urNp linux-2.6.32.49/include/linux/grmsg.h linux-2.6.32.49/include/linux/g
+#define GR_VM86_MSG "denied use of vm86 by "
+#define GR_PTRACE_AUDIT_MSG "process %.950s(%.16s:%d) attached to via ptrace by "
+#define GR_INIT_TRANSFER_MSG "persistent special role transferred privilege to init by "
-diff -urNp linux-2.6.32.49/include/linux/grsecurity.h linux-2.6.32.49/include/linux/grsecurity.h
---- linux-2.6.32.49/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/grsecurity.h 2011-11-18 19:31:08.000000000 -0500
+diff --git a/include/linux/grsecurity.h b/include/linux/grsecurity.h
+new file mode 100644
+index 0000000..24676f4
+--- /dev/null
++++ b/include/linux/grsecurity.h
@@ -0,0 +1,218 @@
+#ifndef GR_SECURITY_H
+#define GR_SECURITY_H
@@ -64610,9 +66752,10 @@ diff -urNp linux-2.6.32.49/include/linux/grsecurity.h linux-2.6.32.49/include/li
+#endif
+
+#endif
-diff -urNp linux-2.6.32.49/include/linux/hdpu_features.h linux-2.6.32.49/include/linux/hdpu_features.h
---- linux-2.6.32.49/include/linux/hdpu_features.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/hdpu_features.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/hdpu_features.h b/include/linux/hdpu_features.h
+index 6a87154..a3ce57b 100644
+--- a/include/linux/hdpu_features.h
++++ b/include/linux/hdpu_features.h
@@ -3,7 +3,7 @@
struct cpustate_t {
spinlock_t lock;
@@ -64622,10 +66765,11 @@ diff -urNp linux-2.6.32.49/include/linux/hdpu_features.h linux-2.6.32.49/include
unsigned char cached_val;
int inited;
unsigned long *set_addr;
-diff -urNp linux-2.6.32.49/include/linux/highmem.h linux-2.6.32.49/include/linux/highmem.h
---- linux-2.6.32.49/include/linux/highmem.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/highmem.h 2011-11-15 19:59:43.000000000 -0500
-@@ -137,6 +137,18 @@ static inline void clear_highpage(struct
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index 211ff44..00ab6d7 100644
+--- a/include/linux/highmem.h
++++ b/include/linux/highmem.h
+@@ -137,6 +137,18 @@ static inline void clear_highpage(struct page *page)
kunmap_atomic(kaddr, KM_USER0);
}
@@ -64644,9 +66788,10 @@ diff -urNp linux-2.6.32.49/include/linux/highmem.h linux-2.6.32.49/include/linux
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
-diff -urNp linux-2.6.32.49/include/linux/i2c.h linux-2.6.32.49/include/linux/i2c.h
---- linux-2.6.32.49/include/linux/i2c.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/i2c.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/i2c.h b/include/linux/i2c.h
+index 7b40cda..24eb44e 100644
+--- a/include/linux/i2c.h
++++ b/include/linux/i2c.h
@@ -325,6 +325,7 @@ struct i2c_algorithm {
/* To determine what the adapter supports */
u32 (*functionality) (struct i2c_adapter *);
@@ -64655,9 +66800,10 @@ diff -urNp linux-2.6.32.49/include/linux/i2c.h linux-2.6.32.49/include/linux/i2c
/*
* i2c_adapter is the structure used to identify a physical i2c bus along
-diff -urNp linux-2.6.32.49/include/linux/i2o.h linux-2.6.32.49/include/linux/i2o.h
---- linux-2.6.32.49/include/linux/i2o.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/i2o.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/i2o.h b/include/linux/i2o.h
+index 4c4e57d..f3c5303 100644
+--- a/include/linux/i2o.h
++++ b/include/linux/i2o.h
@@ -564,7 +564,7 @@ struct i2o_controller {
struct i2o_device *exec; /* Executive */
#if BITS_PER_LONG == 64
@@ -64667,9 +66813,10 @@ diff -urNp linux-2.6.32.49/include/linux/i2o.h linux-2.6.32.49/include/linux/i2o
struct list_head context_list; /* list of context id's
and pointers */
#endif
-diff -urNp linux-2.6.32.49/include/linux/init_task.h linux-2.6.32.49/include/linux/init_task.h
---- linux-2.6.32.49/include/linux/init_task.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/init_task.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/init_task.h b/include/linux/init_task.h
+index 21a6f5d..dc42eab 100644
+--- a/include/linux/init_task.h
++++ b/include/linux/init_task.h
@@ -83,6 +83,12 @@ extern struct group_info init_groups;
#define INIT_IDS
#endif
@@ -64691,9 +66838,10 @@ diff -urNp linux-2.6.32.49/include/linux/init_task.h linux-2.6.32.49/include/lin
.fs = &init_fs, \
.files = &init_files, \
.signal = &init_signals, \
-diff -urNp linux-2.6.32.49/include/linux/intel-iommu.h linux-2.6.32.49/include/linux/intel-iommu.h
---- linux-2.6.32.49/include/linux/intel-iommu.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/intel-iommu.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
+index 4f0a72a..a849599 100644
+--- a/include/linux/intel-iommu.h
++++ b/include/linux/intel-iommu.h
@@ -296,7 +296,7 @@ struct iommu_flush {
u8 fm, u64 type);
void (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr,
@@ -64703,9 +66851,10 @@ diff -urNp linux-2.6.32.49/include/linux/intel-iommu.h linux-2.6.32.49/include/l
enum {
SR_DMAR_FECTL_REG,
-diff -urNp linux-2.6.32.49/include/linux/interrupt.h linux-2.6.32.49/include/linux/interrupt.h
---- linux-2.6.32.49/include/linux/interrupt.h 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/include/linux/interrupt.h 2011-11-26 19:45:13.000000000 -0500
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index c739150..be577b5 100644
+--- a/include/linux/interrupt.h
++++ b/include/linux/interrupt.h
@@ -369,7 +369,7 @@ enum
/* map softirq index to softirq name. update 'softirq_to_name' in
* kernel/softirq.c when adding a new softirq.
@@ -64715,7 +66864,7 @@ diff -urNp linux-2.6.32.49/include/linux/interrupt.h linux-2.6.32.49/include/lin
/* softirq mask and active fields moved to irq_cpustat_t in
* asm/hardirq.h to get better cache usage. KAO
-@@ -377,12 +377,12 @@ extern char *softirq_to_name[NR_SOFTIRQS
+@@ -377,12 +377,12 @@ extern char *softirq_to_name[NR_SOFTIRQS];
struct softirq_action
{
@@ -64730,10 +66879,11 @@ diff -urNp linux-2.6.32.49/include/linux/interrupt.h linux-2.6.32.49/include/lin
extern void softirq_init(void);
#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
extern void raise_softirq_irqoff(unsigned int nr);
-diff -urNp linux-2.6.32.49/include/linux/irq.h linux-2.6.32.49/include/linux/irq.h
---- linux-2.6.32.49/include/linux/irq.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/irq.h 2011-11-15 19:59:43.000000000 -0500
-@@ -438,12 +438,12 @@ extern int set_irq_msi(unsigned int irq,
+diff --git a/include/linux/irq.h b/include/linux/irq.h
+index 9e5f45a..025865b 100644
+--- a/include/linux/irq.h
++++ b/include/linux/irq.h
+@@ -438,12 +438,12 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
static inline bool alloc_desc_masks(struct irq_desc *desc, int node,
bool boot)
{
@@ -64747,9 +66897,10 @@ diff -urNp linux-2.6.32.49/include/linux/irq.h linux-2.6.32.49/include/linux/irq
if (!alloc_cpumask_var_node(&desc->affinity, gfp, node))
return false;
-diff -urNp linux-2.6.32.49/include/linux/kallsyms.h linux-2.6.32.49/include/linux/kallsyms.h
---- linux-2.6.32.49/include/linux/kallsyms.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/kallsyms.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
+index 7922742..27306a2 100644
+--- a/include/linux/kallsyms.h
++++ b/include/linux/kallsyms.h
@@ -15,7 +15,8 @@
struct module;
@@ -64760,7 +66911,7 @@ diff -urNp linux-2.6.32.49/include/linux/kallsyms.h linux-2.6.32.49/include/linu
/* Lookup the address for a symbol. Returns 0 if not found. */
unsigned long kallsyms_lookup_name(const char *name);
-@@ -92,6 +93,15 @@ static inline int lookup_symbol_attrs(un
+@@ -92,6 +93,15 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
/* Stupid that this does nothing, but I didn't create this mess. */
#define __print_symbol(fmt, addr)
#endif /*CONFIG_KALLSYMS*/
@@ -64776,9 +66927,10 @@ diff -urNp linux-2.6.32.49/include/linux/kallsyms.h linux-2.6.32.49/include/linu
/* This macro allows us to keep printk typechecking */
static void __check_printsym_format(const char *fmt, ...)
-diff -urNp linux-2.6.32.49/include/linux/kgdb.h linux-2.6.32.49/include/linux/kgdb.h
---- linux-2.6.32.49/include/linux/kgdb.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/kgdb.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
+index 6adcc29..13369e8 100644
+--- a/include/linux/kgdb.h
++++ b/include/linux/kgdb.h
@@ -74,8 +74,8 @@ void kgdb_breakpoint(void);
extern int kgdb_connected;
@@ -64818,9 +66970,10 @@ diff -urNp linux-2.6.32.49/include/linux/kgdb.h linux-2.6.32.49/include/linux/kg
extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
extern int kgdb_mem2hex(char *mem, char *buf, int count);
-diff -urNp linux-2.6.32.49/include/linux/kmod.h linux-2.6.32.49/include/linux/kmod.h
---- linux-2.6.32.49/include/linux/kmod.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/kmod.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/kmod.h b/include/linux/kmod.h
+index 384ca8b..83dd97d 100644
+--- a/include/linux/kmod.h
++++ b/include/linux/kmod.h
@@ -31,6 +31,8 @@
* usually useless though. */
extern int __request_module(bool wait, const char *name, ...) \
@@ -64830,10 +66983,11 @@ diff -urNp linux-2.6.32.49/include/linux/kmod.h linux-2.6.32.49/include/linux/km
#define request_module(mod...) __request_module(true, mod)
#define request_module_nowait(mod...) __request_module(false, mod)
#define try_then_request_module(x, mod...) \
-diff -urNp linux-2.6.32.49/include/linux/kobject.h linux-2.6.32.49/include/linux/kobject.h
---- linux-2.6.32.49/include/linux/kobject.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/kobject.h 2011-11-15 19:59:43.000000000 -0500
-@@ -106,7 +106,7 @@ extern char *kobject_get_path(struct kob
+diff --git a/include/linux/kobject.h b/include/linux/kobject.h
+index 58ae8e0..3950d3c 100644
+--- a/include/linux/kobject.h
++++ b/include/linux/kobject.h
+@@ -106,7 +106,7 @@ extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
struct kobj_type {
void (*release)(struct kobject *kobj);
@@ -64881,10 +67035,11 @@ diff -urNp linux-2.6.32.49/include/linux/kobject.h linux-2.6.32.49/include/linux
struct kobject *parent_kobj);
static inline struct kset *to_kset(struct kobject *kobj)
-diff -urNp linux-2.6.32.49/include/linux/kvm_host.h linux-2.6.32.49/include/linux/kvm_host.h
---- linux-2.6.32.49/include/linux/kvm_host.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/kvm_host.h 2011-11-15 19:59:43.000000000 -0500
-@@ -210,7 +210,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index c728a50..752d821 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -210,7 +210,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
void vcpu_load(struct kvm_vcpu *vcpu);
void vcpu_put(struct kvm_vcpu *vcpu);
@@ -64893,7 +67048,7 @@ diff -urNp linux-2.6.32.49/include/linux/kvm_host.h linux-2.6.32.49/include/linu
struct module *module);
void kvm_exit(void);
-@@ -316,7 +316,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
+@@ -316,7 +316,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
struct kvm_guest_debug *dbg);
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
@@ -64902,9 +67057,10 @@ diff -urNp linux-2.6.32.49/include/linux/kvm_host.h linux-2.6.32.49/include/linu
void kvm_arch_exit(void);
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
-diff -urNp linux-2.6.32.49/include/linux/libata.h linux-2.6.32.49/include/linux/libata.h
---- linux-2.6.32.49/include/linux/libata.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/libata.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/libata.h b/include/linux/libata.h
+index a069916..223edde 100644
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
@@ -525,11 +525,11 @@ struct ata_ioports {
struct ata_host {
@@ -64946,7 +67102,7 @@ diff -urNp linux-2.6.32.49/include/linux/libata.h linux-2.6.32.49/include/linux/
void *private_data;
};
-@@ -916,7 +916,7 @@ extern const unsigned long sata_deb_timi
+@@ -916,7 +916,7 @@ extern const unsigned long sata_deb_timing_normal[];
extern const unsigned long sata_deb_timing_hotplug[];
extern const unsigned long sata_deb_timing_long[];
@@ -64955,7 +67111,7 @@ diff -urNp linux-2.6.32.49/include/linux/libata.h linux-2.6.32.49/include/linux/
extern const struct ata_port_info ata_dummy_port_info;
static inline const unsigned long *
-@@ -962,7 +962,7 @@ extern int ata_host_activate(struct ata_
+@@ -962,7 +962,7 @@ extern int ata_host_activate(struct ata_host *host, int irq,
struct scsi_host_template *sht);
extern void ata_host_detach(struct ata_host *host);
extern void ata_host_init(struct ata_host *, struct device *,
@@ -64964,9 +67120,10 @@ diff -urNp linux-2.6.32.49/include/linux/libata.h linux-2.6.32.49/include/linux/
extern int ata_scsi_detect(struct scsi_host_template *sht);
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
-diff -urNp linux-2.6.32.49/include/linux/lockd/bind.h linux-2.6.32.49/include/linux/lockd/bind.h
---- linux-2.6.32.49/include/linux/lockd/bind.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/lockd/bind.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h
+index fbc48f8..0886e57 100644
+--- a/include/linux/lockd/bind.h
++++ b/include/linux/lockd/bind.h
@@ -23,13 +23,13 @@ struct svc_rqst;
* This is the set of functions for lockd->nfsd communication
*/
@@ -64984,9 +67141,10 @@ diff -urNp linux-2.6.32.49/include/linux/lockd/bind.h linux-2.6.32.49/include/li
/*
* Similar to nfs_client_initdata, but without the NFS-specific
-diff -urNp linux-2.6.32.49/include/linux/mca.h linux-2.6.32.49/include/linux/mca.h
---- linux-2.6.32.49/include/linux/mca.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mca.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/mca.h b/include/linux/mca.h
+index 3797270..7765ede 100644
+--- a/include/linux/mca.h
++++ b/include/linux/mca.h
@@ -80,7 +80,7 @@ struct mca_bus_accessor_functions {
int region);
void * (*mca_transform_memory)(struct mca_device *,
@@ -64996,9 +67154,10 @@ diff -urNp linux-2.6.32.49/include/linux/mca.h linux-2.6.32.49/include/linux/mca
struct mca_bus {
u64 default_dma_mask;
-diff -urNp linux-2.6.32.49/include/linux/memory.h linux-2.6.32.49/include/linux/memory.h
---- linux-2.6.32.49/include/linux/memory.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/memory.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/memory.h b/include/linux/memory.h
+index 37fa19b..b597c85 100644
+--- a/include/linux/memory.h
++++ b/include/linux/memory.h
@@ -108,7 +108,7 @@ struct memory_accessor {
size_t count);
ssize_t (*write)(struct memory_accessor *, const char *buf,
@@ -65008,10 +67167,11 @@ diff -urNp linux-2.6.32.49/include/linux/memory.h linux-2.6.32.49/include/linux/
/*
* Kernel text modification mutex, used for code patching. Users of this lock
-diff -urNp linux-2.6.32.49/include/linux/mm.h linux-2.6.32.49/include/linux/mm.h
---- linux-2.6.32.49/include/linux/mm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mm.h 2011-11-15 19:59:43.000000000 -0500
-@@ -106,7 +106,14 @@ extern unsigned int kobjsize(const void
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index 11e5be6..1ff2423 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -106,7 +106,14 @@ extern unsigned int kobjsize(const void *objp);
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
@@ -65056,7 +67216,7 @@ diff -urNp linux-2.6.32.49/include/linux/mm.h linux-2.6.32.49/include/linux/mm.h
extern unsigned long do_brk(unsigned long, unsigned long);
-@@ -1218,6 +1222,10 @@ extern struct vm_area_struct * find_vma(
+@@ -1218,6 +1222,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
@@ -65067,7 +67227,7 @@ diff -urNp linux-2.6.32.49/include/linux/mm.h linux-2.6.32.49/include/linux/mm.h
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-@@ -1234,7 +1242,6 @@ static inline unsigned long vma_pages(st
+@@ -1234,7 +1242,6 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
}
@@ -65075,7 +67235,7 @@ diff -urNp linux-2.6.32.49/include/linux/mm.h linux-2.6.32.49/include/linux/mm.h
struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t);
-@@ -1332,7 +1339,13 @@ extern void memory_failure(unsigned long
+@@ -1332,7 +1339,13 @@ extern void memory_failure(unsigned long pfn, int trapno);
extern int __memory_failure(unsigned long pfn, int trapno, int ref);
extern int sysctl_memory_failure_early_kill;
extern int sysctl_memory_failure_recovery;
@@ -65090,9 +67250,10 @@ diff -urNp linux-2.6.32.49/include/linux/mm.h linux-2.6.32.49/include/linux/mm.h
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
-diff -urNp linux-2.6.32.49/include/linux/mm_types.h linux-2.6.32.49/include/linux/mm_types.h
---- linux-2.6.32.49/include/linux/mm_types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mm_types.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
+index 9d12ed5..8023125 100644
+--- a/include/linux/mm_types.h
++++ b/include/linux/mm_types.h
@@ -186,6 +186,8 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
@@ -65127,10 +67288,11 @@ diff -urNp linux-2.6.32.49/include/linux/mm_types.h linux-2.6.32.49/include/linu
};
/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
-diff -urNp linux-2.6.32.49/include/linux/mmu_notifier.h linux-2.6.32.49/include/linux/mmu_notifier.h
---- linux-2.6.32.49/include/linux/mmu_notifier.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mmu_notifier.h 2011-11-15 19:59:43.000000000 -0500
-@@ -235,12 +235,12 @@ static inline void mmu_notifier_mm_destr
+diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
+index 4e02ee2..afb159e 100644
+--- a/include/linux/mmu_notifier.h
++++ b/include/linux/mmu_notifier.h
+@@ -235,12 +235,12 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
*/
#define ptep_clear_flush_notify(__vma, __address, __ptep) \
({ \
@@ -65146,9 +67308,10 @@ diff -urNp linux-2.6.32.49/include/linux/mmu_notifier.h linux-2.6.32.49/include/
})
#define ptep_clear_flush_young_notify(__vma, __address, __ptep) \
-diff -urNp linux-2.6.32.49/include/linux/mmzone.h linux-2.6.32.49/include/linux/mmzone.h
---- linux-2.6.32.49/include/linux/mmzone.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mmzone.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
+index 6c31a2a..4b0e930 100644
+--- a/include/linux/mmzone.h
++++ b/include/linux/mmzone.h
@@ -350,7 +350,7 @@ struct zone {
unsigned long flags; /* zone flags, see below */
@@ -65158,9 +67321,10 @@ diff -urNp linux-2.6.32.49/include/linux/mmzone.h linux-2.6.32.49/include/linux/
/*
* prev_priority holds the scanning priority for this zone. It is
-diff -urNp linux-2.6.32.49/include/linux/mod_devicetable.h linux-2.6.32.49/include/linux/mod_devicetable.h
---- linux-2.6.32.49/include/linux/mod_devicetable.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mod_devicetable.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
+index f58e9d8..3503935 100644
+--- a/include/linux/mod_devicetable.h
++++ b/include/linux/mod_devicetable.h
@@ -12,7 +12,7 @@
typedef unsigned long kernel_ulong_t;
#endif
@@ -65179,9 +67343,10 @@ diff -urNp linux-2.6.32.49/include/linux/mod_devicetable.h linux-2.6.32.49/inclu
struct hid_device_id {
__u16 bus;
-diff -urNp linux-2.6.32.49/include/linux/module.h linux-2.6.32.49/include/linux/module.h
---- linux-2.6.32.49/include/linux/module.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/module.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/module.h b/include/linux/module.h
+index 482efc8..642032b 100644
+--- a/include/linux/module.h
++++ b/include/linux/module.h
@@ -16,6 +16,7 @@
#include <linux/kobject.h>
#include <linux/moduleparam.h>
@@ -65222,7 +67387,7 @@ diff -urNp linux-2.6.32.49/include/linux/module.h linux-2.6.32.49/include/linux/
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
unsigned long *ftrace_callsites;
-@@ -393,16 +398,46 @@ struct module *__module_address(unsigned
+@@ -393,16 +398,46 @@ struct module *__module_address(unsigned long addr);
bool is_module_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
@@ -65273,10 +67438,11 @@ diff -urNp linux-2.6.32.49/include/linux/module.h linux-2.6.32.49/include/linux/
}
/* Search for module by name: must hold module_mutex. */
-diff -urNp linux-2.6.32.49/include/linux/moduleloader.h linux-2.6.32.49/include/linux/moduleloader.h
---- linux-2.6.32.49/include/linux/moduleloader.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/moduleloader.h 2011-11-15 19:59:43.000000000 -0500
-@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(st
+diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
+index c1f40c2..682ca53 100644
+--- a/include/linux/moduleloader.h
++++ b/include/linux/moduleloader.h
+@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section);
sections. Returns NULL on failure. */
void *module_alloc(unsigned long size);
@@ -65298,9 +67464,10 @@ diff -urNp linux-2.6.32.49/include/linux/moduleloader.h linux-2.6.32.49/include/
/* Apply the given relocation to the (simplified) ELF. Return -error
or 0. */
int apply_relocate(Elf_Shdr *sechdrs,
-diff -urNp linux-2.6.32.49/include/linux/moduleparam.h linux-2.6.32.49/include/linux/moduleparam.h
---- linux-2.6.32.49/include/linux/moduleparam.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/moduleparam.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
+index 82a9124..8a5f622 100644
+--- a/include/linux/moduleparam.h
++++ b/include/linux/moduleparam.h
@@ -132,7 +132,7 @@ struct kparam_array
/* Actually copy string: maxlen param is usually sizeof(string). */
@@ -65310,7 +67477,7 @@ diff -urNp linux-2.6.32.49/include/linux/moduleparam.h linux-2.6.32.49/include/l
= { len, string }; \
__module_param_call(MODULE_PARAM_PREFIX, name, \
param_set_copystring, param_get_string, \
-@@ -211,7 +211,7 @@ extern int param_get_invbool(char *buffe
+@@ -211,7 +211,7 @@ extern int param_get_invbool(char *buffer, struct kernel_param *kp);
/* Comma-separated array: *nump is set to number they actually specified. */
#define module_param_array_named(name, array, type, nump, perm) \
@@ -65319,9 +67486,10 @@ diff -urNp linux-2.6.32.49/include/linux/moduleparam.h linux-2.6.32.49/include/l
= { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
sizeof(array[0]), array }; \
__module_param_call(MODULE_PARAM_PREFIX, name, \
-diff -urNp linux-2.6.32.49/include/linux/mutex.h linux-2.6.32.49/include/linux/mutex.h
---- linux-2.6.32.49/include/linux/mutex.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/mutex.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/mutex.h b/include/linux/mutex.h
+index 878cab4..c92cb3e 100644
+--- a/include/linux/mutex.h
++++ b/include/linux/mutex.h
@@ -51,7 +51,7 @@ struct mutex {
spinlock_t wait_lock;
struct list_head wait_list;
@@ -65331,9 +67499,10 @@ diff -urNp linux-2.6.32.49/include/linux/mutex.h linux-2.6.32.49/include/linux/m
#endif
#ifdef CONFIG_DEBUG_MUTEXES
const char *name;
-diff -urNp linux-2.6.32.49/include/linux/namei.h linux-2.6.32.49/include/linux/namei.h
---- linux-2.6.32.49/include/linux/namei.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/namei.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/namei.h b/include/linux/namei.h
+index ec0f607..d19e675 100644
+--- a/include/linux/namei.h
++++ b/include/linux/namei.h
@@ -22,7 +22,7 @@ struct nameidata {
unsigned int flags;
int last_type;
@@ -65358,9 +67527,10 @@ diff -urNp linux-2.6.32.49/include/linux/namei.h linux-2.6.32.49/include/linux/n
{
return nd->saved_names[nd->depth];
}
-diff -urNp linux-2.6.32.49/include/linux/netdevice.h linux-2.6.32.49/include/linux/netdevice.h
---- linux-2.6.32.49/include/linux/netdevice.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/netdevice.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index 9d7e8f7..04428c5 100644
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
@@ -637,6 +637,7 @@ struct net_device_ops {
u16 xid);
#endif
@@ -65369,9 +67539,11 @@ diff -urNp linux-2.6.32.49/include/linux/netdevice.h linux-2.6.32.49/include/lin
/*
* The DEVICE structure.
-diff -urNp linux-2.6.32.49/include/linux/netfilter/xt_gradm.h linux-2.6.32.49/include/linux/netfilter/xt_gradm.h
---- linux-2.6.32.49/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/include/linux/netfilter/xt_gradm.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/netfilter/xt_gradm.h b/include/linux/netfilter/xt_gradm.h
+new file mode 100644
+index 0000000..33f4af8
+--- /dev/null
++++ b/include/linux/netfilter/xt_gradm.h
@@ -0,0 +1,9 @@
+#ifndef _LINUX_NETFILTER_XT_GRADM_H
+#define _LINUX_NETFILTER_XT_GRADM_H 1
@@ -65382,10 +67554,11 @@ diff -urNp linux-2.6.32.49/include/linux/netfilter/xt_gradm.h linux-2.6.32.49/in
+};
+
+#endif
-diff -urNp linux-2.6.32.49/include/linux/nodemask.h linux-2.6.32.49/include/linux/nodemask.h
---- linux-2.6.32.49/include/linux/nodemask.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/nodemask.h 2011-11-15 19:59:43.000000000 -0500
-@@ -464,11 +464,11 @@ static inline int num_node_state(enum no
+diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
+index b359c4a..c08b334 100644
+--- a/include/linux/nodemask.h
++++ b/include/linux/nodemask.h
+@@ -464,11 +464,11 @@ static inline int num_node_state(enum node_states state)
#define any_online_node(mask) \
({ \
@@ -65401,10 +67574,11 @@ diff -urNp linux-2.6.32.49/include/linux/nodemask.h linux-2.6.32.49/include/linu
})
#define num_online_nodes() num_node_state(N_ONLINE)
-diff -urNp linux-2.6.32.49/include/linux/oprofile.h linux-2.6.32.49/include/linux/oprofile.h
---- linux-2.6.32.49/include/linux/oprofile.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/oprofile.h 2011-11-15 19:59:43.000000000 -0500
-@@ -129,9 +129,9 @@ int oprofilefs_create_ulong(struct super
+diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
+index 5171639..7cf4235 100644
+--- a/include/linux/oprofile.h
++++ b/include/linux/oprofile.h
+@@ -129,9 +129,9 @@ int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
char const * name, ulong * val);
@@ -65416,10 +67590,11 @@ diff -urNp linux-2.6.32.49/include/linux/oprofile.h linux-2.6.32.49/include/linu
/** create a directory */
struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
-diff -urNp linux-2.6.32.49/include/linux/pagemap.h linux-2.6.32.49/include/linux/pagemap.h
---- linux-2.6.32.49/include/linux/pagemap.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/pagemap.h 2011-11-18 18:01:55.000000000 -0500
-@@ -425,7 +425,9 @@ static inline int fault_in_pages_readabl
+diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
+index 3c62ed4..8924c7c 100644
+--- a/include/linux/pagemap.h
++++ b/include/linux/pagemap.h
+@@ -425,7 +425,9 @@ static inline int fault_in_pages_readable(const char __user *uaddr, int size)
if (((unsigned long)uaddr & PAGE_MASK) !=
((unsigned long)end & PAGE_MASK))
ret = __get_user(c, end);
@@ -65429,9 +67604,10 @@ diff -urNp linux-2.6.32.49/include/linux/pagemap.h linux-2.6.32.49/include/linux
return ret;
}
-diff -urNp linux-2.6.32.49/include/linux/perf_event.h linux-2.6.32.49/include/linux/perf_event.h
---- linux-2.6.32.49/include/linux/perf_event.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/perf_event.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
+index 81c9689..a567a55 100644
+--- a/include/linux/perf_event.h
++++ b/include/linux/perf_event.h
@@ -476,7 +476,7 @@ struct hw_perf_event {
struct hrtimer hrtimer;
};
@@ -65461,9 +67637,10 @@ diff -urNp linux-2.6.32.49/include/linux/perf_event.h linux-2.6.32.49/include/li
/*
* Protect attach/detach and child_list:
-diff -urNp linux-2.6.32.49/include/linux/pipe_fs_i.h linux-2.6.32.49/include/linux/pipe_fs_i.h
---- linux-2.6.32.49/include/linux/pipe_fs_i.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/pipe_fs_i.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
+index b43a9e0..b77d869 100644
+--- a/include/linux/pipe_fs_i.h
++++ b/include/linux/pipe_fs_i.h
@@ -46,9 +46,9 @@ struct pipe_inode_info {
wait_queue_head_t wait;
unsigned int nrbufs, curbuf;
@@ -65477,9 +67654,10 @@ diff -urNp linux-2.6.32.49/include/linux/pipe_fs_i.h linux-2.6.32.49/include/lin
unsigned int r_counter;
unsigned int w_counter;
struct fasync_struct *fasync_readers;
-diff -urNp linux-2.6.32.49/include/linux/poison.h linux-2.6.32.49/include/linux/poison.h
---- linux-2.6.32.49/include/linux/poison.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/poison.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/poison.h b/include/linux/poison.h
+index 34066ff..e95d744 100644
+--- a/include/linux/poison.h
++++ b/include/linux/poison.h
@@ -19,8 +19,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
@@ -65491,9 +67669,10 @@ diff -urNp linux-2.6.32.49/include/linux/poison.h linux-2.6.32.49/include/linux/
/********** include/linux/timer.h **********/
/*
-diff -urNp linux-2.6.32.49/include/linux/posix-timers.h linux-2.6.32.49/include/linux/posix-timers.h
---- linux-2.6.32.49/include/linux/posix-timers.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/posix-timers.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
+index 4f71bf4..77ffa64 100644
+--- a/include/linux/posix-timers.h
++++ b/include/linux/posix-timers.h
@@ -67,7 +67,7 @@ struct k_itimer {
};
@@ -65503,9 +67682,10 @@ diff -urNp linux-2.6.32.49/include/linux/posix-timers.h linux-2.6.32.49/include/
int (*clock_getres) (const clockid_t which_clock, struct timespec *tp);
int (*clock_set) (const clockid_t which_clock, struct timespec * tp);
int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
-diff -urNp linux-2.6.32.49/include/linux/preempt.h linux-2.6.32.49/include/linux/preempt.h
---- linux-2.6.32.49/include/linux/preempt.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/preempt.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 72b1a10..13303a9 100644
+--- a/include/linux/preempt.h
++++ b/include/linux/preempt.h
@@ -110,7 +110,7 @@ struct preempt_ops {
void (*sched_in)(struct preempt_notifier *notifier, int cpu);
void (*sched_out)(struct preempt_notifier *notifier,
@@ -65515,10 +67695,11 @@ diff -urNp linux-2.6.32.49/include/linux/preempt.h linux-2.6.32.49/include/linux
/**
* preempt_notifier - key for installing preemption notifiers
-diff -urNp linux-2.6.32.49/include/linux/proc_fs.h linux-2.6.32.49/include/linux/proc_fs.h
---- linux-2.6.32.49/include/linux/proc_fs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/proc_fs.h 2011-11-15 19:59:43.000000000 -0500
-@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *pro
+diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
+index 379eaed..1bf73e3 100644
+--- a/include/linux/proc_fs.h
++++ b/include/linux/proc_fs.h
+@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode,
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
@@ -65547,10 +67728,11 @@ diff -urNp linux-2.6.32.49/include/linux/proc_fs.h linux-2.6.32.49/include/linux
struct ctl_table_header;
struct ctl_table;
-diff -urNp linux-2.6.32.49/include/linux/ptrace.h linux-2.6.32.49/include/linux/ptrace.h
---- linux-2.6.32.49/include/linux/ptrace.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/ptrace.h 2011-11-15 19:59:43.000000000 -0500
-@@ -96,10 +96,10 @@ extern void __ptrace_unlink(struct task_
+diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
+index 7456d7d..6c1cfc9 100644
+--- a/include/linux/ptrace.h
++++ b/include/linux/ptrace.h
+@@ -96,10 +96,10 @@ extern void __ptrace_unlink(struct task_struct *child);
extern void exit_ptrace(struct task_struct *tracer);
#define PTRACE_MODE_READ 1
#define PTRACE_MODE_ATTACH 2
@@ -65563,10 +67745,11 @@ diff -urNp linux-2.6.32.49/include/linux/ptrace.h linux-2.6.32.49/include/linux/
static inline int ptrace_reparented(struct task_struct *child)
{
-diff -urNp linux-2.6.32.49/include/linux/random.h linux-2.6.32.49/include/linux/random.h
---- linux-2.6.32.49/include/linux/random.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/random.h 2011-11-15 19:59:43.000000000 -0500
-@@ -63,6 +63,11 @@ unsigned long randomize_range(unsigned l
+diff --git a/include/linux/random.h b/include/linux/random.h
+index 2948046..3262567 100644
+--- a/include/linux/random.h
++++ b/include/linux/random.h
+@@ -63,6 +63,11 @@ unsigned long randomize_range(unsigned long start, unsigned long end, unsigned l
u32 random32(void);
void srandom32(u32 seed);
@@ -65578,10 +67761,11 @@ diff -urNp linux-2.6.32.49/include/linux/random.h linux-2.6.32.49/include/linux/
#endif /* __KERNEL___ */
#endif /* _LINUX_RANDOM_H */
-diff -urNp linux-2.6.32.49/include/linux/reboot.h linux-2.6.32.49/include/linux/reboot.h
---- linux-2.6.32.49/include/linux/reboot.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/reboot.h 2011-11-15 19:59:43.000000000 -0500
-@@ -47,9 +47,9 @@ extern int unregister_reboot_notifier(st
+diff --git a/include/linux/reboot.h b/include/linux/reboot.h
+index 988e55f..17cb4ef 100644
+--- a/include/linux/reboot.h
++++ b/include/linux/reboot.h
+@@ -47,9 +47,9 @@ extern int unregister_reboot_notifier(struct notifier_block *);
* Architecture-specific implementations of sys_reboot commands.
*/
@@ -65594,7 +67778,7 @@ diff -urNp linux-2.6.32.49/include/linux/reboot.h linux-2.6.32.49/include/linux/
extern void machine_shutdown(void);
struct pt_regs;
-@@ -60,9 +60,9 @@ extern void machine_crash_shutdown(struc
+@@ -60,9 +60,9 @@ extern void machine_crash_shutdown(struct pt_regs *);
*/
extern void kernel_restart_prepare(char *cmd);
@@ -65616,10 +67800,11 @@ diff -urNp linux-2.6.32.49/include/linux/reboot.h linux-2.6.32.49/include/linux/
#include <asm/emergency-restart.h>
#endif
-diff -urNp linux-2.6.32.49/include/linux/reiserfs_fs.h linux-2.6.32.49/include/linux/reiserfs_fs.h
---- linux-2.6.32.49/include/linux/reiserfs_fs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/reiserfs_fs.h 2011-11-15 19:59:43.000000000 -0500
-@@ -1326,7 +1326,7 @@ static inline loff_t max_reiserfs_offset
+diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
+index dd31e7b..5b03c5c 100644
+--- a/include/linux/reiserfs_fs.h
++++ b/include/linux/reiserfs_fs.h
+@@ -1326,7 +1326,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
#define REISERFS_USER_MEM 1 /* reiserfs user memory mode */
#define fs_generation(s) (REISERFS_SB(s)->s_generation_counter)
@@ -65628,7 +67813,7 @@ diff -urNp linux-2.6.32.49/include/linux/reiserfs_fs.h linux-2.6.32.49/include/l
#define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
#define __fs_changed(gen,s) (gen != get_generation (s))
#define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);})
-@@ -1534,24 +1534,24 @@ static inline struct super_block *sb_fro
+@@ -1534,24 +1534,24 @@ static inline struct super_block *sb_from_bi(struct buffer_info *bi)
*/
struct item_operations {
@@ -65665,9 +67850,10 @@ diff -urNp linux-2.6.32.49/include/linux/reiserfs_fs.h linux-2.6.32.49/include/l
#define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize)
#define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize)
-diff -urNp linux-2.6.32.49/include/linux/reiserfs_fs_sb.h linux-2.6.32.49/include/linux/reiserfs_fs_sb.h
---- linux-2.6.32.49/include/linux/reiserfs_fs_sb.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/reiserfs_fs_sb.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
+index dab68bb..0688727 100644
+--- a/include/linux/reiserfs_fs_sb.h
++++ b/include/linux/reiserfs_fs_sb.h
@@ -377,7 +377,7 @@ struct reiserfs_sb_info {
/* Comment? -Hans */
wait_queue_head_t s_wait;
@@ -65677,9 +67863,10 @@ diff -urNp linux-2.6.32.49/include/linux/reiserfs_fs_sb.h linux-2.6.32.49/includ
// tree gets re-balanced
unsigned long s_properties; /* File system properties. Currently holds
on-disk FS format */
-diff -urNp linux-2.6.32.49/include/linux/relay.h linux-2.6.32.49/include/linux/relay.h
---- linux-2.6.32.49/include/linux/relay.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/relay.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/relay.h b/include/linux/relay.h
+index 14a86bc..17d0700 100644
+--- a/include/linux/relay.h
++++ b/include/linux/relay.h
@@ -159,7 +159,7 @@ struct rchan_callbacks
* The callback should return 0 if successful, negative if not.
*/
@@ -65689,9 +67876,10 @@ diff -urNp linux-2.6.32.49/include/linux/relay.h linux-2.6.32.49/include/linux/r
/*
* CONFIG_RELAY kernel API, kernel/relay.c
-diff -urNp linux-2.6.32.49/include/linux/rfkill.h linux-2.6.32.49/include/linux/rfkill.h
---- linux-2.6.32.49/include/linux/rfkill.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/rfkill.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
+index 3392c59..a746428 100644
+--- a/include/linux/rfkill.h
++++ b/include/linux/rfkill.h
@@ -144,6 +144,7 @@ struct rfkill_ops {
void (*query)(struct rfkill *rfkill, void *data);
int (*set_block)(void *data, bool blocked);
@@ -65700,9 +67888,10 @@ diff -urNp linux-2.6.32.49/include/linux/rfkill.h linux-2.6.32.49/include/linux/
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
/**
-diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/sched.h
---- linux-2.6.32.49/include/linux/sched.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sched.h 2011-11-18 18:01:52.000000000 -0500
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 71849bf..40217dc 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
@@ -101,6 +101,7 @@ struct bio;
struct fs_struct;
struct bts_context;
@@ -65711,7 +67900,7 @@ diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/s
/*
* List of flags we want to share for kernel threads,
-@@ -350,7 +351,7 @@ extern signed long schedule_timeout_kill
+@@ -350,7 +351,7 @@ extern signed long schedule_timeout_killable(signed long timeout);
extern signed long schedule_timeout_uninterruptible(signed long timeout);
asmlinkage void __schedule(void);
asmlinkage void schedule(void);
@@ -65907,7 +68096,7 @@ diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/s
/* Future-safe accessor for struct task_struct's cpus_allowed. */
#define tsk_cpumask(tsk) (&(tsk)->cpus_allowed)
-@@ -1740,7 +1831,7 @@ extern void thread_group_times(struct ta
+@@ -1740,7 +1831,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
#define PF_DUMPCORE 0x00000200 /* dumped core */
#define PF_SIGNALED 0x00000400 /* killed by a signal */
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
@@ -65934,7 +68123,7 @@ diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/s
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);
-@@ -2155,7 +2249,7 @@ extern void __cleanup_sighand(struct sig
+@@ -2155,7 +2249,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
extern void exit_itimers(struct signal_struct *);
extern void flush_itimer_signals(void);
@@ -65943,7 +68132,7 @@ diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/s
extern void daemonize(const char *, ...);
extern int allow_signal(int);
-@@ -2284,13 +2378,17 @@ static inline unsigned long *end_of_stac
+@@ -2284,13 +2378,17 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
#endif
@@ -65963,9 +68152,10 @@ diff -urNp linux-2.6.32.49/include/linux/sched.h linux-2.6.32.49/include/linux/s
extern void thread_info_cache_init(void);
#ifdef CONFIG_DEBUG_STACK_USAGE
-diff -urNp linux-2.6.32.49/include/linux/screen_info.h linux-2.6.32.49/include/linux/screen_info.h
---- linux-2.6.32.49/include/linux/screen_info.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/screen_info.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
+index 1ee2c05..81b7ec4 100644
+--- a/include/linux/screen_info.h
++++ b/include/linux/screen_info.h
@@ -42,7 +42,8 @@ struct screen_info {
__u16 pages; /* 0x32 */
__u16 vesa_attributes; /* 0x34 */
@@ -65976,9 +68166,10 @@ diff -urNp linux-2.6.32.49/include/linux/screen_info.h linux-2.6.32.49/include/l
} __attribute__((packed));
#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */
-diff -urNp linux-2.6.32.49/include/linux/security.h linux-2.6.32.49/include/linux/security.h
---- linux-2.6.32.49/include/linux/security.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/security.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/security.h b/include/linux/security.h
+index d40d23f..253bd14 100644
+--- a/include/linux/security.h
++++ b/include/linux/security.h
@@ -34,6 +34,7 @@
#include <linux/key.h>
#include <linux/xfrm.h>
@@ -65987,9 +68178,10 @@ diff -urNp linux-2.6.32.49/include/linux/security.h linux-2.6.32.49/include/linu
#include <net/flow.h>
/* Maximum number of letters for an LSM name string */
-diff -urNp linux-2.6.32.49/include/linux/seq_file.h linux-2.6.32.49/include/linux/seq_file.h
---- linux-2.6.32.49/include/linux/seq_file.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/seq_file.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
+index 8366d8f..2307490 100644
+--- a/include/linux/seq_file.h
++++ b/include/linux/seq_file.h
@@ -32,6 +32,7 @@ struct seq_operations {
void * (*next) (struct seq_file *m, void *v, loff_t *pos);
int (*show) (struct seq_file *m, void *v);
@@ -65998,10 +68190,11 @@ diff -urNp linux-2.6.32.49/include/linux/seq_file.h linux-2.6.32.49/include/linu
#define SEQ_SKIP 1
-diff -urNp linux-2.6.32.49/include/linux/shm.h linux-2.6.32.49/include/linux/shm.h
---- linux-2.6.32.49/include/linux/shm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/shm.h 2011-11-15 19:59:43.000000000 -0500
-@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the ke
+diff --git a/include/linux/shm.h b/include/linux/shm.h
+index eca6235..c7417ed 100644
+--- a/include/linux/shm.h
++++ b/include/linux/shm.h
+@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the kernel */
pid_t shm_cprid;
pid_t shm_lprid;
struct user_struct *mlock_user;
@@ -66012,9 +68205,10 @@ diff -urNp linux-2.6.32.49/include/linux/shm.h linux-2.6.32.49/include/linux/shm
};
/* shm_mode upper byte flags */
-diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/skbuff.h
---- linux-2.6.32.49/include/linux/skbuff.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/skbuff.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
+index bcdd660..6e12e11 100644
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
@@ -14,6 +14,7 @@
#ifndef _LINUX_SKBUFF_H
#define _LINUX_SKBUFF_H
@@ -66023,7 +68217,7 @@ diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/
#include <linux/kernel.h>
#include <linux/kmemcheck.h>
#include <linux/compiler.h>
-@@ -544,7 +545,7 @@ static inline union skb_shared_tx *skb_t
+@@ -544,7 +545,7 @@ static inline union skb_shared_tx *skb_tx(struct sk_buff *skb)
*/
static inline int skb_queue_empty(const struct sk_buff_head *list)
{
@@ -66032,7 +68226,7 @@ diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/
}
/**
-@@ -557,7 +558,7 @@ static inline int skb_queue_empty(const
+@@ -557,7 +558,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
static inline bool skb_queue_is_last(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
@@ -66041,7 +68235,7 @@ diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/
}
/**
-@@ -570,7 +571,7 @@ static inline bool skb_queue_is_last(con
+@@ -570,7 +571,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
static inline bool skb_queue_is_first(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
@@ -66050,7 +68244,7 @@ diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/
}
/**
-@@ -1367,7 +1368,7 @@ static inline int skb_network_offset(con
+@@ -1367,7 +1368,7 @@ static inline int skb_network_offset(const struct sk_buff *skb)
* headroom, you should not reduce this.
*/
#ifndef NET_SKB_PAD
@@ -66059,27 +68253,10 @@ diff -urNp linux-2.6.32.49/include/linux/skbuff.h linux-2.6.32.49/include/linux/
#endif
extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
-diff -urNp linux-2.6.32.49/include/linux/slab_def.h linux-2.6.32.49/include/linux/slab_def.h
---- linux-2.6.32.49/include/linux/slab_def.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/slab_def.h 2011-11-15 19:59:43.000000000 -0500
-@@ -69,10 +69,10 @@ struct kmem_cache {
- unsigned long node_allocs;
- unsigned long node_frees;
- unsigned long node_overflow;
-- atomic_t allochit;
-- atomic_t allocmiss;
-- atomic_t freehit;
-- atomic_t freemiss;
-+ atomic_unchecked_t allochit;
-+ atomic_unchecked_t allocmiss;
-+ atomic_unchecked_t freehit;
-+ atomic_unchecked_t freemiss;
-
- /*
- * If debugging is enabled, then the allocator can add additional
-diff -urNp linux-2.6.32.49/include/linux/slab.h linux-2.6.32.49/include/linux/slab.h
---- linux-2.6.32.49/include/linux/slab.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/slab.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/slab.h b/include/linux/slab.h
+index 2da8372..a3be824 100644
+--- a/include/linux/slab.h
++++ b/include/linux/slab.h
@@ -11,12 +11,20 @@
#include <linux/gfp.h>
@@ -66118,7 +68295,7 @@ diff -urNp linux-2.6.32.49/include/linux/slab.h linux-2.6.32.49/include/linux/sl
/*
* struct kmem_cache related prototypes
-@@ -138,6 +149,7 @@ void * __must_check krealloc(const void
+@@ -138,6 +149,7 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
void kfree(const void *);
void kzfree(const void *);
size_t ksize(const void *);
@@ -66126,7 +68303,7 @@ diff -urNp linux-2.6.32.49/include/linux/slab.h linux-2.6.32.49/include/linux/sl
/*
* Allocator specific definitions. These are mainly used to establish optimized
-@@ -328,4 +340,37 @@ static inline void *kzalloc_node(size_t
+@@ -328,4 +340,37 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
void __init kmem_cache_init_late(void);
@@ -66164,9 +68341,29 @@ diff -urNp linux-2.6.32.49/include/linux/slab.h linux-2.6.32.49/include/linux/sl
+})
+
#endif /* _LINUX_SLAB_H */
-diff -urNp linux-2.6.32.49/include/linux/slub_def.h linux-2.6.32.49/include/linux/slub_def.h
---- linux-2.6.32.49/include/linux/slub_def.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/slub_def.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
+index 850d057..d9dfe3c 100644
+--- a/include/linux/slab_def.h
++++ b/include/linux/slab_def.h
+@@ -69,10 +69,10 @@ struct kmem_cache {
+ unsigned long node_allocs;
+ unsigned long node_frees;
+ unsigned long node_overflow;
+- atomic_t allochit;
+- atomic_t allocmiss;
+- atomic_t freehit;
+- atomic_t freemiss;
++ atomic_unchecked_t allochit;
++ atomic_unchecked_t allocmiss;
++ atomic_unchecked_t freehit;
++ atomic_unchecked_t freemiss;
+
+ /*
+ * If debugging is enabled, then the allocator can add additional
+diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
+index 5ad70a6..57f9f65 100644
+--- a/include/linux/slub_def.h
++++ b/include/linux/slub_def.h
@@ -86,7 +86,7 @@ struct kmem_cache {
struct kmem_cache_order_objects max;
struct kmem_cache_order_objects min;
@@ -66176,7 +68373,7 @@ diff -urNp linux-2.6.32.49/include/linux/slub_def.h linux-2.6.32.49/include/linu
void (*ctor)(void *);
int inuse; /* Offset to metadata */
int align; /* Alignment */
-@@ -215,7 +215,7 @@ static __always_inline struct kmem_cache
+@@ -215,7 +215,7 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size)
#endif
void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
@@ -66185,9 +68382,10 @@ diff -urNp linux-2.6.32.49/include/linux/slub_def.h linux-2.6.32.49/include/linu
#ifdef CONFIG_KMEMTRACE
extern void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags);
-diff -urNp linux-2.6.32.49/include/linux/sonet.h linux-2.6.32.49/include/linux/sonet.h
---- linux-2.6.32.49/include/linux/sonet.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sonet.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/sonet.h b/include/linux/sonet.h
+index 67ad11f..0bbd8af 100644
+--- a/include/linux/sonet.h
++++ b/include/linux/sonet.h
@@ -61,7 +61,7 @@ struct sonet_stats {
#include <asm/atomic.h>
@@ -66197,9 +68395,10 @@ diff -urNp linux-2.6.32.49/include/linux/sonet.h linux-2.6.32.49/include/linux/s
__SONET_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.32.49/include/linux/sunrpc/cache.h linux-2.6.32.49/include/linux/sunrpc/cache.h
---- linux-2.6.32.49/include/linux/sunrpc/cache.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sunrpc/cache.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
+index 6f52b4d..5500323 100644
+--- a/include/linux/sunrpc/cache.h
++++ b/include/linux/sunrpc/cache.h
@@ -125,7 +125,7 @@ struct cache_detail {
*/
struct cache_req {
@@ -66209,10 +68408,11 @@ diff -urNp linux-2.6.32.49/include/linux/sunrpc/cache.h linux-2.6.32.49/include/
/* this must be embedded in a deferred_request that is being
* delayed awaiting cache-fill
*/
-diff -urNp linux-2.6.32.49/include/linux/sunrpc/clnt.h linux-2.6.32.49/include/linux/sunrpc/clnt.h
---- linux-2.6.32.49/include/linux/sunrpc/clnt.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sunrpc/clnt.h 2011-11-15 19:59:43.000000000 -0500
-@@ -167,9 +167,9 @@ static inline unsigned short rpc_get_por
+diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
+index 8ed9642..101ceab 100644
+--- a/include/linux/sunrpc/clnt.h
++++ b/include/linux/sunrpc/clnt.h
+@@ -167,9 +167,9 @@ static inline unsigned short rpc_get_port(const struct sockaddr *sap)
{
switch (sap->sa_family) {
case AF_INET:
@@ -66224,7 +68424,7 @@ diff -urNp linux-2.6.32.49/include/linux/sunrpc/clnt.h linux-2.6.32.49/include/l
}
return 0;
}
-@@ -202,7 +202,7 @@ static inline bool __rpc_cmp_addr4(const
+@@ -202,7 +202,7 @@ static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1,
static inline bool __rpc_copy_addr4(struct sockaddr *dst,
const struct sockaddr *src)
{
@@ -66233,7 +68433,7 @@ diff -urNp linux-2.6.32.49/include/linux/sunrpc/clnt.h linux-2.6.32.49/include/l
struct sockaddr_in *dsin = (struct sockaddr_in *) dst;
dsin->sin_family = ssin->sin_family;
-@@ -299,7 +299,7 @@ static inline u32 rpc_get_scope_id(const
+@@ -299,7 +299,7 @@ static inline u32 rpc_get_scope_id(const struct sockaddr *sa)
if (sa->sa_family != AF_INET6)
return 0;
@@ -66242,9 +68442,10 @@ diff -urNp linux-2.6.32.49/include/linux/sunrpc/clnt.h linux-2.6.32.49/include/l
}
#endif /* __KERNEL__ */
-diff -urNp linux-2.6.32.49/include/linux/sunrpc/svc_rdma.h linux-2.6.32.49/include/linux/sunrpc/svc_rdma.h
---- linux-2.6.32.49/include/linux/sunrpc/svc_rdma.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sunrpc/svc_rdma.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
+index c14fe86..393245e 100644
+--- a/include/linux/sunrpc/svc_rdma.h
++++ b/include/linux/sunrpc/svc_rdma.h
@@ -53,15 +53,15 @@ extern unsigned int svcrdma_ord;
extern unsigned int svcrdma_max_requests;
extern unsigned int svcrdma_max_req_size;
@@ -66270,9 +68471,10 @@ diff -urNp linux-2.6.32.49/include/linux/sunrpc/svc_rdma.h linux-2.6.32.49/inclu
#define RPCRDMA_VERSION 1
-diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux/suspend.h
---- linux-2.6.32.49/include/linux/suspend.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/suspend.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/suspend.h b/include/linux/suspend.h
+index 5e781d8..1e62818 100644
+--- a/include/linux/suspend.h
++++ b/include/linux/suspend.h
@@ -104,15 +104,15 @@ typedef int __bitwise suspend_state_t;
* which require special recovery actions in that situation.
*/
@@ -66307,7 +68509,7 @@ diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux
extern int suspend_valid_only_mem(suspend_state_t state);
/**
-@@ -145,7 +145,7 @@ extern int pm_suspend(suspend_state_t st
+@@ -145,7 +145,7 @@ extern int pm_suspend(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
#define suspend_valid_only_mem NULL
@@ -66316,7 +68518,7 @@ diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
#endif /* !CONFIG_SUSPEND */
-@@ -215,16 +215,16 @@ extern void mark_free_pages(struct zone
+@@ -215,16 +215,16 @@ extern void mark_free_pages(struct zone *zone);
* platforms which require special recovery actions in that situation.
*/
struct platform_hibernation_ops {
@@ -66343,7 +68545,7 @@ diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux
};
#ifdef CONFIG_HIBERNATION
-@@ -243,7 +243,7 @@ extern void swsusp_set_page_free(struct
+@@ -243,7 +243,7 @@ extern void swsusp_set_page_free(struct page *);
extern void swsusp_unset_page_free(struct page *);
extern unsigned long get_safe_page(gfp_t gfp_mask);
@@ -66352,7 +68554,7 @@ diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux
extern int hibernate(void);
extern bool system_entering_hibernation(void);
#else /* CONFIG_HIBERNATION */
-@@ -251,7 +251,7 @@ static inline int swsusp_page_is_forbidd
+@@ -251,7 +251,7 @@ static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
static inline void swsusp_set_page_free(struct page *p) {}
static inline void swsusp_unset_page_free(struct page *p) {}
@@ -66361,9 +68563,10 @@ diff -urNp linux-2.6.32.49/include/linux/suspend.h linux-2.6.32.49/include/linux
static inline int hibernate(void) { return -ENOSYS; }
static inline bool system_entering_hibernation(void) { return false; }
#endif /* CONFIG_HIBERNATION */
-diff -urNp linux-2.6.32.49/include/linux/sysctl.h linux-2.6.32.49/include/linux/sysctl.h
---- linux-2.6.32.49/include/linux/sysctl.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sysctl.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
+index 0eb6942..a805cb6 100644
+--- a/include/linux/sysctl.h
++++ b/include/linux/sysctl.h
@@ -164,7 +164,11 @@ enum
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
};
@@ -66377,7 +68580,7 @@ diff -urNp linux-2.6.32.49/include/linux/sysctl.h linux-2.6.32.49/include/linux/
/* CTL_VM names: */
enum
-@@ -982,6 +986,8 @@ typedef int proc_handler (struct ctl_tab
+@@ -982,6 +986,8 @@ typedef int proc_handler (struct ctl_table *ctl, int write,
extern int proc_dostring(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
@@ -66386,7 +68589,7 @@ diff -urNp linux-2.6.32.49/include/linux/sysctl.h linux-2.6.32.49/include/linux/
extern int proc_dointvec(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
extern int proc_dointvec_minmax(struct ctl_table *, int,
-@@ -1003,6 +1009,7 @@ extern int do_sysctl (int __user *name,
+@@ -1003,6 +1009,7 @@ extern int do_sysctl (int __user *name, int nlen,
extern ctl_handler sysctl_data;
extern ctl_handler sysctl_string;
@@ -66394,9 +68597,10 @@ diff -urNp linux-2.6.32.49/include/linux/sysctl.h linux-2.6.32.49/include/linux/
extern ctl_handler sysctl_intvec;
extern ctl_handler sysctl_jiffies;
extern ctl_handler sysctl_ms_jiffies;
-diff -urNp linux-2.6.32.49/include/linux/sysfs.h linux-2.6.32.49/include/linux/sysfs.h
---- linux-2.6.32.49/include/linux/sysfs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/sysfs.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
+index 9d68fed..71f02cc 100644
+--- a/include/linux/sysfs.h
++++ b/include/linux/sysfs.h
@@ -75,8 +75,8 @@ struct bin_attribute {
};
@@ -66408,9 +68612,10 @@ diff -urNp linux-2.6.32.49/include/linux/sysfs.h linux-2.6.32.49/include/linux/s
};
struct sysfs_dirent;
-diff -urNp linux-2.6.32.49/include/linux/thread_info.h linux-2.6.32.49/include/linux/thread_info.h
---- linux-2.6.32.49/include/linux/thread_info.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/thread_info.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
+index a8cc4e1..98d3b85 100644
+--- a/include/linux/thread_info.h
++++ b/include/linux/thread_info.h
@@ -23,7 +23,7 @@ struct restart_block {
};
/* For futex_wait and futex_wait_requeue_pi */
@@ -66420,9 +68625,10 @@ diff -urNp linux-2.6.32.49/include/linux/thread_info.h linux-2.6.32.49/include/l
u32 val;
u32 flags;
u32 bitset;
-diff -urNp linux-2.6.32.49/include/linux/tty.h linux-2.6.32.49/include/linux/tty.h
---- linux-2.6.32.49/include/linux/tty.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/tty.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/tty.h b/include/linux/tty.h
+index e9c57e9..ee6d489 100644
+--- a/include/linux/tty.h
++++ b/include/linux/tty.h
@@ -493,7 +493,6 @@ extern void tty_ldisc_begin(void);
/* This last one is just for the tty layer internals and shouldn't be used elsewhere */
extern void tty_ldisc_enable(struct tty_struct *tty);
@@ -66431,9 +68637,10 @@ diff -urNp linux-2.6.32.49/include/linux/tty.h linux-2.6.32.49/include/linux/tty
/* n_tty.c */
extern struct tty_ldisc_ops tty_ldisc_N_TTY;
-diff -urNp linux-2.6.32.49/include/linux/tty_ldisc.h linux-2.6.32.49/include/linux/tty_ldisc.h
---- linux-2.6.32.49/include/linux/tty_ldisc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/tty_ldisc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
+index 0c4ee9b..9f7c426 100644
+--- a/include/linux/tty_ldisc.h
++++ b/include/linux/tty_ldisc.h
@@ -139,7 +139,7 @@ struct tty_ldisc_ops {
struct module *owner;
@@ -66443,9 +68650,10 @@ diff -urNp linux-2.6.32.49/include/linux/tty_ldisc.h linux-2.6.32.49/include/lin
};
struct tty_ldisc {
-diff -urNp linux-2.6.32.49/include/linux/types.h linux-2.6.32.49/include/linux/types.h
---- linux-2.6.32.49/include/linux/types.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/types.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/types.h b/include/linux/types.h
+index c42724f..d190eee 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
@@ -191,10 +191,26 @@ typedef struct {
volatile int counter;
} atomic_t;
@@ -66473,10 +68681,11 @@ diff -urNp linux-2.6.32.49/include/linux/types.h linux-2.6.32.49/include/linux/t
#endif
struct ustat {
-diff -urNp linux-2.6.32.49/include/linux/uaccess.h linux-2.6.32.49/include/linux/uaccess.h
---- linux-2.6.32.49/include/linux/uaccess.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/uaccess.h 2011-11-15 19:59:43.000000000 -0500
-@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_
+diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
+index 6b58367..53a3e8e 100644
+--- a/include/linux/uaccess.h
++++ b/include/linux/uaccess.h
+@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_user_nocache(void *to,
long ret; \
mm_segment_t old_fs = get_fs(); \
\
@@ -66491,7 +68700,7 @@ diff -urNp linux-2.6.32.49/include/linux/uaccess.h linux-2.6.32.49/include/linux
ret; \
})
-@@ -93,7 +93,7 @@ static inline unsigned long __copy_from_
+@@ -93,7 +93,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
* Safely read from address @src to the buffer at @dst. If a kernel fault
* happens, handle that and return -EFAULT.
*/
@@ -66500,7 +68709,7 @@ diff -urNp linux-2.6.32.49/include/linux/uaccess.h linux-2.6.32.49/include/linux
/*
* probe_kernel_write(): safely attempt to write to a location
-@@ -104,6 +104,6 @@ extern long probe_kernel_read(void *dst,
+@@ -104,6 +104,6 @@ extern long probe_kernel_read(void *dst, void *src, size_t size);
* Safely write to address @dst from the buffer at @src. If a kernel fault
* happens, handle that and return -EFAULT.
*/
@@ -66508,9 +68717,10 @@ diff -urNp linux-2.6.32.49/include/linux/uaccess.h linux-2.6.32.49/include/linux
+extern long probe_kernel_write(void *dst, const void *src, size_t size);
#endif /* __LINUX_UACCESS_H__ */
-diff -urNp linux-2.6.32.49/include/linux/unaligned/access_ok.h linux-2.6.32.49/include/linux/unaligned/access_ok.h
---- linux-2.6.32.49/include/linux/unaligned/access_ok.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/unaligned/access_ok.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/linux/unaligned/access_ok.h b/include/linux/unaligned/access_ok.h
+index 99c1b4d..bb94261 100644
+--- a/include/linux/unaligned/access_ok.h
++++ b/include/linux/unaligned/access_ok.h
@@ -6,32 +6,32 @@
static inline u16 get_unaligned_le16(const void *p)
@@ -66550,9 +68760,10 @@ diff -urNp linux-2.6.32.49/include/linux/unaligned/access_ok.h linux-2.6.32.49/i
}
static inline void put_unaligned_le16(u16 val, void *p)
-diff -urNp linux-2.6.32.49/include/linux/vermagic.h linux-2.6.32.49/include/linux/vermagic.h
---- linux-2.6.32.49/include/linux/vermagic.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/vermagic.h 2011-11-18 18:09:44.000000000 -0500
+diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
+index 79b9837..b5a56f9 100644
+--- a/include/linux/vermagic.h
++++ b/include/linux/vermagic.h
@@ -26,9 +26,35 @@
#define MODULE_ARCH_VERMAGIC ""
#endif
@@ -66590,10 +68801,11 @@ diff -urNp linux-2.6.32.49/include/linux/vermagic.h linux-2.6.32.49/include/linu
+ MODULE_PAX_REFCOUNT MODULE_CONSTIFY_PLUGIN MODULE_STACKLEAK_PLUGIN \
+ MODULE_GRSEC
-diff -urNp linux-2.6.32.49/include/linux/vmalloc.h linux-2.6.32.49/include/linux/vmalloc.h
---- linux-2.6.32.49/include/linux/vmalloc.h 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/include/linux/vmalloc.h 2011-11-26 19:46:42.000000000 -0500
-@@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining
+diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
+index 819a634..462ac12 100644
+--- a/include/linux/vmalloc.h
++++ b/include/linux/vmalloc.h
+@@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */
#define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */
@@ -66605,7 +68817,7 @@ diff -urNp linux-2.6.32.49/include/linux/vmalloc.h linux-2.6.32.49/include/linux
/* bits [20..32] reserved for arch specific ioremap internals */
/*
-@@ -124,4 +129,81 @@ struct vm_struct **pcpu_get_vm_areas(con
+@@ -124,4 +129,81 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
@@ -66687,10 +68899,11 @@ diff -urNp linux-2.6.32.49/include/linux/vmalloc.h linux-2.6.32.49/include/linux
+})
+
#endif /* _LINUX_VMALLOC_H */
-diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/vmstat.h
---- linux-2.6.32.49/include/linux/vmstat.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/linux/vmstat.h 2011-11-15 19:59:43.000000000 -0500
-@@ -136,18 +136,18 @@ static inline void vm_events_fold_cpu(in
+diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
+index 13070d6..aa4159a 100644
+--- a/include/linux/vmstat.h
++++ b/include/linux/vmstat.h
+@@ -136,18 +136,18 @@ static inline void vm_events_fold_cpu(int cpu)
/*
* Zone based page accounting with per cpu differentials.
*/
@@ -66713,7 +68926,7 @@ diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/
#ifdef CONFIG_SMP
if (x < 0)
x = 0;
-@@ -158,7 +158,7 @@ static inline unsigned long global_page_
+@@ -158,7 +158,7 @@ static inline unsigned long global_page_state(enum zone_stat_item item)
static inline unsigned long zone_page_state(struct zone *zone,
enum zone_stat_item item)
{
@@ -66722,7 +68935,7 @@ diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/
#ifdef CONFIG_SMP
if (x < 0)
x = 0;
-@@ -175,7 +175,7 @@ static inline unsigned long zone_page_st
+@@ -175,7 +175,7 @@ static inline unsigned long zone_page_state(struct zone *zone,
static inline unsigned long zone_page_state_snapshot(struct zone *zone,
enum zone_stat_item item)
{
@@ -66731,7 +68944,7 @@ diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/
#ifdef CONFIG_SMP
int cpu;
-@@ -264,8 +264,8 @@ static inline void __mod_zone_page_state
+@@ -264,8 +264,8 @@ static inline void __mod_zone_page_state(struct zone *zone,
static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
@@ -66742,7 +68955,7 @@ diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/
}
static inline void __inc_zone_page_state(struct page *page,
-@@ -276,8 +276,8 @@ static inline void __inc_zone_page_state
+@@ -276,8 +276,8 @@ static inline void __inc_zone_page_state(struct page *page,
static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
{
@@ -66753,9 +68966,10 @@ diff -urNp linux-2.6.32.49/include/linux/vmstat.h linux-2.6.32.49/include/linux/
}
static inline void __dec_zone_page_state(struct page *page,
-diff -urNp linux-2.6.32.49/include/media/saa7146_vv.h linux-2.6.32.49/include/media/saa7146_vv.h
---- linux-2.6.32.49/include/media/saa7146_vv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/media/saa7146_vv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
+index eed5fcc..5080d24 100644
+--- a/include/media/saa7146_vv.h
++++ b/include/media/saa7146_vv.h
@@ -167,7 +167,7 @@ struct saa7146_ext_vv
int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *);
@@ -66765,9 +68979,10 @@ diff -urNp linux-2.6.32.49/include/media/saa7146_vv.h linux-2.6.32.49/include/me
/* pointer to the saa7146 core ops */
const struct v4l2_ioctl_ops *core_ops;
-diff -urNp linux-2.6.32.49/include/media/v4l2-dev.h linux-2.6.32.49/include/media/v4l2-dev.h
---- linux-2.6.32.49/include/media/v4l2-dev.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/media/v4l2-dev.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
+index 73c9867..2da8837 100644
+--- a/include/media/v4l2-dev.h
++++ b/include/media/v4l2-dev.h
@@ -34,7 +34,7 @@ struct v4l2_device;
#define V4L2_FL_UNREGISTERED (0)
@@ -66785,10 +69000,11 @@ diff -urNp linux-2.6.32.49/include/media/v4l2-dev.h linux-2.6.32.49/include/medi
/*
* Newer version of video_device, handled by videodev2.c
-diff -urNp linux-2.6.32.49/include/media/v4l2-device.h linux-2.6.32.49/include/media/v4l2-device.h
---- linux-2.6.32.49/include/media/v4l2-device.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/media/v4l2-device.h 2011-11-15 19:59:43.000000000 -0500
-@@ -71,7 +71,7 @@ int __must_check v4l2_device_register(st
+diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
+index 5d5d550..f559ef1 100644
+--- a/include/media/v4l2-device.h
++++ b/include/media/v4l2-device.h
+@@ -71,7 +71,7 @@ int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4
this function returns 0. If the name ends with a digit (e.g. cx18),
then the name will be set to cx18-0 since cx180 looks really odd. */
int v4l2_device_set_name(struct v4l2_device *v4l2_dev, const char *basename,
@@ -66797,9 +69013,10 @@ diff -urNp linux-2.6.32.49/include/media/v4l2-device.h linux-2.6.32.49/include/m
/* Set v4l2_dev->dev to NULL. Call when the USB parent disconnects.
Since the parent disappears this ensures that v4l2_dev doesn't have an
-diff -urNp linux-2.6.32.49/include/media/v4l2-ioctl.h linux-2.6.32.49/include/media/v4l2-ioctl.h
---- linux-2.6.32.49/include/media/v4l2-ioctl.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/media/v4l2-ioctl.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
+index 7a4529d..7244290 100644
+--- a/include/media/v4l2-ioctl.h
++++ b/include/media/v4l2-ioctl.h
@@ -243,6 +243,7 @@ struct v4l2_ioctl_ops {
long (*vidioc_default) (struct file *file, void *fh,
int cmd, void *arg);
@@ -66808,10 +69025,11 @@ diff -urNp linux-2.6.32.49/include/media/v4l2-ioctl.h linux-2.6.32.49/include/me
/* v4l debugging and diagnostics */
-diff -urNp linux-2.6.32.49/include/net/flow.h linux-2.6.32.49/include/net/flow.h
---- linux-2.6.32.49/include/net/flow.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/flow.h 2011-11-15 19:59:43.000000000 -0500
-@@ -92,7 +92,7 @@ typedef int (*flow_resolve_t)(struct net
+diff --git a/include/net/flow.h b/include/net/flow.h
+index 809970b..c3df4f3 100644
+--- a/include/net/flow.h
++++ b/include/net/flow.h
+@@ -92,7 +92,7 @@ typedef int (*flow_resolve_t)(struct net *net, struct flowi *key, u16 family,
extern void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family,
u8 dir, flow_resolve_t resolver);
extern void flow_cache_flush(void);
@@ -66820,9 +69038,10 @@ diff -urNp linux-2.6.32.49/include/net/flow.h linux-2.6.32.49/include/net/flow.h
static inline int flow_cache_uli_match(struct flowi *fl1, struct flowi *fl2)
{
-diff -urNp linux-2.6.32.49/include/net/inetpeer.h linux-2.6.32.49/include/net/inetpeer.h
---- linux-2.6.32.49/include/net/inetpeer.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/inetpeer.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
+index 15e1f8fe..668837c 100644
+--- a/include/net/inetpeer.h
++++ b/include/net/inetpeer.h
@@ -24,7 +24,7 @@ struct inet_peer
__u32 dtime; /* the time of last use of not
* referenced entries */
@@ -66832,9 +69051,10 @@ diff -urNp linux-2.6.32.49/include/net/inetpeer.h linux-2.6.32.49/include/net/in
__u32 tcp_ts;
unsigned long tcp_ts_stamp;
};
-diff -urNp linux-2.6.32.49/include/net/ip_vs.h linux-2.6.32.49/include/net/ip_vs.h
---- linux-2.6.32.49/include/net/ip_vs.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/ip_vs.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
+index 98978e7..2243a3d 100644
+--- a/include/net/ip_vs.h
++++ b/include/net/ip_vs.h
@@ -365,7 +365,7 @@ struct ip_vs_conn {
struct ip_vs_conn *control; /* Master control connection */
atomic_t n_control; /* Number of controlled ones */
@@ -66853,9 +69073,10 @@ diff -urNp linux-2.6.32.49/include/net/ip_vs.h linux-2.6.32.49/include/net/ip_vs
atomic_t weight; /* server weight */
atomic_t refcnt; /* reference counter */
-diff -urNp linux-2.6.32.49/include/net/irda/ircomm_core.h linux-2.6.32.49/include/net/irda/ircomm_core.h
---- linux-2.6.32.49/include/net/irda/ircomm_core.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/irda/ircomm_core.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/irda/ircomm_core.h b/include/net/irda/ircomm_core.h
+index 69b610a..fe3962c 100644
+--- a/include/net/irda/ircomm_core.h
++++ b/include/net/irda/ircomm_core.h
@@ -51,7 +51,7 @@ typedef struct {
int (*connect_response)(struct ircomm_cb *, struct sk_buff *);
int (*disconnect_request)(struct ircomm_cb *, struct sk_buff *,
@@ -66865,9 +69086,10 @@ diff -urNp linux-2.6.32.49/include/net/irda/ircomm_core.h linux-2.6.32.49/includ
struct ircomm_cb {
irda_queue_t queue;
-diff -urNp linux-2.6.32.49/include/net/irda/ircomm_tty.h linux-2.6.32.49/include/net/irda/ircomm_tty.h
---- linux-2.6.32.49/include/net/irda/ircomm_tty.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/irda/ircomm_tty.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
+index eea2e61..08c692d 100644
+--- a/include/net/irda/ircomm_tty.h
++++ b/include/net/irda/ircomm_tty.h
@@ -35,6 +35,7 @@
#include <linux/termios.h>
#include <linux/timer.h>
@@ -66887,9 +69109,10 @@ diff -urNp linux-2.6.32.49/include/net/irda/ircomm_tty.h linux-2.6.32.49/include
/* Protect concurent access to :
* o self->open_count
-diff -urNp linux-2.6.32.49/include/net/iucv/af_iucv.h linux-2.6.32.49/include/net/iucv/af_iucv.h
---- linux-2.6.32.49/include/net/iucv/af_iucv.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/iucv/af_iucv.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
+index f82a1e8..82d81e8 100644
+--- a/include/net/iucv/af_iucv.h
++++ b/include/net/iucv/af_iucv.h
@@ -87,7 +87,7 @@ struct iucv_sock {
struct iucv_sock_list {
struct hlist_head head;
@@ -66899,9 +69122,10 @@ diff -urNp linux-2.6.32.49/include/net/iucv/af_iucv.h linux-2.6.32.49/include/ne
};
unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
-diff -urNp linux-2.6.32.49/include/net/lapb.h linux-2.6.32.49/include/net/lapb.h
---- linux-2.6.32.49/include/net/lapb.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/lapb.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/lapb.h b/include/net/lapb.h
+index 96cb5dd..25e8d4f 100644
+--- a/include/net/lapb.h
++++ b/include/net/lapb.h
@@ -95,7 +95,7 @@ struct lapb_cb {
struct sk_buff_head write_queue;
struct sk_buff_head ack_queue;
@@ -66911,9 +69135,10 @@ diff -urNp linux-2.6.32.49/include/net/lapb.h linux-2.6.32.49/include/net/lapb.h
/* FRMR control information */
struct lapb_frame frmr_data;
-diff -urNp linux-2.6.32.49/include/net/neighbour.h linux-2.6.32.49/include/net/neighbour.h
---- linux-2.6.32.49/include/net/neighbour.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/neighbour.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/neighbour.h b/include/net/neighbour.h
+index 3817fda..cdb2343 100644
+--- a/include/net/neighbour.h
++++ b/include/net/neighbour.h
@@ -131,7 +131,7 @@ struct neigh_ops
int (*connected_output)(struct sk_buff*);
int (*hh_output)(struct sk_buff*);
@@ -66923,10 +69148,11 @@ diff -urNp linux-2.6.32.49/include/net/neighbour.h linux-2.6.32.49/include/net/n
struct pneigh_entry
{
-diff -urNp linux-2.6.32.49/include/net/netlink.h linux-2.6.32.49/include/net/netlink.h
---- linux-2.6.32.49/include/net/netlink.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/netlink.h 2011-11-15 19:59:43.000000000 -0500
-@@ -335,7 +335,7 @@ static inline int nlmsg_ok(const struct
+diff --git a/include/net/netlink.h b/include/net/netlink.h
+index c344646..4778c71 100644
+--- a/include/net/netlink.h
++++ b/include/net/netlink.h
+@@ -335,7 +335,7 @@ static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining)
{
return (remaining >= (int) sizeof(struct nlmsghdr) &&
nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
@@ -66935,7 +69161,7 @@ diff -urNp linux-2.6.32.49/include/net/netlink.h linux-2.6.32.49/include/net/net
}
/**
-@@ -558,7 +558,7 @@ static inline void *nlmsg_get_pos(struct
+@@ -558,7 +558,7 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb)
static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
{
if (mark)
@@ -66944,9 +69170,10 @@ diff -urNp linux-2.6.32.49/include/net/netlink.h linux-2.6.32.49/include/net/net
}
/**
-diff -urNp linux-2.6.32.49/include/net/netns/ipv4.h linux-2.6.32.49/include/net/netns/ipv4.h
---- linux-2.6.32.49/include/net/netns/ipv4.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/netns/ipv4.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
+index 9a4b8b7..e49e077 100644
+--- a/include/net/netns/ipv4.h
++++ b/include/net/netns/ipv4.h
@@ -54,7 +54,7 @@ struct netns_ipv4 {
int current_rt_cache_rebuild_count;
@@ -66956,9 +69183,10 @@ diff -urNp linux-2.6.32.49/include/net/netns/ipv4.h linux-2.6.32.49/include/net/
#ifdef CONFIG_IP_MROUTE
struct sock *mroute_sk;
-diff -urNp linux-2.6.32.49/include/net/sctp/sctp.h linux-2.6.32.49/include/net/sctp/sctp.h
---- linux-2.6.32.49/include/net/sctp/sctp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/sctp/sctp.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
+index 8a6d529..171f401 100644
+--- a/include/net/sctp/sctp.h
++++ b/include/net/sctp/sctp.h
@@ -305,8 +305,8 @@ extern int sctp_debug_flag;
#else /* SCTP_DEBUG */
@@ -66970,9 +69198,10 @@ diff -urNp linux-2.6.32.49/include/net/sctp/sctp.h linux-2.6.32.49/include/net/s
#define SCTP_ENABLE_DEBUG
#define SCTP_DISABLE_DEBUG
#define SCTP_ASSERT(expr, str, func)
-diff -urNp linux-2.6.32.49/include/net/secure_seq.h linux-2.6.32.49/include/net/secure_seq.h
---- linux-2.6.32.49/include/net/secure_seq.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/secure_seq.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/secure_seq.h b/include/net/secure_seq.h
+index d97f689..f3b90ab 100644
+--- a/include/net/secure_seq.h
++++ b/include/net/secure_seq.h
@@ -7,14 +7,14 @@ extern __u32 secure_ip_id(__be32 daddr);
extern __u32 secure_ipv6_id(const __be32 daddr[4]);
extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
@@ -66992,9 +69221,10 @@ diff -urNp linux-2.6.32.49/include/net/secure_seq.h linux-2.6.32.49/include/net/
+ __be16 sport, __be16 dport);
#endif /* _NET_SECURE_SEQ */
-diff -urNp linux-2.6.32.49/include/net/sock.h linux-2.6.32.49/include/net/sock.h
---- linux-2.6.32.49/include/net/sock.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/sock.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/sock.h b/include/net/sock.h
+index 9f96394..76fc9c7 100644
+--- a/include/net/sock.h
++++ b/include/net/sock.h
@@ -272,7 +272,7 @@ struct sock {
rwlock_t sk_callback_lock;
int sk_err,
@@ -67004,7 +69234,7 @@ diff -urNp linux-2.6.32.49/include/net/sock.h linux-2.6.32.49/include/net/sock.h
unsigned short sk_ack_backlog;
unsigned short sk_max_ack_backlog;
__u32 sk_priority;
-@@ -737,7 +737,7 @@ static inline void sk_refcnt_debug_relea
+@@ -737,7 +737,7 @@ static inline void sk_refcnt_debug_release(const struct sock *sk)
extern void sock_prot_inuse_add(struct net *net, struct proto *prot, int inc);
extern int sock_prot_inuse_get(struct net *net, struct proto *proto);
#else
@@ -67013,9 +69243,10 @@ diff -urNp linux-2.6.32.49/include/net/sock.h linux-2.6.32.49/include/net/sock.h
int inc)
{
}
-diff -urNp linux-2.6.32.49/include/net/tcp.h linux-2.6.32.49/include/net/tcp.h
---- linux-2.6.32.49/include/net/tcp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/tcp.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/tcp.h b/include/net/tcp.h
+index 6cfe18b..dd21acb 100644
+--- a/include/net/tcp.h
++++ b/include/net/tcp.h
@@ -1444,8 +1444,8 @@ enum tcp_seq_states {
struct tcp_seq_afinfo {
char *name;
@@ -67027,9 +69258,10 @@ diff -urNp linux-2.6.32.49/include/net/tcp.h linux-2.6.32.49/include/net/tcp.h
};
struct tcp_iter_state {
-diff -urNp linux-2.6.32.49/include/net/udp.h linux-2.6.32.49/include/net/udp.h
---- linux-2.6.32.49/include/net/udp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/net/udp.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/net/udp.h b/include/net/udp.h
+index f98abd2..b4b042f 100644
+--- a/include/net/udp.h
++++ b/include/net/udp.h
@@ -187,8 +187,8 @@ struct udp_seq_afinfo {
char *name;
sa_family_t family;
@@ -67041,9 +69273,10 @@ diff -urNp linux-2.6.32.49/include/net/udp.h linux-2.6.32.49/include/net/udp.h
};
struct udp_iter_state {
-diff -urNp linux-2.6.32.49/include/rdma/iw_cm.h linux-2.6.32.49/include/rdma/iw_cm.h
---- linux-2.6.32.49/include/rdma/iw_cm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/rdma/iw_cm.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
+index cbb822e..e9c1cbe 100644
+--- a/include/rdma/iw_cm.h
++++ b/include/rdma/iw_cm.h
@@ -129,7 +129,7 @@ struct iw_cm_verbs {
int backlog);
@@ -67053,9 +69286,10 @@ diff -urNp linux-2.6.32.49/include/rdma/iw_cm.h linux-2.6.32.49/include/rdma/iw_
/**
* iw_create_cm_id - Create an IW CM identifier.
-diff -urNp linux-2.6.32.49/include/scsi/libfc.h linux-2.6.32.49/include/scsi/libfc.h
---- linux-2.6.32.49/include/scsi/libfc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/scsi/libfc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
+index 09a124b..caa8ca8 100644
+--- a/include/scsi/libfc.h
++++ b/include/scsi/libfc.h
@@ -675,6 +675,7 @@ struct libfc_function_template {
*/
void (*disc_stop_final) (struct fc_lport *);
@@ -67073,9 +69307,10 @@ diff -urNp linux-2.6.32.49/include/scsi/libfc.h linux-2.6.32.49/include/scsi/lib
u8 link_up;
u8 qfull;
enum fc_lport_state state;
-diff -urNp linux-2.6.32.49/include/scsi/scsi_device.h linux-2.6.32.49/include/scsi/scsi_device.h
---- linux-2.6.32.49/include/scsi/scsi_device.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/scsi/scsi_device.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
+index de8e180..f15e0d7 100644
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
@@ -156,9 +156,9 @@ struct scsi_device {
unsigned int max_device_blocked; /* what device_blocked counts down from */
#define SCSI_DEFAULT_DEVICE_BLOCKED 3
@@ -67089,9 +69324,10 @@ diff -urNp linux-2.6.32.49/include/scsi/scsi_device.h linux-2.6.32.49/include/sc
struct device sdev_gendev,
sdev_dev;
-diff -urNp linux-2.6.32.49/include/scsi/scsi_transport_fc.h linux-2.6.32.49/include/scsi/scsi_transport_fc.h
---- linux-2.6.32.49/include/scsi/scsi_transport_fc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/scsi/scsi_transport_fc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
+index fc50bd6..81ba9cb 100644
+--- a/include/scsi/scsi_transport_fc.h
++++ b/include/scsi/scsi_transport_fc.h
@@ -708,7 +708,7 @@ struct fc_function_template {
unsigned long show_host_system_hostname:1;
@@ -67101,9 +69337,10 @@ diff -urNp linux-2.6.32.49/include/scsi/scsi_transport_fc.h linux-2.6.32.49/incl
/**
-diff -urNp linux-2.6.32.49/include/sound/ac97_codec.h linux-2.6.32.49/include/sound/ac97_codec.h
---- linux-2.6.32.49/include/sound/ac97_codec.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/ac97_codec.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
+index 3dae3f7..8440d6f 100644
+--- a/include/sound/ac97_codec.h
++++ b/include/sound/ac97_codec.h
@@ -419,15 +419,15 @@
struct snd_ac97;
@@ -67136,9 +69373,10 @@ diff -urNp linux-2.6.32.49/include/sound/ac97_codec.h linux-2.6.32.49/include/so
void *private_data;
void (*private_free) (struct snd_ac97 *ac97);
/* --- */
-diff -urNp linux-2.6.32.49/include/sound/ak4xxx-adda.h linux-2.6.32.49/include/sound/ak4xxx-adda.h
---- linux-2.6.32.49/include/sound/ak4xxx-adda.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/ak4xxx-adda.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
+index 891cf1a..a94ba2b 100644
+--- a/include/sound/ak4xxx-adda.h
++++ b/include/sound/ak4xxx-adda.h
@@ -35,7 +35,7 @@ struct snd_ak4xxx_ops {
void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg,
unsigned char val);
@@ -67148,9 +69386,10 @@ diff -urNp linux-2.6.32.49/include/sound/ak4xxx-adda.h linux-2.6.32.49/include/s
#define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */
-diff -urNp linux-2.6.32.49/include/sound/hwdep.h linux-2.6.32.49/include/sound/hwdep.h
---- linux-2.6.32.49/include/sound/hwdep.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/hwdep.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
+index 8c05e47..2b5df97 100644
+--- a/include/sound/hwdep.h
++++ b/include/sound/hwdep.h
@@ -49,7 +49,7 @@ struct snd_hwdep_ops {
struct snd_hwdep_dsp_status *status);
int (*dsp_load)(struct snd_hwdep *hw,
@@ -67160,9 +69399,10 @@ diff -urNp linux-2.6.32.49/include/sound/hwdep.h linux-2.6.32.49/include/sound/h
struct snd_hwdep {
struct snd_card *card;
-diff -urNp linux-2.6.32.49/include/sound/info.h linux-2.6.32.49/include/sound/info.h
---- linux-2.6.32.49/include/sound/info.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/info.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/info.h b/include/sound/info.h
+index 112e894..6fda5b5 100644
+--- a/include/sound/info.h
++++ b/include/sound/info.h
@@ -44,7 +44,7 @@ struct snd_info_entry_text {
struct snd_info_buffer *buffer);
void (*write)(struct snd_info_entry *entry,
@@ -67172,9 +69412,10 @@ diff -urNp linux-2.6.32.49/include/sound/info.h linux-2.6.32.49/include/sound/in
struct snd_info_entry_ops {
int (*open)(struct snd_info_entry *entry,
-diff -urNp linux-2.6.32.49/include/sound/pcm.h linux-2.6.32.49/include/sound/pcm.h
---- linux-2.6.32.49/include/sound/pcm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/pcm.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/pcm.h b/include/sound/pcm.h
+index de6d981..590a550 100644
+--- a/include/sound/pcm.h
++++ b/include/sound/pcm.h
@@ -80,6 +80,7 @@ struct snd_pcm_ops {
int (*mmap)(struct snd_pcm_substream *substream, struct vm_area_struct *vma);
int (*ack)(struct snd_pcm_substream *substream);
@@ -67183,9 +69424,10 @@ diff -urNp linux-2.6.32.49/include/sound/pcm.h linux-2.6.32.49/include/sound/pcm
/*
*
-diff -urNp linux-2.6.32.49/include/sound/sb16_csp.h linux-2.6.32.49/include/sound/sb16_csp.h
---- linux-2.6.32.49/include/sound/sb16_csp.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/sb16_csp.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h
+index 736eac7..fe8a80f 100644
+--- a/include/sound/sb16_csp.h
++++ b/include/sound/sb16_csp.h
@@ -139,7 +139,7 @@ struct snd_sb_csp_ops {
int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
int (*csp_stop) (struct snd_sb_csp * p);
@@ -67195,9 +69437,10 @@ diff -urNp linux-2.6.32.49/include/sound/sb16_csp.h linux-2.6.32.49/include/soun
/*
* CSP private data
-diff -urNp linux-2.6.32.49/include/sound/ymfpci.h linux-2.6.32.49/include/sound/ymfpci.h
---- linux-2.6.32.49/include/sound/ymfpci.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/sound/ymfpci.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
+index 444cd6b..3327cc5 100644
+--- a/include/sound/ymfpci.h
++++ b/include/sound/ymfpci.h
@@ -358,7 +358,7 @@ struct snd_ymfpci {
spinlock_t reg_lock;
spinlock_t voice_lock;
@@ -67207,9 +69450,10 @@ diff -urNp linux-2.6.32.49/include/sound/ymfpci.h linux-2.6.32.49/include/sound/
struct snd_info_entry *proc_entry;
const struct firmware *dsp_microcode;
const struct firmware *controller_microcode;
-diff -urNp linux-2.6.32.49/include/trace/events/irq.h linux-2.6.32.49/include/trace/events/irq.h
---- linux-2.6.32.49/include/trace/events/irq.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/trace/events/irq.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
+index b89f9db..f097b38 100644
+--- a/include/trace/events/irq.h
++++ b/include/trace/events/irq.h
@@ -34,7 +34,7 @@
*/
TRACE_EVENT(irq_handler_entry,
@@ -67246,9 +69490,10 @@ diff -urNp linux-2.6.32.49/include/trace/events/irq.h linux-2.6.32.49/include/tr
TP_ARGS(h, vec),
-diff -urNp linux-2.6.32.49/include/video/uvesafb.h linux-2.6.32.49/include/video/uvesafb.h
---- linux-2.6.32.49/include/video/uvesafb.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/include/video/uvesafb.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/include/video/uvesafb.h b/include/video/uvesafb.h
+index 0993a22..32ba2fe 100644
+--- a/include/video/uvesafb.h
++++ b/include/video/uvesafb.h
@@ -177,6 +177,7 @@ struct uvesafb_par {
u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
u8 pmi_setpal; /* PMI for palette changes */
@@ -67257,10 +69502,24 @@ diff -urNp linux-2.6.32.49/include/video/uvesafb.h linux-2.6.32.49/include/video
void *pmi_start;
void *pmi_pal;
u8 *vbe_state_orig; /*
-diff -urNp linux-2.6.32.49/init/do_mounts.c linux-2.6.32.49/init/do_mounts.c
---- linux-2.6.32.49/init/do_mounts.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/do_mounts.c 2011-11-15 19:59:43.000000000 -0500
-@@ -216,11 +216,11 @@ static void __init get_fs_names(char *pa
+diff --git a/init/Kconfig b/init/Kconfig
+index d72691b..3996e54 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -1004,7 +1004,7 @@ config SLUB_DEBUG
+
+ config COMPAT_BRK
+ bool "Disable heap randomization"
+- default y
++ default n
+ help
+ Randomizing heap placement makes heap exploits harder, but it
+ also breaks ancient binaries (including anything libc5 based).
+diff --git a/init/do_mounts.c b/init/do_mounts.c
+index bb008d0..4fa3933 100644
+--- a/init/do_mounts.c
++++ b/init/do_mounts.c
+@@ -216,11 +216,11 @@ static void __init get_fs_names(char *page)
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
{
@@ -67274,7 +69533,7 @@ diff -urNp linux-2.6.32.49/init/do_mounts.c linux-2.6.32.49/init/do_mounts.c
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
current->fs->pwd.mnt->mnt_sb->s_type->name,
-@@ -311,18 +311,18 @@ void __init change_floppy(char *fmt, ...
+@@ -311,18 +311,18 @@ void __init change_floppy(char *fmt, ...)
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
@@ -67305,9 +69564,10 @@ diff -urNp linux-2.6.32.49/init/do_mounts.c linux-2.6.32.49/init/do_mounts.c
+ sys_mount((__force char __user *)".", (__force char __user *)"/", NULL, MS_MOVE, NULL);
+ sys_chroot((__force char __user *)".");
}
-diff -urNp linux-2.6.32.49/init/do_mounts.h linux-2.6.32.49/init/do_mounts.h
---- linux-2.6.32.49/init/do_mounts.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/do_mounts.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/init/do_mounts.h b/init/do_mounts.h
+index f5b978a..69dbfe8 100644
+--- a/init/do_mounts.h
++++ b/init/do_mounts.h
@@ -15,15 +15,15 @@ extern int root_mountflags;
static inline int create_dev(char *name, dev_t dev)
@@ -67336,10 +69596,11 @@ diff -urNp linux-2.6.32.49/init/do_mounts.h linux-2.6.32.49/init/do_mounts.h
return 0;
if (!S_ISBLK(stat.st_mode))
return 0;
-diff -urNp linux-2.6.32.49/init/do_mounts_initrd.c linux-2.6.32.49/init/do_mounts_initrd.c
---- linux-2.6.32.49/init/do_mounts_initrd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/do_mounts_initrd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -32,7 +32,7 @@ static int __init do_linuxrc(void * shel
+diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
+index 614241b..4da046b 100644
+--- a/init/do_mounts_initrd.c
++++ b/init/do_mounts_initrd.c
+@@ -32,7 +32,7 @@ static int __init do_linuxrc(void * shell)
sys_close(old_fd);sys_close(root_fd);
sys_close(0);sys_close(1);sys_close(2);
sys_setsid();
@@ -67422,9 +69683,10 @@ diff -urNp linux-2.6.32.49/init/do_mounts_initrd.c linux-2.6.32.49/init/do_mount
+ sys_unlink((const char __force_user *)"/initrd.image");
return 0;
}
-diff -urNp linux-2.6.32.49/init/do_mounts_md.c linux-2.6.32.49/init/do_mounts_md.c
---- linux-2.6.32.49/init/do_mounts_md.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/do_mounts_md.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
+index 69aebbf..c0bf6a7 100644
+--- a/init/do_mounts_md.c
++++ b/init/do_mounts_md.c
@@ -170,7 +170,7 @@ static void __init md_setup_drive(void)
partitioned ? "_d" : "", minor,
md_setup_args[ent].device_names);
@@ -67452,9 +69714,10 @@ diff -urNp linux-2.6.32.49/init/do_mounts_md.c linux-2.6.32.49/init/do_mounts_md
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
-diff -urNp linux-2.6.32.49/init/initramfs.c linux-2.6.32.49/init/initramfs.c
---- linux-2.6.32.49/init/initramfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/initramfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/init/initramfs.c b/init/initramfs.c
+index 1fd59b8..a01b079 100644
+--- a/init/initramfs.c
++++ b/init/initramfs.c
@@ -74,7 +74,7 @@ static void __init free_hash(void)
}
}
@@ -67482,7 +69745,7 @@ diff -urNp linux-2.6.32.49/init/initramfs.c linux-2.6.32.49/init/initramfs.c
}
return 0;
}
-@@ -280,11 +280,11 @@ static void __init clean_path(char *path
+@@ -280,11 +280,11 @@ static void __init clean_path(char *path, mode_t mode)
{
struct stat st;
@@ -67563,22 +69826,11 @@ diff -urNp linux-2.6.32.49/init/initramfs.c linux-2.6.32.49/init/initramfs.c
state = SkipIt;
next_state = Reset;
return 0;
-diff -urNp linux-2.6.32.49/init/Kconfig linux-2.6.32.49/init/Kconfig
---- linux-2.6.32.49/init/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -1004,7 +1004,7 @@ config SLUB_DEBUG
-
- config COMPAT_BRK
- bool "Disable heap randomization"
-- default y
-+ default n
- help
- Randomizing heap placement makes heap exploits harder, but it
- also breaks ancient binaries (including anything libc5 based).
-diff -urNp linux-2.6.32.49/init/main.c linux-2.6.32.49/init/main.c
---- linux-2.6.32.49/init/main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -97,6 +97,7 @@ static inline void mark_rodata_ro(void)
+diff --git a/init/main.c b/init/main.c
+index 1eb4bd5..da8c6f5 100644
+--- a/init/main.c
++++ b/init/main.c
+@@ -97,6 +97,7 @@ static inline void mark_rodata_ro(void) { }
#ifdef CONFIG_TC
extern void tc_init(void);
#endif
@@ -67586,7 +69838,7 @@ diff -urNp linux-2.6.32.49/init/main.c linux-2.6.32.49/init/main.c
enum system_states system_state __read_mostly;
EXPORT_SYMBOL(system_state);
-@@ -183,6 +184,49 @@ static int __init set_reset_devices(char
+@@ -183,6 +184,49 @@ static int __init set_reset_devices(char *str)
__setup("reset_devices", set_reset_devices);
@@ -67706,7 +69958,7 @@ diff -urNp linux-2.6.32.49/init/main.c linux-2.6.32.49/init/main.c
}
-@@ -893,11 +938,13 @@ static int __init kernel_init(void * unu
+@@ -893,11 +938,13 @@ static int __init kernel_init(void * unused)
if (!ramdisk_execute_command)
ramdisk_execute_command = "/init";
@@ -67721,9 +69973,10 @@ diff -urNp linux-2.6.32.49/init/main.c linux-2.6.32.49/init/main.c
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
-diff -urNp linux-2.6.32.49/init/noinitramfs.c linux-2.6.32.49/init/noinitramfs.c
---- linux-2.6.32.49/init/noinitramfs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/init/noinitramfs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/init/noinitramfs.c b/init/noinitramfs.c
+index f4c1a3a..96c19bd 100644
+--- a/init/noinitramfs.c
++++ b/init/noinitramfs.c
@@ -29,7 +29,7 @@ static int __init default_rootfs(void)
{
int err;
@@ -67742,10 +69995,11 @@ diff -urNp linux-2.6.32.49/init/noinitramfs.c linux-2.6.32.49/init/noinitramfs.c
if (err < 0)
goto out;
-diff -urNp linux-2.6.32.49/ipc/mqueue.c linux-2.6.32.49/ipc/mqueue.c
---- linux-2.6.32.49/ipc/mqueue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/ipc/mqueue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -150,6 +150,7 @@ static struct inode *mqueue_get_inode(st
+diff --git a/ipc/mqueue.c b/ipc/mqueue.c
+index d01bc14..8df81db 100644
+--- a/ipc/mqueue.c
++++ b/ipc/mqueue.c
+@@ -150,6 +150,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
mq_bytes = (mq_msg_tblsz +
(info->attr.mq_maxmsg * info->attr.mq_msgsize));
@@ -67753,10 +70007,11 @@ diff -urNp linux-2.6.32.49/ipc/mqueue.c linux-2.6.32.49/ipc/mqueue.c
spin_lock(&mq_lock);
if (u->mq_bytes + mq_bytes < u->mq_bytes ||
u->mq_bytes + mq_bytes >
-diff -urNp linux-2.6.32.49/ipc/msg.c linux-2.6.32.49/ipc/msg.c
---- linux-2.6.32.49/ipc/msg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/ipc/msg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -310,18 +310,19 @@ static inline int msg_security(struct ke
+diff --git a/ipc/msg.c b/ipc/msg.c
+index 779f762..4af9e36 100644
+--- a/ipc/msg.c
++++ b/ipc/msg.c
+@@ -310,18 +310,19 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
return security_msg_queue_associate(msq, msgflg);
}
@@ -67781,10 +70036,11 @@ diff -urNp linux-2.6.32.49/ipc/msg.c linux-2.6.32.49/ipc/msg.c
msg_params.key = key;
msg_params.flg = msgflg;
-diff -urNp linux-2.6.32.49/ipc/sem.c linux-2.6.32.49/ipc/sem.c
---- linux-2.6.32.49/ipc/sem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/ipc/sem.c 2011-11-15 19:59:43.000000000 -0500
-@@ -309,10 +309,15 @@ static inline int sem_more_checks(struct
+diff --git a/ipc/sem.c b/ipc/sem.c
+index b781007..f738b04 100644
+--- a/ipc/sem.c
++++ b/ipc/sem.c
+@@ -309,10 +309,15 @@ static inline int sem_more_checks(struct kern_ipc_perm *ipcp,
return 0;
}
@@ -67801,7 +70057,7 @@ diff -urNp linux-2.6.32.49/ipc/sem.c linux-2.6.32.49/ipc/sem.c
struct ipc_params sem_params;
ns = current->nsproxy->ipc_ns;
-@@ -320,10 +325,6 @@ SYSCALL_DEFINE3(semget, key_t, key, int,
+@@ -320,10 +325,6 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg)
if (nsems < 0 || nsems > ns->sc_semmsl)
return -EINVAL;
@@ -67812,7 +70068,7 @@ diff -urNp linux-2.6.32.49/ipc/sem.c linux-2.6.32.49/ipc/sem.c
sem_params.key = key;
sem_params.flg = semflg;
sem_params.u.nsems = nsems;
-@@ -671,6 +672,8 @@ static int semctl_main(struct ipc_namesp
+@@ -671,6 +672,8 @@ static int semctl_main(struct ipc_namespace *ns, int semid, int semnum,
ushort* sem_io = fast_sem_io;
int nsems;
@@ -67821,7 +70077,7 @@ diff -urNp linux-2.6.32.49/ipc/sem.c linux-2.6.32.49/ipc/sem.c
sma = sem_lock_check(ns, semid);
if (IS_ERR(sma))
return PTR_ERR(sma);
-@@ -1071,6 +1074,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid,
+@@ -1071,6 +1074,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
unsigned long jiffies_left = 0;
struct ipc_namespace *ns;
@@ -67830,10 +70086,11 @@ diff -urNp linux-2.6.32.49/ipc/sem.c linux-2.6.32.49/ipc/sem.c
ns = current->nsproxy->ipc_ns;
if (nsops < 1 || semid < 0)
-diff -urNp linux-2.6.32.49/ipc/shm.c linux-2.6.32.49/ipc/shm.c
---- linux-2.6.32.49/ipc/shm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/ipc/shm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -70,6 +70,14 @@ static void shm_destroy (struct ipc_name
+diff --git a/ipc/shm.c b/ipc/shm.c
+index d30732c..7379456 100644
+--- a/ipc/shm.c
++++ b/ipc/shm.c
+@@ -70,6 +70,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp);
static int sysvipc_shm_proc_show(struct seq_file *s, void *it);
#endif
@@ -67848,7 +70105,7 @@ diff -urNp linux-2.6.32.49/ipc/shm.c linux-2.6.32.49/ipc/shm.c
void shm_init_ns(struct ipc_namespace *ns)
{
ns->shm_ctlmax = SHMMAX;
-@@ -396,6 +404,14 @@ static int newseg(struct ipc_namespace *
+@@ -396,6 +404,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
shp->shm_lprid = 0;
shp->shm_atim = shp->shm_dtim = 0;
shp->shm_ctim = get_seconds();
@@ -67863,7 +70120,7 @@ diff -urNp linux-2.6.32.49/ipc/shm.c linux-2.6.32.49/ipc/shm.c
shp->shm_segsz = size;
shp->shm_nattch = 0;
shp->shm_file = file;
-@@ -446,18 +462,19 @@ static inline int shm_more_checks(struct
+@@ -446,18 +462,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
return 0;
}
@@ -67888,7 +70145,7 @@ diff -urNp linux-2.6.32.49/ipc/shm.c linux-2.6.32.49/ipc/shm.c
shm_params.key = key;
shm_params.flg = shmflg;
shm_params.u.size = size;
-@@ -880,9 +897,21 @@ long do_shmat(int shmid, char __user *sh
+@@ -880,9 +897,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
if (err)
goto out_unlock;
@@ -67910,10 +70167,11 @@ diff -urNp linux-2.6.32.49/ipc/shm.c linux-2.6.32.49/ipc/shm.c
size = i_size_read(path.dentry->d_inode);
shm_unlock(shp);
-diff -urNp linux-2.6.32.49/kernel/acct.c linux-2.6.32.49/kernel/acct.c
---- linux-2.6.32.49/kernel/acct.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/acct.c 2011-11-15 19:59:43.000000000 -0500
-@@ -579,7 +579,7 @@ static void do_acct_process(struct bsd_a
+diff --git a/kernel/acct.c b/kernel/acct.c
+index a6605ca..ca91111 100644
+--- a/kernel/acct.c
++++ b/kernel/acct.c
+@@ -579,7 +579,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
*/
flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
@@ -67922,9 +70180,10 @@ diff -urNp linux-2.6.32.49/kernel/acct.c linux-2.6.32.49/kernel/acct.c
sizeof(acct_t), &file->f_pos);
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
-diff -urNp linux-2.6.32.49/kernel/audit.c linux-2.6.32.49/kernel/audit.c
---- linux-2.6.32.49/kernel/audit.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/audit.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/audit.c b/kernel/audit.c
+index 5feed23..513b02c 100644
+--- a/kernel/audit.c
++++ b/kernel/audit.c
@@ -110,7 +110,7 @@ u32 audit_sig_sid = 0;
3) suppressed due to audit_rate_limit
4) suppressed due to audit_backlog_limit
@@ -67952,7 +70211,7 @@ diff -urNp linux-2.6.32.49/kernel/audit.c linux-2.6.32.49/kernel/audit.c
audit_rate_limit,
audit_backlog_limit);
audit_panic(message);
-@@ -691,7 +691,7 @@ static int audit_receive_msg(struct sk_b
+@@ -691,7 +691,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
status_set.pid = audit_pid;
status_set.rate_limit = audit_rate_limit;
status_set.backlog_limit = audit_backlog_limit;
@@ -67961,7 +70220,7 @@ diff -urNp linux-2.6.32.49/kernel/audit.c linux-2.6.32.49/kernel/audit.c
status_set.backlog = skb_queue_len(&audit_skb_queue);
audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_GET, 0, 0,
&status_set, sizeof(status_set));
-@@ -891,8 +891,10 @@ static int audit_receive_msg(struct sk_b
+@@ -891,8 +891,10 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
spin_unlock_irq(&tsk->sighand->siglock);
}
read_unlock(&tasklist_lock);
@@ -67974,10 +70233,11 @@ diff -urNp linux-2.6.32.49/kernel/audit.c linux-2.6.32.49/kernel/audit.c
break;
}
case AUDIT_TTY_SET: {
-diff -urNp linux-2.6.32.49/kernel/auditsc.c linux-2.6.32.49/kernel/auditsc.c
---- linux-2.6.32.49/kernel/auditsc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/auditsc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2113,7 +2113,7 @@ int auditsc_get_stamp(struct audit_conte
+diff --git a/kernel/auditsc.c b/kernel/auditsc.c
+index 267e484..f8e295a 100644
+--- a/kernel/auditsc.c
++++ b/kernel/auditsc.c
+@@ -2113,7 +2113,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
}
/* global counter which is incremented every time something logs in */
@@ -67986,7 +70246,7 @@ diff -urNp linux-2.6.32.49/kernel/auditsc.c linux-2.6.32.49/kernel/auditsc.c
/**
* audit_set_loginuid - set a task's audit_context loginuid
-@@ -2126,7 +2126,7 @@ static atomic_t session_id = ATOMIC_INIT
+@@ -2126,7 +2126,7 @@ static atomic_t session_id = ATOMIC_INIT(0);
*/
int audit_set_loginuid(struct task_struct *task, uid_t loginuid)
{
@@ -67995,9 +70255,10 @@ diff -urNp linux-2.6.32.49/kernel/auditsc.c linux-2.6.32.49/kernel/auditsc.c
struct audit_context *context = task->audit_context;
if (context && context->in_syscall) {
-diff -urNp linux-2.6.32.49/kernel/capability.c linux-2.6.32.49/kernel/capability.c
---- linux-2.6.32.49/kernel/capability.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/capability.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/capability.c b/kernel/capability.c
+index 8a944f5..db5001e 100644
+--- a/kernel/capability.c
++++ b/kernel/capability.c
@@ -305,10 +305,26 @@ int capable(int cap)
BUG();
}
@@ -68026,9 +70287,10 @@ diff -urNp linux-2.6.32.49/kernel/capability.c linux-2.6.32.49/kernel/capability
+
EXPORT_SYMBOL(capable);
+EXPORT_SYMBOL(capable_nolog);
-diff -urNp linux-2.6.32.49/kernel/cgroup.c linux-2.6.32.49/kernel/cgroup.c
---- linux-2.6.32.49/kernel/cgroup.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/cgroup.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/cgroup.c b/kernel/cgroup.c
+index 1fbcc74..7000012 100644
+--- a/kernel/cgroup.c
++++ b/kernel/cgroup.c
@@ -536,6 +536,8 @@ static struct css_set *find_css_set(
struct hlist_head *hhead;
struct cg_cgroup_link *link;
@@ -68038,10 +70300,11 @@ diff -urNp linux-2.6.32.49/kernel/cgroup.c linux-2.6.32.49/kernel/cgroup.c
/* First see if we already have a cgroup group that matches
* the desired set */
read_lock(&css_set_lock);
-diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
---- linux-2.6.32.49/kernel/compat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/compat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -108,7 +108,7 @@ static long compat_nanosleep_restart(str
+diff --git a/kernel/compat.c b/kernel/compat.c
+index 8bc5578..186e44a 100644
+--- a/kernel/compat.c
++++ b/kernel/compat.c
+@@ -108,7 +108,7 @@ static long compat_nanosleep_restart(struct restart_block *restart)
mm_segment_t oldfs;
long ret;
@@ -68050,7 +70313,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = hrtimer_nanosleep_restart(restart);
-@@ -140,7 +140,7 @@ asmlinkage long compat_sys_nanosleep(str
+@@ -140,7 +140,7 @@ asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = hrtimer_nanosleep(&tu,
@@ -68059,7 +70322,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
HRTIMER_MODE_REL, CLOCK_MONOTONIC);
set_fs(oldfs);
-@@ -247,7 +247,7 @@ asmlinkage long compat_sys_sigpending(co
+@@ -247,7 +247,7 @@ asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set)
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -68068,7 +70331,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(old_fs);
if (ret == 0)
ret = put_user(s, set);
-@@ -266,8 +266,8 @@ asmlinkage long compat_sys_sigprocmask(i
+@@ -266,8 +266,8 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set,
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sigprocmask(how,
@@ -68079,7 +70342,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(old_fs);
if (ret == 0)
if (oset)
-@@ -310,7 +310,7 @@ asmlinkage long compat_sys_old_getrlimit
+@@ -310,7 +310,7 @@ asmlinkage long compat_sys_old_getrlimit(unsigned int resource,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -68088,7 +70351,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(old_fs);
if (!ret) {
-@@ -385,7 +385,7 @@ asmlinkage long compat_sys_getrusage(int
+@@ -385,7 +385,7 @@ asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru)
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -68097,7 +70360,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(old_fs);
if (ret)
-@@ -412,8 +412,8 @@ compat_sys_wait4(compat_pid_t pid, compa
+@@ -412,8 +412,8 @@ compat_sys_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, int options,
set_fs (KERNEL_DS);
ret = sys_wait4(pid,
(stat_addr ?
@@ -68108,7 +70371,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs (old_fs);
if (ret > 0) {
-@@ -438,8 +438,8 @@ asmlinkage long compat_sys_waitid(int wh
+@@ -438,8 +438,8 @@ asmlinkage long compat_sys_waitid(int which, compat_pid_t pid,
memset(&info, 0, sizeof(info));
set_fs(KERNEL_DS);
@@ -68119,7 +70382,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(old_fs);
if ((ret < 0) || (info.si_signo == 0))
-@@ -569,8 +569,8 @@ long compat_sys_timer_settime(timer_t ti
+@@ -569,8 +569,8 @@ long compat_sys_timer_settime(timer_t timer_id, int flags,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_timer_settime(timer_id, flags,
@@ -68130,7 +70393,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
if (!err && old && put_compat_itimerspec(old, &oldts))
return -EFAULT;
-@@ -587,7 +587,7 @@ long compat_sys_timer_gettime(timer_t ti
+@@ -587,7 +587,7 @@ long compat_sys_timer_gettime(timer_t timer_id,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_timer_gettime(timer_id,
@@ -68139,7 +70402,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
if (!err && put_compat_itimerspec(setting, &ts))
return -EFAULT;
-@@ -606,7 +606,7 @@ long compat_sys_clock_settime(clockid_t
+@@ -606,7 +606,7 @@ long compat_sys_clock_settime(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_settime(which_clock,
@@ -68148,7 +70411,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
return err;
}
-@@ -621,7 +621,7 @@ long compat_sys_clock_gettime(clockid_t
+@@ -621,7 +621,7 @@ long compat_sys_clock_gettime(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_gettime(which_clock,
@@ -68157,7 +70420,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
if (!err && put_compat_timespec(&ts, tp))
return -EFAULT;
-@@ -638,7 +638,7 @@ long compat_sys_clock_getres(clockid_t w
+@@ -638,7 +638,7 @@ long compat_sys_clock_getres(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_getres(which_clock,
@@ -68166,7 +70429,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
if (!err && tp && put_compat_timespec(&ts, tp))
return -EFAULT;
-@@ -650,9 +650,9 @@ static long compat_clock_nanosleep_resta
+@@ -650,9 +650,9 @@ static long compat_clock_nanosleep_restart(struct restart_block *restart)
long err;
mm_segment_t oldfs;
struct timespec tu;
@@ -68178,7 +70441,7 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
oldfs = get_fs();
set_fs(KERNEL_DS);
err = clock_nanosleep_restart(restart);
-@@ -684,8 +684,8 @@ long compat_sys_clock_nanosleep(clockid_
+@@ -684,8 +684,8 @@ long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_nanosleep(which_clock, flags,
@@ -68189,9 +70452,10 @@ diff -urNp linux-2.6.32.49/kernel/compat.c linux-2.6.32.49/kernel/compat.c
set_fs(oldfs);
if ((err == -ERESTART_RESTARTBLOCK) && rmtp &&
-diff -urNp linux-2.6.32.49/kernel/configs.c linux-2.6.32.49/kernel/configs.c
---- linux-2.6.32.49/kernel/configs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/configs.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/configs.c b/kernel/configs.c
+index abaee68..047facd 100644
+--- a/kernel/configs.c
++++ b/kernel/configs.c
@@ -73,8 +73,19 @@ static int __init ikconfig_init(void)
struct proc_dir_entry *entry;
@@ -68212,9 +70476,10 @@ diff -urNp linux-2.6.32.49/kernel/configs.c linux-2.6.32.49/kernel/configs.c
if (!entry)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/kernel/cpu.c linux-2.6.32.49/kernel/cpu.c
---- linux-2.6.32.49/kernel/cpu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/cpu.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 7e8b6ac..8921388 100644
+--- a/kernel/cpu.c
++++ b/kernel/cpu.c
@@ -19,7 +19,7 @@
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
static DEFINE_MUTEX(cpu_add_remove_lock);
@@ -68224,10 +70489,11 @@ diff -urNp linux-2.6.32.49/kernel/cpu.c linux-2.6.32.49/kernel/cpu.c
/* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
* Should always be manipulated under cpu_add_remove_lock
-diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
---- linux-2.6.32.49/kernel/cred.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/cred.c 2011-11-15 19:59:43.000000000 -0500
-@@ -160,6 +160,8 @@ static void put_cred_rcu(struct rcu_head
+diff --git a/kernel/cred.c b/kernel/cred.c
+index 0b5b5fc..419b86a 100644
+--- a/kernel/cred.c
++++ b/kernel/cred.c
+@@ -160,6 +160,8 @@ static void put_cred_rcu(struct rcu_head *rcu)
*/
void __put_cred(struct cred *cred)
{
@@ -68245,7 +70511,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
kdebug("exit_creds(%u,%p,%p,{%d,%d})", tsk->pid, tsk->real_cred, tsk->cred,
atomic_read(&tsk->cred->usage),
read_cred_subscribers(tsk->cred));
-@@ -222,6 +226,8 @@ const struct cred *get_task_cred(struct
+@@ -222,6 +226,8 @@ const struct cred *get_task_cred(struct task_struct *task)
{
const struct cred *cred;
@@ -68281,7 +70547,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
#ifdef CONFIG_KEYS
tgcred = kmalloc(sizeof(*tgcred), GFP_KERNEL);
if (!tgcred)
-@@ -441,6 +453,8 @@ int copy_creds(struct task_struct *p, un
+@@ -441,6 +453,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
struct cred *new;
int ret;
@@ -68330,7 +70596,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
kdebug("abort_creds(%p{%d,%d})", new,
atomic_read(&new->usage),
read_cred_subscribers(new));
-@@ -629,6 +647,8 @@ const struct cred *override_creds(const
+@@ -629,6 +647,8 @@ const struct cred *override_creds(const struct cred *new)
{
const struct cred *old = current->cred;
@@ -68339,7 +70605,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
kdebug("override_creds(%p{%d,%d})", new,
atomic_read(&new->usage),
read_cred_subscribers(new));
-@@ -658,6 +678,8 @@ void revert_creds(const struct cred *old
+@@ -658,6 +678,8 @@ void revert_creds(const struct cred *old)
{
const struct cred *override = current->cred;
@@ -68348,7 +70614,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
kdebug("revert_creds(%p{%d,%d})", old,
atomic_read(&old->usage),
read_cred_subscribers(old));
-@@ -704,6 +726,8 @@ struct cred *prepare_kernel_cred(struct
+@@ -704,6 +726,8 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
const struct cred *old;
struct cred *new;
@@ -68366,7 +70632,7 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
return security_kernel_act_as(new, secid);
}
EXPORT_SYMBOL(set_security_override);
-@@ -777,6 +803,8 @@ int set_security_override_from_ctx(struc
+@@ -777,6 +803,8 @@ int set_security_override_from_ctx(struct cred *new, const char *secctx)
u32 secid;
int ret;
@@ -68375,9 +70641,10 @@ diff -urNp linux-2.6.32.49/kernel/cred.c linux-2.6.32.49/kernel/cred.c
ret = security_secctx_to_secid(secctx, strlen(secctx), &secid);
if (ret < 0)
return ret;
-diff -urNp linux-2.6.32.49/kernel/exit.c linux-2.6.32.49/kernel/exit.c
---- linux-2.6.32.49/kernel/exit.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/exit.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/exit.c b/kernel/exit.c
+index 0f8fae3..11757f1 100644
+--- a/kernel/exit.c
++++ b/kernel/exit.c
@@ -55,6 +55,10 @@
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
@@ -68389,7 +70656,7 @@ diff -urNp linux-2.6.32.49/kernel/exit.c linux-2.6.32.49/kernel/exit.c
static void exit_mm(struct task_struct * tsk);
static void __unhash_process(struct task_struct *p)
-@@ -174,6 +178,10 @@ void release_task(struct task_struct * p
+@@ -174,6 +178,10 @@ void release_task(struct task_struct * p)
struct task_struct *leader;
int zap_leader;
repeat:
@@ -68499,7 +70766,7 @@ diff -urNp linux-2.6.32.49/kernel/exit.c linux-2.6.32.49/kernel/exit.c
exit_mm(tsk);
if (group_dead)
-@@ -1188,7 +1228,7 @@ static int wait_task_zombie(struct wait_
+@@ -1188,7 +1228,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
if (unlikely(wo->wo_flags & WNOWAIT)) {
int exit_code = p->exit_code;
@@ -68508,10 +70775,11 @@ diff -urNp linux-2.6.32.49/kernel/exit.c linux-2.6.32.49/kernel/exit.c
get_task_struct(p);
read_unlock(&tasklist_lock);
-diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
---- linux-2.6.32.49/kernel/fork.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/fork.c 2011-11-15 19:59:43.000000000 -0500
-@@ -253,7 +253,7 @@ static struct task_struct *dup_task_stru
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 4bde56f..29a9bab 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -253,7 +253,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
*stackend = STACK_END_MAGIC; /* for overflow detection */
#ifdef CONFIG_CC_STACKPROTECTOR
@@ -68520,7 +70788,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
#endif
/* One for us, one for whoever does the "release_task()" (usually parent) */
-@@ -293,8 +293,8 @@ static int dup_mmap(struct mm_struct *mm
+@@ -293,8 +293,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
@@ -68531,7 +70799,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
mm->map_count = 0;
cpumask_clear(mm_cpumask(mm));
mm->mm_rb = RB_ROOT;
-@@ -335,6 +335,7 @@ static int dup_mmap(struct mm_struct *mm
+@@ -335,6 +335,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
tmp->vm_flags &= ~VM_LOCKED;
tmp->vm_mm = mm;
tmp->vm_next = tmp->vm_prev = NULL;
@@ -68539,7 +70807,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
anon_vma_link(tmp);
file = tmp->vm_file;
if (file) {
-@@ -384,6 +385,31 @@ static int dup_mmap(struct mm_struct *mm
+@@ -384,6 +385,31 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
if (retval)
goto out;
}
@@ -68571,7 +70839,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
/* a new mm has just been created */
arch_dup_mmap(oldmm, mm);
retval = 0;
-@@ -734,13 +760,14 @@ static int copy_fs(unsigned long clone_f
+@@ -734,13 +760,14 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
write_unlock(&fs->lock);
return -EAGAIN;
}
@@ -68587,7 +70855,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
return 0;
}
-@@ -1033,12 +1060,16 @@ static struct task_struct *copy_process(
+@@ -1033,12 +1060,16 @@ static struct task_struct *copy_process(unsigned long clone_flags,
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
retval = -EAGAIN;
@@ -68606,7 +70874,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
retval = copy_creds(p, clone_flags);
if (retval < 0)
-@@ -1183,6 +1214,8 @@ static struct task_struct *copy_process(
+@@ -1183,6 +1214,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
goto bad_fork_free_pid;
}
@@ -68633,7 +70901,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
-@@ -1558,7 +1595,7 @@ static int unshare_fs(unsigned long unsh
+@@ -1558,7 +1595,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
return 0;
/* don't need lock here; in the worst case we'll do useless copy */
@@ -68642,7 +70910,7 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
return 0;
*new_fsp = copy_fs_struct(fs);
-@@ -1681,7 +1718,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
+@@ -1681,7 +1718,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
fs = current->fs;
write_lock(&fs->lock);
current->fs = new_fs;
@@ -68652,9 +70920,10 @@ diff -urNp linux-2.6.32.49/kernel/fork.c linux-2.6.32.49/kernel/fork.c
new_fs = NULL;
else
new_fs = fs;
-diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
---- linux-2.6.32.49/kernel/futex.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/futex.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/futex.c b/kernel/futex.c
+index fb98c9f..f158c0c 100644
+--- a/kernel/futex.c
++++ b/kernel/futex.c
@@ -54,6 +54,7 @@
#include <linux/mount.h>
#include <linux/pagemap.h>
@@ -68663,7 +70932,7 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
#include <linux/signal.h>
#include <linux/module.h>
#include <linux/magic.h>
-@@ -223,6 +224,11 @@ get_futex_key(u32 __user *uaddr, int fsh
+@@ -223,6 +224,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
struct page *page;
int err, ro = 0;
@@ -68675,7 +70944,7 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
/*
* The futex address must be "naturally" aligned.
*/
-@@ -1819,6 +1825,8 @@ static int futex_wait(u32 __user *uaddr,
+@@ -1819,6 +1825,8 @@ static int futex_wait(u32 __user *uaddr, int fshared,
struct futex_q q;
int ret;
@@ -68693,7 +70962,7 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
restart->futex.val = val;
restart->futex.time = abs_time->tv64;
restart->futex.bitset = bitset;
-@@ -2233,6 +2241,8 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2233,6 +2241,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
struct futex_q q;
int res, ret;
@@ -68702,7 +70971,7 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
if (!bitset)
return -EINVAL;
-@@ -2407,7 +2417,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2407,7 +2417,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pid,
{
struct robust_list_head __user *head;
unsigned long ret;
@@ -68712,7 +70981,7 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -2423,11 +2435,16 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2423,11 +2435,16 @@ SYSCALL_DEFINE3(get_robust_list, int, pid,
if (!p)
goto err_unlock;
ret = -EPERM;
@@ -68757,9 +71026,10 @@ diff -urNp linux-2.6.32.49/kernel/futex.c linux-2.6.32.49/kernel/futex.c
if (curval == -EFAULT)
futex_cmpxchg_enabled = 1;
-diff -urNp linux-2.6.32.49/kernel/futex_compat.c linux-2.6.32.49/kernel/futex_compat.c
---- linux-2.6.32.49/kernel/futex_compat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/futex_compat.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
+index 2357165..8d70cee 100644
+--- a/kernel/futex_compat.c
++++ b/kernel/futex_compat.c
@@ -10,6 +10,7 @@
#include <linux/compat.h>
#include <linux/nsproxy.h>
@@ -68768,7 +71038,7 @@ diff -urNp linux-2.6.32.49/kernel/futex_compat.c linux-2.6.32.49/kernel/futex_co
#include <asm/uaccess.h>
-@@ -135,7 +136,10 @@ compat_sys_get_robust_list(int pid, comp
+@@ -135,7 +136,10 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
{
struct compat_robust_list_head __user *head;
unsigned long ret;
@@ -68780,7 +71050,7 @@ diff -urNp linux-2.6.32.49/kernel/futex_compat.c linux-2.6.32.49/kernel/futex_co
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -151,11 +155,16 @@ compat_sys_get_robust_list(int pid, comp
+@@ -151,11 +155,16 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
if (!p)
goto err_unlock;
ret = -EPERM;
@@ -68797,9 +71067,10 @@ diff -urNp linux-2.6.32.49/kernel/futex_compat.c linux-2.6.32.49/kernel/futex_co
head = p->compat_robust_list;
read_unlock(&tasklist_lock);
}
-diff -urNp linux-2.6.32.49/kernel/gcov/base.c linux-2.6.32.49/kernel/gcov/base.c
---- linux-2.6.32.49/kernel/gcov/base.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/gcov/base.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
+index 9b22d03..6295b62 100644
+--- a/kernel/gcov/base.c
++++ b/kernel/gcov/base.c
@@ -102,11 +102,6 @@ void gcov_enable_events(void)
}
@@ -68812,7 +71083,7 @@ diff -urNp linux-2.6.32.49/kernel/gcov/base.c linux-2.6.32.49/kernel/gcov/base.c
/* Update list and generate events when modules are unloaded. */
static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
void *data)
-@@ -121,7 +116,7 @@ static int gcov_module_notifier(struct n
+@@ -121,7 +116,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
prev = NULL;
/* Remove entries located in module from linked list. */
for (info = gcov_info_head; info; info = info->next) {
@@ -68821,9 +71092,10 @@ diff -urNp linux-2.6.32.49/kernel/gcov/base.c linux-2.6.32.49/kernel/gcov/base.c
if (prev)
prev->next = info->next;
else
-diff -urNp linux-2.6.32.49/kernel/hrtimer.c linux-2.6.32.49/kernel/hrtimer.c
---- linux-2.6.32.49/kernel/hrtimer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/hrtimer.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
+index a6e9d00..a0da4f9 100644
+--- a/kernel/hrtimer.c
++++ b/kernel/hrtimer.c
@@ -1391,7 +1391,7 @@ void hrtimer_peek_ahead_timers(void)
local_irq_restore(flags);
}
@@ -68833,9 +71105,10 @@ diff -urNp linux-2.6.32.49/kernel/hrtimer.c linux-2.6.32.49/kernel/hrtimer.c
{
hrtimer_peek_ahead_timers();
}
-diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
---- linux-2.6.32.49/kernel/kallsyms.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/kallsyms.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
+index 8b6b8b6..6bc87df 100644
+--- a/kernel/kallsyms.c
++++ b/kernel/kallsyms.c
@@ -11,6 +11,9 @@
* Changed the compression method from stem compression to "table lookup"
* compression (see scripts/kallsyms.c for a more complete description)
@@ -68846,7 +71119,7 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/init.h>
-@@ -51,12 +54,33 @@ extern const unsigned long kallsyms_mark
+@@ -51,12 +54,33 @@ extern const unsigned long kallsyms_markers[] __attribute__((weak));
static inline int is_kernel_inittext(unsigned long addr)
{
@@ -68880,7 +71153,7 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
static inline int is_kernel_text(unsigned long addr)
{
if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) ||
-@@ -67,13 +91,28 @@ static inline int is_kernel_text(unsigne
+@@ -67,13 +91,28 @@ static inline int is_kernel_text(unsigned long addr)
static inline int is_kernel(unsigned long addr)
{
@@ -68909,7 +71182,7 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
if (all_var)
return is_kernel(addr);
-@@ -413,7 +452,6 @@ static unsigned long get_ksymbol_core(st
+@@ -413,7 +452,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
{
@@ -68917,7 +71190,7 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
iter->nameoff = get_symbol_offset(new_pos);
iter->pos = new_pos;
}
-@@ -461,6 +499,11 @@ static int s_show(struct seq_file *m, vo
+@@ -461,6 +499,11 @@ static int s_show(struct seq_file *m, void *p)
{
struct kallsym_iter *iter = m->private;
@@ -68929,7 +71202,7 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
/* Some debugging symbols have no name. Ignore them. */
if (!iter->name[0])
return 0;
-@@ -501,7 +544,7 @@ static int kallsyms_open(struct inode *i
+@@ -501,7 +544,7 @@ static int kallsyms_open(struct inode *inode, struct file *file)
struct kallsym_iter *iter;
int ret;
@@ -68938,10 +71211,11 @@ diff -urNp linux-2.6.32.49/kernel/kallsyms.c linux-2.6.32.49/kernel/kallsyms.c
if (!iter)
return -ENOMEM;
reset_iter(iter, 0);
-diff -urNp linux-2.6.32.49/kernel/kexec.c linux-2.6.32.49/kernel/kexec.c
---- linux-2.6.32.49/kernel/kexec.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/kexec.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1028,7 +1028,8 @@ asmlinkage long compat_sys_kexec_load(un
+diff --git a/kernel/kexec.c b/kernel/kexec.c
+index f336e21..9c1c20b 100644
+--- a/kernel/kexec.c
++++ b/kernel/kexec.c
+@@ -1028,7 +1028,8 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry,
unsigned long flags)
{
struct compat_kexec_segment in;
@@ -68951,9 +71225,10 @@ diff -urNp linux-2.6.32.49/kernel/kexec.c linux-2.6.32.49/kernel/kexec.c
unsigned long i, result;
/* Don't allow clients that don't understand the native
-diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
---- linux-2.6.32.49/kernel/kgdb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/kgdb.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/kgdb.c b/kernel/kgdb.c
+index 53dae4b..9ba3743 100644
+--- a/kernel/kgdb.c
++++ b/kernel/kgdb.c
@@ -86,7 +86,7 @@ static int kgdb_io_module_registered;
/* Guard for recursive entry */
static int exception_level;
@@ -68963,7 +71238,7 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
static DEFINE_SPINLOCK(kgdb_registration_lock);
/* kgdb console driver is loaded */
-@@ -123,7 +123,7 @@ atomic_t kgdb_active = ATOMIC_INIT(-1)
+@@ -123,7 +123,7 @@ atomic_t kgdb_active = ATOMIC_INIT(-1);
*/
static atomic_t passive_cpu_wait[NR_CPUS];
static atomic_t cpu_in_kgdb[NR_CPUS];
@@ -68972,7 +71247,7 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
struct task_struct *kgdb_usethread;
struct task_struct *kgdb_contthread;
-@@ -140,7 +140,7 @@ static unsigned long gdb_regs[(NUMREGBY
+@@ -140,7 +140,7 @@ static unsigned long gdb_regs[(NUMREGBYTES +
sizeof(unsigned long)];
/* to keep track of the CPU which is doing the single stepping*/
@@ -69001,7 +71276,7 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
atomic_set(&kgdb_active, -1);
touch_softlockup_watchdog();
-@@ -1634,7 +1634,7 @@ static void kgdb_initial_breakpoint(void
+@@ -1634,7 +1634,7 @@ static void kgdb_initial_breakpoint(void)
*
* Register it with the KGDB core.
*/
@@ -69010,7 +71285,7 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
{
int err;
-@@ -1679,7 +1679,7 @@ EXPORT_SYMBOL_GPL(kgdb_register_io_modul
+@@ -1679,7 +1679,7 @@ EXPORT_SYMBOL_GPL(kgdb_register_io_module);
*
* Unregister it with the KGDB core.
*/
@@ -69019,7 +71294,7 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
{
BUG_ON(kgdb_connected);
-@@ -1712,11 +1712,11 @@ EXPORT_SYMBOL_GPL(kgdb_unregister_io_mod
+@@ -1712,11 +1712,11 @@ EXPORT_SYMBOL_GPL(kgdb_unregister_io_module);
*/
void kgdb_breakpoint(void)
{
@@ -69033,10 +71308,11 @@ diff -urNp linux-2.6.32.49/kernel/kgdb.c linux-2.6.32.49/kernel/kgdb.c
}
EXPORT_SYMBOL_GPL(kgdb_breakpoint);
-diff -urNp linux-2.6.32.49/kernel/kmod.c linux-2.6.32.49/kernel/kmod.c
---- linux-2.6.32.49/kernel/kmod.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/kmod.c 2011-11-15 19:59:43.000000000 -0500
-@@ -65,13 +65,12 @@ char modprobe_path[KMOD_PATH_LEN] = "/sb
+diff --git a/kernel/kmod.c b/kernel/kmod.c
+index d206078..e27ba6a 100644
+--- a/kernel/kmod.c
++++ b/kernel/kmod.c
+@@ -65,13 +65,12 @@ char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe";
* If module auto-loading support is disabled then this function
* becomes a no-operation.
*/
@@ -69052,7 +71328,7 @@ diff -urNp linux-2.6.32.49/kernel/kmod.c linux-2.6.32.49/kernel/kmod.c
static char *envp[] = { "HOME=/",
"TERM=linux",
"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
-@@ -84,12 +83,24 @@ int __request_module(bool wait, const ch
+@@ -84,12 +83,24 @@ int __request_module(bool wait, const char *fmt, ...)
if (ret)
return ret;
@@ -69080,7 +71356,7 @@ diff -urNp linux-2.6.32.49/kernel/kmod.c linux-2.6.32.49/kernel/kmod.c
/* If modprobe needs a service that is in a module, we get a recursive
* loop. Limit the number of running kmod threads to max_threads/2 or
* MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method
-@@ -123,6 +134,48 @@ int __request_module(bool wait, const ch
+@@ -123,6 +134,48 @@ int __request_module(bool wait, const char *fmt, ...)
atomic_dec(&kmod_concurrent);
return ret;
}
@@ -69138,10 +71414,11 @@ diff -urNp linux-2.6.32.49/kernel/kmod.c linux-2.6.32.49/kernel/kmod.c
/*
* If ret is 0, either ____call_usermodehelper failed and the
-diff -urNp linux-2.6.32.49/kernel/kprobes.c linux-2.6.32.49/kernel/kprobes.c
---- linux-2.6.32.49/kernel/kprobes.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/kprobes.c 2011-11-15 19:59:43.000000000 -0500
-@@ -183,7 +183,7 @@ static kprobe_opcode_t __kprobes *__get_
+diff --git a/kernel/kprobes.c b/kernel/kprobes.c
+index 5240d75..5a6fb33 100644
+--- a/kernel/kprobes.c
++++ b/kernel/kprobes.c
+@@ -183,7 +183,7 @@ static kprobe_opcode_t __kprobes *__get_insn_slot(void)
* kernel image and loaded module images reside. This is required
* so x86_64 can correctly handle the %rip-relative fixups.
*/
@@ -69150,7 +71427,7 @@ diff -urNp linux-2.6.32.49/kernel/kprobes.c linux-2.6.32.49/kernel/kprobes.c
if (!kip->insns) {
kfree(kip);
return NULL;
-@@ -220,7 +220,7 @@ static int __kprobes collect_one_slot(st
+@@ -220,7 +220,7 @@ static int __kprobes collect_one_slot(struct kprobe_insn_page *kip, int idx)
*/
if (!list_is_singular(&kprobe_insn_pages)) {
list_del(&kip->list);
@@ -69168,7 +71445,7 @@ diff -urNp linux-2.6.32.49/kernel/kprobes.c linux-2.6.32.49/kernel/kprobes.c
const char *symbol_name;
void *addr;
struct kprobe_blackpoint *kb;
-@@ -1304,7 +1304,7 @@ static int __kprobes show_kprobe_addr(st
+@@ -1304,7 +1304,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
@@ -69177,10 +71454,11 @@ diff -urNp linux-2.6.32.49/kernel/kprobes.c linux-2.6.32.49/kernel/kprobes.c
head = &kprobe_table[i];
preempt_disable();
-diff -urNp linux-2.6.32.49/kernel/lockdep.c linux-2.6.32.49/kernel/lockdep.c
---- linux-2.6.32.49/kernel/lockdep.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/lockdep.c 2011-11-15 19:59:43.000000000 -0500
-@@ -421,20 +421,20 @@ static struct stack_trace lockdep_init_t
+diff --git a/kernel/lockdep.c b/kernel/lockdep.c
+index d86fe89..d12fc66 100644
+--- a/kernel/lockdep.c
++++ b/kernel/lockdep.c
+@@ -421,20 +421,20 @@ static struct stack_trace lockdep_init_trace = {
/*
* Various lockdep statistics:
*/
@@ -69236,7 +71514,7 @@ diff -urNp linux-2.6.32.49/kernel/lockdep.c linux-2.6.32.49/kernel/lockdep.c
if ((addr >= start) && (addr < end))
return 1;
-@@ -710,6 +713,7 @@ register_lock_class(struct lockdep_map *
+@@ -710,6 +713,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
if (!static_obj(lock->key)) {
debug_locks_off();
printk("INFO: trying to register non-static key.\n");
@@ -69244,7 +71522,7 @@ diff -urNp linux-2.6.32.49/kernel/lockdep.c linux-2.6.32.49/kernel/lockdep.c
printk("the code is fine but needs lockdep annotation.\n");
printk("turning off the locking correctness validator.\n");
dump_stack();
-@@ -2751,7 +2755,7 @@ static int __lock_acquire(struct lockdep
+@@ -2751,7 +2755,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
if (!class)
return 0;
}
@@ -69253,10 +71531,11 @@ diff -urNp linux-2.6.32.49/kernel/lockdep.c linux-2.6.32.49/kernel/lockdep.c
if (very_verbose(class)) {
printk("\nacquire class [%p] %s", class->key, class->name);
if (class->name_version > 1)
-diff -urNp linux-2.6.32.49/kernel/lockdep_internals.h linux-2.6.32.49/kernel/lockdep_internals.h
---- linux-2.6.32.49/kernel/lockdep_internals.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/lockdep_internals.h 2011-11-15 19:59:43.000000000 -0500
-@@ -113,26 +113,26 @@ lockdep_count_backward_deps(struct lock_
+diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h
+index a2ee95a..092f0f2 100644
+--- a/kernel/lockdep_internals.h
++++ b/kernel/lockdep_internals.h
+@@ -113,26 +113,26 @@ lockdep_count_backward_deps(struct lock_class *class)
/*
* Various lockdep statistics:
*/
@@ -69303,10 +71582,11 @@ diff -urNp linux-2.6.32.49/kernel/lockdep_internals.h linux-2.6.32.49/kernel/loc
#else
# define debug_atomic_inc(ptr) do { } while (0)
# define debug_atomic_dec(ptr) do { } while (0)
-diff -urNp linux-2.6.32.49/kernel/lockdep_proc.c linux-2.6.32.49/kernel/lockdep_proc.c
---- linux-2.6.32.49/kernel/lockdep_proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/lockdep_proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, v
+diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
+index d4aba4f..02a353f 100644
+--- a/kernel/lockdep_proc.c
++++ b/kernel/lockdep_proc.c
+@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, void *v)
static void print_name(struct seq_file *m, struct lock_class *class)
{
@@ -69315,9 +71595,10 @@ diff -urNp linux-2.6.32.49/kernel/lockdep_proc.c linux-2.6.32.49/kernel/lockdep_
const char *name = class->name;
if (!name) {
-diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
---- linux-2.6.32.49/kernel/module.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/module.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/module.c b/kernel/module.c
+index 4b270e6..2226274 100644
+--- a/kernel/module.c
++++ b/kernel/module.c
@@ -55,6 +55,7 @@
#include <linux/async.h>
#include <linux/percpu.h>
@@ -69326,7 +71607,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
#define CREATE_TRACE_POINTS
#include <trace/events/module.h>
-@@ -89,7 +90,8 @@ static DECLARE_WAIT_QUEUE_HEAD(module_wq
+@@ -89,7 +90,8 @@ static DECLARE_WAIT_QUEUE_HEAD(module_wq);
static BLOCKING_NOTIFIER_HEAD(module_notify_list);
/* Bounds of module allocation, for speeding __module_address */
@@ -69336,7 +71617,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
int register_module_notifier(struct notifier_block * nb)
{
-@@ -245,7 +247,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -245,7 +247,7 @@ bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner,
return true;
list_for_each_entry_rcu(mod, &modules, list) {
@@ -69345,7 +71626,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
NOT_GPL_ONLY, false },
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -267,7 +269,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -267,7 +269,7 @@ bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner,
#endif
};
@@ -69354,7 +71635,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
return true;
}
return false;
-@@ -442,7 +444,7 @@ static void *percpu_modalloc(unsigned lo
+@@ -442,7 +444,7 @@ static void *percpu_modalloc(unsigned long size, unsigned long align,
void *ptr;
int cpu;
@@ -69363,7 +71644,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
name, align, PAGE_SIZE);
align = PAGE_SIZE;
-@@ -1158,7 +1160,7 @@ static const struct kernel_symbol *resol
+@@ -1158,7 +1160,7 @@ static const struct kernel_symbol *resolve_symbol(Elf_Shdr *sechdrs,
* /sys/module/foo/sections stuff
* J. Corbet <corbet@lwn.net>
*/
@@ -69372,7 +71653,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
static inline bool sect_empty(const Elf_Shdr *sect)
{
-@@ -1545,7 +1547,8 @@ static void free_module(struct module *m
+@@ -1545,7 +1547,8 @@ static void free_module(struct module *mod)
destroy_params(mod->kp, mod->num_kp);
/* This may be NULL, but that's OK */
@@ -69382,7 +71663,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
kfree(mod->args);
if (mod->percpu)
percpu_modfree(mod->percpu);
-@@ -1554,10 +1557,12 @@ static void free_module(struct module *m
+@@ -1554,10 +1557,12 @@ static void free_module(struct module *mod)
percpu_modfree(mod->refptr);
#endif
/* Free lock-classes: */
@@ -69397,7 +71678,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
#ifdef CONFIG_MPU
update_protections(current->mm);
-@@ -1628,8 +1633,32 @@ static int simplify_symbols(Elf_Shdr *se
+@@ -1628,8 +1633,32 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
int ret = 0;
const struct kernel_symbol *ksym;
@@ -69430,7 +71711,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
switch (sym[i].st_shndx) {
case SHN_COMMON:
/* We compiled with -fno-common. These are not
-@@ -1651,7 +1680,9 @@ static int simplify_symbols(Elf_Shdr *se
+@@ -1651,7 +1680,9 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
strtab + sym[i].st_name, mod);
/* Ok if resolved. */
if (ksym) {
@@ -69440,7 +71721,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
break;
}
-@@ -1670,11 +1701,20 @@ static int simplify_symbols(Elf_Shdr *se
+@@ -1670,11 +1701,20 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
secbase = (unsigned long)mod->percpu;
else
secbase = sechdrs[sym[i].st_shndx].sh_addr;
@@ -69461,7 +71742,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
return ret;
}
-@@ -1731,11 +1771,12 @@ static void layout_sections(struct modul
+@@ -1731,11 +1771,12 @@ static void layout_sections(struct module *mod,
|| s->sh_entsize != ~0UL
|| strstarts(secstrings + s->sh_name, ".init"))
continue;
@@ -69477,7 +71758,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
}
DEBUGP("Init section allocation order:\n");
-@@ -1748,12 +1789,13 @@ static void layout_sections(struct modul
+@@ -1748,12 +1789,13 @@ static void layout_sections(struct module *mod,
|| s->sh_entsize != ~0UL
|| !strstarts(secstrings + s->sh_name, ".init"))
continue;
@@ -69495,7 +71776,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
}
}
-@@ -1857,9 +1899,8 @@ static int is_exported(const char *name,
+@@ -1857,9 +1899,8 @@ static int is_exported(const char *name, unsigned long value,
/* As per nm */
static char elf_type(const Elf_Sym *sym,
@@ -69507,7 +71788,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
{
if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {
if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT)
-@@ -1934,7 +1975,7 @@ static unsigned long layout_symtab(struc
+@@ -1934,7 +1975,7 @@ static unsigned long layout_symtab(struct module *mod,
/* Put symbol section at end of init part of module. */
symsect->sh_flags |= SHF_ALLOC;
@@ -69516,7 +71797,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
symindex) | INIT_OFFSET_MASK;
DEBUGP("\t%s\n", secstrings + symsect->sh_name);
-@@ -1951,19 +1992,19 @@ static unsigned long layout_symtab(struc
+@@ -1951,19 +1992,19 @@ static unsigned long layout_symtab(struct module *mod,
}
/* Append room for core symbols at end of core part. */
@@ -69541,7 +71822,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
return symoffs;
}
-@@ -1987,12 +2028,14 @@ static void add_kallsyms(struct module *
+@@ -1987,12 +2028,14 @@ static void add_kallsyms(struct module *mod,
mod->num_symtab = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
mod->strtab = (void *)sechdrs[strindex].sh_addr;
@@ -69558,7 +71839,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
src = mod->symtab;
*dst = *src;
for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) {
-@@ -2004,10 +2047,12 @@ static void add_kallsyms(struct module *
+@@ -2004,10 +2047,12 @@ static void add_kallsyms(struct module *mod,
}
mod->core_num_syms = ndst;
@@ -69572,7 +71853,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
}
#else
static inline unsigned long layout_symtab(struct module *mod,
-@@ -2044,16 +2089,30 @@ static void dynamic_debug_setup(struct _
+@@ -2044,16 +2089,30 @@ static void dynamic_debug_setup(struct _ddebug *debug, unsigned int num)
#endif
}
@@ -69608,7 +71889,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
}
return ret;
}
-@@ -2065,8 +2124,8 @@ static void kmemleak_load_module(struct
+@@ -2065,8 +2124,8 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
unsigned int i;
/* only scan the sections containing data */
@@ -69619,7 +71900,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
sizeof(struct module), GFP_KERNEL);
for (i = 1; i < hdr->e_shnum; i++) {
-@@ -2076,8 +2135,8 @@ static void kmemleak_load_module(struct
+@@ -2076,8 +2135,8 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
&& strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
continue;
@@ -69630,7 +71911,31 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
sechdrs[i].sh_size, GFP_KERNEL);
}
}
-@@ -2263,7 +2322,7 @@ static noinline struct module *load_modu
+@@ -2097,7 +2156,7 @@ static noinline struct module *load_module(void __user *umod,
+ Elf_Ehdr *hdr;
+ Elf_Shdr *sechdrs;
+ char *secstrings, *args, *modmagic, *strtab = NULL;
+- char *staging;
++ char *staging, *license;
+ unsigned int i;
+ unsigned int symindex = 0;
+ unsigned int strindex = 0;
+@@ -2195,6 +2254,14 @@ static noinline struct module *load_module(void __user *umod,
+ goto free_hdr;
+ }
+
++ license = get_modinfo(sechdrs, infoindex, "license");
++#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR
++ if (!license || !license_is_gpl_compatible(license)) {
++ err -ENOEXEC;
++ goto free_hdr;
++ }
++#endif
++
+ modmagic = get_modinfo(sechdrs, infoindex, "vermagic");
+ /* This is allowed: modprobe --force will invalidate it. */
+ if (!modmagic) {
+@@ -2263,7 +2330,7 @@ static noinline struct module *load_module(void __user *umod,
secstrings, &stroffs, strmap);
/* Do the allocs. */
@@ -69639,7 +71944,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/*
* The pointer to this block is stored in the module structure
* which is inside the block. Just mark it as not being a
-@@ -2274,23 +2333,47 @@ static noinline struct module *load_modu
+@@ -2274,23 +2341,47 @@ static noinline struct module *load_module(void __user *umod,
err = -ENOMEM;
goto free_percpu;
}
@@ -69669,12 +71974,9 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
+ ptr = module_alloc_update_bounds_rx(mod->core_size_rx);
+ kmemleak_not_leak(ptr);
+ if (!ptr) {
- err = -ENOMEM;
-- goto free_core;
++ err = -ENOMEM;
+ goto free_init_rw;
- }
-- memset(ptr, 0, mod->init_size);
-- mod->module_init = ptr;
++ }
+
+ pax_open_kernel();
+ memset(ptr, 0, mod->core_size_rx);
@@ -69684,9 +71986,12 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
+ ptr = module_alloc_update_bounds_rx(mod->init_size_rx);
+ kmemleak_not_leak(ptr);
+ if (!ptr && mod->init_size_rx) {
-+ err = -ENOMEM;
+ err = -ENOMEM;
+- goto free_core;
+ goto free_core_rx;
-+ }
+ }
+- memset(ptr, 0, mod->init_size);
+- mod->module_init = ptr;
+
+ pax_open_kernel();
+ memset(ptr, 0, mod->init_size_rx);
@@ -69695,7 +72000,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* Transfer each section which specifies SHF_ALLOC */
DEBUGP("final section addresses:\n");
-@@ -2300,17 +2383,45 @@ static noinline struct module *load_modu
+@@ -2300,17 +2391,45 @@ static noinline struct module *load_module(void __user *umod,
if (!(sechdrs[i].sh_flags & SHF_ALLOC))
continue;
@@ -69717,12 +72022,12 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
+ else
+ dest = mod->module_core_rx + sechdrs[i].sh_entsize;
+ }
-+
-+ if (sechdrs[i].sh_type != SHT_NOBITS) {
- if (sechdrs[i].sh_type != SHT_NOBITS)
- memcpy(dest, (void *)sechdrs[i].sh_addr,
- sechdrs[i].sh_size);
++ if (sechdrs[i].sh_type != SHT_NOBITS) {
++
+#ifdef CONFIG_PAX_KERNEXEC
+#ifdef CONFIG_X86_64
+ if ((sechdrs[i].sh_flags & SHF_WRITE) && (sechdrs[i].sh_flags & SHF_EXECINSTR))
@@ -69750,7 +72055,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
DEBUGP("\t0x%lx %s\n", sechdrs[i].sh_addr, secstrings + sechdrs[i].sh_name);
}
/* Module has been moved. */
-@@ -2322,7 +2433,7 @@ static noinline struct module *load_modu
+@@ -2322,7 +2441,7 @@ static noinline struct module *load_module(void __user *umod,
mod->name);
if (!mod->refptr) {
err = -ENOMEM;
@@ -69759,7 +72064,16 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
}
#endif
/* Now we've moved module, initialize linked lists, etc. */
-@@ -2351,6 +2462,31 @@ static noinline struct module *load_modu
+@@ -2334,7 +2453,7 @@ static noinline struct module *load_module(void __user *umod,
+ goto free_unload;
+
+ /* Set up license info based on the info section */
+- set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
++ set_license(mod, license);
+
+ /*
+ * ndiswrapper is under GPL by itself, but loads proprietary modules.
+@@ -2351,6 +2470,31 @@ static noinline struct module *load_module(void __user *umod,
/* Set up MODINFO_ATTR fields */
setup_modinfo(mod, sechdrs, infoindex);
@@ -69791,7 +72105,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* Fix up syms, so that st_value is a pointer to location. */
err = simplify_symbols(sechdrs, symindex, strtab, versindex, pcpuindex,
mod);
-@@ -2431,8 +2567,8 @@ static noinline struct module *load_modu
+@@ -2431,8 +2575,8 @@ static noinline struct module *load_module(void __user *umod,
/* Now do relocations. */
for (i = 1; i < hdr->e_shnum; i++) {
@@ -69801,7 +72115,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* Not a valid relocation section? */
if (info >= hdr->e_shnum)
-@@ -2493,16 +2629,15 @@ static noinline struct module *load_modu
+@@ -2493,16 +2637,15 @@ static noinline struct module *load_module(void __user *umod,
* Do it before processing of module parameters, so the module
* can provide parameter accessor functions of its own.
*/
@@ -69824,7 +72138,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
if (section_addr(hdr, sechdrs, secstrings, "__obsparm"))
printk(KERN_WARNING "%s: Ignoring obsolete parameters\n",
mod->name);
-@@ -2546,12 +2681,16 @@ static noinline struct module *load_modu
+@@ -2546,12 +2689,16 @@ static noinline struct module *load_module(void __user *umod,
free_unload:
module_unload_free(mod);
#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP)
@@ -69845,7 +72159,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* mod will be freed with core. Don't access it beyond this line! */
free_percpu:
if (percpu)
-@@ -2653,10 +2792,12 @@ SYSCALL_DEFINE3(init_module, void __user
+@@ -2653,10 +2800,12 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
mod->symtab = mod->core_symtab;
mod->strtab = mod->core_strtab;
#endif
@@ -69862,7 +72176,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
mutex_unlock(&module_mutex);
return 0;
-@@ -2687,10 +2828,16 @@ static const char *get_ksymbol(struct mo
+@@ -2687,10 +2836,16 @@ static const char *get_ksymbol(struct module *mod,
unsigned long nextval;
/* At worse, next value is at end of module */
@@ -69882,7 +72196,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* Scan for closest preceeding symbol, and next symbol. (ELF
starts real symbols at 1). */
-@@ -2936,7 +3083,7 @@ static int m_show(struct seq_file *m, vo
+@@ -2936,7 +3091,7 @@ static int m_show(struct seq_file *m, void *p)
char buf[8];
seq_printf(m, "%s %u",
@@ -69891,7 +72205,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
print_unload_info(m, mod);
/* Informative for users. */
-@@ -2945,7 +3092,7 @@ static int m_show(struct seq_file *m, vo
+@@ -2945,7 +3100,7 @@ static int m_show(struct seq_file *m, void *p)
mod->state == MODULE_STATE_COMING ? "Loading":
"Live");
/* Used by oprofile and other similar tools. */
@@ -69900,7 +72214,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
/* Taints info */
if (mod->taints)
-@@ -2981,7 +3128,17 @@ static const struct file_operations proc
+@@ -2981,7 +3136,17 @@ static const struct file_operations proc_modules_operations = {
static int __init proc_modules_init(void)
{
@@ -69918,7 +72232,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
return 0;
}
module_init(proc_modules_init);
-@@ -3040,12 +3197,12 @@ struct module *__module_address(unsigned
+@@ -3040,12 +3205,12 @@ struct module *__module_address(unsigned long addr)
{
struct module *mod;
@@ -69934,7 +72248,7 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
return mod;
return NULL;
}
-@@ -3079,11 +3236,20 @@ bool is_module_text_address(unsigned lon
+@@ -3079,11 +3244,20 @@ bool is_module_text_address(unsigned long addr)
*/
struct module *__module_text_address(unsigned long addr)
{
@@ -69958,50 +72272,11 @@ diff -urNp linux-2.6.32.49/kernel/module.c linux-2.6.32.49/kernel/module.c
mod = NULL;
}
return mod;
-diff -urNp linux-2.6.32.49/kernel/mutex.c linux-2.6.32.49/kernel/mutex.c
---- linux-2.6.32.49/kernel/mutex.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/mutex.c 2011-11-15 19:59:43.000000000 -0500
-@@ -169,7 +169,7 @@ __mutex_lock_common(struct mutex *lock,
- */
-
- for (;;) {
-- struct thread_info *owner;
-+ struct task_struct *owner;
-
- /*
- * If we own the BKL, then don't spin. The owner of
-@@ -214,7 +214,7 @@ __mutex_lock_common(struct mutex *lock,
- spin_lock_mutex(&lock->wait_lock, flags);
-
- debug_mutex_lock_common(lock, &waiter);
-- debug_mutex_add_waiter(lock, &waiter, task_thread_info(task));
-+ debug_mutex_add_waiter(lock, &waiter, task);
-
- /* add waiting tasks to the end of the waitqueue (FIFO): */
- list_add_tail(&waiter.list, &lock->wait_list);
-@@ -243,8 +243,7 @@ __mutex_lock_common(struct mutex *lock,
- * TASK_UNINTERRUPTIBLE case.)
- */
- if (unlikely(signal_pending_state(state, task))) {
-- mutex_remove_waiter(lock, &waiter,
-- task_thread_info(task));
-+ mutex_remove_waiter(lock, &waiter, task);
- mutex_release(&lock->dep_map, 1, ip);
- spin_unlock_mutex(&lock->wait_lock, flags);
-
-@@ -265,7 +264,7 @@ __mutex_lock_common(struct mutex *lock,
- done:
- lock_acquired(&lock->dep_map, ip);
- /* got the lock - rejoice! */
-- mutex_remove_waiter(lock, &waiter, current_thread_info());
-+ mutex_remove_waiter(lock, &waiter, task);
- mutex_set_owner(lock);
-
- /* set it to 0 if there are no waiters left: */
-diff -urNp linux-2.6.32.49/kernel/mutex-debug.c linux-2.6.32.49/kernel/mutex-debug.c
---- linux-2.6.32.49/kernel/mutex-debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/mutex-debug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -49,21 +49,21 @@ void debug_mutex_free_waiter(struct mute
+diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c
+index ec815a9..fe46e99 100644
+--- a/kernel/mutex-debug.c
++++ b/kernel/mutex-debug.c
+@@ -49,21 +49,21 @@ void debug_mutex_free_waiter(struct mutex_waiter *waiter)
}
void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
@@ -70029,7 +72304,7 @@ diff -urNp linux-2.6.32.49/kernel/mutex-debug.c linux-2.6.32.49/kernel/mutex-deb
list_del_init(&waiter->list);
waiter->task = NULL;
-@@ -75,7 +75,7 @@ void debug_mutex_unlock(struct mutex *lo
+@@ -75,7 +75,7 @@ void debug_mutex_unlock(struct mutex *lock)
return;
DEBUG_LOCKS_WARN_ON(lock->magic != lock);
@@ -70038,10 +72313,11 @@ diff -urNp linux-2.6.32.49/kernel/mutex-debug.c linux-2.6.32.49/kernel/mutex-deb
DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
mutex_clear_owner(lock);
}
-diff -urNp linux-2.6.32.49/kernel/mutex-debug.h linux-2.6.32.49/kernel/mutex-debug.h
---- linux-2.6.32.49/kernel/mutex-debug.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/mutex-debug.h 2011-11-15 19:59:43.000000000 -0500
-@@ -20,16 +20,16 @@ extern void debug_mutex_wake_waiter(stru
+diff --git a/kernel/mutex-debug.h b/kernel/mutex-debug.h
+index 6b2d735..372d3c4 100644
+--- a/kernel/mutex-debug.h
++++ b/kernel/mutex-debug.h
+@@ -20,16 +20,16 @@ extern void debug_mutex_wake_waiter(struct mutex *lock,
extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);
extern void debug_mutex_add_waiter(struct mutex *lock,
struct mutex_waiter *waiter,
@@ -70061,9 +72337,51 @@ diff -urNp linux-2.6.32.49/kernel/mutex-debug.h linux-2.6.32.49/kernel/mutex-deb
}
static inline void mutex_clear_owner(struct mutex *lock)
-diff -urNp linux-2.6.32.49/kernel/mutex.h linux-2.6.32.49/kernel/mutex.h
---- linux-2.6.32.49/kernel/mutex.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/mutex.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/mutex.c b/kernel/mutex.c
+index f85644c..5ee9f77 100644
+--- a/kernel/mutex.c
++++ b/kernel/mutex.c
+@@ -169,7 +169,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ */
+
+ for (;;) {
+- struct thread_info *owner;
++ struct task_struct *owner;
+
+ /*
+ * If we own the BKL, then don't spin. The owner of
+@@ -214,7 +214,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ spin_lock_mutex(&lock->wait_lock, flags);
+
+ debug_mutex_lock_common(lock, &waiter);
+- debug_mutex_add_waiter(lock, &waiter, task_thread_info(task));
++ debug_mutex_add_waiter(lock, &waiter, task);
+
+ /* add waiting tasks to the end of the waitqueue (FIFO): */
+ list_add_tail(&waiter.list, &lock->wait_list);
+@@ -243,8 +243,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ * TASK_UNINTERRUPTIBLE case.)
+ */
+ if (unlikely(signal_pending_state(state, task))) {
+- mutex_remove_waiter(lock, &waiter,
+- task_thread_info(task));
++ mutex_remove_waiter(lock, &waiter, task);
+ mutex_release(&lock->dep_map, 1, ip);
+ spin_unlock_mutex(&lock->wait_lock, flags);
+
+@@ -265,7 +264,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ done:
+ lock_acquired(&lock->dep_map, ip);
+ /* got the lock - rejoice! */
+- mutex_remove_waiter(lock, &waiter, current_thread_info());
++ mutex_remove_waiter(lock, &waiter, task);
+ mutex_set_owner(lock);
+
+ /* set it to 0 if there are no waiters left: */
+diff --git a/kernel/mutex.h b/kernel/mutex.h
+index 67578ca..4115fbf 100644
+--- a/kernel/mutex.h
++++ b/kernel/mutex.h
@@ -19,7 +19,7 @@
#ifdef CONFIG_SMP
static inline void mutex_set_owner(struct mutex *lock)
@@ -70073,10 +72391,11 @@ diff -urNp linux-2.6.32.49/kernel/mutex.h linux-2.6.32.49/kernel/mutex.h
}
static inline void mutex_clear_owner(struct mutex *lock)
-diff -urNp linux-2.6.32.49/kernel/panic.c linux-2.6.32.49/kernel/panic.c
---- linux-2.6.32.49/kernel/panic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/panic.c 2011-11-15 19:59:43.000000000 -0500
-@@ -352,7 +352,7 @@ static void warn_slowpath_common(const c
+diff --git a/kernel/panic.c b/kernel/panic.c
+index 96b45d0..45c447a 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -352,7 +352,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc
const char *board;
printk(KERN_WARNING "------------[ cut here ]------------\n");
@@ -70095,10 +72414,11 @@ diff -urNp linux-2.6.32.49/kernel/panic.c linux-2.6.32.49/kernel/panic.c
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
-diff -urNp linux-2.6.32.49/kernel/params.c linux-2.6.32.49/kernel/params.c
---- linux-2.6.32.49/kernel/params.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/params.c 2011-11-15 19:59:43.000000000 -0500
-@@ -725,7 +725,7 @@ static ssize_t module_attr_store(struct
+diff --git a/kernel/params.c b/kernel/params.c
+index d656c27..21e452c 100644
+--- a/kernel/params.c
++++ b/kernel/params.c
+@@ -725,7 +725,7 @@ static ssize_t module_attr_store(struct kobject *kobj,
return ret;
}
@@ -70107,7 +72427,7 @@ diff -urNp linux-2.6.32.49/kernel/params.c linux-2.6.32.49/kernel/params.c
.show = module_attr_show,
.store = module_attr_store,
};
-@@ -739,7 +739,7 @@ static int uevent_filter(struct kset *ks
+@@ -739,7 +739,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj)
return 0;
}
@@ -70116,10 +72436,11 @@ diff -urNp linux-2.6.32.49/kernel/params.c linux-2.6.32.49/kernel/params.c
.filter = uevent_filter,
};
-diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event.c
---- linux-2.6.32.49/kernel/perf_event.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/perf_event.c 2011-11-15 19:59:43.000000000 -0500
-@@ -77,7 +77,7 @@ int sysctl_perf_event_mlock __read_mostl
+diff --git a/kernel/perf_event.c b/kernel/perf_event.c
+index 37ebc14..9c121d9 100644
+--- a/kernel/perf_event.c
++++ b/kernel/perf_event.c
+@@ -77,7 +77,7 @@ int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */
*/
int sysctl_perf_event_sample_rate __read_mostly = 100000;
@@ -70128,7 +72449,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
/*
* Lock for (sysadmin-configurable) event reservations:
-@@ -1094,9 +1094,9 @@ static void __perf_event_sync_stat(struc
+@@ -1094,9 +1094,9 @@ static void __perf_event_sync_stat(struct perf_event *event,
* In order to keep per-task stats reliable we need to flip the event
* values when we flip the contexts.
*/
@@ -70141,7 +72462,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
swap(event->total_time_enabled, next_event->total_time_enabled);
swap(event->total_time_running, next_event->total_time_running);
-@@ -1552,7 +1552,7 @@ static u64 perf_event_read(struct perf_e
+@@ -1552,7 +1552,7 @@ static u64 perf_event_read(struct perf_event *event)
update_event_times(event);
}
@@ -70150,7 +72471,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
/*
-@@ -1790,11 +1790,11 @@ static int perf_event_read_group(struct
+@@ -1790,11 +1790,11 @@ static int perf_event_read_group(struct perf_event *event,
values[n++] = 1 + leader->nr_siblings;
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
values[n++] = leader->total_time_enabled +
@@ -70164,7 +72485,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
size = n * sizeof(u64);
-@@ -1829,11 +1829,11 @@ static int perf_event_read_one(struct pe
+@@ -1829,11 +1829,11 @@ static int perf_event_read_one(struct perf_event *event,
values[n++] = perf_event_read_value(event);
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
values[n++] = event->total_time_enabled +
@@ -70178,7 +72499,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(event);
-@@ -1903,7 +1903,7 @@ static unsigned int perf_poll(struct fil
+@@ -1903,7 +1903,7 @@ static unsigned int perf_poll(struct file *file, poll_table *wait)
static void perf_event_reset(struct perf_event *event)
{
(void)perf_event_read(event);
@@ -70187,7 +72508,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
perf_event_update_userpage(event);
}
-@@ -2079,15 +2079,15 @@ void perf_event_update_userpage(struct p
+@@ -2079,15 +2079,15 @@ void perf_event_update_userpage(struct perf_event *event)
++userpg->lock;
barrier();
userpg->index = perf_event_index(event);
@@ -70207,7 +72528,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
barrier();
++userpg->lock;
-@@ -2903,14 +2903,14 @@ static void perf_output_read_one(struct
+@@ -2903,14 +2903,14 @@ static void perf_output_read_one(struct perf_output_handle *handle,
u64 values[4];
int n = 0;
@@ -70225,7 +72546,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(event);
-@@ -2940,7 +2940,7 @@ static void perf_output_read_group(struc
+@@ -2940,7 +2940,7 @@ static void perf_output_read_group(struct perf_output_handle *handle,
if (leader != event)
leader->pmu->read(leader);
@@ -70234,7 +72555,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(leader);
-@@ -2952,7 +2952,7 @@ static void perf_output_read_group(struc
+@@ -2952,7 +2952,7 @@ static void perf_output_read_group(struct perf_output_handle *handle,
if (sub != event)
sub->pmu->read(sub);
@@ -70243,7 +72564,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(sub);
-@@ -3525,12 +3525,12 @@ static void perf_event_mmap_event(struct
+@@ -3525,12 +3525,12 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
* need to add enough zero bytes after the string to handle
* the 64bit alignment we do later.
*/
@@ -70258,7 +72579,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
if (IS_ERR(name)) {
name = strncpy(tmp, "//toolong", sizeof(tmp));
goto got_name;
-@@ -3783,7 +3783,7 @@ static void perf_swevent_add(struct perf
+@@ -3783,7 +3783,7 @@ static void perf_swevent_add(struct perf_event *event, u64 nr,
{
struct hw_perf_event *hwc = &event->hw;
@@ -70267,7 +72588,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
if (!hwc->sample_period)
return;
-@@ -4040,9 +4040,9 @@ static void cpu_clock_perf_event_update(
+@@ -4040,9 +4040,9 @@ static void cpu_clock_perf_event_update(struct perf_event *event)
u64 now;
now = cpu_clock(cpu);
@@ -70280,7 +72601,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
static int cpu_clock_perf_event_enable(struct perf_event *event)
-@@ -4050,7 +4050,7 @@ static int cpu_clock_perf_event_enable(s
+@@ -4050,7 +4050,7 @@ static int cpu_clock_perf_event_enable(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int cpu = raw_smp_processor_id();
@@ -70289,7 +72610,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
perf_swevent_start_hrtimer(event);
return 0;
-@@ -4082,9 +4082,9 @@ static void task_clock_perf_event_update
+@@ -4082,9 +4082,9 @@ static void task_clock_perf_event_update(struct perf_event *event, u64 now)
u64 prev;
s64 delta;
@@ -70301,7 +72622,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
}
static int task_clock_perf_event_enable(struct perf_event *event)
-@@ -4094,7 +4094,7 @@ static int task_clock_perf_event_enable(
+@@ -4094,7 +4094,7 @@ static int task_clock_perf_event_enable(struct perf_event *event)
now = event->ctx->time;
@@ -70310,7 +72631,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
perf_swevent_start_hrtimer(event);
-@@ -4289,7 +4289,7 @@ perf_event_alloc(struct perf_event_attr
+@@ -4289,7 +4289,7 @@ perf_event_alloc(struct perf_event_attr *attr,
event->parent = parent_event;
event->ns = get_pid_ns(current->nsproxy->pid_ns);
@@ -70319,7 +72640,7 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
event->state = PERF_EVENT_STATE_INACTIVE;
-@@ -4720,15 +4720,15 @@ static void sync_child_event(struct perf
+@@ -4720,15 +4720,15 @@ static void sync_child_event(struct perf_event *child_event,
if (child_event->attr.inherit_stat)
perf_event_read_event(child_event, child);
@@ -70339,9 +72660,10 @@ diff -urNp linux-2.6.32.49/kernel/perf_event.c linux-2.6.32.49/kernel/perf_event
&parent_event->child_total_time_running);
/*
-diff -urNp linux-2.6.32.49/kernel/pid.c linux-2.6.32.49/kernel/pid.c
---- linux-2.6.32.49/kernel/pid.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/pid.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/pid.c b/kernel/pid.c
+index fce7198..4f23a7e 100644
+--- a/kernel/pid.c
++++ b/kernel/pid.c
@@ -33,6 +33,7 @@
#include <linux/rculist.h>
#include <linux/bootmem.h>
@@ -70350,7 +72672,7 @@ diff -urNp linux-2.6.32.49/kernel/pid.c linux-2.6.32.49/kernel/pid.c
#include <linux/pid_namespace.h>
#include <linux/init_task.h>
#include <linux/syscalls.h>
-@@ -45,7 +46,7 @@ struct pid init_struct_pid = INIT_STRUCT
+@@ -45,7 +46,7 @@ struct pid init_struct_pid = INIT_STRUCT_PID;
int pid_max = PID_MAX_DEFAULT;
@@ -70375,7 +72697,7 @@ diff -urNp linux-2.6.32.49/kernel/pid.c linux-2.6.32.49/kernel/pid.c
}
struct task_struct *find_task_by_vpid(pid_t vnr)
-@@ -391,6 +399,11 @@ struct task_struct *find_task_by_vpid(pi
+@@ -391,6 +399,11 @@ struct task_struct *find_task_by_vpid(pid_t vnr)
return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
}
@@ -70387,9 +72709,10 @@ diff -urNp linux-2.6.32.49/kernel/pid.c linux-2.6.32.49/kernel/pid.c
struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
{
struct pid *pid;
-diff -urNp linux-2.6.32.49/kernel/posix-cpu-timers.c linux-2.6.32.49/kernel/posix-cpu-timers.c
---- linux-2.6.32.49/kernel/posix-cpu-timers.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/posix-cpu-timers.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
+index 5c9dc22..d271117 100644
+--- a/kernel/posix-cpu-timers.c
++++ b/kernel/posix-cpu-timers.c
@@ -6,6 +6,7 @@
#include <linux/posix-timers.h>
#include <linux/errno.h>
@@ -70398,7 +72721,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-cpu-timers.c linux-2.6.32.49/kernel/posi
#include <asm/uaccess.h>
#include <linux/kernel_stat.h>
#include <trace/events/timer.h>
-@@ -1697,7 +1698,7 @@ static long thread_cpu_nsleep_restart(st
+@@ -1697,7 +1698,7 @@ static long thread_cpu_nsleep_restart(struct restart_block *restart_block)
static __init int init_posix_cpu_timers(void)
{
@@ -70407,7 +72730,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-cpu-timers.c linux-2.6.32.49/kernel/posi
.clock_getres = process_cpu_clock_getres,
.clock_get = process_cpu_clock_get,
.clock_set = do_posix_clock_nosettime,
-@@ -1705,7 +1706,7 @@ static __init int init_posix_cpu_timers(
+@@ -1705,7 +1706,7 @@ static __init int init_posix_cpu_timers(void)
.nsleep = process_cpu_nsleep,
.nsleep_restart = process_cpu_nsleep_restart,
};
@@ -70416,9 +72739,10 @@ diff -urNp linux-2.6.32.49/kernel/posix-cpu-timers.c linux-2.6.32.49/kernel/posi
.clock_getres = thread_cpu_clock_getres,
.clock_get = thread_cpu_clock_get,
.clock_set = do_posix_clock_nosettime,
-diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-timers.c
---- linux-2.6.32.49/kernel/posix-timers.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/posix-timers.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
+index 5e76d22..cf1baeb 100644
+--- a/kernel/posix-timers.c
++++ b/kernel/posix-timers.c
@@ -42,6 +42,7 @@
#include <linux/compiler.h>
#include <linux/idr.h>
@@ -70436,7 +72760,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
/*
* These ones are defined below.
-@@ -157,8 +158,8 @@ static inline void unlock_timer(struct k
+@@ -157,8 +158,8 @@ static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
*/
#define CLOCK_DISPATCH(clock, call, arglist) \
((clock) < 0 ? posix_cpu_##call arglist : \
@@ -70447,7 +72771,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
/*
* Default clock hook functions when the struct k_clock passed
-@@ -172,7 +173,7 @@ static inline int common_clock_getres(co
+@@ -172,7 +173,7 @@ static inline int common_clock_getres(const clockid_t which_clock,
struct timespec *tp)
{
tp->tv_sec = 0;
@@ -70456,7 +72780,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
return 0;
}
-@@ -217,9 +218,11 @@ static inline int invalid_clockid(const
+@@ -217,9 +218,11 @@ static inline int invalid_clockid(const clockid_t which_clock)
return 0;
if ((unsigned) which_clock >= MAX_CLOCKS)
return 1;
@@ -70470,7 +72794,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
return 0;
return 1;
}
-@@ -266,29 +269,29 @@ int posix_get_coarse_res(const clockid_t
+@@ -266,29 +269,29 @@ int posix_get_coarse_res(const clockid_t which_clock, struct timespec *tp)
*/
static __init int init_posix_timers(void)
{
@@ -70505,7 +72829,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
.clock_getres = posix_get_coarse_res,
.clock_get = posix_get_monotonic_coarse,
.clock_set = do_posix_clock_nosettime,
-@@ -296,6 +299,8 @@ static __init int init_posix_timers(void
+@@ -296,6 +299,8 @@ static __init int init_posix_timers(void)
.nsleep = no_nsleep,
};
@@ -70514,7 +72838,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
register_posix_clock(CLOCK_REALTIME, &clock_realtime);
register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);
register_posix_clock(CLOCK_MONOTONIC_RAW, &clock_monotonic_raw);
-@@ -484,7 +489,7 @@ void register_posix_clock(const clockid_
+@@ -484,7 +489,7 @@ void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock)
return;
}
@@ -70523,7 +72847,7 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
}
EXPORT_SYMBOL_GPL(register_posix_clock);
-@@ -948,6 +953,13 @@ SYSCALL_DEFINE2(clock_settime, const clo
+@@ -948,6 +953,13 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
if (copy_from_user(&new_tp, tp, sizeof (*tp)))
return -EFAULT;
@@ -70537,9 +72861,10 @@ diff -urNp linux-2.6.32.49/kernel/posix-timers.c linux-2.6.32.49/kernel/posix-ti
return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp));
}
-diff -urNp linux-2.6.32.49/kernel/power/hibernate.c linux-2.6.32.49/kernel/power/hibernate.c
---- linux-2.6.32.49/kernel/power/hibernate.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/power/hibernate.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
+index 04a9e90..bc355aa 100644
+--- a/kernel/power/hibernate.c
++++ b/kernel/power/hibernate.c
@@ -48,14 +48,14 @@ enum {
static int hibernation_mode = HIBERNATION_SHUTDOWN;
@@ -70557,10 +72882,11 @@ diff -urNp linux-2.6.32.49/kernel/power/hibernate.c linux-2.6.32.49/kernel/power
{
if (ops && !(ops->begin && ops->end && ops->pre_snapshot
&& ops->prepare && ops->finish && ops->enter && ops->pre_restore
-diff -urNp linux-2.6.32.49/kernel/power/poweroff.c linux-2.6.32.49/kernel/power/poweroff.c
---- linux-2.6.32.49/kernel/power/poweroff.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/power/poweroff.c 2011-11-15 19:59:43.000000000 -0500
-@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof
+diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c
+index e8b3370..484c2e4 100644
+--- a/kernel/power/poweroff.c
++++ b/kernel/power/poweroff.c
+@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_poweroff_op = {
.enable_mask = SYSRQ_ENABLE_BOOT,
};
@@ -70569,10 +72895,11 @@ diff -urNp linux-2.6.32.49/kernel/power/poweroff.c linux-2.6.32.49/kernel/power/
{
register_sysrq_key('o', &sysrq_poweroff_op);
return 0;
-diff -urNp linux-2.6.32.49/kernel/power/process.c linux-2.6.32.49/kernel/power/process.c
---- linux-2.6.32.49/kernel/power/process.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/power/process.c 2011-11-15 19:59:43.000000000 -0500
-@@ -37,12 +37,15 @@ static int try_to_freeze_tasks(bool sig_
+diff --git a/kernel/power/process.c b/kernel/power/process.c
+index e7cd671..56d5f459 100644
+--- a/kernel/power/process.c
++++ b/kernel/power/process.c
+@@ -37,12 +37,15 @@ static int try_to_freeze_tasks(bool sig_only)
struct timeval start, end;
u64 elapsed_csecs64;
unsigned int elapsed_csecs;
@@ -70588,7 +72915,7 @@ diff -urNp linux-2.6.32.49/kernel/power/process.c linux-2.6.32.49/kernel/power/p
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (frozen(p) || !freezeable(p))
-@@ -57,15 +60,17 @@ static int try_to_freeze_tasks(bool sig_
+@@ -57,15 +60,17 @@ static int try_to_freeze_tasks(bool sig_only)
* It is "frozen enough". If the task does wake
* up, it will immediately call try_to_freeze.
*/
@@ -70611,10 +72938,11 @@ diff -urNp linux-2.6.32.49/kernel/power/process.c linux-2.6.32.49/kernel/power/p
do_gettimeofday(&end);
elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start);
-diff -urNp linux-2.6.32.49/kernel/power/suspend.c linux-2.6.32.49/kernel/power/suspend.c
---- linux-2.6.32.49/kernel/power/suspend.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/kernel/power/suspend.c 2011-11-26 19:45:13.000000000 -0500
-@@ -23,13 +23,13 @@ const char *const pm_states[PM_SUSPEND_M
+diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
+index 40dd021..fb30ceb 100644
+--- a/kernel/power/suspend.c
++++ b/kernel/power/suspend.c
+@@ -23,13 +23,13 @@ const char *const pm_states[PM_SUSPEND_MAX] = {
[PM_SUSPEND_MEM] = "mem",
};
@@ -70630,10 +72958,11 @@ diff -urNp linux-2.6.32.49/kernel/power/suspend.c linux-2.6.32.49/kernel/power/s
{
mutex_lock(&pm_mutex);
suspend_ops = ops;
-diff -urNp linux-2.6.32.49/kernel/printk.c linux-2.6.32.49/kernel/printk.c
---- linux-2.6.32.49/kernel/printk.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/printk.c 2011-11-15 19:59:43.000000000 -0500
-@@ -278,6 +278,11 @@ int do_syslog(int type, char __user *buf
+diff --git a/kernel/printk.c b/kernel/printk.c
+index 4cade47..637e78a 100644
+--- a/kernel/printk.c
++++ b/kernel/printk.c
+@@ -278,6 +278,11 @@ int do_syslog(int type, char __user *buf, int len)
char c;
int error = 0;
@@ -70645,9 +72974,10 @@ diff -urNp linux-2.6.32.49/kernel/printk.c linux-2.6.32.49/kernel/printk.c
error = security_syslog(type);
if (error)
return error;
-diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
---- linux-2.6.32.49/kernel/profile.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/profile.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/profile.c b/kernel/profile.c
+index dfadc5b..7f59404 100644
+--- a/kernel/profile.c
++++ b/kernel/profile.c
@@ -39,7 +39,7 @@ struct profile_hit {
/* Oprofile timer tick hook */
static int (*timer_hook)(struct pt_regs *) __read_mostly;
@@ -70666,7 +72996,7 @@ diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
hits[i].hits = hits[i].pc = 0;
}
}
-@@ -346,9 +346,9 @@ void profile_hits(int type, void *__pc,
+@@ -346,9 +346,9 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits)
* Add the current hit(s) and flush the write-queue out
* to the global buffer:
*/
@@ -70678,7 +73008,7 @@ diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
hits[i].pc = hits[i].hits = 0;
}
out:
-@@ -426,7 +426,7 @@ void profile_hits(int type, void *__pc,
+@@ -426,7 +426,7 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits)
if (prof_on != type || !prof_buffer)
return;
pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
@@ -70687,7 +73017,7 @@ diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
}
#endif /* !CONFIG_SMP */
EXPORT_SYMBOL_GPL(profile_hits);
-@@ -517,7 +517,7 @@ read_profile(struct file *file, char __u
+@@ -517,7 +517,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
return -EFAULT;
buf++; p++; count--; read++;
}
@@ -70696,7 +73026,7 @@ diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
if (copy_to_user(buf, (void *)pnt, count))
return -EFAULT;
read += count;
-@@ -548,7 +548,7 @@ static ssize_t write_profile(struct file
+@@ -548,7 +548,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf,
}
#endif
profile_discard_flip_buffers();
@@ -70705,10 +73035,11 @@ diff -urNp linux-2.6.32.49/kernel/profile.c linux-2.6.32.49/kernel/profile.c
return count;
}
-diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
---- linux-2.6.32.49/kernel/ptrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/ptrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -117,7 +117,8 @@ int ptrace_check_attach(struct task_stru
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c
+index 05625f6..733bf70 100644
+--- a/kernel/ptrace.c
++++ b/kernel/ptrace.c
+@@ -117,7 +117,8 @@ int ptrace_check_attach(struct task_struct *child, int kill)
return ret;
}
@@ -70718,7 +73049,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
{
const struct cred *cred = current_cred(), *tcred;
-@@ -141,7 +142,9 @@ int __ptrace_may_access(struct task_stru
+@@ -141,7 +142,9 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
cred->gid != tcred->egid ||
cred->gid != tcred->sgid ||
cred->gid != tcred->gid) &&
@@ -70729,7 +73060,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
rcu_read_unlock();
return -EPERM;
}
-@@ -149,7 +152,9 @@ int __ptrace_may_access(struct task_stru
+@@ -149,7 +152,9 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
smp_rmb();
if (task->mm)
dumpable = get_dumpable(task->mm);
@@ -70740,7 +73071,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
return -EPERM;
return security_ptrace_access_check(task, mode);
-@@ -159,7 +164,16 @@ bool ptrace_may_access(struct task_struc
+@@ -159,7 +164,16 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
{
int err;
task_lock(task);
@@ -70758,7 +73089,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
task_unlock(task);
return !err;
}
-@@ -186,7 +200,7 @@ int ptrace_attach(struct task_struct *ta
+@@ -186,7 +200,7 @@ int ptrace_attach(struct task_struct *task)
goto out;
task_lock(task);
@@ -70767,7 +73098,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
task_unlock(task);
if (retval)
goto unlock_creds;
-@@ -199,7 +213,7 @@ int ptrace_attach(struct task_struct *ta
+@@ -199,7 +213,7 @@ int ptrace_attach(struct task_struct *task)
goto unlock_tasklist;
task->ptrace = PT_PTRACED;
@@ -70776,7 +73107,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
task->ptrace |= PT_PTRACE_CAP;
__ptrace_link(task, current);
-@@ -351,6 +365,8 @@ int ptrace_readdata(struct task_struct *
+@@ -351,6 +365,8 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
{
int copied = 0;
@@ -70785,7 +73116,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
while (len > 0) {
char buf[128];
int this_len, retval;
-@@ -376,6 +392,8 @@ int ptrace_writedata(struct task_struct
+@@ -376,6 +392,8 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
{
int copied = 0;
@@ -70794,7 +73125,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
while (len > 0) {
char buf[128];
int this_len, retval;
-@@ -517,6 +535,8 @@ int ptrace_request(struct task_struct *c
+@@ -517,6 +535,8 @@ int ptrace_request(struct task_struct *child, long request,
int ret = -EIO;
siginfo_t siginfo;
@@ -70803,7 +73134,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
switch (request) {
case PTRACE_PEEKTEXT:
case PTRACE_PEEKDATA:
-@@ -532,18 +552,18 @@ int ptrace_request(struct task_struct *c
+@@ -532,18 +552,18 @@ int ptrace_request(struct task_struct *child, long request,
ret = ptrace_setoptions(child, data);
break;
case PTRACE_GETEVENTMSG:
@@ -70825,7 +73156,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
sizeof siginfo))
ret = -EFAULT;
else
-@@ -621,14 +641,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l
+@@ -621,14 +641,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
goto out;
}
@@ -70848,7 +73179,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
goto out_put_task_struct;
}
-@@ -653,7 +680,7 @@ int generic_ptrace_peekdata(struct task_
+@@ -653,7 +680,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
if (copied != sizeof(tmp))
return -EIO;
@@ -70857,7 +73188,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
}
int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
-@@ -675,6 +702,8 @@ int compat_ptrace_request(struct task_st
+@@ -675,6 +702,8 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
siginfo_t siginfo;
int ret;
@@ -70866,7 +73197,7 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
switch (request) {
case PTRACE_PEEKTEXT:
case PTRACE_PEEKDATA:
-@@ -740,14 +769,21 @@ asmlinkage long compat_sys_ptrace(compat
+@@ -740,14 +769,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
goto out;
}
@@ -70889,10 +73220,11 @@ diff -urNp linux-2.6.32.49/kernel/ptrace.c linux-2.6.32.49/kernel/ptrace.c
goto out_put_task_struct;
}
-diff -urNp linux-2.6.32.49/kernel/rcutorture.c linux-2.6.32.49/kernel/rcutorture.c
---- linux-2.6.32.49/kernel/rcutorture.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/rcutorture.c 2011-11-15 19:59:43.000000000 -0500
-@@ -118,12 +118,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_
+diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
+index 697c0a0..2402696 100644
+--- a/kernel/rcutorture.c
++++ b/kernel/rcutorture.c
+@@ -118,12 +118,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) =
{ 0 };
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) =
{ 0 };
@@ -70943,7 +73275,7 @@ diff -urNp linux-2.6.32.49/kernel/rcutorture.c linux-2.6.32.49/kernel/rcutorture
if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
rp->rtort_mbtest = 0;
rcu_torture_free(rp);
-@@ -359,7 +359,7 @@ static void rcu_sync_torture_deferred_fr
+@@ -359,7 +359,7 @@ static void rcu_sync_torture_deferred_free(struct rcu_torture *p)
i = rp->rtort_pipe_count;
if (i > RCU_TORTURE_PIPE_LEN)
i = RCU_TORTURE_PIPE_LEN;
@@ -70961,7 +73293,7 @@ diff -urNp linux-2.6.32.49/kernel/rcutorture.c linux-2.6.32.49/kernel/rcutorture
old_rp->rtort_pipe_count++;
cur_ops->deferred_free(old_rp);
}
-@@ -718,7 +718,7 @@ static void rcu_torture_timer(unsigned l
+@@ -718,7 +718,7 @@ static void rcu_torture_timer(unsigned long unused)
return;
}
if (p->rtort_mbtest == 0)
@@ -71041,10 +73373,11 @@ diff -urNp linux-2.6.32.49/kernel/rcutorture.c linux-2.6.32.49/kernel/rcutorture
for_each_possible_cpu(cpu) {
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
per_cpu(rcu_torture_count, cpu)[i] = 0;
-diff -urNp linux-2.6.32.49/kernel/rcutree.c linux-2.6.32.49/kernel/rcutree.c
---- linux-2.6.32.49/kernel/rcutree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/rcutree.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1303,7 +1303,7 @@ __rcu_process_callbacks(struct rcu_state
+diff --git a/kernel/rcutree.c b/kernel/rcutree.c
+index 683c4f3..97f54c6 100644
+--- a/kernel/rcutree.c
++++ b/kernel/rcutree.c
+@@ -1303,7 +1303,7 @@ __rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
/*
* Do softirq processing for the current CPU.
*/
@@ -71053,10 +73386,11 @@ diff -urNp linux-2.6.32.49/kernel/rcutree.c linux-2.6.32.49/kernel/rcutree.c
{
/*
* Memory references from any prior RCU read-side critical sections
-diff -urNp linux-2.6.32.49/kernel/rcutree_plugin.h linux-2.6.32.49/kernel/rcutree_plugin.h
---- linux-2.6.32.49/kernel/rcutree_plugin.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/rcutree_plugin.h 2011-11-15 19:59:43.000000000 -0500
-@@ -145,7 +145,7 @@ static void rcu_preempt_note_context_swi
+diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
+index c03edf7..ac1b341 100644
+--- a/kernel/rcutree_plugin.h
++++ b/kernel/rcutree_plugin.h
+@@ -145,7 +145,7 @@ static void rcu_preempt_note_context_switch(int cpu)
*/
void __rcu_read_lock(void)
{
@@ -71074,10 +73408,11 @@ diff -urNp linux-2.6.32.49/kernel/rcutree_plugin.h linux-2.6.32.49/kernel/rcutre
unlikely(ACCESS_ONCE(t->rcu_read_unlock_special)))
rcu_read_unlock_special(t);
}
-diff -urNp linux-2.6.32.49/kernel/relay.c linux-2.6.32.49/kernel/relay.c
---- linux-2.6.32.49/kernel/relay.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/relay.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1222,7 +1222,7 @@ static int subbuf_splice_actor(struct fi
+diff --git a/kernel/relay.c b/kernel/relay.c
+index 760c262..a9fd241 100644
+--- a/kernel/relay.c
++++ b/kernel/relay.c
+@@ -1222,7 +1222,7 @@ static int subbuf_splice_actor(struct file *in,
unsigned int flags,
int *nonpad_ret)
{
@@ -71086,7 +73421,7 @@ diff -urNp linux-2.6.32.49/kernel/relay.c linux-2.6.32.49/kernel/relay.c
struct rchan_buf *rbuf = in->private_data;
unsigned int subbuf_size = rbuf->chan->subbuf_size;
uint64_t pos = (uint64_t) *ppos;
-@@ -1241,6 +1241,9 @@ static int subbuf_splice_actor(struct fi
+@@ -1241,6 +1241,9 @@ static int subbuf_splice_actor(struct file *in,
.ops = &relay_pipe_buf_ops,
.spd_release = relay_page_release,
};
@@ -71096,10 +73431,11 @@ diff -urNp linux-2.6.32.49/kernel/relay.c linux-2.6.32.49/kernel/relay.c
if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
return 0;
-diff -urNp linux-2.6.32.49/kernel/resource.c linux-2.6.32.49/kernel/resource.c
---- linux-2.6.32.49/kernel/resource.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/resource.c 2011-11-15 19:59:43.000000000 -0500
-@@ -132,8 +132,18 @@ static const struct file_operations proc
+diff --git a/kernel/resource.c b/kernel/resource.c
+index fb11a58..4e61ae1 100644
+--- a/kernel/resource.c
++++ b/kernel/resource.c
+@@ -132,8 +132,18 @@ static const struct file_operations proc_iomem_operations = {
static int __init ioresources_init(void)
{
@@ -71118,21 +73454,10 @@ diff -urNp linux-2.6.32.49/kernel/resource.c linux-2.6.32.49/kernel/resource.c
return 0;
}
__initcall(ioresources_init);
-diff -urNp linux-2.6.32.49/kernel/rtmutex.c linux-2.6.32.49/kernel/rtmutex.c
---- linux-2.6.32.49/kernel/rtmutex.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/rtmutex.c 2011-11-15 19:59:43.000000000 -0500
-@@ -511,7 +511,7 @@ static void wakeup_next_waiter(struct rt
- */
- spin_lock_irqsave(&pendowner->pi_lock, flags);
-
-- WARN_ON(!pendowner->pi_blocked_on);
-+ BUG_ON(!pendowner->pi_blocked_on);
- WARN_ON(pendowner->pi_blocked_on != waiter);
- WARN_ON(pendowner->pi_blocked_on->lock != lock);
-
-diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmutex-tester.c
---- linux-2.6.32.49/kernel/rtmutex-tester.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/rtmutex-tester.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
+index a56f629..1fc4989 100644
+--- a/kernel/rtmutex-tester.c
++++ b/kernel/rtmutex-tester.c
@@ -21,7 +21,7 @@
#define MAX_RT_TEST_MUTEXES 8
@@ -71142,7 +73467,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
struct test_thread_data {
int opcode;
-@@ -64,7 +64,7 @@ static int handle_op(struct test_thread_
+@@ -64,7 +64,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
case RTTEST_LOCKCONT:
td->mutexes[td->opdata] = 1;
@@ -71151,7 +73476,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
return 0;
case RTTEST_RESET:
-@@ -82,7 +82,7 @@ static int handle_op(struct test_thread_
+@@ -82,7 +82,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return 0;
case RTTEST_RESETEVENT:
@@ -71160,7 +73485,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
return 0;
default:
-@@ -99,9 +99,9 @@ static int handle_op(struct test_thread_
+@@ -99,9 +99,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return ret;
td->mutexes[id] = 1;
@@ -71172,7 +73497,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
td->mutexes[id] = 4;
return 0;
-@@ -112,9 +112,9 @@ static int handle_op(struct test_thread_
+@@ -112,9 +112,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return ret;
td->mutexes[id] = 1;
@@ -71184,7 +73509,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
td->mutexes[id] = ret ? 0 : 4;
return ret ? -EINTR : 0;
-@@ -123,9 +123,9 @@ static int handle_op(struct test_thread_
+@@ -123,9 +123,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
if (id < 0 || id >= MAX_RT_TEST_MUTEXES || td->mutexes[id] != 4)
return ret;
@@ -71196,7 +73521,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
td->mutexes[id] = 0;
return 0;
-@@ -187,7 +187,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -187,7 +187,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
break;
td->mutexes[dat] = 2;
@@ -71205,7 +73530,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
break;
case RTTEST_LOCKBKL:
-@@ -208,7 +208,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -208,7 +208,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
return;
td->mutexes[dat] = 3;
@@ -71214,7 +73539,7 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
break;
case RTTEST_LOCKNOWAIT:
-@@ -220,7 +220,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -220,7 +220,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
return;
td->mutexes[dat] = 1;
@@ -71223,10 +73548,24 @@ diff -urNp linux-2.6.32.49/kernel/rtmutex-tester.c linux-2.6.32.49/kernel/rtmute
return;
case RTTEST_LOCKBKL:
-diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
---- linux-2.6.32.49/kernel/sched.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/sched.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2764,9 +2764,10 @@ void wake_up_new_task(struct task_struct
+diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
+index 29bd4ba..8c5de90 100644
+--- a/kernel/rtmutex.c
++++ b/kernel/rtmutex.c
+@@ -511,7 +511,7 @@ static void wakeup_next_waiter(struct rt_mutex *lock)
+ */
+ spin_lock_irqsave(&pendowner->pi_lock, flags);
+
+- WARN_ON(!pendowner->pi_blocked_on);
++ BUG_ON(!pendowner->pi_blocked_on);
+ WARN_ON(pendowner->pi_blocked_on != waiter);
+ WARN_ON(pendowner->pi_blocked_on->lock != lock);
+
+diff --git a/kernel/sched.c b/kernel/sched.c
+index 0591df8..6e343c3 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -2764,9 +2764,10 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
{
unsigned long flags;
struct rq *rq;
@@ -71265,7 +73604,7 @@ diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
{
unsigned int cpu;
struct rq *rq;
-@@ -5784,10 +5787,10 @@ int mutex_spin_on_owner(struct mutex *lo
+@@ -5784,10 +5787,10 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner)
* DEBUG_PAGEALLOC could have unmapped it if
* the mutex owner just released it and exited.
*/
@@ -71278,7 +73617,7 @@ diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
#endif
/*
-@@ -5816,7 +5819,7 @@ int mutex_spin_on_owner(struct mutex *lo
+@@ -5816,7 +5819,7 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner)
/*
* Is that owner really running on that cpu?
*/
@@ -71287,7 +73626,7 @@ diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
return 0;
cpu_relax();
-@@ -6359,6 +6362,8 @@ int can_nice(const struct task_struct *p
+@@ -6359,6 +6362,8 @@ int can_nice(const struct task_struct *p, const int nice)
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
@@ -71306,7 +73645,7 @@ diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -8774,7 +8780,7 @@ static void init_sched_groups_power(int
+@@ -8774,7 +8780,7 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)
long power;
int weight;
@@ -71315,9 +73654,10 @@ diff -urNp linux-2.6.32.49/kernel/sched.c linux-2.6.32.49/kernel/sched.c
if (cpu != group_first_cpu(sd->groups))
return;
-diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
---- linux-2.6.32.49/kernel/signal.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/signal.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 2494827..cda80a0 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
@@ -41,12 +41,12 @@
static struct kmem_cache *sigqueue_cachep;
@@ -71333,7 +73673,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
{
/* Is it explicitly or implicitly ignored? */
return handler == SIG_IGN ||
-@@ -56,7 +56,7 @@ static int sig_handler_ignored(void __us
+@@ -56,7 +56,7 @@ static int sig_handler_ignored(void __user *handler, int sig)
static int sig_task_ignored(struct task_struct *t, int sig,
int from_ancestor_ns)
{
@@ -71342,7 +73682,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
handler = sig_handler(t, sig);
-@@ -207,6 +207,9 @@ static struct sigqueue *__sigqueue_alloc
+@@ -207,6 +207,9 @@ static struct sigqueue *__sigqueue_alloc(struct task_struct *t, gfp_t flags,
*/
user = get_uid(__task_cred(t)->user);
atomic_inc(&user->sigpending);
@@ -71352,7 +73692,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
if (override_rlimit ||
atomic_read(&user->sigpending) <=
t->signal->rlim[RLIMIT_SIGPENDING].rlim_cur)
-@@ -327,7 +330,7 @@ flush_signal_handlers(struct task_struct
+@@ -327,7 +330,7 @@ flush_signal_handlers(struct task_struct *t, int force_default)
int unhandled_signal(struct task_struct *tsk, int sig)
{
@@ -71361,7 +73701,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
if (is_global_init(tsk))
return 1;
if (handler != SIG_IGN && handler != SIG_DFL)
-@@ -627,6 +630,13 @@ static int check_kill_permission(int sig
+@@ -627,6 +630,13 @@ static int check_kill_permission(int sig, struct siginfo *info,
}
}
@@ -71375,7 +73715,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
return security_task_kill(t, info, sig, 0);
}
-@@ -968,7 +978,7 @@ __group_send_sig_info(int sig, struct si
+@@ -968,7 +978,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
return send_signal(sig, info, p, 1);
}
@@ -71384,7 +73724,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
{
return send_signal(sig, info, t, 0);
-@@ -1005,6 +1015,7 @@ force_sig_info(int sig, struct siginfo *
+@@ -1005,6 +1015,7 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
unsigned long int flags;
int ret, blocked, ignored;
struct k_sigaction *action;
@@ -71392,7 +73732,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
spin_lock_irqsave(&t->sighand->siglock, flags);
action = &t->sighand->action[sig-1];
-@@ -1019,9 +1030,18 @@ force_sig_info(int sig, struct siginfo *
+@@ -1019,9 +1030,18 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
}
if (action->sa.sa_handler == SIG_DFL)
t->signal->flags &= ~SIGNAL_UNKILLABLE;
@@ -71411,7 +73751,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
return ret;
}
-@@ -1081,8 +1101,11 @@ int group_send_sig_info(int sig, struct
+@@ -1081,8 +1101,11 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
{
int ret = check_kill_permission(sig, info, p);
@@ -71433,7 +73773,7 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP);
memset(&info, 0, sizeof info);
-@@ -2275,7 +2300,15 @@ do_send_specific(pid_t tgid, pid_t pid,
+@@ -2275,7 +2300,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
int error = -ESRCH;
rcu_read_lock();
@@ -71450,10 +73790,11 @@ diff -urNp linux-2.6.32.49/kernel/signal.c linux-2.6.32.49/kernel/signal.c
if (p && (tgid <= 0 || task_tgid_vnr(p) == tgid)) {
error = check_kill_permission(sig, info, p);
/*
-diff -urNp linux-2.6.32.49/kernel/smp.c linux-2.6.32.49/kernel/smp.c
---- linux-2.6.32.49/kernel/smp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/smp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -522,22 +522,22 @@ int smp_call_function(void (*func)(void
+diff --git a/kernel/smp.c b/kernel/smp.c
+index aa9cff3..631a0de 100644
+--- a/kernel/smp.c
++++ b/kernel/smp.c
+@@ -522,22 +522,22 @@ int smp_call_function(void (*func)(void *), void *info, int wait)
}
EXPORT_SYMBOL(smp_call_function);
@@ -71480,10 +73821,11 @@ diff -urNp linux-2.6.32.49/kernel/smp.c linux-2.6.32.49/kernel/smp.c
{
spin_unlock_irq(&call_function.lock);
}
-diff -urNp linux-2.6.32.49/kernel/softirq.c linux-2.6.32.49/kernel/softirq.c
---- linux-2.6.32.49/kernel/softirq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/softirq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index 04a0252..580c512 100644
+--- a/kernel/softirq.c
++++ b/kernel/softirq.c
+@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp
static DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
@@ -71524,7 +73866,7 @@ diff -urNp linux-2.6.32.49/kernel/softirq.c linux-2.6.32.49/kernel/softirq.c
}
/*
-@@ -419,7 +421,7 @@ void __tasklet_hi_schedule_first(struct
+@@ -419,7 +421,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
EXPORT_SYMBOL(__tasklet_hi_schedule_first);
@@ -71533,7 +73875,7 @@ diff -urNp linux-2.6.32.49/kernel/softirq.c linux-2.6.32.49/kernel/softirq.c
{
struct tasklet_struct *list;
-@@ -454,7 +456,7 @@ static void tasklet_action(struct softir
+@@ -454,7 +456,7 @@ static void tasklet_action(struct softirq_action *a)
}
}
@@ -71542,10 +73884,11 @@ diff -urNp linux-2.6.32.49/kernel/softirq.c linux-2.6.32.49/kernel/softirq.c
{
struct tasklet_struct *list;
-diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
---- linux-2.6.32.49/kernel/sys.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/sys.c 2011-11-15 19:59:43.000000000 -0500
-@@ -133,6 +133,12 @@ static int set_one_prio(struct task_stru
+diff --git a/kernel/sys.c b/kernel/sys.c
+index e9512b1..3c265de 100644
+--- a/kernel/sys.c
++++ b/kernel/sys.c
+@@ -133,6 +133,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
error = -EACCES;
goto out;
}
@@ -71558,7 +73901,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
no_nice = security_task_setnice(p, niceval);
if (no_nice) {
error = no_nice;
-@@ -190,10 +196,10 @@ SYSCALL_DEFINE3(setpriority, int, which,
+@@ -190,10 +196,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
!(user = find_user(who)))
goto out_unlock; /* No processes for this user */
@@ -71571,7 +73914,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
if (who != cred->uid)
free_uid(user); /* For find_user() */
break;
-@@ -253,13 +259,13 @@ SYSCALL_DEFINE2(getpriority, int, which,
+@@ -253,13 +259,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
!(user = find_user(who)))
goto out_unlock; /* No processes for this user */
@@ -71587,7 +73930,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
if (who != cred->uid)
free_uid(user); /* for find_user() */
break;
-@@ -509,6 +515,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
+@@ -509,6 +515,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
goto error;
}
@@ -71632,7 +73975,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
free_uid(new->user);
new->user = new_user;
-@@ -627,6 +647,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
+@@ -627,6 +647,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
goto error;
}
@@ -71655,7 +73998,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
if (capable(CAP_SETUID)) {
new->suid = new->uid = uid;
if (uid != old->uid) {
-@@ -732,6 +761,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
+@@ -732,6 +761,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
goto error;
}
@@ -71665,7 +74008,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
if (ruid != (uid_t) -1) {
new->uid = ruid;
if (ruid != old->uid) {
-@@ -800,6 +832,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
+@@ -800,6 +832,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
goto error;
}
@@ -71695,7 +74038,7 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
if (gid != old_fsgid) {
new->fsgid = gid;
goto change_okay;
-@@ -1454,7 +1495,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
+@@ -1454,7 +1495,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
error = get_dumpable(me->mm);
break;
case PR_SET_DUMPABLE:
@@ -71704,9 +74047,10 @@ diff -urNp linux-2.6.32.49/kernel/sys.c linux-2.6.32.49/kernel/sys.c
error = -EINVAL;
break;
}
-diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
---- linux-2.6.32.49/kernel/sysctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/sysctl.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/sysctl.c b/kernel/sysctl.c
+index b8bd058..ab6a76be 100644
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
@@ -63,6 +63,13 @@
static int deprecated_sysctl_warning(struct __sysctl_args *args);
@@ -71721,7 +74065,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
/* External variables not in a header file. */
extern int C_A_D;
-@@ -168,6 +175,7 @@ static int proc_do_cad_pid(struct ctl_ta
+@@ -168,6 +175,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write,
static int proc_taint(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos);
#endif
@@ -71751,7 +74095,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
extern int prove_locking;
extern int lock_stat;
-@@ -251,6 +274,24 @@ static int max_wakeup_granularity_ns = N
+@@ -251,6 +274,24 @@ static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
#endif
static struct ctl_table kern_table[] = {
@@ -71801,7 +74145,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
#else
{
.ctl_name = CTL_UNNUMBERED,
-@@ -1803,6 +1851,8 @@ static int do_sysctl_strategy(struct ctl
+@@ -1803,6 +1851,8 @@ static int do_sysctl_strategy(struct ctl_table_root *root,
return 0;
}
@@ -71819,7 +74163,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
return -EPERM;
name++;
nlen--;
-@@ -1906,6 +1956,33 @@ int sysctl_perm(struct ctl_table_root *r
+@@ -1906,6 +1956,33 @@ int sysctl_perm(struct ctl_table_root *root, struct ctl_table *table, int op)
int error;
int mode;
@@ -71853,7 +74197,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
if (error)
return error;
-@@ -2335,6 +2412,16 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2335,6 +2412,16 @@ int proc_dostring(struct ctl_table *table, int write,
buffer, lenp, ppos);
}
@@ -71870,7 +74214,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp,
int *valp,
-@@ -2609,7 +2696,7 @@ static int __do_proc_doulongvec_minmax(v
+@@ -2609,7 +2696,7 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
vleft = table->maxlen / sizeof(unsigned long);
left = *lenp;
@@ -71879,7 +74223,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
if (write) {
while (left) {
char c;
-@@ -2910,6 +2997,12 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2910,6 +2997,12 @@ int proc_dostring(struct ctl_table *table, int write,
return -ENOSYS;
}
@@ -71892,7 +74236,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
int proc_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
-@@ -3038,6 +3131,16 @@ int sysctl_string(struct ctl_table *tabl
+@@ -3038,6 +3131,16 @@ int sysctl_string(struct ctl_table *table,
return 1;
}
@@ -71909,7 +74253,7 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
/*
* This function makes sure that all of the integers in the vector
* are between the minimum and maximum values given in the arrays
-@@ -3182,6 +3285,13 @@ int sysctl_string(struct ctl_table *tabl
+@@ -3182,6 +3285,13 @@ int sysctl_string(struct ctl_table *table,
return -ENOSYS;
}
@@ -71938,10 +74282,11 @@ diff -urNp linux-2.6.32.49/kernel/sysctl.c linux-2.6.32.49/kernel/sysctl.c
+EXPORT_SYMBOL(sysctl_string_modpriv);
EXPORT_SYMBOL(sysctl_data);
EXPORT_SYMBOL(unregister_sysctl_table);
-diff -urNp linux-2.6.32.49/kernel/sysctl_check.c linux-2.6.32.49/kernel/sysctl_check.c
---- linux-2.6.32.49/kernel/sysctl_check.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/sysctl_check.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1489,10 +1489,12 @@ int sysctl_check_table(struct nsproxy *n
+diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
+index 469193c..ea3ecb2 100644
+--- a/kernel/sysctl_check.c
++++ b/kernel/sysctl_check.c
+@@ -1489,10 +1489,12 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
} else {
if ((table->strategy == sysctl_data) ||
(table->strategy == sysctl_string) ||
@@ -71954,9 +74299,10 @@ diff -urNp linux-2.6.32.49/kernel/sysctl_check.c linux-2.6.32.49/kernel/sysctl_c
(table->proc_handler == proc_dointvec) ||
(table->proc_handler == proc_dointvec_minmax) ||
(table->proc_handler == proc_dointvec_jiffies) ||
-diff -urNp linux-2.6.32.49/kernel/taskstats.c linux-2.6.32.49/kernel/taskstats.c
---- linux-2.6.32.49/kernel/taskstats.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/taskstats.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/taskstats.c b/kernel/taskstats.c
+index b080920..d344f89 100644
+--- a/kernel/taskstats.c
++++ b/kernel/taskstats.c
@@ -26,9 +26,12 @@
#include <linux/cgroup.h>
#include <linux/fs.h>
@@ -71970,7 +74316,7 @@ diff -urNp linux-2.6.32.49/kernel/taskstats.c linux-2.6.32.49/kernel/taskstats.c
/*
* Maximum length of a cpumask that can be specified in
* the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute
-@@ -442,6 +445,9 @@ static int taskstats_user_cmd(struct sk_
+@@ -442,6 +445,9 @@ static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
size_t size;
cpumask_var_t mask;
@@ -71980,10 +74326,45 @@ diff -urNp linux-2.6.32.49/kernel/taskstats.c linux-2.6.32.49/kernel/taskstats.c
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return -ENOMEM;
-diff -urNp linux-2.6.32.49/kernel/time/tick-broadcast.c linux-2.6.32.49/kernel/time/tick-broadcast.c
---- linux-2.6.32.49/kernel/time/tick-broadcast.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/time/tick-broadcast.c 2011-11-15 19:59:43.000000000 -0500
-@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct cl
+diff --git a/kernel/time.c b/kernel/time.c
+index 33df60e..ca768bd 100644
+--- a/kernel/time.c
++++ b/kernel/time.c
+@@ -165,6 +165,11 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz)
+ return error;
+
+ if (tz) {
++ /* we log in do_settimeofday called below, so don't log twice
++ */
++ if (!tv)
++ gr_log_timechange();
++
+ /* SMP safe, global irq locking makes it work. */
+ sys_tz = *tz;
+ update_vsyscall_tz();
+@@ -240,7 +245,7 @@ EXPORT_SYMBOL(current_fs_time);
+ * Avoid unnecessary multiplications/divisions in the
+ * two most common HZ cases:
+ */
+-unsigned int inline jiffies_to_msecs(const unsigned long j)
++inline unsigned int jiffies_to_msecs(const unsigned long j)
+ {
+ #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
+ return (MSEC_PER_SEC / HZ) * j;
+@@ -256,7 +261,7 @@ unsigned int inline jiffies_to_msecs(const unsigned long j)
+ }
+ EXPORT_SYMBOL(jiffies_to_msecs);
+
+-unsigned int inline jiffies_to_usecs(const unsigned long j)
++inline unsigned int jiffies_to_usecs(const unsigned long j)
+ {
+ #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
+ return (USEC_PER_SEC / HZ) * j;
+diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
+index 8917fd3..5f0ead6 100644
+--- a/kernel/time/tick-broadcast.c
++++ b/kernel/time/tick-broadcast.c
+@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
* then clear the broadcast bit.
*/
if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) {
@@ -71992,9 +74373,10 @@ diff -urNp linux-2.6.32.49/kernel/time/tick-broadcast.c linux-2.6.32.49/kernel/t
cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_clear_oneshot(cpu);
-diff -urNp linux-2.6.32.49/kernel/time/timekeeping.c linux-2.6.32.49/kernel/time/timekeeping.c
---- linux-2.6.32.49/kernel/time/timekeeping.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/time/timekeeping.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
+index 1d1206a..08a7c2f 100644
+--- a/kernel/time/timekeeping.c
++++ b/kernel/time/timekeeping.c
@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/mm.h>
@@ -72021,10 +74403,11 @@ diff -urNp linux-2.6.32.49/kernel/time/timekeeping.c linux-2.6.32.49/kernel/time
write_seqlock_irqsave(&xtime_lock, flags);
timekeeping_forward_now();
-diff -urNp linux-2.6.32.49/kernel/time/timer_list.c linux-2.6.32.49/kernel/time/timer_list.c
---- linux-2.6.32.49/kernel/time/timer_list.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/time/timer_list.c 2011-11-15 19:59:43.000000000 -0500
-@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base,
+diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
+index 54c0dda..e9095d9 100644
+--- a/kernel/time/timer_list.c
++++ b/kernel/time/timer_list.c
+@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
static void print_name_offset(struct seq_file *m, void *sym)
{
@@ -72053,7 +74436,7 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_list.c linux-2.6.32.49/kernel/time/
SEQ_printf(m, " .index: %d\n",
base->index);
SEQ_printf(m, " .resolution: %Lu nsecs\n",
-@@ -289,7 +297,11 @@ static int __init init_timer_list_procfs
+@@ -289,7 +297,11 @@ static int __init init_timer_list_procfs(void)
{
struct proc_dir_entry *pe;
@@ -72065,9 +74448,10 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_list.c linux-2.6.32.49/kernel/time/
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time/timer_stats.c
---- linux-2.6.32.49/kernel/time/timer_stats.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/time/timer_stats.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
+index ee5681f..634089b 100644
+--- a/kernel/time/timer_stats.c
++++ b/kernel/time/timer_stats.c
@@ -116,7 +116,7 @@ static ktime_t time_start, time_stop;
static unsigned long nr_entries;
static struct entry entries[MAX_ENTRIES];
@@ -72086,7 +74470,7 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time
}
static struct entry *alloc_entry(void)
-@@ -261,7 +261,7 @@ void timer_stats_update_stats(void *time
+@@ -261,7 +261,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
if (likely(entry))
entry->count++;
else
@@ -72095,7 +74479,7 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time
out_unlock:
spin_unlock_irqrestore(lock, flags);
-@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *time
+@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
static void print_name_offset(struct seq_file *m, unsigned long addr)
{
@@ -72112,7 +74496,7 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time
}
static int tstats_show(struct seq_file *m, void *v)
-@@ -300,9 +304,9 @@ static int tstats_show(struct seq_file *
+@@ -300,9 +304,9 @@ static int tstats_show(struct seq_file *m, void *v)
seq_puts(m, "Timer Stats Version: v0.2\n");
seq_printf(m, "Sample period: %ld.%03ld s\n", period.tv_sec, ms);
@@ -72124,7 +74508,7 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time
for (i = 0; i < nr_entries; i++) {
entry = entries + i;
-@@ -415,7 +419,11 @@ static int __init init_tstats_procfs(voi
+@@ -415,7 +419,11 @@ static int __init init_tstats_procfs(void)
{
struct proc_dir_entry *pe;
@@ -72136,42 +74520,10 @@ diff -urNp linux-2.6.32.49/kernel/time/timer_stats.c linux-2.6.32.49/kernel/time
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-2.6.32.49/kernel/time.c linux-2.6.32.49/kernel/time.c
---- linux-2.6.32.49/kernel/time.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/time.c 2011-11-15 19:59:43.000000000 -0500
-@@ -165,6 +165,11 @@ int do_sys_settimeofday(struct timespec
- return error;
-
- if (tz) {
-+ /* we log in do_settimeofday called below, so don't log twice
-+ */
-+ if (!tv)
-+ gr_log_timechange();
-+
- /* SMP safe, global irq locking makes it work. */
- sys_tz = *tz;
- update_vsyscall_tz();
-@@ -240,7 +245,7 @@ EXPORT_SYMBOL(current_fs_time);
- * Avoid unnecessary multiplications/divisions in the
- * two most common HZ cases:
- */
--unsigned int inline jiffies_to_msecs(const unsigned long j)
-+inline unsigned int jiffies_to_msecs(const unsigned long j)
- {
- #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
- return (MSEC_PER_SEC / HZ) * j;
-@@ -256,7 +261,7 @@ unsigned int inline jiffies_to_msecs(con
- }
- EXPORT_SYMBOL(jiffies_to_msecs);
-
--unsigned int inline jiffies_to_usecs(const unsigned long j)
-+inline unsigned int jiffies_to_usecs(const unsigned long j)
- {
- #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
- return (USEC_PER_SEC / HZ) * j;
-diff -urNp linux-2.6.32.49/kernel/timer.c linux-2.6.32.49/kernel/timer.c
---- linux-2.6.32.49/kernel/timer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/timer.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/timer.c b/kernel/timer.c
+index cb3c1f1..8bf5526 100644
+--- a/kernel/timer.c
++++ b/kernel/timer.c
@@ -1213,7 +1213,7 @@ void update_process_times(int user_tick)
/*
* This function runs timers and the timer-tq in bottom half context.
@@ -72181,10 +74533,11 @@ diff -urNp linux-2.6.32.49/kernel/timer.c linux-2.6.32.49/kernel/timer.c
{
struct tvec_base *base = __get_cpu_var(tvec_bases);
-diff -urNp linux-2.6.32.49/kernel/trace/blktrace.c linux-2.6.32.49/kernel/trace/blktrace.c
---- linux-2.6.32.49/kernel/trace/blktrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/blktrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -313,7 +313,7 @@ static ssize_t blk_dropped_read(struct f
+diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
+index d9d6206..f19467e 100644
+--- a/kernel/trace/blktrace.c
++++ b/kernel/trace/blktrace.c
+@@ -313,7 +313,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
struct blk_trace *bt = filp->private_data;
char buf[16];
@@ -72193,7 +74546,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/blktrace.c linux-2.6.32.49/kernel/trace/
return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
}
-@@ -376,7 +376,7 @@ static int blk_subbuf_start_callback(str
+@@ -376,7 +376,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
return 1;
bt = buf->chan->private_data;
@@ -72202,7 +74555,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/blktrace.c linux-2.6.32.49/kernel/trace/
return 0;
}
-@@ -477,7 +477,7 @@ int do_blk_trace_setup(struct request_qu
+@@ -477,7 +477,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
bt->dir = dir;
bt->dev = dev;
@@ -72211,10 +74564,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/blktrace.c linux-2.6.32.49/kernel/trace/
ret = -EIO;
bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
-diff -urNp linux-2.6.32.49/kernel/trace/ftrace.c linux-2.6.32.49/kernel/trace/ftrace.c
---- linux-2.6.32.49/kernel/trace/ftrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/ftrace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1100,13 +1100,18 @@ ftrace_code_disable(struct module *mod,
+diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
+index 4872937..c794d40 100644
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -1100,13 +1100,18 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
ip = rec->ip;
@@ -72235,10 +74589,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/ftrace.c linux-2.6.32.49/kernel/trace/ft
}
/*
-diff -urNp linux-2.6.32.49/kernel/trace/ring_buffer.c linux-2.6.32.49/kernel/trace/ring_buffer.c
---- linux-2.6.32.49/kernel/trace/ring_buffer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/ring_buffer.c 2011-11-15 19:59:43.000000000 -0500
-@@ -606,7 +606,7 @@ static struct list_head *rb_list_head(st
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
+index e749a05..19c6e94 100644
+--- a/kernel/trace/ring_buffer.c
++++ b/kernel/trace/ring_buffer.c
+@@ -606,7 +606,7 @@ static struct list_head *rb_list_head(struct list_head *list)
* the reader page). But if the next page is a header page,
* its flags will be non zero.
*/
@@ -72247,10 +74602,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/ring_buffer.c linux-2.6.32.49/kernel/tra
rb_is_head_page(struct ring_buffer_per_cpu *cpu_buffer,
struct buffer_page *page, struct list_head *list)
{
-diff -urNp linux-2.6.32.49/kernel/trace/trace.c linux-2.6.32.49/kernel/trace/trace.c
---- linux-2.6.32.49/kernel/trace/trace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3193,6 +3193,8 @@ static ssize_t tracing_splice_read_pipe(
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index a2a2d1f..7f32b09 100644
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -3193,6 +3193,8 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
size_t rem;
unsigned int i;
@@ -72259,7 +74615,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace.c linux-2.6.32.49/kernel/trace/tra
/* copy the tracer to avoid using a global lock all around */
mutex_lock(&trace_types_lock);
if (unlikely(old_tracer != current_trace && current_trace)) {
-@@ -3659,6 +3661,8 @@ tracing_buffers_splice_read(struct file
+@@ -3659,6 +3661,8 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
int entries, size, i;
size_t ret;
@@ -72268,7 +74624,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace.c linux-2.6.32.49/kernel/trace/tra
if (*ppos & (PAGE_SIZE - 1)) {
WARN_ONCE(1, "Ftrace: previous read must page-align\n");
return -EINVAL;
-@@ -3816,10 +3820,9 @@ static const struct file_operations trac
+@@ -3816,10 +3820,9 @@ static const struct file_operations tracing_dyn_info_fops = {
};
#endif
@@ -72292,10 +74648,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace.c linux-2.6.32.49/kernel/trace/tra
static int once;
struct dentry *d_tracer;
-diff -urNp linux-2.6.32.49/kernel/trace/trace_events.c linux-2.6.32.49/kernel/trace/trace_events.c
---- linux-2.6.32.49/kernel/trace/trace_events.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace_events.c 2011-11-15 19:59:43.000000000 -0500
-@@ -951,13 +951,10 @@ static LIST_HEAD(ftrace_module_file_list
+diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
+index d128f65..f37b4af 100644
+--- a/kernel/trace/trace_events.c
++++ b/kernel/trace/trace_events.c
+@@ -951,13 +951,10 @@ static LIST_HEAD(ftrace_module_file_list);
* Modules must own their file_operations to keep up with
* reference counting.
*/
@@ -72310,7 +74667,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_events.c linux-2.6.32.49/kernel/tr
};
static void remove_subsystem_dir(const char *name)
-@@ -1004,17 +1001,12 @@ trace_create_file_ops(struct module *mod
+@@ -1004,17 +1001,12 @@ trace_create_file_ops(struct module *mod)
file_ops->mod = mod;
@@ -72334,7 +74691,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_events.c linux-2.6.32.49/kernel/tr
list_add(&file_ops->list, &ftrace_module_file_list);
-@@ -1063,8 +1055,8 @@ static void trace_module_add_events(stru
+@@ -1063,8 +1055,8 @@ static void trace_module_add_events(struct module *mod)
call->mod = mod;
list_add(&call->list, &ftrace_events);
event_create_dir(call, d_events,
@@ -72345,9 +74702,10 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_events.c linux-2.6.32.49/kernel/tr
}
}
-diff -urNp linux-2.6.32.49/kernel/trace/trace_mmiotrace.c linux-2.6.32.49/kernel/trace/trace_mmiotrace.c
---- linux-2.6.32.49/kernel/trace/trace_mmiotrace.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace_mmiotrace.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
+index 0acd834..b800b56 100644
+--- a/kernel/trace/trace_mmiotrace.c
++++ b/kernel/trace/trace_mmiotrace.c
@@ -23,7 +23,7 @@ struct header_iter {
static struct trace_array *mmio_trace_array;
static bool overrun_detected;
@@ -72357,7 +74715,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_mmiotrace.c linux-2.6.32.49/kernel
static void mmio_reset_data(struct trace_array *tr)
{
-@@ -126,7 +126,7 @@ static void mmio_close(struct trace_iter
+@@ -126,7 +126,7 @@ static void mmio_close(struct trace_iterator *iter)
static unsigned long count_overruns(struct trace_iterator *iter)
{
@@ -72366,7 +74724,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_mmiotrace.c linux-2.6.32.49/kernel
unsigned long over = ring_buffer_overruns(iter->tr->buffer);
if (over > prev_overruns)
-@@ -316,7 +316,7 @@ static void __trace_mmiotrace_rw(struct
+@@ -316,7 +316,7 @@ static void __trace_mmiotrace_rw(struct trace_array *tr,
event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_RW,
sizeof(*entry), 0, pc);
if (!event) {
@@ -72375,7 +74733,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_mmiotrace.c linux-2.6.32.49/kernel
return;
}
entry = ring_buffer_event_data(event);
-@@ -346,7 +346,7 @@ static void __trace_mmiotrace_map(struct
+@@ -346,7 +346,7 @@ static void __trace_mmiotrace_map(struct trace_array *tr,
event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_MAP,
sizeof(*entry), 0, pc);
if (!event) {
@@ -72384,10 +74742,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_mmiotrace.c linux-2.6.32.49/kernel
return;
}
entry = ring_buffer_event_data(event);
-diff -urNp linux-2.6.32.49/kernel/trace/trace_output.c linux-2.6.32.49/kernel/trace/trace_output.c
---- linux-2.6.32.49/kernel/trace/trace_output.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace_output.c 2011-11-15 19:59:43.000000000 -0500
-@@ -237,7 +237,7 @@ int trace_seq_path(struct trace_seq *s,
+diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
+index b6c12c6..41fdc53 100644
+--- a/kernel/trace/trace_output.c
++++ b/kernel/trace/trace_output.c
+@@ -237,7 +237,7 @@ int trace_seq_path(struct trace_seq *s, struct path *path)
return 0;
p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len);
if (!IS_ERR(p)) {
@@ -72396,9 +74755,10 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_output.c linux-2.6.32.49/kernel/tr
if (p) {
s->len = p - s->buffer;
return 1;
-diff -urNp linux-2.6.32.49/kernel/trace/trace_stack.c linux-2.6.32.49/kernel/trace/trace_stack.c
---- linux-2.6.32.49/kernel/trace/trace_stack.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace_stack.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
+index 8504ac7..ecf0adb 100644
+--- a/kernel/trace/trace_stack.c
++++ b/kernel/trace/trace_stack.c
@@ -50,7 +50,7 @@ static inline void check_stack(void)
return;
@@ -72408,9 +74768,10 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_stack.c linux-2.6.32.49/kernel/tra
return;
local_irq_save(flags);
-diff -urNp linux-2.6.32.49/kernel/trace/trace_workqueue.c linux-2.6.32.49/kernel/trace/trace_workqueue.c
---- linux-2.6.32.49/kernel/trace/trace_workqueue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/trace/trace_workqueue.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c
+index 40cafb0..d5ead43 100644
+--- a/kernel/trace/trace_workqueue.c
++++ b/kernel/trace/trace_workqueue.c
@@ -21,7 +21,7 @@ struct cpu_workqueue_stats {
int cpu;
pid_t pid;
@@ -72420,7 +74781,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_workqueue.c linux-2.6.32.49/kernel
/*
* Don't need to be atomic, works are serialized in a single workqueue thread
* on a single CPU.
-@@ -58,7 +58,7 @@ probe_workqueue_insertion(struct task_st
+@@ -58,7 +58,7 @@ probe_workqueue_insertion(struct task_struct *wq_thread,
spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
list_for_each_entry(node, &workqueue_cpu_stat(cpu)->list, list) {
if (node->pid == wq_thread->pid) {
@@ -72429,7 +74790,7 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_workqueue.c linux-2.6.32.49/kernel
goto found;
}
}
-@@ -205,7 +205,7 @@ static int workqueue_stat_show(struct se
+@@ -205,7 +205,7 @@ static int workqueue_stat_show(struct seq_file *s, void *p)
tsk = get_pid_task(pid, PIDTYPE_PID);
if (tsk) {
seq_printf(s, "%3d %6d %6u %s\n", cws->cpu,
@@ -72438,10 +74799,11 @@ diff -urNp linux-2.6.32.49/kernel/trace/trace_workqueue.c linux-2.6.32.49/kernel
tsk->comm);
put_task_struct(tsk);
}
-diff -urNp linux-2.6.32.49/kernel/user.c linux-2.6.32.49/kernel/user.c
---- linux-2.6.32.49/kernel/user.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/kernel/user.c 2011-11-15 19:59:43.000000000 -0500
-@@ -159,6 +159,7 @@ struct user_struct *alloc_uid(struct use
+diff --git a/kernel/user.c b/kernel/user.c
+index 1b91701..8795237 100644
+--- a/kernel/user.c
++++ b/kernel/user.c
+@@ -159,6 +159,7 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
spin_lock_irq(&uidhash_lock);
up = uid_hash_find(uid, hashent);
if (up) {
@@ -72449,10 +74811,24 @@ diff -urNp linux-2.6.32.49/kernel/user.c linux-2.6.32.49/kernel/user.c
key_put(new->uid_keyring);
key_put(new->session_keyring);
kmem_cache_free(uid_cachep, new);
-diff -urNp linux-2.6.32.49/lib/bitmap.c linux-2.6.32.49/lib/bitmap.c
---- linux-2.6.32.49/lib/bitmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/bitmap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -341,7 +341,7 @@ int __bitmap_parse(const char *buf, unsi
+diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
+index 234ceb1..ad74049 100644
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -905,7 +905,7 @@ config LATENCYTOP
+ select STACKTRACE
+ select SCHEDSTATS
+ select SCHED_DEBUG
+- depends on HAVE_LATENCYTOP_SUPPORT
++ depends on HAVE_LATENCYTOP_SUPPORT && !GRKERNSEC_HIDESYM
+ help
+ Enable this option if you want to use the LatencyTOP tool
+ to find out which userspace is blocking on what kernel operations.
+diff --git a/lib/bitmap.c b/lib/bitmap.c
+index 7025658..8d14cab 100644
+--- a/lib/bitmap.c
++++ b/lib/bitmap.c
+@@ -341,7 +341,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen,
{
int c, old_c, totaldigits, ndigits, nchunks, nbits;
u32 chunk;
@@ -72461,7 +74837,7 @@ diff -urNp linux-2.6.32.49/lib/bitmap.c linux-2.6.32.49/lib/bitmap.c
bitmap_zero(maskp, nmaskbits);
-@@ -426,7 +426,7 @@ int bitmap_parse_user(const char __user
+@@ -426,7 +426,7 @@ int bitmap_parse_user(const char __user *ubuf,
{
if (!access_ok(VERIFY_READ, ubuf, ulen))
return -EFAULT;
@@ -72470,10 +74846,11 @@ diff -urNp linux-2.6.32.49/lib/bitmap.c linux-2.6.32.49/lib/bitmap.c
}
EXPORT_SYMBOL(bitmap_parse_user);
-diff -urNp linux-2.6.32.49/lib/bug.c linux-2.6.32.49/lib/bug.c
---- linux-2.6.32.49/lib/bug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/bug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -135,6 +135,8 @@ enum bug_trap_type report_bug(unsigned l
+diff --git a/lib/bug.c b/lib/bug.c
+index 300e41a..2779eb0 100644
+--- a/lib/bug.c
++++ b/lib/bug.c
+@@ -135,6 +135,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
return BUG_TRAP_TYPE_NONE;
bug = find_bug(bugaddr);
@@ -72482,10 +74859,11 @@ diff -urNp linux-2.6.32.49/lib/bug.c linux-2.6.32.49/lib/bug.c
printk(KERN_EMERG "------------[ cut here ]------------\n");
-diff -urNp linux-2.6.32.49/lib/debugobjects.c linux-2.6.32.49/lib/debugobjects.c
---- linux-2.6.32.49/lib/debugobjects.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/debugobjects.c 2011-11-15 19:59:43.000000000 -0500
-@@ -277,7 +277,7 @@ static void debug_object_is_on_stack(voi
+diff --git a/lib/debugobjects.c b/lib/debugobjects.c
+index 2b413db..e21d207 100644
+--- a/lib/debugobjects.c
++++ b/lib/debugobjects.c
+@@ -277,7 +277,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
if (limit > 4)
return;
@@ -72494,10 +74872,11 @@ diff -urNp linux-2.6.32.49/lib/debugobjects.c linux-2.6.32.49/lib/debugobjects.c
if (is_on_stack == onstack)
return;
-diff -urNp linux-2.6.32.49/lib/devres.c linux-2.6.32.49/lib/devres.c
---- linux-2.6.32.49/lib/devres.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/devres.c 2011-11-15 19:59:43.000000000 -0500
-@@ -80,7 +80,7 @@ void devm_iounmap(struct device *dev, vo
+diff --git a/lib/devres.c b/lib/devres.c
+index 72c8909..7543868 100644
+--- a/lib/devres.c
++++ b/lib/devres.c
+@@ -80,7 +80,7 @@ void devm_iounmap(struct device *dev, void __iomem *addr)
{
iounmap(addr);
WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match,
@@ -72506,7 +74885,7 @@ diff -urNp linux-2.6.32.49/lib/devres.c linux-2.6.32.49/lib/devres.c
}
EXPORT_SYMBOL(devm_iounmap);
-@@ -140,7 +140,7 @@ void devm_ioport_unmap(struct device *de
+@@ -140,7 +140,7 @@ void devm_ioport_unmap(struct device *dev, void __iomem *addr)
{
ioport_unmap(addr);
WARN_ON(devres_destroy(dev, devm_ioport_map_release,
@@ -72515,9 +74894,10 @@ diff -urNp linux-2.6.32.49/lib/devres.c linux-2.6.32.49/lib/devres.c
}
EXPORT_SYMBOL(devm_ioport_unmap);
-diff -urNp linux-2.6.32.49/lib/dma-debug.c linux-2.6.32.49/lib/dma-debug.c
---- linux-2.6.32.49/lib/dma-debug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/dma-debug.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/lib/dma-debug.c b/lib/dma-debug.c
+index 084e879..0674448 100644
+--- a/lib/dma-debug.c
++++ b/lib/dma-debug.c
@@ -861,7 +861,7 @@ out:
static void check_for_stack(struct device *dev, void *addr)
@@ -72527,10 +74907,11 @@ diff -urNp linux-2.6.32.49/lib/dma-debug.c linux-2.6.32.49/lib/dma-debug.c
err_printk(dev, NULL, "DMA-API: device driver maps memory from"
"stack [addr=%p]\n", addr);
}
-diff -urNp linux-2.6.32.49/lib/idr.c linux-2.6.32.49/lib/idr.c
---- linux-2.6.32.49/lib/idr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/idr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -156,7 +156,7 @@ static int sub_alloc(struct idr *idp, in
+diff --git a/lib/idr.c b/lib/idr.c
+index eda7ba3..915dfae 100644
+--- a/lib/idr.c
++++ b/lib/idr.c
+@@ -156,7 +156,7 @@ static int sub_alloc(struct idr *idp, int *starting_id, struct idr_layer **pa)
id = (id | ((1 << (IDR_BITS * l)) - 1)) + 1;
/* if already at the top layer, we need to grow */
@@ -72539,9 +74920,10 @@ diff -urNp linux-2.6.32.49/lib/idr.c linux-2.6.32.49/lib/idr.c
*starting_id = id;
return IDR_NEED_TO_GROW;
}
-diff -urNp linux-2.6.32.49/lib/inflate.c linux-2.6.32.49/lib/inflate.c
---- linux-2.6.32.49/lib/inflate.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/inflate.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/lib/inflate.c b/lib/inflate.c
+index d102559..4215f31 100644
+--- a/lib/inflate.c
++++ b/lib/inflate.c
@@ -266,7 +266,7 @@ static void free(void *where)
malloc_ptr = free_mem_ptr;
}
@@ -72551,22 +74933,11 @@ diff -urNp linux-2.6.32.49/lib/inflate.c linux-2.6.32.49/lib/inflate.c
#define free(a) kfree(a)
#endif
-diff -urNp linux-2.6.32.49/lib/Kconfig.debug linux-2.6.32.49/lib/Kconfig.debug
---- linux-2.6.32.49/lib/Kconfig.debug 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/Kconfig.debug 2011-11-15 19:59:43.000000000 -0500
-@@ -905,7 +905,7 @@ config LATENCYTOP
- select STACKTRACE
- select SCHEDSTATS
- select SCHED_DEBUG
-- depends on HAVE_LATENCYTOP_SUPPORT
-+ depends on HAVE_LATENCYTOP_SUPPORT && !GRKERNSEC_HIDESYM
- help
- Enable this option if you want to use the LatencyTOP tool
- to find out which userspace is blocking on what kernel operations.
-diff -urNp linux-2.6.32.49/lib/kobject.c linux-2.6.32.49/lib/kobject.c
---- linux-2.6.32.49/lib/kobject.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/kobject.c 2011-11-15 19:59:43.000000000 -0500
-@@ -700,7 +700,7 @@ static ssize_t kobj_attr_store(struct ko
+diff --git a/lib/kobject.c b/lib/kobject.c
+index b512b74..8115eb1 100644
+--- a/lib/kobject.c
++++ b/lib/kobject.c
+@@ -700,7 +700,7 @@ static ssize_t kobj_attr_store(struct kobject *kobj, struct attribute *attr,
return ret;
}
@@ -72584,7 +74955,7 @@ diff -urNp linux-2.6.32.49/lib/kobject.c linux-2.6.32.49/lib/kobject.c
struct kobject *parent_kobj)
{
struct kset *kset;
-@@ -832,7 +832,7 @@ static struct kset *kset_create(const ch
+@@ -832,7 +832,7 @@ static struct kset *kset_create(const char *name,
* If the kset was not able to be created, NULL will be returned.
*/
struct kset *kset_create_and_add(const char *name,
@@ -72593,10 +74964,11 @@ diff -urNp linux-2.6.32.49/lib/kobject.c linux-2.6.32.49/lib/kobject.c
struct kobject *parent_kobj)
{
struct kset *kset;
-diff -urNp linux-2.6.32.49/lib/kobject_uevent.c linux-2.6.32.49/lib/kobject_uevent.c
---- linux-2.6.32.49/lib/kobject_uevent.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/kobject_uevent.c 2011-11-15 19:59:43.000000000 -0500
-@@ -95,7 +95,7 @@ int kobject_uevent_env(struct kobject *k
+diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
+index 507b821..0bf8ed0 100644
+--- a/lib/kobject_uevent.c
++++ b/lib/kobject_uevent.c
+@@ -95,7 +95,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
const char *subsystem;
struct kobject *top_kobj;
struct kset *kset;
@@ -72605,9 +74977,10 @@ diff -urNp linux-2.6.32.49/lib/kobject_uevent.c linux-2.6.32.49/lib/kobject_ueve
u64 seq;
int i = 0;
int retval = 0;
-diff -urNp linux-2.6.32.49/lib/kref.c linux-2.6.32.49/lib/kref.c
---- linux-2.6.32.49/lib/kref.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/kref.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/lib/kref.c b/lib/kref.c
+index 9ecd6e8..12c94c1 100644
+--- a/lib/kref.c
++++ b/lib/kref.c
@@ -61,7 +61,7 @@ void kref_get(struct kref *kref)
*/
int kref_put(struct kref *kref, void (*release)(struct kref *kref))
@@ -72617,10 +74990,11 @@ diff -urNp linux-2.6.32.49/lib/kref.c linux-2.6.32.49/lib/kref.c
WARN_ON(release == (void (*)(struct kref *))kfree);
if (atomic_dec_and_test(&kref->refcount)) {
-diff -urNp linux-2.6.32.49/lib/parser.c linux-2.6.32.49/lib/parser.c
---- linux-2.6.32.49/lib/parser.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/parser.c 2011-11-15 19:59:43.000000000 -0500
-@@ -126,7 +126,7 @@ static int match_number(substring_t *s,
+diff --git a/lib/parser.c b/lib/parser.c
+index b00d020..1b34325 100644
+--- a/lib/parser.c
++++ b/lib/parser.c
+@@ -126,7 +126,7 @@ static int match_number(substring_t *s, int *result, int base)
char *buf;
int ret;
@@ -72629,9 +75003,10 @@ diff -urNp linux-2.6.32.49/lib/parser.c linux-2.6.32.49/lib/parser.c
if (!buf)
return -ENOMEM;
memcpy(buf, s->from, s->to - s->from);
-diff -urNp linux-2.6.32.49/lib/radix-tree.c linux-2.6.32.49/lib/radix-tree.c
---- linux-2.6.32.49/lib/radix-tree.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/radix-tree.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/lib/radix-tree.c b/lib/radix-tree.c
+index 92cdd99..a8149d7 100644
+--- a/lib/radix-tree.c
++++ b/lib/radix-tree.c
@@ -81,7 +81,7 @@ struct radix_tree_preload {
int nr;
struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
@@ -72641,10 +75016,11 @@ diff -urNp linux-2.6.32.49/lib/radix-tree.c linux-2.6.32.49/lib/radix-tree.c
static inline gfp_t root_gfp_mask(struct radix_tree_root *root)
{
-diff -urNp linux-2.6.32.49/lib/random32.c linux-2.6.32.49/lib/random32.c
---- linux-2.6.32.49/lib/random32.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/random32.c 2011-11-15 19:59:43.000000000 -0500
-@@ -61,7 +61,7 @@ static u32 __random32(struct rnd_state *
+diff --git a/lib/random32.c b/lib/random32.c
+index 217d5c4..45aba8a 100644
+--- a/lib/random32.c
++++ b/lib/random32.c
+@@ -61,7 +61,7 @@ static u32 __random32(struct rnd_state *state)
*/
static inline u32 __seed(u32 x, u32 m)
{
@@ -72653,9 +75029,10 @@ diff -urNp linux-2.6.32.49/lib/random32.c linux-2.6.32.49/lib/random32.c
}
/**
-diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
---- linux-2.6.32.49/lib/vsprintf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/lib/vsprintf.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/lib/vsprintf.c b/lib/vsprintf.c
+index 33bed5e..1477e46 100644
+--- a/lib/vsprintf.c
++++ b/lib/vsprintf.c
@@ -16,6 +16,9 @@
* - scnprintf and vscnprintf
*/
@@ -72666,7 +75043,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
#include <stdarg.h>
#include <linux/module.h>
#include <linux/types.h>
-@@ -546,12 +549,12 @@ static char *number(char *buf, char *end
+@@ -546,12 +549,12 @@ static char *number(char *buf, char *end, unsigned long long num,
return buf;
}
@@ -72681,7 +75058,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
len = strnlen(s, spec.precision);
-@@ -581,7 +584,7 @@ static char *symbol_string(char *buf, ch
+@@ -581,7 +584,7 @@ static char *symbol_string(char *buf, char *end, void *ptr,
unsigned long value = (unsigned long) ptr;
#ifdef CONFIG_KALLSYMS
char sym[KSYM_SYMBOL_LEN];
@@ -72690,7 +75067,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
sprint_symbol(sym, value);
else
kallsyms_lookup(value, NULL, NULL, NULL, sym);
-@@ -801,6 +804,8 @@ static char *ip4_addr_string(char *buf,
+@@ -801,6 +804,8 @@ static char *ip4_addr_string(char *buf, char *end, const u8 *addr,
* - 'f' For simple symbolic function names without offset
* - 'S' For symbolic direct pointers with offset
* - 's' For symbolic direct pointers without offset
@@ -72699,7 +75076,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
* - 'R' For a struct resource pointer, it prints the range of
* addresses (not the name nor the flags)
* - 'M' For a 6-byte MAC address, it prints the address in the
-@@ -822,7 +827,7 @@ static char *pointer(const char *fmt, ch
+@@ -822,7 +827,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
struct printf_spec spec)
{
if (!ptr)
@@ -72708,7 +75085,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
switch (*fmt) {
case 'F':
-@@ -831,6 +836,14 @@ static char *pointer(const char *fmt, ch
+@@ -831,6 +836,14 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
case 's':
/* Fallthrough */
case 'S':
@@ -72732,7 +75109,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
len = strlen(save_str);
if (str + len + 1 < end)
memcpy(str, save_str, len + 1);
-@@ -1555,11 +1568,11 @@ int bstr_printf(char *buf, size_t size,
+@@ -1555,11 +1568,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
typeof(type) value; \
if (sizeof(type) == 8) { \
args = PTR_ALIGN(args, sizeof(u32)); \
@@ -72747,7 +75124,7 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
} \
args += sizeof(type); \
value; \
-@@ -1622,7 +1635,7 @@ int bstr_printf(char *buf, size_t size,
+@@ -1622,7 +1635,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
const char *str_arg = args;
size_t len = strlen(str_arg);
args += len + 1;
@@ -72756,226 +75133,31 @@ diff -urNp linux-2.6.32.49/lib/vsprintf.c linux-2.6.32.49/lib/vsprintf.c
break;
}
-diff -urNp linux-2.6.32.49/localversion-grsec linux-2.6.32.49/localversion-grsec
---- linux-2.6.32.49/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/localversion-grsec 2011-11-15 19:59:43.000000000 -0500
+diff --git a/localversion-grsec b/localversion-grsec
+new file mode 100644
+index 0000000..7cd6065
+--- /dev/null
++++ b/localversion-grsec
@@ -0,0 +1 @@
+-grsec
-diff -urNp linux-2.6.32.49/Makefile linux-2.6.32.49/Makefile
---- linux-2.6.32.49/Makefile 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/Makefile 2011-11-26 19:45:05.000000000 -0500
-@@ -221,8 +221,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
-
- HOSTCC = gcc
- HOSTCXX = g++
--HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCXXFLAGS = -O2
-+HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
-+HOSTCFLAGS += $(call cc-option, -Wno-empty-body)
-+HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
-
- # Decide whether to build built-in, modular, or both.
- # Normally, just do built-in.
-@@ -376,8 +377,8 @@ export RCS_TAR_IGNORE := --exclude SCCS
- # Rules shared between *config targets and build targets
-
- # Basic helpers built in scripts/
--PHONY += scripts_basic
--scripts_basic:
-+PHONY += scripts_basic gcc-plugins
-+scripts_basic: gcc-plugins
- $(Q)$(MAKE) $(build)=scripts/basic
-
- # To avoid any implicit rule to kick in, define an empty command.
-@@ -403,7 +404,7 @@ endif
- # of make so .config is not included in this case either (for *config).
-
- no-dot-config-targets := clean mrproper distclean \
-- cscope TAGS tags help %docs check% \
-+ cscope gtags TAGS tags help %docs check% \
- include/linux/version.h headers_% \
- kernelrelease kernelversion
-
-@@ -526,6 +527,41 @@ else
- KBUILD_CFLAGS += -O2
- endif
-
-+ifndef DISABLE_PAX_PLUGINS
-+ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)
-+ifndef DISABLE_PAX_CONSTIFY_PLUGIN
-+CONSTIFY_PLUGIN := -fplugin=$(objtree)/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN
-+endif
-+ifdef CONFIG_PAX_MEMORY_STACKLEAK
-+STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -DSTACKLEAK_PLUGIN
-+STACKLEAK_PLUGIN += -fplugin-arg-stackleak_plugin-track-lowest-sp=100
-+endif
-+ifdef CONFIG_KALLOCSTAT_PLUGIN
-+KALLOCSTAT_PLUGIN := -fplugin=$(objtree)/tools/gcc/kallocstat_plugin.so
-+endif
-+ifdef CONFIG_PAX_KERNEXEC_PLUGIN
-+KERNEXEC_PLUGIN := -fplugin=$(objtree)/tools/gcc/kernexec_plugin.so
-+endif
-+ifdef CONFIG_CHECKER_PLUGIN
-+ifeq ($(call cc-ifversion, -ge, 0406, y), y)
-+CHECKER_PLUGIN := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
-+endif
-+endif
-+GCC_PLUGINS := $(CONSTIFY_PLUGIN) $(STACKLEAK_PLUGIN) $(KALLOCSTAT_PLUGIN) $(KERNEXEC_PLUGIN) $(CHECKER_PLUGIN)
-+export CONSTIFY_PLUGIN STACKLEAK_PLUGIN KERNEXEC_PLUGIN CHECKER_PLUGIN
-+gcc-plugins:
-+ $(Q)$(MAKE) $(build)=tools/gcc
-+else
-+gcc-plugins:
-+ifeq ($(call cc-ifversion, -ge, 0405, y), y)
-+ $(error Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.))
-+else
-+ $(Q)echo "warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least"
-+endif
-+ $(Q)echo "PAX_MEMORY_STACKLEAK and constification will be less secure"
-+endif
-+endif
-+
- include $(srctree)/arch/$(SRCARCH)/Makefile
-
- ifneq ($(CONFIG_FRAME_WARN),0)
-@@ -647,7 +683,7 @@ export mod_strip_cmd
-
-
- ifeq ($(KBUILD_EXTMOD),)
--core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
-+core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
-
- vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
- $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -868,6 +904,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-mai
-
- # The actual objects are generated when descending,
- # make sure no implicit rule kicks in
-+$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): KBUILD_CFLAGS += $(GCC_PLUGINS)
- $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
-
- # Handle descending into subdirectories listed in $(vmlinux-dirs)
-@@ -877,7 +914,7 @@ $(sort $(vmlinux-init) $(vmlinux-main))
- # Error messages still appears in the original language
-
- PHONY += $(vmlinux-dirs)
--$(vmlinux-dirs): prepare scripts
-+$(vmlinux-dirs): gcc-plugins prepare scripts
- $(Q)$(MAKE) $(build)=$@
-
- # Build the kernel release string
-@@ -986,6 +1023,7 @@ prepare0: archprepare FORCE
- $(Q)$(MAKE) $(build)=. missing-syscalls
-
- # All the preparing..
-+prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS),$(KBUILD_CFLAGS))
- prepare: prepare0
-
- # The asm symlink changes when $(ARCH) changes.
-@@ -1127,6 +1165,7 @@ all: modules
- # using awk while concatenating to the final file.
-
- PHONY += modules
-+modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
- modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
- $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
- @$(kecho) ' Building modules, stage 2.';
-@@ -1136,7 +1175,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_B
-
- # Target to prepare building external modules
- PHONY += modules_prepare
--modules_prepare: prepare scripts
-+modules_prepare: gcc-plugins prepare scripts
-
- # Target to install modules
- PHONY += modules_install
-@@ -1201,7 +1240,7 @@ MRPROPER_FILES += .config .config.old in
- include/linux/autoconf.h include/linux/version.h \
- include/linux/utsrelease.h \
- include/linux/bounds.h include/asm*/asm-offsets.h \
-- Module.symvers Module.markers tags TAGS cscope*
-+ Module.symvers Module.markers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
-
- # clean - Delete most, but leave enough to build external modules
- #
-@@ -1245,7 +1284,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 -size 0 \
-+ -o -name '.*.rej' -o -name '*.so' -o -size 0 \
- -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
- -type f -print | xargs rm -f
-
-@@ -1292,6 +1331,7 @@ help:
- @echo ' modules_prepare - Set up for building external modules'
- @echo ' tags/TAGS - Generate tags file for editors'
- @echo ' cscope - Generate cscope index'
-+ @echo ' gtags - Generate GNU GLOBAL index'
- @echo ' kernelrelease - Output the release version string'
- @echo ' kernelversion - Output the version stored in Makefile'
- @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
-@@ -1393,6 +1433,7 @@ PHONY += $(module-dirs) modules
- $(module-dirs): crmodverdir $(objtree)/Module.symvers
- $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
-
-+modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
- modules: $(module-dirs)
- @$(kecho) ' Building modules, stage 2.';
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1448,7 +1489,7 @@ endif # KBUILD_EXTMOD
- quiet_cmd_tags = GEN $@
- cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
-
--tags TAGS cscope: FORCE
-+tags TAGS cscope gtags: FORCE
- $(call cmd,tags)
-
- # Scripts to check various things for consistency
-@@ -1513,17 +1554,19 @@ else
- target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
- endif
-
--%.s: %.c prepare scripts FORCE
-+%.s: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.s: %.c gcc-plugins 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: %.c prepare scripts FORCE
-+%.o: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.o: %.c gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
- %.lst: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
--%.s: %.S prepare scripts FORCE
-+%.s: %.S gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
--%.o: %.S prepare scripts FORCE
-+%.o: %.S gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
- %.symtypes: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-@@ -1533,11 +1576,13 @@ endif
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
--%/: prepare scripts FORCE
-+%/: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%/: gcc-plugins prepare scripts FORCE
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
--%.ko: prepare scripts FORCE
-+%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.ko: gcc-plugins prepare scripts FORCE
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir) $(@:.ko=.o)
-diff -urNp linux-2.6.32.49/mm/backing-dev.c linux-2.6.32.49/mm/backing-dev.c
---- linux-2.6.32.49/mm/backing-dev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/backing-dev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -272,7 +272,7 @@ static void bdi_task_init(struct backing
+diff --git a/mm/Kconfig b/mm/Kconfig
+index 2c19c0b..f3c3f83 100644
+--- a/mm/Kconfig
++++ b/mm/Kconfig
+@@ -228,7 +228,7 @@ config KSM
+ config DEFAULT_MMAP_MIN_ADDR
+ int "Low address space to protect from user allocation"
+ depends on MMU
+- default 4096
++ default 65536
+ help
+ This is the portion of low virtual memory which should be protected
+ from userspace allocation. Keeping a user from writing to low pages
+diff --git a/mm/backing-dev.c b/mm/backing-dev.c
+index 67a33a5..094dcf1 100644
+--- a/mm/backing-dev.c
++++ b/mm/backing-dev.c
+@@ -272,7 +272,7 @@ static void bdi_task_init(struct backing_dev_info *bdi,
list_add_tail_rcu(&wb->list, &bdi->wb_list);
spin_unlock(&bdi->wb_lock);
@@ -72984,7 +75166,7 @@ diff -urNp linux-2.6.32.49/mm/backing-dev.c linux-2.6.32.49/mm/backing-dev.c
set_freezable();
/*
-@@ -484,7 +484,7 @@ static void bdi_add_to_pending(struct rc
+@@ -484,7 +484,7 @@ static void bdi_add_to_pending(struct rcu_head *head)
* Add the default flusher task that gets created for any bdi
* that has dirty data pending writeout
*/
@@ -72993,10 +75175,11 @@ diff -urNp linux-2.6.32.49/mm/backing-dev.c linux-2.6.32.49/mm/backing-dev.c
{
if (!bdi_cap_writeback_dirty(bdi))
return;
-diff -urNp linux-2.6.32.49/mm/filemap.c linux-2.6.32.49/mm/filemap.c
---- linux-2.6.32.49/mm/filemap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/filemap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1631,7 +1631,7 @@ int generic_file_mmap(struct file * file
+diff --git a/mm/filemap.c b/mm/filemap.c
+index 9e0826e..4ee8f13 100644
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -1631,7 +1631,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
struct address_space *mapping = file->f_mapping;
if (!mapping->a_ops->readpage)
@@ -73005,7 +75188,7 @@ diff -urNp linux-2.6.32.49/mm/filemap.c linux-2.6.32.49/mm/filemap.c
file_accessed(file);
vma->vm_ops = &generic_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
-@@ -2027,6 +2027,7 @@ inline int generic_write_checks(struct f
+@@ -2027,6 +2027,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
*pos = i_size_read(inode);
if (limit != RLIM_INFINITY) {
@@ -73013,10 +75196,11 @@ diff -urNp linux-2.6.32.49/mm/filemap.c linux-2.6.32.49/mm/filemap.c
if (*pos >= limit) {
send_sig(SIGXFSZ, current, 0);
return -EFBIG;
-diff -urNp linux-2.6.32.49/mm/fremap.c linux-2.6.32.49/mm/fremap.c
---- linux-2.6.32.49/mm/fremap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/fremap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -153,6 +153,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
+diff --git a/mm/fremap.c b/mm/fremap.c
+index b6ec85a..a24ac22 100644
+--- a/mm/fremap.c
++++ b/mm/fremap.c
+@@ -153,6 +153,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
retry:
vma = find_vma(mm, start);
@@ -73028,7 +75212,7 @@ diff -urNp linux-2.6.32.49/mm/fremap.c linux-2.6.32.49/mm/fremap.c
/*
* Make sure the vma is shared, that it supports prefaulting,
* and that the remapped range is valid and fully within
-@@ -221,7 +226,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
+@@ -221,7 +226,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
/*
* drop PG_Mlocked flag for over-mapped range
*/
@@ -73037,9 +75221,10 @@ diff -urNp linux-2.6.32.49/mm/fremap.c linux-2.6.32.49/mm/fremap.c
munlock_vma_pages_range(vma, start, start + size);
vma->vm_flags = saved_flags;
}
-diff -urNp linux-2.6.32.49/mm/highmem.c linux-2.6.32.49/mm/highmem.c
---- linux-2.6.32.49/mm/highmem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/highmem.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/highmem.c b/mm/highmem.c
+index 9c1e627..5ca9447 100644
+--- a/mm/highmem.c
++++ b/mm/highmem.c
@@ -116,9 +116,10 @@ static void flush_all_zero_pkmaps(void)
* So no dangers, even with speculative execution.
*/
@@ -73065,10 +75250,11 @@ diff -urNp linux-2.6.32.49/mm/highmem.c linux-2.6.32.49/mm/highmem.c
pkmap_count[last_pkmap_nr] = 1;
set_page_address(page, (void *)vaddr);
-diff -urNp linux-2.6.32.49/mm/hugetlb.c linux-2.6.32.49/mm/hugetlb.c
---- linux-2.6.32.49/mm/hugetlb.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/hugetlb.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1933,6 +1933,26 @@ static int unmap_ref_private(struct mm_s
+diff --git a/mm/hugetlb.c b/mm/hugetlb.c
+index 5e1e508..9f0ebad 100644
+--- a/mm/hugetlb.c
++++ b/mm/hugetlb.c
+@@ -1933,6 +1933,26 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
return 1;
}
@@ -73118,7 +75304,7 @@ diff -urNp linux-2.6.32.49/mm/hugetlb.c linux-2.6.32.49/mm/hugetlb.c
if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
/* Optimization, do the COW without a second fault */
ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
-@@ -2163,6 +2192,28 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2163,6 +2192,28 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
static DEFINE_MUTEX(hugetlb_instantiation_mutex);
struct hstate *h = hstate_vma(vma);
@@ -73147,10 +75333,11 @@ diff -urNp linux-2.6.32.49/mm/hugetlb.c linux-2.6.32.49/mm/hugetlb.c
ptep = huge_pte_alloc(mm, address, huge_page_size(h));
if (!ptep)
return VM_FAULT_OOM;
-diff -urNp linux-2.6.32.49/mm/internal.h linux-2.6.32.49/mm/internal.h
---- linux-2.6.32.49/mm/internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/internal.h 2011-11-15 19:59:43.000000000 -0500
-@@ -49,6 +49,7 @@ extern void putback_lru_page(struct page
+diff --git a/mm/internal.h b/mm/internal.h
+index f03e8e2..7354343 100644
+--- a/mm/internal.h
++++ b/mm/internal.h
+@@ -49,6 +49,7 @@ extern void putback_lru_page(struct page *page);
* in mm/page_alloc.c
*/
extern void __free_pages_bootmem(struct page *page, unsigned int order);
@@ -73158,22 +75345,11 @@ diff -urNp linux-2.6.32.49/mm/internal.h linux-2.6.32.49/mm/internal.h
extern void prep_compound_page(struct page *page, unsigned long order);
-diff -urNp linux-2.6.32.49/mm/Kconfig linux-2.6.32.49/mm/Kconfig
---- linux-2.6.32.49/mm/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -228,7 +228,7 @@ config KSM
- config DEFAULT_MMAP_MIN_ADDR
- int "Low address space to protect from user allocation"
- depends on MMU
-- default 4096
-+ default 65536
- help
- This is the portion of low virtual memory which should be protected
- from userspace allocation. Keeping a user from writing to low pages
-diff -urNp linux-2.6.32.49/mm/kmemleak.c linux-2.6.32.49/mm/kmemleak.c
---- linux-2.6.32.49/mm/kmemleak.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/kmemleak.c 2011-11-15 19:59:43.000000000 -0500
-@@ -358,7 +358,7 @@ static void print_unreferenced(struct se
+diff --git a/mm/kmemleak.c b/mm/kmemleak.c
+index c346660..b47382f 100644
+--- a/mm/kmemleak.c
++++ b/mm/kmemleak.c
+@@ -358,7 +358,7 @@ static void print_unreferenced(struct seq_file *seq,
for (i = 0; i < object->trace_len; i++) {
void *ptr = (void *)object->trace[i];
@@ -73182,9 +75358,10 @@ diff -urNp linux-2.6.32.49/mm/kmemleak.c linux-2.6.32.49/mm/kmemleak.c
}
}
-diff -urNp linux-2.6.32.49/mm/maccess.c linux-2.6.32.49/mm/maccess.c
---- linux-2.6.32.49/mm/maccess.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/maccess.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/maccess.c b/mm/maccess.c
+index 9073695..1127f348 100644
+--- a/mm/maccess.c
++++ b/mm/maccess.c
@@ -14,7 +14,7 @@
* Safely read from address @src to the buffer at @dst. If a kernel fault
* happens, handle that and return -EFAULT.
@@ -73194,7 +75371,7 @@ diff -urNp linux-2.6.32.49/mm/maccess.c linux-2.6.32.49/mm/maccess.c
{
long ret;
mm_segment_t old_fs = get_fs();
-@@ -22,7 +22,7 @@ long probe_kernel_read(void *dst, void *
+@@ -22,7 +22,7 @@ long probe_kernel_read(void *dst, void *src, size_t size)
set_fs(KERNEL_DS);
pagefault_disable();
ret = __copy_from_user_inatomic(dst,
@@ -73220,10 +75397,11 @@ diff -urNp linux-2.6.32.49/mm/maccess.c linux-2.6.32.49/mm/maccess.c
pagefault_enable();
set_fs(old_fs);
-diff -urNp linux-2.6.32.49/mm/madvise.c linux-2.6.32.49/mm/madvise.c
---- linux-2.6.32.49/mm/madvise.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/madvise.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,6 +44,10 @@ static long madvise_behavior(struct vm_a
+diff --git a/mm/madvise.c b/mm/madvise.c
+index 35b1479..499f7d4 100644
+--- a/mm/madvise.c
++++ b/mm/madvise.c
+@@ -44,6 +44,10 @@ static long madvise_behavior(struct vm_area_struct * vma,
pgoff_t pgoff;
unsigned long new_flags = vma->vm_flags;
@@ -73248,7 +75426,7 @@ diff -urNp linux-2.6.32.49/mm/madvise.c linux-2.6.32.49/mm/madvise.c
vma->vm_flags = new_flags;
out:
-@@ -161,6 +172,11 @@ static long madvise_dontneed(struct vm_a
+@@ -161,6 +172,11 @@ static long madvise_dontneed(struct vm_area_struct * vma,
struct vm_area_struct ** prev,
unsigned long start, unsigned long end)
{
@@ -73260,7 +75438,7 @@ diff -urNp linux-2.6.32.49/mm/madvise.c linux-2.6.32.49/mm/madvise.c
*prev = vma;
if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
return -EINVAL;
-@@ -173,6 +189,21 @@ static long madvise_dontneed(struct vm_a
+@@ -173,6 +189,21 @@ static long madvise_dontneed(struct vm_area_struct * vma,
zap_page_range(vma, start, end - start, &details);
} else
zap_page_range(vma, start, end - start, NULL);
@@ -73282,7 +75460,7 @@ diff -urNp linux-2.6.32.49/mm/madvise.c linux-2.6.32.49/mm/madvise.c
return 0;
}
-@@ -359,6 +390,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
+@@ -359,6 +390,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
if (end < start)
goto out;
@@ -73299,10 +75477,42 @@ diff -urNp linux-2.6.32.49/mm/madvise.c linux-2.6.32.49/mm/madvise.c
error = 0;
if (end == start)
goto out;
-diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
---- linux-2.6.32.49/mm/memory.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/memory.c 2011-11-15 19:59:43.000000000 -0500
-@@ -187,8 +187,12 @@ static inline void free_pmd_range(struct
+diff --git a/mm/memory-failure.c b/mm/memory-failure.c
+index 8aeba53..b4a4198 100644
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -46,7 +46,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
+
+ int sysctl_memory_failure_recovery __read_mostly = 1;
+
+-atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
++atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
+
+ /*
+ * Send all the processes who have the page mapped an ``action optional''
+@@ -64,7 +64,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno,
+ si.si_signo = SIGBUS;
+ si.si_errno = 0;
+ si.si_code = BUS_MCEERR_AO;
+- si.si_addr = (void *)addr;
++ si.si_addr = (void __user *)addr;
+ #ifdef __ARCH_SI_TRAPNO
+ si.si_trapno = trapno;
+ #endif
+@@ -745,7 +745,7 @@ int __memory_failure(unsigned long pfn, int trapno, int ref)
+ return 0;
+ }
+
+- atomic_long_add(1, &mce_bad_pages);
++ atomic_long_add_unchecked(1, &mce_bad_pages);
+
+ /*
+ * We need/can do nothing about count=0 pages.
+diff --git a/mm/memory.c b/mm/memory.c
+index 6c836d3..48f3264 100644
+--- a/mm/memory.c
++++ b/mm/memory.c
+@@ -187,8 +187,12 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
return;
pmd = pmd_offset(pud, start);
@@ -73315,7 +75525,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
}
static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
-@@ -219,9 +223,12 @@ static inline void free_pud_range(struct
+@@ -219,9 +223,12 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
if (end - 1 > ceiling - 1)
return;
@@ -73328,7 +75538,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
}
/*
-@@ -1251,10 +1258,10 @@ int __get_user_pages(struct task_struct
+@@ -1251,10 +1258,10 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
(VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
i = 0;
@@ -73341,7 +75551,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
if (!vma && in_gate_area(tsk, start)) {
unsigned long pg = start & PAGE_MASK;
struct vm_area_struct *gate_vma = get_gate_vma(tsk);
-@@ -1306,7 +1313,7 @@ int __get_user_pages(struct task_struct
+@@ -1306,7 +1313,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
continue;
}
@@ -73350,7 +75560,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
(vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
!(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1381,7 +1388,7 @@ int __get_user_pages(struct task_struct
+@@ -1381,7 +1388,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
start += PAGE_SIZE;
nr_pages--;
} while (nr_pages && start < vma->vm_end);
@@ -73359,7 +75569,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
return i;
}
-@@ -1526,6 +1533,10 @@ static int insert_page(struct vm_area_st
+@@ -1526,6 +1533,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
page_add_file_rmap(page);
set_pte_at(mm, addr, pte, mk_pte(page, prot));
@@ -73393,7 +75603,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
vma->vm_flags |= VM_INSERTPAGE;
return insert_page(vma, addr, page, vma->vm_page_prot);
}
-@@ -1649,6 +1672,7 @@ int vm_insert_mixed(struct vm_area_struc
+@@ -1649,6 +1672,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn)
{
BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
@@ -73401,7 +75611,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
-@@ -1977,6 +2001,186 @@ static inline void cow_user_page(struct
+@@ -1977,6 +2001,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
copy_user_highpage(dst, src, va, vma);
}
@@ -73612,7 +75822,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
/* Free the old page.. */
new_page = old_page;
ret |= VM_FAULT_WRITE;
-@@ -2606,6 +2820,11 @@ static int do_swap_page(struct mm_struct
+@@ -2606,6 +2820,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
swap_free(entry);
if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
try_to_free_swap(page);
@@ -73624,7 +75834,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
unlock_page(page);
if (flags & FAULT_FLAG_WRITE) {
-@@ -2617,6 +2836,11 @@ static int do_swap_page(struct mm_struct
+@@ -2617,6 +2836,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, pte);
@@ -73677,7 +75887,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
* We enter with non-exclusive mmap_sem (to exclude vma changes,
* but allow concurrent faults), and pte mapped but not yet locked.
* We return with mmap_sem still held, but pte unmapped and unlocked.
-@@ -2674,27 +2864,23 @@ static int do_anonymous_page(struct mm_s
+@@ -2674,27 +2864,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *page_table, pmd_t *pmd,
unsigned int flags)
{
@@ -73710,7 +75920,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
if (unlikely(anon_vma_prepare(vma)))
goto oom;
page = alloc_zeroed_user_highpage_movable(vma, address);
-@@ -2713,6 +2899,11 @@ static int do_anonymous_page(struct mm_s
+@@ -2713,6 +2899,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
if (!pte_none(*page_table))
goto release;
@@ -73735,7 +75945,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
unlock:
pte_unmap_unlock(page_table, ptl);
return 0;
-@@ -2862,6 +3059,12 @@ static int __do_fault(struct mm_struct *
+@@ -2862,6 +3059,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
*/
/* Only go through if we didn't race with anybody else... */
if (likely(pte_same(*page_table, orig_pte))) {
@@ -73748,7 +75958,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (flags & FAULT_FLAG_WRITE)
-@@ -2881,6 +3084,14 @@ static int __do_fault(struct mm_struct *
+@@ -2881,6 +3084,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, entry);
@@ -73763,7 +75973,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
} else {
if (charged)
mem_cgroup_uncharge_page(page);
-@@ -3028,6 +3239,12 @@ static inline int handle_pte_fault(struc
+@@ -3028,6 +3239,12 @@ static inline int handle_pte_fault(struct mm_struct *mm,
if (flags & FAULT_FLAG_WRITE)
flush_tlb_page(vma, address);
}
@@ -73776,7 +75986,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
unlock:
pte_unmap_unlock(pte, ptl);
return 0;
-@@ -3044,6 +3261,10 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3044,6 +3261,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
pmd_t *pmd;
pte_t *pte;
@@ -73787,7 +75997,7 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
-@@ -3051,6 +3272,34 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3051,6 +3272,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
if (unlikely(is_vm_hugetlb_page(vma)))
return hugetlb_fault(mm, vma, address, flags);
@@ -73831,40 +76041,11 @@ diff -urNp linux-2.6.32.49/mm/memory.c linux-2.6.32.49/mm/memory.c
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-diff -urNp linux-2.6.32.49/mm/memory-failure.c linux-2.6.32.49/mm/memory-failure.c
---- linux-2.6.32.49/mm/memory-failure.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/memory-failure.c 2011-11-15 19:59:43.000000000 -0500
-@@ -46,7 +46,7 @@ int sysctl_memory_failure_early_kill __r
-
- int sysctl_memory_failure_recovery __read_mostly = 1;
-
--atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
-+atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
-
- /*
- * Send all the processes who have the page mapped an ``action optional''
-@@ -64,7 +64,7 @@ static int kill_proc_ao(struct task_stru
- si.si_signo = SIGBUS;
- si.si_errno = 0;
- si.si_code = BUS_MCEERR_AO;
-- si.si_addr = (void *)addr;
-+ si.si_addr = (void __user *)addr;
- #ifdef __ARCH_SI_TRAPNO
- si.si_trapno = trapno;
- #endif
-@@ -745,7 +745,7 @@ int __memory_failure(unsigned long pfn,
- return 0;
- }
-
-- atomic_long_add(1, &mce_bad_pages);
-+ atomic_long_add_unchecked(1, &mce_bad_pages);
-
- /*
- * We need/can do nothing about count=0 pages.
-diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
---- linux-2.6.32.49/mm/mempolicy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/mempolicy.c 2011-11-15 19:59:43.000000000 -0500
-@@ -573,6 +573,10 @@ static int mbind_range(struct vm_area_st
+diff --git a/mm/mempolicy.c b/mm/mempolicy.c
+index 3c6e3e2..ad9871c 100644
+--- a/mm/mempolicy.c
++++ b/mm/mempolicy.c
+@@ -573,6 +573,10 @@ static int mbind_range(struct vm_area_struct *vma, unsigned long start,
struct vm_area_struct *next;
int err;
@@ -73875,7 +76056,7 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
err = 0;
for (; vma && vma->vm_start < end; vma = next) {
next = vma->vm_next;
-@@ -584,6 +588,16 @@ static int mbind_range(struct vm_area_st
+@@ -584,6 +588,16 @@ static int mbind_range(struct vm_area_struct *vma, unsigned long start,
err = policy_vma(vma, new);
if (err)
break;
@@ -73892,7 +76073,7 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
}
return err;
}
-@@ -1002,6 +1016,17 @@ static long do_mbind(unsigned long start
+@@ -1002,6 +1016,17 @@ static long do_mbind(unsigned long start, unsigned long len,
if (end < start)
return -EINVAL;
@@ -73910,7 +76091,7 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
if (end == start)
return 0;
-@@ -1207,6 +1232,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1207,6 +1232,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
if (!mm)
return -EINVAL;
@@ -73925,7 +76106,7 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1216,8 +1249,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1216,8 +1249,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -73935,7 +76116,7 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
rcu_read_unlock();
err = -EPERM;
goto out;
-@@ -2396,7 +2428,7 @@ int show_numa_map(struct seq_file *m, vo
+@@ -2396,7 +2428,7 @@ int show_numa_map(struct seq_file *m, void *v)
if (file) {
seq_printf(m, " file=");
@@ -73944,10 +76125,11 @@ diff -urNp linux-2.6.32.49/mm/mempolicy.c linux-2.6.32.49/mm/mempolicy.c
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
seq_printf(m, " heap");
} else if (vma->vm_start <= mm->start_stack &&
-diff -urNp linux-2.6.32.49/mm/migrate.c linux-2.6.32.49/mm/migrate.c
---- linux-2.6.32.49/mm/migrate.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/migrate.c 2011-11-15 19:59:43.000000000 -0500
-@@ -916,6 +916,8 @@ static int do_pages_move(struct mm_struc
+diff --git a/mm/migrate.c b/mm/migrate.c
+index aaca868..2ebecdc 100644
+--- a/mm/migrate.c
++++ b/mm/migrate.c
+@@ -916,6 +916,8 @@ static int do_pages_move(struct mm_struct *mm, struct task_struct *task,
unsigned long chunk_start;
int err;
@@ -73956,7 +76138,7 @@ diff -urNp linux-2.6.32.49/mm/migrate.c linux-2.6.32.49/mm/migrate.c
task_nodes = cpuset_mems_allowed(task);
err = -ENOMEM;
-@@ -1106,6 +1108,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1106,6 +1108,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
if (!mm)
return -EINVAL;
@@ -73971,7 +76153,7 @@ diff -urNp linux-2.6.32.49/mm/migrate.c linux-2.6.32.49/mm/migrate.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1115,8 +1125,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1115,8 +1125,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -73981,9 +76163,10 @@ diff -urNp linux-2.6.32.49/mm/migrate.c linux-2.6.32.49/mm/migrate.c
rcu_read_unlock();
err = -EPERM;
goto out;
-diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
---- linux-2.6.32.49/mm/mlock.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/mlock.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/mlock.c b/mm/mlock.c
+index 2d846cf..98134d2 100644
+--- a/mm/mlock.c
++++ b/mm/mlock.c
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
@@ -74006,7 +76189,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
/**
* __mlock_vma_pages_range() - mlock a range of pages in the vma.
* @vma: target vma
-@@ -177,12 +171,6 @@ static long __mlock_vma_pages_range(stru
+@@ -177,12 +171,6 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
if (vma->vm_flags & VM_WRITE)
gup_flags |= FOLL_WRITE;
@@ -74019,7 +76202,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
while (nr_pages > 0) {
int i;
-@@ -440,7 +428,7 @@ static int do_mlock(unsigned long start,
+@@ -440,7 +428,7 @@ static int do_mlock(unsigned long start, size_t len, int on)
{
unsigned long nstart, end, tmp;
struct vm_area_struct * vma, * prev;
@@ -74028,7 +76211,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
len = PAGE_ALIGN(len);
end = start + len;
-@@ -448,6 +436,9 @@ static int do_mlock(unsigned long start,
+@@ -448,6 +436,9 @@ static int do_mlock(unsigned long start, size_t len, int on)
return -EINVAL;
if (end == start)
return 0;
@@ -74038,7 +76221,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
vma = find_vma_prev(current->mm, start, &prev);
if (!vma || vma->vm_start > start)
return -ENOMEM;
-@@ -458,6 +449,11 @@ static int do_mlock(unsigned long start,
+@@ -458,6 +449,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
for (nstart = start ; ; ) {
unsigned int newflags;
@@ -74050,7 +76233,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
/* Here we know that vma->vm_start <= nstart < vma->vm_end. */
newflags = vma->vm_flags | VM_LOCKED;
-@@ -507,6 +503,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
+@@ -507,6 +503,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len)
lock_limit >>= PAGE_SHIFT;
/* check against resource limits */
@@ -74058,7 +76241,7 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = do_mlock(start, len, 1);
up_write(&current->mm->mmap_sem);
-@@ -528,17 +525,23 @@ SYSCALL_DEFINE2(munlock, unsigned long,
+@@ -528,17 +525,23 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len)
static int do_mlockall(int flags)
{
struct vm_area_struct * vma, * prev = NULL;
@@ -74094,9 +76277,10 @@ diff -urNp linux-2.6.32.49/mm/mlock.c linux-2.6.32.49/mm/mlock.c
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
-diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
---- linux-2.6.32.49/mm/mmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/mmap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/mmap.c b/mm/mmap.c
+index 4b80cbf..c5ce1df 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
@@ -45,6 +45,16 @@
#define arch_rebalance_pgtables(addr, len) (addr)
#endif
@@ -74114,7 +76298,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
static void unmap_region(struct mm_struct *mm,
struct vm_area_struct *vma, struct vm_area_struct *prev,
unsigned long start, unsigned long end);
-@@ -70,22 +80,32 @@ static void unmap_region(struct mm_struc
+@@ -70,22 +80,32 @@ static void unmap_region(struct mm_struct *mm,
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
*
*/
@@ -74149,7 +76333,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
struct percpu_counter vm_committed_as;
/*
-@@ -231,6 +251,7 @@ static struct vm_area_struct *remove_vma
+@@ -231,6 +251,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
struct vm_area_struct *next = vma->vm_next;
might_sleep();
@@ -74191,7 +76375,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
pgoff_t vm_pglen;
-@@ -765,12 +799,19 @@ can_vma_merge_after(struct vm_area_struc
+@@ -765,12 +799,19 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
struct vm_area_struct *vma_merge(struct mm_struct *mm,
struct vm_area_struct *prev, unsigned long addr,
unsigned long end, unsigned long vm_flags,
@@ -74212,7 +76396,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -786,6 +827,15 @@ struct vm_area_struct *vma_merge(struct
+@@ -786,6 +827,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
@@ -74228,7 +76412,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* Can it merge with the predecessor?
*/
-@@ -805,9 +855,24 @@ struct vm_area_struct *vma_merge(struct
+@@ -805,9 +855,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
/* cases 1, 6 */
vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
@@ -74254,7 +76438,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return prev;
}
-@@ -818,12 +883,27 @@ struct vm_area_struct *vma_merge(struct
+@@ -818,12 +883,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
mpol_equal(policy, vma_policy(next)) &&
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen)) {
@@ -74300,7 +76484,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
mm->stack_vm += pages;
if (flags & (VM_RESERVED|VM_IO))
mm->reserved_vm += pages;
-@@ -932,7 +1009,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -932,7 +1009,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
@@ -74309,7 +76493,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
-@@ -958,7 +1035,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -958,7 +1035,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
@@ -74318,7 +76502,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (addr & ~PAGE_MASK)
return addr;
-@@ -969,6 +1046,36 @@ unsigned long do_mmap_pgoff(struct file
+@@ -969,6 +1046,36 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
@@ -74355,7 +76539,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (flags & MAP_LOCKED)
if (!can_do_mlock())
return -EPERM;
-@@ -980,6 +1087,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -980,6 +1087,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
locked += mm->locked_vm;
lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
lock_limit >>= PAGE_SHIFT;
@@ -74363,7 +76547,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1053,6 +1161,9 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1053,6 +1161,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
if (error)
return error;
@@ -74386,7 +76570,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1117,14 +1228,24 @@ unsigned long mmap_region(struct file *f
+@@ -1117,14 +1228,24 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
unsigned long charged = 0;
struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
@@ -74528,7 +76712,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/* Get an address range which is currently unmapped.
* For shmat() with addr=0.
*
-@@ -1281,18 +1475,23 @@ arch_get_unmapped_area(struct file *filp
+@@ -1281,18 +1475,23 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -74611,7 +76795,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
mm->free_area_cache = addr;
mm->cached_hole_size = ~0UL;
}
-@@ -1348,7 +1553,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1348,7 +1553,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
@@ -74620,7 +76804,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -1357,13 +1562,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1357,13 +1562,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (flags & MAP_FIXED)
return addr;
@@ -74643,7 +76827,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
}
/* check if free_area_cache is useful for us */
-@@ -1378,7 +1588,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1378,7 +1588,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
@@ -74652,7 +76836,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -1395,7 +1605,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1395,7 +1605,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -74661,7 +76845,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
-@@ -1404,8 +1614,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1404,8 +1614,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -74709,7 +76893,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* Is this a new hole at the highest possible address?
*/
-@@ -1436,8 +1660,10 @@ void arch_unmap_area_topdown(struct mm_s
+@@ -1436,8 +1660,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
mm->free_area_cache = addr;
/* dont allow allocations above current base */
@@ -74749,7 +76933,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -1561,6 +1808,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1561,6 +1808,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
return -ENOMEM;
/* Stack limit test */
@@ -74757,7 +76941,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (size > rlim[RLIMIT_STACK].rlim_cur)
return -ENOMEM;
-@@ -1570,6 +1818,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1570,6 +1818,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
unsigned long limit;
locked = mm->locked_vm + grow;
limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT;
@@ -74765,7 +76949,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (locked > limit && !capable(CAP_IPC_LOCK))
return -ENOMEM;
}
-@@ -1600,37 +1849,48 @@ static int acct_stack_growth(struct vm_a
+@@ -1600,37 +1849,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
* PA-RISC uses this for its stack; IA64 for its Register Backing Store.
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
@@ -74823,7 +77007,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
unsigned long size, grow;
size = address - vma->vm_start;
-@@ -1643,6 +1903,8 @@ int expand_upwards(struct vm_area_struct
+@@ -1643,6 +1903,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
vma->vm_end = address;
}
}
@@ -74832,7 +77016,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
anon_vma_unlock(vma);
return error;
}
-@@ -1655,6 +1917,8 @@ static int expand_downwards(struct vm_ar
+@@ -1655,6 +1917,8 @@ static int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
int error;
@@ -74841,7 +77025,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* We must make sure the anon_vma is allocated
-@@ -1668,6 +1932,15 @@ static int expand_downwards(struct vm_ar
+@@ -1668,6 +1932,15 @@ static int expand_downwards(struct vm_area_struct *vma,
if (error)
return error;
@@ -74857,7 +77041,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
anon_vma_lock(vma);
/*
-@@ -1677,9 +1950,17 @@ static int expand_downwards(struct vm_ar
+@@ -1677,9 +1950,17 @@ static int expand_downwards(struct vm_area_struct *vma,
*/
/* Somebody else might have raced and expanded it already */
@@ -74876,7 +77060,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -1689,10 +1970,22 @@ static int expand_downwards(struct vm_ar
+@@ -1689,10 +1970,22 @@ static int expand_downwards(struct vm_area_struct *vma,
if (!error) {
vma->vm_start = address;
vma->vm_pgoff -= grow;
@@ -74899,7 +77083,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return error;
}
-@@ -1768,6 +2061,13 @@ static void remove_vma_list(struct mm_st
+@@ -1768,6 +2061,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
do {
long nrpages = vma_pages(vma);
@@ -74913,7 +77097,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
mm->total_vm -= nrpages;
vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
vma = remove_vma(vma);
-@@ -1813,6 +2113,16 @@ detach_vmas_to_be_unmapped(struct mm_str
+@@ -1813,6 +2113,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
vma->vm_prev = NULL;
do {
@@ -74930,7 +77114,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
rb_erase(&vma->vm_rb, &mm->mm_rb);
mm->map_count--;
tail_vma = vma;
-@@ -1840,10 +2150,25 @@ int split_vma(struct mm_struct * mm, str
+@@ -1840,10 +2150,25 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
struct mempolicy *pol;
struct vm_area_struct *new;
@@ -74956,7 +77140,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (mm->map_count >= sysctl_max_map_count)
return -ENOMEM;
-@@ -1851,6 +2176,16 @@ int split_vma(struct mm_struct * mm, str
+@@ -1851,6 +2176,16 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (!new)
return -ENOMEM;
@@ -74973,7 +77157,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/* most fields are the same, copy all, and then fixup */
*new = *vma;
-@@ -1861,8 +2196,29 @@ int split_vma(struct mm_struct * mm, str
+@@ -1861,8 +2196,29 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
}
@@ -75003,7 +77187,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
kmem_cache_free(vm_area_cachep, new);
return PTR_ERR(pol);
}
-@@ -1883,6 +2239,28 @@ int split_vma(struct mm_struct * mm, str
+@@ -1883,6 +2239,28 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
else
vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
@@ -75032,7 +77216,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return 0;
}
-@@ -1891,11 +2269,30 @@ int split_vma(struct mm_struct * mm, str
+@@ -1891,11 +2269,30 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
* work. This now handles partial unmappings.
* Jeremy Fitzhardinge <jeremy@goop.org>
*/
@@ -75063,7 +77247,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
return -EINVAL;
-@@ -1959,6 +2356,8 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -1959,6 +2356,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
/* Fix up all other VM information */
remove_vma_list(mm, vma);
@@ -75072,7 +77256,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return 0;
}
-@@ -1971,22 +2370,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a
+@@ -1971,22 +2370,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
profile_munmap(addr);
@@ -75101,7 +77285,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* this is really a simplified "do_mmap". it only handles
* anonymous maps. eventually we may be able to do some
-@@ -2000,6 +2395,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2000,6 +2395,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
struct rb_node ** rb_link, * rb_parent;
pgoff_t pgoff = addr >> PAGE_SHIFT;
int error;
@@ -75109,7 +77293,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
len = PAGE_ALIGN(len);
if (!len)
-@@ -2011,16 +2407,30 @@ unsigned long do_brk(unsigned long addr,
+@@ -2011,16 +2407,30 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
@@ -75141,7 +77325,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
locked += mm->locked_vm;
lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
lock_limit >>= PAGE_SHIFT;
-@@ -2037,22 +2447,22 @@ unsigned long do_brk(unsigned long addr,
+@@ -2037,22 +2447,22 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
/*
* Clear old maps. this also does some error checking for us
*/
@@ -75168,7 +77352,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
-@@ -2066,7 +2476,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2066,7 +2476,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
*/
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma) {
@@ -75177,7 +77361,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return -ENOMEM;
}
-@@ -2078,11 +2488,12 @@ unsigned long do_brk(unsigned long addr,
+@@ -2078,11 +2488,12 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
vma->vm_page_prot = vm_get_page_prot(flags);
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
@@ -75204,7 +77388,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
}
-@@ -2144,6 +2557,10 @@ int insert_vm_struct(struct mm_struct *
+@@ -2144,6 +2557,10 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
struct vm_area_struct * __vma, * prev;
struct rb_node ** rb_link, * rb_parent;
@@ -75215,7 +77399,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* The vm_pgoff of a purely anonymous vma should be irrelevant
* until its first write fault, when page's anon_vma and index
-@@ -2166,7 +2583,22 @@ int insert_vm_struct(struct mm_struct *
+@@ -2166,7 +2583,22 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
if ((vma->vm_flags & VM_ACCOUNT) &&
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
@@ -75238,7 +77422,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
return 0;
}
-@@ -2184,6 +2616,8 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2184,6 +2616,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
struct rb_node **rb_link, *rb_parent;
struct mempolicy *pol;
@@ -75247,7 +77431,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* If anonymous vma has not yet been faulted, update new pgoff
* to match new location, to increase its chance of merging.
-@@ -2227,6 +2661,35 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2227,6 +2661,35 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
return new_vma;
}
@@ -75283,7 +77467,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
/*
* Return true if the calling process may expand its vm space by the passed
* number of pages
-@@ -2237,7 +2700,7 @@ int may_expand_vm(struct mm_struct *mm,
+@@ -2237,7 +2700,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
unsigned long lim;
lim = current->signal->rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT;
@@ -75292,7 +77476,7 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
if (cur + npages > lim)
return 0;
return 1;
-@@ -2307,6 +2770,22 @@ int install_special_mapping(struct mm_st
+@@ -2307,6 +2770,22 @@ int install_special_mapping(struct mm_struct *mm,
vma->vm_start = addr;
vma->vm_end = addr + len;
@@ -75315,9 +77499,10 @@ diff -urNp linux-2.6.32.49/mm/mmap.c linux-2.6.32.49/mm/mmap.c
vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND;
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
-diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
---- linux-2.6.32.49/mm/mprotect.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/mprotect.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/mprotect.c b/mm/mprotect.c
+index 1737c7e..c7faeb4 100644
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
@@ -24,10 +24,16 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
@@ -75335,7 +77520,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
#ifndef pgprot_modify
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
-@@ -132,6 +138,48 @@ static void change_protection(struct vm_
+@@ -132,6 +138,48 @@ static void change_protection(struct vm_area_struct *vma,
flush_tlb_range(vma, start, end);
}
@@ -75384,7 +77569,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
int
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
unsigned long start, unsigned long end, unsigned long newflags)
-@@ -144,11 +192,29 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -144,11 +192,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
int error;
int dirty_accountable = 0;
@@ -75414,7 +77599,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
/*
* If we make a private mapping writable we increase our commit;
* but (without finer accounting) cannot reduce our commit if we
-@@ -165,6 +231,38 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -165,6 +231,38 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
}
}
@@ -75476,7 +77661,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
if (vma_wants_writenotify(vma)) {
vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
-@@ -239,6 +349,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -239,6 +349,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
end = start + len;
if (end <= start)
return -ENOMEM;
@@ -75494,7 +77679,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
if (!arch_validate_prot(prot))
return -EINVAL;
-@@ -246,7 +367,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -246,7 +367,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
@@ -75503,7 +77688,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
-@@ -278,6 +399,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -278,6 +399,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
if (start > vma->vm_start)
prev = vma;
@@ -75515,7 +77700,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
for (nstart = start ; ; ) {
unsigned long newflags;
-@@ -287,6 +413,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -287,6 +413,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/* newflags >> 4 shift VM_MAY% in place of VM_% */
if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
@@ -75530,7 +77715,7 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
error = -EACCES;
goto out;
}
-@@ -301,6 +435,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -301,6 +435,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
if (error)
goto out;
@@ -75540,10 +77725,11 @@ diff -urNp linux-2.6.32.49/mm/mprotect.c linux-2.6.32.49/mm/mprotect.c
nstart = tmp;
if (nstart < prev->vm_end)
-diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
---- linux-2.6.32.49/mm/mremap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/mremap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -112,6 +112,12 @@ static void move_ptes(struct vm_area_str
+diff --git a/mm/mremap.c b/mm/mremap.c
+index 3e98d79..1706cec 100644
+--- a/mm/mremap.c
++++ b/mm/mremap.c
+@@ -112,6 +112,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
continue;
pte = ptep_clear_flush(vma, old_addr, old_pte);
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
@@ -75556,7 +77742,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
set_pte_at(mm, new_addr, new_pte, pte);
}
-@@ -271,6 +277,11 @@ static struct vm_area_struct *vma_to_res
+@@ -271,6 +277,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
if (is_vm_hugetlb_page(vma))
goto Einval;
@@ -75568,7 +77754,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
/* We can't remap across vm area boundaries */
if (old_len > vma->vm_end - addr)
goto Efault;
-@@ -327,20 +338,25 @@ static unsigned long mremap_to(unsigned
+@@ -327,20 +338,25 @@ static unsigned long mremap_to(unsigned long addr,
unsigned long ret = -EINVAL;
unsigned long charged = 0;
unsigned long map_flags;
@@ -75599,7 +77785,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
goto out;
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
-@@ -412,6 +428,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -412,6 +428,7 @@ unsigned long do_mremap(unsigned long addr,
struct vm_area_struct *vma;
unsigned long ret = -EINVAL;
unsigned long charged = 0;
@@ -75607,7 +77793,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
goto out;
-@@ -430,6 +447,17 @@ unsigned long do_mremap(unsigned long ad
+@@ -430,6 +447,17 @@ unsigned long do_mremap(unsigned long addr,
if (!new_len)
goto out;
@@ -75625,7 +77811,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
if (flags & MREMAP_FIXED) {
if (flags & MREMAP_MAYMOVE)
ret = mremap_to(addr, old_len, new_addr, new_len);
-@@ -476,6 +504,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -476,6 +504,7 @@ unsigned long do_mremap(unsigned long addr,
addr + new_len);
}
ret = addr;
@@ -75633,7 +77819,7 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
goto out;
}
}
-@@ -502,7 +531,13 @@ unsigned long do_mremap(unsigned long ad
+@@ -502,7 +531,13 @@ unsigned long do_mremap(unsigned long addr,
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
if (ret)
goto out;
@@ -75647,10 +77833,11 @@ diff -urNp linux-2.6.32.49/mm/mremap.c linux-2.6.32.49/mm/mremap.c
}
out:
if (ret & ~PAGE_MASK)
-diff -urNp linux-2.6.32.49/mm/nommu.c linux-2.6.32.49/mm/nommu.c
---- linux-2.6.32.49/mm/nommu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/nommu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -67,7 +67,6 @@ int sysctl_overcommit_memory = OVERCOMMI
+diff --git a/mm/nommu.c b/mm/nommu.c
+index 406e8d4..53970d3 100644
+--- a/mm/nommu.c
++++ b/mm/nommu.c
+@@ -67,7 +67,6 @@ int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS;
@@ -75658,7 +77845,7 @@ diff -urNp linux-2.6.32.49/mm/nommu.c linux-2.6.32.49/mm/nommu.c
atomic_long_t mmap_pages_allocated;
-@@ -761,15 +760,6 @@ struct vm_area_struct *find_vma(struct m
+@@ -761,15 +760,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
EXPORT_SYMBOL(find_vma);
/*
@@ -75674,9 +77861,10 @@ diff -urNp linux-2.6.32.49/mm/nommu.c linux-2.6.32.49/mm/nommu.c
* expand a stack to a given address
* - not supported under NOMMU conditions
*/
-diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
---- linux-2.6.32.49/mm/page_alloc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/page_alloc.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 3ecab7e..594a471 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
@@ -289,7 +289,7 @@ out:
* This usage means that zero-order pages may not be compound.
*/
@@ -75686,7 +77874,7 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
{
__free_pages_ok(page, compound_order(page));
}
-@@ -587,6 +587,10 @@ static void __free_pages_ok(struct page
+@@ -587,6 +587,10 @@ static void __free_pages_ok(struct page *page, unsigned int order)
int bad = 0;
int wasMlocked = __TestClearPageMlocked(page);
@@ -75697,7 +77885,7 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
kmemcheck_free_shadow(page, order);
for (i = 0 ; i < (1 << order) ; ++i)
-@@ -599,6 +603,12 @@ static void __free_pages_ok(struct page
+@@ -599,6 +603,12 @@ static void __free_pages_ok(struct page *page, unsigned int order)
debug_check_no_obj_freed(page_address(page),
PAGE_SIZE << order);
}
@@ -75710,7 +77898,7 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
-@@ -702,8 +712,10 @@ static int prep_new_page(struct page *pa
+@@ -702,8 +712,10 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1);
@@ -75721,7 +77909,7 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
-@@ -1097,6 +1109,11 @@ static void free_hot_cold_page(struct pa
+@@ -1097,6 +1109,11 @@ static void free_hot_cold_page(struct page *page, int cold)
debug_check_no_locks_freed(page_address(page), PAGE_SIZE);
debug_check_no_obj_freed(page_address(page), PAGE_SIZE);
}
@@ -75742,7 +77930,7 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
for_each_populated_zone(zone) {
show_node(zone);
printk("%s per-cpu:\n", zone->name);
-@@ -3736,7 +3755,7 @@ static void __init setup_usemap(struct p
+@@ -3736,7 +3755,7 @@ static void __init setup_usemap(struct pglist_data *pgdat,
zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize);
}
#else
@@ -75751,10 +77939,11 @@ diff -urNp linux-2.6.32.49/mm/page_alloc.c linux-2.6.32.49/mm/page_alloc.c
struct zone *zone, unsigned long zonesize) {}
#endif /* CONFIG_SPARSEMEM */
-diff -urNp linux-2.6.32.49/mm/percpu.c linux-2.6.32.49/mm/percpu.c
---- linux-2.6.32.49/mm/percpu.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/percpu.c 2011-11-15 19:59:43.000000000 -0500
-@@ -115,7 +115,7 @@ static unsigned int pcpu_first_unit_cpu
+diff --git a/mm/percpu.c b/mm/percpu.c
+index 3bfd6e2..60404b9 100644
+--- a/mm/percpu.c
++++ b/mm/percpu.c
+@@ -115,7 +115,7 @@ static unsigned int pcpu_first_unit_cpu __read_mostly;
static unsigned int pcpu_last_unit_cpu __read_mostly;
/* the address of the first chunk which starts with the kernel static area */
@@ -75763,10 +77952,11 @@ diff -urNp linux-2.6.32.49/mm/percpu.c linux-2.6.32.49/mm/percpu.c
EXPORT_SYMBOL_GPL(pcpu_base_addr);
static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */
-diff -urNp linux-2.6.32.49/mm/rmap.c linux-2.6.32.49/mm/rmap.c
---- linux-2.6.32.49/mm/rmap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/rmap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -121,6 +121,17 @@ int anon_vma_prepare(struct vm_area_stru
+diff --git a/mm/rmap.c b/mm/rmap.c
+index dd43373..d848cd7 100644
+--- a/mm/rmap.c
++++ b/mm/rmap.c
+@@ -121,6 +121,17 @@ int anon_vma_prepare(struct vm_area_struct *vma)
/* page_table_lock to protect against threads */
spin_lock(&mm->page_table_lock);
if (likely(!vma->anon_vma)) {
@@ -75784,9 +77974,10 @@ diff -urNp linux-2.6.32.49/mm/rmap.c linux-2.6.32.49/mm/rmap.c
vma->anon_vma = anon_vma;
list_add_tail(&vma->anon_vma_node, &anon_vma->head);
allocated = NULL;
-diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
---- linux-2.6.32.49/mm/shmem.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/shmem.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/shmem.c b/mm/shmem.c
+index 3e0005b..1d659a8 100644
+--- a/mm/shmem.c
++++ b/mm/shmem.c
@@ -31,7 +31,7 @@
#include <linux/swap.h>
#include <linux/ima.h>
@@ -75796,7 +77987,7 @@ diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
#ifdef CONFIG_SHMEM
/*
-@@ -1061,6 +1061,8 @@ static int shmem_writepage(struct page *
+@@ -1061,6 +1061,8 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
goto unlock;
}
entry = shmem_swp_entry(info, index, NULL);
@@ -75805,7 +77996,7 @@ diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
if (entry->val) {
/*
* The more uptodate page coming down from a stacked
-@@ -1144,6 +1146,8 @@ static struct page *shmem_swapin(swp_ent
+@@ -1144,6 +1146,8 @@ static struct page *shmem_swapin(swp_entry_t entry, gfp_t gfp,
struct vm_area_struct pvma;
struct page *page;
@@ -75814,7 +78005,7 @@ diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
spol = mpol_cond_copy(&mpol,
mpol_shared_policy_lookup(&info->policy, idx));
-@@ -1962,7 +1966,7 @@ static int shmem_symlink(struct inode *d
+@@ -1962,7 +1966,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
info = SHMEM_I(inode);
inode->i_size = len-1;
@@ -75823,7 +78014,7 @@ diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
/* do it inline */
memcpy(info, symname, len);
inode->i_op = &shmem_symlink_inline_operations;
-@@ -2310,8 +2314,7 @@ int shmem_fill_super(struct super_block
+@@ -2310,8 +2314,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
int err = -ENOMEM;
/* Round up to L1_CACHE_BYTES to resist false sharing */
@@ -75833,9 +78024,10 @@ diff -urNp linux-2.6.32.49/mm/shmem.c linux-2.6.32.49/mm/shmem.c
if (!sbinfo)
return -ENOMEM;
-diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
---- linux-2.6.32.49/mm/slab.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/slab.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/mm/slab.c b/mm/slab.c
+index c8d466a..909e01e 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
@@ -174,7 +174,7 @@
/* Legal flag mask for kmem_cache_create(). */
@@ -75863,7 +78055,7 @@ diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
#define CACHE_CACHE 0
#define SIZE_AC MAX_NUMNODES
#define SIZE_L3 (2 * MAX_NUMNODES)
-@@ -409,10 +409,10 @@ static void kmem_list3_init(struct kmem_
+@@ -409,10 +409,10 @@ static void kmem_list3_init(struct kmem_list3 *parent)
if ((x)->max_freeable < i) \
(x)->max_freeable = i; \
} while (0)
@@ -75878,7 +78070,7 @@ diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
#else
#define STATS_INC_ACTIVE(x) do { } while (0)
#define STATS_DEC_ACTIVE(x) do { } while (0)
-@@ -558,7 +558,7 @@ static inline void *index_to_obj(struct
+@@ -558,7 +558,7 @@ static inline void *index_to_obj(struct kmem_cache *cache, struct slab *slab,
* reciprocal_divide(offset, cache->reciprocal_buffer_size)
*/
static inline unsigned int obj_to_index(const struct kmem_cache *cache,
@@ -75914,7 +78106,7 @@ diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
NULL);
}
#ifdef CONFIG_ZONE_DMA
-@@ -4211,10 +4211,10 @@ static int s_show(struct seq_file *m, vo
+@@ -4211,10 +4211,10 @@ static int s_show(struct seq_file *m, void *p)
}
/* cpu stats */
{
@@ -75929,7 +78121,7 @@ diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
seq_printf(m, " : cpustat %6lu %6lu %6lu %6lu",
allochit, allocmiss, freehit, freemiss);
-@@ -4471,15 +4471,70 @@ static const struct file_operations proc
+@@ -4471,15 +4471,70 @@ static const struct file_operations proc_slabstats_operations = {
static int __init slab_proc_init(void)
{
@@ -76002,9 +78194,10 @@ diff -urNp linux-2.6.32.49/mm/slab.c linux-2.6.32.49/mm/slab.c
/**
* ksize - get the actual amount of memory allocated for a given object
* @objp: Pointer to the object
-diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
---- linux-2.6.32.49/mm/slob.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/slob.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/mm/slob.c b/mm/slob.c
+index 837ebd6..4712174 100644
+--- a/mm/slob.c
++++ b/mm/slob.c
@@ -29,7 +29,7 @@
* If kmalloc is asked for objects of PAGE_SIZE or larger, it calls
* alloc_pages() directly, allocating compound pages so the page order
@@ -76041,7 +78234,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
}
static inline void set_slob_page(struct slob_page *sp)
-@@ -148,7 +150,7 @@ static inline void clear_slob_page(struc
+@@ -148,7 +150,7 @@ static inline void clear_slob_page(struct slob_page *sp)
static inline struct slob_page *slob_page(const void *addr)
{
@@ -76050,7 +78243,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
}
/*
-@@ -208,7 +210,7 @@ static void set_slob(slob_t *s, slobidx_
+@@ -208,7 +210,7 @@ static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
/*
* Return the size of a slob block.
*/
@@ -76077,7 +78270,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
{
return !((unsigned long)slob_next(s) & ~PAGE_MASK);
}
-@@ -252,6 +254,7 @@ static void *slob_new_pages(gfp_t gfp, i
+@@ -252,6 +254,7 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
if (!page)
return NULL;
@@ -76085,7 +78278,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
return page_address(page);
}
-@@ -368,11 +371,11 @@ static void *slob_alloc(size_t size, gfp
+@@ -368,11 +371,11 @@ static void *slob_alloc(size_t size, gfp_t gfp, int align, int node)
if (!b)
return NULL;
sp = slob_page(b);
@@ -76111,7 +78304,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
void *ret;
lockdep_trace_alloc(gfp);
-@@ -491,7 +493,10 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -491,7 +493,10 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
if (!m)
return NULL;
@@ -76123,7 +78316,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
ret = (void *)m + align;
trace_kmalloc_node(_RET_IP_, ret,
-@@ -501,16 +506,25 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -501,16 +506,25 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node);
if (ret) {
@@ -76263,7 +78456,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
}
EXPORT_SYMBOL(ksize);
-@@ -566,8 +659,13 @@ struct kmem_cache *kmem_cache_create(con
+@@ -566,8 +659,13 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
{
struct kmem_cache *c;
@@ -76277,7 +78470,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
if (c) {
c->name = name;
-@@ -605,17 +703,25 @@ void *kmem_cache_alloc_node(struct kmem_
+@@ -605,17 +703,25 @@ void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
{
void *b;
@@ -76322,7 +78515,7 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
}
static void kmem_rcu_free(struct rcu_head *head)
-@@ -643,18 +755,32 @@ static void kmem_rcu_free(struct rcu_hea
+@@ -643,18 +755,32 @@ static void kmem_rcu_free(struct rcu_head *head)
void kmem_cache_free(struct kmem_cache *c, void *b)
{
@@ -76358,9 +78551,10 @@ diff -urNp linux-2.6.32.49/mm/slob.c linux-2.6.32.49/mm/slob.c
}
EXPORT_SYMBOL(kmem_cache_free);
-diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
---- linux-2.6.32.49/mm/slub.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/slub.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/mm/slub.c b/mm/slub.c
+index 4996fc7..87e01d0 100644
+--- a/mm/slub.c
++++ b/mm/slub.c
@@ -201,7 +201,7 @@ struct track {
enum track_item { TRACK_ALLOC, TRACK_FREE };
@@ -76370,7 +78564,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
static int sysfs_slab_add(struct kmem_cache *);
static int sysfs_slab_alias(struct kmem_cache *, const char *);
static void sysfs_slab_remove(struct kmem_cache *);
-@@ -410,7 +410,7 @@ static void print_track(const char *s, s
+@@ -410,7 +410,7 @@ static void print_track(const char *s, struct track *t)
if (!t->addr)
return;
@@ -76379,7 +78573,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
}
-@@ -1893,6 +1893,8 @@ void kmem_cache_free(struct kmem_cache *
+@@ -1893,6 +1893,8 @@ void kmem_cache_free(struct kmem_cache *s, void *x)
page = virt_to_head_page(x);
@@ -76397,7 +78591,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
/*
* Calculate the order of allocation given an slab object size.
-@@ -2493,7 +2495,7 @@ static int kmem_cache_open(struct kmem_c
+@@ -2493,7 +2495,7 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
* list to avoid pounding the page allocator excessively.
*/
set_min_partial(s, ilog2(s->size));
@@ -76406,7 +78600,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
#ifdef CONFIG_NUMA
s->remote_node_defrag_ratio = 1000;
#endif
-@@ -2630,8 +2632,7 @@ static inline int kmem_cache_close(struc
+@@ -2630,8 +2632,7 @@ static inline int kmem_cache_close(struct kmem_cache *s)
void kmem_cache_destroy(struct kmem_cache *s)
{
down_write(&slub_lock);
@@ -76416,7 +78610,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
list_del(&s->list);
up_write(&slub_lock);
if (kmem_cache_close(s)) {
-@@ -2691,12 +2692,10 @@ static int __init setup_slub_nomerge(cha
+@@ -2691,12 +2692,10 @@ static int __init setup_slub_nomerge(char *str)
__setup("slub_nomerge", setup_slub_nomerge);
static struct kmem_cache *create_kmalloc_cache(struct kmem_cache *s,
@@ -76431,7 +78625,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
/*
* This function is called with IRQs disabled during early-boot on
-@@ -2915,6 +2914,50 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -2915,6 +2914,50 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
EXPORT_SYMBOL(__kmalloc_node);
#endif
@@ -76515,7 +78709,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
caches++;
}
-@@ -3293,7 +3336,7 @@ static int slab_unmergeable(struct kmem_
+@@ -3293,7 +3336,7 @@ static int slab_unmergeable(struct kmem_cache *s)
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
@@ -76524,7 +78718,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
return 1;
return 0;
-@@ -3353,7 +3396,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3353,7 +3396,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
if (s) {
int cpu;
@@ -76533,7 +78727,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
/*
* Adjust the object sizes so that we clear
* the complete object on kzalloc.
-@@ -3372,7 +3415,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3372,7 +3415,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
if (sysfs_slab_alias(s, name)) {
down_write(&slub_lock);
@@ -76551,7 +78745,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
}
SLAB_ATTR_RO(aliases);
-@@ -4503,7 +4546,7 @@ static void kmem_cache_release(struct ko
+@@ -4503,7 +4546,7 @@ static void kmem_cache_release(struct kobject *kobj)
kfree(s);
}
@@ -76560,7 +78754,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
.show = slab_attr_show,
.store = slab_attr_store,
};
-@@ -4522,7 +4565,7 @@ static int uevent_filter(struct kset *ks
+@@ -4522,7 +4565,7 @@ static int uevent_filter(struct kset *kset, struct kobject *kobj)
return 0;
}
@@ -76569,7 +78763,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
.filter = uevent_filter,
};
-@@ -4564,6 +4607,7 @@ static char *create_unique_id(struct kme
+@@ -4564,6 +4607,7 @@ static char *create_unique_id(struct kmem_cache *s)
return name;
}
@@ -76577,7 +78771,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
static int sysfs_slab_add(struct kmem_cache *s)
{
int err;
-@@ -4619,6 +4663,7 @@ static void sysfs_slab_remove(struct kme
+@@ -4619,6 +4663,7 @@ static void sysfs_slab_remove(struct kmem_cache *s)
kobject_del(&s->kobj);
kobject_put(&s->kobj);
}
@@ -76593,7 +78787,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
{
struct saved_alias *al;
-@@ -4654,6 +4700,7 @@ static int sysfs_slab_alias(struct kmem_
+@@ -4654,6 +4700,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
alias_list = al;
return 0;
}
@@ -76601,7 +78795,7 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
static int __init slab_sysfs_init(void)
{
-@@ -4785,7 +4832,13 @@ static const struct file_operations proc
+@@ -4785,7 +4832,13 @@ static const struct file_operations proc_slabinfo_operations = {
static int __init slab_proc_init(void)
{
@@ -76616,9 +78810,10 @@ diff -urNp linux-2.6.32.49/mm/slub.c linux-2.6.32.49/mm/slub.c
return 0;
}
module_init(slab_proc_init);
-diff -urNp linux-2.6.32.49/mm/swap.c linux-2.6.32.49/mm/swap.c
---- linux-2.6.32.49/mm/swap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/swap.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/swap.c b/mm/swap.c
+index 308e57d..5de19c0 100644
+--- a/mm/swap.c
++++ b/mm/swap.c
@@ -30,6 +30,7 @@
#include <linux/notifier.h>
#include <linux/backing-dev.h>
@@ -76627,7 +78822,7 @@ diff -urNp linux-2.6.32.49/mm/swap.c linux-2.6.32.49/mm/swap.c
#include "internal.h"
-@@ -65,6 +66,8 @@ static void put_compound_page(struct pag
+@@ -65,6 +66,8 @@ static void put_compound_page(struct page *page)
compound_page_dtor *dtor;
dtor = get_compound_page_dtor(page);
@@ -76636,9 +78831,10 @@ diff -urNp linux-2.6.32.49/mm/swap.c linux-2.6.32.49/mm/swap.c
(*dtor)(page);
}
}
-diff -urNp linux-2.6.32.49/mm/util.c linux-2.6.32.49/mm/util.c
---- linux-2.6.32.49/mm/util.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/util.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/util.c b/mm/util.c
+index b377ce4..3a891af 100644
+--- a/mm/util.c
++++ b/mm/util.c
@@ -228,6 +228,12 @@ EXPORT_SYMBOL(strndup_user);
void arch_pick_mmap_layout(struct mm_struct *mm)
{
@@ -76652,10 +78848,11 @@ diff -urNp linux-2.6.32.49/mm/util.c linux-2.6.32.49/mm/util.c
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
}
-diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
---- linux-2.6.32.49/mm/vmalloc.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/mm/vmalloc.c 2011-11-26 19:49:57.000000000 -0500
-@@ -40,8 +40,19 @@ static void vunmap_pte_range(pmd_t *pmd,
+diff --git a/mm/vmalloc.c b/mm/vmalloc.c
+index f34ffd0..28e94b7 100644
+--- a/mm/vmalloc.c
++++ b/mm/vmalloc.c
+@@ -40,8 +40,19 @@ static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end)
pte = pte_offset_kernel(pmd, addr);
do {
@@ -76677,7 +78874,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
} while (pte++, addr += PAGE_SIZE, addr != end);
}
-@@ -92,6 +103,7 @@ static int vmap_pte_range(pmd_t *pmd, un
+@@ -92,6 +103,7 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr,
unsigned long end, pgprot_t prot, struct page **pages, int *nr)
{
pte_t *pte;
@@ -76685,7 +78882,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
/*
* nr is a running index into the array which helps higher level
-@@ -101,17 +113,32 @@ static int vmap_pte_range(pmd_t *pmd, un
+@@ -101,17 +113,32 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr,
pte = pte_alloc_kernel(pmd, addr);
if (!pte)
return -ENOMEM;
@@ -76723,7 +78920,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
}
static int vmap_pmd_range(pud_t *pud, unsigned long addr,
-@@ -192,11 +219,20 @@ int is_vmalloc_or_module_addr(const void
+@@ -192,11 +219,20 @@ int is_vmalloc_or_module_addr(const void *x)
* and fall back on vmalloc() if that fails. Others
* just put it in the vmalloc space.
*/
@@ -76745,7 +78942,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
return is_vmalloc_addr(x);
}
-@@ -217,8 +253,14 @@ struct page *vmalloc_to_page(const void
+@@ -217,8 +253,14 @@ struct page *vmalloc_to_page(const void *vmalloc_addr)
if (!pgd_none(*pgd)) {
pud_t *pud = pud_offset(pgd, addr);
@@ -76760,7 +78957,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
if (!pmd_none(*pmd)) {
pte_t *ptep, pte;
-@@ -292,13 +334,13 @@ static void __insert_vmap_area(struct vm
+@@ -292,13 +334,13 @@ static void __insert_vmap_area(struct vmap_area *va)
struct rb_node *tmp;
while (*p) {
@@ -76778,7 +78975,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
p = &(*p)->rb_right;
else
BUG();
-@@ -1245,6 +1287,16 @@ static struct vm_struct *__get_vm_area_n
+@@ -1245,6 +1287,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
struct vm_struct *area;
BUG_ON(in_interrupt());
@@ -76795,7 +78992,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
if (flags & VM_IOREMAP) {
int bit = fls(size);
-@@ -1484,6 +1536,11 @@ void *vmap(struct page **pages, unsigned
+@@ -1484,6 +1536,11 @@ void *vmap(struct page **pages, unsigned int count,
if (count > totalram_pages)
return NULL;
@@ -76807,7 +79004,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
__builtin_return_address(0));
if (!area)
-@@ -1594,6 +1651,13 @@ static void *__vmalloc_node(unsigned lon
+@@ -1594,6 +1651,13 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
if (!size || (size >> PAGE_SHIFT) > totalram_pages)
return NULL;
@@ -76821,7 +79018,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST,
VMALLOC_START, VMALLOC_END, node,
gfp_mask, caller);
-@@ -1619,6 +1683,7 @@ static void *__vmalloc_node(unsigned lon
+@@ -1619,6 +1683,7 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
return addr;
}
@@ -76882,7 +79079,7 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
void *vmalloc_32_user(unsigned long size)
{
struct vm_struct *area;
-@@ -1998,6 +2068,8 @@ int remap_vmalloc_range(struct vm_area_s
+@@ -1998,6 +2068,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
unsigned long uaddr = vma->vm_start;
unsigned long usize = vma->vm_end - vma->vm_start;
@@ -76891,9 +79088,10 @@ diff -urNp linux-2.6.32.49/mm/vmalloc.c linux-2.6.32.49/mm/vmalloc.c
if ((PAGE_SIZE-1) & (unsigned long)addr)
return -EINVAL;
-diff -urNp linux-2.6.32.49/mm/vmstat.c linux-2.6.32.49/mm/vmstat.c
---- linux-2.6.32.49/mm/vmstat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/mm/vmstat.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/mm/vmstat.c b/mm/vmstat.c
+index 42d76c6..5643dc4 100644
+--- a/mm/vmstat.c
++++ b/mm/vmstat.c
@@ -74,7 +74,7 @@ void vm_events_fold_cpu(int cpu)
*
* vm_stat contains the global counters
@@ -76946,10 +79144,11 @@ diff -urNp linux-2.6.32.49/mm/vmstat.c linux-2.6.32.49/mm/vmstat.c
#endif
return 0;
}
-diff -urNp linux-2.6.32.49/net/8021q/vlan.c linux-2.6.32.49/net/8021q/vlan.c
---- linux-2.6.32.49/net/8021q/vlan.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/8021q/vlan.c 2011-11-15 19:59:43.000000000 -0500
-@@ -622,8 +622,7 @@ static int vlan_ioctl_handler(struct net
+diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
+index a29c5ab..6143f20 100644
+--- a/net/8021q/vlan.c
++++ b/net/8021q/vlan.c
+@@ -622,8 +622,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
@@ -76959,10 +79158,11 @@ diff -urNp linux-2.6.32.49/net/8021q/vlan.c linux-2.6.32.49/net/8021q/vlan.c
struct vlan_net *vn;
vn = net_generic(net, vlan_net_id);
-diff -urNp linux-2.6.32.49/net/9p/trans_fd.c linux-2.6.32.49/net/9p/trans_fd.c
---- linux-2.6.32.49/net/9p/trans_fd.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/9p/trans_fd.c 2011-11-15 19:59:43.000000000 -0500
-@@ -419,7 +419,7 @@ static int p9_fd_write(struct p9_client
+diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
+index a2d2984..f9eb711 100644
+--- a/net/9p/trans_fd.c
++++ b/net/9p/trans_fd.c
+@@ -419,7 +419,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
oldfs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -76971,10 +79171,11 @@ diff -urNp linux-2.6.32.49/net/9p/trans_fd.c linux-2.6.32.49/net/9p/trans_fd.c
set_fs(oldfs);
if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN)
-diff -urNp linux-2.6.32.49/net/atm/atm_misc.c linux-2.6.32.49/net/atm/atm_misc.c
---- linux-2.6.32.49/net/atm/atm_misc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/atm_misc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -19,7 +19,7 @@ int atm_charge(struct atm_vcc *vcc,int t
+diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
+index 02cc7e7..4514f1b 100644
+--- a/net/atm/atm_misc.c
++++ b/net/atm/atm_misc.c
+@@ -19,7 +19,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize)
if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf)
return 1;
atm_return(vcc,truesize);
@@ -76983,7 +79184,7 @@ diff -urNp linux-2.6.32.49/net/atm/atm_misc.c linux-2.6.32.49/net/atm/atm_misc.c
return 0;
}
-@@ -41,7 +41,7 @@ struct sk_buff *atm_alloc_charge(struct
+@@ -41,7 +41,7 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
}
}
atm_return(vcc,guess);
@@ -76992,7 +79193,7 @@ diff -urNp linux-2.6.32.49/net/atm/atm_misc.c linux-2.6.32.49/net/atm/atm_misc.c
return NULL;
}
-@@ -88,7 +88,7 @@ int atm_pcr_goal(const struct atm_trafpr
+@@ -88,7 +88,7 @@ int atm_pcr_goal(const struct atm_trafprm *tp)
void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to)
{
@@ -77001,7 +79202,7 @@ diff -urNp linux-2.6.32.49/net/atm/atm_misc.c linux-2.6.32.49/net/atm/atm_misc.c
__SONET_ITEMS
#undef __HANDLE_ITEM
}
-@@ -96,7 +96,7 @@ void sonet_copy_stats(struct k_sonet_sta
+@@ -96,7 +96,7 @@ void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to)
void sonet_subtract_stats(struct k_sonet_stats *from,struct sonet_stats *to)
{
@@ -77010,9 +79211,10 @@ diff -urNp linux-2.6.32.49/net/atm/atm_misc.c linux-2.6.32.49/net/atm/atm_misc.c
__SONET_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.32.49/net/atm/lec.h linux-2.6.32.49/net/atm/lec.h
---- linux-2.6.32.49/net/atm/lec.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/lec.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/atm/lec.h b/net/atm/lec.h
+index 9d14d19..5c145f3 100644
+--- a/net/atm/lec.h
++++ b/net/atm/lec.h
@@ -48,7 +48,7 @@ struct lane2_ops {
const u8 *tlvs, u32 sizeoftlvs);
void (*associate_indicator) (struct net_device *dev, const u8 *mac_addr,
@@ -77022,9 +79224,10 @@ diff -urNp linux-2.6.32.49/net/atm/lec.h linux-2.6.32.49/net/atm/lec.h
/*
* ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
-diff -urNp linux-2.6.32.49/net/atm/mpc.h linux-2.6.32.49/net/atm/mpc.h
---- linux-2.6.32.49/net/atm/mpc.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/mpc.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/atm/mpc.h b/net/atm/mpc.h
+index 0919a88..a23d54e 100644
+--- a/net/atm/mpc.h
++++ b/net/atm/mpc.h
@@ -33,7 +33,7 @@ struct mpoa_client {
struct mpc_parameters parameters; /* parameters for this client */
@@ -77034,10 +79237,11 @@ diff -urNp linux-2.6.32.49/net/atm/mpc.h linux-2.6.32.49/net/atm/mpc.h
};
-diff -urNp linux-2.6.32.49/net/atm/mpoa_caches.c linux-2.6.32.49/net/atm/mpoa_caches.c
---- linux-2.6.32.49/net/atm/mpoa_caches.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/mpoa_caches.c 2011-11-15 19:59:43.000000000 -0500
-@@ -498,6 +498,8 @@ static void clear_expired(struct mpoa_cl
+diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
+index 4504a4b..1733f1e 100644
+--- a/net/atm/mpoa_caches.c
++++ b/net/atm/mpoa_caches.c
+@@ -498,6 +498,8 @@ static void clear_expired(struct mpoa_client *client)
struct timeval now;
struct k_message msg;
@@ -77046,10 +79250,11 @@ diff -urNp linux-2.6.32.49/net/atm/mpoa_caches.c linux-2.6.32.49/net/atm/mpoa_ca
do_gettimeofday(&now);
write_lock_irq(&client->egress_lock);
-diff -urNp linux-2.6.32.49/net/atm/proc.c linux-2.6.32.49/net/atm/proc.c
---- linux-2.6.32.49/net/atm/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -43,9 +43,9 @@ static void add_stats(struct seq_file *s
+diff --git a/net/atm/proc.c b/net/atm/proc.c
+index ab8419a..aa91497 100644
+--- a/net/atm/proc.c
++++ b/net/atm/proc.c
+@@ -43,9 +43,9 @@ static void add_stats(struct seq_file *seq, const char *aal,
const struct k_atm_aal_stats *stats)
{
seq_printf(seq, "%s ( %d %d %d %d %d )", aal,
@@ -77062,7 +79267,7 @@ diff -urNp linux-2.6.32.49/net/atm/proc.c linux-2.6.32.49/net/atm/proc.c
}
static void atm_dev_info(struct seq_file *seq, const struct atm_dev *dev)
-@@ -188,7 +188,12 @@ static void vcc_info(struct seq_file *se
+@@ -188,7 +188,12 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc)
{
struct sock *sk = sk_atm(vcc);
@@ -77075,7 +79280,7 @@ diff -urNp linux-2.6.32.49/net/atm/proc.c linux-2.6.32.49/net/atm/proc.c
if (!vcc->dev)
seq_printf(seq, "Unassigned ");
else
-@@ -214,7 +219,11 @@ static void svc_info(struct seq_file *se
+@@ -214,7 +219,11 @@ static void svc_info(struct seq_file *seq, struct atm_vcc *vcc)
{
if (!vcc->dev)
seq_printf(seq, sizeof(void *) == 4 ?
@@ -77087,10 +79292,11 @@ diff -urNp linux-2.6.32.49/net/atm/proc.c linux-2.6.32.49/net/atm/proc.c
else
seq_printf(seq, "%3d %3d %5d ",
vcc->dev->number, vcc->vpi, vcc->vci);
-diff -urNp linux-2.6.32.49/net/atm/resources.c linux-2.6.32.49/net/atm/resources.c
---- linux-2.6.32.49/net/atm/resources.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/atm/resources.c 2011-11-15 19:59:43.000000000 -0500
-@@ -161,7 +161,7 @@ void atm_dev_deregister(struct atm_dev *
+diff --git a/net/atm/resources.c b/net/atm/resources.c
+index 56b7322..c48b84e 100644
+--- a/net/atm/resources.c
++++ b/net/atm/resources.c
+@@ -161,7 +161,7 @@ void atm_dev_deregister(struct atm_dev *dev)
static void copy_aal_stats(struct k_atm_aal_stats *from,
struct atm_aal_stats *to)
{
@@ -77099,7 +79305,7 @@ diff -urNp linux-2.6.32.49/net/atm/resources.c linux-2.6.32.49/net/atm/resources
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-@@ -170,7 +170,7 @@ static void copy_aal_stats(struct k_atm_
+@@ -170,7 +170,7 @@ static void copy_aal_stats(struct k_atm_aal_stats *from,
static void subtract_aal_stats(struct k_atm_aal_stats *from,
struct atm_aal_stats *to)
{
@@ -77108,10 +79314,11 @@ diff -urNp linux-2.6.32.49/net/atm/resources.c linux-2.6.32.49/net/atm/resources
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.32.49/net/bridge/br_private.h linux-2.6.32.49/net/bridge/br_private.h
---- linux-2.6.32.49/net/bridge/br_private.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/bridge/br_private.h 2011-11-15 19:59:43.000000000 -0500
-@@ -255,7 +255,7 @@ extern void br_ifinfo_notify(int event,
+diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
+index 8567d47..bba2292 100644
+--- a/net/bridge/br_private.h
++++ b/net/bridge/br_private.h
+@@ -255,7 +255,7 @@ extern void br_ifinfo_notify(int event, struct net_bridge_port *port);
#ifdef CONFIG_SYSFS
/* br_sysfs_if.c */
@@ -77120,10 +79327,11 @@ diff -urNp linux-2.6.32.49/net/bridge/br_private.h linux-2.6.32.49/net/bridge/br
extern int br_sysfs_addif(struct net_bridge_port *p);
/* br_sysfs_br.c */
-diff -urNp linux-2.6.32.49/net/bridge/br_stp_if.c linux-2.6.32.49/net/bridge/br_stp_if.c
---- linux-2.6.32.49/net/bridge/br_stp_if.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/bridge/br_stp_if.c 2011-11-15 19:59:43.000000000 -0500
-@@ -146,7 +146,7 @@ static void br_stp_stop(struct net_bridg
+diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
+index 9a52ac5..c97538e 100644
+--- a/net/bridge/br_stp_if.c
++++ b/net/bridge/br_stp_if.c
+@@ -146,7 +146,7 @@ static void br_stp_stop(struct net_bridge *br)
char *envp[] = { NULL };
if (br->stp_enabled == BR_USER_STP) {
@@ -77132,10 +79340,11 @@ diff -urNp linux-2.6.32.49/net/bridge/br_stp_if.c linux-2.6.32.49/net/bridge/br_
printk(KERN_INFO "%s: userspace STP stopped, return code %d\n",
br->dev->name, r);
-diff -urNp linux-2.6.32.49/net/bridge/br_sysfs_if.c linux-2.6.32.49/net/bridge/br_sysfs_if.c
---- linux-2.6.32.49/net/bridge/br_sysfs_if.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/bridge/br_sysfs_if.c 2011-11-15 19:59:43.000000000 -0500
-@@ -220,7 +220,7 @@ static ssize_t brport_store(struct kobje
+diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
+index 820643a..ce77fb3 100644
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
+@@ -220,7 +220,7 @@ static ssize_t brport_store(struct kobject * kobj,
return ret;
}
@@ -77144,10 +79353,11 @@ diff -urNp linux-2.6.32.49/net/bridge/br_sysfs_if.c linux-2.6.32.49/net/bridge/b
.show = brport_show,
.store = brport_store,
};
-diff -urNp linux-2.6.32.49/net/bridge/netfilter/ebtables.c linux-2.6.32.49/net/bridge/netfilter/ebtables.c
---- linux-2.6.32.49/net/bridge/netfilter/ebtables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/bridge/netfilter/ebtables.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1337,6 +1337,8 @@ static int copy_everything_to_user(struc
+diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
+index d73d47f..72df42a 100644
+--- a/net/bridge/netfilter/ebtables.c
++++ b/net/bridge/netfilter/ebtables.c
+@@ -1337,6 +1337,8 @@ static int copy_everything_to_user(struct ebt_table *t, void __user *user,
unsigned int entries_size, nentries;
char *entries;
@@ -77156,10 +79366,11 @@ diff -urNp linux-2.6.32.49/net/bridge/netfilter/ebtables.c linux-2.6.32.49/net/b
if (cmd == EBT_SO_GET_ENTRIES) {
entries_size = t->private->entries_size;
nentries = t->private->nentries;
-diff -urNp linux-2.6.32.49/net/can/bcm.c linux-2.6.32.49/net/can/bcm.c
---- linux-2.6.32.49/net/can/bcm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/can/bcm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -164,9 +164,15 @@ static int bcm_proc_show(struct seq_file
+diff --git a/net/can/bcm.c b/net/can/bcm.c
+index 2ffd2e0..72a7486 100644
+--- a/net/can/bcm.c
++++ b/net/can/bcm.c
+@@ -164,9 +164,15 @@ static int bcm_proc_show(struct seq_file *m, void *v)
struct bcm_sock *bo = bcm_sk(sk);
struct bcm_op *op;
@@ -77175,10 +79386,11 @@ diff -urNp linux-2.6.32.49/net/can/bcm.c linux-2.6.32.49/net/can/bcm.c
seq_printf(m, " / dropped %lu", bo->dropped_usr_msgs);
seq_printf(m, " / bound %s", bcm_proc_getifname(ifname, bo->ifindex));
seq_printf(m, " <<<\n");
-diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
---- linux-2.6.32.49/net/compat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/compat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -69,9 +69,9 @@ int get_compat_msghdr(struct msghdr *kms
+diff --git a/net/compat.c b/net/compat.c
+index 9559afc..ccd74e1 100644
+--- a/net/compat.c
++++ b/net/compat.c
+@@ -69,9 +69,9 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg)
__get_user(kmsg->msg_controllen, &umsg->msg_controllen) ||
__get_user(kmsg->msg_flags, &umsg->msg_flags))
return -EFAULT;
@@ -77191,7 +79403,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
return 0;
}
-@@ -94,7 +94,7 @@ int verify_compat_iovec(struct msghdr *k
+@@ -94,7 +94,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
kern_msg->msg_name = NULL;
tot_len = iov_from_user_compat_to_kern(kern_iov,
@@ -77200,7 +79412,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
kern_msg->msg_iovlen);
if (tot_len >= 0)
kern_msg->msg_iov = kern_iov;
-@@ -114,20 +114,20 @@ int verify_compat_iovec(struct msghdr *k
+@@ -114,20 +114,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
#define CMSG_COMPAT_FIRSTHDR(msg) \
(((msg)->msg_controllen) >= sizeof(struct compat_cmsghdr) ? \
@@ -77224,7 +79436,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
msg->msg_controllen)
return NULL;
return (struct compat_cmsghdr __user *)ptr;
-@@ -219,7 +219,7 @@ int put_cmsg_compat(struct msghdr *kmsg,
+@@ -219,7 +219,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
{
struct compat_timeval ctv;
struct compat_timespec cts[3];
@@ -77233,7 +79445,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
struct compat_cmsghdr cmhdr;
int cmlen;
-@@ -271,7 +271,7 @@ int put_cmsg_compat(struct msghdr *kmsg,
+@@ -271,7 +271,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm)
{
@@ -77242,7 +79454,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
int fdmax = (kmsg->msg_controllen - sizeof(struct compat_cmsghdr)) / sizeof(int);
int fdnum = scm->fp->count;
struct file **fp = scm->fp->fp;
-@@ -433,7 +433,7 @@ static int do_get_sock_timeout(struct so
+@@ -433,7 +433,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname,
len = sizeof(ktime);
old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -77251,7 +79463,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
set_fs(old_fs);
if (!err) {
-@@ -570,7 +570,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -570,7 +570,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
case MCAST_JOIN_GROUP:
case MCAST_LEAVE_GROUP:
{
@@ -77260,7 +79472,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
struct group_req __user *kgr =
compat_alloc_user_space(sizeof(struct group_req));
u32 interface;
-@@ -591,7 +591,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -591,7 +591,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
case MCAST_BLOCK_SOURCE:
case MCAST_UNBLOCK_SOURCE:
{
@@ -77269,7 +79481,7 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
struct group_source_req __user *kgsr = compat_alloc_user_space(
sizeof(struct group_source_req));
u32 interface;
-@@ -612,7 +612,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -612,7 +612,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
}
case MCAST_MSFILTER:
{
@@ -77278,10 +79490,11 @@ diff -urNp linux-2.6.32.49/net/compat.c linux-2.6.32.49/net/compat.c
struct group_filter __user *kgf;
u32 interface, fmode, numsrc;
-diff -urNp linux-2.6.32.49/net/core/dev.c linux-2.6.32.49/net/core/dev.c
---- linux-2.6.32.49/net/core/dev.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/dev.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1047,10 +1047,14 @@ void dev_load(struct net *net, const cha
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 64eb849..7b5948b 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -1047,10 +1047,14 @@ void dev_load(struct net *net, const char *name)
if (no_module && capable(CAP_NET_ADMIN))
no_module = request_module("netdev-%s", name);
if (no_module && capable(CAP_SYS_MODULE)) {
@@ -77296,7 +79509,7 @@ diff -urNp linux-2.6.32.49/net/core/dev.c linux-2.6.32.49/net/core/dev.c
}
}
EXPORT_SYMBOL(dev_load);
-@@ -1654,7 +1658,7 @@ static inline int illegal_highdma(struct
+@@ -1654,7 +1658,7 @@ static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
struct dev_gso_cb {
void (*destructor)(struct sk_buff *skb);
@@ -77314,7 +79527,7 @@ diff -urNp linux-2.6.32.49/net/core/dev.c linux-2.6.32.49/net/core/dev.c
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
-@@ -2826,7 +2830,7 @@ void netif_napi_del(struct napi_struct *
+@@ -2826,7 +2830,7 @@ void netif_napi_del(struct napi_struct *napi)
EXPORT_SYMBOL(netif_napi_del);
@@ -77323,9 +79536,10 @@ diff -urNp linux-2.6.32.49/net/core/dev.c linux-2.6.32.49/net/core/dev.c
{
struct list_head *list = &__get_cpu_var(softnet_data).poll_list;
unsigned long time_limit = jiffies + 2;
-diff -urNp linux-2.6.32.49/net/core/flow.c linux-2.6.32.49/net/core/flow.c
---- linux-2.6.32.49/net/core/flow.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/flow.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/core/flow.c b/net/core/flow.c
+index 9601587..8c4824e 100644
+--- a/net/core/flow.c
++++ b/net/core/flow.c
@@ -35,11 +35,11 @@ struct flow_cache_entry {
atomic_t *object_ref;
};
@@ -77358,7 +79572,7 @@ diff -urNp linux-2.6.32.49/net/core/flow.c linux-2.6.32.49/net/core/flow.c
#define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
-@@ -190,7 +190,7 @@ void *flow_cache_lookup(struct net *net,
+@@ -190,7 +190,7 @@ void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
if (fle->family == family &&
fle->dir == dir &&
flow_key_compare(key, &fle->key) == 0) {
@@ -77376,7 +79590,7 @@ diff -urNp linux-2.6.32.49/net/core/flow.c linux-2.6.32.49/net/core/flow.c
if (fle->object)
atomic_dec(fle->object_ref);
-@@ -258,7 +258,7 @@ static void flow_cache_flush_tasklet(uns
+@@ -258,7 +258,7 @@ static void flow_cache_flush_tasklet(unsigned long data)
fle = flow_table(cpu)[i];
for (; fle; fle = fle->next) {
@@ -77385,9 +79599,10 @@ diff -urNp linux-2.6.32.49/net/core/flow.c linux-2.6.32.49/net/core/flow.c
if (!fle->object || fle->genid == genid)
continue;
-diff -urNp linux-2.6.32.49/net/core/rtnetlink.c linux-2.6.32.49/net/core/rtnetlink.c
---- linux-2.6.32.49/net/core/rtnetlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/rtnetlink.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
+index d4fd895..ac9b1e6 100644
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
@@ -57,7 +57,7 @@ struct rtnl_link
{
rtnl_doit_func doit;
@@ -77397,9 +79612,10 @@ diff -urNp linux-2.6.32.49/net/core/rtnetlink.c linux-2.6.32.49/net/core/rtnetli
static DEFINE_MUTEX(rtnl_mutex);
-diff -urNp linux-2.6.32.49/net/core/scm.c linux-2.6.32.49/net/core/scm.c
---- linux-2.6.32.49/net/core/scm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/scm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/core/scm.c b/net/core/scm.c
+index d98eafc..1a190a9 100644
+--- a/net/core/scm.c
++++ b/net/core/scm.c
@@ -191,7 +191,7 @@ error:
int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{
@@ -77409,7 +79625,7 @@ diff -urNp linux-2.6.32.49/net/core/scm.c linux-2.6.32.49/net/core/scm.c
struct cmsghdr cmhdr;
int cmlen = CMSG_LEN(len);
int err;
-@@ -214,7 +214,7 @@ int put_cmsg(struct msghdr * msg, int le
+@@ -214,7 +214,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
err = -EFAULT;
if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
goto out;
@@ -77427,7 +79643,7 @@ diff -urNp linux-2.6.32.49/net/core/scm.c linux-2.6.32.49/net/core/scm.c
int fdmax = 0;
int fdnum = scm->fp->count;
-@@ -249,7 +249,7 @@ void scm_detach_fds(struct msghdr *msg,
+@@ -249,7 +249,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
if (fdnum < fdmax)
fdmax = fdnum;
@@ -77436,10 +79652,11 @@ diff -urNp linux-2.6.32.49/net/core/scm.c linux-2.6.32.49/net/core/scm.c
i++, cmfptr++)
{
int new_fd;
-diff -urNp linux-2.6.32.49/net/core/secure_seq.c linux-2.6.32.49/net/core/secure_seq.c
---- linux-2.6.32.49/net/core/secure_seq.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/secure_seq.c 2011-11-15 19:59:43.000000000 -0500
-@@ -57,7 +57,7 @@ __u32 secure_tcpv6_sequence_number(__be3
+diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
+index 45329d7..626aaa6 100644
+--- a/net/core/secure_seq.c
++++ b/net/core/secure_seq.c
+@@ -57,7 +57,7 @@ __u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr,
EXPORT_SYMBOL(secure_tcpv6_sequence_number);
u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
@@ -77448,7 +79665,7 @@ diff -urNp linux-2.6.32.49/net/core/secure_seq.c linux-2.6.32.49/net/core/secure
{
u32 secret[MD5_MESSAGE_BYTES / 4];
u32 hash[MD5_DIGEST_WORDS];
-@@ -71,7 +71,6 @@ u32 secure_ipv6_port_ephemeral(const __b
+@@ -71,7 +71,6 @@ u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
secret[i] = net_secret[i];
md5_transform(hash, secret);
@@ -77456,10 +79673,11 @@ diff -urNp linux-2.6.32.49/net/core/secure_seq.c linux-2.6.32.49/net/core/secure
return hash[0];
}
#endif
-diff -urNp linux-2.6.32.49/net/core/skbuff.c linux-2.6.32.49/net/core/skbuff.c
---- linux-2.6.32.49/net/core/skbuff.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/skbuff.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1544,6 +1544,8 @@ int skb_splice_bits(struct sk_buff *skb,
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c
+index a807f8c..65f906f 100644
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -1544,6 +1544,8 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset,
struct sk_buff *frag_iter;
struct sock *sk = skb->sk;
@@ -77468,10 +79686,11 @@ diff -urNp linux-2.6.32.49/net/core/skbuff.c linux-2.6.32.49/net/core/skbuff.c
/*
* __skb_splice_bits() only fails if the output has no room left,
* so no point in going over the frag_list for the error case.
-diff -urNp linux-2.6.32.49/net/core/sock.c linux-2.6.32.49/net/core/sock.c
---- linux-2.6.32.49/net/core/sock.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/core/sock.c 2011-11-15 19:59:43.000000000 -0500
-@@ -864,11 +864,15 @@ int sock_getsockopt(struct socket *sock,
+diff --git a/net/core/sock.c b/net/core/sock.c
+index 6605e75..3acebda 100644
+--- a/net/core/sock.c
++++ b/net/core/sock.c
+@@ -864,11 +864,15 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
break;
case SO_PEERCRED:
@@ -77488,7 +79707,7 @@ diff -urNp linux-2.6.32.49/net/core/sock.c linux-2.6.32.49/net/core/sock.c
case SO_PEERNAME:
{
-@@ -1892,7 +1896,7 @@ void sock_init_data(struct socket *sock,
+@@ -1892,7 +1896,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
*/
smp_wmb();
atomic_set(&sk->sk_refcnt, 1);
@@ -77497,10 +79716,11 @@ diff -urNp linux-2.6.32.49/net/core/sock.c linux-2.6.32.49/net/core/sock.c
}
EXPORT_SYMBOL(sock_init_data);
-diff -urNp linux-2.6.32.49/net/decnet/sysctl_net_decnet.c linux-2.6.32.49/net/decnet/sysctl_net_decnet.c
---- linux-2.6.32.49/net/decnet/sysctl_net_decnet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/decnet/sysctl_net_decnet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -206,7 +206,7 @@ static int dn_node_address_handler(ctl_t
+diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
+index 2036568..c55883d 100644
+--- a/net/decnet/sysctl_net_decnet.c
++++ b/net/decnet/sysctl_net_decnet.c
+@@ -206,7 +206,7 @@ static int dn_node_address_handler(ctl_table *table, int write,
if (len > *lenp) len = *lenp;
@@ -77509,7 +79729,7 @@ diff -urNp linux-2.6.32.49/net/decnet/sysctl_net_decnet.c linux-2.6.32.49/net/de
return -EFAULT;
*lenp = len;
-@@ -327,7 +327,7 @@ static int dn_def_dev_handler(ctl_table
+@@ -327,7 +327,7 @@ static int dn_def_dev_handler(ctl_table *table, int write,
if (len > *lenp) len = *lenp;
@@ -77518,9 +79738,10 @@ diff -urNp linux-2.6.32.49/net/decnet/sysctl_net_decnet.c linux-2.6.32.49/net/de
return -EFAULT;
*lenp = len;
-diff -urNp linux-2.6.32.49/net/econet/Kconfig linux-2.6.32.49/net/econet/Kconfig
---- linux-2.6.32.49/net/econet/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/econet/Kconfig 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/econet/Kconfig b/net/econet/Kconfig
+index 39a2d29..f39c0fe 100644
+--- a/net/econet/Kconfig
++++ b/net/econet/Kconfig
@@ -4,7 +4,7 @@
config ECONET
@@ -77530,9 +79751,10 @@ diff -urNp linux-2.6.32.49/net/econet/Kconfig linux-2.6.32.49/net/econet/Kconfig
---help---
Econet is a fairly old and slow networking protocol mainly used by
Acorn computers to access file and print servers. It uses native
-diff -urNp linux-2.6.32.49/net/ieee802154/dgram.c linux-2.6.32.49/net/ieee802154/dgram.c
---- linux-2.6.32.49/net/ieee802154/dgram.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ieee802154/dgram.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
+index a413b1b..380849c 100644
+--- a/net/ieee802154/dgram.c
++++ b/net/ieee802154/dgram.c
@@ -318,7 +318,7 @@ out:
static int dgram_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
@@ -77542,9 +79764,10 @@ diff -urNp linux-2.6.32.49/net/ieee802154/dgram.c linux-2.6.32.49/net/ieee802154
kfree_skb(skb);
return NET_RX_DROP;
}
-diff -urNp linux-2.6.32.49/net/ieee802154/raw.c linux-2.6.32.49/net/ieee802154/raw.c
---- linux-2.6.32.49/net/ieee802154/raw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ieee802154/raw.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c
+index 30e74ee..bfc6ee0 100644
+--- a/net/ieee802154/raw.c
++++ b/net/ieee802154/raw.c
@@ -206,7 +206,7 @@ out:
static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
@@ -77554,10 +79777,11 @@ diff -urNp linux-2.6.32.49/net/ieee802154/raw.c linux-2.6.32.49/net/ieee802154/r
kfree_skb(skb);
return NET_RX_DROP;
}
-diff -urNp linux-2.6.32.49/net/ipv4/inet_diag.c linux-2.6.32.49/net/ipv4/inet_diag.c
---- linux-2.6.32.49/net/ipv4/inet_diag.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/inet_diag.c 2011-11-15 19:59:43.000000000 -0500
-@@ -113,8 +113,13 @@ static int inet_csk_diag_fill(struct soc
+diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
+index dba56d2..acee5d6 100644
+--- a/net/ipv4/inet_diag.c
++++ b/net/ipv4/inet_diag.c
+@@ -113,8 +113,13 @@ static int inet_csk_diag_fill(struct sock *sk,
r->idiag_retrans = 0;
r->id.idiag_if = sk->sk_bound_dev_if;
@@ -77571,7 +79795,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/inet_diag.c linux-2.6.32.49/net/ipv4/inet_di
r->id.idiag_sport = inet->sport;
r->id.idiag_dport = inet->dport;
-@@ -200,8 +205,15 @@ static int inet_twsk_diag_fill(struct in
+@@ -200,8 +205,15 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw,
r->idiag_family = tw->tw_family;
r->idiag_retrans = 0;
r->id.idiag_if = tw->tw_bound_dev_if;
@@ -77587,7 +79811,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/inet_diag.c linux-2.6.32.49/net/ipv4/inet_di
r->id.idiag_sport = tw->tw_sport;
r->id.idiag_dport = tw->tw_dport;
r->id.idiag_src[0] = tw->tw_rcv_saddr;
-@@ -284,12 +296,14 @@ static int inet_diag_get_exact(struct sk
+@@ -284,12 +296,14 @@ static int inet_diag_get_exact(struct sk_buff *in_skb,
if (sk == NULL)
goto unlock;
@@ -77602,7 +79826,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/inet_diag.c linux-2.6.32.49/net/ipv4/inet_di
err = -ENOMEM;
rep = alloc_skb(NLMSG_SPACE((sizeof(struct inet_diag_msg) +
-@@ -579,8 +593,14 @@ static int inet_diag_fill_req(struct sk_
+@@ -579,8 +593,14 @@ static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
r->idiag_retrans = req->retrans;
r->id.idiag_if = sk->sk_bound_dev_if;
@@ -77617,9 +79841,10 @@ diff -urNp linux-2.6.32.49/net/ipv4/inet_diag.c linux-2.6.32.49/net/ipv4/inet_di
tmo = req->expires - jiffies;
if (tmo < 0)
-diff -urNp linux-2.6.32.49/net/ipv4/inet_hashtables.c linux-2.6.32.49/net/ipv4/inet_hashtables.c
---- linux-2.6.32.49/net/ipv4/inet_hashtables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/inet_hashtables.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
+index d717267..56de7e7 100644
+--- a/net/ipv4/inet_hashtables.c
++++ b/net/ipv4/inet_hashtables.c
@@ -18,12 +18,15 @@
#include <linux/sched.h>
#include <linux/slab.h>
@@ -77645,10 +79870,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/inet_hashtables.c linux-2.6.32.49/net/ipv4/i
if (tw) {
inet_twsk_deschedule(tw, death_row);
inet_twsk_put(tw);
-diff -urNp linux-2.6.32.49/net/ipv4/inetpeer.c linux-2.6.32.49/net/ipv4/inetpeer.c
---- linux-2.6.32.49/net/ipv4/inetpeer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/inetpeer.c 2011-11-15 19:59:43.000000000 -0500
-@@ -367,6 +367,8 @@ struct inet_peer *inet_getpeer(__be32 da
+diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
+index 13b229f..6956484 100644
+--- a/net/ipv4/inetpeer.c
++++ b/net/ipv4/inetpeer.c
+@@ -367,6 +367,8 @@ struct inet_peer *inet_getpeer(__be32 daddr, int create)
struct inet_peer *p, *n;
struct inet_peer **stack[PEER_MAXDEPTH], ***stackptr;
@@ -77657,7 +79883,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/inetpeer.c linux-2.6.32.49/net/ipv4/inetpeer
/* Look up for the address quickly. */
read_lock_bh(&peer_pool_lock);
p = lookup(daddr, NULL);
-@@ -390,7 +392,7 @@ struct inet_peer *inet_getpeer(__be32 da
+@@ -390,7 +392,7 @@ struct inet_peer *inet_getpeer(__be32 daddr, int create)
return NULL;
n->v4daddr = daddr;
atomic_set(&n->refcnt, 1);
@@ -77666,40 +79892,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/inetpeer.c linux-2.6.32.49/net/ipv4/inetpeer
n->ip_id_count = secure_ip_id(daddr);
n->tcp_ts_stamp = 0;
-diff -urNp linux-2.6.32.49/net/ipv4/ipconfig.c linux-2.6.32.49/net/ipv4/ipconfig.c
---- linux-2.6.32.49/net/ipv4/ipconfig.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/ipconfig.c 2011-11-15 19:59:43.000000000 -0500
-@@ -295,7 +295,7 @@ static int __init ic_devinet_ioctl(unsig
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = devinet_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
-+ res = devinet_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-@@ -306,7 +306,7 @@ static int __init ic_dev_ioctl(unsigned
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = dev_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
-+ res = dev_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-@@ -317,7 +317,7 @@ static int __init ic_route_ioctl(unsigne
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = ip_rt_ioctl(&init_net, cmd, (void __user *) arg);
-+ res = ip_rt_ioctl(&init_net, cmd, (void __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-diff -urNp linux-2.6.32.49/net/ipv4/ip_fragment.c linux-2.6.32.49/net/ipv4/ip_fragment.c
---- linux-2.6.32.49/net/ipv4/ip_fragment.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/ip_fragment.c 2011-11-15 19:59:43.000000000 -0500
-@@ -255,7 +255,7 @@ static inline int ip_frag_too_far(struct
+diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
+index d3fe10b..feeafc9 100644
+--- a/net/ipv4/ip_fragment.c
++++ b/net/ipv4/ip_fragment.c
+@@ -255,7 +255,7 @@ static inline int ip_frag_too_far(struct ipq *qp)
return 0;
start = qp->rid;
@@ -77708,10 +79905,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/ip_fragment.c linux-2.6.32.49/net/ipv4/ip_fr
qp->rid = end;
rc = qp->q.fragments && (end - start) > max;
-diff -urNp linux-2.6.32.49/net/ipv4/ip_sockglue.c linux-2.6.32.49/net/ipv4/ip_sockglue.c
---- linux-2.6.32.49/net/ipv4/ip_sockglue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/ip_sockglue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1015,6 +1015,8 @@ static int do_ip_getsockopt(struct sock
+diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
+index e982b5c..f079d75 100644
+--- a/net/ipv4/ip_sockglue.c
++++ b/net/ipv4/ip_sockglue.c
+@@ -1015,6 +1015,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
int val;
int len;
@@ -77720,7 +79918,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/ip_sockglue.c linux-2.6.32.49/net/ipv4/ip_so
if (level != SOL_IP)
return -EOPNOTSUPP;
-@@ -1173,7 +1175,7 @@ static int do_ip_getsockopt(struct sock
+@@ -1173,7 +1175,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
@@ -77729,10 +79927,42 @@ diff -urNp linux-2.6.32.49/net/ipv4/ip_sockglue.c linux-2.6.32.49/net/ipv4/ip_so
msg.msg_controllen = len;
msg.msg_flags = 0;
-diff -urNp linux-2.6.32.49/net/ipv4/netfilter/arp_tables.c linux-2.6.32.49/net/ipv4/netfilter/arp_tables.c
---- linux-2.6.32.49/net/ipv4/netfilter/arp_tables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/netfilter/arp_tables.c 2011-11-15 19:59:43.000000000 -0500
-@@ -934,6 +934,7 @@ static int get_info(struct net *net, voi
+diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
+index f8d04c2..c1188f2 100644
+--- a/net/ipv4/ipconfig.c
++++ b/net/ipv4/ipconfig.c
+@@ -295,7 +295,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = devinet_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
++ res = devinet_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+@@ -306,7 +306,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = dev_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
++ res = dev_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+@@ -317,7 +317,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = ip_rt_ioctl(&init_net, cmd, (void __user *) arg);
++ res = ip_rt_ioctl(&init_net, cmd, (void __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
+index c8b0cc3..4da5ae2 100644
+--- a/net/ipv4/netfilter/arp_tables.c
++++ b/net/ipv4/netfilter/arp_tables.c
+@@ -934,6 +934,7 @@ static int get_info(struct net *net, void __user *user, int *len, int compat)
private = &tmp;
}
#endif
@@ -77740,10 +79970,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/netfilter/arp_tables.c linux-2.6.32.49/net/i
info.valid_hooks = t->valid_hooks;
memcpy(info.hook_entry, private->hook_entry,
sizeof(info.hook_entry));
-diff -urNp linux-2.6.32.49/net/ipv4/netfilter/ip_queue.c linux-2.6.32.49/net/ipv4/netfilter/ip_queue.c
---- linux-2.6.32.49/net/ipv4/netfilter/ip_queue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/netfilter/ip_queue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -286,6 +286,9 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, st
+diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
+index c156db2..e772975 100644
+--- a/net/ipv4/netfilter/ip_queue.c
++++ b/net/ipv4/netfilter/ip_queue.c
+@@ -286,6 +286,9 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct nf_queue_entry *e)
if (v->data_len < sizeof(*user_iph))
return 0;
@@ -77763,10 +79994,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/netfilter/ip_queue.c linux-2.6.32.49/net/ipv
struct nlmsghdr *nlh;
skblen = skb->len;
-diff -urNp linux-2.6.32.49/net/ipv4/netfilter/ip_tables.c linux-2.6.32.49/net/ipv4/netfilter/ip_tables.c
---- linux-2.6.32.49/net/ipv4/netfilter/ip_tables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/netfilter/ip_tables.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1141,6 +1141,7 @@ static int get_info(struct net *net, voi
+diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
+index 0606db1..02e7e4c 100644
+--- a/net/ipv4/netfilter/ip_tables.c
++++ b/net/ipv4/netfilter/ip_tables.c
+@@ -1141,6 +1141,7 @@ static int get_info(struct net *net, void __user *user, int *len, int compat)
private = &tmp;
}
#endif
@@ -77774,10 +80006,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/netfilter/ip_tables.c linux-2.6.32.49/net/ip
info.valid_hooks = t->valid_hooks;
memcpy(info.hook_entry, private->hook_entry,
sizeof(info.hook_entry));
-diff -urNp linux-2.6.32.49/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.32.49/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-2.6.32.49/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-11-15 19:59:43.000000000 -0500
-@@ -397,7 +397,7 @@ static unsigned char asn1_octets_decode(
+diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
+index d9521f6..3c3eb25 100644
+--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
++++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
+@@ -397,7 +397,7 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
*len = 0;
@@ -77786,10 +80019,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.32.4
if (*octets == NULL) {
if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__);
-diff -urNp linux-2.6.32.49/net/ipv4/raw.c linux-2.6.32.49/net/ipv4/raw.c
---- linux-2.6.32.49/net/ipv4/raw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/raw.c 2011-11-15 19:59:43.000000000 -0500
-@@ -292,7 +292,7 @@ static int raw_rcv_skb(struct sock * sk,
+diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
+index ab996f9..3da5f96 100644
+--- a/net/ipv4/raw.c
++++ b/net/ipv4/raw.c
+@@ -292,7 +292,7 @@ static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb)
/* Charge it to the socket. */
if (sock_queue_rcv_skb(sk, skb) < 0) {
@@ -77798,7 +80032,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/raw.c linux-2.6.32.49/net/ipv4/raw.c
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -303,7 +303,7 @@ static int raw_rcv_skb(struct sock * sk,
+@@ -303,7 +303,7 @@ static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb)
int raw_rcv(struct sock *sk, struct sk_buff *skb)
{
if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -77832,7 +80066,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/raw.c linux-2.6.32.49/net/ipv4/raw.c
if (get_user(len, optlen))
goto out;
-@@ -743,8 +750,9 @@ static int raw_geticmpfilter(struct sock
+@@ -743,8 +750,9 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o
if (len > sizeof(struct icmp_filter))
len = sizeof(struct icmp_filter);
ret = -EFAULT;
@@ -77844,7 +80078,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/raw.c linux-2.6.32.49/net/ipv4/raw.c
goto out;
ret = 0;
out: return ret;
-@@ -954,7 +962,13 @@ static void raw_sock_seq_show(struct seq
+@@ -954,7 +962,13 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
sk_wmem_alloc_get(sp),
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
@@ -77859,10 +80093,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/raw.c linux-2.6.32.49/net/ipv4/raw.c
}
static int raw_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.32.49/net/ipv4/route.c linux-2.6.32.49/net/ipv4/route.c
---- linux-2.6.32.49/net/ipv4/route.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/route.c 2011-11-15 19:59:43.000000000 -0500
-@@ -269,7 +269,7 @@ static inline unsigned int rt_hash(__be3
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 58f141b..b759702 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -269,7 +269,7 @@ static inline unsigned int rt_hash(__be32 daddr, __be32 saddr, int idx,
static inline int rt_genid(struct net *net)
{
@@ -77871,7 +80106,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/route.c linux-2.6.32.49/net/ipv4/route.c
}
#ifdef CONFIG_PROC_FS
-@@ -889,7 +889,7 @@ static void rt_cache_invalidate(struct n
+@@ -889,7 +889,7 @@ static void rt_cache_invalidate(struct net *net)
unsigned char shuffle;
get_random_bytes(&shuffle, sizeof(shuffle));
@@ -77880,7 +80115,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/route.c linux-2.6.32.49/net/ipv4/route.c
}
/*
-@@ -3357,7 +3357,7 @@ static __net_initdata struct pernet_oper
+@@ -3357,7 +3357,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = {
static __net_init int rt_secret_timer_init(struct net *net)
{
@@ -77889,10 +80124,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/route.c linux-2.6.32.49/net/ipv4/route.c
(int) ((num_physpages ^ (num_physpages>>8)) ^
(jiffies ^ (jiffies >> 7))));
-diff -urNp linux-2.6.32.49/net/ipv4/tcp.c linux-2.6.32.49/net/ipv4/tcp.c
---- linux-2.6.32.49/net/ipv4/tcp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2085,6 +2085,8 @@ static int do_tcp_setsockopt(struct sock
+diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
+index f095659..adc892a 100644
+--- a/net/ipv4/tcp.c
++++ b/net/ipv4/tcp.c
+@@ -2085,6 +2085,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
int val;
int err = 0;
@@ -77901,7 +80137,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp.c linux-2.6.32.49/net/ipv4/tcp.c
/* This is a string value all the others are int's */
if (optname == TCP_CONGESTION) {
char name[TCP_CA_NAME_MAX];
-@@ -2355,6 +2357,8 @@ static int do_tcp_getsockopt(struct sock
+@@ -2355,6 +2357,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
struct tcp_sock *tp = tcp_sk(sk);
int val, len;
@@ -77910,9 +80146,10 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp.c linux-2.6.32.49/net/ipv4/tcp.c
if (get_user(len, optlen))
return -EFAULT;
-diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4.c
---- linux-2.6.32.49/net/ipv4/tcp_ipv4.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp_ipv4.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
+index 6fc7961..33bad4a 100644
+--- a/net/ipv4/tcp_ipv4.c
++++ b/net/ipv4/tcp_ipv4.c
@@ -85,6 +85,9 @@
int sysctl_tcp_tw_reuse __read_mostly;
int sysctl_tcp_low_latency __read_mostly;
@@ -77923,7 +80160,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4
#ifdef CONFIG_TCP_MD5SIG
static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
-@@ -1543,6 +1546,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
+@@ -1543,6 +1546,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -77967,7 +80204,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4
tcp_v4_send_reset(NULL, skb);
}
-@@ -2238,7 +2256,11 @@ static void get_openreq4(struct sock *sk
+@@ -2238,7 +2256,11 @@ static void get_openreq4(struct sock *sk, struct request_sock *req,
0, /* non standard timer */
0, /* open_requests have no inode */
atomic_read(&sk->sk_refcnt),
@@ -77979,7 +80216,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4
len);
}
-@@ -2280,7 +2302,12 @@ static void get_tcp4_sock(struct sock *s
+@@ -2280,7 +2302,12 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
sock_i_uid(sk),
icsk->icsk_probes_out,
sock_i_ino(sk),
@@ -77993,7 +80230,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
-@@ -2308,7 +2335,13 @@ static void get_timewait4_sock(struct in
+@@ -2308,7 +2335,13 @@ static void get_timewait4_sock(struct inet_timewait_sock *tw,
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p%n",
i, src, srcp, dest, destp, tw->tw_substate, 0, 0,
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
@@ -78008,9 +80245,10 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_ipv4.c linux-2.6.32.49/net/ipv4/tcp_ipv4
}
#define TMPSZ 150
-diff -urNp linux-2.6.32.49/net/ipv4/tcp_minisocks.c linux-2.6.32.49/net/ipv4/tcp_minisocks.c
---- linux-2.6.32.49/net/ipv4/tcp_minisocks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp_minisocks.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
+index 4c03598..e09a8e8 100644
+--- a/net/ipv4/tcp_minisocks.c
++++ b/net/ipv4/tcp_minisocks.c
@@ -26,6 +26,10 @@
#include <net/inet_common.h>
#include <net/xfrm.h>
@@ -78033,10 +80271,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_minisocks.c linux-2.6.32.49/net/ipv4/tcp
if (!(flg & TCP_FLAG_RST))
req->rsk_ops->send_reset(sk, skb);
-diff -urNp linux-2.6.32.49/net/ipv4/tcp_output.c linux-2.6.32.49/net/ipv4/tcp_output.c
---- linux-2.6.32.49/net/ipv4/tcp_output.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp_output.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2234,6 +2234,8 @@ struct sk_buff *tcp_make_synack(struct s
+diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
+index af83bdf..ec91cb2 100644
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -2234,6 +2234,8 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
__u8 *md5_hash_location;
int mss;
@@ -78045,10 +80284,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_output.c linux-2.6.32.49/net/ipv4/tcp_ou
skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15, 1, GFP_ATOMIC);
if (skb == NULL)
return NULL;
-diff -urNp linux-2.6.32.49/net/ipv4/tcp_probe.c linux-2.6.32.49/net/ipv4/tcp_probe.c
---- linux-2.6.32.49/net/ipv4/tcp_probe.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp_probe.c 2011-11-15 19:59:43.000000000 -0500
-@@ -200,7 +200,7 @@ static ssize_t tcpprobe_read(struct file
+diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
+index 59f5b5e..193860f 100644
+--- a/net/ipv4/tcp_probe.c
++++ b/net/ipv4/tcp_probe.c
+@@ -200,7 +200,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,
if (cnt + width >= len)
break;
@@ -78057,9 +80297,10 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_probe.c linux-2.6.32.49/net/ipv4/tcp_pro
return -EFAULT;
cnt += width;
}
-diff -urNp linux-2.6.32.49/net/ipv4/tcp_timer.c linux-2.6.32.49/net/ipv4/tcp_timer.c
---- linux-2.6.32.49/net/ipv4/tcp_timer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/tcp_timer.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
+index 57d5501..a9ed13a 100644
+--- a/net/ipv4/tcp_timer.c
++++ b/net/ipv4/tcp_timer.c
@@ -21,6 +21,10 @@
#include <linux/module.h>
#include <net/tcp.h>
@@ -78071,7 +80312,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_timer.c linux-2.6.32.49/net/ipv4/tcp_tim
int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
-@@ -164,6 +168,13 @@ static int tcp_write_timeout(struct sock
+@@ -164,6 +168,13 @@ static int tcp_write_timeout(struct sock *sk)
}
}
@@ -78085,9 +80326,10 @@ diff -urNp linux-2.6.32.49/net/ipv4/tcp_timer.c linux-2.6.32.49/net/ipv4/tcp_tim
if (retransmits_timed_out(sk, retry_until)) {
/* Has it gone just too far? */
tcp_write_err(sk);
-diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
---- linux-2.6.32.49/net/ipv4/udp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv4/udp.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
+index 0ac8833..58d8c43 100644
+--- a/net/ipv4/udp.c
++++ b/net/ipv4/udp.c
@@ -86,6 +86,7 @@
#include <linux/types.h>
#include <linux/fcntl.h>
@@ -78117,7 +80359,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
/*
* This routine is called by the ICMP module when it gets some
* sort of error condition. If err < 0 then the socket should
-@@ -639,9 +647,18 @@ int udp_sendmsg(struct kiocb *iocb, stru
+@@ -639,9 +647,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
dport = usin->sin_port;
if (dport == 0)
return -EINVAL;
@@ -78147,7 +80389,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
ulen = skb->len - sizeof(struct udphdr);
copied = len;
if (copied > ulen)
-@@ -1068,7 +1089,7 @@ static int __udp_queue_rcv_skb(struct so
+@@ -1068,7 +1089,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
if (rc == -ENOMEM) {
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
is_udplite);
@@ -78156,7 +80398,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
}
goto drop;
}
-@@ -1338,6 +1359,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1338,6 +1359,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
goto csum_error;
UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -78166,7 +80408,7 @@ diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
/*
-@@ -1758,8 +1782,13 @@ static void udp4_format_sock(struct sock
+@@ -1758,8 +1782,13 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
sk_wmem_alloc_get(sp),
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
@@ -78182,10 +80424,11 @@ diff -urNp linux-2.6.32.49/net/ipv4/udp.c linux-2.6.32.49/net/ipv4/udp.c
}
int udp4_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.32.49/net/ipv6/addrconf.c linux-2.6.32.49/net/ipv6/addrconf.c
---- linux-2.6.32.49/net/ipv6/addrconf.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/addrconf.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2053,7 +2053,7 @@ int addrconf_set_dstaddr(struct net *net
+diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
+index 8ac3d09..fc58c5f 100644
+--- a/net/ipv6/addrconf.c
++++ b/net/ipv6/addrconf.c
+@@ -2053,7 +2053,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
p.iph.ihl = 5;
p.iph.protocol = IPPROTO_IPV6;
p.iph.ttl = 64;
@@ -78194,10 +80437,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/addrconf.c linux-2.6.32.49/net/ipv6/addrconf
if (ops->ndo_do_ioctl) {
mm_segment_t oldfs = get_fs();
-diff -urNp linux-2.6.32.49/net/ipv6/inet6_connection_sock.c linux-2.6.32.49/net/ipv6/inet6_connection_sock.c
---- linux-2.6.32.49/net/ipv6/inet6_connection_sock.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/inet6_connection_sock.c 2011-11-15 19:59:43.000000000 -0500
-@@ -152,7 +152,7 @@ void __inet6_csk_dst_store(struct sock *
+diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
+index cc4797d..7cfdfcc 100644
+--- a/net/ipv6/inet6_connection_sock.c
++++ b/net/ipv6/inet6_connection_sock.c
+@@ -152,7 +152,7 @@ void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst,
#ifdef CONFIG_XFRM
{
struct rt6_info *rt = (struct rt6_info *)dst;
@@ -78206,7 +80450,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/inet6_connection_sock.c linux-2.6.32.49/net/
}
#endif
}
-@@ -167,7 +167,7 @@ struct dst_entry *__inet6_csk_dst_check(
+@@ -167,7 +167,7 @@ struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie)
#ifdef CONFIG_XFRM
if (dst) {
struct rt6_info *rt = (struct rt6_info *)dst;
@@ -78215,9 +80459,10 @@ diff -urNp linux-2.6.32.49/net/ipv6/inet6_connection_sock.c linux-2.6.32.49/net/
sk->sk_dst_cache = NULL;
dst_release(dst);
dst = NULL;
-diff -urNp linux-2.6.32.49/net/ipv6/inet6_hashtables.c linux-2.6.32.49/net/ipv6/inet6_hashtables.c
---- linux-2.6.32.49/net/ipv6/inet6_hashtables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/inet6_hashtables.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
+index 093e9b2..f72cddb 100644
+--- a/net/ipv6/inet6_hashtables.c
++++ b/net/ipv6/inet6_hashtables.c
@@ -119,7 +119,7 @@ out:
}
EXPORT_SYMBOL(__inet6_lookup_established);
@@ -78227,10 +80472,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/inet6_hashtables.c linux-2.6.32.49/net/ipv6/
const unsigned short hnum,
const struct in6_addr *daddr,
const int dif)
-diff -urNp linux-2.6.32.49/net/ipv6/ipv6_sockglue.c linux-2.6.32.49/net/ipv6/ipv6_sockglue.c
---- linux-2.6.32.49/net/ipv6/ipv6_sockglue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/ipv6_sockglue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -130,6 +130,8 @@ static int do_ipv6_setsockopt(struct soc
+diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
+index 4f7aaf6..f7acf45 100644
+--- a/net/ipv6/ipv6_sockglue.c
++++ b/net/ipv6/ipv6_sockglue.c
+@@ -130,6 +130,8 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
int val, valbool;
int retv = -ENOPROTOOPT;
@@ -78239,7 +80485,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/ipv6_sockglue.c linux-2.6.32.49/net/ipv6/ipv
if (optval == NULL)
val=0;
else {
-@@ -881,6 +883,8 @@ static int do_ipv6_getsockopt(struct soc
+@@ -881,6 +883,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
int len;
int val;
@@ -78248,7 +80494,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/ipv6_sockglue.c linux-2.6.32.49/net/ipv6/ipv
if (ip6_mroute_opt(optname))
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
-@@ -922,7 +926,7 @@ static int do_ipv6_getsockopt(struct soc
+@@ -922,7 +926,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
@@ -78257,10 +80503,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/ipv6_sockglue.c linux-2.6.32.49/net/ipv6/ipv
msg.msg_controllen = len;
msg.msg_flags = 0;
-diff -urNp linux-2.6.32.49/net/ipv6/netfilter/ip6_queue.c linux-2.6.32.49/net/ipv6/netfilter/ip6_queue.c
---- linux-2.6.32.49/net/ipv6/netfilter/ip6_queue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/netfilter/ip6_queue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -287,6 +287,9 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, st
+diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
+index 1cf3f0c..1d4376f 100644
+--- a/net/ipv6/netfilter/ip6_queue.c
++++ b/net/ipv6/netfilter/ip6_queue.c
+@@ -287,6 +287,9 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct nf_queue_entry *e)
if (v->data_len < sizeof(*user_iph))
return 0;
@@ -78280,10 +80527,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/netfilter/ip6_queue.c linux-2.6.32.49/net/ip
struct nlmsghdr *nlh;
skblen = skb->len;
-diff -urNp linux-2.6.32.49/net/ipv6/netfilter/ip6_tables.c linux-2.6.32.49/net/ipv6/netfilter/ip6_tables.c
---- linux-2.6.32.49/net/ipv6/netfilter/ip6_tables.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/netfilter/ip6_tables.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1173,6 +1173,7 @@ static int get_info(struct net *net, voi
+diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
+index 78b5a36..7f37433 100644
+--- a/net/ipv6/netfilter/ip6_tables.c
++++ b/net/ipv6/netfilter/ip6_tables.c
+@@ -1173,6 +1173,7 @@ static int get_info(struct net *net, void __user *user, int *len, int compat)
private = &tmp;
}
#endif
@@ -78291,10 +80539,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/netfilter/ip6_tables.c linux-2.6.32.49/net/i
info.valid_hooks = t->valid_hooks;
memcpy(info.hook_entry, private->hook_entry,
sizeof(info.hook_entry));
-diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
---- linux-2.6.32.49/net/ipv6/raw.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/raw.c 2011-11-15 19:59:43.000000000 -0500
-@@ -375,14 +375,14 @@ static inline int rawv6_rcv_skb(struct s
+diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
+index 4f24570..b813b34 100644
+--- a/net/ipv6/raw.c
++++ b/net/ipv6/raw.c
+@@ -375,14 +375,14 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
{
if ((raw6_sk(sk)->checksum || sk->sk_filter) &&
skb_checksum_complete(skb)) {
@@ -78311,7 +80560,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -403,7 +403,7 @@ int rawv6_rcv(struct sock *sk, struct sk
+@@ -403,7 +403,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
struct raw6_sock *rp = raw6_sk(sk);
if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -78320,7 +80569,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -427,7 +427,7 @@ int rawv6_rcv(struct sock *sk, struct sk
+@@ -427,7 +427,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
if (inet->hdrincl) {
if (skb_checksum_complete(skb)) {
@@ -78347,7 +80596,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
struct flowi *fl, struct rt6_info *rt,
unsigned int flags)
{
-@@ -738,6 +738,8 @@ static int rawv6_sendmsg(struct kiocb *i
+@@ -738,6 +738,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
u16 proto;
int err;
@@ -78375,7 +80624,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
return 0;
default:
return -ENOPROTOOPT;
-@@ -934,6 +941,7 @@ static int rawv6_geticmpfilter(struct so
+@@ -934,6 +941,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
int len;
@@ -78383,7 +80632,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
switch (optname) {
case ICMPV6_FILTER:
-@@ -945,7 +953,8 @@ static int rawv6_geticmpfilter(struct so
+@@ -945,7 +953,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
len = sizeof(struct icmp6_filter);
if (put_user(len, optlen))
return -EFAULT;
@@ -78393,7 +80642,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
return -EFAULT;
return 0;
default:
-@@ -1241,7 +1250,13 @@ static void raw6_sock_seq_show(struct se
+@@ -1241,7 +1250,13 @@ static void raw6_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
@@ -78408,10 +80657,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/raw.c linux-2.6.32.49/net/ipv6/raw.c
}
static int raw6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6.c
---- linux-2.6.32.49/net/ipv6/tcp_ipv6.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/tcp_ipv6.c 2011-11-15 19:59:43.000000000 -0500
-@@ -89,6 +89,10 @@ static struct tcp_md5sig_key *tcp_v6_md5
+diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
+index faae6df..d4430c1 100644
+--- a/net/ipv6/tcp_ipv6.c
++++ b/net/ipv6/tcp_ipv6.c
+@@ -89,6 +89,10 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
}
#endif
@@ -78422,7 +80672,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
static void tcp_v6_hash(struct sock *sk)
{
if (sk->sk_state != TCP_CLOSE) {
-@@ -1579,6 +1583,9 @@ static int tcp_v6_do_rcv(struct sock *sk
+@@ -1579,6 +1583,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -78432,7 +80682,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
tcp_v6_send_reset(sk, skb);
discard:
if (opt_skb)
-@@ -1656,12 +1663,20 @@ static int tcp_v6_rcv(struct sk_buff *sk
+@@ -1656,12 +1663,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
TCP_SKB_CB(skb)->sacked = 0;
sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -78466,7 +80716,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
tcp_v6_send_reset(NULL, skb);
}
-@@ -1916,7 +1935,13 @@ static void get_openreq6(struct seq_file
+@@ -1916,7 +1935,13 @@ static void get_openreq6(struct seq_file *seq,
uid,
0, /* non standard timer */
0, /* open_requests have no inode */
@@ -78481,7 +80731,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
}
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
-@@ -1966,7 +1991,12 @@ static void get_tcp6_sock(struct seq_fil
+@@ -1966,7 +1991,12 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
sock_i_uid(sp),
icsk->icsk_probes_out,
sock_i_ino(sp),
@@ -78495,7 +80745,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
-@@ -2001,7 +2031,13 @@ static void get_timewait6_sock(struct se
+@@ -2001,7 +2031,13 @@ static void get_timewait6_sock(struct seq_file *seq,
dest->s6_addr32[2], dest->s6_addr32[3], destp,
tw->tw_substate, 0, 0,
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
@@ -78510,9 +80760,10 @@ diff -urNp linux-2.6.32.49/net/ipv6/tcp_ipv6.c linux-2.6.32.49/net/ipv6/tcp_ipv6
}
static int tcp6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.32.49/net/ipv6/udp.c linux-2.6.32.49/net/ipv6/udp.c
---- linux-2.6.32.49/net/ipv6/udp.c 2011-11-26 19:44:53.000000000 -0500
-+++ linux-2.6.32.49/net/ipv6/udp.c 2011-11-26 19:45:13.000000000 -0500
+diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
+index 9cc6289..052c521 100644
+--- a/net/ipv6/udp.c
++++ b/net/ipv6/udp.c
@@ -49,6 +49,10 @@
#include <linux/seq_file.h>
#include "udp_impl.h"
@@ -78524,7 +80775,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/udp.c linux-2.6.32.49/net/ipv6/udp.c
int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
{
const struct in6_addr *sk_rcv_saddr6 = &inet6_sk(sk)->rcv_saddr;
-@@ -391,7 +395,7 @@ int udpv6_queue_rcv_skb(struct sock * sk
+@@ -391,7 +395,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
if (rc == -ENOMEM) {
UDP6_INC_STATS_BH(sock_net(sk),
UDP_MIB_RCVBUFERRORS, is_udplite);
@@ -78533,7 +80784,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/udp.c linux-2.6.32.49/net/ipv6/udp.c
}
goto drop;
}
-@@ -590,6 +594,9 @@ int __udp6_lib_rcv(struct sk_buff *skb,
+@@ -590,6 +594,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
proto == IPPROTO_UDPLITE);
@@ -78543,7 +80794,7 @@ diff -urNp linux-2.6.32.49/net/ipv6/udp.c linux-2.6.32.49/net/ipv6/udp.c
icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev);
kfree_skb(skb);
-@@ -1209,8 +1216,13 @@ static void udp6_sock_seq_show(struct se
+@@ -1209,8 +1216,13 @@ static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
@@ -78559,10 +80810,11 @@ diff -urNp linux-2.6.32.49/net/ipv6/udp.c linux-2.6.32.49/net/ipv6/udp.c
}
int udp6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c
---- linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c 2011-11-15 19:59:43.000000000 -0500
-@@ -280,16 +280,16 @@ static int ircomm_tty_block_til_ready(st
+diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
+index 811984d..11f59b7 100644
+--- a/net/irda/ircomm/ircomm_tty.c
++++ b/net/irda/ircomm/ircomm_tty.c
+@@ -280,16 +280,16 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
add_wait_queue(&self->open_wait, &wait);
IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
@@ -78582,7 +80834,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
while (1) {
if (tty->termios->c_cflag & CBAUD) {
-@@ -329,7 +329,7 @@ static int ircomm_tty_block_til_ready(st
+@@ -329,7 +329,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
}
IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
@@ -78591,7 +80843,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
schedule();
}
-@@ -340,13 +340,13 @@ static int ircomm_tty_block_til_ready(st
+@@ -340,13 +340,13 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
if (extra_count) {
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&self->spinlock, flags);
@@ -78608,7 +80860,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
if (!retval)
self->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -415,14 +415,14 @@ static int ircomm_tty_open(struct tty_st
+@@ -415,14 +415,14 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
}
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&self->spinlock, flags);
@@ -78625,7 +80877,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
/* Not really used by us, but lets do it anyway */
self->tty->low_latency = (self->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-@@ -511,7 +511,7 @@ static void ircomm_tty_close(struct tty_
+@@ -511,7 +511,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
return;
}
@@ -78634,7 +80886,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
/*
* Uh, oh. tty->count is 1, which means that the tty
* structure will be freed. state->count should always
-@@ -521,16 +521,16 @@ static void ircomm_tty_close(struct tty_
+@@ -521,16 +521,16 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
*/
IRDA_DEBUG(0, "%s(), bad serial port count; "
"tty->count is 1, state->count is %d\n", __func__ ,
@@ -78657,7 +80909,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
-@@ -562,7 +562,7 @@ static void ircomm_tty_close(struct tty_
+@@ -562,7 +562,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
tty->closing = 0;
self->tty = NULL;
@@ -78666,7 +80918,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
if (self->close_delay)
schedule_timeout_interruptible(self->close_delay);
wake_up_interruptible(&self->open_wait);
-@@ -1017,7 +1017,7 @@ static void ircomm_tty_hangup(struct tty
+@@ -1017,7 +1017,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
spin_lock_irqsave(&self->spinlock, flags);
self->flags &= ~ASYNC_NORMAL_ACTIVE;
self->tty = NULL;
@@ -78675,7 +80927,7 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
spin_unlock_irqrestore(&self->spinlock, flags);
wake_up_interruptible(&self->open_wait);
-@@ -1369,7 +1369,7 @@ static void ircomm_tty_line_info(struct
+@@ -1369,7 +1369,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
seq_putc(m, '\n');
seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
@@ -78684,10 +80936,11 @@ diff -urNp linux-2.6.32.49/net/irda/ircomm/ircomm_tty.c linux-2.6.32.49/net/irda
seq_printf(m, "Max data size: %d\n", self->max_data_size);
seq_printf(m, "Max header size: %d\n", self->max_header_size);
-diff -urNp linux-2.6.32.49/net/iucv/af_iucv.c linux-2.6.32.49/net/iucv/af_iucv.c
---- linux-2.6.32.49/net/iucv/af_iucv.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/iucv/af_iucv.c 2011-11-15 19:59:43.000000000 -0500
-@@ -651,10 +651,10 @@ static int iucv_sock_autobind(struct soc
+diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
+index bada1b9..f325943 100644
+--- a/net/iucv/af_iucv.c
++++ b/net/iucv/af_iucv.c
+@@ -651,10 +651,10 @@ static int iucv_sock_autobind(struct sock *sk)
write_lock_bh(&iucv_sk_list.lock);
@@ -78700,10 +80953,11 @@ diff -urNp linux-2.6.32.49/net/iucv/af_iucv.c linux-2.6.32.49/net/iucv/af_iucv.c
}
write_unlock_bh(&iucv_sk_list.lock);
-diff -urNp linux-2.6.32.49/net/key/af_key.c linux-2.6.32.49/net/key/af_key.c
---- linux-2.6.32.49/net/key/af_key.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/key/af_key.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2489,6 +2489,8 @@ static int pfkey_migrate(struct sock *sk
+diff --git a/net/key/af_key.c b/net/key/af_key.c
+index 4e98193..439b449 100644
+--- a/net/key/af_key.c
++++ b/net/key/af_key.c
+@@ -2489,6 +2489,8 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff *skb,
struct xfrm_migrate m[XFRM_MAX_DEPTH];
struct xfrm_kmaddress k;
@@ -78712,7 +80966,7 @@ diff -urNp linux-2.6.32.49/net/key/af_key.c linux-2.6.32.49/net/key/af_key.c
if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC - 1],
ext_hdrs[SADB_EXT_ADDRESS_DST - 1]) ||
!ext_hdrs[SADB_X_EXT_POLICY - 1]) {
-@@ -3660,7 +3662,11 @@ static int pfkey_seq_show(struct seq_fil
+@@ -3660,7 +3662,11 @@ static int pfkey_seq_show(struct seq_file *f, void *v)
seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n");
else
seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n",
@@ -78724,10 +80978,11 @@ diff -urNp linux-2.6.32.49/net/key/af_key.c linux-2.6.32.49/net/key/af_key.c
atomic_read(&s->sk_refcnt),
sk_rmem_alloc_get(s),
sk_wmem_alloc_get(s),
-diff -urNp linux-2.6.32.49/net/lapb/lapb_iface.c linux-2.6.32.49/net/lapb/lapb_iface.c
---- linux-2.6.32.49/net/lapb/lapb_iface.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/lapb/lapb_iface.c 2011-11-15 19:59:43.000000000 -0500
-@@ -157,7 +157,7 @@ int lapb_register(struct net_device *dev
+diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
+index bda96d1..c038b72 100644
+--- a/net/lapb/lapb_iface.c
++++ b/net/lapb/lapb_iface.c
+@@ -157,7 +157,7 @@ int lapb_register(struct net_device *dev, struct lapb_register_struct *callbacks
goto out;
lapb->dev = dev;
@@ -78736,7 +80991,7 @@ diff -urNp linux-2.6.32.49/net/lapb/lapb_iface.c linux-2.6.32.49/net/lapb/lapb_i
__lapb_insert_cb(lapb);
-@@ -379,32 +379,32 @@ int lapb_data_received(struct net_device
+@@ -379,32 +379,32 @@ int lapb_data_received(struct net_device *dev, struct sk_buff *skb)
void lapb_connect_confirmation(struct lapb_cb *lapb, int reason)
{
@@ -78779,7 +81034,7 @@ diff -urNp linux-2.6.32.49/net/lapb/lapb_iface.c linux-2.6.32.49/net/lapb/lapb_i
kfree_skb(skb);
return NET_RX_SUCCESS; /* For now; must be != NET_RX_DROP */
-@@ -414,8 +414,8 @@ int lapb_data_transmit(struct lapb_cb *l
+@@ -414,8 +414,8 @@ int lapb_data_transmit(struct lapb_cb *lapb, struct sk_buff *skb)
{
int used = 0;
@@ -78790,10 +81045,11 @@ diff -urNp linux-2.6.32.49/net/lapb/lapb_iface.c linux-2.6.32.49/net/lapb/lapb_i
used = 1;
}
-diff -urNp linux-2.6.32.49/net/mac80211/cfg.c linux-2.6.32.49/net/mac80211/cfg.c
---- linux-2.6.32.49/net/mac80211/cfg.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/cfg.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1369,7 +1369,7 @@ static int ieee80211_set_bitrate_mask(st
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
+index fe2d3f8..e57f683 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -1369,7 +1369,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
return err;
}
@@ -78802,9 +81058,10 @@ diff -urNp linux-2.6.32.49/net/mac80211/cfg.c linux-2.6.32.49/net/mac80211/cfg.c
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
.change_virtual_intf = ieee80211_change_iface,
-diff -urNp linux-2.6.32.49/net/mac80211/cfg.h linux-2.6.32.49/net/mac80211/cfg.h
---- linux-2.6.32.49/net/mac80211/cfg.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/cfg.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/mac80211/cfg.h b/net/mac80211/cfg.h
+index 7d7879f..2d51f62 100644
+--- a/net/mac80211/cfg.h
++++ b/net/mac80211/cfg.h
@@ -4,6 +4,6 @@
#ifndef __CFG_H
#define __CFG_H
@@ -78813,10 +81070,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/cfg.h linux-2.6.32.49/net/mac80211/cfg.h
+extern const struct cfg80211_ops mac80211_config_ops;
#endif /* __CFG_H */
-diff -urNp linux-2.6.32.49/net/mac80211/debugfs_key.c linux-2.6.32.49/net/mac80211/debugfs_key.c
---- linux-2.6.32.49/net/mac80211/debugfs_key.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/debugfs_key.c 2011-11-15 19:59:43.000000000 -0500
-@@ -211,9 +211,13 @@ static ssize_t key_key_read(struct file
+diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
+index 99c7525..9cb4937 100644
+--- a/net/mac80211/debugfs_key.c
++++ b/net/mac80211/debugfs_key.c
+@@ -211,9 +211,13 @@ static ssize_t key_key_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
struct ieee80211_key *key = file->private_data;
@@ -78831,10 +81089,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/debugfs_key.c linux-2.6.32.49/net/mac802
for (i = 0; i < key->conf.keylen; i++)
p += scnprintf(p, bufsize + buf - p, "%02x", key->conf.key[i]);
-diff -urNp linux-2.6.32.49/net/mac80211/debugfs_sta.c linux-2.6.32.49/net/mac80211/debugfs_sta.c
---- linux-2.6.32.49/net/mac80211/debugfs_sta.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/debugfs_sta.c 2011-11-15 19:59:43.000000000 -0500
-@@ -124,6 +124,8 @@ static ssize_t sta_agg_status_read(struc
+diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
+index 33a2e89..08650c8 100644
+--- a/net/mac80211/debugfs_sta.c
++++ b/net/mac80211/debugfs_sta.c
+@@ -124,6 +124,8 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
int i;
struct sta_info *sta = file->private_data;
@@ -78843,9 +81102,10 @@ diff -urNp linux-2.6.32.49/net/mac80211/debugfs_sta.c linux-2.6.32.49/net/mac802
spin_lock_bh(&sta->lock);
p += scnprintf(p, sizeof(buf)+buf-p, "next dialog_token is %#02x\n",
sta->ampdu_mlme.dialog_token_allocator + 1);
-diff -urNp linux-2.6.32.49/net/mac80211/ieee80211_i.h linux-2.6.32.49/net/mac80211/ieee80211_i.h
---- linux-2.6.32.49/net/mac80211/ieee80211_i.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/ieee80211_i.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
+index ca62bfe..6657a03 100644
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
@@ -25,6 +25,7 @@
#include <linux/etherdevice.h>
#include <net/cfg80211.h>
@@ -78863,10 +81123,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/ieee80211_i.h linux-2.6.32.49/net/mac802
int monitors, cooked_mntrs;
/* number of interfaces with corresponding FIF_ flags */
int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll;
-diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/iface.c
---- linux-2.6.32.49/net/mac80211/iface.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/iface.c 2011-11-15 19:59:43.000000000 -0500
-@@ -166,7 +166,7 @@ static int ieee80211_open(struct net_dev
+diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
+index 079c500..eb3c6d4 100644
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -166,7 +166,7 @@ static int ieee80211_open(struct net_device *dev)
break;
}
@@ -78875,7 +81136,7 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
res = drv_start(local);
if (res)
goto err_del_bss;
-@@ -196,7 +196,7 @@ static int ieee80211_open(struct net_dev
+@@ -196,7 +196,7 @@ static int ieee80211_open(struct net_device *dev)
* Validate the MAC address for this device.
*/
if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -78884,7 +81145,7 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
drv_stop(local);
return -EADDRNOTAVAIL;
}
-@@ -292,7 +292,7 @@ static int ieee80211_open(struct net_dev
+@@ -292,7 +292,7 @@ static int ieee80211_open(struct net_device *dev)
hw_reconf_flags |= __ieee80211_recalc_idle(local);
@@ -78893,7 +81154,7 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
if (hw_reconf_flags) {
ieee80211_hw_config(local, hw_reconf_flags);
/*
-@@ -320,7 +320,7 @@ static int ieee80211_open(struct net_dev
+@@ -320,7 +320,7 @@ static int ieee80211_open(struct net_device *dev)
err_del_interface:
drv_remove_interface(local, &conf);
err_stop:
@@ -78902,7 +81163,7 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
drv_stop(local);
err_del_bss:
sdata->bss = NULL;
-@@ -420,7 +420,7 @@ static int ieee80211_stop(struct net_dev
+@@ -420,7 +420,7 @@ static int ieee80211_stop(struct net_device *dev)
WARN_ON(!list_empty(&sdata->u.ap.vlans));
}
@@ -78911,7 +81172,7 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
-@@ -526,7 +526,7 @@ static int ieee80211_stop(struct net_dev
+@@ -526,7 +526,7 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_recalc_ps(local, -1);
@@ -78920,10 +81181,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/iface.c linux-2.6.32.49/net/mac80211/ifa
ieee80211_clear_tx_pending(local);
ieee80211_stop_device(local);
-diff -urNp linux-2.6.32.49/net/mac80211/main.c linux-2.6.32.49/net/mac80211/main.c
---- linux-2.6.32.49/net/mac80211/main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -145,7 +145,7 @@ int ieee80211_hw_config(struct ieee80211
+diff --git a/net/mac80211/main.c b/net/mac80211/main.c
+index 2dfe176..74e4388 100644
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -145,7 +145,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
local->hw.conf.power_level = power;
}
@@ -78932,10 +81194,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/main.c linux-2.6.32.49/net/mac80211/main
ret = drv_config(local, changed);
/*
* Goal:
-diff -urNp linux-2.6.32.49/net/mac80211/mlme.c linux-2.6.32.49/net/mac80211/mlme.c
---- linux-2.6.32.49/net/mac80211/mlme.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/mlme.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1438,6 +1438,8 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index e67eea7..fcc227e 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1438,6 +1438,8 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
bool have_higher_than_11mbit = false, newsta = false;
u16 ap_ht_cap_flags;
@@ -78944,10 +81207,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/mlme.c linux-2.6.32.49/net/mac80211/mlme
/*
* AssocResp and ReassocResp have identical structure, so process both
* of them in this function.
-diff -urNp linux-2.6.32.49/net/mac80211/pm.c linux-2.6.32.49/net/mac80211/pm.c
---- linux-2.6.32.49/net/mac80211/pm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/pm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -107,7 +107,7 @@ int __ieee80211_suspend(struct ieee80211
+diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
+index e535f1c..4d733d1 100644
+--- a/net/mac80211/pm.c
++++ b/net/mac80211/pm.c
+@@ -107,7 +107,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
}
/* stop hardware - this must stop RX */
@@ -78956,10 +81220,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/pm.c linux-2.6.32.49/net/mac80211/pm.c
ieee80211_stop_device(local);
local->suspended = true;
-diff -urNp linux-2.6.32.49/net/mac80211/rate.c linux-2.6.32.49/net/mac80211/rate.c
---- linux-2.6.32.49/net/mac80211/rate.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/rate.c 2011-11-15 19:59:43.000000000 -0500
-@@ -287,7 +287,7 @@ int ieee80211_init_rate_ctrl_alg(struct
+diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
+index b33efc4..0a2efb6 100644
+--- a/net/mac80211/rate.c
++++ b/net/mac80211/rate.c
+@@ -287,7 +287,7 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
struct rate_control_ref *ref, *old;
ASSERT_RTNL();
@@ -78968,10 +81233,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/rate.c linux-2.6.32.49/net/mac80211/rate
return -EBUSY;
ref = rate_control_alloc(name, local);
-diff -urNp linux-2.6.32.49/net/mac80211/tx.c linux-2.6.32.49/net/mac80211/tx.c
---- linux-2.6.32.49/net/mac80211/tx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/tx.c 2011-11-15 19:59:43.000000000 -0500
-@@ -173,7 +173,7 @@ static __le16 ieee80211_duration(struct
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
+index b1d7904..57e4da7 100644
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -173,7 +173,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, int group_addr,
return cpu_to_le16(dur);
}
@@ -78980,10 +81246,11 @@ diff -urNp linux-2.6.32.49/net/mac80211/tx.c linux-2.6.32.49/net/mac80211/tx.c
struct net_device *dev)
{
return local == wdev_priv(dev->ieee80211_ptr);
-diff -urNp linux-2.6.32.49/net/mac80211/util.c linux-2.6.32.49/net/mac80211/util.c
---- linux-2.6.32.49/net/mac80211/util.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/mac80211/util.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1042,7 +1042,7 @@ int ieee80211_reconfig(struct ieee80211_
+diff --git a/net/mac80211/util.c b/net/mac80211/util.c
+index 31b1085..48fb26d 100644
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -1042,7 +1042,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
local->resuming = true;
/* restart hardware */
@@ -78992,10 +81259,44 @@ diff -urNp linux-2.6.32.49/net/mac80211/util.c linux-2.6.32.49/net/mac80211/util
/*
* Upon resume hardware can sometimes be goofy due to
* various platform / driver / bus issues, so restarting
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_app.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_app.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_app.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_app.c 2011-11-15 19:59:43.000000000 -0500
-@@ -564,7 +564,7 @@ static const struct file_operations ip_v
+diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
+index 634d14a..b35a608 100644
+--- a/net/netfilter/Kconfig
++++ b/net/netfilter/Kconfig
+@@ -635,6 +635,16 @@ config NETFILTER_XT_MATCH_ESP
+
+ To compile it as a module, choose M here. If unsure, say N.
+
++config NETFILTER_XT_MATCH_GRADM
++ tristate '"gradm" match support'
++ depends on NETFILTER_XTABLES && NETFILTER_ADVANCED
++ depends on GRKERNSEC && !GRKERNSEC_NO_RBAC
++ ---help---
++ The gradm match allows to match on grsecurity RBAC being enabled.
++ It is useful when iptables rules are applied early on bootup to
++ prevent connections to the machine (except from a trusted host)
++ while the RBAC system is disabled.
++
+ config NETFILTER_XT_MATCH_HASHLIMIT
+ tristate '"hashlimit" match support'
+ depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
+diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
+index 49f62ee..a17b2c6 100644
+--- a/net/netfilter/Makefile
++++ b/net/netfilter/Makefile
+@@ -68,6 +68,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += xt_conntrack.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
++obj-$(CONFIG_NETFILTER_XT_MATCH_GRADM) += xt_gradm.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
+diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
+index 3c7e427..724043c 100644
+--- a/net/netfilter/ipvs/ip_vs_app.c
++++ b/net/netfilter/ipvs/ip_vs_app.c
+@@ -564,7 +564,7 @@ static const struct file_operations ip_vs_app_fops = {
.open = ip_vs_app_open,
.read = seq_read,
.llseek = seq_lseek,
@@ -79004,10 +81305,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_app.c linux-2.6.32.49/net/ne
};
#endif
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c 2011-11-15 19:59:43.000000000 -0500
-@@ -453,10 +453,10 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, s
+diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
+index 95682e5..457dbac 100644
+--- a/net/netfilter/ipvs/ip_vs_conn.c
++++ b/net/netfilter/ipvs/ip_vs_conn.c
+@@ -453,10 +453,10 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
/* if the connection is not template and is created
* by sync, preserve the activity flag.
*/
@@ -79020,7 +81322,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/n
cp->dest = dest;
IP_VS_DBG_BUF(7, "Bind-dest %s c:%s:%d v:%s:%d "
-@@ -723,7 +723,7 @@ ip_vs_conn_new(int af, int proto, const
+@@ -723,7 +723,7 @@ ip_vs_conn_new(int af, int proto, const union nf_inet_addr *caddr, __be16 cport,
atomic_set(&cp->refcnt, 1);
atomic_set(&cp->n_control, 0);
@@ -79029,7 +81331,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/n
atomic_inc(&ip_vs_conn_count);
if (flags & IP_VS_CONN_F_NO_CPORT)
-@@ -871,7 +871,7 @@ static const struct file_operations ip_v
+@@ -871,7 +871,7 @@ static const struct file_operations ip_vs_conn_fops = {
.open = ip_vs_conn_open,
.read = seq_read,
.llseek = seq_lseek,
@@ -79038,7 +81340,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/n
};
static const char *ip_vs_origin_name(unsigned flags)
-@@ -934,7 +934,7 @@ static const struct file_operations ip_v
+@@ -934,7 +934,7 @@ static const struct file_operations ip_vs_conn_sync_fops = {
.open = ip_vs_conn_sync_open,
.read = seq_read,
.llseek = seq_lseek,
@@ -79047,7 +81349,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/n
};
#endif
-@@ -961,7 +961,7 @@ static inline int todrop_entry(struct ip
+@@ -961,7 +961,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
/* Don't drop the entry if its number of incoming packets is not
located in [0, 8] */
@@ -79056,10 +81358,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_conn.c linux-2.6.32.49/net/n
if (i > 8 || i < 0) return 0;
if (!todrop_rate[i]) return 0;
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -485,7 +485,7 @@ int ip_vs_leave(struct ip_vs_service *sv
+diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
+index b95699f..5fee919 100644
+--- a/net/netfilter/ipvs/ip_vs_core.c
++++ b/net/netfilter/ipvs/ip_vs_core.c
+@@ -485,7 +485,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
ret = cp->packet_xmit(skb, cp, pp);
/* do not touch skb anymore */
@@ -79068,7 +81371,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c linux-2.6.32.49/net/n
ip_vs_conn_put(cp);
return ret;
}
-@@ -1357,7 +1357,7 @@ ip_vs_in(unsigned int hooknum, struct sk
+@@ -1357,7 +1357,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb,
* Sync connection if it is about to close to
* encorage the standby servers to update the connections timeout
*/
@@ -79077,10 +81380,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_core.c linux-2.6.32.49/net/n
if (af == AF_INET &&
(ip_vs_sync_state & IP_VS_STATE_MASTER) &&
(((cp->protocol != IPPROTO_TCP ||
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c 2011-11-15 19:59:43.000000000 -0500
-@@ -792,7 +792,7 @@ __ip_vs_update_dest(struct ip_vs_service
+diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
+index 02b2610..2d89424 100644
+--- a/net/netfilter/ipvs/ip_vs_ctl.c
++++ b/net/netfilter/ipvs/ip_vs_ctl.c
+@@ -792,7 +792,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc,
ip_vs_rs_hash(dest);
write_unlock_bh(&__ip_vs_rs_lock);
}
@@ -79089,7 +81393,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
/* bind the service */
if (!dest->svc) {
-@@ -1888,7 +1888,7 @@ static int ip_vs_info_seq_show(struct se
+@@ -1888,7 +1888,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
" %-7s %-6d %-10d %-10d\n",
&dest->addr.in6,
ntohs(dest->port),
@@ -79098,7 +81402,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
atomic_read(&dest->weight),
atomic_read(&dest->activeconns),
atomic_read(&dest->inactconns));
-@@ -1899,7 +1899,7 @@ static int ip_vs_info_seq_show(struct se
+@@ -1899,7 +1899,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
"%-7s %-6d %-10d %-10d\n",
ntohl(dest->addr.ip),
ntohs(dest->port),
@@ -79107,7 +81411,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
atomic_read(&dest->weight),
atomic_read(&dest->activeconns),
atomic_read(&dest->inactconns));
-@@ -1927,7 +1927,7 @@ static const struct file_operations ip_v
+@@ -1927,7 +1927,7 @@ static const struct file_operations ip_vs_info_fops = {
.open = ip_vs_info_open,
.read = seq_read,
.llseek = seq_lseek,
@@ -79116,7 +81420,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
};
#endif
-@@ -1976,7 +1976,7 @@ static const struct file_operations ip_v
+@@ -1976,7 +1976,7 @@ static const struct file_operations ip_vs_stats_fops = {
.open = ip_vs_stats_seq_open,
.read = seq_read,
.llseek = seq_lseek,
@@ -79125,7 +81429,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
};
#endif
-@@ -2292,7 +2292,7 @@ __ip_vs_get_dest_entries(const struct ip
+@@ -2292,7 +2292,7 @@ __ip_vs_get_dest_entries(const struct ip_vs_get_dests *get,
entry.addr = dest->addr.ip;
entry.port = dest->port;
@@ -79134,7 +81438,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
entry.weight = atomic_read(&dest->weight);
entry.u_threshold = dest->u_threshold;
entry.l_threshold = dest->l_threshold;
-@@ -2353,6 +2353,8 @@ do_ip_vs_get_ctl(struct sock *sk, int cm
+@@ -2353,6 +2353,8 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
unsigned char arg[128];
int ret = 0;
@@ -79143,7 +81447,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
if (!capable(CAP_NET_ADMIN))
return -EPERM;
-@@ -2802,7 +2804,7 @@ static int ip_vs_genl_fill_dest(struct s
+@@ -2802,7 +2804,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
NLA_PUT_U16(skb, IPVS_DEST_ATTR_PORT, dest->port);
NLA_PUT_U32(skb, IPVS_DEST_ATTR_FWD_METHOD,
@@ -79152,10 +81456,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_ctl.c linux-2.6.32.49/net/ne
NLA_PUT_U32(skb, IPVS_DEST_ATTR_WEIGHT, atomic_read(&dest->weight));
NLA_PUT_U32(skb, IPVS_DEST_ATTR_U_THRESH, dest->u_threshold);
NLA_PUT_U32(skb, IPVS_DEST_ATTR_L_THRESH, dest->l_threshold);
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_sync.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_sync.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_sync.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_sync.c 2011-11-15 19:59:43.000000000 -0500
-@@ -438,7 +438,7 @@ static void ip_vs_process_message(const
+diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
+index e177f0d..55e8581 100644
+--- a/net/netfilter/ipvs/ip_vs_sync.c
++++ b/net/netfilter/ipvs/ip_vs_sync.c
+@@ -438,7 +438,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
if (opt)
memcpy(&cp->in_seq, opt, sizeof(*opt));
@@ -79164,10 +81469,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_sync.c linux-2.6.32.49/net/n
cp->state = state;
cp->old_state = cp->state;
/*
-diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c
---- linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c 2011-11-15 19:59:43.000000000 -0500
-@@ -875,7 +875,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, str
+diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
+index 30b3189..e2e4b55 100644
+--- a/net/netfilter/ipvs/ip_vs_xmit.c
++++ b/net/netfilter/ipvs/ip_vs_xmit.c
+@@ -875,7 +875,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
else
rc = NF_ACCEPT;
/* do not touch skb anymore */
@@ -79176,7 +81482,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c linux-2.6.32.49/net/n
goto out;
}
-@@ -949,7 +949,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb,
+@@ -949,7 +949,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
else
rc = NF_ACCEPT;
/* do not touch skb anymore */
@@ -79185,41 +81491,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/ipvs/ip_vs_xmit.c linux-2.6.32.49/net/n
goto out;
}
-diff -urNp linux-2.6.32.49/net/netfilter/Kconfig linux-2.6.32.49/net/netfilter/Kconfig
---- linux-2.6.32.49/net/netfilter/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -635,6 +635,16 @@ config NETFILTER_XT_MATCH_ESP
-
- To compile it as a module, choose M here. If unsure, say N.
-
-+config NETFILTER_XT_MATCH_GRADM
-+ tristate '"gradm" match support'
-+ depends on NETFILTER_XTABLES && NETFILTER_ADVANCED
-+ depends on GRKERNSEC && !GRKERNSEC_NO_RBAC
-+ ---help---
-+ The gradm match allows to match on grsecurity RBAC being enabled.
-+ It is useful when iptables rules are applied early on bootup to
-+ prevent connections to the machine (except from a trusted host)
-+ while the RBAC system is disabled.
-+
- config NETFILTER_XT_MATCH_HASHLIMIT
- tristate '"hashlimit" match support'
- depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
-diff -urNp linux-2.6.32.49/net/netfilter/Makefile linux-2.6.32.49/net/netfilter/Makefile
---- linux-2.6.32.49/net/netfilter/Makefile 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/Makefile 2011-11-15 19:59:43.000000000 -0500
-@@ -68,6 +68,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRAC
- obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
-+obj-$(CONFIG_NETFILTER_XT_MATCH_GRADM) += xt_gradm.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
-diff -urNp linux-2.6.32.49/net/netfilter/nf_conntrack_netlink.c linux-2.6.32.49/net/netfilter/nf_conntrack_netlink.c
---- linux-2.6.32.49/net/netfilter/nf_conntrack_netlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/nf_conntrack_netlink.c 2011-11-15 19:59:43.000000000 -0500
-@@ -706,7 +706,7 @@ ctnetlink_parse_tuple_proto(struct nlatt
+diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
+index d521718..d0fd7a1 100644
+--- a/net/netfilter/nf_conntrack_netlink.c
++++ b/net/netfilter/nf_conntrack_netlink.c
+@@ -706,7 +706,7 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr,
static int
ctnetlink_parse_tuple(const struct nlattr * const cda[],
struct nf_conntrack_tuple *tuple,
@@ -79228,9 +81504,10 @@ diff -urNp linux-2.6.32.49/net/netfilter/nf_conntrack_netlink.c linux-2.6.32.49/
{
struct nlattr *tb[CTA_TUPLE_MAX+1];
int err;
-diff -urNp linux-2.6.32.49/net/netfilter/nfnetlink_log.c linux-2.6.32.49/net/netfilter/nfnetlink_log.c
---- linux-2.6.32.49/net/netfilter/nfnetlink_log.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/nfnetlink_log.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
+index f900dc3..5e45346 100644
+--- a/net/netfilter/nfnetlink_log.c
++++ b/net/netfilter/nfnetlink_log.c
@@ -68,7 +68,7 @@ struct nfulnl_instance {
};
@@ -79240,7 +81517,7 @@ diff -urNp linux-2.6.32.49/net/netfilter/nfnetlink_log.c linux-2.6.32.49/net/net
#define INSTANCE_BUCKETS 16
static struct hlist_head instance_table[INSTANCE_BUCKETS];
-@@ -493,7 +493,7 @@ __build_packet_message(struct nfulnl_ins
+@@ -493,7 +493,7 @@ __build_packet_message(struct nfulnl_instance *inst,
/* global sequence number */
if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL)
NLA_PUT_BE32(inst->skb, NFULA_SEQ_GLOBAL,
@@ -79249,9 +81526,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/nfnetlink_log.c linux-2.6.32.49/net/net
if (data_len) {
struct nlattr *nla;
-diff -urNp linux-2.6.32.49/net/netfilter/xt_gradm.c linux-2.6.32.49/net/netfilter/xt_gradm.c
---- linux-2.6.32.49/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/net/netfilter/xt_gradm.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
+new file mode 100644
+index 0000000..b1bac76
+--- /dev/null
++++ b/net/netfilter/xt_gradm.c
@@ -0,0 +1,51 @@
+/*
+ * gradm match for netfilter
@@ -79304,10 +81583,11 @@ diff -urNp linux-2.6.32.49/net/netfilter/xt_gradm.c linux-2.6.32.49/net/netfilte
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("ipt_gradm");
+MODULE_ALIAS("ip6t_gradm");
-diff -urNp linux-2.6.32.49/net/netlink/af_netlink.c linux-2.6.32.49/net/netlink/af_netlink.c
---- linux-2.6.32.49/net/netlink/af_netlink.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netlink/af_netlink.c 2011-11-15 19:59:43.000000000 -0500
-@@ -733,7 +733,7 @@ static void netlink_overrun(struct sock
+diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
+index 5a7dcdf..24a3578 100644
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -733,7 +733,7 @@ static void netlink_overrun(struct sock *sk)
sk->sk_error_report(sk);
}
}
@@ -79316,7 +81596,7 @@ diff -urNp linux-2.6.32.49/net/netlink/af_netlink.c linux-2.6.32.49/net/netlink/
}
static struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid)
-@@ -1964,15 +1964,23 @@ static int netlink_seq_show(struct seq_f
+@@ -1964,15 +1964,23 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
struct netlink_sock *nlk = nlk_sk(s);
seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d\n",
@@ -79341,10 +81621,11 @@ diff -urNp linux-2.6.32.49/net/netlink/af_netlink.c linux-2.6.32.49/net/netlink/
);
}
-diff -urNp linux-2.6.32.49/net/netrom/af_netrom.c linux-2.6.32.49/net/netrom/af_netrom.c
---- linux-2.6.32.49/net/netrom/af_netrom.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/netrom/af_netrom.c 2011-11-15 19:59:43.000000000 -0500
-@@ -838,6 +838,7 @@ static int nr_getname(struct socket *soc
+diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
+index 7a83495..ab0062f 100644
+--- a/net/netrom/af_netrom.c
++++ b/net/netrom/af_netrom.c
+@@ -838,6 +838,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
struct sock *sk = sock->sk;
struct nr_sock *nr = nr_sk(sk);
@@ -79352,7 +81633,7 @@ diff -urNp linux-2.6.32.49/net/netrom/af_netrom.c linux-2.6.32.49/net/netrom/af_
lock_sock(sk);
if (peer != 0) {
if (sk->sk_state != TCP_ESTABLISHED) {
-@@ -852,7 +853,6 @@ static int nr_getname(struct socket *soc
+@@ -852,7 +853,6 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
*uaddr_len = sizeof(struct full_sockaddr_ax25);
} else {
sax->fsa_ax25.sax25_family = AF_NETROM;
@@ -79360,10 +81641,11 @@ diff -urNp linux-2.6.32.49/net/netrom/af_netrom.c linux-2.6.32.49/net/netrom/af_
sax->fsa_ax25.sax25_call = nr->source_addr;
*uaddr_len = sizeof(struct sockaddr_ax25);
}
-diff -urNp linux-2.6.32.49/net/packet/af_packet.c linux-2.6.32.49/net/packet/af_packet.c
---- linux-2.6.32.49/net/packet/af_packet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/packet/af_packet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2429,7 +2429,11 @@ static int packet_seq_show(struct seq_fi
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index 35cfa79..4e78ff7 100644
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -2429,7 +2429,11 @@ static int packet_seq_show(struct seq_file *seq, void *v)
seq_printf(seq,
"%p %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n",
@@ -79375,10 +81657,11 @@ diff -urNp linux-2.6.32.49/net/packet/af_packet.c linux-2.6.32.49/net/packet/af_
atomic_read(&s->sk_refcnt),
s->sk_type,
ntohs(po->num),
-diff -urNp linux-2.6.32.49/net/phonet/af_phonet.c linux-2.6.32.49/net/phonet/af_phonet.c
---- linux-2.6.32.49/net/phonet/af_phonet.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/phonet/af_phonet.c 2011-11-15 19:59:43.000000000 -0500
-@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_pr
+diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
+index 519ff9d..a422a90 100644
+--- a/net/phonet/af_phonet.c
++++ b/net/phonet/af_phonet.c
+@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_proto_get(int protocol)
{
struct phonet_protocol *pp;
@@ -79387,7 +81670,7 @@ diff -urNp linux-2.6.32.49/net/phonet/af_phonet.c linux-2.6.32.49/net/phonet/af_
return NULL;
spin_lock(&proto_tab_lock);
-@@ -402,7 +402,7 @@ int __init_or_module phonet_proto_regist
+@@ -402,7 +402,7 @@ int __init_or_module phonet_proto_register(int protocol,
{
int err = 0;
@@ -79396,10 +81679,11 @@ diff -urNp linux-2.6.32.49/net/phonet/af_phonet.c linux-2.6.32.49/net/phonet/af_
return -EINVAL;
err = proto_register(pp->prot, 1);
-diff -urNp linux-2.6.32.49/net/phonet/datagram.c linux-2.6.32.49/net/phonet/datagram.c
---- linux-2.6.32.49/net/phonet/datagram.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/phonet/datagram.c 2011-11-15 19:59:43.000000000 -0500
-@@ -162,7 +162,7 @@ static int pn_backlog_rcv(struct sock *s
+diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c
+index ef5c75c..2b6c2fa 100644
+--- a/net/phonet/datagram.c
++++ b/net/phonet/datagram.c
+@@ -162,7 +162,7 @@ static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb)
if (err < 0) {
kfree_skb(skb);
if (err == -ENOMEM)
@@ -79408,10 +81692,11 @@ diff -urNp linux-2.6.32.49/net/phonet/datagram.c linux-2.6.32.49/net/phonet/data
}
return err ? NET_RX_DROP : NET_RX_SUCCESS;
}
-diff -urNp linux-2.6.32.49/net/phonet/pep.c linux-2.6.32.49/net/phonet/pep.c
---- linux-2.6.32.49/net/phonet/pep.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/phonet/pep.c 2011-11-15 19:59:43.000000000 -0500
-@@ -348,7 +348,7 @@ static int pipe_do_rcv(struct sock *sk,
+diff --git a/net/phonet/pep.c b/net/phonet/pep.c
+index 9cdd35e..16cd850 100644
+--- a/net/phonet/pep.c
++++ b/net/phonet/pep.c
+@@ -348,7 +348,7 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
case PNS_PEP_CTRL_REQ:
if (skb_queue_len(&pn->ctrlreq_queue) >= PNPIPE_CTRLREQ_MAX) {
@@ -79420,7 +81705,7 @@ diff -urNp linux-2.6.32.49/net/phonet/pep.c linux-2.6.32.49/net/phonet/pep.c
break;
}
__skb_pull(skb, 4);
-@@ -362,12 +362,12 @@ static int pipe_do_rcv(struct sock *sk,
+@@ -362,12 +362,12 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
if (!err)
return 0;
if (err == -ENOMEM)
@@ -79435,10 +81720,11 @@ diff -urNp linux-2.6.32.49/net/phonet/pep.c linux-2.6.32.49/net/phonet/pep.c
err = -ENOBUFS;
break;
}
-diff -urNp linux-2.6.32.49/net/phonet/socket.c linux-2.6.32.49/net/phonet/socket.c
---- linux-2.6.32.49/net/phonet/socket.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/phonet/socket.c 2011-11-15 19:59:43.000000000 -0500
-@@ -482,8 +482,13 @@ static int pn_sock_seq_show(struct seq_f
+diff --git a/net/phonet/socket.c b/net/phonet/socket.c
+index aa5b5a9..c09b4f8 100644
+--- a/net/phonet/socket.c
++++ b/net/phonet/socket.c
+@@ -482,8 +482,13 @@ static int pn_sock_seq_show(struct seq_file *seq, void *v)
sk->sk_state,
sk_wmem_alloc_get(sk), sk_rmem_alloc_get(sk),
sock_i_uid(sk), sock_i_ino(sk),
@@ -79454,9 +81740,23 @@ diff -urNp linux-2.6.32.49/net/phonet/socket.c linux-2.6.32.49/net/phonet/socket
}
seq_printf(seq, "%*s\n", 127 - len, "");
return 0;
-diff -urNp linux-2.6.32.49/net/rds/cong.c linux-2.6.32.49/net/rds/cong.c
---- linux-2.6.32.49/net/rds/cong.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rds/cong.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/rds/Kconfig b/net/rds/Kconfig
+index ec753b3..821187c 100644
+--- a/net/rds/Kconfig
++++ b/net/rds/Kconfig
+@@ -1,7 +1,7 @@
+
+ config RDS
+ tristate "The RDS Protocol (EXPERIMENTAL)"
+- depends on INET && EXPERIMENTAL
++ depends on INET && EXPERIMENTAL && BROKEN
+ ---help---
+ The RDS (Reliable Datagram Sockets) protocol provides reliable,
+ sequenced delivery of datagrams over Infiniband, iWARP,
+diff --git a/net/rds/cong.c b/net/rds/cong.c
+index dd2711d..1c7ed12 100644
+--- a/net/rds/cong.c
++++ b/net/rds/cong.c
@@ -77,7 +77,7 @@
* finds that the saved generation number is smaller than the global generation
* number, it wakes up the process.
@@ -79466,7 +81766,7 @@ diff -urNp linux-2.6.32.49/net/rds/cong.c linux-2.6.32.49/net/rds/cong.c
/*
* Congestion monitoring
-@@ -232,7 +232,7 @@ void rds_cong_map_updated(struct rds_con
+@@ -232,7 +232,7 @@ void rds_cong_map_updated(struct rds_cong_map *map, uint64_t portmask)
rdsdebug("waking map %p for %pI4\n",
map, &map->m_addr);
rds_stats_inc(s_cong_update_received);
@@ -79484,10 +81784,11 @@ diff -urNp linux-2.6.32.49/net/rds/cong.c linux-2.6.32.49/net/rds/cong.c
if (likely(*recent == gen))
return 0;
-diff -urNp linux-2.6.32.49/net/rds/iw_rdma.c linux-2.6.32.49/net/rds/iw_rdma.c
---- linux-2.6.32.49/net/rds/iw_rdma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rds/iw_rdma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -181,6 +181,8 @@ int rds_iw_update_cm_id(struct rds_iw_de
+diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
+index de4a1b1..94ec861 100644
+--- a/net/rds/iw_rdma.c
++++ b/net/rds/iw_rdma.c
+@@ -181,6 +181,8 @@ int rds_iw_update_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_i
struct rdma_cm_id *pcm_id;
int rc;
@@ -79496,22 +81797,11 @@ diff -urNp linux-2.6.32.49/net/rds/iw_rdma.c linux-2.6.32.49/net/rds/iw_rdma.c
src_addr = (struct sockaddr_in *)&cm_id->route.addr.src_addr;
dst_addr = (struct sockaddr_in *)&cm_id->route.addr.dst_addr;
-diff -urNp linux-2.6.32.49/net/rds/Kconfig linux-2.6.32.49/net/rds/Kconfig
---- linux-2.6.32.49/net/rds/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rds/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -1,7 +1,7 @@
-
- config RDS
- tristate "The RDS Protocol (EXPERIMENTAL)"
-- depends on INET && EXPERIMENTAL
-+ depends on INET && EXPERIMENTAL && BROKEN
- ---help---
- The RDS (Reliable Datagram Sockets) protocol provides reliable,
- sequenced delivery of datagrams over Infiniband, iWARP,
-diff -urNp linux-2.6.32.49/net/rds/tcp.c linux-2.6.32.49/net/rds/tcp.c
---- linux-2.6.32.49/net/rds/tcp.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rds/tcp.c 2011-11-15 19:59:43.000000000 -0500
-@@ -57,7 +57,7 @@ void rds_tcp_nonagle(struct socket *sock
+diff --git a/net/rds/tcp.c b/net/rds/tcp.c
+index b5198ae..8b9fb90 100644
+--- a/net/rds/tcp.c
++++ b/net/rds/tcp.c
+@@ -57,7 +57,7 @@ void rds_tcp_nonagle(struct socket *sock)
int val = 1;
set_fs(KERNEL_DS);
@@ -79520,10 +81810,11 @@ diff -urNp linux-2.6.32.49/net/rds/tcp.c linux-2.6.32.49/net/rds/tcp.c
sizeof(val));
set_fs(oldfs);
}
-diff -urNp linux-2.6.32.49/net/rds/tcp_send.c linux-2.6.32.49/net/rds/tcp_send.c
---- linux-2.6.32.49/net/rds/tcp_send.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rds/tcp_send.c 2011-11-15 19:59:43.000000000 -0500
-@@ -43,7 +43,7 @@ static void rds_tcp_cork(struct socket *
+diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
+index ab545e0..4079b3b 100644
+--- a/net/rds/tcp_send.c
++++ b/net/rds/tcp_send.c
+@@ -43,7 +43,7 @@ static void rds_tcp_cork(struct socket *sock, int val)
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -79532,10 +81823,11 @@ diff -urNp linux-2.6.32.49/net/rds/tcp_send.c linux-2.6.32.49/net/rds/tcp_send.c
sizeof(val));
set_fs(oldfs);
}
-diff -urNp linux-2.6.32.49/net/rxrpc/af_rxrpc.c linux-2.6.32.49/net/rxrpc/af_rxrpc.c
---- linux-2.6.32.49/net/rxrpc/af_rxrpc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/af_rxrpc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -38,7 +38,7 @@ static const struct proto_ops rxrpc_rpc_
+diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
+index a86afce..8657bce 100644
+--- a/net/rxrpc/af_rxrpc.c
++++ b/net/rxrpc/af_rxrpc.c
+@@ -38,7 +38,7 @@ static const struct proto_ops rxrpc_rpc_ops;
__be32 rxrpc_epoch;
/* current debugging ID */
@@ -79544,10 +81836,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/af_rxrpc.c linux-2.6.32.49/net/rxrpc/af_rxr
/* count of skbs currently in use */
atomic_t rxrpc_n_skbs;
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
---- linux-2.6.32.49/net/rxrpc/ar-ack.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-ack.c 2011-11-15 19:59:43.000000000 -0500
-@@ -174,7 +174,7 @@ static void rxrpc_resend(struct rxrpc_ca
+diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
+index b4a2209..539106c 100644
+--- a/net/rxrpc/ar-ack.c
++++ b/net/rxrpc/ar-ack.c
+@@ -174,7 +174,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
_enter("{%d,%d,%d,%d},",
call->acks_hard, call->acks_unacked,
@@ -79556,7 +81849,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
CIRC_CNT(call->acks_head, call->acks_tail, call->acks_winsz));
stop = 0;
-@@ -198,7 +198,7 @@ static void rxrpc_resend(struct rxrpc_ca
+@@ -198,7 +198,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
/* each Tx packet has a new serial number */
sp->hdr.serial =
@@ -79565,7 +81858,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
hdr = (struct rxrpc_header *) txb->head;
hdr->serial = sp->hdr.serial;
-@@ -401,7 +401,7 @@ static void rxrpc_rotate_tx_window(struc
+@@ -401,7 +401,7 @@ static void rxrpc_rotate_tx_window(struct rxrpc_call *call, u32 hard)
*/
static void rxrpc_clear_tx_window(struct rxrpc_call *call)
{
@@ -79583,7 +81876,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
_proto("Rx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }",
latest,
-@@ -840,6 +840,8 @@ void rxrpc_process_call(struct work_stru
+@@ -840,6 +840,8 @@ void rxrpc_process_call(struct work_struct *work)
u32 abort_code = RX_PROTOCOL_ERROR;
u8 *acks = NULL;
@@ -79592,7 +81885,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
//printk("\n--------------------\n");
_enter("{%d,%s,%lx} [%lu]",
call->debug_id, rxrpc_call_states[call->state], call->events,
-@@ -1159,7 +1161,7 @@ void rxrpc_process_call(struct work_stru
+@@ -1159,7 +1161,7 @@ void rxrpc_process_call(struct work_struct *work)
goto maybe_reschedule;
send_ACK_with_skew:
@@ -79619,10 +81912,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-ack.c linux-2.6.32.49/net/rxrpc/ar-ack.c
_proto("Tx %s %%%u", rxrpc_pkts[hdr.type], ntohl(hdr.serial));
send_message_2:
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-call.c linux-2.6.32.49/net/rxrpc/ar-call.c
---- linux-2.6.32.49/net/rxrpc/ar-call.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-call.c 2011-11-15 19:59:43.000000000 -0500
-@@ -82,7 +82,7 @@ static struct rxrpc_call *rxrpc_alloc_ca
+diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c
+index bc0019f..e1b4b24 100644
+--- a/net/rxrpc/ar-call.c
++++ b/net/rxrpc/ar-call.c
+@@ -82,7 +82,7 @@ static struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp)
spin_lock_init(&call->lock);
rwlock_init(&call->state_lock);
atomic_set(&call->usage, 1);
@@ -79631,10 +81925,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-call.c linux-2.6.32.49/net/rxrpc/ar-call
call->state = RXRPC_CALL_CLIENT_SEND_REQUEST;
memset(&call->sock_node, 0xed, sizeof(call->sock_node));
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-connection.c linux-2.6.32.49/net/rxrpc/ar-connection.c
---- linux-2.6.32.49/net/rxrpc/ar-connection.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-connection.c 2011-11-15 19:59:43.000000000 -0500
-@@ -205,7 +205,7 @@ static struct rxrpc_connection *rxrpc_al
+diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
+index 9f1ce84..ff8d061 100644
+--- a/net/rxrpc/ar-connection.c
++++ b/net/rxrpc/ar-connection.c
+@@ -205,7 +205,7 @@ static struct rxrpc_connection *rxrpc_alloc_connection(gfp_t gfp)
rwlock_init(&conn->lock);
spin_lock_init(&conn->state_lock);
atomic_set(&conn->usage, 1);
@@ -79643,10 +81938,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-connection.c linux-2.6.32.49/net/rxrpc/a
conn->avail_calls = RXRPC_MAXCALLS;
conn->size_align = 4;
conn->header_size = sizeof(struct rxrpc_header);
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-connevent.c linux-2.6.32.49/net/rxrpc/ar-connevent.c
---- linux-2.6.32.49/net/rxrpc/ar-connevent.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-connevent.c 2011-11-15 19:59:43.000000000 -0500
-@@ -109,7 +109,7 @@ static int rxrpc_abort_connection(struct
+diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c
+index 0505cdc..f0748ce 100644
+--- a/net/rxrpc/ar-connevent.c
++++ b/net/rxrpc/ar-connevent.c
+@@ -109,7 +109,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn,
len = iov[0].iov_len + iov[1].iov_len;
@@ -79655,10 +81951,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-connevent.c linux-2.6.32.49/net/rxrpc/ar
_proto("Tx CONN ABORT %%%u { %d }", ntohl(hdr.serial), abort_code);
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 2, len);
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-input.c linux-2.6.32.49/net/rxrpc/ar-input.c
---- linux-2.6.32.49/net/rxrpc/ar-input.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-input.c 2011-11-15 19:59:43.000000000 -0500
-@@ -339,9 +339,9 @@ void rxrpc_fast_process_packet(struct rx
+diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c
+index f98c802..9e8488e 100644
+--- a/net/rxrpc/ar-input.c
++++ b/net/rxrpc/ar-input.c
+@@ -339,9 +339,9 @@ void rxrpc_fast_process_packet(struct rxrpc_call *call, struct sk_buff *skb)
/* track the latest serial number on this connection for ACK packet
* information */
serial = ntohl(sp->hdr.serial);
@@ -79670,9 +81967,10 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-input.c linux-2.6.32.49/net/rxrpc/ar-inp
serial);
/* request ACK generation for any ACK or DATA packet that requests
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-internal.h linux-2.6.32.49/net/rxrpc/ar-internal.h
---- linux-2.6.32.49/net/rxrpc/ar-internal.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-internal.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
+index 7043b29..06edcdf 100644
+--- a/net/rxrpc/ar-internal.h
++++ b/net/rxrpc/ar-internal.h
@@ -272,8 +272,8 @@ struct rxrpc_connection {
int error; /* error code for local abort */
int debug_id; /* debug ID for printks */
@@ -79693,7 +81991,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-internal.h linux-2.6.32.49/net/rxrpc/ar-
u32 abort_code; /* local/remote abort code */
enum { /* current state of call */
RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
-@@ -420,7 +420,7 @@ static inline void rxrpc_abort_call(stru
+@@ -420,7 +420,7 @@ static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
*/
extern atomic_t rxrpc_n_skbs;
extern __be32 rxrpc_epoch;
@@ -79702,10 +82000,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-internal.h linux-2.6.32.49/net/rxrpc/ar-
extern struct workqueue_struct *rxrpc_workqueue;
/*
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-key.c linux-2.6.32.49/net/rxrpc/ar-key.c
---- linux-2.6.32.49/net/rxrpc/ar-key.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-key.c 2011-11-15 19:59:43.000000000 -0500
-@@ -88,11 +88,11 @@ static int rxrpc_instantiate_xdr_rxkad(s
+diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c
+index 74697b2..10f9b77 100644
+--- a/net/rxrpc/ar-key.c
++++ b/net/rxrpc/ar-key.c
+@@ -88,11 +88,11 @@ static int rxrpc_instantiate_xdr_rxkad(struct key *key, const __be32 *xdr,
return ret;
plen -= sizeof(*token);
@@ -79719,7 +82018,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-key.c linux-2.6.32.49/net/rxrpc/ar-key.c
if (!token->kad) {
kfree(token);
return -ENOMEM;
-@@ -730,10 +730,10 @@ static int rxrpc_instantiate(struct key
+@@ -730,10 +730,10 @@ static int rxrpc_instantiate(struct key *key, const void *data, size_t datalen)
goto error;
ret = -ENOMEM;
@@ -79732,10 +82031,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-key.c linux-2.6.32.49/net/rxrpc/ar-key.c
if (!token->kad)
goto error_free;
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-local.c linux-2.6.32.49/net/rxrpc/ar-local.c
---- linux-2.6.32.49/net/rxrpc/ar-local.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-local.c 2011-11-15 19:59:43.000000000 -0500
-@@ -44,7 +44,7 @@ struct rxrpc_local *rxrpc_alloc_local(st
+diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/ar-local.c
+index 807535f..5b7f19e 100644
+--- a/net/rxrpc/ar-local.c
++++ b/net/rxrpc/ar-local.c
+@@ -44,7 +44,7 @@ struct rxrpc_local *rxrpc_alloc_local(struct sockaddr_rxrpc *srx)
spin_lock_init(&local->lock);
rwlock_init(&local->services_lock);
atomic_set(&local->usage, 1);
@@ -79744,10 +82044,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-local.c linux-2.6.32.49/net/rxrpc/ar-loc
memcpy(&local->srx, srx, sizeof(*srx));
}
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-output.c linux-2.6.32.49/net/rxrpc/ar-output.c
---- linux-2.6.32.49/net/rxrpc/ar-output.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-output.c 2011-11-15 19:59:43.000000000 -0500
-@@ -680,9 +680,9 @@ static int rxrpc_send_data(struct kiocb
+diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
+index cc9102c..7d3888e 100644
+--- a/net/rxrpc/ar-output.c
++++ b/net/rxrpc/ar-output.c
+@@ -680,9 +680,9 @@ static int rxrpc_send_data(struct kiocb *iocb,
sp->hdr.cid = call->cid;
sp->hdr.callNumber = call->call_id;
sp->hdr.seq =
@@ -79759,10 +82060,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-output.c linux-2.6.32.49/net/rxrpc/ar-ou
sp->hdr.type = RXRPC_PACKET_TYPE_DATA;
sp->hdr.userStatus = 0;
sp->hdr.securityIndex = conn->security_ix;
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-peer.c linux-2.6.32.49/net/rxrpc/ar-peer.c
---- linux-2.6.32.49/net/rxrpc/ar-peer.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-peer.c 2011-11-15 19:59:43.000000000 -0500
-@@ -86,7 +86,7 @@ static struct rxrpc_peer *rxrpc_alloc_pe
+diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c
+index edc026c..4bd4e2d 100644
+--- a/net/rxrpc/ar-peer.c
++++ b/net/rxrpc/ar-peer.c
+@@ -86,7 +86,7 @@ static struct rxrpc_peer *rxrpc_alloc_peer(struct sockaddr_rxrpc *srx,
INIT_LIST_HEAD(&peer->error_targets);
spin_lock_init(&peer->lock);
atomic_set(&peer->usage, 1);
@@ -79771,10 +82073,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-peer.c linux-2.6.32.49/net/rxrpc/ar-peer
memcpy(&peer->srx, srx, sizeof(*srx));
rxrpc_assess_MTU_size(peer);
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-proc.c linux-2.6.32.49/net/rxrpc/ar-proc.c
---- linux-2.6.32.49/net/rxrpc/ar-proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -164,8 +164,8 @@ static int rxrpc_connection_seq_show(str
+diff --git a/net/rxrpc/ar-proc.c b/net/rxrpc/ar-proc.c
+index 38047f7..9f48511 100644
+--- a/net/rxrpc/ar-proc.c
++++ b/net/rxrpc/ar-proc.c
+@@ -164,8 +164,8 @@ static int rxrpc_connection_seq_show(struct seq_file *seq, void *v)
atomic_read(&conn->usage),
rxrpc_conn_states[conn->state],
key_serial(conn->key),
@@ -79785,10 +82088,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-proc.c linux-2.6.32.49/net/rxrpc/ar-proc
return 0;
}
-diff -urNp linux-2.6.32.49/net/rxrpc/ar-transport.c linux-2.6.32.49/net/rxrpc/ar-transport.c
---- linux-2.6.32.49/net/rxrpc/ar-transport.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/ar-transport.c 2011-11-15 19:59:43.000000000 -0500
-@@ -46,7 +46,7 @@ static struct rxrpc_transport *rxrpc_all
+diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
+index 0936e1a..437c640 100644
+--- a/net/rxrpc/ar-transport.c
++++ b/net/rxrpc/ar-transport.c
+@@ -46,7 +46,7 @@ static struct rxrpc_transport *rxrpc_alloc_transport(struct rxrpc_local *local,
spin_lock_init(&trans->client_lock);
rwlock_init(&trans->conn_lock);
atomic_set(&trans->usage, 1);
@@ -79797,10 +82101,11 @@ diff -urNp linux-2.6.32.49/net/rxrpc/ar-transport.c linux-2.6.32.49/net/rxrpc/ar
if (peer->srx.transport.family == AF_INET) {
switch (peer->srx.transport_type) {
-diff -urNp linux-2.6.32.49/net/rxrpc/rxkad.c linux-2.6.32.49/net/rxrpc/rxkad.c
---- linux-2.6.32.49/net/rxrpc/rxkad.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/rxrpc/rxkad.c 2011-11-15 19:59:43.000000000 -0500
-@@ -210,6 +210,8 @@ static int rxkad_secure_packet_encrypt(c
+diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
+index 713ac59..306f6ae 100644
+--- a/net/rxrpc/rxkad.c
++++ b/net/rxrpc/rxkad.c
+@@ -210,6 +210,8 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
u16 check;
int nsg;
@@ -79809,7 +82114,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/rxkad.c linux-2.6.32.49/net/rxrpc/rxkad.c
sp = rxrpc_skb(skb);
_enter("");
-@@ -337,6 +339,8 @@ static int rxkad_verify_packet_auth(cons
+@@ -337,6 +339,8 @@ static int rxkad_verify_packet_auth(const struct rxrpc_call *call,
u16 check;
int nsg;
@@ -79818,7 +82123,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/rxkad.c linux-2.6.32.49/net/rxrpc/rxkad.c
_enter("");
sp = rxrpc_skb(skb);
-@@ -609,7 +613,7 @@ static int rxkad_issue_challenge(struct
+@@ -609,7 +613,7 @@ static int rxkad_issue_challenge(struct rxrpc_connection *conn)
len = iov[0].iov_len + iov[1].iov_len;
@@ -79827,7 +82132,7 @@ diff -urNp linux-2.6.32.49/net/rxrpc/rxkad.c linux-2.6.32.49/net/rxrpc/rxkad.c
_proto("Tx CHALLENGE %%%u", ntohl(hdr.serial));
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 2, len);
-@@ -659,7 +663,7 @@ static int rxkad_send_response(struct rx
+@@ -659,7 +663,7 @@ static int rxkad_send_response(struct rxrpc_connection *conn,
len = iov[0].iov_len + iov[1].iov_len + iov[2].iov_len;
@@ -79836,10 +82141,24 @@ diff -urNp linux-2.6.32.49/net/rxrpc/rxkad.c linux-2.6.32.49/net/rxrpc/rxkad.c
_proto("Tx RESPONSE %%%u", ntohl(hdr->serial));
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 3, len);
-diff -urNp linux-2.6.32.49/net/sctp/proc.c linux-2.6.32.49/net/sctp/proc.c
---- linux-2.6.32.49/net/sctp/proc.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sctp/proc.c 2011-11-15 19:59:43.000000000 -0500
-@@ -213,7 +213,12 @@ static int sctp_eps_seq_show(struct seq_
+diff --git a/net/sctp/auth.c b/net/sctp/auth.c
+index 914c419..7a16d2c 100644
+--- a/net/sctp/auth.c
++++ b/net/sctp/auth.c
+@@ -81,7 +81,7 @@ static struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp)
+ struct sctp_auth_bytes *key;
+
+ /* Verify that we are not going to overflow INT_MAX */
+- if ((INT_MAX - key_len) < sizeof(struct sctp_auth_bytes))
++ if (key_len > (INT_MAX - sizeof(struct sctp_auth_bytes)))
+ return NULL;
+
+ /* Allocate the shared key */
+diff --git a/net/sctp/proc.c b/net/sctp/proc.c
+index d093cbf..9fc36fc 100644
+--- a/net/sctp/proc.c
++++ b/net/sctp/proc.c
+@@ -213,7 +213,12 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
sctp_for_each_hentry(epb, node, &head->chain) {
ep = sctp_ep(epb);
sk = epb->sk;
@@ -79853,7 +82172,7 @@ diff -urNp linux-2.6.32.49/net/sctp/proc.c linux-2.6.32.49/net/sctp/proc.c
sctp_sk(sk)->type, sk->sk_state, hash,
epb->bind_addr.port,
sock_i_uid(sk), sock_i_ino(sk));
-@@ -320,7 +325,12 @@ static int sctp_assocs_seq_show(struct s
+@@ -320,7 +325,12 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
seq_printf(seq,
"%8p %8p %-3d %-3d %-2d %-4d "
"%4d %8d %8d %7d %5lu %-5d %5d ",
@@ -79867,9 +82186,10 @@ diff -urNp linux-2.6.32.49/net/sctp/proc.c linux-2.6.32.49/net/sctp/proc.c
assoc->state, hash,
assoc->assoc_id,
assoc->sndbuf_used,
-diff -urNp linux-2.6.32.49/net/sctp/socket.c linux-2.6.32.49/net/sctp/socket.c
---- linux-2.6.32.49/net/sctp/socket.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sctp/socket.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/sctp/socket.c b/net/sctp/socket.c
+index 3a95fcb..c40fc1d 100644
+--- a/net/sctp/socket.c
++++ b/net/sctp/socket.c
@@ -5802,7 +5802,6 @@ pp_found:
*/
int reuse = sk->sk_reuse;
@@ -79878,9 +82198,10 @@ diff -urNp linux-2.6.32.49/net/sctp/socket.c linux-2.6.32.49/net/sctp/socket.c
SCTP_DEBUG_PRINTK("sctp_get_port() found a possible match\n");
if (pp->fastreuse && sk->sk_reuse &&
-diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
---- linux-2.6.32.49/net/socket.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/socket.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/socket.c b/net/socket.c
+index d449812..4ac08d3c 100644
+--- a/net/socket.c
++++ b/net/socket.c
@@ -87,6 +87,7 @@
#include <linux/wireless.h>
#include <linux/nsproxy.h>
@@ -79911,7 +82232,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos);
-@@ -298,7 +314,7 @@ static int sockfs_get_sb(struct file_sys
+@@ -298,7 +314,7 @@ static int sockfs_get_sb(struct file_system_type *fs_type,
mnt);
}
@@ -79920,7 +82241,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
static struct file_system_type sock_fs_type = {
.name = "sockfs",
-@@ -1154,6 +1170,8 @@ static int __sock_create(struct net *net
+@@ -1154,6 +1170,8 @@ static int __sock_create(struct net *net, int family, int type, int protocol,
return -EAFNOSUPPORT;
if (type < 0 || type >= SOCK_MAX)
return -EINVAL;
@@ -79929,7 +82250,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
/* Compatibility.
-@@ -1283,6 +1301,16 @@ SYSCALL_DEFINE3(socket, int, family, int
+@@ -1283,6 +1301,16 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
@@ -79946,7 +82267,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
retval = sock_create(family, type, protocol, &sock);
if (retval < 0)
goto out;
-@@ -1415,6 +1443,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1415,6 +1443,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
if (sock) {
err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address);
if (err >= 0) {
@@ -79961,7 +82282,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
err = security_socket_bind(sock,
(struct sockaddr *)&address,
addrlen);
-@@ -1423,6 +1459,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1423,6 +1459,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
(struct sockaddr *)
&address, addrlen);
}
@@ -79969,7 +82290,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1446,10 +1483,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba
+@@ -1446,10 +1483,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
if ((unsigned)backlog > somaxconn)
backlog = somaxconn;
@@ -79990,7 +82311,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1492,6 +1539,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1492,6 +1539,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
newsock->type = sock->type;
newsock->ops = sock->ops;
@@ -80009,7 +82330,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
/*
* We don't need try_module_get here, as the listening socket (sock)
* has the protocol module (sock->ops->owner) held.
-@@ -1534,6 +1593,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1534,6 +1593,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
fd_install(newfd, newfile);
err = newfd;
@@ -80018,7 +82339,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
out_put:
fput_light(sock->file, fput_needed);
out:
-@@ -1571,6 +1632,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1571,6 +1632,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
int, addrlen)
{
struct socket *sock;
@@ -80026,7 +82347,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
struct sockaddr_storage address;
int err, fput_needed;
-@@ -1581,6 +1643,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1581,6 +1643,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
if (err < 0)
goto out_put;
@@ -80044,7 +82365,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
err =
security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
if (err)
-@@ -1882,6 +1955,8 @@ SYSCALL_DEFINE3(sendmsg, int, fd, struct
+@@ -1882,6 +1955,8 @@ SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned, flags)
int err, ctl_len, iov_size, total_len;
int fput_needed;
@@ -80053,7 +82374,7 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
err = -EFAULT;
if (MSG_CMSG_COMPAT & flags) {
if (get_compat_msghdr(&msg_sys, msg_compat))
-@@ -2022,7 +2097,7 @@ SYSCALL_DEFINE3(recvmsg, int, fd, struct
+@@ -2022,7 +2097,7 @@ SYSCALL_DEFINE3(recvmsg, int, fd, struct msghdr __user *, msg,
* kernel msghdr to use the kernel address space)
*/
@@ -80062,10 +82383,11 @@ diff -urNp linux-2.6.32.49/net/socket.c linux-2.6.32.49/net/socket.c
uaddr_len = COMPAT_NAMELEN(msg);
if (MSG_CMSG_COMPAT & flags) {
err = verify_compat_iovec(&msg_sys, iov,
-diff -urNp linux-2.6.32.49/net/sunrpc/sched.c linux-2.6.32.49/net/sunrpc/sched.c
---- linux-2.6.32.49/net/sunrpc/sched.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sunrpc/sched.c 2011-11-15 19:59:43.000000000 -0500
-@@ -234,10 +234,10 @@ static int rpc_wait_bit_killable(void *w
+diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
+index ac94477..8afe5c3 100644
+--- a/net/sunrpc/sched.c
++++ b/net/sunrpc/sched.c
+@@ -234,10 +234,10 @@ static int rpc_wait_bit_killable(void *word)
#ifdef RPC_DEBUG
static void rpc_task_set_debuginfo(struct rpc_task *task)
{
@@ -80078,10 +82400,11 @@ diff -urNp linux-2.6.32.49/net/sunrpc/sched.c linux-2.6.32.49/net/sunrpc/sched.c
}
#else
static inline void rpc_task_set_debuginfo(struct rpc_task *task)
-diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c
---- linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c 2011-11-15 19:59:43.000000000 -0500
-@@ -59,15 +59,15 @@ unsigned int svcrdma_max_req_size = RPCR
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 35fb68b..236a8bf 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -59,15 +59,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
static unsigned int min_max_inline = 4096;
static unsigned int max_max_inline = 65536;
@@ -80106,7 +82429,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.32.49/net/su
/* Temporary NFS request map and context caches */
struct kmem_cache *svc_rdma_map_cachep;
-@@ -105,7 +105,7 @@ static int read_reset_stat(ctl_table *ta
+@@ -105,7 +105,7 @@ static int read_reset_stat(ctl_table *table, int write,
len -= *ppos;
if (len > *lenp)
len = *lenp;
@@ -80115,7 +82438,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.32.49/net/su
return -EFAULT;
*lenp = len;
*ppos += len;
-@@ -149,63 +149,63 @@ static ctl_table svcrdma_parm_table[] =
+@@ -149,63 +149,63 @@ static ctl_table svcrdma_parm_table[] = {
{
.procname = "rdma_stat_read",
.data = &rdma_stat_read,
@@ -80188,9 +82511,10 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.32.49/net/su
.mode = 0644,
.proc_handler = &read_reset_stat,
},
-diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
---- linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+index 9e88438..8ed5cf0 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -495,7 +495,7 @@ next_sge:
svc_rdma_put_context(ctxt, 0);
goto out;
@@ -80200,7 +82524,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-2.6.32.
if (read_wr.num_sge < chl_map->ch[ch_no].count) {
chl_map->ch[ch_no].count -= read_wr.num_sge;
-@@ -606,7 +606,7 @@ int svc_rdma_recvfrom(struct svc_rqst *r
+@@ -606,7 +606,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
dto_q);
list_del_init(&ctxt->dto_q);
} else {
@@ -80209,7 +82533,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-2.6.32.
clear_bit(XPT_DATA, &xprt->xpt_flags);
ctxt = NULL;
}
-@@ -626,7 +626,7 @@ int svc_rdma_recvfrom(struct svc_rqst *r
+@@ -626,7 +626,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
dprintk("svcrdma: processing ctxt=%p on xprt=%p, rqstp=%p, status=%d\n",
ctxt, rdma_xprt, rqstp, ctxt->wc_status);
BUG_ON(ctxt->wc_status != IB_WC_SUCCESS);
@@ -80218,10 +82542,11 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-2.6.32.
/* Build up the XDR from the receive buffers. */
rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len);
-diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_sendto.c linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_sendto.c
---- linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_sendto.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_sendto.c 2011-11-15 19:59:43.000000000 -0500
-@@ -328,7 +328,7 @@ static int send_write(struct svcxprt_rdm
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+index f11be72..7aad4e8 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+@@ -328,7 +328,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
write_wr.wr.rdma.remote_addr = to;
/* Post It */
@@ -80230,10 +82555,11 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_sendto.c linux-2.6.32.49
if (svc_rdma_send(xprt, &write_wr))
goto err;
return 0;
-diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c
---- linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c 2011-11-15 19:59:43.000000000 -0500
-@@ -292,7 +292,7 @@ static void rq_cq_reap(struct svcxprt_rd
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index 3fa5751..030ba89 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -292,7 +292,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP);
@@ -80242,7 +82568,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32
while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) {
ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
-@@ -314,7 +314,7 @@ static void rq_cq_reap(struct svcxprt_rd
+@@ -314,7 +314,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -80251,7 +82577,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32
set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
/*
-@@ -386,7 +386,7 @@ static void sq_cq_reap(struct svcxprt_rd
+@@ -386,7 +386,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
@@ -80260,7 +82586,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32
while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) {
if (wc.status != IB_WC_SUCCESS)
/* Close the transport */
-@@ -404,7 +404,7 @@ static void sq_cq_reap(struct svcxprt_rd
+@@ -404,7 +404,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -80269,7 +82595,7 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32
}
static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
-@@ -1260,7 +1260,7 @@ int svc_rdma_send(struct svcxprt_rdma *x
+@@ -1260,7 +1260,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
spin_lock_bh(&xprt->sc_lock);
if (xprt->sc_sq_depth < atomic_read(&xprt->sc_sq_count) + wr_count) {
spin_unlock_bh(&xprt->sc_lock);
@@ -80278,10 +82604,11 @@ diff -urNp linux-2.6.32.49/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-2.6.32
/* See if we can opportunistically reap SQ WR to make room */
sq_cq_reap(xprt);
-diff -urNp linux-2.6.32.49/net/sysctl_net.c linux-2.6.32.49/net/sysctl_net.c
---- linux-2.6.32.49/net/sysctl_net.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/sysctl_net.c 2011-11-15 19:59:43.000000000 -0500
-@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ct
+diff --git a/net/sysctl_net.c b/net/sysctl_net.c
+index 0b15d72..7934fbb 100644
+--- a/net/sysctl_net.c
++++ b/net/sysctl_net.c
+@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ctl_table_root *root,
struct ctl_table *table)
{
/* Allow network administrator to have same access as root. */
@@ -80290,9 +82617,10 @@ diff -urNp linux-2.6.32.49/net/sysctl_net.c linux-2.6.32.49/net/sysctl_net.c
int mode = (table->mode >> 6) & 7;
return (mode << 6) | (mode << 3) | mode;
}
-diff -urNp linux-2.6.32.49/net/tipc/link.c linux-2.6.32.49/net/tipc/link.c
---- linux-2.6.32.49/net/tipc/link.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/tipc/link.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/tipc/link.c b/net/tipc/link.c
+index dd4c18b..f40d38d 100644
+--- a/net/tipc/link.c
++++ b/net/tipc/link.c
@@ -1418,7 +1418,7 @@ again:
if (!sect_rest) {
@@ -80311,10 +82639,11 @@ diff -urNp linux-2.6.32.49/net/tipc/link.c linux-2.6.32.49/net/tipc/link.c
sect_crs += sz;
sect_rest -= sz;
fragm_crs += sz;
-diff -urNp linux-2.6.32.49/net/tipc/subscr.c linux-2.6.32.49/net/tipc/subscr.c
---- linux-2.6.32.49/net/tipc/subscr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/tipc/subscr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -104,7 +104,7 @@ static void subscr_send_event(struct sub
+diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
+index 0747d8a..e8bf3f3 100644
+--- a/net/tipc/subscr.c
++++ b/net/tipc/subscr.c
+@@ -104,7 +104,7 @@ static void subscr_send_event(struct subscription *sub,
{
struct iovec msg_sect;
@@ -80323,10 +82652,11 @@ diff -urNp linux-2.6.32.49/net/tipc/subscr.c linux-2.6.32.49/net/tipc/subscr.c
msg_sect.iov_len = sizeof(struct tipc_event);
sub->evt.event = htohl(event, sub->swap);
-diff -urNp linux-2.6.32.49/net/unix/af_unix.c linux-2.6.32.49/net/unix/af_unix.c
---- linux-2.6.32.49/net/unix/af_unix.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/unix/af_unix.c 2011-11-15 19:59:43.000000000 -0500
-@@ -745,6 +745,12 @@ static struct sock *unix_find_other(stru
+diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
+index db8d51a..608692d 100644
+--- a/net/unix/af_unix.c
++++ b/net/unix/af_unix.c
+@@ -745,6 +745,12 @@ static struct sock *unix_find_other(struct net *net,
err = -ECONNREFUSED;
if (!S_ISSOCK(inode->i_mode))
goto put_fail;
@@ -80339,7 +82669,7 @@ diff -urNp linux-2.6.32.49/net/unix/af_unix.c linux-2.6.32.49/net/unix/af_unix.c
u = unix_find_socket_byinode(net, inode);
if (!u)
goto put_fail;
-@@ -765,6 +771,13 @@ static struct sock *unix_find_other(stru
+@@ -765,6 +771,13 @@ static struct sock *unix_find_other(struct net *net,
if (u) {
struct dentry *dentry;
dentry = unix_sk(u)->dentry;
@@ -80353,7 +82683,7 @@ diff -urNp linux-2.6.32.49/net/unix/af_unix.c linux-2.6.32.49/net/unix/af_unix.c
if (dentry)
touch_atime(unix_sk(u)->mnt, dentry);
} else
-@@ -850,11 +863,18 @@ static int unix_bind(struct socket *sock
+@@ -850,11 +863,18 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
err = security_path_mknod(&nd.path, dentry, mode, 0);
if (err)
goto out_mknod_drop_write;
@@ -80372,7 +82702,7 @@ diff -urNp linux-2.6.32.49/net/unix/af_unix.c linux-2.6.32.49/net/unix/af_unix.c
mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
dput(nd.path.dentry);
nd.path.dentry = dentry;
-@@ -2211,7 +2231,11 @@ static int unix_seq_show(struct seq_file
+@@ -2211,7 +2231,11 @@ static int unix_seq_show(struct seq_file *seq, void *v)
unix_state_lock(s);
seq_printf(seq, "%p: %08X %08X %08X %04X %02X %5lu",
@@ -80384,9 +82714,10 @@ diff -urNp linux-2.6.32.49/net/unix/af_unix.c linux-2.6.32.49/net/unix/af_unix.c
atomic_read(&s->sk_refcnt),
0,
s->sk_state == TCP_LISTEN ? __SO_ACCEPTCON : 0,
-diff -urNp linux-2.6.32.49/net/wireless/core.h linux-2.6.32.49/net/wireless/core.h
---- linux-2.6.32.49/net/wireless/core.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/wireless/core.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/net/wireless/core.h b/net/wireless/core.h
+index 376798f..109a61f 100644
+--- a/net/wireless/core.h
++++ b/net/wireless/core.h
@@ -27,7 +27,7 @@ struct cfg80211_registered_device {
struct mutex mtx;
@@ -80396,10 +82727,11 @@ diff -urNp linux-2.6.32.49/net/wireless/core.h linux-2.6.32.49/net/wireless/core
struct rfkill *rfkill;
struct work_struct rfkill_sync;
-diff -urNp linux-2.6.32.49/net/wireless/wext.c linux-2.6.32.49/net/wireless/wext.c
---- linux-2.6.32.49/net/wireless/wext.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/wireless/wext.c 2011-11-15 19:59:43.000000000 -0500
-@@ -816,8 +816,7 @@ static int ioctl_standard_iw_point(struc
+diff --git a/net/wireless/wext.c b/net/wireless/wext.c
+index a2e4c60..0979cbe 100644
+--- a/net/wireless/wext.c
++++ b/net/wireless/wext.c
+@@ -816,8 +816,7 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
*/
/* Support for very large requests */
@@ -80409,7 +82741,7 @@ diff -urNp linux-2.6.32.49/net/wireless/wext.c linux-2.6.32.49/net/wireless/wext
/* Allow userspace to GET more than max so
* we can support any size GET requests.
* There is still a limit : -ENOMEM.
-@@ -854,22 +853,6 @@ static int ioctl_standard_iw_point(struc
+@@ -854,22 +853,6 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
}
}
@@ -80432,10 +82764,11 @@ diff -urNp linux-2.6.32.49/net/wireless/wext.c linux-2.6.32.49/net/wireless/wext
err = handler(dev, info, (union iwreq_data *) iwp, extra);
iwp->length += essid_compat;
-diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_policy.c
---- linux-2.6.32.49/net/xfrm/xfrm_policy.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/xfrm/xfrm_policy.c 2011-11-15 19:59:43.000000000 -0500
-@@ -586,7 +586,7 @@ int xfrm_policy_insert(int dir, struct x
+diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
+index cb81ca3..e15d49a 100644
+--- a/net/xfrm/xfrm_policy.c
++++ b/net/xfrm/xfrm_policy.c
+@@ -586,7 +586,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
hlist_add_head(&policy->bydst, chain);
xfrm_pol_hold(policy);
net->xfrm.policy_count[dir]++;
@@ -80444,7 +82777,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
if (delpol)
__xfrm_policy_unlink(delpol, dir);
policy->index = delpol ? delpol->index : xfrm_gen_index(net, dir);
-@@ -669,7 +669,7 @@ struct xfrm_policy *xfrm_policy_bysel_ct
+@@ -669,7 +669,7 @@ struct xfrm_policy *xfrm_policy_bysel_ctx(struct net *net, u8 type, int dir,
write_unlock_bh(&xfrm_policy_lock);
if (ret && delete) {
@@ -80453,7 +82786,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_policy_kill(ret);
}
return ret;
-@@ -710,7 +710,7 @@ struct xfrm_policy *xfrm_policy_byid(str
+@@ -710,7 +710,7 @@ struct xfrm_policy *xfrm_policy_byid(struct net *net, u8 type, int dir, u32 id,
write_unlock_bh(&xfrm_policy_lock);
if (ret && delete) {
@@ -80462,7 +82795,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_policy_kill(ret);
}
return ret;
-@@ -824,7 +824,7 @@ int xfrm_policy_flush(struct net *net, u
+@@ -824,7 +824,7 @@ int xfrm_policy_flush(struct net *net, u8 type, struct xfrm_audit *audit_info)
}
}
@@ -80471,7 +82804,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
out:
write_unlock_bh(&xfrm_policy_lock);
return err;
-@@ -1088,7 +1088,7 @@ int xfrm_policy_delete(struct xfrm_polic
+@@ -1088,7 +1088,7 @@ int xfrm_policy_delete(struct xfrm_policy *pol, int dir)
write_unlock_bh(&xfrm_policy_lock);
if (pol) {
if (dir < XFRM_POLICY_MAX)
@@ -80489,7 +82822,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_dst_alloc_copy(void **target, void *src, int size)
{
if (!*target) {
-@@ -1489,7 +1489,7 @@ xfrm_dst_alloc_copy(void **target, void
+@@ -1489,7 +1489,7 @@ xfrm_dst_alloc_copy(void **target, void *src, int size)
return 0;
}
@@ -80498,7 +82831,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_dst_update_parent(struct dst_entry *dst, struct xfrm_selector *sel)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1501,7 +1501,7 @@ xfrm_dst_update_parent(struct dst_entry
+@@ -1501,7 +1501,7 @@ xfrm_dst_update_parent(struct dst_entry *dst, struct xfrm_selector *sel)
#endif
}
@@ -80507,7 +82840,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1537,7 +1537,7 @@ int __xfrm_lookup(struct net *net, struc
+@@ -1537,7 +1537,7 @@ int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl,
u8 dir = policy_to_flow_dir(XFRM_POLICY_OUT);
restart:
@@ -80525,10 +82858,11 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_policy.c linux-2.6.32.49/net/xfrm/xfrm_
xfrm_pols_put(pols, npols);
goto restart;
}
-diff -urNp linux-2.6.32.49/net/xfrm/xfrm_user.c linux-2.6.32.49/net/xfrm/xfrm_user.c
---- linux-2.6.32.49/net/xfrm/xfrm_user.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/net/xfrm/xfrm_user.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1169,6 +1169,8 @@ static int copy_to_user_tmpl(struct xfrm
+diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
+index b95a2d6..85c4d78 100644
+--- a/net/xfrm/xfrm_user.c
++++ b/net/xfrm/xfrm_user.c
+@@ -1169,6 +1169,8 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb)
struct xfrm_user_tmpl vec[XFRM_MAX_DEPTH];
int i;
@@ -80537,7 +82871,7 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_user.c linux-2.6.32.49/net/xfrm/xfrm_us
if (xp->xfrm_nr == 0)
return 0;
-@@ -1784,6 +1786,8 @@ static int xfrm_do_migrate(struct sk_buf
+@@ -1784,6 +1786,8 @@ static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh,
int err;
int n = 0;
@@ -80546,10 +82880,11 @@ diff -urNp linux-2.6.32.49/net/xfrm/xfrm_user.c linux-2.6.32.49/net/xfrm/xfrm_us
if (attrs[XFRMA_MIGRATE] == NULL)
return -EINVAL;
-diff -urNp linux-2.6.32.49/samples/kobject/kset-example.c linux-2.6.32.49/samples/kobject/kset-example.c
---- linux-2.6.32.49/samples/kobject/kset-example.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/samples/kobject/kset-example.c 2011-11-15 19:59:43.000000000 -0500
-@@ -87,7 +87,7 @@ static ssize_t foo_attr_store(struct kob
+diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
+index 45b7d56..19e828c 100644
+--- a/samples/kobject/kset-example.c
++++ b/samples/kobject/kset-example.c
+@@ -87,7 +87,7 @@ static ssize_t foo_attr_store(struct kobject *kobj,
}
/* Our custom sysfs_ops that we will associate with our ktype later on */
@@ -80558,9 +82893,57 @@ diff -urNp linux-2.6.32.49/samples/kobject/kset-example.c linux-2.6.32.49/sample
.show = foo_attr_show,
.store = foo_attr_store,
};
-diff -urNp linux-2.6.32.49/scripts/basic/fixdep.c linux-2.6.32.49/scripts/basic/fixdep.c
---- linux-2.6.32.49/scripts/basic/fixdep.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/basic/fixdep.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/scripts/Makefile.build b/scripts/Makefile.build
+index 341b589..405aed3 100644
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -59,7 +59,7 @@ endif
+ endif
+
+ # Do not include host rules unless needed
+-ifneq ($(hostprogs-y)$(hostprogs-m),)
++ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m),)
+ include scripts/Makefile.host
+ endif
+
+diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
+index 6f89fbb..53adc9c 100644
+--- a/scripts/Makefile.clean
++++ b/scripts/Makefile.clean
+@@ -43,7 +43,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
+ __clean-files := $(extra-y) $(always) \
+ $(targets) $(clean-files) \
+ $(host-progs) \
+- $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
++ $(hostprogs-y) $(hostprogs-m) $(hostprogs-) \
++ $(hostlibs-y) $(hostlibs-m) $(hostlibs-)
+
+ # as clean-files is given relative to the current directory, this adds
+ # a $(obj) prefix, except for absolute paths
+diff --git a/scripts/Makefile.host b/scripts/Makefile.host
+index 1ac414f..a1c1451 100644
+--- a/scripts/Makefile.host
++++ b/scripts/Makefile.host
+@@ -31,6 +31,7 @@
+ # Note: Shared libraries consisting of C++ files are not supported
+
+ __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
++__hostlibs := $(sort $(hostlibs-y) $(hostlibs-m))
+
+ # C code
+ # Executables compiled from a single .c file
+@@ -54,6 +55,7 @@ host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs)))
+ # Shared libaries (only .c supported)
+ # Shared libraries (.so) - all .so files referenced in "xxx-objs"
+ host-cshlib := $(sort $(filter %.so, $(host-cobjs)))
++host-cshlib += $(sort $(filter %.so, $(__hostlibs)))
+ # Remove .so files from "xxx-objs"
+ host-cobjs := $(filter-out %.so,$(host-cobjs))
+
+diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
+index 6bf21f8..c0546b3 100644
+--- a/scripts/basic/fixdep.c
++++ b/scripts/basic/fixdep.c
@@ -162,7 +162,7 @@ static void grow_config(int len)
/*
* Lookup a value in the configuration string.
@@ -80579,7 +82962,7 @@ diff -urNp linux-2.6.32.49/scripts/basic/fixdep.c linux-2.6.32.49/scripts/basic/
{
char s[PATH_MAX];
char *p;
-@@ -222,9 +222,9 @@ static void use_config(char *m, int slen
+@@ -222,9 +222,9 @@ static void use_config(char *m, int slen)
static void parse_config_file(char *map, size_t len)
{
@@ -80600,60 +82983,19 @@ diff -urNp linux-2.6.32.49/scripts/basic/fixdep.c linux-2.6.32.49/scripts/basic/
if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
-diff -urNp linux-2.6.32.49/scripts/gcc-plugin.sh linux-2.6.32.49/scripts/gcc-plugin.sh
---- linux-2.6.32.49/scripts/gcc-plugin.sh 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/scripts/gcc-plugin.sh 2011-11-20 19:22:02.000000000 -0500
+diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh
+new file mode 100644
+index 0000000..8729101
+--- /dev/null
++++ b/scripts/gcc-plugin.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo -e "#include \"gcc-plugin.h\"\n#include \"tree.h\"\n#include \"tm.h\"\n#include \"rtl.h\"" | $1 -x c -shared - -o /dev/null -I`$2 -print-file-name=plugin`/include >/dev/null 2>&1 && echo "y"
-diff -urNp linux-2.6.32.49/scripts/Makefile.build linux-2.6.32.49/scripts/Makefile.build
---- linux-2.6.32.49/scripts/Makefile.build 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/Makefile.build 2011-11-15 19:59:43.000000000 -0500
-@@ -59,7 +59,7 @@ endif
- endif
-
- # Do not include host rules unless needed
--ifneq ($(hostprogs-y)$(hostprogs-m),)
-+ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m),)
- include scripts/Makefile.host
- endif
-
-diff -urNp linux-2.6.32.49/scripts/Makefile.clean linux-2.6.32.49/scripts/Makefile.clean
---- linux-2.6.32.49/scripts/Makefile.clean 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/Makefile.clean 2011-11-15 19:59:43.000000000 -0500
-@@ -43,7 +43,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subd
- __clean-files := $(extra-y) $(always) \
- $(targets) $(clean-files) \
- $(host-progs) \
-- $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
-+ $(hostprogs-y) $(hostprogs-m) $(hostprogs-) \
-+ $(hostlibs-y) $(hostlibs-m) $(hostlibs-)
-
- # as clean-files is given relative to the current directory, this adds
- # a $(obj) prefix, except for absolute paths
-diff -urNp linux-2.6.32.49/scripts/Makefile.host linux-2.6.32.49/scripts/Makefile.host
---- linux-2.6.32.49/scripts/Makefile.host 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/Makefile.host 2011-11-15 19:59:43.000000000 -0500
-@@ -31,6 +31,7 @@
- # Note: Shared libraries consisting of C++ files are not supported
-
- __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
-+__hostlibs := $(sort $(hostlibs-y) $(hostlibs-m))
-
- # C code
- # Executables compiled from a single .c file
-@@ -54,6 +55,7 @@ host-cxxobjs := $(sort $(foreach m,$(hos
- # Shared libaries (only .c supported)
- # Shared libraries (.so) - all .so files referenced in "xxx-objs"
- host-cshlib := $(sort $(filter %.so, $(host-cobjs)))
-+host-cshlib += $(sort $(filter %.so, $(__hostlibs)))
- # Remove .so files from "xxx-objs"
- host-cobjs := $(filter-out %.so,$(host-cobjs))
-
-diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/file2alias.c
---- linux-2.6.32.49/scripts/mod/file2alias.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/mod/file2alias.c 2011-11-15 19:59:43.000000000 -0500
-@@ -72,7 +72,7 @@ static void device_id_check(const char *
+diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
+index 62a9025..65b82ad 100644
+--- a/scripts/mod/file2alias.c
++++ b/scripts/mod/file2alias.c
+@@ -72,7 +72,7 @@ static void device_id_check(const char *modname, const char *device_id,
unsigned long size, unsigned long id_size,
void *symval)
{
@@ -80662,7 +83004,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
if (size % id_size || size < id_size) {
if (cross_build != 0)
-@@ -102,7 +102,7 @@ static void device_id_check(const char *
+@@ -102,7 +102,7 @@ static void device_id_check(const char *modname, const char *device_id,
/* USB is special because the bcdDevice can be matched against a numeric range */
/* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */
static void do_usb_entry(struct usb_device_id *id,
@@ -80671,7 +83013,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
unsigned char range_lo, unsigned char range_hi,
struct module *mod)
{
-@@ -151,7 +151,7 @@ static void do_usb_entry_multi(struct us
+@@ -151,7 +151,7 @@ static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
{
unsigned int devlo, devhi;
unsigned char chi, clo;
@@ -80680,7 +83022,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
id->match_flags = TO_NATIVE(id->match_flags);
id->idVendor = TO_NATIVE(id->idVendor);
-@@ -368,7 +368,7 @@ static void do_pnp_device_entry(void *sy
+@@ -368,7 +368,7 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
for (i = 0; i < count; i++) {
const char *id = (char *)devs[i].id;
char acpi_id[sizeof(devs[0].id)];
@@ -80689,7 +83031,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -398,7 +398,7 @@ static void do_pnp_card_entries(void *sy
+@@ -398,7 +398,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
for (j = 0; j < PNP_MAX_DEVICES; j++) {
const char *id = (char *)card->devs[j].id;
@@ -80698,7 +83040,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
int dup = 0;
if (!id[0])
-@@ -424,7 +424,7 @@ static void do_pnp_card_entries(void *sy
+@@ -424,7 +424,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* add an individual alias for every device entry */
if (!dup) {
char acpi_id[sizeof(card->devs[0].id)];
@@ -80707,7 +83049,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -699,7 +699,7 @@ static void dmi_ascii_filter(char *d, co
+@@ -699,7 +699,7 @@ static void dmi_ascii_filter(char *d, const char *s)
static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
char *alias)
{
@@ -80716,9 +83058,10 @@ diff -urNp linux-2.6.32.49/scripts/mod/file2alias.c linux-2.6.32.49/scripts/mod/
sprintf(alias, "dmi*");
-diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/modpost.c
---- linux-2.6.32.49/scripts/mod/modpost.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/mod/modpost.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
+index 03efeab..0888989 100644
+--- a/scripts/mod/modpost.c
++++ b/scripts/mod/modpost.c
@@ -835,6 +835,7 @@ enum mismatch {
INIT_TO_EXIT,
EXIT_TO_INIT,
@@ -80727,7 +83070,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
};
struct sectioncheck {
-@@ -920,6 +921,12 @@ const struct sectioncheck sectioncheck[]
+@@ -920,6 +921,12 @@ const struct sectioncheck sectioncheck[] = {
.fromsec = { "__ksymtab*", NULL },
.tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
.mismatch = EXPORT_TO_INIT_EXIT
@@ -80740,7 +83083,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
}
};
-@@ -1024,10 +1031,10 @@ static Elf_Sym *find_elf_symbol(struct e
+@@ -1024,10 +1031,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
continue;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
continue;
@@ -80753,7 +83096,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
if (d < 0)
d = addr - sym->st_value;
if (d < distance) {
-@@ -1268,6 +1275,14 @@ static void report_sec_mismatch(const ch
+@@ -1268,6 +1275,14 @@ static void report_sec_mismatch(const char *modname, enum mismatch mismatch,
"Fix this by removing the %sannotation of %s "
"or drop the export.\n",
tosym, sec2annotation(tosec), sec2annotation(tosec), tosym);
@@ -80768,7 +83111,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
case NO_MISMATCH:
/* To get warnings on missing members */
break;
-@@ -1495,7 +1510,7 @@ static void section_rel(const char *modn
+@@ -1495,7 +1510,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
static void check_sec_ref(struct module *mod, const char *modname,
struct elf_info *elf)
{
@@ -80777,7 +83120,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
Elf_Shdr *sechdrs = elf->sechdrs;
/* Walk through all sections */
-@@ -1651,7 +1666,7 @@ void __attribute__((format(printf, 2, 3)
+@@ -1651,7 +1666,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
va_end(ap);
}
@@ -80786,7 +83129,7 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
{
if (buf->size - buf->pos < len) {
buf->size += len + SZ;
-@@ -1863,7 +1878,7 @@ static void write_if_changed(struct buff
+@@ -1863,7 +1878,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
if (fstat(fileno(file), &st) < 0)
goto close_write;
@@ -80795,10 +83138,11 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.c linux-2.6.32.49/scripts/mod/mod
goto close_write;
tmp = NOFAIL(malloc(b->pos));
-diff -urNp linux-2.6.32.49/scripts/mod/modpost.h linux-2.6.32.49/scripts/mod/modpost.h
---- linux-2.6.32.49/scripts/mod/modpost.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/mod/modpost.h 2011-11-15 19:59:43.000000000 -0500
-@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e
+diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
+index 09f58e3..4b66092 100644
+--- a/scripts/mod/modpost.h
++++ b/scripts/mod/modpost.h
+@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *expr);
struct buffer {
char *p;
@@ -80817,10 +83161,11 @@ diff -urNp linux-2.6.32.49/scripts/mod/modpost.h linux-2.6.32.49/scripts/mod/mod
struct module {
struct module *next;
-diff -urNp linux-2.6.32.49/scripts/mod/sumversion.c linux-2.6.32.49/scripts/mod/sumversion.c
---- linux-2.6.32.49/scripts/mod/sumversion.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/mod/sumversion.c 2011-11-15 19:59:43.000000000 -0500
-@@ -455,7 +455,7 @@ static void write_version(const char *fi
+diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
+index ecf9c7d..d52b38e 100644
+--- a/scripts/mod/sumversion.c
++++ b/scripts/mod/sumversion.c
+@@ -455,7 +455,7 @@ static void write_version(const char *filename, const char *sum,
goto out;
}
@@ -80829,10 +83174,11 @@ diff -urNp linux-2.6.32.49/scripts/mod/sumversion.c linux-2.6.32.49/scripts/mod/
warn("writing sum in %s failed: %s\n",
filename, strerror(errno));
goto out;
-diff -urNp linux-2.6.32.49/scripts/package/mkspec linux-2.6.32.49/scripts/package/mkspec
---- linux-2.6.32.49/scripts/package/mkspec 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/package/mkspec 2011-11-15 19:59:43.000000000 -0500
-@@ -70,7 +70,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM
+diff --git a/scripts/package/mkspec b/scripts/package/mkspec
+index 47bdd2f..d4d4e93 100755
+--- a/scripts/package/mkspec
++++ b/scripts/package/mkspec
+@@ -70,7 +70,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'
echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware'
echo "%endif"
@@ -80841,9 +83187,10 @@ diff -urNp linux-2.6.32.49/scripts/package/mkspec linux-2.6.32.49/scripts/packag
echo "%ifarch ia64"
echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
-diff -urNp linux-2.6.32.49/scripts/pnmtologo.c linux-2.6.32.49/scripts/pnmtologo.c
---- linux-2.6.32.49/scripts/pnmtologo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/pnmtologo.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
+index 5c11312..72742b5 100644
+--- a/scripts/pnmtologo.c
++++ b/scripts/pnmtologo.c
@@ -237,14 +237,14 @@ static void write_header(void)
fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out);
@@ -80870,9 +83217,10 @@ diff -urNp linux-2.6.32.49/scripts/pnmtologo.c linux-2.6.32.49/scripts/pnmtologo
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
-diff -urNp linux-2.6.32.49/scripts/tags.sh linux-2.6.32.49/scripts/tags.sh
---- linux-2.6.32.49/scripts/tags.sh 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/scripts/tags.sh 2011-11-15 19:59:43.000000000 -0500
+diff --git a/scripts/tags.sh b/scripts/tags.sh
+index d52f7a0..269eb1b 100755
+--- a/scripts/tags.sh
++++ b/scripts/tags.sh
@@ -93,6 +93,11 @@ docscope()
cscope -b -f cscope.out
}
@@ -80896,119 +83244,11 @@ diff -urNp linux-2.6.32.49/scripts/tags.sh linux-2.6.32.49/scripts/tags.sh
"tags")
rm -f tags
xtags ctags
-diff -urNp linux-2.6.32.49/security/capability.c linux-2.6.32.49/security/capability.c
---- linux-2.6.32.49/security/capability.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/capability.c 2011-11-15 19:59:43.000000000 -0500
-@@ -890,7 +890,7 @@ static void cap_audit_rule_free(void *ls
- }
- #endif /* CONFIG_AUDIT */
-
--struct security_operations default_security_ops = {
-+struct security_operations default_security_ops __read_only = {
- .name = "default",
- };
-
-diff -urNp linux-2.6.32.49/security/commoncap.c linux-2.6.32.49/security/commoncap.c
---- linux-2.6.32.49/security/commoncap.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/commoncap.c 2011-11-15 19:59:43.000000000 -0500
-@@ -27,7 +27,7 @@
- #include <linux/sched.h>
- #include <linux/prctl.h>
- #include <linux/securebits.h>
--
-+#include <net/sock.h>
- /*
- * If a non-root user executes a setuid-root binary in
- * !secure(SECURE_NOROOT) mode, then we raise capabilities.
-@@ -50,9 +50,18 @@ static void warn_setuid_and_fcaps_mixed(
- }
- }
-
-+#ifdef CONFIG_NET
-+extern kernel_cap_t gr_cap_rtnetlink(struct sock *sk);
-+#endif
-+
- int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
- {
-+#ifdef CONFIG_NET
-+ NETLINK_CB(skb).eff_cap = gr_cap_rtnetlink(sk);
-+#else
- NETLINK_CB(skb).eff_cap = current_cap();
-+#endif
-+
- return 0;
- }
-
-@@ -582,6 +591,9 @@ int cap_bprm_secureexec(struct linux_bin
- {
- const struct cred *cred = current_cred();
-
-+ if (gr_acl_enable_at_secure())
-+ return 1;
-+
- if (cred->uid != 0) {
- if (bprm->cap_effective)
- return 1;
-diff -urNp linux-2.6.32.49/security/integrity/ima/ima_api.c linux-2.6.32.49/security/integrity/ima/ima_api.c
---- linux-2.6.32.49/security/integrity/ima/ima_api.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/integrity/ima/ima_api.c 2011-11-15 19:59:43.000000000 -0500
-@@ -74,7 +74,7 @@ void ima_add_violation(struct inode *ino
- int result;
-
- /* can overflow, only indicator */
-- atomic_long_inc(&ima_htable.violations);
-+ atomic_long_inc_unchecked(&ima_htable.violations);
-
- entry = kmalloc(sizeof(*entry), GFP_KERNEL);
- if (!entry) {
-diff -urNp linux-2.6.32.49/security/integrity/ima/ima_fs.c linux-2.6.32.49/security/integrity/ima/ima_fs.c
---- linux-2.6.32.49/security/integrity/ima/ima_fs.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/integrity/ima/ima_fs.c 2011-11-15 19:59:43.000000000 -0500
-@@ -27,12 +27,12 @@
- static int valid_policy = 1;
- #define TMPBUFLEN 12
- static ssize_t ima_show_htable_value(char __user *buf, size_t count,
-- loff_t *ppos, atomic_long_t *val)
-+ loff_t *ppos, atomic_long_unchecked_t *val)
- {
- char tmpbuf[TMPBUFLEN];
- ssize_t len;
-
-- len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read(val));
-+ len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read_unchecked(val));
- return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
- }
-
-diff -urNp linux-2.6.32.49/security/integrity/ima/ima.h linux-2.6.32.49/security/integrity/ima/ima.h
---- linux-2.6.32.49/security/integrity/ima/ima.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/integrity/ima/ima.h 2011-11-15 19:59:43.000000000 -0500
-@@ -84,8 +84,8 @@ void ima_add_violation(struct inode *ino
- extern spinlock_t ima_queue_lock;
-
- struct ima_h_table {
-- atomic_long_t len; /* number of stored measurements in the list */
-- atomic_long_t violations;
-+ atomic_long_unchecked_t len; /* number of stored measurements in the list */
-+ atomic_long_unchecked_t violations;
- struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
- };
- extern struct ima_h_table ima_htable;
-diff -urNp linux-2.6.32.49/security/integrity/ima/ima_queue.c linux-2.6.32.49/security/integrity/ima/ima_queue.c
---- linux-2.6.32.49/security/integrity/ima/ima_queue.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/integrity/ima/ima_queue.c 2011-11-15 19:59:43.000000000 -0500
-@@ -78,7 +78,7 @@ static int ima_add_digest_entry(struct i
- INIT_LIST_HEAD(&qe->later);
- list_add_tail_rcu(&qe->later, &ima_measurements);
-
-- atomic_long_inc(&ima_htable.len);
-+ atomic_long_inc_unchecked(&ima_htable.len);
- key = ima_hash_key(entry->digest);
- hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
- return 0;
-diff -urNp linux-2.6.32.49/security/Kconfig linux-2.6.32.49/security/Kconfig
---- linux-2.6.32.49/security/Kconfig 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/Kconfig 2011-11-15 19:59:43.000000000 -0500
-@@ -4,6 +4,559 @@
+diff --git a/security/Kconfig b/security/Kconfig
+index fb363cd..14c747b 100644
+--- a/security/Kconfig
++++ b/security/Kconfig
+@@ -4,6 +4,587 @@
menu "Security options"
@@ -81341,6 +83581,34 @@ diff -urNp linux-2.6.32.49/security/Kconfig linux-2.6.32.49/security/Kconfig
+ Note that on x86_64 kernels there is a known regression when
+ this feature and KVM/VMX are both enabled in the host kernel.
+
++choice
++ prompt "Return Address Instrumentation Method"
++ default PAX_KERNEXEC_PLUGIN_METHOD_BTS
++ depends on PAX_KERNEXEC_PLUGIN
++ help
++ Select the method used to instrument function pointer dereferences.
++ Note that binary modules cannot be instrumented by this approach.
++
++ config PAX_KERNEXEC_PLUGIN_METHOD_BTS
++ bool "bts"
++ help
++ This method is compatible with binary only modules but has
++ a higher runtime overhead.
++
++ config PAX_KERNEXEC_PLUGIN_METHOD_OR
++ bool "or"
++ depends on !PARAVIRT
++ help
++ This method is incompatible with binary only modules but has
++ a lower runtime overhead.
++endchoice
++
++config PAX_KERNEXEC_PLUGIN_METHOD
++ string
++ default "bts" if PAX_KERNEXEC_PLUGIN_METHOD_BTS
++ default "or" if PAX_KERNEXEC_PLUGIN_METHOD_OR
++ default ""
++
+config PAX_KERNEXEC_MODULE_TEXT
+ int "Minimum amount of memory reserved for module code"
+ default "4"
@@ -81568,7 +83836,7 @@ diff -urNp linux-2.6.32.49/security/Kconfig linux-2.6.32.49/security/Kconfig
config KEYS
bool "Enable access key retention support"
help
-@@ -146,7 +699,7 @@ config INTEL_TXT
+@@ -146,7 +727,7 @@ config INTEL_TXT
config LSM_MMAP_MIN_ADDR
int "Low address space for LSM to protect from user allocation"
depends on SECURITY && SECURITY_SELINUX
@@ -81577,10 +83845,126 @@ diff -urNp linux-2.6.32.49/security/Kconfig linux-2.6.32.49/security/Kconfig
help
This is the portion of low virtual memory which should be protected
from userspace allocation. Keeping a user from writing to low pages
-diff -urNp linux-2.6.32.49/security/keys/keyring.c linux-2.6.32.49/security/keys/keyring.c
---- linux-2.6.32.49/security/keys/keyring.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/keys/keyring.c 2011-11-15 19:59:43.000000000 -0500
-@@ -214,15 +214,15 @@ static long keyring_read(const struct ke
+diff --git a/security/capability.c b/security/capability.c
+index fce07a7..5f12858 100644
+--- a/security/capability.c
++++ b/security/capability.c
+@@ -890,7 +890,7 @@ static void cap_audit_rule_free(void *lsmrule)
+ }
+ #endif /* CONFIG_AUDIT */
+
+-struct security_operations default_security_ops = {
++struct security_operations default_security_ops __read_only = {
+ .name = "default",
+ };
+
+diff --git a/security/commoncap.c b/security/commoncap.c
+index fe30751..cdc60e1 100644
+--- a/security/commoncap.c
++++ b/security/commoncap.c
+@@ -27,7 +27,7 @@
+ #include <linux/sched.h>
+ #include <linux/prctl.h>
+ #include <linux/securebits.h>
+-
++#include <net/sock.h>
+ /*
+ * If a non-root user executes a setuid-root binary in
+ * !secure(SECURE_NOROOT) mode, then we raise capabilities.
+@@ -50,9 +50,18 @@ static void warn_setuid_and_fcaps_mixed(char *fname)
+ }
+ }
+
++#ifdef CONFIG_NET
++extern kernel_cap_t gr_cap_rtnetlink(struct sock *sk);
++#endif
++
+ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
+ {
++#ifdef CONFIG_NET
++ NETLINK_CB(skb).eff_cap = gr_cap_rtnetlink(sk);
++#else
+ NETLINK_CB(skb).eff_cap = current_cap();
++#endif
++
+ return 0;
+ }
+
+@@ -582,6 +591,9 @@ int cap_bprm_secureexec(struct linux_binprm *bprm)
+ {
+ const struct cred *cred = current_cred();
+
++ if (gr_acl_enable_at_secure())
++ return 1;
++
+ if (cred->uid != 0) {
+ if (bprm->cap_effective)
+ return 1;
+diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
+index 165eb53..b1db4eb 100644
+--- a/security/integrity/ima/ima.h
++++ b/security/integrity/ima/ima.h
+@@ -84,8 +84,8 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
+ extern spinlock_t ima_queue_lock;
+
+ struct ima_h_table {
+- atomic_long_t len; /* number of stored measurements in the list */
+- atomic_long_t violations;
++ atomic_long_unchecked_t len; /* number of stored measurements in the list */
++ atomic_long_unchecked_t violations;
+ struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
+ };
+ extern struct ima_h_table ima_htable;
+diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
+index 3cd58b6..b4c284f 100644
+--- a/security/integrity/ima/ima_api.c
++++ b/security/integrity/ima/ima_api.c
+@@ -74,7 +74,7 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
+ int result;
+
+ /* can overflow, only indicator */
+- atomic_long_inc(&ima_htable.violations);
++ atomic_long_inc_unchecked(&ima_htable.violations);
+
+ entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+ if (!entry) {
+diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
+index 0c72c9c..433e29b 100644
+--- a/security/integrity/ima/ima_fs.c
++++ b/security/integrity/ima/ima_fs.c
+@@ -27,12 +27,12 @@
+ static int valid_policy = 1;
+ #define TMPBUFLEN 12
+ static ssize_t ima_show_htable_value(char __user *buf, size_t count,
+- loff_t *ppos, atomic_long_t *val)
++ loff_t *ppos, atomic_long_unchecked_t *val)
+ {
+ char tmpbuf[TMPBUFLEN];
+ ssize_t len;
+
+- len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read(val));
++ len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read_unchecked(val));
+ return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
+ }
+
+diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
+index a0880e9..93e4ebb 100644
+--- a/security/integrity/ima/ima_queue.c
++++ b/security/integrity/ima/ima_queue.c
+@@ -78,7 +78,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry)
+ INIT_LIST_HEAD(&qe->later);
+ list_add_tail_rcu(&qe->later, &ima_measurements);
+
+- atomic_long_inc(&ima_htable.len);
++ atomic_long_inc_unchecked(&ima_htable.len);
+ key = ima_hash_key(entry->digest);
+ hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
+ return 0;
+diff --git a/security/keys/keyring.c b/security/keys/keyring.c
+index e031952..c9a535d 100644
+--- a/security/keys/keyring.c
++++ b/security/keys/keyring.c
+@@ -214,15 +214,15 @@ static long keyring_read(const struct key *keyring,
ret = -EFAULT;
for (loop = 0; loop < klist->nkeys; loop++) {
@@ -81599,10 +83983,11 @@ diff -urNp linux-2.6.32.49/security/keys/keyring.c linux-2.6.32.49/security/keys
goto error;
buflen -= tmp;
-diff -urNp linux-2.6.32.49/security/min_addr.c linux-2.6.32.49/security/min_addr.c
---- linux-2.6.32.49/security/min_addr.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/min_addr.c 2011-11-15 19:59:43.000000000 -0500
-@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG
+diff --git a/security/min_addr.c b/security/min_addr.c
+index d9f9425..c28cef4 100644
+--- a/security/min_addr.c
++++ b/security/min_addr.c
+@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
*/
static void update_mmap_min_addr(void)
{
@@ -81618,10 +84003,11 @@ diff -urNp linux-2.6.32.49/security/min_addr.c linux-2.6.32.49/security/min_addr
}
/*
-diff -urNp linux-2.6.32.49/security/root_plug.c linux-2.6.32.49/security/root_plug.c
---- linux-2.6.32.49/security/root_plug.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/root_plug.c 2011-11-15 19:59:43.000000000 -0500
-@@ -70,7 +70,7 @@ static int rootplug_bprm_check_security
+diff --git a/security/root_plug.c b/security/root_plug.c
+index 2f7ffa6..0455400 100644
+--- a/security/root_plug.c
++++ b/security/root_plug.c
+@@ -70,7 +70,7 @@ static int rootplug_bprm_check_security (struct linux_binprm *bprm)
return 0;
}
@@ -81630,10 +84016,11 @@ diff -urNp linux-2.6.32.49/security/root_plug.c linux-2.6.32.49/security/root_pl
.bprm_check_security = rootplug_bprm_check_security,
};
-diff -urNp linux-2.6.32.49/security/security.c linux-2.6.32.49/security/security.c
---- linux-2.6.32.49/security/security.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/security.c 2011-11-15 19:59:43.000000000 -0500
-@@ -24,7 +24,7 @@ static __initdata char chosen_lsm[SECURI
+diff --git a/security/security.c b/security/security.c
+index c4c6732..3a3d821 100644
+--- a/security/security.c
++++ b/security/security.c
+@@ -24,7 +24,7 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1];
extern struct security_operations default_security_ops;
extern void security_fixup_ops(struct security_operations *ops);
@@ -81642,7 +84029,7 @@ diff -urNp linux-2.6.32.49/security/security.c linux-2.6.32.49/security/security
static inline int verify(struct security_operations *ops)
{
-@@ -106,7 +106,7 @@ int __init security_module_enable(struct
+@@ -106,7 +106,7 @@ int __init security_module_enable(struct security_operations *ops)
* If there is already a security module registered with the kernel,
* an error will be returned. Otherwise %0 is returned on success.
*/
@@ -81651,9 +84038,10 @@ diff -urNp linux-2.6.32.49/security/security.c linux-2.6.32.49/security/security
{
if (verify(ops)) {
printk(KERN_DEBUG "%s could not verify "
-diff -urNp linux-2.6.32.49/security/selinux/hooks.c linux-2.6.32.49/security/selinux/hooks.c
---- linux-2.6.32.49/security/selinux/hooks.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/selinux/hooks.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
+index a106754..2805823 100644
+--- a/security/selinux/hooks.c
++++ b/security/selinux/hooks.c
@@ -131,7 +131,7 @@ int selinux_enabled = 1;
* Minimal support for a secondary security module,
* just to allow the use of the capability module.
@@ -81663,7 +84051,7 @@ diff -urNp linux-2.6.32.49/security/selinux/hooks.c linux-2.6.32.49/security/sel
/* Lists of inode and superblock security structures initialized
before the policy was loaded. */
-@@ -5457,7 +5457,7 @@ static int selinux_key_getsecurity(struc
+@@ -5457,7 +5457,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
#endif
@@ -81682,10 +84070,11 @@ diff -urNp linux-2.6.32.49/security/selinux/hooks.c linux-2.6.32.49/security/sel
/* Unregister netfilter hooks. */
selinux_nf_ip_exit();
-diff -urNp linux-2.6.32.49/security/selinux/include/xfrm.h linux-2.6.32.49/security/selinux/include/xfrm.h
---- linux-2.6.32.49/security/selinux/include/xfrm.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/selinux/include/xfrm.h 2011-11-15 19:59:43.000000000 -0500
-@@ -48,7 +48,7 @@ int selinux_xfrm_decode_session(struct s
+diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h
+index 13128f9..c23c736 100644
+--- a/security/selinux/include/xfrm.h
++++ b/security/selinux/include/xfrm.h
+@@ -48,7 +48,7 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
static inline void selinux_xfrm_notify_policyload(void)
{
@@ -81694,10 +84083,11 @@ diff -urNp linux-2.6.32.49/security/selinux/include/xfrm.h linux-2.6.32.49/secur
}
#else
static inline int selinux_xfrm_enabled(void)
-diff -urNp linux-2.6.32.49/security/selinux/ss/services.c linux-2.6.32.49/security/selinux/ss/services.c
---- linux-2.6.32.49/security/selinux/ss/services.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/selinux/ss/services.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1715,6 +1715,8 @@ int security_load_policy(void *data, siz
+diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
+index ff17820..d68084c 100644
+--- a/security/selinux/ss/services.c
++++ b/security/selinux/ss/services.c
+@@ -1715,6 +1715,8 @@ int security_load_policy(void *data, size_t len)
int rc = 0;
struct policy_file file = { data, len }, *fp = &file;
@@ -81706,10 +84096,11 @@ diff -urNp linux-2.6.32.49/security/selinux/ss/services.c linux-2.6.32.49/securi
if (!ss_initialized) {
avtab_cache_init();
if (policydb_read(&policydb, fp)) {
-diff -urNp linux-2.6.32.49/security/smack/smack_lsm.c linux-2.6.32.49/security/smack/smack_lsm.c
---- linux-2.6.32.49/security/smack/smack_lsm.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/smack/smack_lsm.c 2011-11-15 19:59:43.000000000 -0500
-@@ -3073,7 +3073,7 @@ static int smack_inode_getsecctx(struct
+diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
+index c33b6bb..9651403 100644
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -3073,7 +3073,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
return 0;
}
@@ -81718,10 +84109,11 @@ diff -urNp linux-2.6.32.49/security/smack/smack_lsm.c linux-2.6.32.49/security/s
.name = "smack",
.ptrace_access_check = smack_ptrace_access_check,
-diff -urNp linux-2.6.32.49/security/tomoyo/tomoyo.c linux-2.6.32.49/security/tomoyo/tomoyo.c
---- linux-2.6.32.49/security/tomoyo/tomoyo.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/security/tomoyo/tomoyo.c 2011-11-15 19:59:43.000000000 -0500
-@@ -275,7 +275,7 @@ static int tomoyo_dentry_open(struct fil
+diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
+index 9548a09..9a5f384 100644
+--- a/security/tomoyo/tomoyo.c
++++ b/security/tomoyo/tomoyo.c
+@@ -275,7 +275,7 @@ static int tomoyo_dentry_open(struct file *f, const struct cred *cred)
* tomoyo_security_ops is a "struct security_operations" which is used for
* registering TOMOYO.
*/
@@ -81730,9 +84122,10 @@ diff -urNp linux-2.6.32.49/security/tomoyo/tomoyo.c linux-2.6.32.49/security/tom
.name = "tomoyo",
.cred_alloc_blank = tomoyo_cred_alloc_blank,
.cred_prepare = tomoyo_cred_prepare,
-diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.c linux-2.6.32.49/sound/aoa/codecs/onyx.c
---- linux-2.6.32.49/sound/aoa/codecs/onyx.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/aoa/codecs/onyx.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
+index 84bb07d..c2ab6b6 100644
+--- a/sound/aoa/codecs/onyx.c
++++ b/sound/aoa/codecs/onyx.c
@@ -53,7 +53,7 @@ struct onyx {
spdif_locked:1,
analog_locked:1,
@@ -81742,7 +84135,7 @@ diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.c linux-2.6.32.49/sound/aoa/cod
struct codec_info *codec_info;
/* mutex serializes concurrent access to the device
-@@ -752,7 +752,7 @@ static int onyx_open(struct codec_info_i
+@@ -752,7 +752,7 @@ static int onyx_open(struct codec_info_item *cii,
struct onyx *onyx = cii->codec_data;
mutex_lock(&onyx->mutex);
@@ -81751,7 +84144,7 @@ diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.c linux-2.6.32.49/sound/aoa/cod
mutex_unlock(&onyx->mutex);
return 0;
-@@ -764,8 +764,7 @@ static int onyx_close(struct codec_info_
+@@ -764,8 +764,7 @@ static int onyx_close(struct codec_info_item *cii,
struct onyx *onyx = cii->codec_data;
mutex_lock(&onyx->mutex);
@@ -81761,9 +84154,10 @@ diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.c linux-2.6.32.49/sound/aoa/cod
onyx->spdif_locked = onyx->analog_locked = 0;
mutex_unlock(&onyx->mutex);
-diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.h linux-2.6.32.49/sound/aoa/codecs/onyx.h
---- linux-2.6.32.49/sound/aoa/codecs/onyx.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/aoa/codecs/onyx.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/aoa/codecs/onyx.h b/sound/aoa/codecs/onyx.h
+index ffd2025..df062c9 100644
+--- a/sound/aoa/codecs/onyx.h
++++ b/sound/aoa/codecs/onyx.h
@@ -11,6 +11,7 @@
#include <linux/i2c.h>
#include <asm/pmac_low_i2c.h>
@@ -81772,10 +84166,11 @@ diff -urNp linux-2.6.32.49/sound/aoa/codecs/onyx.h linux-2.6.32.49/sound/aoa/cod
/* PCM3052 register definitions */
-diff -urNp linux-2.6.32.49/sound/core/oss/pcm_oss.c linux-2.6.32.49/sound/core/oss/pcm_oss.c
---- linux-2.6.32.49/sound/core/oss/pcm_oss.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/core/oss/pcm_oss.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1395,7 +1395,7 @@ static ssize_t snd_pcm_oss_write1(struct
+diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
+index d9c9635..bc0a5a2 100644
+--- a/sound/core/oss/pcm_oss.c
++++ b/sound/core/oss/pcm_oss.c
+@@ -1395,7 +1395,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
}
} else {
tmp = snd_pcm_oss_write2(substream,
@@ -81784,7 +84179,7 @@ diff -urNp linux-2.6.32.49/sound/core/oss/pcm_oss.c linux-2.6.32.49/sound/core/o
runtime->oss.period_bytes, 0);
if (tmp <= 0)
goto err;
-@@ -1483,7 +1483,7 @@ static ssize_t snd_pcm_oss_read1(struct
+@@ -1483,7 +1483,7 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
xfer += tmp;
runtime->oss.buffer_used -= tmp;
} else {
@@ -81793,10 +84188,11 @@ diff -urNp linux-2.6.32.49/sound/core/oss/pcm_oss.c linux-2.6.32.49/sound/core/o
runtime->oss.period_bytes, 0);
if (tmp <= 0)
goto err;
-diff -urNp linux-2.6.32.49/sound/core/pcm_compat.c linux-2.6.32.49/sound/core/pcm_compat.c
---- linux-2.6.32.49/sound/core/pcm_compat.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/core/pcm_compat.c 2011-11-15 19:59:43.000000000 -0500
-@@ -30,7 +30,7 @@ static int snd_pcm_ioctl_delay_compat(st
+diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
+index 038232d..7dd9e5c 100644
+--- a/sound/core/pcm_compat.c
++++ b/sound/core/pcm_compat.c
+@@ -30,7 +30,7 @@ static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
int err;
fs = snd_enter_user();
@@ -81805,10 +84201,11 @@ diff -urNp linux-2.6.32.49/sound/core/pcm_compat.c linux-2.6.32.49/sound/core/pc
snd_leave_user(fs);
if (err < 0)
return err;
-diff -urNp linux-2.6.32.49/sound/core/pcm_native.c linux-2.6.32.49/sound/core/pcm_native.c
---- linux-2.6.32.49/sound/core/pcm_native.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/core/pcm_native.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2747,11 +2747,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_
+diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
+index e6d2d97..4843949 100644
+--- a/sound/core/pcm_native.c
++++ b/sound/core/pcm_native.c
+@@ -2747,11 +2747,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
switch (substream->stream) {
case SNDRV_PCM_STREAM_PLAYBACK:
result = snd_pcm_playback_ioctl1(NULL, substream, cmd,
@@ -81822,9 +84219,10 @@ diff -urNp linux-2.6.32.49/sound/core/pcm_native.c linux-2.6.32.49/sound/core/pc
break;
default:
result = -EINVAL;
-diff -urNp linux-2.6.32.49/sound/core/seq/seq_device.c linux-2.6.32.49/sound/core/seq/seq_device.c
---- linux-2.6.32.49/sound/core/seq/seq_device.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/core/seq/seq_device.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
+index 1f99767..14636533 100644
+--- a/sound/core/seq/seq_device.c
++++ b/sound/core/seq/seq_device.c
@@ -63,7 +63,7 @@ struct ops_list {
int argsize; /* argument size */
@@ -81834,7 +84232,7 @@ diff -urNp linux-2.6.32.49/sound/core/seq/seq_device.c linux-2.6.32.49/sound/cor
/* registred devices */
struct list_head dev_list; /* list of devices */
-@@ -332,7 +332,7 @@ int snd_seq_device_register_driver(char
+@@ -332,7 +332,7 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
mutex_lock(&ops->reg_mutex);
/* copy driver operators */
@@ -81843,7 +84241,7 @@ diff -urNp linux-2.6.32.49/sound/core/seq/seq_device.c linux-2.6.32.49/sound/cor
ops->driver |= DRIVER_LOADED;
ops->argsize = argsize;
-@@ -462,7 +462,7 @@ static int init_device(struct snd_seq_de
+@@ -462,7 +462,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL;
}
@@ -81852,7 +84250,7 @@ diff -urNp linux-2.6.32.49/sound/core/seq/seq_device.c linux-2.6.32.49/sound/cor
dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
ops->num_init_devices++;
} else {
-@@ -489,7 +489,7 @@ static int free_device(struct snd_seq_de
+@@ -489,7 +489,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL;
}
@@ -81861,9 +84259,10 @@ diff -urNp linux-2.6.32.49/sound/core/seq/seq_device.c linux-2.6.32.49/sound/cor
dev->status = SNDRV_SEQ_DEVICE_FREE;
dev->driver_data = NULL;
ops->num_init_devices--;
-diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/mts64.c
---- linux-2.6.32.49/sound/drivers/mts64.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/drivers/mts64.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
+index 9284829..ac8e8b2 100644
+--- a/sound/drivers/mts64.c
++++ b/sound/drivers/mts64.c
@@ -27,6 +27,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
@@ -81881,7 +84280,7 @@ diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/m
int current_midi_output_port;
int current_midi_input_port;
u8 mode[MTS64_NUM_INPUT_PORTS];
-@@ -695,7 +696,7 @@ static int snd_mts64_rawmidi_open(struct
+@@ -695,7 +696,7 @@ static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream)
{
struct mts64 *mts = substream->rmidi->private_data;
@@ -81890,7 +84289,7 @@ diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/m
/* We don't need a spinlock here, because this is just called
if the device has not been opened before.
So there aren't any IRQs from the device */
-@@ -703,7 +704,7 @@ static int snd_mts64_rawmidi_open(struct
+@@ -703,7 +704,7 @@ static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream)
msleep(50);
}
@@ -81899,7 +84298,7 @@ diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/m
return 0;
}
-@@ -713,8 +714,7 @@ static int snd_mts64_rawmidi_close(struc
+@@ -713,8 +714,7 @@ static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream)
struct mts64 *mts = substream->rmidi->private_data;
unsigned long flags;
@@ -81909,7 +84308,7 @@ diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/m
/* We need the spinlock_irqsave here because we can still
have IRQs at this point */
spin_lock_irqsave(&mts->lock, flags);
-@@ -723,8 +723,8 @@ static int snd_mts64_rawmidi_close(struc
+@@ -723,8 +723,8 @@ static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream)
msleep(500);
@@ -81920,10 +84319,11 @@ diff -urNp linux-2.6.32.49/sound/drivers/mts64.c linux-2.6.32.49/sound/drivers/m
return 0;
}
-diff -urNp linux-2.6.32.49/sound/drivers/opl4/opl4_lib.c linux-2.6.32.49/sound/drivers/opl4/opl4_lib.c
---- linux-2.6.32.49/sound/drivers/opl4/opl4_lib.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/drivers/opl4/opl4_lib.c 2011-11-15 19:59:43.000000000 -0500
-@@ -27,7 +27,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@
+diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
+index 01997f2..cbc1195 100644
+--- a/sound/drivers/opl4/opl4_lib.c
++++ b/sound/drivers/opl4/opl4_lib.c
+@@ -27,7 +27,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
MODULE_DESCRIPTION("OPL4 driver");
MODULE_LICENSE("GPL");
@@ -81932,9 +84332,10 @@ diff -urNp linux-2.6.32.49/sound/drivers/opl4/opl4_lib.c linux-2.6.32.49/sound/d
{
int timeout = 10;
while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)
-diff -urNp linux-2.6.32.49/sound/drivers/portman2x4.c linux-2.6.32.49/sound/drivers/portman2x4.c
---- linux-2.6.32.49/sound/drivers/portman2x4.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/drivers/portman2x4.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
+index 60158e2..0a0cc1a 100644
+--- a/sound/drivers/portman2x4.c
++++ b/sound/drivers/portman2x4.c
@@ -46,6 +46,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
@@ -81952,9 +84353,10 @@ diff -urNp linux-2.6.32.49/sound/drivers/portman2x4.c linux-2.6.32.49/sound/driv
int mode[PORTMAN_NUM_INPUT_PORTS];
struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS];
};
-diff -urNp linux-2.6.32.49/sound/isa/cmi8330.c linux-2.6.32.49/sound/isa/cmi8330.c
---- linux-2.6.32.49/sound/isa/cmi8330.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/isa/cmi8330.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
+index 02f79d2..8691d43 100644
+--- a/sound/isa/cmi8330.c
++++ b/sound/isa/cmi8330.c
@@ -173,7 +173,7 @@ struct snd_cmi8330 {
struct snd_pcm *pcm;
@@ -81964,9 +84366,10 @@ diff -urNp linux-2.6.32.49/sound/isa/cmi8330.c linux-2.6.32.49/sound/isa/cmi8330
snd_pcm_open_callback_t open;
void *private_data; /* sb or wss */
} streams[2];
-diff -urNp linux-2.6.32.49/sound/oss/sb_audio.c linux-2.6.32.49/sound/oss/sb_audio.c
---- linux-2.6.32.49/sound/oss/sb_audio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/oss/sb_audio.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
+index 733b014..56ce96f 100644
+--- a/sound/oss/sb_audio.c
++++ b/sound/oss/sb_audio.c
@@ -901,7 +901,7 @@ sb16_copy_from_user(int dev,
buf16 = (signed short *)(localbuf + localoffs);
while (c)
@@ -81976,9 +84379,10 @@ diff -urNp linux-2.6.32.49/sound/oss/sb_audio.c linux-2.6.32.49/sound/oss/sb_aud
if (copy_from_user(lbuf8,
userbuf+useroffs + p,
locallen))
-diff -urNp linux-2.6.32.49/sound/oss/swarm_cs4297a.c linux-2.6.32.49/sound/oss/swarm_cs4297a.c
---- linux-2.6.32.49/sound/oss/swarm_cs4297a.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/oss/swarm_cs4297a.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
+index 3136c88..28ad950 100644
+--- a/sound/oss/swarm_cs4297a.c
++++ b/sound/oss/swarm_cs4297a.c
@@ -2577,7 +2577,6 @@ static int __init cs4297a_init(void)
{
struct cs4297a_state *s;
@@ -82013,10 +84417,11 @@ diff -urNp linux-2.6.32.49/sound/oss/swarm_cs4297a.c linux-2.6.32.49/sound/oss/s
list_add(&s->list, &cs4297a_devs);
-diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_codec.c linux-2.6.32.49/sound/pci/ac97/ac97_codec.c
---- linux-2.6.32.49/sound/pci/ac97/ac97_codec.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/ac97/ac97_codec.c 2011-11-15 19:59:43.000000000 -0500
-@@ -1952,7 +1952,7 @@ static int snd_ac97_dev_disconnect(struc
+diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
+index 78288db..0406809 100644
+--- a/sound/pci/ac97/ac97_codec.c
++++ b/sound/pci/ac97/ac97_codec.c
+@@ -1952,7 +1952,7 @@ static int snd_ac97_dev_disconnect(struct snd_device *device)
}
/* build_ops to do nothing */
@@ -82025,10 +84430,11 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_codec.c linux-2.6.32.49/sound/pci
#ifdef CONFIG_SND_AC97_POWER_SAVE
static void do_update_power(struct work_struct *work)
-diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci/ac97/ac97_patch.c
---- linux-2.6.32.49/sound/pci/ac97/ac97_patch.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/ac97/ac97_patch.c 2011-11-15 19:59:43.000000000 -0500
-@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spd
+diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
+index eeb2e23..82bf625 100644
+--- a/sound/pci/ac97/ac97_patch.c
++++ b/sound/pci/ac97/ac97_patch.c
+@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spdif(struct snd_ac97 *ac97)
return 0;
}
@@ -82037,7 +84443,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_spdif = patch_yamaha_ymf743_build_spdif,
.build_3d = patch_yamaha_ymf7x3_3d,
};
-@@ -455,7 +455,7 @@ static int patch_yamaha_ymf753_post_spdi
+@@ -455,7 +455,7 @@ static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97)
return 0;
}
@@ -82046,7 +84452,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_3d = patch_yamaha_ymf7x3_3d,
.build_post_spdif = patch_yamaha_ymf753_post_spdif
};
-@@ -502,7 +502,7 @@ static int patch_wolfson_wm9703_specific
+@@ -502,7 +502,7 @@ static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82055,7 +84461,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_wolfson_wm9703_specific,
};
-@@ -533,7 +533,7 @@ static int patch_wolfson_wm9704_specific
+@@ -533,7 +533,7 @@ static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82064,7 +84470,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_wolfson_wm9704_specific,
};
-@@ -555,7 +555,7 @@ static int patch_wolfson_wm9705_specific
+@@ -555,7 +555,7 @@ static int patch_wolfson_wm9705_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82073,7 +84479,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_wolfson_wm9705_specific,
};
-@@ -692,7 +692,7 @@ static int patch_wolfson_wm9711_specific
+@@ -692,7 +692,7 @@ static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82082,7 +84488,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_wolfson_wm9711_specific,
};
-@@ -886,7 +886,7 @@ static void patch_wolfson_wm9713_resume
+@@ -886,7 +886,7 @@ static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97)
}
#endif
@@ -82091,7 +84497,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_wolfson_wm9713_specific,
.build_3d = patch_wolfson_wm9713_3d,
#ifdef CONFIG_PM
-@@ -991,7 +991,7 @@ static int patch_sigmatel_stac97xx_speci
+@@ -991,7 +991,7 @@ static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82100,7 +84506,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_3d = patch_sigmatel_stac9700_3d,
.build_specific = patch_sigmatel_stac97xx_specific
};
-@@ -1038,7 +1038,7 @@ static int patch_sigmatel_stac9708_speci
+@@ -1038,7 +1038,7 @@ static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97)
return patch_sigmatel_stac97xx_specific(ac97);
}
@@ -82109,7 +84515,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_3d = patch_sigmatel_stac9708_3d,
.build_specific = patch_sigmatel_stac9708_specific
};
-@@ -1267,7 +1267,7 @@ static int patch_sigmatel_stac9758_speci
+@@ -1267,7 +1267,7 @@ static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97)
return 0;
}
@@ -82118,7 +84524,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_3d = patch_sigmatel_stac9700_3d,
.build_specific = patch_sigmatel_stac9758_specific
};
-@@ -1342,7 +1342,7 @@ static int patch_cirrus_build_spdif(stru
+@@ -1342,7 +1342,7 @@ static int patch_cirrus_build_spdif(struct snd_ac97 * ac97)
return 0;
}
@@ -82127,7 +84533,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_spdif = patch_cirrus_build_spdif
};
-@@ -1399,7 +1399,7 @@ static int patch_conexant_build_spdif(st
+@@ -1399,7 +1399,7 @@ static int patch_conexant_build_spdif(struct snd_ac97 * ac97)
return 0;
}
@@ -82136,7 +84542,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_spdif = patch_conexant_build_spdif
};
-@@ -1575,7 +1575,7 @@ static void patch_ad1881_chained(struct
+@@ -1575,7 +1575,7 @@ static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int
}
}
@@ -82145,7 +84551,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
#ifdef CONFIG_PM
.resume = ad18xx_resume
#endif
-@@ -1662,7 +1662,7 @@ static int patch_ad1885_specific(struct
+@@ -1662,7 +1662,7 @@ static int patch_ad1885_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82154,7 +84560,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = &patch_ad1885_specific,
#ifdef CONFIG_PM
.resume = ad18xx_resume
-@@ -1689,7 +1689,7 @@ static int patch_ad1886_specific(struct
+@@ -1689,7 +1689,7 @@ static int patch_ad1886_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82163,7 +84569,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = &patch_ad1886_specific,
#ifdef CONFIG_PM
.resume = ad18xx_resume
-@@ -1896,7 +1896,7 @@ static int patch_ad1981a_specific(struct
+@@ -1896,7 +1896,7 @@ static int patch_ad1981a_specific(struct snd_ac97 * ac97)
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
}
@@ -82172,7 +84578,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1981a_specific,
#ifdef CONFIG_PM
-@@ -1952,7 +1952,7 @@ static int patch_ad1981b_specific(struct
+@@ -1952,7 +1952,7 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97)
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
}
@@ -82181,7 +84587,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1981b_specific,
#ifdef CONFIG_PM
-@@ -2091,7 +2091,7 @@ static int patch_ad1888_specific(struct
+@@ -2091,7 +2091,7 @@ static int patch_ad1888_specific(struct snd_ac97 *ac97)
return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
}
@@ -82190,7 +84596,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1888_specific,
#ifdef CONFIG_PM
-@@ -2140,7 +2140,7 @@ static int patch_ad1980_specific(struct
+@@ -2140,7 +2140,7 @@ static int patch_ad1980_specific(struct snd_ac97 *ac97)
return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
}
@@ -82199,7 +84605,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1980_specific,
#ifdef CONFIG_PM
-@@ -2255,7 +2255,7 @@ static int patch_ad1985_specific(struct
+@@ -2255,7 +2255,7 @@ static int patch_ad1985_specific(struct snd_ac97 *ac97)
ARRAY_SIZE(snd_ac97_ad1985_controls));
}
@@ -82208,7 +84614,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1985_specific,
#ifdef CONFIG_PM
-@@ -2547,7 +2547,7 @@ static int patch_ad1986_specific(struct
+@@ -2547,7 +2547,7 @@ static int patch_ad1986_specific(struct snd_ac97 *ac97)
ARRAY_SIZE(snd_ac97_ad1985_controls));
}
@@ -82217,7 +84623,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_post_spdif = patch_ad198x_post_spdif,
.build_specific = patch_ad1986_specific,
#ifdef CONFIG_PM
-@@ -2652,7 +2652,7 @@ static int patch_alc650_specific(struct
+@@ -2652,7 +2652,7 @@ static int patch_alc650_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82226,7 +84632,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_alc650_specific,
.update_jacks = alc650_update_jacks
};
-@@ -2804,7 +2804,7 @@ static int patch_alc655_specific(struct
+@@ -2804,7 +2804,7 @@ static int patch_alc655_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82235,7 +84641,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_alc655_specific,
.update_jacks = alc655_update_jacks
};
-@@ -2916,7 +2916,7 @@ static int patch_alc850_specific(struct
+@@ -2916,7 +2916,7 @@ static int patch_alc850_specific(struct snd_ac97 *ac97)
return 0;
}
@@ -82244,7 +84650,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_alc850_specific,
.update_jacks = alc850_update_jacks
};
-@@ -2978,7 +2978,7 @@ static int patch_cm9738_specific(struct
+@@ -2978,7 +2978,7 @@ static int patch_cm9738_specific(struct snd_ac97 * ac97)
return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
}
@@ -82253,7 +84659,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_cm9738_specific,
.update_jacks = cm9738_update_jacks
};
-@@ -3069,7 +3069,7 @@ static int patch_cm9739_post_spdif(struc
+@@ -3069,7 +3069,7 @@ static int patch_cm9739_post_spdif(struct snd_ac97 * ac97)
return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
}
@@ -82262,7 +84668,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_cm9739_specific,
.build_post_spdif = patch_cm9739_post_spdif,
.update_jacks = cm9739_update_jacks
-@@ -3243,7 +3243,7 @@ static int patch_cm9761_specific(struct
+@@ -3243,7 +3243,7 @@ static int patch_cm9761_specific(struct snd_ac97 * ac97)
return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
}
@@ -82271,7 +84677,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_cm9761_specific,
.build_post_spdif = patch_cm9761_post_spdif,
.update_jacks = cm9761_update_jacks
-@@ -3339,7 +3339,7 @@ static int patch_cm9780_specific(struct
+@@ -3339,7 +3339,7 @@ static int patch_cm9780_specific(struct snd_ac97 *ac97)
return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
}
@@ -82280,7 +84686,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_cm9780_specific,
.build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */
};
-@@ -3459,7 +3459,7 @@ static int patch_vt1616_specific(struct
+@@ -3459,7 +3459,7 @@ static int patch_vt1616_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82289,7 +84695,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_vt1616_specific
};
-@@ -3813,7 +3813,7 @@ static int patch_it2646_specific(struct
+@@ -3813,7 +3813,7 @@ static int patch_it2646_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82298,7 +84704,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_it2646_specific,
.update_jacks = it2646_update_jacks
};
-@@ -3847,7 +3847,7 @@ static int patch_si3036_specific(struct
+@@ -3847,7 +3847,7 @@ static int patch_si3036_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82307,7 +84713,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_si3036_specific,
};
-@@ -3914,7 +3914,7 @@ static int patch_ucb1400_specific(struct
+@@ -3914,7 +3914,7 @@ static int patch_ucb1400_specific(struct snd_ac97 * ac97)
return 0;
}
@@ -82316,9 +84722,10 @@ diff -urNp linux-2.6.32.49/sound/pci/ac97/ac97_patch.c linux-2.6.32.49/sound/pci
.build_specific = patch_ucb1400_specific,
};
-diff -urNp linux-2.6.32.49/sound/pci/hda/hda_codec.h linux-2.6.32.49/sound/pci/hda/hda_codec.h
---- linux-2.6.32.49/sound/pci/hda/hda_codec.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/hda/hda_codec.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
+index 99552fb..4dcc2c5 100644
+--- a/sound/pci/hda/hda_codec.h
++++ b/sound/pci/hda/hda_codec.h
@@ -580,7 +580,7 @@ struct hda_bus_ops {
/* notify power-up/down from codec to controller */
void (*pm_notify)(struct hda_bus *bus);
@@ -82354,10 +84761,11 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/hda_codec.h linux-2.6.32.49/sound/pci/h
/* PCM to create, set by patch_ops.build_pcms callback */
unsigned int num_pcms;
-diff -urNp linux-2.6.32.49/sound/pci/hda/patch_atihdmi.c linux-2.6.32.49/sound/pci/hda/patch_atihdmi.c
---- linux-2.6.32.49/sound/pci/hda/patch_atihdmi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/hda/patch_atihdmi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -177,7 +177,7 @@ static int patch_atihdmi(struct hda_code
+diff --git a/sound/pci/hda/patch_atihdmi.c b/sound/pci/hda/patch_atihdmi.c
+index fb684f0..2b11cea 100644
+--- a/sound/pci/hda/patch_atihdmi.c
++++ b/sound/pci/hda/patch_atihdmi.c
+@@ -177,7 +177,7 @@ static int patch_atihdmi(struct hda_codec *codec)
*/
spec->multiout.dig_out_nid = CVT_NID;
@@ -82366,10 +84774,11 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_atihdmi.c linux-2.6.32.49/sound/p
return 0;
}
-diff -urNp linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c
---- linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -511,10 +511,10 @@ static void hdmi_non_intrinsic_event(str
+diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c
+index 7c23016..c5bfdd7 100644
+--- a/sound/pci/hda/patch_intelhdmi.c
++++ b/sound/pci/hda/patch_intelhdmi.c
+@@ -511,10 +511,10 @@ static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res)
cp_ready);
/* TODO */
@@ -82384,7 +84793,7 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c linux-2.6.32.49/sound
}
-@@ -656,7 +656,7 @@ static int do_patch_intel_hdmi(struct hd
+@@ -656,7 +656,7 @@ static int do_patch_intel_hdmi(struct hda_codec *codec)
spec->multiout.dig_out_nid = cvt_nid;
codec->spec = spec;
@@ -82393,10 +84802,11 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_intelhdmi.c linux-2.6.32.49/sound
snd_hda_eld_proc_new(codec, &spec->sink_eld);
-diff -urNp linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c
---- linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c 2011-11-15 19:59:43.000000000 -0500
-@@ -367,7 +367,7 @@ static int patch_nvhdmi_8ch(struct hda_c
+diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
+index 6afdab0..68ed352 100644
+--- a/sound/pci/hda/patch_nvhdmi.c
++++ b/sound/pci/hda/patch_nvhdmi.c
+@@ -367,7 +367,7 @@ static int patch_nvhdmi_8ch(struct hda_codec *codec)
spec->multiout.max_channels = 8;
spec->multiout.dig_out_nid = Nv_Master_Convert_nid;
@@ -82405,7 +84815,7 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c linux-2.6.32.49/sound/pc
return 0;
}
-@@ -386,7 +386,7 @@ static int patch_nvhdmi_2ch(struct hda_c
+@@ -386,7 +386,7 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec)
spec->multiout.max_channels = 2;
spec->multiout.dig_out_nid = Nv_Master_Convert_nid;
@@ -82414,9 +84824,10 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_nvhdmi.c linux-2.6.32.49/sound/pc
return 0;
}
-diff -urNp linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c
---- linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
+index 01da10b..01bd71f 100644
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
@@ -5220,7 +5220,7 @@ again:
snd_hda_codec_write_cache(codec, nid, 0,
AC_VERB_SET_CONNECT_SEL, num_dacs);
@@ -82426,7 +84837,7 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c linux-2.6.32.49/sound/
codec->proc_widget_hook = stac92hd_proc_hook;
-@@ -5294,7 +5294,7 @@ static int patch_stac92hd71bxx(struct hd
+@@ -5294,7 +5294,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
@@ -82435,9 +84846,10 @@ diff -urNp linux-2.6.32.49/sound/pci/hda/patch_sigmatel.c linux-2.6.32.49/sound/
spec->num_pins = STAC92HD71BXX_NUM_PINS;
switch (codec->vendor_id) {
case 0x111d76b6:
-diff -urNp linux-2.6.32.49/sound/pci/ice1712/ice1712.h linux-2.6.32.49/sound/pci/ice1712/ice1712.h
---- linux-2.6.32.49/sound/pci/ice1712/ice1712.h 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/ice1712/ice1712.h 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
+index d063149..01599a4 100644
+--- a/sound/pci/ice1712/ice1712.h
++++ b/sound/pci/ice1712/ice1712.h
@@ -269,7 +269,7 @@ struct snd_ak4xxx_private {
unsigned int mask_flags; /* total mask bits */
struct snd_akm4xxx_ops {
@@ -82456,9 +84868,10 @@ diff -urNp linux-2.6.32.49/sound/pci/ice1712/ice1712.h linux-2.6.32.49/sound/pci
};
-diff -urNp linux-2.6.32.49/sound/pci/intel8x0m.c linux-2.6.32.49/sound/pci/intel8x0m.c
---- linux-2.6.32.49/sound/pci/intel8x0m.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/intel8x0m.c 2011-11-15 19:59:43.000000000 -0500
+diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
+index 9e7d12e..3e3bc64 100644
+--- a/sound/pci/intel8x0m.c
++++ b/sound/pci/intel8x0m.c
@@ -1264,7 +1264,7 @@ static struct shortname_table {
{ 0x5455, "ALi M5455" },
{ 0x746d, "AMD AMD8111" },
@@ -82468,10 +84881,11 @@ diff -urNp linux-2.6.32.49/sound/pci/intel8x0m.c linux-2.6.32.49/sound/pci/intel
};
static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
-diff -urNp linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c
---- linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -202,8 +202,8 @@ static void snd_ymfpci_hw_stop(struct sn
+diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
+index 5518371..45cf7ac 100644
+--- a/sound/pci/ymfpci/ymfpci_main.c
++++ b/sound/pci/ymfpci/ymfpci_main.c
+@@ -202,8 +202,8 @@ static void snd_ymfpci_hw_stop(struct snd_ymfpci *chip)
if ((snd_ymfpci_readl(chip, YDSXGR_STATUS) & 2) == 0)
break;
}
@@ -82482,7 +84896,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c linux-2.6.32.49/sound/
wake_up(&chip->interrupt_sleep);
}
__end:
-@@ -787,7 +787,7 @@ static void snd_ymfpci_irq_wait(struct s
+@@ -787,7 +787,7 @@ static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip)
continue;
init_waitqueue_entry(&wait, current);
add_wait_queue(&chip->interrupt_sleep, &wait);
@@ -82491,7 +84905,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c linux-2.6.32.49/sound/
schedule_timeout_uninterruptible(msecs_to_jiffies(50));
remove_wait_queue(&chip->interrupt_sleep, &wait);
}
-@@ -825,8 +825,8 @@ static irqreturn_t snd_ymfpci_interrupt(
+@@ -825,8 +825,8 @@ static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id)
snd_ymfpci_writel(chip, YDSXGR_MODE, mode);
spin_unlock(&chip->reg_lock);
@@ -82502,7 +84916,7 @@ diff -urNp linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c linux-2.6.32.49/sound/
wake_up(&chip->interrupt_sleep);
}
}
-@@ -2369,7 +2369,7 @@ int __devinit snd_ymfpci_create(struct s
+@@ -2369,7 +2369,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
spin_lock_init(&chip->reg_lock);
spin_lock_init(&chip->voice_lock);
init_waitqueue_head(&chip->interrupt_sleep);
@@ -82511,10 +84925,11 @@ diff -urNp linux-2.6.32.49/sound/pci/ymfpci/ymfpci_main.c linux-2.6.32.49/sound/
chip->card = card;
chip->pci = pci;
chip->irq = -1;
-diff -urNp linux-2.6.32.49/sound/soc/soc-core.c linux-2.6.32.49/sound/soc/soc-core.c
---- linux-2.6.32.49/sound/soc/soc-core.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/soc/soc-core.c 2011-11-15 19:59:43.000000000 -0500
-@@ -609,7 +609,7 @@ static int soc_pcm_trigger(struct snd_pc
+diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
+index 0a1b2f6..776bb19 100644
+--- a/sound/soc/soc-core.c
++++ b/sound/soc/soc-core.c
+@@ -609,7 +609,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
}
/* ASoC PCM operations */
@@ -82523,10 +84938,11 @@ diff -urNp linux-2.6.32.49/sound/soc/soc-core.c linux-2.6.32.49/sound/soc/soc-co
.open = soc_pcm_open,
.close = soc_codec_close,
.hw_params = soc_pcm_hw_params,
-diff -urNp linux-2.6.32.49/sound/usb/usbaudio.c linux-2.6.32.49/sound/usb/usbaudio.c
---- linux-2.6.32.49/sound/usb/usbaudio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/sound/usb/usbaudio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -963,12 +963,12 @@ static int snd_usb_pcm_playback_trigger(
+diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
+index 79633ea..9732e90 100644
+--- a/sound/usb/usbaudio.c
++++ b/sound/usb/usbaudio.c
+@@ -963,12 +963,12 @@ static int snd_usb_pcm_playback_trigger(struct snd_pcm_substream *substream,
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -82541,7 +84957,7 @@ diff -urNp linux-2.6.32.49/sound/usb/usbaudio.c linux-2.6.32.49/sound/usb/usbaud
return 0;
default:
return -EINVAL;
-@@ -985,15 +985,15 @@ static int snd_usb_pcm_capture_trigger(s
+@@ -985,15 +985,15 @@ static int snd_usb_pcm_capture_trigger(struct snd_pcm_substream *substream,
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
@@ -82560,7 +84976,7 @@ diff -urNp linux-2.6.32.49/sound/usb/usbaudio.c linux-2.6.32.49/sound/usb/usbaud
return 0;
default:
return -EINVAL;
-@@ -1542,7 +1542,7 @@ static int snd_usb_pcm_prepare(struct sn
+@@ -1542,7 +1542,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
/* for playback, submit the URBs now; otherwise, the first hwptr_done
* updates for all URBs would happen at the same time when starting */
if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -82569,7 +84985,7 @@ diff -urNp linux-2.6.32.49/sound/usb/usbaudio.c linux-2.6.32.49/sound/usb/usbaud
return start_urbs(subs, runtime);
} else
return 0;
-@@ -2228,14 +2228,14 @@ static void init_substream(struct snd_us
+@@ -2228,14 +2228,14 @@ static void init_substream(struct snd_usb_stream *as, int stream, struct audiofo
subs->direction = stream;
subs->dev = as->chip->dev;
if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL) {
@@ -82587,9 +85003,38 @@ diff -urNp linux-2.6.32.49/sound/usb/usbaudio.c linux-2.6.32.49/sound/usb/usbaud
break;
}
}
-diff -urNp linux-2.6.32.49/tools/gcc/checker_plugin.c linux-2.6.32.49/tools/gcc/checker_plugin.c
---- linux-2.6.32.49/tools/gcc/checker_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/checker_plugin.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile
+new file mode 100644
+index 0000000..b044b80
+--- /dev/null
++++ b/tools/gcc/Makefile
+@@ -0,0 +1,21 @@
++#CC := gcc
++#PLUGIN_SOURCE_FILES := pax_plugin.c
++#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
++GCCPLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
++#CFLAGS += -I$(GCCPLUGINS_DIR)/include -fPIC -O2 -Wall -W
++
++HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include
++
++hostlibs-y := constify_plugin.so
++hostlibs-$(CONFIG_PAX_MEMORY_STACKLEAK) += stackleak_plugin.so
++hostlibs-$(CONFIG_KALLOCSTAT_PLUGIN) += kallocstat_plugin.so
++hostlibs-$(CONFIG_PAX_KERNEXEC_PLUGIN) += kernexec_plugin.so
++hostlibs-$(CONFIG_CHECKER_PLUGIN) += checker_plugin.so
++
++always := $(hostlibs-y)
++
++constify_plugin-objs := constify_plugin.o
++stackleak_plugin-objs := stackleak_plugin.o
++kallocstat_plugin-objs := kallocstat_plugin.o
++kernexec_plugin-objs := kernexec_plugin.o
++checker_plugin-objs := checker_plugin.o
+diff --git a/tools/gcc/checker_plugin.c b/tools/gcc/checker_plugin.c
+new file mode 100644
+index 0000000..d41b5af
+--- /dev/null
++++ b/tools/gcc/checker_plugin.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -82758,13 +85203,15 @@ diff -urNp linux-2.6.32.49/tools/gcc/checker_plugin.c linux-2.6.32.49/tools/gcc/
+ if (TARGET_64BIT == 0)
+ return 0;
+
-+ register_callback (plugin_name, PLUGIN_PRAGMAS, register_checker_address_spaces, NULL);
++ register_callback(plugin_name, PLUGIN_PRAGMAS, register_checker_address_spaces, NULL);
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/tools/gcc/constify_plugin.c linux-2.6.32.49/tools/gcc/constify_plugin.c
---- linux-2.6.32.49/tools/gcc/constify_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/constify_plugin.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/tools/gcc/constify_plugin.c b/tools/gcc/constify_plugin.c
+new file mode 100644
+index 0000000..5b07edd
+--- /dev/null
++++ b/tools/gcc/constify_plugin.c
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2011 by Emese Revfy <re.emese@gmail.com>
@@ -83069,9 +85516,11 @@ diff -urNp linux-2.6.32.49/tools/gcc/constify_plugin.c linux-2.6.32.49/tools/gcc
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/tools/gcc/kallocstat_plugin.c linux-2.6.32.49/tools/gcc/kallocstat_plugin.c
---- linux-2.6.32.49/tools/gcc/kallocstat_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/kallocstat_plugin.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/tools/gcc/kallocstat_plugin.c b/tools/gcc/kallocstat_plugin.c
+new file mode 100644
+index 0000000..a5eabce
+--- /dev/null
++++ b/tools/gcc/kallocstat_plugin.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -83240,10 +85689,12 @@ diff -urNp linux-2.6.32.49/tools/gcc/kallocstat_plugin.c linux-2.6.32.49/tools/g
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc/kernexec_plugin.c
---- linux-2.6.32.49/tools/gcc/kernexec_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/kernexec_plugin.c 2011-11-18 18:01:52.000000000 -0500
-@@ -0,0 +1,275 @@
+diff --git a/tools/gcc/kernexec_plugin.c b/tools/gcc/kernexec_plugin.c
+new file mode 100644
+index 0000000..51f747e
+--- /dev/null
++++ b/tools/gcc/kernexec_plugin.c
+@@ -0,0 +1,348 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
+ * Licensed under the GPL v2
@@ -83287,13 +85738,17 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+int plugin_is_GPL_compatible;
+
+static struct plugin_info kernexec_plugin_info = {
-+ .version = "201111150100",
++ .version = "201111291120",
++ .help = "method=[bts|or]\tinstrumentation method\n"
+};
+
+static unsigned int execute_kernexec_fptr(void);
+static unsigned int execute_kernexec_retaddr(void);
+static bool kernexec_cmodel_check(void);
+
++static void (*kernexec_instrument_fptr)(gimple_stmt_iterator);
++static void (*kernexec_instrument_retaddr)(rtx);
++
+static struct gimple_opt_pass kernexec_fptr_pass = {
+ .pass = {
+ .type = GIMPLE_PASS,
@@ -83352,7 +85807,7 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+ * add special KERNEXEC instrumentation: force MSB of fptr to 1, which will produce
+ * a non-canonical address from a userland ptr and will just trigger a GPF on dereference
+ */
-+static void kernexec_instrument_fptr(gimple_stmt_iterator gsi)
++static void kernexec_instrument_fptr_bts(gimple_stmt_iterator gsi)
+{
+ gimple assign_intptr, assign_new_fptr, call_stmt;
+ tree intptr, old_fptr, new_fptr, kernexec_mask;
@@ -83361,27 +85816,59 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+ old_fptr = gimple_call_fn(call_stmt);
+
+ // create temporary unsigned long variable used for bitops and cast fptr to it
-+ intptr = create_tmp_var(long_unsigned_type_node, NULL);
++ intptr = create_tmp_var(long_unsigned_type_node, "kernexec_bts");
+ add_referenced_var(intptr);
+ mark_sym_for_renaming(intptr);
+ assign_intptr = gimple_build_assign(intptr, fold_convert(long_unsigned_type_node, old_fptr));
-+ update_stmt(assign_intptr);
+ gsi_insert_before(&gsi, assign_intptr, GSI_SAME_STMT);
++ update_stmt(assign_intptr);
+
+ // apply logical or to temporary unsigned long and bitmask
+ kernexec_mask = build_int_cstu(long_long_unsigned_type_node, 0x8000000000000000LL);
+// kernexec_mask = build_int_cstu(long_long_unsigned_type_node, 0xffffffff80000000LL);
+ assign_intptr = gimple_build_assign(intptr, fold_build2(BIT_IOR_EXPR, long_long_unsigned_type_node, intptr, kernexec_mask));
-+ update_stmt(assign_intptr);
+ gsi_insert_before(&gsi, assign_intptr, GSI_SAME_STMT);
++ update_stmt(assign_intptr);
+
+ // cast temporary unsigned long back to a temporary fptr variable
-+ new_fptr = create_tmp_var(TREE_TYPE(old_fptr), NULL);
++ new_fptr = create_tmp_var(TREE_TYPE(old_fptr), "kernexec");
+ add_referenced_var(new_fptr);
+ mark_sym_for_renaming(new_fptr);
+ assign_new_fptr = gimple_build_assign(new_fptr, fold_convert(TREE_TYPE(old_fptr), intptr));
-+ update_stmt(assign_new_fptr);
+ gsi_insert_before(&gsi, assign_new_fptr, GSI_SAME_STMT);
++ update_stmt(assign_new_fptr);
++
++ // replace call stmt fn with the new fptr
++ gimple_call_set_fn(call_stmt, new_fptr);
++ update_stmt(call_stmt);
++}
++
++static void kernexec_instrument_fptr_or(gimple_stmt_iterator gsi)
++{
++ gimple asm_or_stmt, call_stmt;
++ tree old_fptr, new_fptr, input, output;
++ VEC(tree, gc) *inputs = NULL;
++ VEC(tree, gc) *outputs = NULL;
++
++ call_stmt = gsi_stmt(gsi);
++ old_fptr = gimple_call_fn(call_stmt);
++
++ // create temporary fptr variable
++ new_fptr = create_tmp_var(TREE_TYPE(old_fptr), "kernexec_or");
++ add_referenced_var(new_fptr);
++ mark_sym_for_renaming(new_fptr);
++
++ // build asm volatile("orq %%r10, %0\n\t" : "=r"(new_fptr) : "0"(old_fptr));
++ input = build_tree_list(NULL_TREE, build_string(2, "0"));
++ input = chainon(NULL_TREE, build_tree_list(input, old_fptr));
++ output = build_tree_list(NULL_TREE, build_string(3, "=r"));
++ output = chainon(NULL_TREE, build_tree_list(output, new_fptr));
++ VEC_safe_push(tree, gc, inputs, input);
++ VEC_safe_push(tree, gc, outputs, output);
++ asm_or_stmt = gimple_build_asm_vec("orq %%r10, %0\n\t", inputs, outputs, NULL, NULL);
++ gimple_asm_set_volatile(asm_or_stmt, true);
++ gsi_insert_before(&gsi, asm_or_stmt, GSI_SAME_STMT);
++ update_stmt(asm_or_stmt);
+
+ // replace call stmt fn with the new fptr
+ gimple_call_set_fn(call_stmt, new_fptr);
@@ -83435,7 +85922,7 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+}
+
+// add special KERNEXEC instrumentation: btsq $63,(%rsp) just before retn
-+static void kernexec_instrument_retaddr(rtx insn)
++static void kernexec_instrument_retaddr_bts(rtx insn)
+{
+ rtx btsq;
+ rtvec argvec, constraintvec, labelvec;
@@ -83452,6 +85939,24 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+ emit_insn_before(btsq, insn);
+}
+
++// add special KERNEXEC instrumentation: orq %r10,(%rsp) just before retn
++static void kernexec_instrument_retaddr_or(rtx insn)
++{
++ rtx orq;
++ rtvec argvec, constraintvec, labelvec;
++ int line;
++
++ // create asm volatile("orq %%r10,(%%rsp)":::)
++ argvec = rtvec_alloc(0);
++ constraintvec = rtvec_alloc(0);
++ labelvec = rtvec_alloc(0);
++ line = expand_location(RTL_LOCATION(insn)).line;
++ orq = gen_rtx_ASM_OPERANDS(VOIDmode, "orq %%r10,(%%rsp)", empty_string, 0, argvec, constraintvec, labelvec, line);
++ MEM_VOLATILE_P(orq) = 1;
++// RTX_FRAME_RELATED_P(orq) = 1; // not for ASM_OPERANDS
++ emit_insn_before(orq, insn);
++}
++
+/*
+ * find all asm level function returns and forcibly set the highest bit of the return address
+ */
@@ -83508,45 +86013,41 @@ diff -urNp linux-2.6.32.49/tools/gcc/kernexec_plugin.c linux-2.6.32.49/tools/gcc
+
+ register_callback(plugin_name, PLUGIN_INFO, NULL, &kernexec_plugin_info);
+
-+ for (i = 0; i < argc; ++i)
-+ error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
-+
+ if (TARGET_64BIT == 0)
+ return 0;
+
++ for (i = 0; i < argc; ++i) {
++ if (!strcmp(argv[i].key, "method")) {
++ if (!argv[i].value) {
++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ continue;
++ }
++ if (!strcmp(argv[i].value, "bts")) {
++ kernexec_instrument_fptr = kernexec_instrument_fptr_bts;
++ kernexec_instrument_retaddr = kernexec_instrument_retaddr_bts;
++ } else if (!strcmp(argv[i].value, "or")) {
++ kernexec_instrument_fptr = kernexec_instrument_fptr_or;
++ kernexec_instrument_retaddr = kernexec_instrument_retaddr_or;
++ fix_register("r10", 1, 1);
++ } else
++ error(G_("invalid option argument '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, argv[i].value);
++ continue;
++ }
++ error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ }
++ if (!kernexec_instrument_fptr || !kernexec_instrument_retaddr)
++ error(G_("no instrumentation method was selected via '-fplugin-arg-%s-method'"), plugin_name);
++
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &kernexec_fptr_pass_info);
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &kernexec_retaddr_pass_info);
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/tools/gcc/Makefile linux-2.6.32.49/tools/gcc/Makefile
---- linux-2.6.32.49/tools/gcc/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/Makefile 2011-11-18 18:08:04.000000000 -0500
-@@ -0,0 +1,21 @@
-+#CC := gcc
-+#PLUGIN_SOURCE_FILES := pax_plugin.c
-+#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
-+GCCPLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
-+#CFLAGS += -I$(GCCPLUGINS_DIR)/include -fPIC -O2 -Wall -W
-+
-+HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include
-+
-+hostlibs-y := constify_plugin.so
-+hostlibs-$(CONFIG_PAX_MEMORY_STACKLEAK) += stackleak_plugin.so
-+hostlibs-$(CONFIG_KALLOCSTAT_PLUGIN) += kallocstat_plugin.so
-+hostlibs-$(CONFIG_PAX_KERNEXEC_PLUGIN) += kernexec_plugin.so
-+hostlibs-$(CONFIG_CHECKER_PLUGIN) += checker_plugin.so
-+
-+always := $(hostlibs-y)
-+
-+constify_plugin-objs := constify_plugin.o
-+stackleak_plugin-objs := stackleak_plugin.o
-+kallocstat_plugin-objs := kallocstat_plugin.o
-+kernexec_plugin-objs := kernexec_plugin.o
-+checker_plugin-objs := checker_plugin.o
-diff -urNp linux-2.6.32.49/tools/gcc/stackleak_plugin.c linux-2.6.32.49/tools/gcc/stackleak_plugin.c
---- linux-2.6.32.49/tools/gcc/stackleak_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.32.49/tools/gcc/stackleak_plugin.c 2011-11-18 18:01:52.000000000 -0500
+diff --git a/tools/gcc/stackleak_plugin.c b/tools/gcc/stackleak_plugin.c
+new file mode 100644
+index 0000000..41dd4b1
+--- /dev/null
++++ b/tools/gcc/stackleak_plugin.c
@@ -0,0 +1,291 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -83839,10 +86340,11 @@ diff -urNp linux-2.6.32.49/tools/gcc/stackleak_plugin.c linux-2.6.32.49/tools/gc
+
+ return 0;
+}
-diff -urNp linux-2.6.32.49/usr/gen_init_cpio.c linux-2.6.32.49/usr/gen_init_cpio.c
---- linux-2.6.32.49/usr/gen_init_cpio.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/usr/gen_init_cpio.c 2011-11-15 19:59:43.000000000 -0500
-@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name,
+diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
+index 83b3dde..835bee7 100644
+--- a/usr/gen_init_cpio.c
++++ b/usr/gen_init_cpio.c
+@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name, const char *location,
int retval;
int rc = -1;
int namesize;
@@ -83851,7 +86353,7 @@ diff -urNp linux-2.6.32.49/usr/gen_init_cpio.c linux-2.6.32.49/usr/gen_init_cpio
mode |= S_IFREG;
-@@ -383,9 +383,10 @@ static char *cpio_replace_env(char *new_
+@@ -383,9 +383,10 @@ static char *cpio_replace_env(char *new_location)
*env_var = *expanded = '\0';
strncat(env_var, start + 2, end - start - 2);
strncat(expanded, new_location, start - new_location);
@@ -83864,10 +86366,11 @@ diff -urNp linux-2.6.32.49/usr/gen_init_cpio.c linux-2.6.32.49/usr/gen_init_cpio
} else
break;
}
-diff -urNp linux-2.6.32.49/virt/kvm/kvm_main.c linux-2.6.32.49/virt/kvm/kvm_main.c
---- linux-2.6.32.49/virt/kvm/kvm_main.c 2011-11-08 19:02:43.000000000 -0500
-+++ linux-2.6.32.49/virt/kvm/kvm_main.c 2011-11-15 19:59:43.000000000 -0500
-@@ -2494,7 +2494,7 @@ asmlinkage void kvm_handle_fault_on_rebo
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index 4f3434f..159bc3e 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -2494,7 +2494,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void)
if (kvm_rebooting)
/* spin while reset goes on */
while (true)
@@ -83876,7 +86379,7 @@ diff -urNp linux-2.6.32.49/virt/kvm/kvm_main.c linux-2.6.32.49/virt/kvm/kvm_main
/* Fault while not rebooting. We want the trace. */
BUG();
}
-@@ -2714,7 +2714,7 @@ static void kvm_sched_out(struct preempt
+@@ -2714,7 +2714,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
kvm_arch_vcpu_put(vcpu);
}
@@ -83885,7 +86388,7 @@ diff -urNp linux-2.6.32.49/virt/kvm/kvm_main.c linux-2.6.32.49/virt/kvm/kvm_main
struct module *module)
{
int r;
-@@ -2767,15 +2767,17 @@ int kvm_init(void *opaque, unsigned int
+@@ -2767,15 +2767,17 @@ int kvm_init(void *opaque, unsigned int vcpu_size,
/* A kmem cache lets us meet the alignment requirements of fx_save. */
kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size,
__alignof__(struct kvm_vcpu),
diff --git a/3.1.4/0000_README b/3.1.4/0000_README
index 8bab127..933d2ae 100644
--- a/3.1.4/0000_README
+++ b/3.1.4/0000_README
@@ -7,7 +7,7 @@ Patch: 1003_linux-3.1.4.patch
From: http://www.kernel.org
Desc: Linux 3.1.4
-Patch: 4420_grsecurity-2.2.2-3.1.4-201112021740.patch
+Patch: 4420_grsecurity-2.2.2-3.1.4-201112041811.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/3.1.4/4420_grsecurity-2.2.2-3.1.4-201112021740.patch b/3.1.4/4420_grsecurity-2.2.2-3.1.4-201112041811.patch
index 511b7bc..5d26ec9 100644
--- a/3.1.4/4420_grsecurity-2.2.2-3.1.4-201112021740.patch
+++ b/3.1.4/4420_grsecurity-2.2.2-3.1.4-201112041811.patch
@@ -1,7 +1,373 @@
-diff -urNp linux-3.1.4/arch/alpha/include/asm/elf.h linux-3.1.4/arch/alpha/include/asm/elf.h
---- linux-3.1.4/arch/alpha/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/alpha/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
-@@ -90,6 +90,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/Documentation/dontdiff b/Documentation/dontdiff
+index dfa6fc6..0095943 100644
+--- a/Documentation/dontdiff
++++ b/Documentation/dontdiff
+@@ -5,6 +5,7 @@
+ *.cis
+ *.cpio
+ *.csp
++*.dbg
+ *.dsp
+ *.dvi
+ *.elf
+@@ -14,6 +15,7 @@
+ *.gcov
+ *.gen.S
+ *.gif
++*.gmo
+ *.grep
+ *.grp
+ *.gz
+@@ -48,9 +50,11 @@
+ *.tab.h
+ *.tex
+ *.ver
++*.vim
+ *.xml
+ *.xz
+ *_MODULES
++*_reg_safe.h
+ *_vga16.c
+ *~
+ \#*#
+@@ -70,6 +74,7 @@ Kerntypes
+ Module.markers
+ Module.symvers
+ PENDING
++PERF*
+ SCCS
+ System.map*
+ TAGS
+@@ -93,19 +98,24 @@ bounds.h
+ bsetup
+ btfixupprep
+ build
++builtin-policy.h
+ bvmlinux
+ bzImage*
+ capability_names.h
+ capflags.c
+ classlist.h*
++clut_vga16.c
++common-cmds.h
+ comp*.log
+ compile.h*
+ conf
+ config
+ config-*
+ config_data.h*
++config.c
+ config.mak
+ config.mak.autogen
++config.tmp
+ conmakehash
+ consolemap_deftbl.c*
+ cpustr.h
+@@ -119,6 +129,7 @@ dslm
+ elf2ecoff
+ elfconfig.h*
+ evergreen_reg_safe.h
++exception_policy.conf
+ fixdep
+ flask.h
+ fore200e_mkfirm
+@@ -126,12 +137,15 @@ fore200e_pca_fw.c*
+ gconf
+ gconf.glade.h
+ gen-devlist
++gen-kdb_cmds.c
+ gen_crc32table
+ gen_init_cpio
+ generated
+ genheaders
+ genksyms
+ *_gray256.c
++hash
++hid-example
+ hpet_example
+ hugepage-mmap
+ hugepage-shm
+@@ -146,7 +160,7 @@ int32.c
+ int4.c
+ int8.c
+ kallsyms
+-kconfig
++kern_constants.h
+ keywords.c
+ ksym.c*
+ ksym.h*
+@@ -154,7 +168,6 @@ kxgettext
+ lkc_defs.h
+ lex.c
+ lex.*.c
+-linux
+ logo_*.c
+ logo_*_clut224.c
+ logo_*_mono.c
+@@ -166,14 +179,15 @@ machtypes.h
+ map
+ map_hugetlb
+ maui_boot.h
+-media
+ mconf
++mdp
+ miboot*
+ mk_elfconfig
+ mkboot
+ mkbugboot
+ mkcpustr
+ mkdep
++mkpiggy
+ mkprep
+ mkregtable
+ mktables
+@@ -209,6 +223,7 @@ r300_reg_safe.h
+ r420_reg_safe.h
+ r600_reg_safe.h
+ recordmcount
++regdb.c
+ relocs
+ rlim_names.h
+ rn50_reg_safe.h
+@@ -219,6 +234,7 @@ setup
+ setup.bin
+ setup.elf
+ sImage
++slabinfo
+ sm_tbl*
+ split-include
+ syscalltab.h
+@@ -229,6 +245,7 @@ tftpboot.img
+ timeconst.h
+ times.h*
+ trix_boot.h
++user_constants.h
+ utsrelease.h*
+ vdso-syms.lds
+ vdso.lds
+@@ -246,7 +263,9 @@ vmlinux
+ vmlinux-*
+ vmlinux.aout
+ vmlinux.bin.all
++vmlinux.bin.bz2
+ vmlinux.lds
++vmlinux.relocs
+ vmlinuz
+ voffset.h
+ vsyscall.lds
+@@ -254,9 +273,11 @@ vsyscall_32.lds
+ wanxlfw.inc
+ uImage
+ unifdef
++utsrelease.h
+ wakeup.bin
+ wakeup.elf
+ wakeup.lds
+ zImage*
+ zconf.hash.c
++zconf.lex.c
+ zoffset.h
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index d6e6724..a024ce8 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1898,6 +1898,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+ the specified number of seconds. This is to be used if
+ your oopses keep scrolling off the screen.
+
++ pax_nouderef [X86] disables UDEREF. Most likely needed under certain
++ virtualization environments that don't cope well with the
++ expand down segment used by UDEREF on X86-32 or the frequent
++ page table updates on X86-64.
++
++ pax_softmode= 0/1 to disable/enable PaX softmode on boot already.
++
+ pcbit= [HW,ISDN]
+
+ pcd. [PARIDE]
+diff --git a/Makefile b/Makefile
+index 7f8a93b..4435dc9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+
+ HOSTCC = gcc
+ HOSTCXX = g++
+-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
+-HOSTCXXFLAGS = -O2
++HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
++HOSTCLFAGS += $(call cc-option, -Wno-empty-body)
++HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
+
+ # Decide whether to build built-in, modular, or both.
+ # Normally, just do built-in.
+@@ -407,8 +408,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
+ # Rules shared between *config targets and build targets
+
+ # Basic helpers built in scripts/
+-PHONY += scripts_basic
+-scripts_basic:
++PHONY += scripts_basic gcc-plugins
++scripts_basic: gcc-plugins
+ $(Q)$(MAKE) $(build)=scripts/basic
+ $(Q)rm -f .tmp_quiet_recordmcount
+
+@@ -564,6 +565,42 @@ else
+ KBUILD_CFLAGS += -O2
+ endif
+
++ifndef DISABLE_PAX_PLUGINS
++ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)
++ifndef DISABLE_PAX_CONSTIFY_PLUGIN
++CONSTIFY_PLUGIN := -fplugin=$(objtree)/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN
++endif
++ifdef CONFIG_PAX_MEMORY_STACKLEAK
++STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -DSTACKLEAK_PLUGIN
++STACKLEAK_PLUGIN += -fplugin-arg-stackleak_plugin-track-lowest-sp=100
++endif
++ifdef CONFIG_KALLOCSTAT_PLUGIN
++KALLOCSTAT_PLUGIN := -fplugin=$(objtree)/tools/gcc/kallocstat_plugin.so
++endif
++ifdef CONFIG_PAX_KERNEXEC_PLUGIN
++KERNEXEC_PLUGIN := -fplugin=$(objtree)/tools/gcc/kernexec_plugin.so
++KERNEXEC_PLUGIN += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD)
++endif
++ifdef CONFIG_CHECKER_PLUGIN
++ifeq ($(call cc-ifversion, -ge, 0406, y), y)
++CHECKER_PLUGIN := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
++endif
++endif
++GCC_PLUGINS := $(CONSTIFY_PLUGIN) $(STACKLEAK_PLUGIN) $(KALLOCSTAT_PLUGIN) $(KERNEXEC_PLUGIN) $(CHECKER_PLUGIN)
++export CONSTIFY_PLUGIN STACKLEAK_PLUGIN KERNEXEC_PLUGIN CHECKER_PLUGIN
++gcc-plugins:
++ $(Q)$(MAKE) $(build)=tools/gcc
++else
++gcc-plugins:
++ifeq ($(call cc-ifversion, -ge, 0405, y), y)
++ $(error Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.))
++else
++ $(Q)echo "warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least"
++endif
++ $(Q)echo "PAX_MEMORY_STACKLEAK and other features will be less secure"
++endif
++endif
++
+ include $(srctree)/arch/$(SRCARCH)/Makefile
+
+ ifneq ($(CONFIG_FRAME_WARN),0)
+@@ -708,7 +745,7 @@ export mod_strip_cmd
+
+
+ ifeq ($(KBUILD_EXTMOD),)
+-core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
++core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
+
+ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
+ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+@@ -932,6 +969,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
+
+ # The actual objects are generated when descending,
+ # make sure no implicit rule kicks in
++$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): KBUILD_CFLAGS += $(GCC_PLUGINS)
+ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
+
+ # Handle descending into subdirectories listed in $(vmlinux-dirs)
+@@ -941,7 +979,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
+ # Error messages still appears in the original language
+
+ PHONY += $(vmlinux-dirs)
+-$(vmlinux-dirs): prepare scripts
++$(vmlinux-dirs): gcc-plugins prepare scripts
+ $(Q)$(MAKE) $(build)=$@
+
+ # Store (new) KERNELRELASE string in include/config/kernel.release
+@@ -986,6 +1024,7 @@ prepare0: archprepare FORCE
+ $(Q)$(MAKE) $(build)=. missing-syscalls
+
+ # All the preparing..
++prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS),$(KBUILD_CFLAGS))
+ prepare: prepare0
+
+ # Generate some files
+@@ -1087,6 +1126,7 @@ all: modules
+ # using awk while concatenating to the final file.
+
+ PHONY += modules
++modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
+ 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.';
+@@ -1102,7 +1142,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
+
+ # Target to prepare building external modules
+ PHONY += modules_prepare
+-modules_prepare: prepare scripts
++modules_prepare: gcc-plugins prepare scripts
+
+ # Target to install modules
+ PHONY += modules_install
+@@ -1198,7 +1238,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 -size 0 \
++ -o -name '.*.rej' -o -name '*.so' -o -size 0 \
+ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
+ -type f -print | xargs rm -f
+
+@@ -1360,6 +1400,7 @@ PHONY += $(module-dirs) modules
+ $(module-dirs): crmodverdir $(objtree)/Module.symvers
+ $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+
++modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
+ modules: $(module-dirs)
+ @$(kecho) ' Building modules, stage 2.';
+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+@@ -1486,17 +1527,19 @@ else
+ target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
+ endif
+
+-%.s: %.c prepare scripts FORCE
++%.s: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.s: %.c gcc-plugins 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: %.c prepare scripts FORCE
++%.o: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.o: %.c gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ %.lst: %.c prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+-%.s: %.S prepare scripts FORCE
++%.s: %.S gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+-%.o: %.S prepare scripts FORCE
++%.o: %.S gcc-plugins prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ %.symtypes: %.c prepare scripts FORCE
+ $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+@@ -1506,11 +1549,13 @@ endif
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir)
+-%/: prepare scripts FORCE
++%/: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%/: gcc-plugins prepare scripts FORCE
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir)
+-%.ko: prepare scripts FORCE
++%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS)
++%.ko: gcc-plugins prepare scripts FORCE
+ $(cmd_crmodverdir)
+ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ $(build)=$(build-dir) $(@:.ko=.o)
+diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
+index da5449e..7418343 100644
+--- a/arch/alpha/include/asm/elf.h
++++ b/arch/alpha/include/asm/elf.h
+@@ -90,6 +90,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
@@ -15,9 +381,10 @@ diff -urNp linux-3.1.4/arch/alpha/include/asm/elf.h linux-3.1.4/arch/alpha/inclu
/* $0 is set by ld.so to a pointer to a function which might be
registered using atexit. This provides a mean for the dynamic
linker to call DT_FINI functions for shared libraries that have
-diff -urNp linux-3.1.4/arch/alpha/include/asm/pgtable.h linux-3.1.4/arch/alpha/include/asm/pgtable.h
---- linux-3.1.4/arch/alpha/include/asm/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/alpha/include/asm/pgtable.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
+index de98a73..bd4f1f8 100644
+--- a/arch/alpha/include/asm/pgtable.h
++++ b/arch/alpha/include/asm/pgtable.h
@@ -101,6 +101,17 @@ struct vm_area_struct;
#define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
#define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
@@ -36,10 +403,11 @@ diff -urNp linux-3.1.4/arch/alpha/include/asm/pgtable.h linux-3.1.4/arch/alpha/i
#define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
-diff -urNp linux-3.1.4/arch/alpha/kernel/module.c linux-3.1.4/arch/alpha/kernel/module.c
---- linux-3.1.4/arch/alpha/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/alpha/kernel/module.c 2011-11-16 18:39:07.000000000 -0500
-@@ -160,7 +160,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
+diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
+index 2fd00b7..cfd5069 100644
+--- a/arch/alpha/kernel/module.c
++++ b/arch/alpha/kernel/module.c
+@@ -160,7 +160,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
/* The small sections were sorted to the end of the segment.
The following should definitely cover them. */
@@ -48,10 +416,11 @@ diff -urNp linux-3.1.4/arch/alpha/kernel/module.c linux-3.1.4/arch/alpha/kernel/
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
-diff -urNp linux-3.1.4/arch/alpha/kernel/osf_sys.c linux-3.1.4/arch/alpha/kernel/osf_sys.c
---- linux-3.1.4/arch/alpha/kernel/osf_sys.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/alpha/kernel/osf_sys.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1147,7 +1147,7 @@ arch_get_unmapped_area_1(unsigned long a
+diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
+index 01e8715..be0e80f 100644
+--- a/arch/alpha/kernel/osf_sys.c
++++ b/arch/alpha/kernel/osf_sys.c
+@@ -1147,7 +1147,7 @@ arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
@@ -60,7 +429,7 @@ diff -urNp linux-3.1.4/arch/alpha/kernel/osf_sys.c linux-3.1.4/arch/alpha/kernel
return addr;
addr = vma->vm_end;
vma = vma->vm_next;
-@@ -1183,6 +1183,10 @@ arch_get_unmapped_area(struct file *filp
+@@ -1183,6 +1183,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
@@ -71,7 +440,7 @@ diff -urNp linux-3.1.4/arch/alpha/kernel/osf_sys.c linux-3.1.4/arch/alpha/kernel
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != (unsigned long) -ENOMEM)
-@@ -1190,8 +1194,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1190,8 +1194,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
@@ -82,10 +451,11 @@ diff -urNp linux-3.1.4/arch/alpha/kernel/osf_sys.c linux-3.1.4/arch/alpha/kernel
if (addr != (unsigned long) -ENOMEM)
return addr;
-diff -urNp linux-3.1.4/arch/alpha/mm/fault.c linux-3.1.4/arch/alpha/mm/fault.c
---- linux-3.1.4/arch/alpha/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/alpha/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
-@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
+diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
+index fadd5f8..904e73a 100644
+--- a/arch/alpha/mm/fault.c
++++ b/arch/alpha/mm/fault.c
+@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *next_mm)
__reload_thread(pcb);
}
@@ -210,7 +580,7 @@ diff -urNp linux-3.1.4/arch/alpha/mm/fault.c linux-3.1.4/arch/alpha/mm/fault.c
/*
* This routine handles page faults. It determines the address,
-@@ -131,8 +249,29 @@ do_page_fault(unsigned long address, uns
+@@ -131,8 +249,29 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
good_area:
si_code = SEGV_ACCERR;
if (cause < 0) {
@@ -241,10 +611,11 @@ diff -urNp linux-3.1.4/arch/alpha/mm/fault.c linux-3.1.4/arch/alpha/mm/fault.c
} else if (!cause) {
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-3.1.4/arch/arm/include/asm/elf.h linux-3.1.4/arch/arm/include/asm/elf.h
---- linux-3.1.4/arch/arm/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
-@@ -116,7 +116,14 @@ int dump_task_regs(struct task_struct *t
+diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
+index 0e9ce8d..6ef1e03 100644
+--- a/arch/arm/include/asm/elf.h
++++ b/arch/arm/include/asm/elf.h
+@@ -116,7 +116,14 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -260,7 +631,7 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/elf.h linux-3.1.4/arch/arm/include/a
/* When the program starts, a1 contains a pointer to a function to be
registered with atexit, as per the SVR4 ABI. A value of 0 means we
-@@ -126,10 +133,6 @@ int dump_task_regs(struct task_struct *t
+@@ -126,10 +133,6 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
extern void elf_set_personality(const struct elf32_hdr *);
#define SET_PERSONALITY(ex) elf_set_personality(&(ex))
@@ -271,9 +642,10 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/elf.h linux-3.1.4/arch/arm/include/a
extern int vectors_user_mapping(void);
#define arch_setup_additional_pages(bprm, uses_interp) vectors_user_mapping()
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES
-diff -urNp linux-3.1.4/arch/arm/include/asm/kmap_types.h linux-3.1.4/arch/arm/include/asm/kmap_types.h
---- linux-3.1.4/arch/arm/include/asm/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/include/asm/kmap_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h
+index e51b1e8..32a3113 100644
+--- a/arch/arm/include/asm/kmap_types.h
++++ b/arch/arm/include/asm/kmap_types.h
@@ -21,6 +21,7 @@ enum km_type {
KM_L1_CACHE,
KM_L2_CACHE,
@@ -282,9 +654,10 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/kmap_types.h linux-3.1.4/arch/arm/in
KM_TYPE_NR
};
-diff -urNp linux-3.1.4/arch/arm/include/asm/uaccess.h linux-3.1.4/arch/arm/include/asm/uaccess.h
---- linux-3.1.4/arch/arm/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
+index b293616..96310e5 100644
+--- a/arch/arm/include/asm/uaccess.h
++++ b/arch/arm/include/asm/uaccess.h
@@ -22,6 +22,8 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1
@@ -320,7 +693,7 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/uaccess.h linux-3.1.4/arch/arm/inclu
extern unsigned long __must_check __copy_to_user_std(void __user *to, const void *from, unsigned long n);
extern unsigned long __must_check __clear_user(void __user *addr, unsigned long n);
extern unsigned long __must_check __clear_user_std(void __user *addr, unsigned long n);
-@@ -403,6 +420,9 @@ extern unsigned long __must_check __strn
+@@ -403,6 +420,9 @@ extern unsigned long __must_check __strnlen_user(const char __user *s, long n);
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -330,7 +703,7 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/uaccess.h linux-3.1.4/arch/arm/inclu
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
else /* security hole - plug it */
-@@ -412,6 +432,9 @@ static inline unsigned long __must_check
+@@ -412,6 +432,9 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -340,9 +713,10 @@ diff -urNp linux-3.1.4/arch/arm/include/asm/uaccess.h linux-3.1.4/arch/arm/inclu
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-diff -urNp linux-3.1.4/arch/arm/kernel/armksyms.c linux-3.1.4/arch/arm/kernel/armksyms.c
---- linux-3.1.4/arch/arm/kernel/armksyms.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/kernel/armksyms.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
+index aeef960..2966009 100644
+--- a/arch/arm/kernel/armksyms.c
++++ b/arch/arm/kernel/armksyms.c
@@ -98,8 +98,8 @@ EXPORT_SYMBOL(__strncpy_from_user);
#ifdef CONFIG_MMU
EXPORT_SYMBOL(copy_page);
@@ -354,9 +728,10 @@ diff -urNp linux-3.1.4/arch/arm/kernel/armksyms.c linux-3.1.4/arch/arm/kernel/ar
EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(__get_user_1);
-diff -urNp linux-3.1.4/arch/arm/kernel/process.c linux-3.1.4/arch/arm/kernel/process.c
---- linux-3.1.4/arch/arm/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
+index 1a347f4..8b4c8a1 100644
+--- a/arch/arm/kernel/process.c
++++ b/arch/arm/kernel/process.c
@@ -28,7 +28,6 @@
#include <linux/tick.h>
#include <linux/utsname.h>
@@ -365,7 +740,7 @@ diff -urNp linux-3.1.4/arch/arm/kernel/process.c linux-3.1.4/arch/arm/kernel/pro
#include <linux/hw_breakpoint.h>
#include <linux/cpuidle.h>
-@@ -481,12 +480,6 @@ unsigned long get_wchan(struct task_stru
+@@ -481,12 +480,6 @@ unsigned long get_wchan(struct task_struct *p)
return 0;
}
@@ -378,10 +753,11 @@ diff -urNp linux-3.1.4/arch/arm/kernel/process.c linux-3.1.4/arch/arm/kernel/pro
#ifdef CONFIG_MMU
/*
* The vectors page is always readable from user space for the
-diff -urNp linux-3.1.4/arch/arm/kernel/traps.c linux-3.1.4/arch/arm/kernel/traps.c
---- linux-3.1.4/arch/arm/kernel/traps.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/kernel/traps.c 2011-11-16 18:40:08.000000000 -0500
-@@ -257,6 +257,8 @@ static int __die(const char *str, int er
+diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
+index bc9f9da..c75d826 100644
+--- a/arch/arm/kernel/traps.c
++++ b/arch/arm/kernel/traps.c
+@@ -257,6 +257,8 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt
static DEFINE_SPINLOCK(die_lock);
@@ -390,7 +766,7 @@ diff -urNp linux-3.1.4/arch/arm/kernel/traps.c linux-3.1.4/arch/arm/kernel/traps
/*
* This function is protected against re-entrancy.
*/
-@@ -284,6 +286,9 @@ void die(const char *str, struct pt_regs
+@@ -284,6 +286,9 @@ void die(const char *str, struct pt_regs *regs, int err)
panic("Fatal exception in interrupt");
if (panic_on_oops)
panic("Fatal exception");
@@ -400,9 +776,10 @@ diff -urNp linux-3.1.4/arch/arm/kernel/traps.c linux-3.1.4/arch/arm/kernel/traps
if (ret != NOTIFY_STOP)
do_exit(SIGSEGV);
}
-diff -urNp linux-3.1.4/arch/arm/lib/copy_from_user.S linux-3.1.4/arch/arm/lib/copy_from_user.S
---- linux-3.1.4/arch/arm/lib/copy_from_user.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/lib/copy_from_user.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S
+index 66a477a..bee61d3 100644
+--- a/arch/arm/lib/copy_from_user.S
++++ b/arch/arm/lib/copy_from_user.S
@@ -16,7 +16,7 @@
/*
* Prototype:
@@ -426,9 +803,10 @@ diff -urNp linux-3.1.4/arch/arm/lib/copy_from_user.S linux-3.1.4/arch/arm/lib/co
.pushsection .fixup,"ax"
.align 0
-diff -urNp linux-3.1.4/arch/arm/lib/copy_to_user.S linux-3.1.4/arch/arm/lib/copy_to_user.S
---- linux-3.1.4/arch/arm/lib/copy_to_user.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/lib/copy_to_user.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S
+index d066df6..df28194 100644
+--- a/arch/arm/lib/copy_to_user.S
++++ b/arch/arm/lib/copy_to_user.S
@@ -16,7 +16,7 @@
/*
* Prototype:
@@ -452,9 +830,10 @@ diff -urNp linux-3.1.4/arch/arm/lib/copy_to_user.S linux-3.1.4/arch/arm/lib/copy
ENDPROC(__copy_to_user_std)
.pushsection .fixup,"ax"
-diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
---- linux-3.1.4/arch/arm/lib/uaccess.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/lib/uaccess.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S
+index d0ece2a..5ae2f39 100644
+--- a/arch/arm/lib/uaccess.S
++++ b/arch/arm/lib/uaccess.S
@@ -20,7 +20,7 @@
#define PAGE_SHIFT 12
@@ -464,7 +843,7 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
* Purpose : copy a block to user memory from kernel memory
* Params : to - user memory
* : from - kernel memory
-@@ -40,7 +40,7 @@ USER( T(strgtb) r3, [r0], #1) @ May f
+@@ -40,7 +40,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault
sub r2, r2, ip
b .Lc2u_dest_aligned
@@ -473,7 +852,7 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
stmfd sp!, {r2, r4 - r7, lr}
cmp r2, #4
blt .Lc2u_not_enough
-@@ -278,14 +278,14 @@ USER( T(strgeb) r3, [r0], #1) @ May f
+@@ -278,14 +278,14 @@ USER( T(strgeb) r3, [r0], #1) @ May fault
ldrgtb r3, [r1], #0
USER( T(strgtb) r3, [r0], #1) @ May fault
b .Lc2u_finished
@@ -490,7 +869,7 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
* Purpose : copy a block from user memory to kernel memory
* Params : to - kernel memory
* : from - user memory
-@@ -304,7 +304,7 @@ USER( T(ldrgtb) r3, [r1], #1) @ May f
+@@ -304,7 +304,7 @@ USER( T(ldrgtb) r3, [r1], #1) @ May fault
sub r2, r2, ip
b .Lcfu_dest_aligned
@@ -499,7 +878,7 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
stmfd sp!, {r0, r2, r4 - r7, lr}
cmp r2, #4
blt .Lcfu_not_enough
-@@ -544,7 +544,7 @@ USER( T(ldrgeb) r3, [r1], #1) @ May f
+@@ -544,7 +544,7 @@ USER( T(ldrgeb) r3, [r1], #1) @ May fault
USER( T(ldrgtb) r3, [r1], #1) @ May fault
strgtb r3, [r0], #1
b .Lcfu_finished
@@ -508,9 +887,10 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess.S linux-3.1.4/arch/arm/lib/uaccess.S
.pushsection .fixup,"ax"
.align 0
-diff -urNp linux-3.1.4/arch/arm/lib/uaccess_with_memcpy.c linux-3.1.4/arch/arm/lib/uaccess_with_memcpy.c
---- linux-3.1.4/arch/arm/lib/uaccess_with_memcpy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/lib/uaccess_with_memcpy.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
+index 8b9b136..70d5100 100644
+--- a/arch/arm/lib/uaccess_with_memcpy.c
++++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -103,7 +103,7 @@ out:
}
@@ -520,10 +900,11 @@ diff -urNp linux-3.1.4/arch/arm/lib/uaccess_with_memcpy.c linux-3.1.4/arch/arm/l
{
/*
* This test is stubbed out of the main function above to keep
-diff -urNp linux-3.1.4/arch/arm/mach-ux500/mbox-db5500.c linux-3.1.4/arch/arm/mach-ux500/mbox-db5500.c
---- linux-3.1.4/arch/arm/mach-ux500/mbox-db5500.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/mach-ux500/mbox-db5500.c 2011-11-16 18:40:08.000000000 -0500
-@@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct dev
+diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c
+index 2b2d51c..0127490 100644
+--- a/arch/arm/mach-ux500/mbox-db5500.c
++++ b/arch/arm/mach-ux500/mbox-db5500.c
+@@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct device *dev,
return sprintf(buf, "0x%X\n", mbox_value);
}
@@ -532,10 +913,11 @@ diff -urNp linux-3.1.4/arch/arm/mach-ux500/mbox-db5500.c linux-3.1.4/arch/arm/ma
static int mbox_show(struct seq_file *s, void *data)
{
-diff -urNp linux-3.1.4/arch/arm/mm/fault.c linux-3.1.4/arch/arm/mm/fault.c
---- linux-3.1.4/arch/arm/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
-@@ -182,6 +182,13 @@ __do_user_fault(struct task_struct *tsk,
+diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
+index 3b5ea68..42fc9af 100644
+--- a/arch/arm/mm/fault.c
++++ b/arch/arm/mm/fault.c
+@@ -182,6 +182,13 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
}
#endif
@@ -549,7 +931,7 @@ diff -urNp linux-3.1.4/arch/arm/mm/fault.c linux-3.1.4/arch/arm/mm/fault.c
tsk->thread.address = addr;
tsk->thread.error_code = fsr;
tsk->thread.trap_no = 14;
-@@ -383,6 +390,33 @@ do_page_fault(unsigned long addr, unsign
+@@ -383,6 +390,33 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
}
#endif /* CONFIG_MMU */
@@ -583,10 +965,11 @@ diff -urNp linux-3.1.4/arch/arm/mm/fault.c linux-3.1.4/arch/arm/mm/fault.c
/*
* First Level Translation Fault Handler
*
-diff -urNp linux-3.1.4/arch/arm/mm/mmap.c linux-3.1.4/arch/arm/mm/mmap.c
---- linux-3.1.4/arch/arm/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/arm/mm/mmap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -65,6 +65,10 @@ arch_get_unmapped_area(struct file *filp
+diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
+index 74be05f..f605b8c 100644
+--- a/arch/arm/mm/mmap.c
++++ b/arch/arm/mm/mmap.c
+@@ -65,6 +65,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (len > TASK_SIZE)
return -ENOMEM;
@@ -597,7 +980,7 @@ diff -urNp linux-3.1.4/arch/arm/mm/mmap.c linux-3.1.4/arch/arm/mm/mmap.c
if (addr) {
if (do_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -72,15 +76,14 @@ arch_get_unmapped_area(struct file *filp
+@@ -72,15 +76,14 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -635,10 +1018,11 @@ diff -urNp linux-3.1.4/arch/arm/mm/mmap.c linux-3.1.4/arch/arm/mm/mmap.c
/*
* Remember the place where we stopped the search:
*/
-diff -urNp linux-3.1.4/arch/avr32/include/asm/elf.h linux-3.1.4/arch/avr32/include/asm/elf.h
---- linux-3.1.4/arch/avr32/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/avr32/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
-@@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpreg
+diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
+index 3b3159b..425ea94 100644
+--- a/arch/avr32/include/asm/elf.h
++++ b/arch/avr32/include/asm/elf.h
+@@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpregset_t;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -654,9 +1038,10 @@ diff -urNp linux-3.1.4/arch/avr32/include/asm/elf.h linux-3.1.4/arch/avr32/inclu
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This could be done in user space,
-diff -urNp linux-3.1.4/arch/avr32/include/asm/kmap_types.h linux-3.1.4/arch/avr32/include/asm/kmap_types.h
---- linux-3.1.4/arch/avr32/include/asm/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/avr32/include/asm/kmap_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/avr32/include/asm/kmap_types.h b/arch/avr32/include/asm/kmap_types.h
+index b7f5c68..556135c 100644
+--- a/arch/avr32/include/asm/kmap_types.h
++++ b/arch/avr32/include/asm/kmap_types.h
@@ -22,7 +22,8 @@ D(10) KM_IRQ0,
D(11) KM_IRQ1,
D(12) KM_SOFTIRQ0,
@@ -667,10 +1052,11 @@ diff -urNp linux-3.1.4/arch/avr32/include/asm/kmap_types.h linux-3.1.4/arch/avr3
};
#undef D
-diff -urNp linux-3.1.4/arch/avr32/mm/fault.c linux-3.1.4/arch/avr32/mm/fault.c
---- linux-3.1.4/arch/avr32/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/avr32/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
-@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
+diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
+index f7040a1..db9f300 100644
+--- a/arch/avr32/mm/fault.c
++++ b/arch/avr32/mm/fault.c
+@@ -41,6 +41,23 @@ static inline int notify_page_fault(struct pt_regs *regs, int trap)
int exception_trace = 1;
@@ -711,9 +1097,10 @@ diff -urNp linux-3.1.4/arch/avr32/mm/fault.c linux-3.1.4/arch/avr32/mm/fault.c
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
-diff -urNp linux-3.1.4/arch/frv/include/asm/kmap_types.h linux-3.1.4/arch/frv/include/asm/kmap_types.h
---- linux-3.1.4/arch/frv/include/asm/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/frv/include/asm/kmap_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/frv/include/asm/kmap_types.h b/arch/frv/include/asm/kmap_types.h
+index f8e16b2..c73ff79 100644
+--- a/arch/frv/include/asm/kmap_types.h
++++ b/arch/frv/include/asm/kmap_types.h
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -722,10 +1109,11 @@ diff -urNp linux-3.1.4/arch/frv/include/asm/kmap_types.h linux-3.1.4/arch/frv/in
KM_TYPE_NR
};
-diff -urNp linux-3.1.4/arch/frv/mm/elf-fdpic.c linux-3.1.4/arch/frv/mm/elf-fdpic.c
---- linux-3.1.4/arch/frv/mm/elf-fdpic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/frv/mm/elf-fdpic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c
+index 385fd30..6c3d97e 100644
+--- a/arch/frv/mm/elf-fdpic.c
++++ b/arch/frv/mm/elf-fdpic.c
+@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (addr) {
addr = PAGE_ALIGN(addr);
vma = find_vma(current->mm, addr);
@@ -735,7 +1123,7 @@ diff -urNp linux-3.1.4/arch/frv/mm/elf-fdpic.c linux-3.1.4/arch/frv/mm/elf-fdpic
goto success;
}
-@@ -89,7 +88,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -89,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
for (; vma; vma = vma->vm_next) {
if (addr > limit)
break;
@@ -744,7 +1132,7 @@ diff -urNp linux-3.1.4/arch/frv/mm/elf-fdpic.c linux-3.1.4/arch/frv/mm/elf-fdpic
goto success;
addr = vma->vm_end;
}
-@@ -104,7 +103,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -104,7 +103,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
for (; vma; vma = vma->vm_next) {
if (addr > limit)
break;
@@ -753,9 +1141,10 @@ diff -urNp linux-3.1.4/arch/frv/mm/elf-fdpic.c linux-3.1.4/arch/frv/mm/elf-fdpic
goto success;
addr = vma->vm_end;
}
-diff -urNp linux-3.1.4/arch/ia64/include/asm/elf.h linux-3.1.4/arch/ia64/include/asm/elf.h
---- linux-3.1.4/arch/ia64/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
+index b5298eb..67c6e62 100644
+--- a/arch/ia64/include/asm/elf.h
++++ b/arch/ia64/include/asm/elf.h
@@ -42,6 +42,13 @@
*/
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL)
@@ -770,9 +1159,10 @@ diff -urNp linux-3.1.4/arch/ia64/include/asm/elf.h linux-3.1.4/arch/ia64/include
#define PT_IA_64_UNWIND 0x70000001
/* IA-64 relocations: */
-diff -urNp linux-3.1.4/arch/ia64/include/asm/pgtable.h linux-3.1.4/arch/ia64/include/asm/pgtable.h
---- linux-3.1.4/arch/ia64/include/asm/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/include/asm/pgtable.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
+index 1a97af3..7529d31 100644
+--- a/arch/ia64/include/asm/pgtable.h
++++ b/arch/ia64/include/asm/pgtable.h
@@ -12,7 +12,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
@@ -800,10 +1190,11 @@ diff -urNp linux-3.1.4/arch/ia64/include/asm/pgtable.h linux-3.1.4/arch/ia64/inc
#define PAGE_GATE __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_X_RX)
#define PAGE_KERNEL __pgprot(__DIRTY_BITS | _PAGE_PL_0 | _PAGE_AR_RWX)
#define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX)
-diff -urNp linux-3.1.4/arch/ia64/include/asm/spinlock.h linux-3.1.4/arch/ia64/include/asm/spinlock.h
---- linux-3.1.4/arch/ia64/include/asm/spinlock.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/include/asm/spinlock.h 2011-11-16 18:39:07.000000000 -0500
-@@ -72,7 +72,7 @@ static __always_inline void __ticket_spi
+diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
+index b77768d..e0795eb 100644
+--- a/arch/ia64/include/asm/spinlock.h
++++ b/arch/ia64/include/asm/spinlock.h
+@@ -72,7 +72,7 @@ static __always_inline void __ticket_spin_unlock(arch_spinlock_t *lock)
unsigned short *p = (unsigned short *)&lock->lock + 1, tmp;
asm volatile ("ld2.bias %0=[%1]" : "=r"(tmp) : "r"(p));
@@ -812,10 +1203,11 @@ diff -urNp linux-3.1.4/arch/ia64/include/asm/spinlock.h linux-3.1.4/arch/ia64/in
}
static __always_inline void __ticket_spin_unlock_wait(arch_spinlock_t *lock)
-diff -urNp linux-3.1.4/arch/ia64/include/asm/uaccess.h linux-3.1.4/arch/ia64/include/asm/uaccess.h
---- linux-3.1.4/arch/ia64/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
-@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _
+diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h
+index 449c8c0..432a3d2 100644
+--- a/arch/ia64/include/asm/uaccess.h
++++ b/arch/ia64/include/asm/uaccess.h
+@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
const void *__cu_from = (from); \
long __cu_len = (n); \
\
@@ -824,7 +1216,7 @@ diff -urNp linux-3.1.4/arch/ia64/include/asm/uaccess.h linux-3.1.4/arch/ia64/inc
__cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \
__cu_len; \
})
-@@ -269,7 +269,7 @@ __copy_from_user (void *to, const void _
+@@ -269,7 +269,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
long __cu_len = (n); \
\
__chk_user_ptr(__cu_from); \
@@ -833,9 +1225,10 @@ diff -urNp linux-3.1.4/arch/ia64/include/asm/uaccess.h linux-3.1.4/arch/ia64/inc
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
__cu_len; \
})
-diff -urNp linux-3.1.4/arch/ia64/kernel/module.c linux-3.1.4/arch/ia64/kernel/module.c
---- linux-3.1.4/arch/ia64/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/kernel/module.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
+index 24603be..948052d 100644
+--- a/arch/ia64/kernel/module.c
++++ b/arch/ia64/kernel/module.c
@@ -307,8 +307,7 @@ plt_target (struct plt_entry *plt)
void
module_free (struct module *mod, void *module_region)
@@ -846,7 +1239,7 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/module.c linux-3.1.4/arch/ia64/kernel/mo
unw_remove_unwind_table(mod->arch.init_unw_table);
mod->arch.init_unw_table = NULL;
}
-@@ -494,15 +493,39 @@ module_frob_arch_sections (Elf_Ehdr *ehd
+@@ -494,15 +493,39 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
}
static inline int
@@ -888,7 +1281,7 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/module.c linux-3.1.4/arch/ia64/kernel/mo
}
static inline int
-@@ -685,7 +708,14 @@ do_reloc (struct module *mod, uint8_t r_
+@@ -685,7 +708,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
break;
case RV_BDREL:
@@ -904,7 +1297,7 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/module.c linux-3.1.4/arch/ia64/kernel/mo
break;
case RV_LTV:
-@@ -820,15 +850,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs,
+@@ -820,15 +850,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
* addresses have been selected...
*/
uint64_t gp;
@@ -924,10 +1317,11 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/module.c linux-3.1.4/arch/ia64/kernel/mo
mod->arch.gp = gp;
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
-diff -urNp linux-3.1.4/arch/ia64/kernel/sys_ia64.c linux-3.1.4/arch/ia64/kernel/sys_ia64.c
---- linux-3.1.4/arch/ia64/kernel/sys_ia64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/kernel/sys_ia64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
+diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
+index 609d500..7dde2a8 100644
+--- a/arch/ia64/kernel/sys_ia64.c
++++ b/arch/ia64/kernel/sys_ia64.c
+@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
#endif
@@ -941,7 +1335,7 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/sys_ia64.c linux-3.1.4/arch/ia64/kernel/
if (!addr)
addr = mm->free_area_cache;
-@@ -61,14 +68,14 @@ arch_get_unmapped_area (struct file *fil
+@@ -61,14 +68,14 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
@@ -959,9 +1353,10 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/sys_ia64.c linux-3.1.4/arch/ia64/kernel/
/* Remember the address where we stopped this search: */
mm->free_area_cache = addr + len;
return addr;
-diff -urNp linux-3.1.4/arch/ia64/kernel/vmlinux.lds.S linux-3.1.4/arch/ia64/kernel/vmlinux.lds.S
---- linux-3.1.4/arch/ia64/kernel/vmlinux.lds.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/kernel/vmlinux.lds.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
+index 53c0ba0..2accdde 100644
+--- a/arch/ia64/kernel/vmlinux.lds.S
++++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -199,7 +199,7 @@ SECTIONS {
/* Per-cpu data: */
. = ALIGN(PERCPU_PAGE_SIZE);
@@ -971,10 +1366,11 @@ diff -urNp linux-3.1.4/arch/ia64/kernel/vmlinux.lds.S linux-3.1.4/arch/ia64/kern
/*
* ensure percpu data fits
* into percpu page size
-diff -urNp linux-3.1.4/arch/ia64/mm/fault.c linux-3.1.4/arch/ia64/mm/fault.c
---- linux-3.1.4/arch/ia64/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
-@@ -73,6 +73,23 @@ mapped_kernel_page_is_present (unsigned
+diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
+index 20b3593..1ce77f0 100644
+--- a/arch/ia64/mm/fault.c
++++ b/arch/ia64/mm/fault.c
+@@ -73,6 +73,23 @@ mapped_kernel_page_is_present (unsigned long address)
return pte_present(pte);
}
@@ -998,7 +1394,7 @@ diff -urNp linux-3.1.4/arch/ia64/mm/fault.c linux-3.1.4/arch/ia64/mm/fault.c
void __kprobes
ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *regs)
{
-@@ -146,9 +163,23 @@ ia64_do_page_fault (unsigned long addres
+@@ -146,9 +163,23 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
mask = ( (((isr >> IA64_ISR_X_BIT) & 1UL) << VM_EXEC_BIT)
| (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT));
@@ -1023,10 +1419,11 @@ diff -urNp linux-3.1.4/arch/ia64/mm/fault.c linux-3.1.4/arch/ia64/mm/fault.c
/*
* If for any reason at all we couldn't handle the fault, make
* sure we exit gracefully rather than endlessly redo the
-diff -urNp linux-3.1.4/arch/ia64/mm/hugetlbpage.c linux-3.1.4/arch/ia64/mm/hugetlbpage.c
---- linux-3.1.4/arch/ia64/mm/hugetlbpage.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/mm/hugetlbpage.c 2011-11-16 18:39:07.000000000 -0500
-@@ -171,7 +171,7 @@ unsigned long hugetlb_get_unmapped_area(
+diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
+index 5ca674b..e0e1b70 100644
+--- a/arch/ia64/mm/hugetlbpage.c
++++ b/arch/ia64/mm/hugetlbpage.c
+@@ -171,7 +171,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
/* At this point: (!vmm || addr < vmm->vm_end). */
if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
return -ENOMEM;
@@ -1035,9 +1432,10 @@ diff -urNp linux-3.1.4/arch/ia64/mm/hugetlbpage.c linux-3.1.4/arch/ia64/mm/huget
return addr;
addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
}
-diff -urNp linux-3.1.4/arch/ia64/mm/init.c linux-3.1.4/arch/ia64/mm/init.c
---- linux-3.1.4/arch/ia64/mm/init.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/ia64/mm/init.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
+index 00cb0e2..2ad8024 100644
+--- a/arch/ia64/mm/init.c
++++ b/arch/ia64/mm/init.c
@@ -120,6 +120,19 @@ ia64_init_addr_space (void)
vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -1058,9 +1456,10 @@ diff -urNp linux-3.1.4/arch/ia64/mm/init.c linux-3.1.4/arch/ia64/mm/init.c
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(&current->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-3.1.4/arch/m32r/lib/usercopy.c linux-3.1.4/arch/m32r/lib/usercopy.c
---- linux-3.1.4/arch/m32r/lib/usercopy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/m32r/lib/usercopy.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c
+index 82abd15..d95ae5d 100644
+--- a/arch/m32r/lib/usercopy.c
++++ b/arch/m32r/lib/usercopy.c
@@ -14,6 +14,9 @@
unsigned long
__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -1071,7 +1470,7 @@ diff -urNp linux-3.1.4/arch/m32r/lib/usercopy.c linux-3.1.4/arch/m32r/lib/userco
prefetch(from);
if (access_ok(VERIFY_WRITE, to, n))
__copy_user(to,from,n);
-@@ -23,6 +26,9 @@ __generic_copy_to_user(void __user *to,
+@@ -23,6 +26,9 @@ __generic_copy_to_user(void __user *to, const void *from, unsigned long n)
unsigned long
__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -1081,9 +1480,10 @@ diff -urNp linux-3.1.4/arch/m32r/lib/usercopy.c linux-3.1.4/arch/m32r/lib/userco
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
-diff -urNp linux-3.1.4/arch/mips/include/asm/elf.h linux-3.1.4/arch/mips/include/asm/elf.h
---- linux-3.1.4/arch/mips/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
+index 455c0ac..ad65fbe 100644
+--- a/arch/mips/include/asm/elf.h
++++ b/arch/mips/include/asm/elf.h
@@ -372,13 +372,16 @@ extern const char *__elf_platform;
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
@@ -1105,10 +1505,11 @@ diff -urNp linux-3.1.4/arch/mips/include/asm/elf.h linux-3.1.4/arch/mips/include
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_ELF_H */
-diff -urNp linux-3.1.4/arch/mips/include/asm/page.h linux-3.1.4/arch/mips/include/asm/page.h
---- linux-3.1.4/arch/mips/include/asm/page.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/include/asm/page.h 2011-11-16 18:39:07.000000000 -0500
-@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct pa
+diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
+index e59cd1a..8e329d6 100644
+--- a/arch/mips/include/asm/page.h
++++ b/arch/mips/include/asm/page.h
+@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct page *to, struct page *from,
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
@@ -1117,9 +1518,10 @@ diff -urNp linux-3.1.4/arch/mips/include/asm/page.h linux-3.1.4/arch/mips/includ
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
-diff -urNp linux-3.1.4/arch/mips/include/asm/system.h linux-3.1.4/arch/mips/include/asm/system.h
---- linux-3.1.4/arch/mips/include/asm/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/include/asm/system.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
+index 6018c80..7c37203 100644
+--- a/arch/mips/include/asm/system.h
++++ b/arch/mips/include/asm/system.h
@@ -230,6 +230,6 @@ extern void per_cpu_trap_init(void);
*/
#define __ARCH_WANT_UNLOCKED_CTXSW
@@ -1128,10 +1530,11 @@ diff -urNp linux-3.1.4/arch/mips/include/asm/system.h linux-3.1.4/arch/mips/incl
+#define arch_align_stack(x) ((x) & ~0xfUL)
#endif /* _ASM_SYSTEM_H */
-diff -urNp linux-3.1.4/arch/mips/kernel/binfmt_elfn32.c linux-3.1.4/arch/mips/kernel/binfmt_elfn32.c
---- linux-3.1.4/arch/mips/kernel/binfmt_elfn32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/kernel/binfmt_elfn32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
+index 9fdd8bc..4bd7f1a 100644
+--- a/arch/mips/kernel/binfmt_elfn32.c
++++ b/arch/mips/kernel/binfmt_elfn32.c
+@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1145,10 +1548,11 @@ diff -urNp linux-3.1.4/arch/mips/kernel/binfmt_elfn32.c linux-3.1.4/arch/mips/ke
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-3.1.4/arch/mips/kernel/binfmt_elfo32.c linux-3.1.4/arch/mips/kernel/binfmt_elfo32.c
---- linux-3.1.4/arch/mips/kernel/binfmt_elfo32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/kernel/binfmt_elfo32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
+diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
+index ff44823..97f8906 100644
+--- a/arch/mips/kernel/binfmt_elfo32.c
++++ b/arch/mips/kernel/binfmt_elfo32.c
+@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1162,10 +1566,11 @@ diff -urNp linux-3.1.4/arch/mips/kernel/binfmt_elfo32.c linux-3.1.4/arch/mips/ke
#include <asm/processor.h>
/*
-diff -urNp linux-3.1.4/arch/mips/kernel/process.c linux-3.1.4/arch/mips/kernel/process.c
---- linux-3.1.4/arch/mips/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
-@@ -481,15 +481,3 @@ unsigned long get_wchan(struct task_stru
+diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
+index b30cb25..454c0a9 100644
+--- a/arch/mips/kernel/process.c
++++ b/arch/mips/kernel/process.c
+@@ -481,15 +481,3 @@ unsigned long get_wchan(struct task_struct *task)
out:
return pc;
}
@@ -1181,9 +1586,10 @@ diff -urNp linux-3.1.4/arch/mips/kernel/process.c linux-3.1.4/arch/mips/kernel/p
-
- return sp & ALMASK;
-}
-diff -urNp linux-3.1.4/arch/mips/mm/fault.c linux-3.1.4/arch/mips/mm/fault.c
---- linux-3.1.4/arch/mips/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
+index 937cf33..adb39bb 100644
+--- a/arch/mips/mm/fault.c
++++ b/arch/mips/mm/fault.c
@@ -28,6 +28,23 @@
#include <asm/highmem.h> /* For VMALLOC_END */
#include <linux/kdebug.h>
@@ -1208,10 +1614,11 @@ diff -urNp linux-3.1.4/arch/mips/mm/fault.c linux-3.1.4/arch/mips/mm/fault.c
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
-diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
---- linux-3.1.4/arch/mips/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/mips/mm/mmap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -95,6 +95,11 @@ static unsigned long arch_get_unmapped_a
+diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
+index 302d779..7d35bf8 100644
+--- a/arch/mips/mm/mmap.c
++++ b/arch/mips/mm/mmap.c
+@@ -95,6 +95,11 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
do_color_align = 1;
/* requesting a specific address */
@@ -1223,7 +1630,7 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -102,8 +107,7 @@ static unsigned long arch_get_unmapped_a
+@@ -102,8 +107,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -1233,7 +1640,7 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
return addr;
}
-@@ -118,7 +122,7 @@ static unsigned long arch_get_unmapped_a
+@@ -118,7 +122,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
@@ -1242,7 +1649,7 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
return addr;
addr = vma->vm_end;
if (do_color_align)
-@@ -145,7 +149,7 @@ static unsigned long arch_get_unmapped_a
+@@ -145,7 +149,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr - len);
@@ -1251,7 +1658,7 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
/* cache the address as a hint for next time */
return mm->free_area_cache = addr - len;
}
-@@ -165,7 +169,7 @@ static unsigned long arch_get_unmapped_a
+@@ -165,7 +169,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -1260,7 +1667,7 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
/* cache the address as a hint for next time */
return mm->free_area_cache = addr;
}
-@@ -242,30 +246,3 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -242,30 +246,3 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
mm->unmap_area = arch_unmap_area_topdown;
}
}
@@ -1291,10 +1698,11 @@ diff -urNp linux-3.1.4/arch/mips/mm/mmap.c linux-3.1.4/arch/mips/mm/mmap.c
-
- return ret;
-}
-diff -urNp linux-3.1.4/arch/parisc/include/asm/elf.h linux-3.1.4/arch/parisc/include/asm/elf.h
---- linux-3.1.4/arch/parisc/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
-@@ -342,6 +342,13 @@ struct pt_regs; /* forward declaration..
+diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
+index 19f6cb1..6c78cf2 100644
+--- a/arch/parisc/include/asm/elf.h
++++ b/arch/parisc/include/asm/elf.h
+@@ -342,6 +342,13 @@ struct pt_regs; /* forward declaration... */
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
@@ -1308,9 +1716,10 @@ diff -urNp linux-3.1.4/arch/parisc/include/asm/elf.h linux-3.1.4/arch/parisc/inc
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This could be done in user space,
but it's not easy, and we've already done it here. */
-diff -urNp linux-3.1.4/arch/parisc/include/asm/pgtable.h linux-3.1.4/arch/parisc/include/asm/pgtable.h
---- linux-3.1.4/arch/parisc/include/asm/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/include/asm/pgtable.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
+index 22dadeb..f6c2be4 100644
+--- a/arch/parisc/include/asm/pgtable.h
++++ b/arch/parisc/include/asm/pgtable.h
@@ -210,6 +210,17 @@ struct vm_area_struct;
#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
#define PAGE_COPY PAGE_EXECREAD
@@ -1329,9 +1738,10 @@ diff -urNp linux-3.1.4/arch/parisc/include/asm/pgtable.h linux-3.1.4/arch/parisc
#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
#define PAGE_KERNEL_EXEC __pgprot(_PAGE_KERNEL_EXEC)
#define PAGE_KERNEL_RWX __pgprot(_PAGE_KERNEL_RWX)
-diff -urNp linux-3.1.4/arch/parisc/kernel/module.c linux-3.1.4/arch/parisc/kernel/module.c
---- linux-3.1.4/arch/parisc/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/kernel/module.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
+index 5e34ccf..672bc9c 100644
+--- a/arch/parisc/kernel/module.c
++++ b/arch/parisc/kernel/module.c
@@ -98,16 +98,38 @@
/* three functions to determine where in the module core
@@ -1375,28 +1785,27 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/module.c linux-3.1.4/arch/parisc/kerne
}
static inline int in_local(struct module *me, void *loc)
-@@ -373,13 +395,13 @@ int module_frob_arch_sections(CONST Elf_
+@@ -373,13 +395,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
}
/* align things a bit */
- me->core_size = ALIGN(me->core_size, 16);
- me->arch.got_offset = me->core_size;
- me->core_size += gots * sizeof(struct got_entry);
--
-- me->core_size = ALIGN(me->core_size, 16);
-- me->arch.fdesc_offset = me->core_size;
-- me->core_size += fdescs * sizeof(Elf_Fdesc);
+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
+ me->arch.got_offset = me->core_size_rw;
+ me->core_size_rw += gots * sizeof(struct got_entry);
-+
+
+- me->core_size = ALIGN(me->core_size, 16);
+- me->arch.fdesc_offset = me->core_size;
+- me->core_size += fdescs * sizeof(Elf_Fdesc);
+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
+ me->arch.fdesc_offset = me->core_size_rw;
+ me->core_size_rw += fdescs * sizeof(Elf_Fdesc);
me->arch.got_max = gots;
me->arch.fdesc_max = fdescs;
-@@ -397,7 +419,7 @@ static Elf64_Word get_got(struct module
+@@ -397,7 +419,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
BUG_ON(value == 0);
@@ -1405,7 +1814,7 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/module.c linux-3.1.4/arch/parisc/kerne
for (i = 0; got[i].addr; i++)
if (got[i].addr == value)
goto out;
-@@ -415,7 +437,7 @@ static Elf64_Word get_got(struct module
+@@ -415,7 +437,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
#ifdef CONFIG_64BIT
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{
@@ -1414,7 +1823,7 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/module.c linux-3.1.4/arch/parisc/kerne
if (!value) {
printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
-@@ -433,7 +455,7 @@ static Elf_Addr get_fdesc(struct module
+@@ -433,7 +455,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
/* Create new one */
fdesc->addr = value;
@@ -1432,10 +1841,11 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/module.c linux-3.1.4/arch/parisc/kerne
DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
me->arch.unwind_section, table, end, gp);
-diff -urNp linux-3.1.4/arch/parisc/kernel/sys_parisc.c linux-3.1.4/arch/parisc/kernel/sys_parisc.c
---- linux-3.1.4/arch/parisc/kernel/sys_parisc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/kernel/sys_parisc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(u
+diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
+index c9b9322..02d8940 100644
+--- a/arch/parisc/kernel/sys_parisc.c
++++ b/arch/parisc/kernel/sys_parisc.c
+@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(unsigned long addr, unsigned long len)
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
@@ -1444,7 +1854,7 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/sys_parisc.c linux-3.1.4/arch/parisc/k
return addr;
addr = vma->vm_end;
}
-@@ -79,7 +79,7 @@ static unsigned long get_shared_area(str
+@@ -79,7 +79,7 @@ static unsigned long get_shared_area(struct address_space *mapping,
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
return -ENOMEM;
@@ -1453,7 +1863,7 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/sys_parisc.c linux-3.1.4/arch/parisc/k
return addr;
addr = DCACHE_ALIGN(vma->vm_end - offset) + offset;
if (addr < vma->vm_end) /* handle wraparound */
-@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -98,7 +98,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
if (!addr)
@@ -1462,10 +1872,11 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/sys_parisc.c linux-3.1.4/arch/parisc/k
if (filp) {
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-3.1.4/arch/parisc/kernel/traps.c linux-3.1.4/arch/parisc/kernel/traps.c
---- linux-3.1.4/arch/parisc/kernel/traps.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/kernel/traps.c 2011-11-16 18:39:07.000000000 -0500
-@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod
+diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
+index f19e660..414fe24 100644
+--- a/arch/parisc/kernel/traps.c
++++ b/arch/parisc/kernel/traps.c
+@@ -733,9 +733,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
down_read(&current->mm->mmap_sem);
vma = find_vma(current->mm,regs->iaoq[0]);
@@ -1476,9 +1887,10 @@ diff -urNp linux-3.1.4/arch/parisc/kernel/traps.c linux-3.1.4/arch/parisc/kernel
fault_address = regs->iaoq[0];
fault_space = regs->iasq[0];
-diff -urNp linux-3.1.4/arch/parisc/mm/fault.c linux-3.1.4/arch/parisc/mm/fault.c
---- linux-3.1.4/arch/parisc/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/parisc/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
+index 18162ce..94de376 100644
+--- a/arch/parisc/mm/fault.c
++++ b/arch/parisc/mm/fault.c
@@ -15,6 +15,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
@@ -1487,7 +1899,7 @@ diff -urNp linux-3.1.4/arch/parisc/mm/fault.c linux-3.1.4/arch/parisc/mm/fault.c
#include <asm/uaccess.h>
#include <asm/traps.h>
-@@ -52,7 +53,7 @@ DEFINE_PER_CPU(struct exception_data, ex
+@@ -52,7 +53,7 @@ DEFINE_PER_CPU(struct exception_data, exception_data);
static unsigned long
parisc_acctyp(unsigned long code, unsigned int inst)
{
@@ -1496,7 +1908,7 @@ diff -urNp linux-3.1.4/arch/parisc/mm/fault.c linux-3.1.4/arch/parisc/mm/fault.c
return VM_EXEC;
switch (inst & 0xf0000000) {
-@@ -138,6 +139,116 @@ parisc_acctyp(unsigned long code, unsign
+@@ -138,6 +139,116 @@ parisc_acctyp(unsigned long code, unsigned int inst)
}
#endif
@@ -1648,10 +2060,11 @@ diff -urNp linux-3.1.4/arch/parisc/mm/fault.c linux-3.1.4/arch/parisc/mm/fault.c
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/elf.h linux-3.1.4/arch/powerpc/include/asm/elf.h
---- linux-3.1.4/arch/powerpc/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
-@@ -178,8 +178,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E
+diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
+index 3bf9cca..e7457d0 100644
+--- a/arch/powerpc/include/asm/elf.h
++++ b/arch/powerpc/include/asm/elf.h
+@@ -178,8 +178,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -1673,7 +2086,7 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/elf.h linux-3.1.4/arch/powerpc/i
/*
* Our registers are always unsigned longs, whether we're a 32 bit
-@@ -274,9 +285,6 @@ extern int arch_setup_additional_pages(s
+@@ -274,9 +285,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
(0x7ff >> (PAGE_SHIFT - 12)) : \
(0x3ffff >> (PAGE_SHIFT - 12)))
@@ -1683,9 +2096,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/elf.h linux-3.1.4/arch/powerpc/i
#endif /* __KERNEL__ */
/*
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/kmap_types.h linux-3.1.4/arch/powerpc/include/asm/kmap_types.h
---- linux-3.1.4/arch/powerpc/include/asm/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/kmap_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/kmap_types.h b/arch/powerpc/include/asm/kmap_types.h
+index bca8fdc..61e9580 100644
+--- a/arch/powerpc/include/asm/kmap_types.h
++++ b/arch/powerpc/include/asm/kmap_types.h
@@ -27,6 +27,7 @@ enum km_type {
KM_PPC_SYNC_PAGE,
KM_PPC_SYNC_ICACHE,
@@ -1694,10 +2108,11 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/kmap_types.h linux-3.1.4/arch/po
KM_TYPE_NR
};
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/mman.h linux-3.1.4/arch/powerpc/include/asm/mman.h
---- linux-3.1.4/arch/powerpc/include/asm/mman.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/mman.h 2011-11-16 18:39:07.000000000 -0500
-@@ -44,7 +44,7 @@ static inline unsigned long arch_calc_vm
+diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h
+index d4a7f64..451de1c 100644
+--- a/arch/powerpc/include/asm/mman.h
++++ b/arch/powerpc/include/asm/mman.h
+@@ -44,7 +44,7 @@ static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot)
}
#define arch_calc_vm_prot_bits(prot) arch_calc_vm_prot_bits(prot)
@@ -1706,33 +2121,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/mman.h linux-3.1.4/arch/powerpc/
{
return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : __pgprot(0);
}
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/page_64.h linux-3.1.4/arch/powerpc/include/asm/page_64.h
---- linux-3.1.4/arch/powerpc/include/asm/page_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/page_64.h 2011-11-16 18:39:07.000000000 -0500
-@@ -155,15 +155,18 @@ do { \
- * stack by default, so in the absence of a PT_GNU_STACK program header
- * we turn execute permission off.
- */
--#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
-- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-+#define VM_STACK_DEFAULT_FLAGS32 \
-+ (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
-+ VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
- #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-+#ifndef CONFIG_PAX_PAGEEXEC
- #define VM_STACK_DEFAULT_FLAGS \
- (is_32bit_task() ? \
- VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
-+#endif
-
- #include <asm-generic/getorder.h>
-
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/page.h linux-3.1.4/arch/powerpc/include/asm/page.h
---- linux-3.1.4/arch/powerpc/include/asm/page.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/page.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
+index 2cd664e..1d2e8a7 100644
+--- a/arch/powerpc/include/asm/page.h
++++ b/arch/powerpc/include/asm/page.h
@@ -129,8 +129,9 @@ extern phys_addr_t kernstart_addr;
* and needs to be executable. This means the whole heap ends
* up being executable.
@@ -1755,9 +2147,35 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/page.h linux-3.1.4/arch/powerpc/
#ifndef __ASSEMBLY__
#undef STRICT_MM_TYPECHECKS
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/pgtable.h linux-3.1.4/arch/powerpc/include/asm/pgtable.h
---- linux-3.1.4/arch/powerpc/include/asm/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/pgtable.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
+index 9356262..ea96148 100644
+--- a/arch/powerpc/include/asm/page_64.h
++++ b/arch/powerpc/include/asm/page_64.h
+@@ -155,15 +155,18 @@ do { \
+ * stack by default, so in the absence of a PT_GNU_STACK program header
+ * we turn execute permission off.
+ */
+-#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
+- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
++#define VM_STACK_DEFAULT_FLAGS32 \
++ (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
++ VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+ #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
++#ifndef CONFIG_PAX_PAGEEXEC
+ #define VM_STACK_DEFAULT_FLAGS \
+ (is_32bit_task() ? \
+ VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
++#endif
+
+ #include <asm-generic/getorder.h>
+
+diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
+index 88b0bd9..e32bc67 100644
+--- a/arch/powerpc/include/asm/pgtable.h
++++ b/arch/powerpc/include/asm/pgtable.h
@@ -2,6 +2,7 @@
#define _ASM_POWERPC_PGTABLE_H
#ifdef __KERNEL__
@@ -1766,9 +2184,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/pgtable.h linux-3.1.4/arch/power
#ifndef __ASSEMBLY__
#include <asm/processor.h> /* For TASK_SIZE */
#include <asm/mmu.h>
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/pte-hash32.h linux-3.1.4/arch/powerpc/include/asm/pte-hash32.h
---- linux-3.1.4/arch/powerpc/include/asm/pte-hash32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/pte-hash32.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
+index 4aad413..85d86bf 100644
+--- a/arch/powerpc/include/asm/pte-hash32.h
++++ b/arch/powerpc/include/asm/pte-hash32.h
@@ -21,6 +21,7 @@
#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
#define _PAGE_USER 0x004 /* usermode access allowed */
@@ -1777,9 +2196,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/pte-hash32.h linux-3.1.4/arch/po
#define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
#define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/reg.h linux-3.1.4/arch/powerpc/include/asm/reg.h
---- linux-3.1.4/arch/powerpc/include/asm/reg.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/reg.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
+index 559da19..7e5835c 100644
+--- a/arch/powerpc/include/asm/reg.h
++++ b/arch/powerpc/include/asm/reg.h
@@ -212,6 +212,7 @@
#define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */
#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
@@ -1788,10 +2208,11 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/reg.h linux-3.1.4/arch/powerpc/i
#define DSISR_PROTFAULT 0x08000000 /* protection fault */
#define DSISR_ISSTORE 0x02000000 /* access was a store */
#define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/system.h linux-3.1.4/arch/powerpc/include/asm/system.h
---- linux-3.1.4/arch/powerpc/include/asm/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/system.h 2011-11-16 18:39:07.000000000 -0500
-@@ -530,7 +530,7 @@ __cmpxchg_local(volatile void *ptr, unsi
+diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h
+index e30a13d..2b7d994 100644
+--- a/arch/powerpc/include/asm/system.h
++++ b/arch/powerpc/include/asm/system.h
+@@ -530,7 +530,7 @@ __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new,
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif
@@ -1800,9 +2221,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/system.h linux-3.1.4/arch/powerp
/* Used in very early kernel initialization. */
extern unsigned long reloc_offset(void);
-diff -urNp linux-3.1.4/arch/powerpc/include/asm/uaccess.h linux-3.1.4/arch/powerpc/include/asm/uaccess.h
---- linux-3.1.4/arch/powerpc/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
+index bd0fb84..a42a14b 100644
+--- a/arch/powerpc/include/asm/uaccess.h
++++ b/arch/powerpc/include/asm/uaccess.h
@@ -13,6 +13,8 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1
@@ -1865,7 +2287,7 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/uaccess.h linux-3.1.4/arch/power
static inline unsigned long __copy_from_user_inatomic(void *to,
const void __user *from, unsigned long n)
{
-@@ -396,6 +352,10 @@ static inline unsigned long __copy_from_
+@@ -396,6 +352,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
if (ret == 0)
return 0;
}
@@ -1876,7 +2298,7 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/uaccess.h linux-3.1.4/arch/power
return __copy_tofrom_user((__force void __user *)to, from, n);
}
-@@ -422,6 +382,10 @@ static inline unsigned long __copy_to_us
+@@ -422,6 +382,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
if (ret == 0)
return 0;
}
@@ -1887,7 +2309,7 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/uaccess.h linux-3.1.4/arch/power
return __copy_tofrom_user(to, (__force const void __user *)from, n);
}
-@@ -439,6 +403,92 @@ static inline unsigned long __copy_to_us
+@@ -439,6 +403,92 @@ static inline unsigned long __copy_to_user(void __user *to,
return __copy_to_user_inatomic(to, from, size);
}
@@ -1980,9 +2402,10 @@ diff -urNp linux-3.1.4/arch/powerpc/include/asm/uaccess.h linux-3.1.4/arch/power
extern unsigned long __clear_user(void __user *addr, unsigned long size);
static inline unsigned long clear_user(void __user *addr, unsigned long size)
-diff -urNp linux-3.1.4/arch/powerpc/kernel/exceptions-64e.S linux-3.1.4/arch/powerpc/kernel/exceptions-64e.S
---- linux-3.1.4/arch/powerpc/kernel/exceptions-64e.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/exceptions-64e.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
+index 429983c..7af363b 100644
+--- a/arch/powerpc/kernel/exceptions-64e.S
++++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -587,6 +587,7 @@ storage_fault_common:
std r14,_DAR(r1)
std r15,_DSISR(r1)
@@ -2001,9 +2424,10 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/exceptions-64e.S linux-3.1.4/arch/pow
addi r3,r1,STACK_FRAME_OVERHEAD
ld r4,_DAR(r1)
bl .bad_page_fault
-diff -urNp linux-3.1.4/arch/powerpc/kernel/exceptions-64s.S linux-3.1.4/arch/powerpc/kernel/exceptions-64s.S
---- linux-3.1.4/arch/powerpc/kernel/exceptions-64s.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/exceptions-64s.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
+index 41b02c7..05e76fb 100644
+--- a/arch/powerpc/kernel/exceptions-64s.S
++++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1014,10 +1014,10 @@ handle_page_fault:
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
@@ -2016,10 +2440,11 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/exceptions-64s.S linux-3.1.4/arch/pow
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
lwz r4,_DAR(r1)
-diff -urNp linux-3.1.4/arch/powerpc/kernel/module_32.c linux-3.1.4/arch/powerpc/kernel/module_32.c
---- linux-3.1.4/arch/powerpc/kernel/module_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/module_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr
+diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
+index 0b6d796..d760ddb 100644
+--- a/arch/powerpc/kernel/module_32.c
++++ b/arch/powerpc/kernel/module_32.c
+@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
me->arch.core_plt_section = i;
}
if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
@@ -2028,7 +2453,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/module_32.c linux-3.1.4/arch/powerpc/
return -ENOEXEC;
}
-@@ -192,11 +192,16 @@ static uint32_t do_plt_call(void *locati
+@@ -192,11 +192,16 @@ static uint32_t do_plt_call(void *location,
DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
/* Init, or core PLT? */
@@ -2048,9 +2473,10 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/module_32.c linux-3.1.4/arch/powerpc/
/* Find this entry, or if that fails, the next avail. entry */
while (entry->jump[0]) {
-diff -urNp linux-3.1.4/arch/powerpc/kernel/process.c linux-3.1.4/arch/powerpc/kernel/process.c
---- linux-3.1.4/arch/powerpc/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/process.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
+index 8f53954..a704ad6 100644
+--- a/arch/powerpc/kernel/process.c
++++ b/arch/powerpc/kernel/process.c
@@ -682,8 +682,8 @@ void show_regs(struct pt_regs * regs)
* Lookup NIP late so we have the best change of getting the
* above info out without failing
@@ -2062,7 +2488,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/process.c linux-3.1.4/arch/powerpc/ke
#endif
show_stack(current, (unsigned long *) regs->gpr[1]);
if (!user_mode(regs))
-@@ -1187,10 +1187,10 @@ void show_stack(struct task_struct *tsk,
+@@ -1187,10 +1187,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
newsp = stack[0];
ip = stack[STACK_FRAME_LR_SAVE];
if (!firstframe || ip != lr) {
@@ -2075,7 +2501,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/process.c linux-3.1.4/arch/powerpc/ke
(void *)current->ret_stack[curr_frame].ret);
curr_frame--;
}
-@@ -1210,7 +1210,7 @@ void show_stack(struct task_struct *tsk,
+@@ -1210,7 +1210,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
struct pt_regs *regs = (struct pt_regs *)
(sp + STACK_FRAME_OVERHEAD);
lr = regs->link;
@@ -2143,10 +2569,11 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/process.c linux-3.1.4/arch/powerpc/ke
-
- return ret;
-}
-diff -urNp linux-3.1.4/arch/powerpc/kernel/signal_32.c linux-3.1.4/arch/powerpc/kernel/signal_32.c
---- linux-3.1.4/arch/powerpc/kernel/signal_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/signal_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -859,7 +859,7 @@ int handle_rt_signal32(unsigned long sig
+diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
+index 78b76dc..7f232ef 100644
+--- a/arch/powerpc/kernel/signal_32.c
++++ b/arch/powerpc/kernel/signal_32.c
+@@ -859,7 +859,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
addr = frame;
@@ -2155,10 +2582,11 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/signal_32.c linux-3.1.4/arch/powerpc/
if (save_user_regs(regs, frame, 0, 1))
goto badframe;
regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
-diff -urNp linux-3.1.4/arch/powerpc/kernel/signal_64.c linux-3.1.4/arch/powerpc/kernel/signal_64.c
---- linux-3.1.4/arch/powerpc/kernel/signal_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/signal_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -430,7 +430,7 @@ int handle_rt_signal64(int signr, struct
+diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
+index e91c736..742ec06 100644
+--- a/arch/powerpc/kernel/signal_64.c
++++ b/arch/powerpc/kernel/signal_64.c
+@@ -430,7 +430,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info,
current->thread.fpscr.val = 0;
/* Set up to return from userspace. */
@@ -2167,9 +2595,10 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/signal_64.c linux-3.1.4/arch/powerpc/
regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp;
} else {
err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
-diff -urNp linux-3.1.4/arch/powerpc/kernel/traps.c linux-3.1.4/arch/powerpc/kernel/traps.c
---- linux-3.1.4/arch/powerpc/kernel/traps.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/traps.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
+index f19d977..8ac286e 100644
+--- a/arch/powerpc/kernel/traps.c
++++ b/arch/powerpc/kernel/traps.c
@@ -98,6 +98,8 @@ static void pmac_backlight_unblank(void)
static inline void pmac_backlight_unblank(void) { }
#endif
@@ -2179,7 +2608,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/traps.c linux-3.1.4/arch/powerpc/kern
int die(const char *str, struct pt_regs *regs, long err)
{
static struct {
-@@ -171,6 +173,8 @@ int die(const char *str, struct pt_regs
+@@ -171,6 +173,8 @@ int die(const char *str, struct pt_regs *regs, long err)
if (panic_on_oops)
panic("Fatal exception");
@@ -2188,9 +2617,10 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/traps.c linux-3.1.4/arch/powerpc/kern
oops_exit();
do_exit(err);
-diff -urNp linux-3.1.4/arch/powerpc/kernel/vdso.c linux-3.1.4/arch/powerpc/kernel/vdso.c
---- linux-3.1.4/arch/powerpc/kernel/vdso.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/kernel/vdso.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
+index 142ab10..236e61a 100644
+--- a/arch/powerpc/kernel/vdso.c
++++ b/arch/powerpc/kernel/vdso.c
@@ -36,6 +36,7 @@
#include <asm/firmware.h>
#include <asm/vdso.h>
@@ -2199,7 +2629,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/vdso.c linux-3.1.4/arch/powerpc/kerne
#include "setup.h"
-@@ -220,7 +221,7 @@ int arch_setup_additional_pages(struct l
+@@ -220,7 +221,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
vdso_base = VDSO32_MBASE;
#endif
@@ -2208,7 +2638,7 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/vdso.c linux-3.1.4/arch/powerpc/kerne
/* vDSO has a problem and was disabled, just don't "enable" it for the
* process
-@@ -240,7 +241,7 @@ int arch_setup_additional_pages(struct l
+@@ -240,7 +241,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
vdso_base = get_unmapped_area(NULL, vdso_base,
(vdso_pages << PAGE_SHIFT) +
((VDSO_ALIGNMENT - 1) & PAGE_MASK),
@@ -2217,9 +2647,10 @@ diff -urNp linux-3.1.4/arch/powerpc/kernel/vdso.c linux-3.1.4/arch/powerpc/kerne
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
-diff -urNp linux-3.1.4/arch/powerpc/lib/usercopy_64.c linux-3.1.4/arch/powerpc/lib/usercopy_64.c
---- linux-3.1.4/arch/powerpc/lib/usercopy_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/lib/usercopy_64.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/lib/usercopy_64.c b/arch/powerpc/lib/usercopy_64.c
+index 5eea6f3..5d10396 100644
+--- a/arch/powerpc/lib/usercopy_64.c
++++ b/arch/powerpc/lib/usercopy_64.c
@@ -9,22 +9,6 @@
#include <linux/module.h>
#include <asm/uaccess.h>
@@ -2243,7 +2674,7 @@ diff -urNp linux-3.1.4/arch/powerpc/lib/usercopy_64.c linux-3.1.4/arch/powerpc/l
unsigned long copy_in_user(void __user *to, const void __user *from,
unsigned long n)
{
-@@ -35,7 +19,5 @@ unsigned long copy_in_user(void __user *
+@@ -35,7 +19,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from,
return n;
}
@@ -2251,9 +2682,10 @@ diff -urNp linux-3.1.4/arch/powerpc/lib/usercopy_64.c linux-3.1.4/arch/powerpc/l
-EXPORT_SYMBOL(copy_to_user);
EXPORT_SYMBOL(copy_in_user);
-diff -urNp linux-3.1.4/arch/powerpc/mm/fault.c linux-3.1.4/arch/powerpc/mm/fault.c
---- linux-3.1.4/arch/powerpc/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/mm/fault.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
+index 5efe8c9..db9ceef 100644
+--- a/arch/powerpc/mm/fault.c
++++ b/arch/powerpc/mm/fault.c
@@ -32,6 +32,10 @@
#include <linux/perf_event.h>
#include <linux/magic.h>
@@ -2273,7 +2705,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/fault.c linux-3.1.4/arch/powerpc/mm/fault
#ifdef CONFIG_KPROBES
static inline int notify_page_fault(struct pt_regs *regs)
-@@ -66,6 +71,33 @@ static inline int notify_page_fault(stru
+@@ -66,6 +71,33 @@ static inline int notify_page_fault(struct pt_regs *regs)
}
#endif
@@ -2307,7 +2739,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/fault.c linux-3.1.4/arch/powerpc/mm/fault
/*
* Check whether the instruction at regs->nip is a store using
* an update addressing form which will update r1.
-@@ -136,7 +168,7 @@ int __kprobes do_page_fault(struct pt_re
+@@ -136,7 +168,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
* indicate errors in DSISR but can validly be set in SRR1.
*/
if (trap == 0x400)
@@ -2358,10 +2790,11 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/fault.c linux-3.1.4/arch/powerpc/mm/fault
_exception(SIGSEGV, regs, code, address);
return 0;
}
-diff -urNp linux-3.1.4/arch/powerpc/mm/mmap_64.c linux-3.1.4/arch/powerpc/mm/mmap_64.c
---- linux-3.1.4/arch/powerpc/mm/mmap_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/mm/mmap_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str
+diff --git a/arch/powerpc/mm/mmap_64.c b/arch/powerpc/mm/mmap_64.c
+index 5a783d8..c23e14b 100644
+--- a/arch/powerpc/mm/mmap_64.c
++++ b/arch/powerpc/mm/mmap_64.c
+@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -2384,10 +2817,11 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/mmap_64.c linux-3.1.4/arch/powerpc/mm/mma
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice.c
---- linux-3.1.4/arch/powerpc/mm/slice.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/powerpc/mm/slice.c 2011-11-16 18:39:07.000000000 -0500
-@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_
+diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
+index ba51948..23009d9 100644
+--- a/arch/powerpc/mm/slice.c
++++ b/arch/powerpc/mm/slice.c
+@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
if ((mm->task_size - len) < addr)
return 0;
vma = find_vma(mm, addr);
@@ -2405,7 +2839,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice
/*
* Remember the place where we stopped the search:
*/
-@@ -313,10 +313,14 @@ static unsigned long slice_find_area_top
+@@ -313,10 +313,14 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
}
}
@@ -2423,7 +2857,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice
/* Check for hit with different page size */
mask = slice_range_to_mask(addr, len);
-@@ -336,7 +340,7 @@ static unsigned long slice_find_area_top
+@@ -336,7 +340,7 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -2432,7 +2866,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice
/* remember the address as a hint for next time */
if (use_cache)
mm->free_area_cache = addr;
-@@ -348,7 +352,7 @@ static unsigned long slice_find_area_top
+@@ -348,7 +352,7 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -2441,7 +2875,7 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice
}
/*
-@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(un
+@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
if (fixed && addr > (mm->task_size - len))
return -EINVAL;
@@ -2453,9 +2887,10 @@ diff -urNp linux-3.1.4/arch/powerpc/mm/slice.c linux-3.1.4/arch/powerpc/mm/slice
/* If hint, make sure it matches our alignment restrictions */
if (!fixed && addr) {
addr = _ALIGN_UP(addr, 1ul << pshift);
-diff -urNp linux-3.1.4/arch/s390/include/asm/elf.h linux-3.1.4/arch/s390/include/asm/elf.h
---- linux-3.1.4/arch/s390/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
+index 547f1a6..3fff354 100644
+--- a/arch/s390/include/asm/elf.h
++++ b/arch/s390/include/asm/elf.h
@@ -162,8 +162,14 @@ extern unsigned int vdso_enabled;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -2481,10 +2916,11 @@ diff -urNp linux-3.1.4/arch/s390/include/asm/elf.h linux-3.1.4/arch/s390/include
-#define arch_randomize_brk arch_randomize_brk
-
#endif
-diff -urNp linux-3.1.4/arch/s390/include/asm/system.h linux-3.1.4/arch/s390/include/asm/system.h
---- linux-3.1.4/arch/s390/include/asm/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/include/asm/system.h 2011-11-16 18:39:07.000000000 -0500
-@@ -256,7 +256,7 @@ extern void (*_machine_restart)(char *co
+diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h
+index 6582f69..b69906f 100644
+--- a/arch/s390/include/asm/system.h
++++ b/arch/s390/include/asm/system.h
+@@ -256,7 +256,7 @@ extern void (*_machine_restart)(char *command);
extern void (*_machine_halt)(void);
extern void (*_machine_power_off)(void);
@@ -2493,9 +2929,10 @@ diff -urNp linux-3.1.4/arch/s390/include/asm/system.h linux-3.1.4/arch/s390/incl
static inline int tprot(unsigned long addr)
{
-diff -urNp linux-3.1.4/arch/s390/include/asm/uaccess.h linux-3.1.4/arch/s390/include/asm/uaccess.h
---- linux-3.1.4/arch/s390/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
+index 2b23885..e136e31 100644
+--- a/arch/s390/include/asm/uaccess.h
++++ b/arch/s390/include/asm/uaccess.h
@@ -235,6 +235,10 @@ static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -2507,7 +2944,7 @@ diff -urNp linux-3.1.4/arch/s390/include/asm/uaccess.h linux-3.1.4/arch/s390/inc
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-@@ -260,6 +264,9 @@ copy_to_user(void __user *to, const void
+@@ -260,6 +264,9 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
static inline unsigned long __must_check
__copy_from_user(void *to, const void __user *from, unsigned long n)
{
@@ -2517,7 +2954,7 @@ diff -urNp linux-3.1.4/arch/s390/include/asm/uaccess.h linux-3.1.4/arch/s390/inc
if (__builtin_constant_p(n) && (n <= 256))
return uaccess.copy_from_user_small(n, from, to);
else
-@@ -294,6 +301,10 @@ copy_from_user(void *to, const void __us
+@@ -294,6 +301,10 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
unsigned int sz = __compiletime_object_size(to);
might_fault();
@@ -2528,10 +2965,11 @@ diff -urNp linux-3.1.4/arch/s390/include/asm/uaccess.h linux-3.1.4/arch/s390/inc
if (unlikely(sz != -1 && sz < n)) {
copy_from_user_overflow();
return n;
-diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/module.c
---- linux-3.1.4/arch/s390/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/kernel/module.c 2011-11-16 18:39:07.000000000 -0500
-@@ -161,11 +161,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
+diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
+index dfcb343..eda788a 100644
+--- a/arch/s390/kernel/module.c
++++ b/arch/s390/kernel/module.c
+@@ -161,11 +161,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
/* Increase core size by size of got & plt and set start
offsets for got and plt. */
@@ -2548,7 +2986,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
return 0;
}
-@@ -242,7 +242,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -242,7 +242,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
if (info->got_initialized == 0) {
Elf_Addr *gotent;
@@ -2557,7 +2995,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
info->got_offset;
*gotent = val;
info->got_initialized = 1;
-@@ -266,7 +266,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -266,7 +266,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
else if (r_type == R_390_GOTENT ||
r_type == R_390_GOTPLTENT)
*(unsigned int *) loc =
@@ -2566,7 +3004,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
else if (r_type == R_390_GOT64 ||
r_type == R_390_GOTPLT64)
*(unsigned long *) loc = val;
-@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
if (info->plt_initialized == 0) {
unsigned int *ip;
@@ -2575,7 +3013,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
info->plt_offset;
#ifndef CONFIG_64BIT
ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
-@@ -305,7 +305,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -305,7 +305,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
val - loc + 0xffffUL < 0x1ffffeUL) ||
(r_type == R_390_PLT32DBL &&
val - loc + 0xffffffffULL < 0x1fffffffeULL)))
@@ -2584,7 +3022,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
me->arch.plt_offset +
info->plt_offset;
val += rela->r_addend - loc;
-@@ -327,7 +327,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -327,7 +327,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
case R_390_GOTOFF32: /* 32 bit offset to GOT. */
case R_390_GOTOFF64: /* 64 bit offset to GOT. */
val = val + rela->r_addend -
@@ -2593,7 +3031,7 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
if (r_type == R_390_GOTOFF16)
*(unsigned short *) loc = val;
else if (r_type == R_390_GOTOFF32)
-@@ -337,7 +337,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
+@@ -337,7 +337,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
break;
case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
@@ -2602,10 +3040,11 @@ diff -urNp linux-3.1.4/arch/s390/kernel/module.c linux-3.1.4/arch/s390/kernel/mo
rela->r_addend - loc;
if (r_type == R_390_GOTPC)
*(unsigned int *) loc = val;
-diff -urNp linux-3.1.4/arch/s390/kernel/process.c linux-3.1.4/arch/s390/kernel/process.c
---- linux-3.1.4/arch/s390/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
-@@ -319,39 +319,3 @@ unsigned long get_wchan(struct task_stru
+diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
+index 541a750..8739853 100644
+--- a/arch/s390/kernel/process.c
++++ b/arch/s390/kernel/process.c
+@@ -319,39 +319,3 @@ unsigned long get_wchan(struct task_struct *p)
}
return 0;
}
@@ -2645,10 +3084,11 @@ diff -urNp linux-3.1.4/arch/s390/kernel/process.c linux-3.1.4/arch/s390/kernel/p
- return base;
- return ret;
-}
-diff -urNp linux-3.1.4/arch/s390/kernel/setup.c linux-3.1.4/arch/s390/kernel/setup.c
---- linux-3.1.4/arch/s390/kernel/setup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/kernel/setup.c 2011-11-16 18:39:07.000000000 -0500
-@@ -271,7 +271,7 @@ static int __init early_parse_mem(char *
+diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
+index 7b371c3..ad06cf1 100644
+--- a/arch/s390/kernel/setup.c
++++ b/arch/s390/kernel/setup.c
+@@ -271,7 +271,7 @@ static int __init early_parse_mem(char *p)
}
early_param("mem", early_parse_mem);
@@ -2657,10 +3097,11 @@ diff -urNp linux-3.1.4/arch/s390/kernel/setup.c linux-3.1.4/arch/s390/kernel/set
EXPORT_SYMBOL_GPL(user_mode);
static int set_amode_and_uaccess(unsigned long user_amode,
-diff -urNp linux-3.1.4/arch/s390/mm/mmap.c linux-3.1.4/arch/s390/mm/mmap.c
---- linux-3.1.4/arch/s390/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/s390/mm/mmap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -91,10 +91,22 @@ void arch_pick_mmap_layout(struct mm_str
+diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
+index c9a9f7f..60d0315 100644
+--- a/arch/s390/mm/mmap.c
++++ b/arch/s390/mm/mmap.c
+@@ -91,10 +91,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -2683,7 +3124,7 @@ diff -urNp linux-3.1.4/arch/s390/mm/mmap.c linux-3.1.4/arch/s390/mm/mmap.c
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-@@ -166,10 +178,22 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -166,10 +178,22 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -2706,9 +3147,10 @@ diff -urNp linux-3.1.4/arch/s390/mm/mmap.c linux-3.1.4/arch/s390/mm/mmap.c
mm->get_unmapped_area = s390_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-3.1.4/arch/score/include/asm/system.h linux-3.1.4/arch/score/include/asm/system.h
---- linux-3.1.4/arch/score/include/asm/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/score/include/asm/system.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/score/include/asm/system.h b/arch/score/include/asm/system.h
+index 589d5c7..669e274 100644
+--- a/arch/score/include/asm/system.h
++++ b/arch/score/include/asm/system.h
@@ -17,7 +17,7 @@ do { \
#define finish_arch_switch(prev) do {} while (0)
@@ -2718,10 +3160,11 @@ diff -urNp linux-3.1.4/arch/score/include/asm/system.h linux-3.1.4/arch/score/in
#define mb() barrier()
#define rmb() barrier()
-diff -urNp linux-3.1.4/arch/score/kernel/process.c linux-3.1.4/arch/score/kernel/process.c
---- linux-3.1.4/arch/score/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/score/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
-@@ -161,8 +161,3 @@ unsigned long get_wchan(struct task_stru
+diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
+index 25d0803..d6c8e36 100644
+--- a/arch/score/kernel/process.c
++++ b/arch/score/kernel/process.c
+@@ -161,8 +161,3 @@ unsigned long get_wchan(struct task_struct *task)
return task_pt_regs(task)->cp0_epc;
}
@@ -2730,10 +3173,11 @@ diff -urNp linux-3.1.4/arch/score/kernel/process.c linux-3.1.4/arch/score/kernel
-{
- return sp;
-}
-diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
---- linux-3.1.4/arch/sh/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sh/mm/mmap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
+index afeb710..d1d1289 100644
+--- a/arch/sh/mm/mmap.c
++++ b/arch/sh/mm/mmap.c
+@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -2752,7 +3196,7 @@ diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
/*
* Remember the place where we stopped the search:
*/
-@@ -157,8 +156,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -157,8 +156,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -2762,7 +3206,7 @@ diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
return addr;
}
-@@ -179,7 +177,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +177,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -2771,7 +3215,7 @@ diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -2794,7 +3238,7 @@ diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -2807,9 +3251,23 @@ diff -urNp linux-3.1.4/arch/sh/mm/mmap.c linux-3.1.4/arch/sh/mm/mmap.c
bottomup:
/*
-diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc/include/asm/atomic_64.h
---- linux-3.1.4/arch/sparc/include/asm/atomic_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/atomic_64.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
+index ad1fb5d..fc5315b 100644
+--- a/arch/sparc/Makefile
++++ b/arch/sparc/Makefile
+@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/
+ # Export what is needed by arch/sparc/boot/Makefile
+ export VMLINUX_INIT VMLINUX_MAIN
+ VMLINUX_INIT := $(head-y) $(init-y)
+-VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
++VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
+ VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
+ VMLINUX_MAIN += $(drivers-y) $(net-y)
+
+diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
+index 9f421df..b81fc12 100644
+--- a/arch/sparc/include/asm/atomic_64.h
++++ b/arch/sparc/include/asm/atomic_64.h
@@ -14,18 +14,40 @@
#define ATOMIC64_INIT(i) { (i) }
@@ -2851,7 +3309,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc
extern int atomic_sub_ret(int, atomic_t *);
extern long atomic64_sub_ret(long, atomic64_t *);
-@@ -33,13 +55,29 @@ extern long atomic64_sub_ret(long, atomi
+@@ -33,13 +55,29 @@ extern long atomic64_sub_ret(long, atomic64_t *);
#define atomic64_dec_return(v) atomic64_sub_ret(1, v)
#define atomic_inc_return(v) atomic_add_ret(1, v)
@@ -2881,7 +3339,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc
/*
* atomic_inc_and_test - increment and test
-@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomi
+@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomic64_t *);
* other cases.
*/
#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
@@ -2892,7 +3350,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc
#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
#define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0)
-@@ -59,25 +101,60 @@ extern long atomic64_sub_ret(long, atomi
+@@ -59,25 +101,60 @@ extern long atomic64_sub_ret(long, atomic64_t *);
#define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0)
#define atomic_inc(v) atomic_add(1, v)
@@ -2956,7 +3414,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc
if (likely(old == c))
break;
c = old;
-@@ -89,20 +166,35 @@ static inline int __atomic_add_unless(at
+@@ -89,20 +166,35 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
#define atomic64_cmpxchg(v, o, n) \
((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
@@ -2996,9 +3454,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/atomic_64.h linux-3.1.4/arch/sparc
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
-diff -urNp linux-3.1.4/arch/sparc/include/asm/cache.h linux-3.1.4/arch/sparc/include/asm/cache.h
---- linux-3.1.4/arch/sparc/include/asm/cache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/cache.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/cache.h b/arch/sparc/include/asm/cache.h
+index 69358b5..17b4745 100644
+--- a/arch/sparc/include/asm/cache.h
++++ b/arch/sparc/include/asm/cache.h
@@ -10,7 +10,7 @@
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
@@ -3008,9 +3467,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/cache.h linux-3.1.4/arch/sparc/inc
#ifdef CONFIG_SPARC32
#define SMP_CACHE_BYTES_SHIFT 5
-diff -urNp linux-3.1.4/arch/sparc/include/asm/elf_32.h linux-3.1.4/arch/sparc/include/asm/elf_32.h
---- linux-3.1.4/arch/sparc/include/asm/elf_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/elf_32.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
+index 4269ca6..e3da77f 100644
+--- a/arch/sparc/include/asm/elf_32.h
++++ b/arch/sparc/include/asm/elf_32.h
@@ -114,6 +114,13 @@ typedef struct {
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
@@ -3025,9 +3485,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/elf_32.h linux-3.1.4/arch/sparc/in
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. This can NOT be done in userspace
on Sparc. */
-diff -urNp linux-3.1.4/arch/sparc/include/asm/elf_64.h linux-3.1.4/arch/sparc/include/asm/elf_64.h
---- linux-3.1.4/arch/sparc/include/asm/elf_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/elf_64.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
+index 7df8b7f..4946269 100644
+--- a/arch/sparc/include/asm/elf_64.h
++++ b/arch/sparc/include/asm/elf_64.h
@@ -180,6 +180,13 @@ typedef struct {
#define ELF_ET_DYN_BASE 0x0000010000000000UL
#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
@@ -3042,9 +3503,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/elf_64.h linux-3.1.4/arch/sparc/in
extern unsigned long sparc64_elf_hwcap;
#define ELF_HWCAP sparc64_elf_hwcap
-diff -urNp linux-3.1.4/arch/sparc/include/asm/pgtable_32.h linux-3.1.4/arch/sparc/include/asm/pgtable_32.h
---- linux-3.1.4/arch/sparc/include/asm/pgtable_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/pgtable_32.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
+index 5b31a8e..1d92567 100644
+--- a/arch/sparc/include/asm/pgtable_32.h
++++ b/arch/sparc/include/asm/pgtable_32.h
@@ -45,6 +45,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_copy)
@@ -3076,9 +3538,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/pgtable_32.h linux-3.1.4/arch/spar
extern unsigned long page_kernel;
#ifdef MODULE
-diff -urNp linux-3.1.4/arch/sparc/include/asm/pgtsrmmu.h linux-3.1.4/arch/sparc/include/asm/pgtsrmmu.h
---- linux-3.1.4/arch/sparc/include/asm/pgtsrmmu.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/pgtsrmmu.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h
+index f6ae2b2..b03ffc7 100644
+--- a/arch/sparc/include/asm/pgtsrmmu.h
++++ b/arch/sparc/include/asm/pgtsrmmu.h
@@ -115,6 +115,13 @@
SRMMU_EXEC | SRMMU_REF)
#define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
@@ -3093,10 +3556,11 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/pgtsrmmu.h linux-3.1.4/arch/sparc/
#define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
SRMMU_DIRTY | SRMMU_REF)
-diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/sparc/include/asm/spinlock_64.h
---- linux-3.1.4/arch/sparc/include/asm/spinlock_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/spinlock_64.h 2011-11-16 18:39:07.000000000 -0500
-@@ -92,14 +92,19 @@ static inline void arch_spin_lock_flags(
+diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
+index 9689176..63c18ea 100644
+--- a/arch/sparc/include/asm/spinlock_64.h
++++ b/arch/sparc/include/asm/spinlock_64.h
+@@ -92,14 +92,19 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long fla
/* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */
@@ -3118,7 +3582,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%icc, 1b\n"
-@@ -112,10 +117,10 @@ static void inline arch_read_lock(arch_r
+@@ -112,10 +117,10 @@ static void inline arch_read_lock(arch_rwlock_t *lock)
" .previous"
: "=&r" (tmp1), "=&r" (tmp2)
: "r" (lock)
@@ -3131,7 +3595,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
{
int tmp1, tmp2;
-@@ -123,7 +128,12 @@ static int inline arch_read_trylock(arch
+@@ -123,7 +128,12 @@ static int inline arch_read_trylock(arch_rwlock_t *lock)
"1: ldsw [%2], %0\n"
" brlz,a,pn %0, 2f\n"
" mov 0, %0\n"
@@ -3145,7 +3609,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%icc, 1b\n"
-@@ -136,13 +146,18 @@ static int inline arch_read_trylock(arch
+@@ -136,13 +146,18 @@ static int inline arch_read_trylock(arch_rwlock_t *lock)
return tmp1;
}
@@ -3166,7 +3630,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%xcc, 1b\n"
-@@ -152,7 +167,7 @@ static void inline arch_read_unlock(arch
+@@ -152,7 +167,7 @@ static void inline arch_read_unlock(arch_rwlock_t *lock)
: "memory");
}
@@ -3175,7 +3639,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
{
unsigned long mask, tmp1, tmp2;
-@@ -177,7 +192,7 @@ static void inline arch_write_lock(arch_
+@@ -177,7 +192,7 @@ static void inline arch_write_lock(arch_rwlock_t *lock)
: "memory");
}
@@ -3184,7 +3648,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
{
__asm__ __volatile__(
" stw %%g0, [%0]"
-@@ -186,7 +201,7 @@ static void inline arch_write_unlock(arc
+@@ -186,7 +201,7 @@ static void inline arch_write_unlock(arch_rwlock_t *lock)
: "memory");
}
@@ -3193,9 +3657,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/spinlock_64.h linux-3.1.4/arch/spa
{
unsigned long mask, tmp1, tmp2, result;
-diff -urNp linux-3.1.4/arch/sparc/include/asm/thread_info_32.h linux-3.1.4/arch/sparc/include/asm/thread_info_32.h
---- linux-3.1.4/arch/sparc/include/asm/thread_info_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/thread_info_32.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
+index fa57532..e1a4c53 100644
+--- a/arch/sparc/include/asm/thread_info_32.h
++++ b/arch/sparc/include/asm/thread_info_32.h
@@ -50,6 +50,8 @@ struct thread_info {
unsigned long w_saved;
@@ -3205,9 +3670,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/thread_info_32.h linux-3.1.4/arch/
};
/*
-diff -urNp linux-3.1.4/arch/sparc/include/asm/thread_info_64.h linux-3.1.4/arch/sparc/include/asm/thread_info_64.h
---- linux-3.1.4/arch/sparc/include/asm/thread_info_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/thread_info_64.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
+index 60d86be..952dea1 100644
+--- a/arch/sparc/include/asm/thread_info_64.h
++++ b/arch/sparc/include/asm/thread_info_64.h
@@ -63,6 +63,8 @@ struct thread_info {
struct pt_regs *kern_una_regs;
unsigned int kern_una_insn;
@@ -3217,10 +3683,29 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/thread_info_64.h linux-3.1.4/arch/
unsigned long fpregs[0] __attribute__ ((aligned(64)));
};
-diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_32.h linux-3.1.4/arch/sparc/include/asm/uaccess_32.h
---- linux-3.1.4/arch/sparc/include/asm/uaccess_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/uaccess_32.h 2011-11-16 18:39:07.000000000 -0500
-@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __
+diff --git a/arch/sparc/include/asm/uaccess.h b/arch/sparc/include/asm/uaccess.h
+index e88fbe5..96b0ce5 100644
+--- a/arch/sparc/include/asm/uaccess.h
++++ b/arch/sparc/include/asm/uaccess.h
+@@ -1,5 +1,13 @@
+ #ifndef ___ASM_SPARC_UACCESS_H
+ #define ___ASM_SPARC_UACCESS_H
++
++#ifdef __KERNEL__
++#ifndef __ASSEMBLY__
++#include <linux/types.h>
++extern void check_object_size(const void *ptr, unsigned long n, bool to);
++#endif
++#endif
++
+ #if defined(__sparc__) && defined(__arch64__)
+ #include <asm/uaccess_64.h>
+ #else
+diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
+index 8303ac4..07f333d 100644
+--- a/arch/sparc/include/asm/uaccess_32.h
++++ b/arch/sparc/include/asm/uaccess_32.h
+@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __user *to, const void __user *from, unsig
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -3271,9 +3756,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_32.h linux-3.1.4/arch/spar
return __copy_user((__force void __user *) to, from, n);
}
-diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_64.h linux-3.1.4/arch/sparc/include/asm/uaccess_64.h
---- linux-3.1.4/arch/sparc/include/asm/uaccess_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/uaccess_64.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
+index 3e1449f..5293a0e 100644
+--- a/arch/sparc/include/asm/uaccess_64.h
++++ b/arch/sparc/include/asm/uaccess_64.h
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <linux/string.h>
@@ -3282,7 +3768,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_64.h linux-3.1.4/arch/spar
#include <asm/asi.h>
#include <asm/system.h>
#include <asm/spitfire.h>
-@@ -213,8 +214,15 @@ extern unsigned long copy_from_user_fixu
+@@ -213,8 +214,15 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
@@ -3299,7 +3785,7 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_64.h linux-3.1.4/arch/spar
if (unlikely(ret))
ret = copy_from_user_fixup(to, from, size);
-@@ -230,8 +238,15 @@ extern unsigned long copy_to_user_fixup(
+@@ -230,8 +238,15 @@ extern unsigned long copy_to_user_fixup(void __user *to, const void *from,
static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long size)
{
@@ -3316,26 +3802,10 @@ diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess_64.h linux-3.1.4/arch/spar
if (unlikely(ret))
ret = copy_to_user_fixup(to, from, size);
return ret;
-diff -urNp linux-3.1.4/arch/sparc/include/asm/uaccess.h linux-3.1.4/arch/sparc/include/asm/uaccess.h
---- linux-3.1.4/arch/sparc/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
-@@ -1,5 +1,13 @@
- #ifndef ___ASM_SPARC_UACCESS_H
- #define ___ASM_SPARC_UACCESS_H
-+
-+#ifdef __KERNEL__
-+#ifndef __ASSEMBLY__
-+#include <linux/types.h>
-+extern void check_object_size(const void *ptr, unsigned long n, bool to);
-+#endif
-+#endif
-+
- #if defined(__sparc__) && defined(__arch64__)
- #include <asm/uaccess_64.h>
- #else
-diff -urNp linux-3.1.4/arch/sparc/kernel/Makefile linux-3.1.4/arch/sparc/kernel/Makefile
---- linux-3.1.4/arch/sparc/kernel/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/Makefile 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
+index cb85458..e063f17 100644
+--- a/arch/sparc/kernel/Makefile
++++ b/arch/sparc/kernel/Makefile
@@ -3,7 +3,7 @@
#
@@ -3345,9 +3815,10 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/Makefile linux-3.1.4/arch/sparc/kernel/
extra-y := head_$(BITS).o
extra-y += init_task.o
-diff -urNp linux-3.1.4/arch/sparc/kernel/process_32.c linux-3.1.4/arch/sparc/kernel/process_32.c
---- linux-3.1.4/arch/sparc/kernel/process_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/process_32.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
+index f793742..4d880af 100644
+--- a/arch/sparc/kernel/process_32.c
++++ b/arch/sparc/kernel/process_32.c
@@ -204,7 +204,7 @@ void __show_backtrace(unsigned long fp)
rw->ins[4], rw->ins[5],
rw->ins[6],
@@ -3374,7 +3845,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/process_32.c linux-3.1.4/arch/sparc/ker
printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
-@@ -313,7 +313,7 @@ void show_stack(struct task_struct *tsk,
+@@ -313,7 +313,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
rw = (struct reg_window32 *) fp;
pc = rw->ins[7];
printk("[%08lx : ", pc);
@@ -3383,10 +3854,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/process_32.c linux-3.1.4/arch/sparc/ker
fp = rw->ins[6];
} while (++count < 16);
printk("\n");
-diff -urNp linux-3.1.4/arch/sparc/kernel/process_64.c linux-3.1.4/arch/sparc/kernel/process_64.c
---- linux-3.1.4/arch/sparc/kernel/process_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/process_64.c 2011-11-16 18:40:08.000000000 -0500
-@@ -180,14 +180,14 @@ static void show_regwindow(struct pt_reg
+diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
+index d959cd0..7b42812 100644
+--- a/arch/sparc/kernel/process_64.c
++++ b/arch/sparc/kernel/process_64.c
+@@ -180,14 +180,14 @@ static void show_regwindow(struct pt_regs *regs)
printk("i4: %016lx i5: %016lx i6: %016lx i7: %016lx\n",
rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]);
if (regs->tstate & TSTATE_PRIV)
@@ -3412,7 +3884,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/process_64.c linux-3.1.4/arch/sparc/ker
show_regwindow(regs);
show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]);
}
-@@ -285,7 +285,7 @@ void arch_trigger_all_cpu_backtrace(void
+@@ -285,7 +285,7 @@ void arch_trigger_all_cpu_backtrace(void)
((tp && tp->task) ? tp->task->pid : -1));
if (gp->tstate & TSTATE_PRIV) {
@@ -3421,10 +3893,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/process_64.c linux-3.1.4/arch/sparc/ker
(void *) gp->tpc,
(void *) gp->o7,
(void *) gp->i7,
-diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c
---- linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -56,7 +56,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
+index 42b282f..28ce9f2 100644
+--- a/arch/sparc/kernel/sys_sparc_32.c
++++ b/arch/sparc/kernel/sys_sparc_32.c
+@@ -56,7 +56,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (ARCH_SUN4C && len > 0x20000000)
return -ENOMEM;
if (!addr)
@@ -3433,7 +3906,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c linux-3.1.4/arch/sparc/k
if (flags & MAP_SHARED)
addr = COLOUR_ALIGN(addr);
-@@ -71,7 +71,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -71,7 +71,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
}
if (TASK_SIZE - PAGE_SIZE - len < addr)
return -ENOMEM;
@@ -3442,10 +3915,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_32.c linux-3.1.4/arch/sparc/k
return addr;
addr = vmm->vm_end;
if (flags & MAP_SHARED)
-diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c
---- linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -124,7 +124,7 @@ unsigned long arch_get_unmapped_area(str
+diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
+index 908b47a..aa9e584 100644
+--- a/arch/sparc/kernel/sys_sparc_64.c
++++ b/arch/sparc/kernel/sys_sparc_64.c
+@@ -124,7 +124,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
@@ -3454,7 +3928,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
-@@ -139,6 +139,10 @@ unsigned long arch_get_unmapped_area(str
+@@ -139,6 +139,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
@@ -3465,7 +3939,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -146,15 +150,14 @@ unsigned long arch_get_unmapped_area(str
+@@ -146,15 +150,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -3502,7 +3976,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
/*
* Remember the place where we stopped the search:
*/
-@@ -215,7 +218,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -215,7 +218,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
*/
@@ -3511,7 +3985,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
return -EINVAL;
return addr;
-@@ -236,8 +239,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -236,8 +239,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
addr = PAGE_ALIGN(addr);
vma = find_vma(mm, addr);
@@ -3521,7 +3995,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
return addr;
}
-@@ -258,7 +260,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -258,7 +260,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -3530,7 +4004,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -267,18 +269,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -267,18 +269,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -3553,7 +4027,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -288,10 +290,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -288,10 +290,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -3566,7 +4040,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
bottomup:
/*
-@@ -390,6 +390,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -390,6 +390,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
gap == RLIM_INFINITY ||
sysctl_legacy_va_layout) {
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
@@ -3579,7 +4053,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
} else {
-@@ -402,6 +408,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -402,6 +408,12 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
gap = (task_size / 6 * 5);
mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
@@ -3592,10 +4066,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/sys_sparc_64.c linux-3.1.4/arch/sparc/k
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-3.1.4/arch/sparc/kernel/traps_32.c linux-3.1.4/arch/sparc/kernel/traps_32.c
---- linux-3.1.4/arch/sparc/kernel/traps_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/traps_32.c 2011-11-16 18:40:08.000000000 -0500
-@@ -44,6 +44,8 @@ static void instruction_dump(unsigned lo
+diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
+index c0490c7..84959d1 100644
+--- a/arch/sparc/kernel/traps_32.c
++++ b/arch/sparc/kernel/traps_32.c
+@@ -44,6 +44,8 @@ static void instruction_dump(unsigned long *pc)
#define __SAVE __asm__ __volatile__("save %sp, -0x40, %sp\n\t")
#define __RESTORE __asm__ __volatile__("restore %g0, %g0, %g0\n\t")
@@ -3604,7 +4079,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_32.c linux-3.1.4/arch/sparc/kerne
void die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
-@@ -76,15 +78,17 @@ void die_if_kernel(char *str, struct pt_
+@@ -76,15 +78,17 @@ void die_if_kernel(char *str, struct pt_regs *regs)
count++ < 30 &&
(((unsigned long) rw) >= PAGE_OFFSET) &&
!(((unsigned long) rw) & 0x7)) {
@@ -3624,10 +4099,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_32.c linux-3.1.4/arch/sparc/kerne
do_exit(SIGSEGV);
}
-diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kernel/traps_64.c
---- linux-3.1.4/arch/sparc/kernel/traps_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/traps_64.c 2011-11-16 18:40:08.000000000 -0500
-@@ -75,7 +75,7 @@ static void dump_tl1_traplog(struct tl1_
+diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
+index 0cbdaa4..438e4c9 100644
+--- a/arch/sparc/kernel/traps_64.c
++++ b/arch/sparc/kernel/traps_64.c
+@@ -75,7 +75,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
i + 1,
p->trapstack[i].tstate, p->trapstack[i].tpc,
p->trapstack[i].tnpc, p->trapstack[i].tt);
@@ -3636,7 +4112,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
}
}
-@@ -95,6 +95,12 @@ void bad_trap(struct pt_regs *regs, long
+@@ -95,6 +95,12 @@ void bad_trap(struct pt_regs *regs, long lvl)
lvl -= 0x100;
if (regs->tstate & TSTATE_PRIV) {
@@ -3649,7 +4125,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
sprintf(buffer, "Kernel bad sw trap %lx", lvl);
die_if_kernel(buffer, regs);
}
-@@ -113,11 +119,16 @@ void bad_trap(struct pt_regs *regs, long
+@@ -113,11 +119,16 @@ void bad_trap(struct pt_regs *regs, long lvl)
void bad_trap_tl1(struct pt_regs *regs, long lvl)
{
char buffer[32];
@@ -3667,7 +4143,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
sprintf (buffer, "Bad trap %lx at tl>0", lvl);
-@@ -1141,7 +1152,7 @@ static void cheetah_log_errors(struct pt
+@@ -1141,7 +1152,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate);
printk("%s" "ERROR(%d): ",
(recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id());
@@ -3676,7 +4152,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n",
(recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(),
(afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT,
-@@ -1748,7 +1759,7 @@ void cheetah_plus_parity_error(int type,
+@@ -1748,7 +1759,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id(),
(type & 0x1) ? 'I' : 'D',
regs->tpc);
@@ -3685,7 +4161,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
panic("Irrecoverable Cheetah+ parity error.");
}
-@@ -1756,7 +1767,7 @@ void cheetah_plus_parity_error(int type,
+@@ -1756,7 +1767,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id(),
(type & 0x1) ? 'I' : 'D',
regs->tpc);
@@ -3694,7 +4170,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
}
struct sun4v_error_entry {
-@@ -1963,9 +1974,9 @@ void sun4v_itlb_error_report(struct pt_r
+@@ -1963,9 +1974,9 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
@@ -3706,7 +4182,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
(void *) regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
-@@ -1987,9 +1998,9 @@ void sun4v_dtlb_error_report(struct pt_r
+@@ -1987,9 +1998,9 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n",
regs->tpc, tl);
@@ -3718,7 +4194,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
(void *) regs->u_regs[UREG_I7]);
printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]\n",
-@@ -2195,13 +2206,13 @@ void show_stack(struct task_struct *tsk,
+@@ -2195,13 +2206,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp = (unsigned long)sf->fp + STACK_BIAS;
}
@@ -3734,7 +4210,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
graph++;
}
}
-@@ -2226,6 +2237,8 @@ static inline struct reg_window *kernel_
+@@ -2226,6 +2237,8 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw)
return (struct reg_window *) (fp + STACK_BIAS);
}
@@ -3743,7 +4219,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
void die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
-@@ -2254,7 +2267,7 @@ void die_if_kernel(char *str, struct pt_
+@@ -2254,7 +2267,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
while (rw &&
count++ < 30 &&
kstack_valid(tp, (unsigned long) rw)) {
@@ -3752,7 +4228,7 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
(void *) rw->ins[7]);
rw = kernel_stack_up(rw);
-@@ -2267,8 +2280,10 @@ void die_if_kernel(char *str, struct pt_
+@@ -2267,8 +2280,10 @@ void die_if_kernel(char *str, struct pt_regs *regs)
}
user_instruction_dump ((unsigned int __user *) regs->tpc);
}
@@ -3764,10 +4240,11 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/traps_64.c linux-3.1.4/arch/sparc/kerne
do_exit(SIGSEGV);
}
EXPORT_SYMBOL(die_if_kernel);
-diff -urNp linux-3.1.4/arch/sparc/kernel/unaligned_64.c linux-3.1.4/arch/sparc/kernel/unaligned_64.c
---- linux-3.1.4/arch/sparc/kernel/unaligned_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/kernel/unaligned_64.c 2011-11-16 18:40:08.000000000 -0500
-@@ -279,7 +279,7 @@ static void log_unaligned(struct pt_regs
+diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
+index 76e4ac1..78f8bb1 100644
+--- a/arch/sparc/kernel/unaligned_64.c
++++ b/arch/sparc/kernel/unaligned_64.c
+@@ -279,7 +279,7 @@ static void log_unaligned(struct pt_regs *regs)
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
if (__ratelimit(&ratelimit)) {
@@ -3776,9 +4253,23 @@ diff -urNp linux-3.1.4/arch/sparc/kernel/unaligned_64.c linux-3.1.4/arch/sparc/k
regs->tpc, (void *) regs->tpc);
}
}
-diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/atomic_64.S
---- linux-3.1.4/arch/sparc/lib/atomic_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/lib/atomic_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
+index a3fc437..fea9957 100644
+--- a/arch/sparc/lib/Makefile
++++ b/arch/sparc/lib/Makefile
+@@ -2,7 +2,7 @@
+ #
+
+ asflags-y := -ansi -DST_DIV0=0x02
+-ccflags-y := -Werror
++#ccflags-y := -Werror
+
+ lib-$(CONFIG_SPARC32) += mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o
+ lib-$(CONFIG_SPARC32) += memcpy.o memset.o
+diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
+index 59186e0..f747d7a 100644
+--- a/arch/sparc/lib/atomic_64.S
++++ b/arch/sparc/lib/atomic_64.S
@@ -18,7 +18,12 @@
atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
BACKOFF_SETUP(%o2)
@@ -3793,7 +4284,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, BACKOFF_LABEL(2f, 1b)
-@@ -28,12 +33,32 @@ atomic_add: /* %o0 = increment, %o1 = at
+@@ -28,12 +33,32 @@ atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_add, .-atomic_add
@@ -3827,7 +4318,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, BACKOFF_LABEL(2f, 1b)
-@@ -43,12 +68,32 @@ atomic_sub: /* %o0 = decrement, %o1 = at
+@@ -43,12 +68,32 @@ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_sub, .-atomic_sub
@@ -3861,7 +4352,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, BACKOFF_LABEL(2f, 1b)
-@@ -58,12 +103,33 @@ atomic_add_ret: /* %o0 = increment, %o1
+@@ -58,12 +103,33 @@ atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic_add_ret, .-atomic_add_ret
@@ -3896,7 +4387,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
cas [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %icc, BACKOFF_LABEL(2f, 1b)
-@@ -78,7 +144,12 @@ atomic_sub_ret: /* %o0 = decrement, %o1
+@@ -78,7 +144,12 @@ atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */
BACKOFF_SETUP(%o2)
1: ldx [%o1], %g1
@@ -3910,7 +4401,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
-@@ -88,12 +159,32 @@ atomic64_add: /* %o0 = increment, %o1 =
+@@ -88,12 +159,32 @@ atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_add, .-atomic64_add
@@ -3944,7 +4435,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
-@@ -103,12 +194,32 @@ atomic64_sub: /* %o0 = decrement, %o1 =
+@@ -103,12 +194,32 @@ atomic64_sub: /* %o0 = decrement, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_sub, .-atomic64_sub
@@ -3978,7 +4469,7 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
-@@ -118,12 +229,33 @@ atomic64_add_ret: /* %o0 = increment, %o
+@@ -118,12 +229,33 @@ atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
2: BACKOFF_SPIN(%o2, %o3, 1b)
.size atomic64_add_ret, .-atomic64_add_ret
@@ -4013,9 +4504,10 @@ diff -urNp linux-3.1.4/arch/sparc/lib/atomic_64.S linux-3.1.4/arch/sparc/lib/ato
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
-diff -urNp linux-3.1.4/arch/sparc/lib/ksyms.c linux-3.1.4/arch/sparc/lib/ksyms.c
---- linux-3.1.4/arch/sparc/lib/ksyms.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/lib/ksyms.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/lib/ksyms.c b/arch/sparc/lib/ksyms.c
+index 1b30bb3..b4a16c7 100644
+--- a/arch/sparc/lib/ksyms.c
++++ b/arch/sparc/lib/ksyms.c
@@ -142,12 +142,18 @@ EXPORT_SYMBOL(__downgrade_write);
/* Atomic counter implementation. */
@@ -4035,33 +4527,23 @@ diff -urNp linux-3.1.4/arch/sparc/lib/ksyms.c linux-3.1.4/arch/sparc/lib/ksyms.c
EXPORT_SYMBOL(atomic64_sub_ret);
/* Atomic bit operations. */
-diff -urNp linux-3.1.4/arch/sparc/lib/Makefile linux-3.1.4/arch/sparc/lib/Makefile
---- linux-3.1.4/arch/sparc/lib/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/lib/Makefile 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
+index e3cda21..a68e4cb 100644
+--- a/arch/sparc/mm/Makefile
++++ b/arch/sparc/mm/Makefile
@@ -2,7 +2,7 @@
#
- asflags-y := -ansi -DST_DIV0=0x02
+ asflags-y := -ansi
-ccflags-y := -Werror
+#ccflags-y := -Werror
- lib-$(CONFIG_SPARC32) += mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o
- lib-$(CONFIG_SPARC32) += memcpy.o memset.o
-diff -urNp linux-3.1.4/arch/sparc/Makefile linux-3.1.4/arch/sparc/Makefile
---- linux-3.1.4/arch/sparc/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/Makefile 2011-11-16 18:40:08.000000000 -0500
-@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
- # Export what is needed by arch/sparc/boot/Makefile
- export VMLINUX_INIT VMLINUX_MAIN
- VMLINUX_INIT := $(head-y) $(init-y)
--VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
-+VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
- VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
- VMLINUX_MAIN += $(drivers-y) $(net-y)
-
-diff -urNp linux-3.1.4/arch/sparc/mm/fault_32.c linux-3.1.4/arch/sparc/mm/fault_32.c
---- linux-3.1.4/arch/sparc/mm/fault_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/fault_32.c 2011-11-16 18:39:07.000000000 -0500
+ obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o
+ obj-y += fault_$(BITS).o
+diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
+index aa1c1b1..f93e28f 100644
+--- a/arch/sparc/mm/fault_32.c
++++ b/arch/sparc/mm/fault_32.c
@@ -22,6 +22,9 @@
#include <linux/interrupt.h>
#include <linux/module.h>
@@ -4072,7 +4554,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_32.c linux-3.1.4/arch/sparc/mm/fault_
#include <asm/system.h>
#include <asm/page.h>
-@@ -209,6 +212,268 @@ static unsigned long compute_si_addr(str
+@@ -209,6 +212,268 @@ static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault)
return safe_compute_effective_address(regs, insn);
}
@@ -4366,9 +4848,10 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_32.c linux-3.1.4/arch/sparc/mm/fault_
/* Allow reads even for write-only mappings */
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
-diff -urNp linux-3.1.4/arch/sparc/mm/fault_64.c linux-3.1.4/arch/sparc/mm/fault_64.c
---- linux-3.1.4/arch/sparc/mm/fault_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/fault_64.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
+index 504c062..6fcb9c6 100644
+--- a/arch/sparc/mm/fault_64.c
++++ b/arch/sparc/mm/fault_64.c
@@ -21,6 +21,9 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
@@ -4379,7 +4862,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_64.c linux-3.1.4/arch/sparc/mm/fault_
#include <asm/page.h>
#include <asm/pgtable.h>
-@@ -74,7 +77,7 @@ static void __kprobes bad_kernel_pc(stru
+@@ -74,7 +77,7 @@ static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr)
printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n",
regs->tpc);
printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]);
@@ -4388,7 +4871,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_64.c linux-3.1.4/arch/sparc/mm/fault_
printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr);
dump_stack();
unhandled_fault(regs->tpc, current, regs);
-@@ -272,6 +275,457 @@ static void noinline __kprobes bogus_32b
+@@ -272,6 +275,457 @@ static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs,
show_regs(regs);
}
@@ -4846,7 +5329,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_64.c linux-3.1.4/arch/sparc/mm/fault_
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
{
struct mm_struct *mm = current->mm;
-@@ -340,6 +794,29 @@ asmlinkage void __kprobes do_sparc64_fau
+@@ -340,6 +794,29 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
if (!vma)
goto bad_area;
@@ -4876,9 +5359,10 @@ diff -urNp linux-3.1.4/arch/sparc/mm/fault_64.c linux-3.1.4/arch/sparc/mm/fault_
/* Pure DTLB misses do not tell us whether the fault causing
* load/store/atomic was a write or not, it only says that there
* was no match. So in such a case we (carefully) read the
-diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hugetlbpage.c
---- linux-3.1.4/arch/sparc/mm/hugetlbpage.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/hugetlbpage.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
+index f4e9764..5682724 100644
+--- a/arch/sparc/mm/hugetlbpage.c
++++ b/arch/sparc/mm/hugetlbpage.c
@@ -68,7 +68,7 @@ full_search:
}
return -ENOMEM;
@@ -4888,7 +5372,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hug
/*
* Remember the place where we stopped the search:
*/
-@@ -107,7 +107,7 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -107,7 +107,7 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (likely(addr > len)) {
vma = find_vma(mm, addr-len);
@@ -4897,7 +5381,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hug
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -116,16 +116,17 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -116,16 +116,17 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (unlikely(mm->mmap_base < len))
goto bottomup;
@@ -4917,7 +5401,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hug
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -135,8 +136,8 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -135,8 +136,8 @@ hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -4928,7 +5412,7 @@ diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hug
bottomup:
/*
-@@ -182,8 +183,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -182,8 +183,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (addr) {
addr = ALIGN(addr, HPAGE_SIZE);
vma = find_vma(mm, addr);
@@ -4938,9 +5422,10 @@ diff -urNp linux-3.1.4/arch/sparc/mm/hugetlbpage.c linux-3.1.4/arch/sparc/mm/hug
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-3.1.4/arch/sparc/mm/init_32.c linux-3.1.4/arch/sparc/mm/init_32.c
---- linux-3.1.4/arch/sparc/mm/init_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/init_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
+index 7b00de6..78239f4 100644
+--- a/arch/sparc/mm/init_32.c
++++ b/arch/sparc/mm/init_32.c
@@ -316,6 +316,9 @@ extern void device_scan(void);
pgprot_t PAGE_SHARED __read_mostly;
EXPORT_SYMBOL(PAGE_SHARED);
@@ -4975,21 +5460,10 @@ diff -urNp linux-3.1.4/arch/sparc/mm/init_32.c linux-3.1.4/arch/sparc/mm/init_32
protection_map[12] = PAGE_READONLY;
protection_map[13] = PAGE_READONLY;
protection_map[14] = PAGE_SHARED;
-diff -urNp linux-3.1.4/arch/sparc/mm/Makefile linux-3.1.4/arch/sparc/mm/Makefile
---- linux-3.1.4/arch/sparc/mm/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -2,7 +2,7 @@
- #
-
- asflags-y := -ansi
--ccflags-y := -Werror
-+#ccflags-y := -Werror
-
- obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o gup.o
- obj-y += fault_$(BITS).o
-diff -urNp linux-3.1.4/arch/sparc/mm/srmmu.c linux-3.1.4/arch/sparc/mm/srmmu.c
---- linux-3.1.4/arch/sparc/mm/srmmu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/sparc/mm/srmmu.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
+index cbef74e..c38fead 100644
+--- a/arch/sparc/mm/srmmu.c
++++ b/arch/sparc/mm/srmmu.c
@@ -2200,6 +2200,13 @@ void __init ld_mmu_srmmu(void)
PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
@@ -5004,9 +5478,25 @@ diff -urNp linux-3.1.4/arch/sparc/mm/srmmu.c linux-3.1.4/arch/sparc/mm/srmmu.c
BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
-diff -urNp linux-3.1.4/arch/um/include/asm/kmap_types.h linux-3.1.4/arch/um/include/asm/kmap_types.h
---- linux-3.1.4/arch/um/include/asm/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/include/asm/kmap_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/Makefile b/arch/um/Makefile
+index c0f712c..3a5c4c9 100644
+--- a/arch/um/Makefile
++++ b/arch/um/Makefile
+@@ -49,6 +49,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
+ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+ $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
+
++ifdef CONSTIFY_PLUGIN
++USER_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
++
+ include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
+
+ #This will adjust *FLAGS accordingly to the platform.
+diff --git a/arch/um/include/asm/kmap_types.h b/arch/um/include/asm/kmap_types.h
+index 6c03acd..a5e0215 100644
+--- a/arch/um/include/asm/kmap_types.h
++++ b/arch/um/include/asm/kmap_types.h
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
@@ -5015,9 +5505,10 @@ diff -urNp linux-3.1.4/arch/um/include/asm/kmap_types.h linux-3.1.4/arch/um/incl
KM_TYPE_NR
};
-diff -urNp linux-3.1.4/arch/um/include/asm/page.h linux-3.1.4/arch/um/include/asm/page.h
---- linux-3.1.4/arch/um/include/asm/page.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/include/asm/page.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
+index 4cc9b6c..02e5029 100644
+--- a/arch/um/include/asm/page.h
++++ b/arch/um/include/asm/page.h
@@ -14,6 +14,9 @@
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
@@ -5028,9 +5519,10 @@ diff -urNp linux-3.1.4/arch/um/include/asm/page.h linux-3.1.4/arch/um/include/as
#ifndef __ASSEMBLY__
struct page;
-diff -urNp linux-3.1.4/arch/um/kernel/process.c linux-3.1.4/arch/um/kernel/process.c
---- linux-3.1.4/arch/um/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
+index 21c1ae7..4640aaa 100644
+--- a/arch/um/kernel/process.c
++++ b/arch/um/kernel/process.c
@@ -404,22 +404,6 @@ int singlestepping(void * t)
return 2;
}
@@ -5054,23 +5546,10 @@ diff -urNp linux-3.1.4/arch/um/kernel/process.c linux-3.1.4/arch/um/kernel/proce
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack_page, sp, ip;
-diff -urNp linux-3.1.4/arch/um/Makefile linux-3.1.4/arch/um/Makefile
---- linux-3.1.4/arch/um/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -49,6 +49,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINE
- $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
- $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64
-
-+ifdef CONSTIFY_PLUGIN
-+USER_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
-+
- include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-
- #This will adjust *FLAGS accordingly to the platform.
-diff -urNp linux-3.1.4/arch/um/sys-i386/shared/sysdep/system.h linux-3.1.4/arch/um/sys-i386/shared/sysdep/system.h
---- linux-3.1.4/arch/um/sys-i386/shared/sysdep/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/sys-i386/shared/sysdep/system.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/sys-i386/shared/sysdep/system.h b/arch/um/sys-i386/shared/sysdep/system.h
+index d1b93c4..ae1b7fd 100644
+--- a/arch/um/sys-i386/shared/sysdep/system.h
++++ b/arch/um/sys-i386/shared/sysdep/system.h
@@ -17,7 +17,7 @@
# define AT_VECTOR_SIZE_ARCH 1
#endif
@@ -5080,9 +5559,10 @@ diff -urNp linux-3.1.4/arch/um/sys-i386/shared/sysdep/system.h linux-3.1.4/arch/
void default_idle(void);
-diff -urNp linux-3.1.4/arch/um/sys-i386/syscalls.c linux-3.1.4/arch/um/sys-i386/syscalls.c
---- linux-3.1.4/arch/um/sys-i386/syscalls.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/sys-i386/syscalls.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c
+index 70ca357..728d1cc 100644
+--- a/arch/um/sys-i386/syscalls.c
++++ b/arch/um/sys-i386/syscalls.c
@@ -11,6 +11,21 @@
#include "asm/uaccess.h"
#include "asm/unistd.h"
@@ -5105,9 +5585,10 @@ diff -urNp linux-3.1.4/arch/um/sys-i386/syscalls.c linux-3.1.4/arch/um/sys-i386/
/*
* The prototype on i386 is:
*
-diff -urNp linux-3.1.4/arch/um/sys-x86_64/shared/sysdep/system.h linux-3.1.4/arch/um/sys-x86_64/shared/sysdep/system.h
---- linux-3.1.4/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/um/sys-x86_64/shared/sysdep/system.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/um/sys-x86_64/shared/sysdep/system.h b/arch/um/sys-x86_64/shared/sysdep/system.h
+index d1b93c4..ae1b7fd 100644
+--- a/arch/um/sys-x86_64/shared/sysdep/system.h
++++ b/arch/um/sys-x86_64/shared/sysdep/system.h
@@ -17,7 +17,7 @@
# define AT_VECTOR_SIZE_ARCH 1
#endif
@@ -5117,10 +5598,179 @@ diff -urNp linux-3.1.4/arch/um/sys-x86_64/shared/sysdep/system.h linux-3.1.4/arc
void default_idle(void);
-diff -urNp linux-3.1.4/arch/x86/boot/bitops.h linux-3.1.4/arch/x86/boot/bitops.h
---- linux-3.1.4/arch/x86/boot/bitops.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/bitops.h 2011-11-16 18:39:07.000000000 -0500
-@@ -26,7 +26,7 @@ static inline int variable_test_bit(int
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 6a47bb2..dc9a868 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -236,7 +236,7 @@ config X86_HT
+
+ config X86_32_LAZY_GS
+ def_bool y
+- depends on X86_32 && !CC_STACKPROTECTOR
++ depends on X86_32 && !CC_STACKPROTECTOR && !PAX_MEMORY_UDEREF
+
+ config ARCH_HWEIGHT_CFLAGS
+ string
+@@ -1019,7 +1019,7 @@ choice
+
+ config NOHIGHMEM
+ bool "off"
+- depends on !X86_NUMAQ
++ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
+ ---help---
+ Linux can use up to 64 Gigabytes of physical memory on x86 systems.
+ However, the address space of 32-bit x86 processors is only 4
+@@ -1056,7 +1056,7 @@ config NOHIGHMEM
+
+ config HIGHMEM4G
+ bool "4GB"
+- depends on !X86_NUMAQ
++ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
+ ---help---
+ Select this if you have a 32-bit processor and between 1 and 4
+ gigabytes of physical RAM.
+@@ -1110,7 +1110,7 @@ config PAGE_OFFSET
+ hex
+ default 0xB0000000 if VMSPLIT_3G_OPT
+ default 0x80000000 if VMSPLIT_2G
+- default 0x78000000 if VMSPLIT_2G_OPT
++ default 0x70000000 if VMSPLIT_2G_OPT
+ default 0x40000000 if VMSPLIT_1G
+ default 0xC0000000
+ depends on X86_32
+@@ -1484,6 +1484,7 @@ config SECCOMP
+
+ config CC_STACKPROTECTOR
+ bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
++ depends on X86_64 || !PAX_MEMORY_UDEREF
+ ---help---
+ This option turns on the -fstack-protector GCC feature. This
+ feature puts, at the beginning of functions, a canary value on
+@@ -1541,6 +1542,7 @@ config KEXEC_JUMP
+ config PHYSICAL_START
+ hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
+ default "0x1000000"
++ range 0x400000 0x40000000
+ ---help---
+ This gives the physical address where the kernel is loaded.
+
+@@ -1604,6 +1606,7 @@ config X86_NEED_RELOCS
+ config PHYSICAL_ALIGN
+ hex "Alignment value to which kernel should be aligned" if X86_32
+ default "0x1000000"
++ range 0x400000 0x1000000 if PAX_KERNEXEC
+ range 0x2000 0x1000000
+ ---help---
+ This value puts the alignment restrictions on physical address
+@@ -1635,9 +1638,10 @@ config HOTPLUG_CPU
+ Say N if you want to disable CPU hotplug.
+
+ config COMPAT_VDSO
+- def_bool y
++ def_bool n
+ prompt "Compat VDSO support"
+ depends on X86_32 || IA32_EMULATION
++ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF
+ ---help---
+ Map the 32-bit VDSO to the predictable old-style address too.
+
+diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
+index e3ca7e0..b30b28a 100644
+--- a/arch/x86/Kconfig.cpu
++++ b/arch/x86/Kconfig.cpu
+@@ -341,7 +341,7 @@ config X86_PPRO_FENCE
+
+ config X86_F00F_BUG
+ def_bool y
+- depends on M586MMX || M586TSC || M586 || M486 || M386
++ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC
+
+ config X86_INVD_BUG
+ def_bool y
+@@ -365,7 +365,7 @@ config X86_POPAD_OK
+
+ config X86_ALIGNMENT_16
+ def_bool y
+- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
++ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK8 || MK7 || MK6 || MCORE2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
+
+ config X86_INTEL_USERCOPY
+ def_bool y
+@@ -411,7 +411,7 @@ config X86_CMPXCHG64
+ # generates cmov.
+ config X86_CMOV
+ def_bool y
+- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
++ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
+
+ config X86_MINIMUM_CPU_FAMILY
+ int
+diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
+index c0f8a5c..6404f61 100644
+--- a/arch/x86/Kconfig.debug
++++ b/arch/x86/Kconfig.debug
+@@ -81,7 +81,7 @@ config X86_PTDUMP
+ config DEBUG_RODATA
+ bool "Write protect kernel read-only data structures"
+ default y
+- depends on DEBUG_KERNEL
++ depends on DEBUG_KERNEL && BROKEN
+ ---help---
+ Mark the kernel read-only data as write-protected in the pagetables,
+ in order to catch accidental (and incorrect) writes to such const
+@@ -99,7 +99,7 @@ config DEBUG_RODATA_TEST
+
+ config DEBUG_SET_MODULE_RONX
+ bool "Set loadable kernel module data as NX and text as RO"
+- depends on MODULES
++ depends on MODULES && BROKEN
+ ---help---
+ This option helps catch unintended modifications to loadable
+ kernel module's text and read-only data. It also prevents execution
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile
+index b02e509..2631e48 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -46,6 +46,7 @@ else
+ UTS_MACHINE := x86_64
+ CHECKFLAGS += -D__x86_64__ -m64
+
++ biarch := $(call cc-option,-m64)
+ KBUILD_AFLAGS += -m64
+ KBUILD_CFLAGS += -m64
+
+@@ -195,3 +196,12 @@ define archhelp
+ echo ' FDARGS="..." arguments for the booted kernel'
+ echo ' FDINITRD=file initrd for the booted kernel'
+ endef
++
++define OLD_LD
++
++*** ${VERSION}.${PATCHLEVEL} PaX kernels no longer build correctly with old versions of binutils.
++*** Please upgrade your binutils to 2.18 or newer
++endef
++
++archprepare:
++ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
+diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
+index 95365a8..52f857b 100644
+--- a/arch/x86/boot/Makefile
++++ b/arch/x86/boot/Makefile
+@@ -63,6 +63,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
+ $(call cc-option, -fno-stack-protector) \
+ $(call cc-option, -mpreferred-stack-boundary=2)
+ KBUILD_CFLAGS += $(call cc-option, -m32)
++ifdef CONSTIFY_PLUGIN
++KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+
+diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
+index 878e4b9..20537ab 100644
+--- a/arch/x86/boot/bitops.h
++++ b/arch/x86/boot/bitops.h
+@@ -26,7 +26,7 @@ static inline int variable_test_bit(int nr, const void *addr)
u8 v;
const u32 *p = (const u32 *)addr;
@@ -5129,7 +5779,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/bitops.h linux-3.1.4/arch/x86/boot/bitops.h
return v;
}
-@@ -37,7 +37,7 @@ static inline int variable_test_bit(int
+@@ -37,7 +37,7 @@ static inline int variable_test_bit(int nr, const void *addr)
static inline void set_bit(int nr, void *addr)
{
@@ -5138,9 +5788,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/bitops.h linux-3.1.4/arch/x86/boot/bitops.h
}
#endif /* BOOT_BITOPS_H */
-diff -urNp linux-3.1.4/arch/x86/boot/boot.h linux-3.1.4/arch/x86/boot/boot.h
---- linux-3.1.4/arch/x86/boot/boot.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/boot.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
+index c7093bd..d4247ffe0 100644
+--- a/arch/x86/boot/boot.h
++++ b/arch/x86/boot/boot.h
@@ -85,7 +85,7 @@ static inline void io_delay(void)
static inline u16 ds(void)
{
@@ -5150,7 +5801,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/boot.h linux-3.1.4/arch/x86/boot/boot.h
return seg;
}
-@@ -181,7 +181,7 @@ static inline void wrgs32(u32 v, addr_t
+@@ -181,7 +181,7 @@ static inline void wrgs32(u32 v, addr_t addr)
static inline int memcmp(const void *s1, const void *s2, size_t len)
{
u8 diff;
@@ -5159,9 +5810,24 @@ diff -urNp linux-3.1.4/arch/x86/boot/boot.h linux-3.1.4/arch/x86/boot/boot.h
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
-diff -urNp linux-3.1.4/arch/x86/boot/compressed/head_32.S linux-3.1.4/arch/x86/boot/compressed/head_32.S
---- linux-3.1.4/arch/x86/boot/compressed/head_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/compressed/head_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
+index 09664ef..edc5d03 100644
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -14,6 +14,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=small
+ KBUILD_CFLAGS += $(cflags-y)
+ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
+ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
++ifdef CONSTIFY_PLUGIN
++KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
++endif
+
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
+index 67a655a..b924059 100644
+--- a/arch/x86/boot/compressed/head_32.S
++++ b/arch/x86/boot/compressed/head_32.S
@@ -76,7 +76,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
@@ -5190,9 +5856,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/head_32.S linux-3.1.4/arch/x86/b
addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
jmp 1b
2:
-diff -urNp linux-3.1.4/arch/x86/boot/compressed/head_64.S linux-3.1.4/arch/x86/boot/compressed/head_64.S
---- linux-3.1.4/arch/x86/boot/compressed/head_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/compressed/head_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
+index 35af09d..99c9676 100644
+--- a/arch/x86/boot/compressed/head_64.S
++++ b/arch/x86/boot/compressed/head_64.S
@@ -91,7 +91,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
@@ -5211,22 +5878,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/head_64.S linux-3.1.4/arch/x86/b
#endif
/* Target address to relocate to for decompression */
-diff -urNp linux-3.1.4/arch/x86/boot/compressed/Makefile linux-3.1.4/arch/x86/boot/compressed/Makefile
---- linux-3.1.4/arch/x86/boot/compressed/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/compressed/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -14,6 +14,9 @@ cflags-$(CONFIG_X86_64) := -mcmodel=smal
- KBUILD_CFLAGS += $(cflags-y)
- KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
- KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
-+ifdef CONSTIFY_PLUGIN
-+KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
-
- KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
- GCOV_PROFILE := n
-diff -urNp linux-3.1.4/arch/x86/boot/compressed/misc.c linux-3.1.4/arch/x86/boot/compressed/misc.c
---- linux-3.1.4/arch/x86/boot/compressed/misc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/compressed/misc.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
+index 3a19d04..7c1d55a 100644
+--- a/arch/x86/boot/compressed/misc.c
++++ b/arch/x86/boot/compressed/misc.c
@@ -310,7 +310,7 @@ static void parse_elf(void *output)
case PT_LOAD:
#ifdef CONFIG_RELOCATABLE
@@ -5236,7 +5891,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/misc.c linux-3.1.4/arch/x86/boot
#else
dest = (void *)(phdr->p_paddr);
#endif
-@@ -363,7 +363,7 @@ asmlinkage void decompress_kernel(void *
+@@ -363,7 +363,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
error("Destination address too large");
#endif
#ifndef CONFIG_RELOCATABLE
@@ -5245,9 +5900,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/misc.c linux-3.1.4/arch/x86/boot
error("Wrong destination address");
#endif
-diff -urNp linux-3.1.4/arch/x86/boot/compressed/relocs.c linux-3.1.4/arch/x86/boot/compressed/relocs.c
---- linux-3.1.4/arch/x86/boot/compressed/relocs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/compressed/relocs.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
+index 89bbf4e..869908e 100644
+--- a/arch/x86/boot/compressed/relocs.c
++++ b/arch/x86/boot/compressed/relocs.c
@@ -13,8 +13,11 @@
static void die(char *fmt, ...);
@@ -5400,7 +6056,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/relocs.c linux-3.1.4/arch/x86/bo
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_REL) {
-@@ -530,6 +574,22 @@ static void walk_relocs(void (*visit)(El
+@@ -530,6 +574,22 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
!is_rel_reloc(sym_name(sym_strtab, sym))) {
continue;
}
@@ -5423,7 +6079,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/relocs.c linux-3.1.4/arch/x86/bo
switch (r_type) {
case R_386_NONE:
case R_386_PC32:
-@@ -571,7 +631,7 @@ static int cmp_relocs(const void *va, co
+@@ -571,7 +631,7 @@ static int cmp_relocs(const void *va, const void *vb)
static void emit_relocs(int as_text)
{
@@ -5440,9 +6096,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/compressed/relocs.c linux-3.1.4/arch/x86/bo
read_shdrs(fp);
read_strtabs(fp);
read_symtabs(fp);
-diff -urNp linux-3.1.4/arch/x86/boot/cpucheck.c linux-3.1.4/arch/x86/boot/cpucheck.c
---- linux-3.1.4/arch/x86/boot/cpucheck.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/cpucheck.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
+index 4d3ff03..e4972ff 100644
+--- a/arch/x86/boot/cpucheck.c
++++ b/arch/x86/boot/cpucheck.c
@@ -74,7 +74,7 @@ static int has_fpu(void)
u16 fcw = -1, fsw = -1;
u32 cr0;
@@ -5497,7 +6154,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/cpucheck.c linux-3.1.4/arch/x86/boot/cpuche
: "+a" (eax),
"=c" (cpu.flags[6]),
"=d" (cpu.flags[1])
-@@ -203,9 +203,9 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -203,9 +203,9 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 ecx = MSR_K7_HWCR;
u32 eax, edx;
@@ -5509,7 +6166,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/cpucheck.c linux-3.1.4/arch/x86/boot/cpuche
get_flags(); /* Make sure it really did something */
err = check_flags();
-@@ -218,9 +218,9 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -218,9 +218,9 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 ecx = MSR_VIA_FCR;
u32 eax, edx;
@@ -5521,7 +6178,7 @@ diff -urNp linux-3.1.4/arch/x86/boot/cpucheck.c linux-3.1.4/arch/x86/boot/cpuche
set_bit(X86_FEATURE_CX8, cpu.flags);
err = check_flags();
-@@ -231,12 +231,12 @@ int check_cpu(int *cpu_level_ptr, int *r
+@@ -231,12 +231,12 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
u32 eax, edx;
u32 level = 1;
@@ -5538,10 +6195,11 @@ diff -urNp linux-3.1.4/arch/x86/boot/cpucheck.c linux-3.1.4/arch/x86/boot/cpuche
err = check_flags();
}
-diff -urNp linux-3.1.4/arch/x86/boot/header.S linux-3.1.4/arch/x86/boot/header.S
---- linux-3.1.4/arch/x86/boot/header.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/header.S 2011-11-16 18:39:07.000000000 -0500
-@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical
+diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
+index 93e689f..504ba09 100644
+--- a/arch/x86/boot/header.S
++++ b/arch/x86/boot/header.S
+@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical pointer to
# single linked list of
# struct setup_data
@@ -5550,22 +6208,10 @@ diff -urNp linux-3.1.4/arch/x86/boot/header.S linux-3.1.4/arch/x86/boot/header.S
#define ZO_INIT_SIZE (ZO__end - ZO_startup_32 + ZO_z_extract_offset)
#define VO_INIT_SIZE (VO__end - VO__text)
-diff -urNp linux-3.1.4/arch/x86/boot/Makefile linux-3.1.4/arch/x86/boot/Makefile
---- linux-3.1.4/arch/x86/boot/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -63,6 +63,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os
- $(call cc-option, -fno-stack-protector) \
- $(call cc-option, -mpreferred-stack-boundary=2)
- KBUILD_CFLAGS += $(call cc-option, -m32)
-+ifdef CONSTIFY_PLUGIN
-+KBUILD_CFLAGS += $(CONSTIFY_PLUGIN) -fplugin-arg-constify_plugin-no-constify
-+endif
- KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
- GCOV_PROFILE := n
-
-diff -urNp linux-3.1.4/arch/x86/boot/memory.c linux-3.1.4/arch/x86/boot/memory.c
---- linux-3.1.4/arch/x86/boot/memory.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/memory.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
+index db75d07..8e6d0af 100644
+--- a/arch/x86/boot/memory.c
++++ b/arch/x86/boot/memory.c
@@ -19,7 +19,7 @@
static int detect_memory_e820(void)
@@ -5575,9 +6221,22 @@ diff -urNp linux-3.1.4/arch/x86/boot/memory.c linux-3.1.4/arch/x86/boot/memory.c
struct biosregs ireg, oreg;
struct e820entry *desc = boot_params.e820_map;
static struct e820entry buf; /* static so it is zeroed */
-diff -urNp linux-3.1.4/arch/x86/boot/video.c linux-3.1.4/arch/x86/boot/video.c
---- linux-3.1.4/arch/x86/boot/video.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/video.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
+index 11e8c6e..fdbb1ed 100644
+--- a/arch/x86/boot/video-vesa.c
++++ b/arch/x86/boot/video-vesa.c
+@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
+
+ boot_params.screen_info.vesapm_seg = oreg.es;
+ boot_params.screen_info.vesapm_off = oreg.di;
++ boot_params.screen_info.vesapm_size = oreg.cx;
+ }
+
+ /*
+diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
+index 43eda28..5ab5fdb 100644
+--- a/arch/x86/boot/video.c
++++ b/arch/x86/boot/video.c
@@ -96,7 +96,7 @@ static void store_mode_params(void)
static unsigned int get_entry(void)
{
@@ -5587,20 +6246,32 @@ diff -urNp linux-3.1.4/arch/x86/boot/video.c linux-3.1.4/arch/x86/boot/video.c
int key;
unsigned int v;
-diff -urNp linux-3.1.4/arch/x86/boot/video-vesa.c linux-3.1.4/arch/x86/boot/video-vesa.c
---- linux-3.1.4/arch/x86/boot/video-vesa.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/boot/video-vesa.c 2011-11-16 18:39:07.000000000 -0500
-@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
+diff --git a/arch/x86/crypto/aes-x86_64-asm_64.S b/arch/x86/crypto/aes-x86_64-asm_64.S
+index 5b577d5..3c1fed4 100644
+--- a/arch/x86/crypto/aes-x86_64-asm_64.S
++++ b/arch/x86/crypto/aes-x86_64-asm_64.S
+@@ -8,6 +8,8 @@
+ * including this sentence is retained in full.
+ */
- boot_params.screen_info.vesapm_seg = oreg.es;
- boot_params.screen_info.vesapm_off = oreg.di;
-+ boot_params.screen_info.vesapm_size = oreg.cx;
- }
++#include <asm/alternative-asm.h>
++
+ .extern crypto_ft_tab
+ .extern crypto_it_tab
+ .extern crypto_fl_tab
+@@ -71,6 +73,8 @@ FUNC: movq r1,r2; \
+ je B192; \
+ leaq 32(r9),r9;
- /*
-diff -urNp linux-3.1.4/arch/x86/crypto/aesni-intel_asm.S linux-3.1.4/arch/x86/crypto/aesni-intel_asm.S
---- linux-3.1.4/arch/x86/crypto/aesni-intel_asm.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/crypto/aesni-intel_asm.S 2011-12-02 17:38:47.000000000 -0500
++#define ret pax_force_retaddr 0, 1; ret
++
+ #define epilogue(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
+ movq r1,r2; \
+ movq r3,r4; \
+diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
+index be6d9e3..21fbbca 100644
+--- a/arch/x86/crypto/aesni-intel_asm.S
++++ b/arch/x86/crypto/aesni-intel_asm.S
@@ -31,6 +31,7 @@
#include <linux/linkage.h>
@@ -5787,30 +6458,10 @@ diff -urNp linux-3.1.4/arch/x86/crypto/aesni-intel_asm.S linux-3.1.4/arch/x86/cr
ret
+ENDPROC(aesni_ctr_enc)
#endif
-diff -urNp linux-3.1.4/arch/x86/crypto/aes-x86_64-asm_64.S linux-3.1.4/arch/x86/crypto/aes-x86_64-asm_64.S
---- linux-3.1.4/arch/x86/crypto/aes-x86_64-asm_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/crypto/aes-x86_64-asm_64.S 2011-12-02 17:38:47.000000000 -0500
-@@ -8,6 +8,8 @@
- * including this sentence is retained in full.
- */
-
-+#include <asm/alternative-asm.h>
-+
- .extern crypto_ft_tab
- .extern crypto_it_tab
- .extern crypto_fl_tab
-@@ -71,6 +73,8 @@ FUNC: movq r1,r2; \
- je B192; \
- leaq 32(r9),r9;
-
-+#define ret pax_force_retaddr 0, 1; ret
-+
- #define epilogue(r1,r2,r3,r4,r5,r6,r7,r8,r9) \
- movq r1,r2; \
- movq r3,r4; \
-diff -urNp linux-3.1.4/arch/x86/crypto/salsa20-x86_64-asm_64.S linux-3.1.4/arch/x86/crypto/salsa20-x86_64-asm_64.S
---- linux-3.1.4/arch/x86/crypto/salsa20-x86_64-asm_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/crypto/salsa20-x86_64-asm_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S
+index 6214a9b..1f4fc9a 100644
+--- a/arch/x86/crypto/salsa20-x86_64-asm_64.S
++++ b/arch/x86/crypto/salsa20-x86_64-asm_64.S
@@ -1,3 +1,5 @@
+#include <asm/alternative-asm.h>
+
@@ -5839,9 +6490,10 @@ diff -urNp linux-3.1.4/arch/x86/crypto/salsa20-x86_64-asm_64.S linux-3.1.4/arch/
mov %rsi,%rdx
+ pax_force_retaddr
ret
-diff -urNp linux-3.1.4/arch/x86/crypto/twofish-x86_64-asm_64.S linux-3.1.4/arch/x86/crypto/twofish-x86_64-asm_64.S
---- linux-3.1.4/arch/x86/crypto/twofish-x86_64-asm_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/crypto/twofish-x86_64-asm_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/crypto/twofish-x86_64-asm_64.S b/arch/x86/crypto/twofish-x86_64-asm_64.S
+index 573aa10..b73ad89 100644
+--- a/arch/x86/crypto/twofish-x86_64-asm_64.S
++++ b/arch/x86/crypto/twofish-x86_64-asm_64.S
@@ -21,6 +21,7 @@
.text
@@ -5864,10 +6516,11 @@ diff -urNp linux-3.1.4/arch/x86/crypto/twofish-x86_64-asm_64.S linux-3.1.4/arch/
movq $1,%rax
+ pax_force_retaddr 0, 1
ret
-diff -urNp linux-3.1.4/arch/x86/ia32/ia32_aout.c linux-3.1.4/arch/x86/ia32/ia32_aout.c
---- linux-3.1.4/arch/x86/ia32/ia32_aout.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/ia32/ia32_aout.c 2011-11-16 18:40:08.000000000 -0500
-@@ -162,6 +162,8 @@ static int aout_core_dump(long signr, st
+diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
+index fd84387..0b4af7d 100644
+--- a/arch/x86/ia32/ia32_aout.c
++++ b/arch/x86/ia32/ia32_aout.c
+@@ -162,6 +162,8 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
unsigned long dump_start, dump_size;
struct user32 dump;
@@ -5876,9 +6529,90 @@ diff -urNp linux-3.1.4/arch/x86/ia32/ia32_aout.c linux-3.1.4/arch/x86/ia32/ia32_
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
-diff -urNp linux-3.1.4/arch/x86/ia32/ia32entry.S linux-3.1.4/arch/x86/ia32/ia32entry.S
---- linux-3.1.4/arch/x86/ia32/ia32entry.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/ia32/ia32entry.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
+index 6557769..ef6ae89 100644
+--- a/arch/x86/ia32/ia32_signal.c
++++ b/arch/x86/ia32/ia32_signal.c
+@@ -169,7 +169,7 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
+ }
+ seg = get_fs();
+ set_fs(KERNEL_DS);
+- ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp);
++ ret = do_sigaltstack(uss_ptr ? (const stack_t __force_user *)&uss : NULL, (stack_t __force_user *)&uoss, regs->sp);
+ set_fs(seg);
+ if (ret >= 0 && uoss_ptr) {
+ if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)))
+@@ -370,7 +370,7 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
+ */
+ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+ size_t frame_size,
+- void **fpstate)
++ void __user **fpstate)
+ {
+ unsigned long sp;
+
+@@ -391,7 +391,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+
+ if (used_math()) {
+ sp = sp - sig_xstate_ia32_size;
+- *fpstate = (struct _fpstate_ia32 *) sp;
++ *fpstate = (struct _fpstate_ia32 __user *) sp;
+ if (save_i387_xstate_ia32(*fpstate) < 0)
+ return (void __user *) -1L;
+ }
+@@ -399,7 +399,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+ sp -= frame_size;
+ /* Align the stack pointer according to the i386 ABI,
+ * i.e. so that on function entry ((sp + 4) & 15) == 0. */
+- sp = ((sp + 4) & -16ul) - 4;
++ sp = ((sp - 12) & -16ul) - 4;
+ return (void __user *) sp;
+ }
+
+@@ -457,7 +457,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
+ * These are actually not used anymore, but left because some
+ * gdb versions depend on them as a marker.
+ */
+- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
++ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
+ } put_user_catch(err);
+
+ if (err)
+@@ -499,7 +499,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+ 0xb8,
+ __NR_ia32_rt_sigreturn,
+ 0x80cd,
+- 0,
++ 0
+ };
+
+ frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
+@@ -529,16 +529,18 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+
+ if (ka->sa.sa_flags & SA_RESTORER)
+ restorer = ka->sa.sa_restorer;
++ else if (current->mm->context.vdso)
++ /* Return stub is in 32bit vsyscall page */
++ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
+ else
+- restorer = VDSO32_SYMBOL(current->mm->context.vdso,
+- rt_sigreturn);
++ restorer = &frame->retcode;
+ put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
+
+ /*
+ * Not actually used anymore, but left because some gdb
+ * versions need it.
+ */
+- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
++ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
+ } put_user_catch(err);
+
+ if (err)
+diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
+index 54edb207..9335b5f 100644
+--- a/arch/x86/ia32/ia32entry.S
++++ b/arch/x86/ia32/ia32entry.S
@@ -13,7 +13,9 @@
#include <asm/thread_info.h>
#include <asm/segment.h>
@@ -6164,7 +6898,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/ia32entry.S linux-3.1.4/arch/x86/ia32/ia32e
jnz ia32_tracesys
cmpq $(IA32_NR_syscalls-1),%rax
ja ia32_badsys
-@@ -441,6 +495,9 @@ ia32_tracesys:
+@@ -441,6 +495,9 @@ ia32_tracesys:
movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
movq %rsp,%rdi /* &pt_regs -> arg1 */
call syscall_trace_enter
@@ -6182,89 +6916,11 @@ diff -urNp linux-3.1.4/arch/x86/ia32/ia32entry.S linux-3.1.4/arch/x86/ia32/ia32e
ret
CFI_ENDPROC
-diff -urNp linux-3.1.4/arch/x86/ia32/ia32_signal.c linux-3.1.4/arch/x86/ia32/ia32_signal.c
---- linux-3.1.4/arch/x86/ia32/ia32_signal.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/ia32/ia32_signal.c 2011-11-16 18:39:07.000000000 -0500
-@@ -169,7 +169,7 @@ asmlinkage long sys32_sigaltstack(const
- }
- seg = get_fs();
- set_fs(KERNEL_DS);
-- ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->sp);
-+ ret = do_sigaltstack(uss_ptr ? (const stack_t __force_user *)&uss : NULL, (stack_t __force_user *)&uoss, regs->sp);
- set_fs(seg);
- if (ret >= 0 && uoss_ptr) {
- if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(stack_ia32_t)))
-@@ -370,7 +370,7 @@ static int ia32_setup_sigcontext(struct
- */
- static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
- size_t frame_size,
-- void **fpstate)
-+ void __user **fpstate)
- {
- unsigned long sp;
-
-@@ -391,7 +391,7 @@ static void __user *get_sigframe(struct
-
- if (used_math()) {
- sp = sp - sig_xstate_ia32_size;
-- *fpstate = (struct _fpstate_ia32 *) sp;
-+ *fpstate = (struct _fpstate_ia32 __user *) sp;
- if (save_i387_xstate_ia32(*fpstate) < 0)
- return (void __user *) -1L;
- }
-@@ -399,7 +399,7 @@ static void __user *get_sigframe(struct
- sp -= frame_size;
- /* Align the stack pointer according to the i386 ABI,
- * i.e. so that on function entry ((sp + 4) & 15) == 0. */
-- sp = ((sp + 4) & -16ul) - 4;
-+ sp = ((sp - 12) & -16ul) - 4;
- return (void __user *) sp;
- }
-
-@@ -457,7 +457,7 @@ int ia32_setup_frame(int sig, struct k_s
- * These are actually not used anymore, but left because some
- * gdb versions depend on them as a marker.
- */
-- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
-+ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
- } put_user_catch(err);
-
- if (err)
-@@ -499,7 +499,7 @@ int ia32_setup_rt_frame(int sig, struct
- 0xb8,
- __NR_ia32_rt_sigreturn,
- 0x80cd,
-- 0,
-+ 0
- };
-
- frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
-@@ -529,16 +529,18 @@ int ia32_setup_rt_frame(int sig, struct
-
- if (ka->sa.sa_flags & SA_RESTORER)
- restorer = ka->sa.sa_restorer;
-+ else if (current->mm->context.vdso)
-+ /* Return stub is in 32bit vsyscall page */
-+ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
- else
-- restorer = VDSO32_SYMBOL(current->mm->context.vdso,
-- rt_sigreturn);
-+ restorer = &frame->retcode;
- put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
-
- /*
- * Not actually used anymore, but left because some gdb
- * versions need it.
- */
-- put_user_ex(*((u64 *)&code), (u64 *)frame->retcode);
-+ put_user_ex(*((const u64 *)&code), (u64 __user *)frame->retcode);
- } put_user_catch(err);
-
- if (err)
-diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia32.c
---- linux-3.1.4/arch/x86/ia32/sys_ia32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/ia32/sys_ia32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -69,8 +69,8 @@ asmlinkage long sys32_ftruncate64(unsign
+diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
+index f6f5c53..b358b28 100644
+--- a/arch/x86/ia32/sys_ia32.c
++++ b/arch/x86/ia32/sys_ia32.c
+@@ -69,8 +69,8 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long offset_low,
*/
static int cp_stat64(struct stat64 __user *ubuf, struct kstat *stat)
{
@@ -6275,7 +6931,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
SET_UID(uid, stat->uid);
SET_GID(gid, stat->gid);
if (!access_ok(VERIFY_WRITE, ubuf, sizeof(struct stat64)) ||
-@@ -308,8 +308,8 @@ asmlinkage long sys32_rt_sigprocmask(int
+@@ -308,8 +308,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
}
set_fs(KERNEL_DS);
ret = sys_rt_sigprocmask(how,
@@ -6286,7 +6942,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
sigsetsize);
set_fs(old_fs);
if (ret)
-@@ -332,7 +332,7 @@ asmlinkage long sys32_alarm(unsigned int
+@@ -332,7 +332,7 @@ asmlinkage long sys32_alarm(unsigned int seconds)
return alarm_setitimer(seconds);
}
@@ -6295,7 +6951,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
int options)
{
return compat_sys_wait4(pid, stat_addr, options, NULL);
-@@ -353,7 +353,7 @@ asmlinkage long sys32_sched_rr_get_inter
+@@ -353,7 +353,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -6304,7 +6960,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
set_fs(old_fs);
if (put_compat_timespec(&t, interval))
return -EFAULT;
-@@ -369,7 +369,7 @@ asmlinkage long sys32_rt_sigpending(comp
+@@ -369,7 +369,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -6313,7 +6969,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
set_fs(old_fs);
if (!ret) {
switch (_NSIG_WORDS) {
-@@ -394,7 +394,7 @@ asmlinkage long sys32_rt_sigqueueinfo(in
+@@ -394,7 +394,7 @@ asmlinkage long sys32_rt_sigqueueinfo(int pid, int sig,
if (copy_siginfo_from_user32(&info, uinfo))
return -EFAULT;
set_fs(KERNEL_DS);
@@ -6322,7 +6978,7 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
set_fs(old_fs);
return ret;
}
-@@ -439,7 +439,7 @@ asmlinkage long sys32_sendfile(int out_f
+@@ -439,7 +439,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
return -EFAULT;
set_fs(KERNEL_DS);
@@ -6331,9 +6987,10 @@ diff -urNp linux-3.1.4/arch/x86/ia32/sys_ia32.c linux-3.1.4/arch/x86/ia32/sys_ia
count);
set_fs(old_fs);
-diff -urNp linux-3.1.4/arch/x86/include/asm/alternative-asm.h linux-3.1.4/arch/x86/include/asm/alternative-asm.h
---- linux-3.1.4/arch/x86/include/asm/alternative-asm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/alternative-asm.h 2011-12-02 17:40:13.000000000 -0500
+diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
+index 091508b..0ee32ec 100644
+--- a/arch/x86/include/asm/alternative-asm.h
++++ b/arch/x86/include/asm/alternative-asm.h
@@ -15,6 +15,45 @@
.endm
#endif
@@ -6380,10 +7037,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/alternative-asm.h linux-3.1.4/arch/x
.macro altinstruction_entry orig alt feature orig_len alt_len
.long \orig - .
.long \alt - .
-diff -urNp linux-3.1.4/arch/x86/include/asm/alternative.h linux-3.1.4/arch/x86/include/asm/alternative.h
---- linux-3.1.4/arch/x86/include/asm/alternative.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/alternative.h 2011-11-16 18:39:07.000000000 -0500
-@@ -89,7 +89,7 @@ static inline int alternatives_text_rese
+diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
+index 37ad100..7d47faa 100644
+--- a/arch/x86/include/asm/alternative.h
++++ b/arch/x86/include/asm/alternative.h
+@@ -89,7 +89,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
".section .discard,\"aw\",@progbits\n" \
" .byte 0xff + (664f-663f) - (662b-661b)\n" /* rlen <= slen */ \
".previous\n" \
@@ -6392,10 +7050,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/alternative.h linux-3.1.4/arch/x86/i
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous"
-diff -urNp linux-3.1.4/arch/x86/include/asm/apic.h linux-3.1.4/arch/x86/include/asm/apic.h
---- linux-3.1.4/arch/x86/include/asm/apic.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/apic.h 2011-11-16 18:39:07.000000000 -0500
-@@ -45,7 +45,7 @@ static inline void generic_apic_probe(vo
+diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
+index 9b7273c..e9fcc24 100644
+--- a/arch/x86/include/asm/apic.h
++++ b/arch/x86/include/asm/apic.h
+@@ -45,7 +45,7 @@ static inline void generic_apic_probe(void)
#ifdef CONFIG_X86_LOCAL_APIC
@@ -6404,10 +7063,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/apic.h linux-3.1.4/arch/x86/include/
extern int local_apic_timer_c2_ok;
extern int disable_apic;
-diff -urNp linux-3.1.4/arch/x86/include/asm/apm.h linux-3.1.4/arch/x86/include/asm/apm.h
---- linux-3.1.4/arch/x86/include/asm/apm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/apm.h 2011-11-16 18:39:07.000000000 -0500
-@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32
+diff --git a/arch/x86/include/asm/apm.h b/arch/x86/include/asm/apm.h
+index 20370c6..a2eb9b0 100644
+--- a/arch/x86/include/asm/apm.h
++++ b/arch/x86/include/asm/apm.h
+@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -6416,7 +7076,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/apm.h linux-3.1.4/arch/x86/include/a
"setc %%al\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-@@ -58,7 +58,7 @@ static inline u8 apm_bios_call_simple_as
+@@ -58,7 +58,7 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -6425,9 +7085,422 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/apm.h linux-3.1.4/arch/x86/include/a
"setc %%bl\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/include/asm/atomic64_32.h
---- linux-3.1.4/arch/x86/include/asm/atomic64_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/atomic64_32.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
+index 10572e3..2618d91 100644
+--- a/arch/x86/include/asm/atomic.h
++++ b/arch/x86/include/asm/atomic.h
+@@ -22,7 +22,18 @@
+ */
+ static inline int atomic_read(const atomic_t *v)
+ {
+- return (*(volatile int *)&(v)->counter);
++ return (*(volatile const int *)&(v)->counter);
++}
++
++/**
++ * atomic_read_unchecked - read atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically reads the value of @v.
++ */
++static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
++{
++ return (*(volatile const int *)&(v)->counter);
+ }
+
+ /**
+@@ -38,6 +49,18 @@ static inline void atomic_set(atomic_t *v, int i)
+ }
+
+ /**
++ * atomic_set_unchecked - set atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ * @i: required value
++ *
++ * Atomically sets the value of @v to @i.
++ */
++static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
++{
++ v->counter = i;
++}
++
++/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+@@ -46,7 +69,29 @@ static inline void atomic_set(atomic_t *v, int i)
+ */
+ static inline void atomic_add(int i, atomic_t *v)
+ {
+- asm volatile(LOCK_PREFIX "addl %1,%0"
++ asm volatile(LOCK_PREFIX "addl %1,%0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "subl %1,%0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "+m" (v->counter)
++ : "ir" (i));
++}
++
++/**
++ * atomic_add_unchecked - add integer to atomic variable
++ * @i: integer value to add
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically adds @i to @v.
++ */
++static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
++{
++ asm volatile(LOCK_PREFIX "addl %1,%0\n"
+ : "+m" (v->counter)
+ : "ir" (i));
+ }
+@@ -60,7 +105,29 @@ static inline void atomic_add(int i, atomic_t *v)
+ */
+ static inline void atomic_sub(int i, atomic_t *v)
+ {
+- asm volatile(LOCK_PREFIX "subl %1,%0"
++ asm volatile(LOCK_PREFIX "subl %1,%0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "addl %1,%0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "+m" (v->counter)
++ : "ir" (i));
++}
++
++/**
++ * atomic_sub_unchecked - subtract integer from atomic variable
++ * @i: integer value to subtract
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically subtracts @i from @v.
++ */
++static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
++{
++ asm volatile(LOCK_PREFIX "subl %1,%0\n"
+ : "+m" (v->counter)
+ : "ir" (i));
+ }
+@@ -78,7 +145,16 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
+ {
+ unsigned char c;
+
+- asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
++ asm volatile(LOCK_PREFIX "subl %2,%0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "addl %2,%0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ "sete %1\n"
+ : "+m" (v->counter), "=qm" (c)
+ : "ir" (i) : "memory");
+ return c;
+@@ -92,7 +168,27 @@ static inline int atomic_sub_and_test(int i, atomic_t *v)
+ */
+ static inline void atomic_inc(atomic_t *v)
+ {
+- asm volatile(LOCK_PREFIX "incl %0"
++ asm volatile(LOCK_PREFIX "incl %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "decl %0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "+m" (v->counter));
++}
++
++/**
++ * atomic_inc_unchecked - increment atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically increments @v by 1.
++ */
++static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
++{
++ asm volatile(LOCK_PREFIX "incl %0\n"
+ : "+m" (v->counter));
+ }
+
+@@ -104,7 +200,27 @@ static inline void atomic_inc(atomic_t *v)
+ */
+ static inline void atomic_dec(atomic_t *v)
+ {
+- asm volatile(LOCK_PREFIX "decl %0"
++ asm volatile(LOCK_PREFIX "decl %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "incl %0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "+m" (v->counter));
++}
++
++/**
++ * atomic_dec_unchecked - decrement atomic variable
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically decrements @v by 1.
++ */
++static inline void atomic_dec_unchecked(atomic_unchecked_t *v)
++{
++ asm volatile(LOCK_PREFIX "decl %0\n"
+ : "+m" (v->counter));
+ }
+
+@@ -120,7 +236,16 @@ static inline int atomic_dec_and_test(atomic_t *v)
+ {
+ unsigned char c;
+
+- asm volatile(LOCK_PREFIX "decl %0; sete %1"
++ asm volatile(LOCK_PREFIX "decl %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "incl %0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ "sete %1\n"
+ : "+m" (v->counter), "=qm" (c)
+ : : "memory");
+ return c != 0;
+@@ -138,7 +263,35 @@ static inline int atomic_inc_and_test(atomic_t *v)
+ {
+ unsigned char c;
+
+- asm volatile(LOCK_PREFIX "incl %0; sete %1"
++ asm volatile(LOCK_PREFIX "incl %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "decl %0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ "sete %1\n"
++ : "+m" (v->counter), "=qm" (c)
++ : : "memory");
++ return c != 0;
++}
++
++/**
++ * atomic_inc_and_test_unchecked - increment and test
++ * @v: pointer of type atomic_unchecked_t
++ *
++ * Atomically increments @v by 1
++ * and returns true if the result is zero, or false for all
++ * other cases.
++ */
++static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v)
++{
++ unsigned char c;
++
++ asm volatile(LOCK_PREFIX "incl %0\n"
++ "sete %1\n"
+ : "+m" (v->counter), "=qm" (c)
+ : : "memory");
+ return c != 0;
+@@ -157,7 +310,16 @@ static inline int atomic_add_negative(int i, atomic_t *v)
+ {
+ unsigned char c;
+
+- asm volatile(LOCK_PREFIX "addl %2,%0; sets %1"
++ asm volatile(LOCK_PREFIX "addl %2,%0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ LOCK_PREFIX "subl %2,%0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ "sets %1\n"
+ : "+m" (v->counter), "=qm" (c)
+ : "ir" (i) : "memory");
+ return c;
+@@ -180,6 +342,46 @@ static inline int atomic_add_return(int i, atomic_t *v)
+ #endif
+ /* Modern 486+ processor */
+ __i = i;
++ asm volatile(LOCK_PREFIX "xaddl %0, %1\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ "movl %0, %1\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "+r" (i), "+m" (v->counter)
++ : : "memory");
++ return i + __i;
++
++#ifdef CONFIG_M386
++no_xadd: /* Legacy 386 processor */
++ local_irq_save(flags);
++ __i = atomic_read(v);
++ atomic_set(v, i + __i);
++ local_irq_restore(flags);
++ return i + __i;
++#endif
++}
++
++/**
++ * atomic_add_return_unchecked - add integer and return
++ * @v: pointer of type atomic_unchecked_t
++ * @i: integer value to add
++ *
++ * Atomically adds @i to @v and returns @i + @v
++ */
++static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
++{
++ int __i;
++#ifdef CONFIG_M386
++ unsigned long flags;
++ if (unlikely(boot_cpu_data.x86 <= 3))
++ goto no_xadd;
++#endif
++ /* Modern 486+ processor */
++ __i = i;
+ asm volatile(LOCK_PREFIX "xaddl %0, %1"
+ : "+r" (i), "+m" (v->counter)
+ : : "memory");
+@@ -208,6 +410,10 @@ static inline int atomic_sub_return(int i, atomic_t *v)
+ }
+
+ #define atomic_inc_return(v) (atomic_add_return(1, v))
++static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
++{
++ return atomic_add_return_unchecked(1, v);
++}
+ #define atomic_dec_return(v) (atomic_sub_return(1, v))
+
+ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
+@@ -215,11 +421,21 @@ static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
+ return cmpxchg(&v->counter, old, new);
+ }
+
++static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new)
++{
++ return cmpxchg(&v->counter, old, new);
++}
++
+ static inline int atomic_xchg(atomic_t *v, int new)
+ {
+ return xchg(&v->counter, new);
+ }
+
++static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new)
++{
++ return xchg(&v->counter, new);
++}
++
+ /**
+ * __atomic_add_unless - add unless the number is already a given value
+ * @v: pointer of type atomic_t
+@@ -231,12 +447,25 @@ static inline int atomic_xchg(atomic_t *v, int new)
+ */
+ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+ {
+- int c, old;
++ int c, old, new;
+ c = atomic_read(v);
+ for (;;) {
+- if (unlikely(c == (u)))
++ if (unlikely(c == u))
+ break;
+- old = atomic_cmpxchg((v), c, c + (a));
++
++ asm volatile("addl %2,%0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ "subl %2,%0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "=r" (new)
++ : "0" (c), "ir" (a));
++
++ old = atomic_cmpxchg(v, c, new);
+ if (likely(old == c))
+ break;
+ c = old;
+@@ -244,6 +473,48 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+ return c;
+ }
+
++/**
++ * atomic_inc_not_zero_hint - increment if not null
++ * @v: pointer of type atomic_t
++ * @hint: probable value of the atomic before the increment
++ *
++ * This version of atomic_inc_not_zero() gives a hint of probable
++ * value of the atomic. This helps processor to not read the memory
++ * before doing the atomic read/modify/write cycle, lowering
++ * number of bus transactions on some arches.
++ *
++ * Returns: 0 if increment was not done, 1 otherwise.
++ */
++#define atomic_inc_not_zero_hint atomic_inc_not_zero_hint
++static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint)
++{
++ int val, c = hint, new;
++
++ /* sanity test, should be removed by compiler if hint is a constant */
++ if (!hint)
++ return __atomic_add_unless(v, 1, 0);
++
++ do {
++ asm volatile("incl %0\n"
++
++#ifdef CONFIG_PAX_REFCOUNT
++ "jno 0f\n"
++ "decl %0\n"
++ "int $4\n0:\n"
++ _ASM_EXTABLE(0b, 0b)
++#endif
++
++ : "=r" (new)
++ : "0" (c));
++
++ val = atomic_cmpxchg(v, c, new);
++ if (val == c)
++ return 1;
++ c = val;
++ } while (c);
++
++ return 0;
++}
+
+ /*
+ * atomic_dec_if_positive - decrement by 1 if old value positive
+diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
+index 24098aa..1e37723 100644
+--- a/arch/x86/include/asm/atomic64_32.h
++++ b/arch/x86/include/asm/atomic64_32.h
@@ -12,6 +12,14 @@ typedef struct {
u64 __aligned(8) counter;
} atomic64_t;
@@ -6443,7 +7516,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
#define ATOMIC64_INIT(val) { (val) }
#ifdef CONFIG_X86_CMPXCHG64
-@@ -38,6 +46,21 @@ static inline long long atomic64_cmpxchg
+@@ -38,6 +46,21 @@ static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n
}
/**
@@ -6465,7 +7538,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
* atomic64_xchg - xchg atomic64 variable
* @v: pointer to type atomic64_t
* @n: value to assign
-@@ -77,6 +100,24 @@ static inline void atomic64_set(atomic64
+@@ -77,6 +100,24 @@ static inline void atomic64_set(atomic64_t *v, long long i)
}
/**
@@ -6490,7 +7563,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
* atomic64_read - read atomic64 variable
* @v: pointer to type atomic64_t
*
-@@ -93,6 +134,22 @@ static inline long long atomic64_read(at
+@@ -93,6 +134,22 @@ static inline long long atomic64_read(atomic64_t *v)
}
/**
@@ -6513,7 +7586,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
* atomic64_add_return - add and return
* @i: integer value to add
* @v: pointer to type atomic64_t
-@@ -108,6 +165,22 @@ static inline long long atomic64_add_ret
+@@ -108,6 +165,22 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
return i;
}
@@ -6536,7 +7609,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
/*
* Other variants with different arithmetic operators:
*/
-@@ -131,6 +204,17 @@ static inline long long atomic64_inc_ret
+@@ -131,6 +204,17 @@ static inline long long atomic64_inc_return(atomic64_t *v)
return a;
}
@@ -6554,7 +7627,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
static inline long long atomic64_dec_return(atomic64_t *v)
{
long long a;
-@@ -159,6 +243,22 @@ static inline long long atomic64_add(lon
+@@ -159,6 +243,22 @@ static inline long long atomic64_add(long long i, atomic64_t *v)
}
/**
@@ -6577,9 +7650,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_32.h linux-3.1.4/arch/x86/i
* atomic64_sub - subtract the atomic64 variable
* @i: integer value to subtract
* @v: pointer to type atomic64_t
-diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/include/asm/atomic64_64.h
---- linux-3.1.4/arch/x86/include/asm/atomic64_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/atomic64_64.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h
+index 017594d..d3fcf72 100644
+--- a/arch/x86/include/asm/atomic64_64.h
++++ b/arch/x86/include/asm/atomic64_64.h
@@ -18,7 +18,19 @@
*/
static inline long atomic64_read(const atomic64_t *v)
@@ -6601,7 +7675,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
}
/**
-@@ -34,6 +46,18 @@ static inline void atomic64_set(atomic64
+@@ -34,6 +46,18 @@ static inline void atomic64_set(atomic64_t *v, long i)
}
/**
@@ -6620,7 +7694,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
* atomic64_add - add integer to atomic64 variable
* @i: integer value to add
* @v: pointer to type atomic64_t
-@@ -42,6 +66,28 @@ static inline void atomic64_set(atomic64
+@@ -42,6 +66,28 @@ static inline void atomic64_set(atomic64_t *v, long i)
*/
static inline void atomic64_add(long i, atomic64_t *v)
{
@@ -6649,7 +7723,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
asm volatile(LOCK_PREFIX "addq %1,%0"
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
-@@ -56,7 +102,29 @@ static inline void atomic64_add(long i,
+@@ -56,7 +102,29 @@ static inline void atomic64_add(long i, atomic64_t *v)
*/
static inline void atomic64_sub(long i, atomic64_t *v)
{
@@ -6680,7 +7754,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter)
: "er" (i), "m" (v->counter));
}
-@@ -74,7 +142,16 @@ static inline int atomic64_sub_and_test(
+@@ -74,7 +142,16 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v)
{
unsigned char c;
@@ -6698,7 +7772,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -88,6 +165,27 @@ static inline int atomic64_sub_and_test(
+@@ -88,6 +165,27 @@ static inline int atomic64_sub_and_test(long i, atomic64_t *v)
*/
static inline void atomic64_inc(atomic64_t *v)
{
@@ -6726,7 +7800,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
asm volatile(LOCK_PREFIX "incq %0"
: "=m" (v->counter)
: "m" (v->counter));
-@@ -101,7 +199,28 @@ static inline void atomic64_inc(atomic64
+@@ -101,7 +199,28 @@ static inline void atomic64_inc(atomic64_t *v)
*/
static inline void atomic64_dec(atomic64_t *v)
{
@@ -6756,7 +7830,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter)
: "m" (v->counter));
}
-@@ -118,7 +237,16 @@ static inline int atomic64_dec_and_test(
+@@ -118,7 +237,16 @@ static inline int atomic64_dec_and_test(atomic64_t *v)
{
unsigned char c;
@@ -6774,7 +7848,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -136,7 +264,16 @@ static inline int atomic64_inc_and_test(
+@@ -136,7 +264,16 @@ static inline int atomic64_inc_and_test(atomic64_t *v)
{
unsigned char c;
@@ -6792,7 +7866,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter), "=qm" (c)
: "m" (v->counter) : "memory");
return c != 0;
-@@ -155,7 +292,16 @@ static inline int atomic64_add_negative(
+@@ -155,7 +292,16 @@ static inline int atomic64_add_negative(long i, atomic64_t *v)
{
unsigned char c;
@@ -6810,7 +7884,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "=m" (v->counter), "=qm" (c)
: "er" (i), "m" (v->counter) : "memory");
return c;
-@@ -171,7 +317,31 @@ static inline int atomic64_add_negative(
+@@ -171,7 +317,31 @@ static inline int atomic64_add_negative(long i, atomic64_t *v)
static inline long atomic64_add_return(long i, atomic64_t *v)
{
long __i = i;
@@ -6843,7 +7917,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
: "+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
-@@ -183,6 +353,10 @@ static inline long atomic64_sub_return(l
+@@ -183,6 +353,10 @@ static inline long atomic64_sub_return(long i, atomic64_t *v)
}
#define atomic64_inc_return(v) (atomic64_add_return(1, (v)))
@@ -6854,7 +7928,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
#define atomic64_dec_return(v) (atomic64_sub_return(1, (v)))
static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
-@@ -190,6 +364,11 @@ static inline long atomic64_cmpxchg(atom
+@@ -190,6 +364,11 @@ static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
return cmpxchg(&v->counter, old, new);
}
@@ -6866,7 +7940,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
static inline long atomic64_xchg(atomic64_t *v, long new)
{
return xchg(&v->counter, new);
-@@ -206,17 +385,30 @@ static inline long atomic64_xchg(atomic6
+@@ -206,17 +385,30 @@ static inline long atomic64_xchg(atomic64_t *v, long new)
*/
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
{
@@ -6901,420 +7975,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/atomic64_64.h linux-3.1.4/arch/x86/i
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
-diff -urNp linux-3.1.4/arch/x86/include/asm/atomic.h linux-3.1.4/arch/x86/include/asm/atomic.h
---- linux-3.1.4/arch/x86/include/asm/atomic.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/atomic.h 2011-11-16 18:39:07.000000000 -0500
-@@ -22,7 +22,18 @@
- */
- static inline int atomic_read(const atomic_t *v)
- {
-- return (*(volatile int *)&(v)->counter);
-+ return (*(volatile const int *)&(v)->counter);
-+}
-+
-+/**
-+ * atomic_read_unchecked - read atomic variable
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically reads the value of @v.
-+ */
-+static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
-+{
-+ return (*(volatile const int *)&(v)->counter);
- }
-
- /**
-@@ -38,6 +49,18 @@ static inline void atomic_set(atomic_t *
- }
-
- /**
-+ * atomic_set_unchecked - set atomic variable
-+ * @v: pointer of type atomic_unchecked_t
-+ * @i: required value
-+ *
-+ * Atomically sets the value of @v to @i.
-+ */
-+static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i)
-+{
-+ v->counter = i;
-+}
-+
-+/**
- * atomic_add - add integer to atomic variable
- * @i: integer value to add
- * @v: pointer of type atomic_t
-@@ -46,7 +69,29 @@ static inline void atomic_set(atomic_t *
- */
- static inline void atomic_add(int i, atomic_t *v)
- {
-- asm volatile(LOCK_PREFIX "addl %1,%0"
-+ asm volatile(LOCK_PREFIX "addl %1,%0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "subl %1,%0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "+m" (v->counter)
-+ : "ir" (i));
-+}
-+
-+/**
-+ * atomic_add_unchecked - add integer to atomic variable
-+ * @i: integer value to add
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically adds @i to @v.
-+ */
-+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
-+{
-+ asm volatile(LOCK_PREFIX "addl %1,%0\n"
- : "+m" (v->counter)
- : "ir" (i));
- }
-@@ -60,7 +105,29 @@ static inline void atomic_add(int i, ato
- */
- static inline void atomic_sub(int i, atomic_t *v)
- {
-- asm volatile(LOCK_PREFIX "subl %1,%0"
-+ asm volatile(LOCK_PREFIX "subl %1,%0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "addl %1,%0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "+m" (v->counter)
-+ : "ir" (i));
-+}
-+
-+/**
-+ * atomic_sub_unchecked - subtract integer from atomic variable
-+ * @i: integer value to subtract
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically subtracts @i from @v.
-+ */
-+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
-+{
-+ asm volatile(LOCK_PREFIX "subl %1,%0\n"
- : "+m" (v->counter)
- : "ir" (i));
- }
-@@ -78,7 +145,16 @@ static inline int atomic_sub_and_test(in
- {
- unsigned char c;
-
-- asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
-+ asm volatile(LOCK_PREFIX "subl %2,%0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "addl %2,%0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ "sete %1\n"
- : "+m" (v->counter), "=qm" (c)
- : "ir" (i) : "memory");
- return c;
-@@ -92,7 +168,27 @@ static inline int atomic_sub_and_test(in
- */
- static inline void atomic_inc(atomic_t *v)
- {
-- asm volatile(LOCK_PREFIX "incl %0"
-+ asm volatile(LOCK_PREFIX "incl %0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "decl %0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "+m" (v->counter));
-+}
-+
-+/**
-+ * atomic_inc_unchecked - increment atomic variable
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically increments @v by 1.
-+ */
-+static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
-+{
-+ asm volatile(LOCK_PREFIX "incl %0\n"
- : "+m" (v->counter));
- }
-
-@@ -104,7 +200,27 @@ static inline void atomic_inc(atomic_t *
- */
- static inline void atomic_dec(atomic_t *v)
- {
-- asm volatile(LOCK_PREFIX "decl %0"
-+ asm volatile(LOCK_PREFIX "decl %0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "incl %0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "+m" (v->counter));
-+}
-+
-+/**
-+ * atomic_dec_unchecked - decrement atomic variable
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically decrements @v by 1.
-+ */
-+static inline void atomic_dec_unchecked(atomic_unchecked_t *v)
-+{
-+ asm volatile(LOCK_PREFIX "decl %0\n"
- : "+m" (v->counter));
- }
-
-@@ -120,7 +236,16 @@ static inline int atomic_dec_and_test(at
- {
- unsigned char c;
-
-- asm volatile(LOCK_PREFIX "decl %0; sete %1"
-+ asm volatile(LOCK_PREFIX "decl %0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "incl %0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ "sete %1\n"
- : "+m" (v->counter), "=qm" (c)
- : : "memory");
- return c != 0;
-@@ -138,7 +263,35 @@ static inline int atomic_inc_and_test(at
- {
- unsigned char c;
-
-- asm volatile(LOCK_PREFIX "incl %0; sete %1"
-+ asm volatile(LOCK_PREFIX "incl %0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "decl %0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ "sete %1\n"
-+ : "+m" (v->counter), "=qm" (c)
-+ : : "memory");
-+ return c != 0;
-+}
-+
-+/**
-+ * atomic_inc_and_test_unchecked - increment and test
-+ * @v: pointer of type atomic_unchecked_t
-+ *
-+ * Atomically increments @v by 1
-+ * and returns true if the result is zero, or false for all
-+ * other cases.
-+ */
-+static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v)
-+{
-+ unsigned char c;
-+
-+ asm volatile(LOCK_PREFIX "incl %0\n"
-+ "sete %1\n"
- : "+m" (v->counter), "=qm" (c)
- : : "memory");
- return c != 0;
-@@ -157,7 +310,16 @@ static inline int atomic_add_negative(in
- {
- unsigned char c;
-
-- asm volatile(LOCK_PREFIX "addl %2,%0; sets %1"
-+ asm volatile(LOCK_PREFIX "addl %2,%0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ LOCK_PREFIX "subl %2,%0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ "sets %1\n"
- : "+m" (v->counter), "=qm" (c)
- : "ir" (i) : "memory");
- return c;
-@@ -180,6 +342,46 @@ static inline int atomic_add_return(int
- #endif
- /* Modern 486+ processor */
- __i = i;
-+ asm volatile(LOCK_PREFIX "xaddl %0, %1\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ "movl %0, %1\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "+r" (i), "+m" (v->counter)
-+ : : "memory");
-+ return i + __i;
-+
-+#ifdef CONFIG_M386
-+no_xadd: /* Legacy 386 processor */
-+ local_irq_save(flags);
-+ __i = atomic_read(v);
-+ atomic_set(v, i + __i);
-+ local_irq_restore(flags);
-+ return i + __i;
-+#endif
-+}
-+
-+/**
-+ * atomic_add_return_unchecked - add integer and return
-+ * @v: pointer of type atomic_unchecked_t
-+ * @i: integer value to add
-+ *
-+ * Atomically adds @i to @v and returns @i + @v
-+ */
-+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
-+{
-+ int __i;
-+#ifdef CONFIG_M386
-+ unsigned long flags;
-+ if (unlikely(boot_cpu_data.x86 <= 3))
-+ goto no_xadd;
-+#endif
-+ /* Modern 486+ processor */
-+ __i = i;
- asm volatile(LOCK_PREFIX "xaddl %0, %1"
- : "+r" (i), "+m" (v->counter)
- : : "memory");
-@@ -208,6 +410,10 @@ static inline int atomic_sub_return(int
- }
-
- #define atomic_inc_return(v) (atomic_add_return(1, v))
-+static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v)
-+{
-+ return atomic_add_return_unchecked(1, v);
-+}
- #define atomic_dec_return(v) (atomic_sub_return(1, v))
-
- static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
-@@ -215,11 +421,21 @@ static inline int atomic_cmpxchg(atomic_
- return cmpxchg(&v->counter, old, new);
- }
-
-+static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new)
-+{
-+ return cmpxchg(&v->counter, old, new);
-+}
-+
- static inline int atomic_xchg(atomic_t *v, int new)
- {
- return xchg(&v->counter, new);
- }
-
-+static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new)
-+{
-+ return xchg(&v->counter, new);
-+}
-+
- /**
- * __atomic_add_unless - add unless the number is already a given value
- * @v: pointer of type atomic_t
-@@ -231,12 +447,25 @@ static inline int atomic_xchg(atomic_t *
- */
- static inline int __atomic_add_unless(atomic_t *v, int a, int u)
- {
-- int c, old;
-+ int c, old, new;
- c = atomic_read(v);
- for (;;) {
-- if (unlikely(c == (u)))
-+ if (unlikely(c == u))
- break;
-- old = atomic_cmpxchg((v), c, c + (a));
-+
-+ asm volatile("addl %2,%0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ "subl %2,%0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "=r" (new)
-+ : "0" (c), "ir" (a));
-+
-+ old = atomic_cmpxchg(v, c, new);
- if (likely(old == c))
- break;
- c = old;
-@@ -244,6 +473,48 @@ static inline int __atomic_add_unless(at
- return c;
- }
-
-+/**
-+ * atomic_inc_not_zero_hint - increment if not null
-+ * @v: pointer of type atomic_t
-+ * @hint: probable value of the atomic before the increment
-+ *
-+ * This version of atomic_inc_not_zero() gives a hint of probable
-+ * value of the atomic. This helps processor to not read the memory
-+ * before doing the atomic read/modify/write cycle, lowering
-+ * number of bus transactions on some arches.
-+ *
-+ * Returns: 0 if increment was not done, 1 otherwise.
-+ */
-+#define atomic_inc_not_zero_hint atomic_inc_not_zero_hint
-+static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint)
-+{
-+ int val, c = hint, new;
-+
-+ /* sanity test, should be removed by compiler if hint is a constant */
-+ if (!hint)
-+ return __atomic_add_unless(v, 1, 0);
-+
-+ do {
-+ asm volatile("incl %0\n"
-+
-+#ifdef CONFIG_PAX_REFCOUNT
-+ "jno 0f\n"
-+ "decl %0\n"
-+ "int $4\n0:\n"
-+ _ASM_EXTABLE(0b, 0b)
-+#endif
-+
-+ : "=r" (new)
-+ : "0" (c));
-+
-+ val = atomic_cmpxchg(v, c, new);
-+ if (val == c)
-+ return 1;
-+ c = val;
-+ } while (c);
-+
-+ return 0;
-+}
-
- /*
- * atomic_dec_if_positive - decrement by 1 if old value positive
-diff -urNp linux-3.1.4/arch/x86/include/asm/bitops.h linux-3.1.4/arch/x86/include/asm/bitops.h
---- linux-3.1.4/arch/x86/include/asm/bitops.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/bitops.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
+index 1775d6e..b65017f 100644
+--- a/arch/x86/include/asm/bitops.h
++++ b/arch/x86/include/asm/bitops.h
@@ -38,7 +38,7 @@
* a mask operation on a byte.
*/
@@ -7324,9 +7988,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/bitops.h linux-3.1.4/arch/x86/includ
#define CONST_MASK(nr) (1 << ((nr) & 7))
/**
-diff -urNp linux-3.1.4/arch/x86/include/asm/boot.h linux-3.1.4/arch/x86/include/asm/boot.h
---- linux-3.1.4/arch/x86/include/asm/boot.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/boot.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
+index 5e1a2ee..c9f9533 100644
+--- a/arch/x86/include/asm/boot.h
++++ b/arch/x86/include/asm/boot.h
@@ -11,10 +11,15 @@
#include <asm/pgtable_types.h>
@@ -7344,21 +8009,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/boot.h linux-3.1.4/arch/x86/include/
/* Minimum kernel alignment, as a power of two */
#ifdef CONFIG_X86_64
#define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
-diff -urNp linux-3.1.4/arch/x86/include/asm/cacheflush.h linux-3.1.4/arch/x86/include/asm/cacheflush.h
---- linux-3.1.4/arch/x86/include/asm/cacheflush.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/cacheflush.h 2011-11-16 18:39:07.000000000 -0500
-@@ -26,7 +26,7 @@ static inline unsigned long get_page_mem
- unsigned long pg_flags = pg->flags & _PGMT_MASK;
-
- if (pg_flags == _PGMT_DEFAULT)
-- return -1;
-+ return ~0UL;
- else if (pg_flags == _PGMT_WC)
- return _PAGE_CACHE_WC;
- else if (pg_flags == _PGMT_UC_MINUS)
-diff -urNp linux-3.1.4/arch/x86/include/asm/cache.h linux-3.1.4/arch/x86/include/asm/cache.h
---- linux-3.1.4/arch/x86/include/asm/cache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/cache.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
+index 48f99f1..d78ebf9 100644
+--- a/arch/x86/include/asm/cache.h
++++ b/arch/x86/include/asm/cache.h
@@ -5,12 +5,13 @@
/* L1 cache line size */
@@ -7375,10 +8029,24 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/cache.h linux-3.1.4/arch/x86/include
#ifdef CONFIG_X86_VSMP
#ifdef CONFIG_SMP
-diff -urNp linux-3.1.4/arch/x86/include/asm/checksum_32.h linux-3.1.4/arch/x86/include/asm/checksum_32.h
---- linux-3.1.4/arch/x86/include/asm/checksum_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/checksum_32.h 2011-11-16 18:39:07.000000000 -0500
-@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene
+diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
+index 4e12668..501d239 100644
+--- a/arch/x86/include/asm/cacheflush.h
++++ b/arch/x86/include/asm/cacheflush.h
+@@ -26,7 +26,7 @@ static inline unsigned long get_page_memtype(struct page *pg)
+ unsigned long pg_flags = pg->flags & _PGMT_MASK;
+
+ if (pg_flags == _PGMT_DEFAULT)
+- return -1;
++ return ~0UL;
+ else if (pg_flags == _PGMT_WC)
+ return _PAGE_CACHE_WC;
+ else if (pg_flags == _PGMT_UC_MINUS)
+diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
+index 46fc474..b02b0f9 100644
+--- a/arch/x86/include/asm/checksum_32.h
++++ b/arch/x86/include/asm/checksum_32.h
+@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,
int len, __wsum sum,
int *src_err_ptr, int *dst_err_ptr);
@@ -7393,7 +8061,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/checksum_32.h linux-3.1.4/arch/x86/i
/*
* Note: when you get a NULL pointer exception here this means someone
* passed in an incorrect kernel address to one of these functions.
-@@ -50,7 +58,7 @@ static inline __wsum csum_partial_copy_f
+@@ -50,7 +58,7 @@ static inline __wsum csum_partial_copy_from_user(const void __user *src,
int *err_ptr)
{
might_sleep();
@@ -7402,7 +8070,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/checksum_32.h linux-3.1.4/arch/x86/i
len, sum, err_ptr, NULL);
}
-@@ -178,7 +186,7 @@ static inline __wsum csum_and_copy_to_us
+@@ -178,7 +186,7 @@ static inline __wsum csum_and_copy_to_user(const void *src,
{
might_sleep();
if (access_ok(VERIFY_WRITE, dst, len))
@@ -7411,10 +8079,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/checksum_32.h linux-3.1.4/arch/x86/i
len, sum, NULL, err_ptr);
if (len)
-diff -urNp linux-3.1.4/arch/x86/include/asm/cpufeature.h linux-3.1.4/arch/x86/include/asm/cpufeature.h
---- linux-3.1.4/arch/x86/include/asm/cpufeature.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/cpufeature.h 2011-11-16 18:39:07.000000000 -0500
-@@ -358,7 +358,7 @@ static __always_inline __pure bool __sta
+diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
+index 88b23a4..d2e5f9f 100644
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -358,7 +358,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
".section .discard,\"aw\",@progbits\n"
" .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
".previous\n"
@@ -7423,25 +8092,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/cpufeature.h linux-3.1.4/arch/x86/in
"3: movb $1,%0\n"
"4:\n"
".previous\n"
-diff -urNp linux-3.1.4/arch/x86/include/asm/desc_defs.h linux-3.1.4/arch/x86/include/asm/desc_defs.h
---- linux-3.1.4/arch/x86/include/asm/desc_defs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/desc_defs.h 2011-11-16 18:39:07.000000000 -0500
-@@ -31,6 +31,12 @@ struct desc_struct {
- unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
- unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
- };
-+ struct {
-+ u16 offset_low;
-+ u16 seg;
-+ unsigned reserved: 8, type: 4, s: 1, dpl: 2, p: 1;
-+ unsigned offset_high: 16;
-+ } gate;
- };
- } __attribute__((packed));
-
-diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/asm/desc.h
---- linux-3.1.4/arch/x86/include/asm/desc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/desc.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
+index 41935fa..3b40db8 100644
+--- a/arch/x86/include/asm/desc.h
++++ b/arch/x86/include/asm/desc.h
@@ -4,6 +4,7 @@
#include <asm/desc_defs.h>
#include <asm/ldt.h>
@@ -7450,7 +8104,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
#include <linux/smp.h>
-@@ -16,6 +17,7 @@ static inline void fill_ldt(struct desc_
+@@ -16,6 +17,7 @@ static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *in
desc->type = (info->read_exec_only ^ 1) << 1;
desc->type |= info->contents << 2;
@@ -7458,7 +8112,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
desc->s = 1;
desc->dpl = 0x3;
-@@ -34,17 +36,12 @@ static inline void fill_ldt(struct desc_
+@@ -34,17 +36,12 @@ static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *in
}
extern struct desc_ptr idt_descr;
@@ -7479,7 +8133,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
#ifdef CONFIG_X86_64
-@@ -69,8 +66,14 @@ static inline void pack_gate(gate_desc *
+@@ -69,8 +66,14 @@ static inline void pack_gate(gate_desc *gate, unsigned char type,
unsigned long base, unsigned dpl, unsigned flags,
unsigned short seg)
{
@@ -7496,7 +8150,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
#endif
-@@ -115,12 +118,16 @@ static inline void paravirt_free_ldt(str
+@@ -115,12 +118,16 @@ static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
static inline void native_write_idt_entry(gate_desc *idt, int entry, const gate_desc *gate)
{
@@ -7513,7 +8167,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
static inline void
-@@ -134,7 +141,9 @@ native_write_gdt_entry(struct desc_struc
+@@ -134,7 +141,9 @@ native_write_gdt_entry(struct desc_struct *gdt, int entry, const void *desc, int
default: size = sizeof(*gdt); break;
}
@@ -7523,7 +8177,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
-@@ -207,7 +216,9 @@ static inline void native_set_ldt(const
+@@ -207,7 +216,9 @@ static inline void native_set_ldt(const void *addr, unsigned int entries)
static inline void native_load_tr_desc(void)
{
@@ -7533,7 +8187,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
static inline void native_load_gdt(const struct desc_ptr *dtr)
-@@ -244,8 +255,10 @@ static inline void native_load_tls(struc
+@@ -244,8 +255,10 @@ static inline void native_load_tls(struct thread_struct *t, unsigned int cpu)
struct desc_struct *gdt = get_cpu_gdt_table(cpu);
unsigned int i;
@@ -7544,7 +8198,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
}
#define _LDT_empty(info) \
-@@ -307,7 +320,7 @@ static inline void set_desc_limit(struct
+@@ -307,7 +320,7 @@ static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit)
desc->limit = (limit >> 16) & 0xf;
}
@@ -7553,7 +8207,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
unsigned dpl, unsigned ist, unsigned seg)
{
gate_desc s;
-@@ -326,7 +339,7 @@ static inline void _set_gate(int gate, u
+@@ -326,7 +339,7 @@ static inline void _set_gate(int gate, unsigned type, void *addr,
* Pentium F0 0F bugfix can have resulted in the mapped
* IDT being write-protected.
*/
@@ -7562,7 +8216,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
{
BUG_ON((unsigned)n > 0xFF);
_set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS);
-@@ -356,19 +369,19 @@ static inline void alloc_intr_gate(unsig
+@@ -356,19 +369,19 @@ static inline void alloc_intr_gate(unsigned int n, void *addr)
/*
* This routine sets up an interrupt gate at directory privilege level 3.
*/
@@ -7585,7 +8239,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
{
BUG_ON((unsigned)n > 0xFF);
_set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS);
-@@ -377,19 +390,31 @@ static inline void set_trap_gate(unsigne
+@@ -377,19 +390,31 @@ static inline void set_trap_gate(unsigned int n, void *addr)
static inline void set_task_gate(unsigned int n, unsigned int gdt_entry)
{
BUG_ON((unsigned)n > 0xFF);
@@ -7620,9 +8274,27 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/desc.h linux-3.1.4/arch/x86/include/
+#endif
+
#endif /* _ASM_X86_DESC_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/e820.h linux-3.1.4/arch/x86/include/asm/e820.h
---- linux-3.1.4/arch/x86/include/asm/e820.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/e820.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/asm/desc_defs.h
+index 278441f..b95a174 100644
+--- a/arch/x86/include/asm/desc_defs.h
++++ b/arch/x86/include/asm/desc_defs.h
+@@ -31,6 +31,12 @@ struct desc_struct {
+ unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
+ unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
+ };
++ struct {
++ u16 offset_low;
++ u16 seg;
++ unsigned reserved: 8, type: 4, s: 1, dpl: 2, p: 1;
++ unsigned offset_high: 16;
++ } gate;
+ };
+ } __attribute__((packed));
+
+diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
+index 908b969..a1f4eb4 100644
+--- a/arch/x86/include/asm/e820.h
++++ b/arch/x86/include/asm/e820.h
@@ -69,7 +69,7 @@ struct e820map {
#define ISA_START_ADDRESS 0xa0000
#define ISA_END_ADDRESS 0x100000
@@ -7632,9 +8304,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/e820.h linux-3.1.4/arch/x86/include/
#define BIOS_END 0x00100000
#define BIOS_ROM_BASE 0xffe00000
-diff -urNp linux-3.1.4/arch/x86/include/asm/elf.h linux-3.1.4/arch/x86/include/asm/elf.h
---- linux-3.1.4/arch/x86/include/asm/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/elf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
+index f2ad216..eb24c96 100644
+--- a/arch/x86/include/asm/elf.h
++++ b/arch/x86/include/asm/elf.h
@@ -237,7 +237,25 @@ extern int force_personality32;
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
@@ -7681,7 +8354,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/elf.h linux-3.1.4/arch/x86/include/a
#define VDSO_ENTRY \
((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall))
-@@ -317,7 +333,4 @@ extern int arch_setup_additional_pages(s
+@@ -317,7 +333,4 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
#define compat_arch_setup_additional_pages syscall32_setup_pages
@@ -7689,9 +8362,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/elf.h linux-3.1.4/arch/x86/include/a
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_X86_ELF_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/emergency-restart.h linux-3.1.4/arch/x86/include/asm/emergency-restart.h
---- linux-3.1.4/arch/x86/include/asm/emergency-restart.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/emergency-restart.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/emergency-restart.h b/arch/x86/include/asm/emergency-restart.h
+index cc70c1c..d96d011 100644
+--- a/arch/x86/include/asm/emergency-restart.h
++++ b/arch/x86/include/asm/emergency-restart.h
@@ -15,6 +15,6 @@ enum reboot_type {
extern enum reboot_type reboot_type;
@@ -7700,9 +8374,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/emergency-restart.h linux-3.1.4/arch
+extern void machine_emergency_restart(void) __noreturn;
#endif /* _ASM_X86_EMERGENCY_RESTART_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/futex.h linux-3.1.4/arch/x86/include/asm/futex.h
---- linux-3.1.4/arch/x86/include/asm/futex.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/futex.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/futex.h b/arch/x86/include/asm/futex.h
+index d09bb03..4ea4194 100644
+--- a/arch/x86/include/asm/futex.h
++++ b/arch/x86/include/asm/futex.h
@@ -12,16 +12,18 @@
#include <asm/system.h>
@@ -7732,7 +8407,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/futex.h linux-3.1.4/arch/x86/include
: "r" (oparg), "i" (-EFAULT), "1" (0))
static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr)
-@@ -61,10 +63,10 @@ static inline int futex_atomic_op_inuser
+@@ -61,10 +63,10 @@ static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr)
switch (op) {
case FUTEX_OP_SET:
@@ -7745,7 +8420,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/futex.h linux-3.1.4/arch/x86/include
uaddr, oparg);
break;
case FUTEX_OP_OR:
-@@ -123,13 +125,13 @@ static inline int futex_atomic_cmpxchg_i
+@@ -123,13 +125,13 @@ static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
return -EFAULT;
@@ -7761,9 +8436,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/futex.h linux-3.1.4/arch/x86/include
: "i" (-EFAULT), "r" (newval), "1" (oldval)
: "memory"
);
-diff -urNp linux-3.1.4/arch/x86/include/asm/hw_irq.h linux-3.1.4/arch/x86/include/asm/hw_irq.h
---- linux-3.1.4/arch/x86/include/asm/hw_irq.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/hw_irq.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
+index 0919905..2cf38d6 100644
+--- a/arch/x86/include/asm/hw_irq.h
++++ b/arch/x86/include/asm/hw_irq.h
@@ -136,8 +136,8 @@ extern void setup_ioapic_dest(void);
extern void enable_IO_APIC(void);
@@ -7775,10 +8451,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/hw_irq.h linux-3.1.4/arch/x86/includ
/* EISA */
extern void eisa_set_level_irq(unsigned int irq);
-diff -urNp linux-3.1.4/arch/x86/include/asm/i387.h linux-3.1.4/arch/x86/include/asm/i387.h
---- linux-3.1.4/arch/x86/include/asm/i387.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/i387.h 2011-11-16 18:39:07.000000000 -0500
-@@ -92,6 +92,11 @@ static inline int fxrstor_checking(struc
+diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
+index c9e09ea..73888df 100644
+--- a/arch/x86/include/asm/i387.h
++++ b/arch/x86/include/asm/i387.h
+@@ -92,6 +92,11 @@ static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
{
int err;
@@ -7790,7 +8467,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/i387.h linux-3.1.4/arch/x86/include/
/* See comment in fxsave() below. */
#ifdef CONFIG_AS_FXSAVEQ
asm volatile("1: fxrstorq %[fx]\n\t"
-@@ -121,6 +126,11 @@ static inline int fxsave_user(struct i38
+@@ -121,6 +126,11 @@ static inline int fxsave_user(struct i387_fxsave_struct __user *fx)
{
int err;
@@ -7802,7 +8479,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/i387.h linux-3.1.4/arch/x86/include/
/*
* Clear the bytes not touched by the fxsave and reserved
* for the SW usage.
-@@ -213,13 +223,8 @@ static inline void fpu_fxsave(struct fpu
+@@ -213,13 +223,8 @@ static inline void fpu_fxsave(struct fpu *fpu)
#endif /* CONFIG_X86_64 */
/* We need a safe address that is cheap to find and that is already
@@ -7818,7 +8495,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/i387.h linux-3.1.4/arch/x86/include/
/*
* These must be called with preempt disabled
-@@ -312,7 +317,7 @@ static inline void kernel_fpu_begin(void
+@@ -312,7 +317,7 @@ static inline void kernel_fpu_begin(void)
struct thread_info *me = current_thread_info();
preempt_disable();
if (me->status & TS_USEDFPU)
@@ -7827,9 +8504,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/i387.h linux-3.1.4/arch/x86/include/
else
clts();
}
-diff -urNp linux-3.1.4/arch/x86/include/asm/io.h linux-3.1.4/arch/x86/include/asm/io.h
---- linux-3.1.4/arch/x86/include/asm/io.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/io.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
+index d8e8eef..99f81ae 100644
+--- a/arch/x86/include/asm/io.h
++++ b/arch/x86/include/asm/io.h
@@ -194,6 +194,17 @@ extern void set_iounmap_nonlazy(void);
#include <linux/vmalloc.h>
@@ -7848,10 +8526,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/io.h linux-3.1.4/arch/x86/include/as
/*
* Convert a virtual cached pointer to an uncached pointer
*/
-diff -urNp linux-3.1.4/arch/x86/include/asm/irqflags.h linux-3.1.4/arch/x86/include/asm/irqflags.h
---- linux-3.1.4/arch/x86/include/asm/irqflags.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/irqflags.h 2011-11-16 18:39:07.000000000 -0500
-@@ -141,6 +141,11 @@ static inline notrace unsigned long arch
+diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
+index bba3cf8..06bc8da 100644
+--- a/arch/x86/include/asm/irqflags.h
++++ b/arch/x86/include/asm/irqflags.h
+@@ -141,6 +141,11 @@ static inline notrace unsigned long arch_local_irq_save(void)
sti; \
sysexit
@@ -7863,9 +8542,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/irqflags.h linux-3.1.4/arch/x86/incl
#else
#define INTERRUPT_RETURN iret
#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
-diff -urNp linux-3.1.4/arch/x86/include/asm/kprobes.h linux-3.1.4/arch/x86/include/asm/kprobes.h
---- linux-3.1.4/arch/x86/include/asm/kprobes.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/kprobes.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
+index 5478825..839e88c 100644
+--- a/arch/x86/include/asm/kprobes.h
++++ b/arch/x86/include/asm/kprobes.h
@@ -37,13 +37,8 @@ typedef u8 kprobe_opcode_t;
#define RELATIVEJUMP_SIZE 5
#define RELATIVECALL_OPCODE 0xe8
@@ -7882,9 +8562,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/kprobes.h linux-3.1.4/arch/x86/inclu
#define flush_insn_slot(p) do { } while (0)
-diff -urNp linux-3.1.4/arch/x86/include/asm/kvm_host.h linux-3.1.4/arch/x86/include/asm/kvm_host.h
---- linux-3.1.4/arch/x86/include/asm/kvm_host.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/kvm_host.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
+index dd51c83..66cbfac 100644
+--- a/arch/x86/include/asm/kvm_host.h
++++ b/arch/x86/include/asm/kvm_host.h
@@ -456,7 +456,7 @@ struct kvm_arch {
unsigned int n_requested_mmu_pages;
unsigned int n_max_mmu_pages;
@@ -7903,9 +8584,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/kvm_host.h linux-3.1.4/arch/x86/incl
struct kvm_arch_async_pf {
u32 token;
-diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include/asm/local.h
---- linux-3.1.4/arch/x86/include/asm/local.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/local.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
+index 9cdae5d..300d20f 100644
+--- a/arch/x86/include/asm/local.h
++++ b/arch/x86/include/asm/local.h
@@ -18,26 +18,58 @@ typedef struct {
static inline void local_inc(local_t *l)
@@ -7969,7 +8651,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+m" (l->a.counter)
: "ir" (i));
}
-@@ -55,7 +87,16 @@ static inline int local_sub_and_test(lon
+@@ -55,7 +87,16 @@ static inline int local_sub_and_test(long i, local_t *l)
{
unsigned char c;
@@ -7987,7 +8669,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+m" (l->a.counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -73,7 +114,16 @@ static inline int local_dec_and_test(loc
+@@ -73,7 +114,16 @@ static inline int local_dec_and_test(local_t *l)
{
unsigned char c;
@@ -8005,7 +8687,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -91,7 +141,16 @@ static inline int local_inc_and_test(loc
+@@ -91,7 +141,16 @@ static inline int local_inc_and_test(local_t *l)
{
unsigned char c;
@@ -8023,7 +8705,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+m" (l->a.counter), "=qm" (c)
: : "memory");
return c != 0;
-@@ -110,7 +169,16 @@ static inline int local_add_negative(lon
+@@ -110,7 +169,16 @@ static inline int local_add_negative(long i, local_t *l)
{
unsigned char c;
@@ -8041,7 +8723,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+m" (l->a.counter), "=qm" (c)
: "ir" (i) : "memory");
return c;
-@@ -133,7 +201,15 @@ static inline long local_add_return(long
+@@ -133,7 +201,15 @@ static inline long local_add_return(long i, local_t *l)
#endif
/* Modern 486+ processor */
__i = i;
@@ -8058,9 +8740,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/local.h linux-3.1.4/arch/x86/include
: "+r" (i), "+m" (l->a.counter)
: : "memory");
return i + __i;
-diff -urNp linux-3.1.4/arch/x86/include/asm/mman.h linux-3.1.4/arch/x86/include/asm/mman.h
---- linux-3.1.4/arch/x86/include/asm/mman.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/mman.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/mman.h b/arch/x86/include/asm/mman.h
+index 593e51d..fa69c9a 100644
+--- a/arch/x86/include/asm/mman.h
++++ b/arch/x86/include/asm/mman.h
@@ -5,4 +5,14 @@
#include <asm-generic/mman.h>
@@ -8076,10 +8759,45 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/mman.h linux-3.1.4/arch/x86/include/
+#endif
+
#endif /* _ASM_X86_MMAN_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/mmu_context.h linux-3.1.4/arch/x86/include/asm/mmu_context.h
---- linux-3.1.4/arch/x86/include/asm/mmu_context.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/mmu_context.h 2011-11-16 18:39:07.000000000 -0500
-@@ -24,6 +24,18 @@ void destroy_context(struct mm_struct *m
+diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
+index 5f55e69..e20bfb1 100644
+--- a/arch/x86/include/asm/mmu.h
++++ b/arch/x86/include/asm/mmu.h
+@@ -9,7 +9,7 @@
+ * we put the segment information here.
+ */
+ typedef struct {
+- void *ldt;
++ struct desc_struct *ldt;
+ int size;
+
+ #ifdef CONFIG_X86_64
+@@ -18,7 +18,19 @@ typedef struct {
+ #endif
+
+ struct mutex lock;
+- void *vdso;
++ unsigned long vdso;
++
++#ifdef CONFIG_X86_32
++#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
++ unsigned long user_cs_base;
++ unsigned long user_cs_limit;
++
++#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
++ cpumask_t cpu_user_cs_mask;
++#endif
++
++#endif
++#endif
+ } mm_context_t;
+
+ #ifdef CONFIG_SMP
+diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
+index 6902152..399f3a2 100644
+--- a/arch/x86/include/asm/mmu_context.h
++++ b/arch/x86/include/asm/mmu_context.h
+@@ -24,6 +24,18 @@ void destroy_context(struct mm_struct *mm);
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
@@ -8098,7 +8816,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/mmu_context.h linux-3.1.4/arch/x86/i
#ifdef CONFIG_SMP
if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
percpu_write(cpu_tlbstate.state, TLBSTATE_LAZY);
-@@ -34,16 +46,30 @@ static inline void switch_mm(struct mm_s
+@@ -34,16 +46,30 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
unsigned cpu = smp_processor_id();
@@ -8129,7 +8847,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/mmu_context.h linux-3.1.4/arch/x86/i
/* stop flush ipis for the previous mm */
cpumask_clear_cpu(cpu, mm_cpumask(prev));
-@@ -53,9 +79,38 @@ static inline void switch_mm(struct mm_s
+@@ -53,9 +79,38 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
*/
if (unlikely(prev->context.ldt != next->context.ldt))
load_LDT_nolock(&next->context);
@@ -8169,7 +8887,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/mmu_context.h linux-3.1.4/arch/x86/i
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next);
-@@ -64,11 +119,28 @@ static inline void switch_mm(struct mm_s
+@@ -64,11 +119,28 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
* tlb flush IPI delivery. We must reload CR3
* to make sure to use no freed page tables.
*/
@@ -8199,42 +8917,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/mmu_context.h linux-3.1.4/arch/x86/i
}
#define activate_mm(prev, next) \
-diff -urNp linux-3.1.4/arch/x86/include/asm/mmu.h linux-3.1.4/arch/x86/include/asm/mmu.h
---- linux-3.1.4/arch/x86/include/asm/mmu.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/mmu.h 2011-11-16 18:39:07.000000000 -0500
-@@ -9,7 +9,7 @@
- * we put the segment information here.
- */
- typedef struct {
-- void *ldt;
-+ struct desc_struct *ldt;
- int size;
-
- #ifdef CONFIG_X86_64
-@@ -18,7 +18,19 @@ typedef struct {
- #endif
-
- struct mutex lock;
-- void *vdso;
-+ unsigned long vdso;
-+
-+#ifdef CONFIG_X86_32
-+#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
-+ unsigned long user_cs_base;
-+ unsigned long user_cs_limit;
-+
-+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
-+ cpumask_t cpu_user_cs_mask;
-+#endif
-+
-+#endif
-+#endif
- } mm_context_t;
-
- #ifdef CONFIG_SMP
-diff -urNp linux-3.1.4/arch/x86/include/asm/module.h linux-3.1.4/arch/x86/include/asm/module.h
---- linux-3.1.4/arch/x86/include/asm/module.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/module.h 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h
+index 9eae775..c914fea 100644
+--- a/arch/x86/include/asm/module.h
++++ b/arch/x86/include/asm/module.h
@@ -5,6 +5,7 @@
#ifdef CONFIG_X86_64
@@ -8266,9 +8952,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/module.h linux-3.1.4/arch/x86/includ
+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF
+
#endif /* _ASM_X86_MODULE_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/page_64_types.h linux-3.1.4/arch/x86/include/asm/page_64_types.h
---- linux-3.1.4/arch/x86/include/asm/page_64_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/page_64_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
+index 7639dbf..e08a58c 100644
+--- a/arch/x86/include/asm/page_64_types.h
++++ b/arch/x86/include/asm/page_64_types.h
@@ -56,7 +56,7 @@ void copy_page(void *to, void *from);
/* duplicated to the one in bootmem.h */
@@ -8278,10 +8965,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/page_64_types.h linux-3.1.4/arch/x86
extern unsigned long __phys_addr(unsigned long);
#define __phys_reloc_hide(x) (x)
-diff -urNp linux-3.1.4/arch/x86/include/asm/paravirt.h linux-3.1.4/arch/x86/include/asm/paravirt.h
---- linux-3.1.4/arch/x86/include/asm/paravirt.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/paravirt.h 2011-11-16 18:39:07.000000000 -0500
-@@ -667,6 +667,18 @@ static inline void set_pgd(pgd_t *pgdp,
+diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
+index a7d2db9..edb023e 100644
+--- a/arch/x86/include/asm/paravirt.h
++++ b/arch/x86/include/asm/paravirt.h
+@@ -667,6 +667,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
val);
}
@@ -8300,7 +8988,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/paravirt.h linux-3.1.4/arch/x86/incl
static inline void pgd_clear(pgd_t *pgdp)
{
set_pgd(pgdp, __pgd(0));
-@@ -748,6 +760,21 @@ static inline void __set_fixmap(unsigned
+@@ -748,6 +760,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
pv_mmu_ops.set_fixmap(idx, phys, flags);
}
@@ -8353,9 +9041,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/paravirt.h linux-3.1.4/arch/x86/incl
#endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */
-diff -urNp linux-3.1.4/arch/x86/include/asm/paravirt_types.h linux-3.1.4/arch/x86/include/asm/paravirt_types.h
---- linux-3.1.4/arch/x86/include/asm/paravirt_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/paravirt_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
+index 8e8b9a4..f07d725 100644
+--- a/arch/x86/include/asm/paravirt_types.h
++++ b/arch/x86/include/asm/paravirt_types.h
@@ -84,20 +84,20 @@ struct pv_init_ops {
*/
unsigned (*patch)(u8 type, u16 clobber, void *insnbuf,
@@ -8428,10 +9117,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/paravirt_types.h linux-3.1.4/arch/x8
/* This contains all the paravirt structures: we get a convenient
* number for each function using the offset which we use to indicate
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgalloc.h linux-3.1.4/arch/x86/include/asm/pgalloc.h
---- linux-3.1.4/arch/x86/include/asm/pgalloc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgalloc.h 2011-11-16 18:39:07.000000000 -0500
-@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(s
+diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
+index b4389a4..b7ff22c 100644
+--- a/arch/x86/include/asm/pgalloc.h
++++ b/arch/x86/include/asm/pgalloc.h
+@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(struct mm_struct *mm,
pmd_t *pmd, pte_t *pte)
{
paravirt_alloc_pte(mm, __pa(pte) >> PAGE_SHIFT);
@@ -8445,10 +9135,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgalloc.h linux-3.1.4/arch/x86/inclu
set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
}
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable-2level.h linux-3.1.4/arch/x86/include/asm/pgtable-2level.h
---- linux-3.1.4/arch/x86/include/asm/pgtable-2level.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable-2level.h 2011-11-16 18:39:07.000000000 -0500
-@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t
+diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h
+index 98391db..8f6984e 100644
+--- a/arch/x86/include/asm/pgtable-2level.h
++++ b/arch/x86/include/asm/pgtable-2level.h
+@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte)
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
@@ -8458,88 +9149,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable-2level.h linux-3.1.4/arch/x8
}
static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_32.h linux-3.1.4/arch/x86/include/asm/pgtable_32.h
---- linux-3.1.4/arch/x86/include/asm/pgtable_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable_32.h 2011-11-16 18:39:07.000000000 -0500
-@@ -25,9 +25,6 @@
- struct mm_struct;
- struct vm_area_struct;
-
--extern pgd_t swapper_pg_dir[1024];
--extern pgd_t initial_page_table[1024];
--
- static inline void pgtable_cache_init(void) { }
- static inline void check_pgt_cache(void) { }
- void paging_init(void);
-@@ -48,6 +45,12 @@ extern void set_pmd_pfn(unsigned long, u
- # include <asm/pgtable-2level.h>
- #endif
-
-+extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-+extern pgd_t initial_page_table[PTRS_PER_PGD];
-+#ifdef CONFIG_X86_PAE
-+extern pmd_t swapper_pm_dir[PTRS_PER_PGD][PTRS_PER_PMD];
-+#endif
-+
- #if defined(CONFIG_HIGHPTE)
- #define pte_offset_map(dir, address) \
- ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \
-@@ -62,7 +65,9 @@ extern void set_pmd_pfn(unsigned long, u
- /* Clear a kernel PTE and flush it from the TLB */
- #define kpte_clear_flush(ptep, vaddr) \
- do { \
-+ pax_open_kernel(); \
- pte_clear(&init_mm, (vaddr), (ptep)); \
-+ pax_close_kernel(); \
- __flush_tlb_one((vaddr)); \
- } while (0)
-
-@@ -74,6 +79,9 @@ do { \
-
- #endif /* !__ASSEMBLY__ */
-
-+#define HAVE_ARCH_UNMAPPED_AREA
-+#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
-+
- /*
- * kern_addr_valid() is (1) for FLATMEM and (0) for
- * SPARSEMEM and DISCONTIGMEM
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_32_types.h linux-3.1.4/arch/x86/include/asm/pgtable_32_types.h
---- linux-3.1.4/arch/x86/include/asm/pgtable_32_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable_32_types.h 2011-11-16 18:39:07.000000000 -0500
-@@ -8,7 +8,7 @@
- */
- #ifdef CONFIG_X86_PAE
- # include <asm/pgtable-3level_types.h>
--# define PMD_SIZE (1UL << PMD_SHIFT)
-+# define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
- # define PMD_MASK (~(PMD_SIZE - 1))
- #else
- # include <asm/pgtable-2level_types.h>
-@@ -46,6 +46,19 @@ extern bool __vmalloc_start_set; /* set
- # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
- #endif
-
-+#ifdef CONFIG_PAX_KERNEXEC
-+#ifndef __ASSEMBLY__
-+extern unsigned char MODULES_EXEC_VADDR[];
-+extern unsigned char MODULES_EXEC_END[];
-+#endif
-+#include <asm/boot.h>
-+#define ktla_ktva(addr) (addr + LOAD_PHYSICAL_ADDR + PAGE_OFFSET)
-+#define ktva_ktla(addr) (addr - LOAD_PHYSICAL_ADDR - PAGE_OFFSET)
-+#else
-+#define ktla_ktva(addr) (addr)
-+#define ktva_ktla(addr) (addr)
-+#endif
-+
- #define MODULES_VADDR VMALLOC_START
- #define MODULES_END VMALLOC_END
- #define MODULES_LEN (MODULES_VADDR - MODULES_END)
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable-3level.h linux-3.1.4/arch/x86/include/asm/pgtable-3level.h
---- linux-3.1.4/arch/x86/include/asm/pgtable-3level.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable-3level.h 2011-11-16 18:39:07.000000000 -0500
-@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic
+diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
+index effff47..f9e4035 100644
+--- a/arch/x86/include/asm/pgtable-3level.h
++++ b/arch/x86/include/asm/pgtable-3level.h
+@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
@@ -8556,67 +9170,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable-3level.h linux-3.1.4/arch/x8
}
/*
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_64.h linux-3.1.4/arch/x86/include/asm/pgtable_64.h
---- linux-3.1.4/arch/x86/include/asm/pgtable_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable_64.h 2011-11-16 18:39:07.000000000 -0500
-@@ -16,10 +16,13 @@
-
- extern pud_t level3_kernel_pgt[512];
- extern pud_t level3_ident_pgt[512];
-+extern pud_t level3_vmalloc_pgt[512];
-+extern pud_t level3_vmemmap_pgt[512];
-+extern pud_t level2_vmemmap_pgt[512];
- extern pmd_t level2_kernel_pgt[512];
- extern pmd_t level2_fixmap_pgt[512];
--extern pmd_t level2_ident_pgt[512];
--extern pgd_t init_level4_pgt[];
-+extern pmd_t level2_ident_pgt[512*2];
-+extern pgd_t init_level4_pgt[512];
-
- #define swapper_pg_dir init_level4_pgt
-
-@@ -61,7 +64,9 @@ static inline void native_set_pte_atomic
-
- static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
- {
-+ pax_open_kernel();
- *pmdp = pmd;
-+ pax_close_kernel();
- }
-
- static inline void native_pmd_clear(pmd_t *pmd)
-@@ -107,6 +112,13 @@ static inline void native_pud_clear(pud_
-
- static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
- {
-+ pax_open_kernel();
-+ *pgdp = pgd;
-+ pax_close_kernel();
-+}
-+
-+static inline void native_set_pgd_batched(pgd_t *pgdp, pgd_t pgd)
-+{
- *pgdp = pgd;
- }
-
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_64_types.h linux-3.1.4/arch/x86/include/asm/pgtable_64_types.h
---- linux-3.1.4/arch/x86/include/asm/pgtable_64_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable_64_types.h 2011-11-16 18:39:07.000000000 -0500
-@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
- #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
- #define MODULES_END _AC(0xffffffffff000000, UL)
- #define MODULES_LEN (MODULES_END - MODULES_VADDR)
-+#define MODULES_EXEC_VADDR MODULES_VADDR
-+#define MODULES_EXEC_END MODULES_END
-+
-+#define ktla_ktva(addr) (addr)
-+#define ktva_ktla(addr) (addr)
-
- #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/include/asm/pgtable.h
---- linux-3.1.4/arch/x86/include/asm/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable.h 2011-11-16 18:39:07.000000000 -0500
-@@ -44,6 +44,7 @@ extern struct mm_struct *pgd_page_get_mm
+diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
+index 18601c8..3d716d1 100644
+--- a/arch/x86/include/asm/pgtable.h
++++ b/arch/x86/include/asm/pgtable.h
+@@ -44,6 +44,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
#ifndef __PAGETABLE_PUD_FOLDED
#define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd)
@@ -8624,7 +9182,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
#define pgd_clear(pgd) native_pgd_clear(pgd)
#endif
-@@ -81,12 +82,51 @@ extern struct mm_struct *pgd_page_get_mm
+@@ -81,12 +82,51 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
#define arch_end_context_switch(prev) do {} while(0)
@@ -8676,7 +9234,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
static inline int pte_dirty(pte_t pte)
{
return pte_flags(pte) & _PAGE_DIRTY;
-@@ -196,9 +236,29 @@ static inline pte_t pte_wrprotect(pte_t
+@@ -196,9 +236,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
return pte_clear_flags(pte, _PAGE_RW);
}
@@ -8707,7 +9265,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
}
static inline pte_t pte_mkdirty(pte_t pte)
-@@ -390,6 +450,15 @@ pte_t *populate_extra_pte(unsigned long
+@@ -390,6 +450,15 @@ pte_t *populate_extra_pte(unsigned long vaddr);
#endif
#ifndef __ASSEMBLY__
@@ -8723,7 +9281,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
#include <linux/mm_types.h>
static inline int pte_none(pte_t pte)
-@@ -560,7 +629,7 @@ static inline pud_t *pud_offset(pgd_t *p
+@@ -560,7 +629,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
static inline int pgd_bad(pgd_t pgd)
{
@@ -8767,7 +9325,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
#ifndef __ASSEMBLY__
extern int direct_gbpages;
-@@ -758,11 +846,23 @@ static inline void pmdp_set_wrprotect(st
+@@ -758,11 +846,23 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
* dst and src can be on the same page, but the range must not overlap,
* and must not cross a page boundary.
*/
@@ -8793,9 +9351,149 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable.h linux-3.1.4/arch/x86/inclu
#include <asm-generic/pgtable.h>
#endif /* __ASSEMBLY__ */
-diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_types.h linux-3.1.4/arch/x86/include/asm/pgtable_types.h
---- linux-3.1.4/arch/x86/include/asm/pgtable_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/pgtable_types.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
+index 0c92113..34a77c6 100644
+--- a/arch/x86/include/asm/pgtable_32.h
++++ b/arch/x86/include/asm/pgtable_32.h
+@@ -25,9 +25,6 @@
+ struct mm_struct;
+ struct vm_area_struct;
+
+-extern pgd_t swapper_pg_dir[1024];
+-extern pgd_t initial_page_table[1024];
+-
+ static inline void pgtable_cache_init(void) { }
+ static inline void check_pgt_cache(void) { }
+ void paging_init(void);
+@@ -48,6 +45,12 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
+ # include <asm/pgtable-2level.h>
+ #endif
+
++extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
++extern pgd_t initial_page_table[PTRS_PER_PGD];
++#ifdef CONFIG_X86_PAE
++extern pmd_t swapper_pm_dir[PTRS_PER_PGD][PTRS_PER_PMD];
++#endif
++
+ #if defined(CONFIG_HIGHPTE)
+ #define pte_offset_map(dir, address) \
+ ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \
+@@ -62,7 +65,9 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
+ /* Clear a kernel PTE and flush it from the TLB */
+ #define kpte_clear_flush(ptep, vaddr) \
+ do { \
++ pax_open_kernel(); \
+ pte_clear(&init_mm, (vaddr), (ptep)); \
++ pax_close_kernel(); \
+ __flush_tlb_one((vaddr)); \
+ } while (0)
+
+@@ -74,6 +79,9 @@ do { \
+
+ #endif /* !__ASSEMBLY__ */
+
++#define HAVE_ARCH_UNMAPPED_AREA
++#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
++
+ /*
+ * kern_addr_valid() is (1) for FLATMEM and (0) for
+ * SPARSEMEM and DISCONTIGMEM
+diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
+index ed5903b..c7fe163 100644
+--- a/arch/x86/include/asm/pgtable_32_types.h
++++ b/arch/x86/include/asm/pgtable_32_types.h
+@@ -8,7 +8,7 @@
+ */
+ #ifdef CONFIG_X86_PAE
+ # include <asm/pgtable-3level_types.h>
+-# define PMD_SIZE (1UL << PMD_SHIFT)
++# define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
+ # define PMD_MASK (~(PMD_SIZE - 1))
+ #else
+ # include <asm/pgtable-2level_types.h>
+@@ -46,6 +46,19 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
+ # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
+ #endif
+
++#ifdef CONFIG_PAX_KERNEXEC
++#ifndef __ASSEMBLY__
++extern unsigned char MODULES_EXEC_VADDR[];
++extern unsigned char MODULES_EXEC_END[];
++#endif
++#include <asm/boot.h>
++#define ktla_ktva(addr) (addr + LOAD_PHYSICAL_ADDR + PAGE_OFFSET)
++#define ktva_ktla(addr) (addr - LOAD_PHYSICAL_ADDR - PAGE_OFFSET)
++#else
++#define ktla_ktva(addr) (addr)
++#define ktva_ktla(addr) (addr)
++#endif
++
+ #define MODULES_VADDR VMALLOC_START
+ #define MODULES_END VMALLOC_END
+ #define MODULES_LEN (MODULES_VADDR - MODULES_END)
+diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
+index 975f709..3a89693 100644
+--- a/arch/x86/include/asm/pgtable_64.h
++++ b/arch/x86/include/asm/pgtable_64.h
+@@ -16,10 +16,13 @@
+
+ extern pud_t level3_kernel_pgt[512];
+ extern pud_t level3_ident_pgt[512];
++extern pud_t level3_vmalloc_pgt[512];
++extern pud_t level3_vmemmap_pgt[512];
++extern pud_t level2_vmemmap_pgt[512];
+ extern pmd_t level2_kernel_pgt[512];
+ extern pmd_t level2_fixmap_pgt[512];
+-extern pmd_t level2_ident_pgt[512];
+-extern pgd_t init_level4_pgt[];
++extern pmd_t level2_ident_pgt[512*2];
++extern pgd_t init_level4_pgt[512];
+
+ #define swapper_pg_dir init_level4_pgt
+
+@@ -61,7 +64,9 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
+
+ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
+ {
++ pax_open_kernel();
+ *pmdp = pmd;
++ pax_close_kernel();
+ }
+
+ static inline void native_pmd_clear(pmd_t *pmd)
+@@ -107,6 +112,13 @@ static inline void native_pud_clear(pud_t *pud)
+
+ static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
+ {
++ pax_open_kernel();
++ *pgdp = pgd;
++ pax_close_kernel();
++}
++
++static inline void native_set_pgd_batched(pgd_t *pgdp, pgd_t pgd)
++{
+ *pgdp = pgd;
+ }
+
+diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
+index 766ea16..5b96cb3 100644
+--- a/arch/x86/include/asm/pgtable_64_types.h
++++ b/arch/x86/include/asm/pgtable_64_types.h
+@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
+ #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
+ #define MODULES_END _AC(0xffffffffff000000, UL)
+ #define MODULES_LEN (MODULES_END - MODULES_VADDR)
++#define MODULES_EXEC_VADDR MODULES_VADDR
++#define MODULES_EXEC_END MODULES_END
++
++#define ktla_ktva(addr) (addr)
++#define ktva_ktla(addr) (addr)
+
+ #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
+diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
+index 013286a..8b42f4f 100644
+--- a/arch/x86/include/asm/pgtable_types.h
++++ b/arch/x86/include/asm/pgtable_types.h
@@ -16,13 +16,12 @@
#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
#define _PAGE_BIT_PAT 7 /* on 4KB pages */
@@ -8863,7 +9561,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_types.h linux-3.1.4/arch/x86
#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
#endif
-@@ -207,7 +210,17 @@ static inline pgdval_t pgd_flags(pgd_t p
+@@ -207,7 +210,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
{
return native_pgd_val(pgd) & PTE_FLAGS_MASK;
}
@@ -8881,7 +9579,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_types.h linux-3.1.4/arch/x86
#if PAGETABLE_LEVELS > 3
typedef struct { pudval_t pud; } pud_t;
-@@ -221,8 +234,6 @@ static inline pudval_t native_pud_val(pu
+@@ -221,8 +234,6 @@ static inline pudval_t native_pud_val(pud_t pud)
return pud.pud;
}
#else
@@ -8890,7 +9588,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_types.h linux-3.1.4/arch/x86
static inline pudval_t native_pud_val(pud_t pud)
{
return native_pgd_val(pud.pgd);
-@@ -242,8 +253,6 @@ static inline pmdval_t native_pmd_val(pm
+@@ -242,8 +253,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
return pmd.pmd;
}
#else
@@ -8907,9 +9605,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/pgtable_types.h linux-3.1.4/arch/x86
#define pgprot_writecombine pgprot_writecombine
extern pgprot_t pgprot_writecombine(pgprot_t prot);
-diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/include/asm/processor.h
---- linux-3.1.4/arch/x86/include/asm/processor.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/processor.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
+index 0d1171c..36571a9 100644
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
@@ -266,7 +266,7 @@ struct tss_struct {
} ____cacheline_aligned;
@@ -8919,7 +9618,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
/*
* Save the original ist values for checking stack pointers during debugging
-@@ -858,11 +858,18 @@ static inline void spin_lock_prefetch(co
+@@ -858,11 +858,18 @@ static inline void spin_lock_prefetch(const void *x)
*/
#define TASK_SIZE PAGE_OFFSET
#define TASK_SIZE_MAX TASK_SIZE
@@ -8940,7 +9639,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
.vm86_info = NULL, \
.sysenter_cs = __KERNEL_CS, \
.io_bitmap_ptr = NULL, \
-@@ -876,7 +883,7 @@ static inline void spin_lock_prefetch(co
+@@ -876,7 +883,7 @@ static inline void spin_lock_prefetch(const void *x)
*/
#define INIT_TSS { \
.x86_tss = { \
@@ -8949,7 +9648,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
.ss0 = __KERNEL_DS, \
.ss1 = __KERNEL_CS, \
.io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
-@@ -887,11 +894,7 @@ static inline void spin_lock_prefetch(co
+@@ -887,11 +894,7 @@ static inline void spin_lock_prefetch(const void *x)
extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
@@ -8962,7 +9661,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
/*
* The below -8 is to reserve 8 bytes on top of the ring0 stack.
-@@ -906,7 +909,7 @@ extern unsigned long thread_saved_pc(str
+@@ -906,7 +909,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define task_pt_regs(task) \
({ \
struct pt_regs *__regs__; \
@@ -8971,7 +9670,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
__regs__ - 1; \
})
-@@ -916,13 +919,13 @@ extern unsigned long thread_saved_pc(str
+@@ -916,13 +919,13 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
/*
* User space process size. 47bits minus one guard page.
*/
@@ -8987,7 +9686,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
#define TASK_SIZE (test_thread_flag(TIF_IA32) ? \
IA32_PAGE_OFFSET : TASK_SIZE_MAX)
-@@ -933,11 +936,11 @@ extern unsigned long thread_saved_pc(str
+@@ -933,11 +936,11 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
#define STACK_TOP_MAX TASK_SIZE_MAX
#define INIT_THREAD { \
@@ -9001,7 +9700,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
}
/*
-@@ -959,6 +962,10 @@ extern void start_thread(struct pt_regs
+@@ -959,6 +962,10 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
*/
#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
@@ -9012,10 +9711,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/processor.h linux-3.1.4/arch/x86/inc
#define KSTK_EIP(task) (task_pt_regs(task)->ip)
/* Get/set a process' ability to use the timestamp counter instruction */
-diff -urNp linux-3.1.4/arch/x86/include/asm/ptrace.h linux-3.1.4/arch/x86/include/asm/ptrace.h
---- linux-3.1.4/arch/x86/include/asm/ptrace.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/ptrace.h 2011-11-16 18:39:07.000000000 -0500
-@@ -156,28 +156,29 @@ static inline unsigned long regs_return_
+diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
+index 3566454..4bdfb8c 100644
+--- a/arch/x86/include/asm/ptrace.h
++++ b/arch/x86/include/asm/ptrace.h
+@@ -156,28 +156,29 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
}
/*
@@ -9051,7 +9751,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/ptrace.h linux-3.1.4/arch/x86/includ
#endif
}
-@@ -193,15 +194,16 @@ static inline int v8086_mode(struct pt_r
+@@ -193,15 +194,16 @@ static inline int v8086_mode(struct pt_regs *regs)
#ifdef CONFIG_X86_64
static inline bool user_64bit_mode(struct pt_regs *regs)
{
@@ -9070,9 +9770,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/ptrace.h linux-3.1.4/arch/x86/includ
#endif
}
#endif
-diff -urNp linux-3.1.4/arch/x86/include/asm/reboot.h linux-3.1.4/arch/x86/include/asm/reboot.h
---- linux-3.1.4/arch/x86/include/asm/reboot.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/reboot.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
+index 3250e3d..20db631 100644
+--- a/arch/x86/include/asm/reboot.h
++++ b/arch/x86/include/asm/reboot.h
@@ -6,19 +6,19 @@
struct pt_regs;
@@ -9099,10 +9800,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/reboot.h linux-3.1.4/arch/x86/includ
/* These must match dispatch_table in reboot_32.S */
#define MRR_BIOS 0
#define MRR_APM 1
-diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include/asm/rwsem.h
---- linux-3.1.4/arch/x86/include/asm/rwsem.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/rwsem.h 2011-11-16 18:39:07.000000000 -0500
-@@ -64,6 +64,14 @@ static inline void __down_read(struct rw
+diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
+index df4cd32..27ae072 100644
+--- a/arch/x86/include/asm/rwsem.h
++++ b/arch/x86/include/asm/rwsem.h
+@@ -64,6 +64,14 @@ static inline void __down_read(struct rw_semaphore *sem)
{
asm volatile("# beginning down_read\n\t"
LOCK_PREFIX _ASM_INC "(%1)\n\t"
@@ -9117,7 +9819,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
/* adds 0x00000001 */
" jns 1f\n"
" call call_rwsem_down_read_failed\n"
-@@ -85,6 +93,14 @@ static inline int __down_read_trylock(st
+@@ -85,6 +93,14 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
"1:\n\t"
" mov %1,%2\n\t"
" add %3,%2\n\t"
@@ -9132,7 +9834,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
" jle 2f\n\t"
LOCK_PREFIX " cmpxchg %2,%0\n\t"
" jnz 1b\n\t"
-@@ -104,6 +120,14 @@ static inline void __down_write_nested(s
+@@ -104,6 +120,14 @@ static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
long tmp;
asm volatile("# beginning down_write\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -9147,7 +9849,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
/* adds 0xffff0001, returns the old value */
" test %1,%1\n\t"
/* was the count 0 before? */
-@@ -141,6 +165,14 @@ static inline void __up_read(struct rw_s
+@@ -141,6 +165,14 @@ static inline void __up_read(struct rw_semaphore *sem)
long tmp;
asm volatile("# beginning __up_read\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -9162,7 +9864,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
/* subtracts 1, returns the old value */
" jns 1f\n\t"
" call call_rwsem_wake\n" /* expects old value in %edx */
-@@ -159,6 +191,14 @@ static inline void __up_write(struct rw_
+@@ -159,6 +191,14 @@ static inline void __up_write(struct rw_semaphore *sem)
long tmp;
asm volatile("# beginning __up_write\n\t"
LOCK_PREFIX " xadd %1,(%2)\n\t"
@@ -9177,7 +9879,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
/* subtracts 0xffff0001, returns the old value */
" jns 1f\n\t"
" call call_rwsem_wake\n" /* expects old value in %edx */
-@@ -176,6 +216,14 @@ static inline void __downgrade_write(str
+@@ -176,6 +216,14 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
{
asm volatile("# beginning __downgrade_write\n\t"
LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
@@ -9192,7 +9894,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
/*
* transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
* 0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
-@@ -194,7 +242,15 @@ static inline void __downgrade_write(str
+@@ -194,7 +242,15 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
*/
static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
{
@@ -9209,7 +9911,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
: "+m" (sem->count)
: "er" (delta));
}
-@@ -206,7 +262,15 @@ static inline long rwsem_atomic_update(l
+@@ -206,7 +262,15 @@ static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
{
long tmp = delta;
@@ -9226,9 +9928,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/rwsem.h linux-3.1.4/arch/x86/include
: "+r" (tmp), "+m" (sem->count)
: : "memory");
-diff -urNp linux-3.1.4/arch/x86/include/asm/segment.h linux-3.1.4/arch/x86/include/asm/segment.h
---- linux-3.1.4/arch/x86/include/asm/segment.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/segment.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
+index 5e64171..f58957e 100644
+--- a/arch/x86/include/asm/segment.h
++++ b/arch/x86/include/asm/segment.h
@@ -64,10 +64,15 @@
* 26 - ESPFIX small SS
* 27 - per-cpu [ offset to per-cpu data area ]
@@ -9295,10 +9998,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/segment.h linux-3.1.4/arch/x86/inclu
#define __KERNEL_DS (GDT_ENTRY_KERNEL_DS*8)
#define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS*8+3)
#define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS*8+3)
-diff -urNp linux-3.1.4/arch/x86/include/asm/smp.h linux-3.1.4/arch/x86/include/asm/smp.h
---- linux-3.1.4/arch/x86/include/asm/smp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/smp.h 2011-11-16 18:39:07.000000000 -0500
-@@ -36,7 +36,7 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_
+diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
+index 73b11bc..d4a3b63 100644
+--- a/arch/x86/include/asm/smp.h
++++ b/arch/x86/include/asm/smp.h
+@@ -36,7 +36,7 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
/* cpus sharing the last level cache: */
DECLARE_PER_CPU(cpumask_var_t, cpu_llc_shared_map);
DECLARE_PER_CPU(u16, cpu_llc_id);
@@ -9316,7 +10020,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/smp.h linux-3.1.4/arch/x86/include/a
/* Globals due to paravirt */
extern void set_cpu_sibling_map(int cpu);
-@@ -192,14 +192,8 @@ extern unsigned disabled_cpus __cpuinitd
+@@ -192,14 +192,8 @@ extern unsigned disabled_cpus __cpuinitdata;
extern int safe_smp_processor_id(void);
#elif defined(CONFIG_X86_64_SMP)
@@ -9333,10 +10037,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/smp.h linux-3.1.4/arch/x86/include/a
#define safe_smp_processor_id() smp_processor_id()
#endif
-diff -urNp linux-3.1.4/arch/x86/include/asm/spinlock.h linux-3.1.4/arch/x86/include/asm/spinlock.h
---- linux-3.1.4/arch/x86/include/asm/spinlock.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/spinlock.h 2011-11-16 18:39:07.000000000 -0500
-@@ -248,6 +248,14 @@ static inline int arch_write_can_lock(ar
+diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
+index ee67edf..49c796b 100644
+--- a/arch/x86/include/asm/spinlock.h
++++ b/arch/x86/include/asm/spinlock.h
+@@ -248,6 +248,14 @@ static inline int arch_write_can_lock(arch_rwlock_t *lock)
static inline void arch_read_lock(arch_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX READ_LOCK_SIZE(dec) " (%0)\n\t"
@@ -9351,7 +10056,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/spinlock.h linux-3.1.4/arch/x86/incl
"jns 1f\n"
"call __read_lock_failed\n\t"
"1:\n"
-@@ -257,6 +265,14 @@ static inline void arch_read_lock(arch_r
+@@ -257,6 +265,14 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
static inline void arch_write_lock(arch_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX WRITE_LOCK_SUB(%1) "(%0)\n\t"
@@ -9366,7 +10071,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/spinlock.h linux-3.1.4/arch/x86/incl
"jz 1f\n"
"call __write_lock_failed\n\t"
"1:\n"
-@@ -286,13 +302,29 @@ static inline int arch_write_trylock(arc
+@@ -286,13 +302,29 @@ static inline int arch_write_trylock(arch_rwlock_t *lock)
static inline void arch_read_unlock(arch_rwlock_t *rw)
{
@@ -9398,9 +10103,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/spinlock.h linux-3.1.4/arch/x86/incl
: "+m" (rw->write) : "i" (RW_LOCK_BIAS) : "memory");
}
-diff -urNp linux-3.1.4/arch/x86/include/asm/stackprotector.h linux-3.1.4/arch/x86/include/asm/stackprotector.h
---- linux-3.1.4/arch/x86/include/asm/stackprotector.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/stackprotector.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
+index 1575177..cb23f52 100644
+--- a/arch/x86/include/asm/stackprotector.h
++++ b/arch/x86/include/asm/stackprotector.h
@@ -48,7 +48,7 @@
* head_32 for boot CPU and setup_per_cpu_areas() for others.
*/
@@ -9410,7 +10116,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/stackprotector.h linux-3.1.4/arch/x8
/*
* Initialize the stackprotector canary value.
-@@ -113,7 +113,7 @@ static inline void setup_stack_canary_se
+@@ -113,7 +113,7 @@ static inline void setup_stack_canary_segment(int cpu)
static inline void load_stack_canary_segment(void)
{
@@ -9419,9 +10125,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/stackprotector.h linux-3.1.4/arch/x8
asm volatile ("mov %0, %%gs" : : "r" (0));
#endif
}
-diff -urNp linux-3.1.4/arch/x86/include/asm/stacktrace.h linux-3.1.4/arch/x86/include/asm/stacktrace.h
---- linux-3.1.4/arch/x86/include/asm/stacktrace.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/stacktrace.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h
+index 70bbe39..4ae2bd4 100644
+--- a/arch/x86/include/asm/stacktrace.h
++++ b/arch/x86/include/asm/stacktrace.h
@@ -11,28 +11,20 @@
extern int kstack_depth_to_print;
@@ -9472,10 +10179,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/stacktrace.h linux-3.1.4/arch/x86/in
};
void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
-diff -urNp linux-3.1.4/arch/x86/include/asm/sys_ia32.h linux-3.1.4/arch/x86/include/asm/sys_ia32.h
---- linux-3.1.4/arch/x86/include/asm/sys_ia32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/sys_ia32.h 2011-11-16 18:39:07.000000000 -0500
-@@ -40,7 +40,7 @@ asmlinkage long sys32_rt_sigprocmask(int
+diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
+index cb23852..2dde194 100644
+--- a/arch/x86/include/asm/sys_ia32.h
++++ b/arch/x86/include/asm/sys_ia32.h
+@@ -40,7 +40,7 @@ asmlinkage long sys32_rt_sigprocmask(int, compat_sigset_t __user *,
compat_sigset_t __user *, unsigned int);
asmlinkage long sys32_alarm(unsigned int);
@@ -9484,9 +10192,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/sys_ia32.h linux-3.1.4/arch/x86/incl
asmlinkage long sys32_sysfs(int, u32, u32);
asmlinkage long sys32_sched_rr_get_interval(compat_pid_t,
-diff -urNp linux-3.1.4/arch/x86/include/asm/system.h linux-3.1.4/arch/x86/include/asm/system.h
---- linux-3.1.4/arch/x86/include/asm/system.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/system.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
+index c2ff2a1..4349184 100644
+--- a/arch/x86/include/asm/system.h
++++ b/arch/x86/include/asm/system.h
@@ -129,7 +129,7 @@ do { \
"call __switch_to\n\t" \
"movq "__percpu_arg([current_task])",%%rsi\n\t" \
@@ -9505,7 +10214,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/system.h linux-3.1.4/arch/x86/includ
[current_task] "m" (current_task) \
__switch_canary_iparam \
: "memory", "cc" __EXTRA_CLOBBER)
-@@ -200,7 +200,7 @@ static inline unsigned long get_limit(un
+@@ -200,7 +200,7 @@ static inline unsigned long get_limit(unsigned long segment)
{
unsigned long __limit;
asm("lsll %1,%0" : "=r" (__limit) : "r" (segment));
@@ -9529,9 +10238,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/system.h linux-3.1.4/arch/x86/includ
/*
* Force strict CPU ordering.
-diff -urNp linux-3.1.4/arch/x86/include/asm/thread_info.h linux-3.1.4/arch/x86/include/asm/thread_info.h
---- linux-3.1.4/arch/x86/include/asm/thread_info.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/thread_info.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
+index a1fe5c1..ee326d8 100644
+--- a/arch/x86/include/asm/thread_info.h
++++ b/arch/x86/include/asm/thread_info.h
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <asm/page.h>
@@ -9638,7 +10348,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/thread_info.h linux-3.1.4/arch/x86/i
/*
* macros/functions for gaining access to the thread information structure
* preempt_count needs to be 1 initially, until the scheduler is functional.
-@@ -216,21 +205,8 @@ static inline struct thread_info *curren
+@@ -216,21 +205,8 @@ static inline struct thread_info *current_thread_info(void)
#ifndef __ASSEMBLY__
DECLARE_PER_CPU(unsigned long, kernel_stack);
@@ -9679,10 +10389,234 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/thread_info.h linux-3.1.4/arch/x86/i
+
#endif
#endif /* _ASM_X86_THREAD_INFO_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/include/asm/uaccess_32.h
---- linux-3.1.4/arch/x86/include/asm/uaccess_32.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/uaccess_32.h 2011-11-16 18:40:08.000000000 -0500
-@@ -43,6 +43,11 @@ unsigned long __must_check __copy_from_u
+diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
+index 36361bf..324f262 100644
+--- a/arch/x86/include/asm/uaccess.h
++++ b/arch/x86/include/asm/uaccess.h
+@@ -7,12 +7,15 @@
+ #include <linux/compiler.h>
+ #include <linux/thread_info.h>
+ #include <linux/string.h>
++#include <linux/sched.h>
+ #include <asm/asm.h>
+ #include <asm/page.h>
+
+ #define VERIFY_READ 0
+ #define VERIFY_WRITE 1
+
++extern void check_object_size(const void *ptr, unsigned long n, bool to);
++
+ /*
+ * The fs value determines whether argument validity checking should be
+ * performed or not. If get_fs() == USER_DS, checking is performed, with
+@@ -28,7 +31,12 @@
+
+ #define get_ds() (KERNEL_DS)
+ #define get_fs() (current_thread_info()->addr_limit)
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
++void __set_fs(mm_segment_t x);
++void set_fs(mm_segment_t x);
++#else
+ #define set_fs(x) (current_thread_info()->addr_limit = (x))
++#endif
+
+ #define segment_eq(a, b) ((a).seg == (b).seg)
+
+@@ -76,7 +84,33 @@
+ * checks that the pointer is in the user space range - after calling
+ * this function, memory access functions may still return -EFAULT.
+ */
+-#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
++#define __access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
++#define access_ok(type, addr, size) \
++({ \
++ long __size = size; \
++ unsigned long __addr = (unsigned long)addr; \
++ unsigned long __addr_ao = __addr & PAGE_MASK; \
++ unsigned long __end_ao = __addr + __size - 1; \
++ bool __ret_ao = __range_not_ok(__addr, __size) == 0; \
++ if (__ret_ao && unlikely((__end_ao ^ __addr_ao) & PAGE_MASK)) { \
++ while(__addr_ao <= __end_ao) { \
++ char __c_ao; \
++ __addr_ao += PAGE_SIZE; \
++ if (__size > PAGE_SIZE) \
++ cond_resched(); \
++ if (__get_user(__c_ao, (char __user *)__addr)) \
++ break; \
++ if (type != VERIFY_WRITE) { \
++ __addr = __addr_ao; \
++ continue; \
++ } \
++ if (__put_user(__c_ao, (char __user *)__addr)) \
++ break; \
++ __addr = __addr_ao; \
++ } \
++ } \
++ __ret_ao; \
++})
+
+ /*
+ * The exception table consists of pairs of addresses: the first is the
+@@ -182,12 +216,20 @@ extern int __get_user_bad(void);
+ asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
+ : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
+
+-
++#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __copyuser_seg "gs;"
++#define __COPYUSER_SET_ES "pushl %%gs; popl %%es\n"
++#define __COPYUSER_RESTORE_ES "pushl %%ss; popl %%es\n"
++#else
++#define __copyuser_seg
++#define __COPYUSER_SET_ES
++#define __COPYUSER_RESTORE_ES
++#endif
+
+ #ifdef CONFIG_X86_32
+ #define __put_user_asm_u64(x, addr, err, errret) \
+- asm volatile("1: movl %%eax,0(%2)\n" \
+- "2: movl %%edx,4(%2)\n" \
++ asm volatile("1: "__copyuser_seg"movl %%eax,0(%2)\n" \
++ "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
+ "3:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "4: movl %3,%0\n" \
+@@ -199,8 +241,8 @@ extern int __get_user_bad(void);
+ : "A" (x), "r" (addr), "i" (errret), "0" (err))
+
+ #define __put_user_asm_ex_u64(x, addr) \
+- asm volatile("1: movl %%eax,0(%1)\n" \
+- "2: movl %%edx,4(%1)\n" \
++ asm volatile("1: "__copyuser_seg"movl %%eax,0(%1)\n" \
++ "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
+ "3:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ _ASM_EXTABLE(2b, 3b - 2b) \
+@@ -252,7 +294,7 @@ extern void __put_user_8(void);
+ __typeof__(*(ptr)) __pu_val; \
+ __chk_user_ptr(ptr); \
+ might_fault(); \
+- __pu_val = x; \
++ __pu_val = (x); \
+ switch (sizeof(*(ptr))) { \
+ case 1: \
+ __put_user_x(1, __pu_val, ptr, __ret_pu); \
+@@ -373,7 +415,7 @@ do { \
+ } while (0)
+
+ #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
+ "2:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov %3,%0\n" \
+@@ -381,7 +423,7 @@ do { \
+ " jmp 2b\n" \
+ ".previous\n" \
+ _ASM_EXTABLE(1b, 3b) \
+- : "=r" (err), ltype(x) \
++ : "=r" (err), ltype (x) \
+ : "m" (__m(addr)), "i" (errret), "0" (err))
+
+ #define __get_user_size_ex(x, ptr, size) \
+@@ -406,7 +448,7 @@ do { \
+ } while (0)
+
+ #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
+- asm volatile("1: mov"itype" %1,%"rtype"0\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %1,%"rtype"0\n"\
+ "2:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ : ltype(x) : "m" (__m(addr)))
+@@ -423,13 +465,24 @@ do { \
+ int __gu_err; \
+ unsigned long __gu_val; \
+ __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
+- (x) = (__force __typeof__(*(ptr)))__gu_val; \
++ (x) = (__typeof__(*(ptr)))__gu_val; \
+ __gu_err; \
+ })
+
+ /* FIXME: this hack is definitely wrong -AK */
+ struct __large_struct { unsigned long buf[100]; };
+-#define __m(x) (*(struct __large_struct __user *)(x))
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define ____m(x) \
++({ \
++ unsigned long ____x = (unsigned long)(x); \
++ if (____x < PAX_USER_SHADOW_BASE) \
++ ____x += PAX_USER_SHADOW_BASE; \
++ (void __user *)____x; \
++})
++#else
++#define ____m(x) (x)
++#endif
++#define __m(x) (*(struct __large_struct __user *)____m(x))
+
+ /*
+ * Tell gcc we read from memory instead of writing: this is because
+@@ -437,7 +490,7 @@ struct __large_struct { unsigned long buf[100]; };
+ * aliasing issues.
+ */
+ #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+- asm volatile("1: mov"itype" %"rtype"1,%2\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
+ "2:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov %3,%0\n" \
+@@ -445,10 +498,10 @@ struct __large_struct { unsigned long buf[100]; };
+ ".previous\n" \
+ _ASM_EXTABLE(1b, 3b) \
+ : "=r"(err) \
+- : ltype(x), "m" (__m(addr)), "i" (errret), "0" (err))
++ : ltype (x), "m" (__m(addr)), "i" (errret), "0" (err))
+
+ #define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
+- asm volatile("1: mov"itype" %"rtype"0,%1\n" \
++ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"0,%1\n"\
+ "2:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+ : : ltype(x), "m" (__m(addr)))
+@@ -487,8 +540,12 @@ struct __large_struct { unsigned long buf[100]; };
+ * On error, the variable @x is set to zero.
+ */
+
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __get_user(x, ptr) get_user((x), (ptr))
++#else
+ #define __get_user(x, ptr) \
+ __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
++#endif
+
+ /**
+ * __put_user: - Write a simple value into user space, with less checking.
+@@ -510,8 +567,12 @@ struct __large_struct { unsigned long buf[100]; };
+ * Returns zero on success, or -EFAULT on error.
+ */
+
++#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
++#define __put_user(x, ptr) put_user((x), (ptr))
++#else
+ #define __put_user(x, ptr) \
+ __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
++#endif
+
+ #define __get_user_unaligned __get_user
+ #define __put_user_unaligned __put_user
+@@ -529,7 +590,7 @@ struct __large_struct { unsigned long buf[100]; };
+ #define get_user_ex(x, ptr) do { \
+ unsigned long __gue_val; \
+ __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
+- (x) = (__force __typeof__(*(ptr)))__gue_val; \
++ (x) = (__typeof__(*(ptr)))__gue_val; \
+ } while (0)
+
+ #ifdef CONFIG_X86_WP_WORKS_OK
+diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
+index 566e803..89f1e60 100644
+--- a/arch/x86/include/asm/uaccess_32.h
++++ b/arch/x86/include/asm/uaccess_32.h
+@@ -43,6 +43,11 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero
static __always_inline unsigned long __must_check
__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
{
@@ -9694,7 +10628,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -61,6 +66,8 @@ __copy_to_user_inatomic(void __user *to,
+@@ -61,6 +66,8 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
return ret;
}
}
@@ -9703,7 +10637,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
return __copy_to_user_ll(to, from, n);
}
-@@ -82,12 +89,16 @@ static __always_inline unsigned long __m
+@@ -82,12 +89,16 @@ static __always_inline unsigned long __must_check
__copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_fault();
@@ -9733,7 +10667,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -152,6 +169,8 @@ __copy_from_user(void *to, const void __
+@@ -152,6 +169,8 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
return ret;
}
}
@@ -9742,7 +10676,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
return __copy_from_user_ll(to, from, n);
}
-@@ -159,6 +178,10 @@ static __always_inline unsigned long __c
+@@ -159,6 +178,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
const void __user *from, unsigned long n)
{
might_fault();
@@ -9780,7 +10714,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
extern void copy_from_user_overflow(void)
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
-@@ -199,17 +226,61 @@ extern void copy_from_user_overflow(void
+@@ -199,17 +226,61 @@ extern void copy_from_user_overflow(void)
#endif
;
@@ -9849,9 +10783,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_32.h linux-3.1.4/arch/x86/in
return n;
}
-diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/include/asm/uaccess_64.h
---- linux-3.1.4/arch/x86/include/asm/uaccess_64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/uaccess_64.h 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
+index 1c66d30..c299480 100644
+--- a/arch/x86/include/asm/uaccess_64.h
++++ b/arch/x86/include/asm/uaccess_64.h
@@ -10,6 +10,9 @@
#include <asm/alternative.h>
#include <asm/cpufeature.h>
@@ -9862,7 +10797,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
/*
* Copy To/From Userspace
-@@ -36,26 +39,26 @@ copy_user_generic(void *to, const void *
+@@ -36,26 +39,26 @@ copy_user_generic(void *to, const void *from, unsigned len)
return ret;
}
@@ -9902,7 +10837,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
return n;
}
-@@ -64,110 +67,198 @@ int copy_to_user(void __user *dst, const
+@@ -64,110 +67,198 @@ int copy_to_user(void __user *dst, const void *src, unsigned size)
{
might_fault();
@@ -10134,7 +11069,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
ret, "b", "b", "=q", 1);
if (likely(!ret))
__put_user_asm(tmp, (u8 __user *)dst,
-@@ -176,7 +267,7 @@ int __copy_in_user(void __user *dst, con
+@@ -176,7 +267,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
}
case 2: {
u16 tmp;
@@ -10143,7 +11078,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
ret, "w", "w", "=r", 2);
if (likely(!ret))
__put_user_asm(tmp, (u16 __user *)dst,
-@@ -186,7 +277,7 @@ int __copy_in_user(void __user *dst, con
+@@ -186,7 +277,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
case 4: {
u32 tmp;
@@ -10152,7 +11087,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
ret, "l", "k", "=r", 4);
if (likely(!ret))
__put_user_asm(tmp, (u32 __user *)dst,
-@@ -195,7 +286,7 @@ int __copy_in_user(void __user *dst, con
+@@ -195,7 +286,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
}
case 8: {
u64 tmp;
@@ -10161,7 +11096,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
ret, "q", "", "=r", 8);
if (likely(!ret))
__put_user_asm(tmp, (u64 __user *)dst,
-@@ -203,8 +294,16 @@ int __copy_in_user(void __user *dst, con
+@@ -203,8 +294,16 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
return ret;
}
default:
@@ -10180,7 +11115,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
}
}
-@@ -221,33 +320,72 @@ __must_check unsigned long __clear_user(
+@@ -221,33 +320,72 @@ __must_check unsigned long __clear_user(void __user *mem, unsigned long len);
static __must_check __always_inline int
__copy_from_user_inatomic(void *dst, const void __user *src, unsigned size)
{
@@ -10263,231 +11198,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess_64.h linux-3.1.4/arch/x86/in
+copy_user_handle_tail(char __user *to, char __user *from, unsigned len, unsigned zerorest);
#endif /* _ASM_X86_UACCESS_64_H */
-diff -urNp linux-3.1.4/arch/x86/include/asm/uaccess.h linux-3.1.4/arch/x86/include/asm/uaccess.h
---- linux-3.1.4/arch/x86/include/asm/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/uaccess.h 2011-11-16 18:39:07.000000000 -0500
-@@ -7,12 +7,15 @@
- #include <linux/compiler.h>
- #include <linux/thread_info.h>
- #include <linux/string.h>
-+#include <linux/sched.h>
- #include <asm/asm.h>
- #include <asm/page.h>
-
- #define VERIFY_READ 0
- #define VERIFY_WRITE 1
-
-+extern void check_object_size(const void *ptr, unsigned long n, bool to);
-+
- /*
- * The fs value determines whether argument validity checking should be
- * performed or not. If get_fs() == USER_DS, checking is performed, with
-@@ -28,7 +31,12 @@
-
- #define get_ds() (KERNEL_DS)
- #define get_fs() (current_thread_info()->addr_limit)
-+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+void __set_fs(mm_segment_t x);
-+void set_fs(mm_segment_t x);
-+#else
- #define set_fs(x) (current_thread_info()->addr_limit = (x))
-+#endif
-
- #define segment_eq(a, b) ((a).seg == (b).seg)
-
-@@ -76,7 +84,33 @@
- * checks that the pointer is in the user space range - after calling
- * this function, memory access functions may still return -EFAULT.
- */
--#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
-+#define __access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
-+#define access_ok(type, addr, size) \
-+({ \
-+ long __size = size; \
-+ unsigned long __addr = (unsigned long)addr; \
-+ unsigned long __addr_ao = __addr & PAGE_MASK; \
-+ unsigned long __end_ao = __addr + __size - 1; \
-+ bool __ret_ao = __range_not_ok(__addr, __size) == 0; \
-+ if (__ret_ao && unlikely((__end_ao ^ __addr_ao) & PAGE_MASK)) { \
-+ while(__addr_ao <= __end_ao) { \
-+ char __c_ao; \
-+ __addr_ao += PAGE_SIZE; \
-+ if (__size > PAGE_SIZE) \
-+ cond_resched(); \
-+ if (__get_user(__c_ao, (char __user *)__addr)) \
-+ break; \
-+ if (type != VERIFY_WRITE) { \
-+ __addr = __addr_ao; \
-+ continue; \
-+ } \
-+ if (__put_user(__c_ao, (char __user *)__addr)) \
-+ break; \
-+ __addr = __addr_ao; \
-+ } \
-+ } \
-+ __ret_ao; \
-+})
-
- /*
- * The exception table consists of pairs of addresses: the first is the
-@@ -182,12 +216,20 @@ extern int __get_user_bad(void);
- asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
- : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
-
--
-+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __copyuser_seg "gs;"
-+#define __COPYUSER_SET_ES "pushl %%gs; popl %%es\n"
-+#define __COPYUSER_RESTORE_ES "pushl %%ss; popl %%es\n"
-+#else
-+#define __copyuser_seg
-+#define __COPYUSER_SET_ES
-+#define __COPYUSER_RESTORE_ES
-+#endif
-
- #ifdef CONFIG_X86_32
- #define __put_user_asm_u64(x, addr, err, errret) \
-- asm volatile("1: movl %%eax,0(%2)\n" \
-- "2: movl %%edx,4(%2)\n" \
-+ asm volatile("1: "__copyuser_seg"movl %%eax,0(%2)\n" \
-+ "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
- "3:\n" \
- ".section .fixup,\"ax\"\n" \
- "4: movl %3,%0\n" \
-@@ -199,8 +241,8 @@ extern int __get_user_bad(void);
- : "A" (x), "r" (addr), "i" (errret), "0" (err))
-
- #define __put_user_asm_ex_u64(x, addr) \
-- asm volatile("1: movl %%eax,0(%1)\n" \
-- "2: movl %%edx,4(%1)\n" \
-+ asm volatile("1: "__copyuser_seg"movl %%eax,0(%1)\n" \
-+ "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
- "3:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- _ASM_EXTABLE(2b, 3b - 2b) \
-@@ -252,7 +294,7 @@ extern void __put_user_8(void);
- __typeof__(*(ptr)) __pu_val; \
- __chk_user_ptr(ptr); \
- might_fault(); \
-- __pu_val = x; \
-+ __pu_val = (x); \
- switch (sizeof(*(ptr))) { \
- case 1: \
- __put_user_x(1, __pu_val, ptr, __ret_pu); \
-@@ -373,7 +415,7 @@ do { \
- } while (0)
-
- #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
-- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
- "2:\n" \
- ".section .fixup,\"ax\"\n" \
- "3: mov %3,%0\n" \
-@@ -381,7 +423,7 @@ do { \
- " jmp 2b\n" \
- ".previous\n" \
- _ASM_EXTABLE(1b, 3b) \
-- : "=r" (err), ltype(x) \
-+ : "=r" (err), ltype (x) \
- : "m" (__m(addr)), "i" (errret), "0" (err))
-
- #define __get_user_size_ex(x, ptr, size) \
-@@ -406,7 +448,7 @@ do { \
- } while (0)
-
- #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
-- asm volatile("1: mov"itype" %1,%"rtype"0\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %1,%"rtype"0\n"\
- "2:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- : ltype(x) : "m" (__m(addr)))
-@@ -423,13 +465,24 @@ do { \
- int __gu_err; \
- unsigned long __gu_val; \
- __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
-- (x) = (__force __typeof__(*(ptr)))__gu_val; \
-+ (x) = (__typeof__(*(ptr)))__gu_val; \
- __gu_err; \
- })
-
- /* FIXME: this hack is definitely wrong -AK */
- struct __large_struct { unsigned long buf[100]; };
--#define __m(x) (*(struct __large_struct __user *)(x))
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define ____m(x) \
-+({ \
-+ unsigned long ____x = (unsigned long)(x); \
-+ if (____x < PAX_USER_SHADOW_BASE) \
-+ ____x += PAX_USER_SHADOW_BASE; \
-+ (void __user *)____x; \
-+})
-+#else
-+#define ____m(x) (x)
-+#endif
-+#define __m(x) (*(struct __large_struct __user *)____m(x))
-
- /*
- * Tell gcc we read from memory instead of writing: this is because
-@@ -437,7 +490,7 @@ struct __large_struct { unsigned long bu
- * aliasing issues.
- */
- #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
-- asm volatile("1: mov"itype" %"rtype"1,%2\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
- "2:\n" \
- ".section .fixup,\"ax\"\n" \
- "3: mov %3,%0\n" \
-@@ -445,10 +498,10 @@ struct __large_struct { unsigned long bu
- ".previous\n" \
- _ASM_EXTABLE(1b, 3b) \
- : "=r"(err) \
-- : ltype(x), "m" (__m(addr)), "i" (errret), "0" (err))
-+ : ltype (x), "m" (__m(addr)), "i" (errret), "0" (err))
-
- #define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
-- asm volatile("1: mov"itype" %"rtype"0,%1\n" \
-+ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"0,%1\n"\
- "2:\n" \
- _ASM_EXTABLE(1b, 2b - 1b) \
- : : ltype(x), "m" (__m(addr)))
-@@ -487,8 +540,12 @@ struct __large_struct { unsigned long bu
- * On error, the variable @x is set to zero.
- */
-
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __get_user(x, ptr) get_user((x), (ptr))
-+#else
- #define __get_user(x, ptr) \
- __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
-+#endif
-
- /**
- * __put_user: - Write a simple value into user space, with less checking.
-@@ -510,8 +567,12 @@ struct __large_struct { unsigned long bu
- * Returns zero on success, or -EFAULT on error.
- */
-
-+#if defined(CONFIG_X86_64) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __put_user(x, ptr) put_user((x), (ptr))
-+#else
- #define __put_user(x, ptr) \
- __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
-+#endif
-
- #define __get_user_unaligned __get_user
- #define __put_user_unaligned __put_user
-@@ -529,7 +590,7 @@ struct __large_struct { unsigned long bu
- #define get_user_ex(x, ptr) do { \
- unsigned long __gue_val; \
- __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
-- (x) = (__force __typeof__(*(ptr)))__gue_val; \
-+ (x) = (__typeof__(*(ptr)))__gue_val; \
- } while (0)
-
- #ifdef CONFIG_X86_WP_WORKS_OK
-diff -urNp linux-3.1.4/arch/x86/include/asm/vdso.h linux-3.1.4/arch/x86/include/asm/vdso.h
---- linux-3.1.4/arch/x86/include/asm/vdso.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/vdso.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h
+index bb05228..d763d5b 100644
+--- a/arch/x86/include/asm/vdso.h
++++ b/arch/x86/include/asm/vdso.h
@@ -11,7 +11,7 @@ extern const char VDSO32_PRELINK[];
#define VDSO32_SYMBOL(base, name) \
({ \
@@ -10497,9 +11211,10 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/vdso.h linux-3.1.4/arch/x86/include/
})
#endif
-diff -urNp linux-3.1.4/arch/x86/include/asm/x86_init.h linux-3.1.4/arch/x86/include/asm/x86_init.h
---- linux-3.1.4/arch/x86/include/asm/x86_init.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/x86_init.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
+index d3d8590..d296b5f 100644
+--- a/arch/x86/include/asm/x86_init.h
++++ b/arch/x86/include/asm/x86_init.h
@@ -28,7 +28,7 @@ struct x86_init_mpparse {
void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
void (*find_smp_config)(void);
@@ -10617,10 +11332,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/x86_init.h linux-3.1.4/arch/x86/incl
extern struct x86_init_ops x86_init;
extern struct x86_cpuinit_ops x86_cpuinit;
-diff -urNp linux-3.1.4/arch/x86/include/asm/xsave.h linux-3.1.4/arch/x86/include/asm/xsave.h
---- linux-3.1.4/arch/x86/include/asm/xsave.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/include/asm/xsave.h 2011-11-16 18:39:07.000000000 -0500
-@@ -65,6 +65,11 @@ static inline int xsave_user(struct xsav
+diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
+index c6ce245..ffbdab7 100644
+--- a/arch/x86/include/asm/xsave.h
++++ b/arch/x86/include/asm/xsave.h
+@@ -65,6 +65,11 @@ static inline int xsave_user(struct xsave_struct __user *buf)
{
int err;
@@ -10632,7 +11348,7 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/xsave.h linux-3.1.4/arch/x86/include
/*
* Clear the xsave header first, so that reserved fields are
* initialized to zero.
-@@ -96,10 +101,15 @@ static inline int xsave_user(struct xsav
+@@ -96,10 +101,15 @@ static inline int xsave_user(struct xsave_struct __user *buf)
static inline int xrestore_user(struct xsave_struct __user *buf, u64 mask)
{
int err;
@@ -10649,136 +11365,11 @@ diff -urNp linux-3.1.4/arch/x86/include/asm/xsave.h linux-3.1.4/arch/x86/include
__asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
"2:\n"
".section .fixup,\"ax\"\n"
-diff -urNp linux-3.1.4/arch/x86/Kconfig linux-3.1.4/arch/x86/Kconfig
---- linux-3.1.4/arch/x86/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/Kconfig 2011-11-16 18:40:08.000000000 -0500
-@@ -236,7 +236,7 @@ config X86_HT
-
- config X86_32_LAZY_GS
- def_bool y
-- depends on X86_32 && !CC_STACKPROTECTOR
-+ depends on X86_32 && !CC_STACKPROTECTOR && !PAX_MEMORY_UDEREF
-
- config ARCH_HWEIGHT_CFLAGS
- string
-@@ -1019,7 +1019,7 @@ choice
-
- config NOHIGHMEM
- bool "off"
-- depends on !X86_NUMAQ
-+ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
- ---help---
- Linux can use up to 64 Gigabytes of physical memory on x86 systems.
- However, the address space of 32-bit x86 processors is only 4
-@@ -1056,7 +1056,7 @@ config NOHIGHMEM
-
- config HIGHMEM4G
- bool "4GB"
-- depends on !X86_NUMAQ
-+ depends on !X86_NUMAQ && !(PAX_PAGEEXEC && PAX_ENABLE_PAE)
- ---help---
- Select this if you have a 32-bit processor and between 1 and 4
- gigabytes of physical RAM.
-@@ -1110,7 +1110,7 @@ config PAGE_OFFSET
- hex
- default 0xB0000000 if VMSPLIT_3G_OPT
- default 0x80000000 if VMSPLIT_2G
-- default 0x78000000 if VMSPLIT_2G_OPT
-+ default 0x70000000 if VMSPLIT_2G_OPT
- default 0x40000000 if VMSPLIT_1G
- default 0xC0000000
- depends on X86_32
-@@ -1484,6 +1484,7 @@ config SECCOMP
-
- config CC_STACKPROTECTOR
- bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
-+ depends on X86_64 || !PAX_MEMORY_UDEREF
- ---help---
- This option turns on the -fstack-protector GCC feature. This
- feature puts, at the beginning of functions, a canary value on
-@@ -1541,6 +1542,7 @@ config KEXEC_JUMP
- config PHYSICAL_START
- hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
- default "0x1000000"
-+ range 0x400000 0x40000000
- ---help---
- This gives the physical address where the kernel is loaded.
-
-@@ -1604,6 +1606,7 @@ config X86_NEED_RELOCS
- config PHYSICAL_ALIGN
- hex "Alignment value to which kernel should be aligned" if X86_32
- default "0x1000000"
-+ range 0x400000 0x1000000 if PAX_KERNEXEC
- range 0x2000 0x1000000
- ---help---
- This value puts the alignment restrictions on physical address
-@@ -1635,9 +1638,10 @@ config HOTPLUG_CPU
- Say N if you want to disable CPU hotplug.
-
- config COMPAT_VDSO
-- def_bool y
-+ def_bool n
- prompt "Compat VDSO support"
- depends on X86_32 || IA32_EMULATION
-+ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF
- ---help---
- Map the 32-bit VDSO to the predictable old-style address too.
-
-diff -urNp linux-3.1.4/arch/x86/Kconfig.cpu linux-3.1.4/arch/x86/Kconfig.cpu
---- linux-3.1.4/arch/x86/Kconfig.cpu 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/Kconfig.cpu 2011-11-16 18:39:07.000000000 -0500
-@@ -341,7 +341,7 @@ config X86_PPRO_FENCE
-
- config X86_F00F_BUG
- def_bool y
-- depends on M586MMX || M586TSC || M586 || M486 || M386
-+ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC
-
- config X86_INVD_BUG
- def_bool y
-@@ -365,7 +365,7 @@ config X86_POPAD_OK
-
- config X86_ALIGNMENT_16
- def_bool y
-- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
-+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK8 || MK7 || MK6 || MCORE2 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
-
- config X86_INTEL_USERCOPY
- def_bool y
-@@ -411,7 +411,7 @@ config X86_CMPXCHG64
- # generates cmov.
- config X86_CMOV
- def_bool y
-- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
-+ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
-
- config X86_MINIMUM_CPU_FAMILY
- int
-diff -urNp linux-3.1.4/arch/x86/Kconfig.debug linux-3.1.4/arch/x86/Kconfig.debug
---- linux-3.1.4/arch/x86/Kconfig.debug 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/Kconfig.debug 2011-11-16 18:39:07.000000000 -0500
-@@ -81,7 +81,7 @@ config X86_PTDUMP
- config DEBUG_RODATA
- bool "Write protect kernel read-only data structures"
- default y
-- depends on DEBUG_KERNEL
-+ depends on DEBUG_KERNEL && BROKEN
- ---help---
- Mark the kernel read-only data as write-protected in the pagetables,
- in order to catch accidental (and incorrect) writes to such const
-@@ -99,7 +99,7 @@ config DEBUG_RODATA_TEST
-
- config DEBUG_SET_MODULE_RONX
- bool "Set loadable kernel module data as NX and text as RO"
-- depends on MODULES
-+ depends on MODULES && BROKEN
- ---help---
- This option helps catch unintended modifications to loadable
- kernel module's text and read-only data. It also prevents execution
-diff -urNp linux-3.1.4/arch/x86/kernel/acpi/realmode/Makefile linux-3.1.4/arch/x86/kernel/acpi/realmode/Makefile
---- linux-3.1.4/arch/x86/kernel/acpi/realmode/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/acpi/realmode/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -41,6 +41,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os
+diff --git a/arch/x86/kernel/acpi/realmode/Makefile b/arch/x86/kernel/acpi/realmode/Makefile
+index 6a564ac..9b1340c 100644
+--- a/arch/x86/kernel/acpi/realmode/Makefile
++++ b/arch/x86/kernel/acpi/realmode/Makefile
+@@ -41,6 +41,9 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
$(call cc-option, -fno-stack-protector) \
$(call cc-option, -mpreferred-stack-boundary=2)
KBUILD_CFLAGS += $(call cc-option, -m32)
@@ -10788,9 +11379,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/acpi/realmode/Makefile linux-3.1.4/arch/x
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
-diff -urNp linux-3.1.4/arch/x86/kernel/acpi/realmode/wakeup.S linux-3.1.4/arch/x86/kernel/acpi/realmode/wakeup.S
---- linux-3.1.4/arch/x86/kernel/acpi/realmode/wakeup.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/acpi/realmode/wakeup.S 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S
+index b4fd836..4358fe3 100644
+--- a/arch/x86/kernel/acpi/realmode/wakeup.S
++++ b/arch/x86/kernel/acpi/realmode/wakeup.S
@@ -108,6 +108,9 @@ wakeup_code:
/* Do any other stuff... */
@@ -10809,9 +11401,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/acpi/realmode/wakeup.S linux-3.1.4/arch/x
#else
pushw $0
pushw trampoline_segment
-diff -urNp linux-3.1.4/arch/x86/kernel/acpi/sleep.c linux-3.1.4/arch/x86/kernel/acpi/sleep.c
---- linux-3.1.4/arch/x86/kernel/acpi/sleep.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/acpi/sleep.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
+index 103b6ab..2004d0a 100644
+--- a/arch/x86/kernel/acpi/sleep.c
++++ b/arch/x86/kernel/acpi/sleep.c
@@ -94,8 +94,12 @@ int acpi_suspend_lowlevel(void)
header->trampoline_segment = trampoline_address() >> 4;
#ifdef CONFIG_SMP
@@ -10825,9 +11418,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/acpi/sleep.c linux-3.1.4/arch/x86/kernel/
initial_gs = per_cpu_offset(smp_processor_id());
#endif
initial_code = (unsigned long)wakeup_long64;
-diff -urNp linux-3.1.4/arch/x86/kernel/acpi/wakeup_32.S linux-3.1.4/arch/x86/kernel/acpi/wakeup_32.S
---- linux-3.1.4/arch/x86/kernel/acpi/wakeup_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/acpi/wakeup_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
+index 13ab720..95d5442 100644
+--- a/arch/x86/kernel/acpi/wakeup_32.S
++++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -30,13 +30,11 @@ wakeup_pmode_return:
# and restore the stack ... but you need gdt for this to work
movl saved_context_esp, %esp
@@ -10844,10 +11438,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/acpi/wakeup_32.S linux-3.1.4/arch/x86/ker
bogus_magic:
jmp bogus_magic
-diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel/alternative.c
---- linux-3.1.4/arch/x86/kernel/alternative.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/alternative.c 2011-11-16 18:39:07.000000000 -0500
-@@ -276,6 +276,13 @@ void __init_or_module apply_alternatives
+diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
+index c638228..16dfa8d 100644
+--- a/arch/x86/kernel/alternative.c
++++ b/arch/x86/kernel/alternative.c
+@@ -276,6 +276,13 @@ void __init_or_module apply_alternatives(struct alt_instr *start,
*/
for (a = start; a < end; a++) {
instr = (u8 *)&a->instr_offset + a->instr_offset;
@@ -10861,7 +11456,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
replacement = (u8 *)&a->repl_offset + a->repl_offset;
BUG_ON(a->replacementlen > a->instrlen);
BUG_ON(a->instrlen > sizeof(insnbuf));
-@@ -307,10 +314,16 @@ static void alternatives_smp_lock(const
+@@ -307,10 +314,16 @@ static void alternatives_smp_lock(const s32 *start, const s32 *end,
for (poff = start; poff < end; poff++) {
u8 *ptr = (u8 *)poff + *poff;
@@ -10879,7 +11474,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
text_poke(ptr, ((unsigned char []){0xf0}), 1);
};
mutex_unlock(&text_mutex);
-@@ -328,10 +341,16 @@ static void alternatives_smp_unlock(cons
+@@ -328,10 +341,16 @@ static void alternatives_smp_unlock(const s32 *start, const s32 *end,
for (poff = start; poff < end; poff++) {
u8 *ptr = (u8 *)poff + *poff;
@@ -10897,7 +11492,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
text_poke(ptr, ((unsigned char []){0x3E}), 1);
};
mutex_unlock(&text_mutex);
-@@ -500,7 +519,7 @@ void __init_or_module apply_paravirt(str
+@@ -500,7 +519,7 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start,
BUG_ON(p->len > MAX_PATCH_LEN);
/* prep the buffer with the original instructions */
@@ -10906,7 +11501,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf,
(unsigned long)p->instr, p->len);
-@@ -568,7 +587,7 @@ void __init alternative_instructions(voi
+@@ -568,7 +587,7 @@ void __init alternative_instructions(void)
if (smp_alt_once)
free_init_pages("SMP alternatives",
(unsigned long)__smp_locks,
@@ -10915,7 +11510,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
restart_nmi();
}
-@@ -585,13 +604,17 @@ void __init alternative_instructions(voi
+@@ -585,13 +604,17 @@ void __init alternative_instructions(void)
* instructions. And on the local CPU you need to be protected again NMI or MCE
* handlers seeing an inconsistent instruction while you patch.
*/
@@ -10935,7 +11530,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
local_irq_restore(flags);
/* Could also do a CLFLUSH here to speed up CPU recovery; but
that causes hangs on some VIA CPUs. */
-@@ -613,36 +636,22 @@ void *__init_or_module text_poke_early(v
+@@ -613,36 +636,22 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode,
*/
void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
{
@@ -10980,9 +11575,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/alternative.c linux-3.1.4/arch/x86/kernel
return addr;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/apic/apic.c linux-3.1.4/arch/x86/kernel/apic/apic.c
---- linux-3.1.4/arch/x86/kernel/apic/apic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/apic/apic.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
+index 52fa563..5de9d9c 100644
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
@@ -174,7 +174,7 @@ int first_system_vector = 0xfe;
/*
* Debug level, exported for io_apic.c
@@ -10992,7 +11588,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/apic.c linux-3.1.4/arch/x86/kernel/a
int pic_mode;
-@@ -1835,7 +1835,7 @@ void smp_error_interrupt(struct pt_regs
+@@ -1835,7 +1835,7 @@ void smp_error_interrupt(struct pt_regs *regs)
apic_write(APIC_ESR, 0);
v1 = apic_read(APIC_ESR);
ack_APIC_irq();
@@ -11001,7 +11597,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/apic.c linux-3.1.4/arch/x86/kernel/a
apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x(%02x)",
smp_processor_id(), v0 , v1);
-@@ -2209,6 +2209,8 @@ static int __cpuinit apic_cluster_num(vo
+@@ -2209,6 +2209,8 @@ static int __cpuinit apic_cluster_num(void)
u16 *bios_cpu_apicid;
DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
@@ -11010,10 +11606,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/apic.c linux-3.1.4/arch/x86/kernel/a
bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
-diff -urNp linux-3.1.4/arch/x86/kernel/apic/io_apic.c linux-3.1.4/arch/x86/kernel/apic/io_apic.c
---- linux-3.1.4/arch/x86/kernel/apic/io_apic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/apic/io_apic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1028,7 +1028,7 @@ int IO_APIC_get_PCI_irq_vector(int bus,
+diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
+index 8eb863e..32e6934 100644
+--- a/arch/x86/kernel/apic/io_apic.c
++++ b/arch/x86/kernel/apic/io_apic.c
+@@ -1028,7 +1028,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
}
EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
@@ -11031,7 +11628,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/io_apic.c linux-3.1.4/arch/x86/kerne
{
raw_spin_unlock(&vector_lock);
}
-@@ -2405,7 +2405,7 @@ static void ack_apic_edge(struct irq_dat
+@@ -2405,7 +2405,7 @@ static void ack_apic_edge(struct irq_data *data)
ack_APIC_irq();
}
@@ -11040,7 +11637,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/io_apic.c linux-3.1.4/arch/x86/kerne
/*
* IO-APIC versions below 0x20 don't support EOI register.
-@@ -2513,7 +2513,7 @@ static void ack_apic_level(struct irq_da
+@@ -2513,7 +2513,7 @@ static void ack_apic_level(struct irq_data *data)
* at the cpu.
*/
if (!(v & (1 << (i & 0x1f)))) {
@@ -11049,9 +11646,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apic/io_apic.c linux-3.1.4/arch/x86/kerne
eoi_ioapic_irq(irq, cfg);
}
-diff -urNp linux-3.1.4/arch/x86/kernel/apm_32.c linux-3.1.4/arch/x86/kernel/apm_32.c
---- linux-3.1.4/arch/x86/kernel/apm_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/apm_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
+index 0371c48..54cdf63 100644
+--- a/arch/x86/kernel/apm_32.c
++++ b/arch/x86/kernel/apm_32.c
@@ -413,7 +413,7 @@ static DEFINE_MUTEX(apm_mutex);
* This is for buggy BIOS's that refer to (real mode) segment 0x40
* even though they are called in protected mode.
@@ -11084,7 +11682,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apm_32.c linux-3.1.4/arch/x86/kernel/apm_
put_cpu();
return call->eax & 0xff;
-@@ -667,7 +674,10 @@ static long __apm_bios_call_simple(void
+@@ -667,7 +674,10 @@ static long __apm_bios_call_simple(void *_call)
BUG_ON(cpu != 0);
gdt = get_cpu_gdt_table(cpu);
save_desc_40 = gdt[0x40 / 8];
@@ -11095,7 +11693,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apm_32.c linux-3.1.4/arch/x86/kernel/apm_
apm_irq_save(flags);
APM_DO_SAVE_SEGS;
-@@ -675,7 +685,11 @@ static long __apm_bios_call_simple(void
+@@ -675,7 +685,11 @@ static long __apm_bios_call_simple(void *_call)
&call->eax);
APM_DO_RESTORE_SEGS;
apm_irq_restore(flags);
@@ -11123,20 +11721,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/apm_32.c linux-3.1.4/arch/x86/kernel/apm_
proc_create("apm", 0, NULL, &apm_file_ops);
-diff -urNp linux-3.1.4/arch/x86/kernel/asm-offsets_64.c linux-3.1.4/arch/x86/kernel/asm-offsets_64.c
---- linux-3.1.4/arch/x86/kernel/asm-offsets_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/asm-offsets_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -69,6 +69,7 @@ int main(void)
- BLANK();
- #undef ENTRY
-
-+ DEFINE(TSS_size, sizeof(struct tss_struct));
- OFFSET(TSS_ist, tss_struct, x86_tss.ist);
- BLANK();
-
-diff -urNp linux-3.1.4/arch/x86/kernel/asm-offsets.c linux-3.1.4/arch/x86/kernel/asm-offsets.c
---- linux-3.1.4/arch/x86/kernel/asm-offsets.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/asm-offsets.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
+index 4f13faf..87db5d2 100644
+--- a/arch/x86/kernel/asm-offsets.c
++++ b/arch/x86/kernel/asm-offsets.c
@@ -33,6 +33,8 @@ void common(void) {
OFFSET(TI_status, thread_info, status);
OFFSET(TI_addr_limit, thread_info, addr_limit);
@@ -11173,10 +11761,38 @@ diff -urNp linux-3.1.4/arch/x86/kernel/asm-offsets.c linux-3.1.4/arch/x86/kernel
#ifdef CONFIG_XEN
BLANK();
OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/amd.c linux-3.1.4/arch/x86/kernel/cpu/amd.c
---- linux-3.1.4/arch/x86/kernel/cpu/amd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/amd.c 2011-11-16 18:39:07.000000000 -0500
-@@ -647,7 +647,7 @@ static unsigned int __cpuinit amd_size_c
+diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
+index e72a119..6e2955d 100644
+--- a/arch/x86/kernel/asm-offsets_64.c
++++ b/arch/x86/kernel/asm-offsets_64.c
+@@ -69,6 +69,7 @@ int main(void)
+ BLANK();
+ #undef ENTRY
+
++ DEFINE(TSS_size, sizeof(struct tss_struct));
+ OFFSET(TSS_ist, tss_struct, x86_tss.ist);
+ BLANK();
+
+diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
+index 6042981..e638266 100644
+--- a/arch/x86/kernel/cpu/Makefile
++++ b/arch/x86/kernel/cpu/Makefile
+@@ -8,10 +8,6 @@ CFLAGS_REMOVE_common.o = -pg
+ CFLAGS_REMOVE_perf_event.o = -pg
+ endif
+
+-# Make sure load_percpu_segment has no stackprotector
+-nostackp := $(call cc-option, -fno-stack-protector)
+-CFLAGS_common.o := $(nostackp)
+-
+ obj-y := intel_cacheinfo.o scattered.o topology.o
+ obj-y += proc.o capflags.o powerflags.o common.o
+ obj-y += vmware.o hypervisor.o sched.o mshyperv.o
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
+index b13ed39..603286c 100644
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -647,7 +647,7 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
unsigned int size)
{
/* AMD errata T13 (order #21922) */
@@ -11185,10 +11801,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/amd.c linux-3.1.4/arch/x86/kernel/cpu
/* Duron Rev A0 */
if (c->x86_model == 3 && c->x86_mask == 0)
size = 64;
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/cpu/common.c
---- linux-3.1.4/arch/x86/kernel/cpu/common.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/common.c 2011-11-16 18:39:07.000000000 -0500
-@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitcon
+diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
+index 6218439..0f1addc 100644
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitconst default_cpu = {
static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
@@ -11258,7 +11875,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/
gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr);
/* Reload the per-cpu base */
-@@ -840,6 +786,10 @@ static void __cpuinit identify_cpu(struc
+@@ -840,6 +786,10 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
/* Filter out anything that depends on CPUID levels we don't have */
filter_cpuid_features(c, true);
@@ -11269,7 +11886,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/
/* If the model name is still unset, do table lookup. */
if (!c->x86_model_id[0]) {
const char *p;
-@@ -1019,6 +969,9 @@ static __init int setup_disablecpuid(cha
+@@ -1019,6 +969,9 @@ static __init int setup_disablecpuid(char *arg)
}
__setup("clearcpuid=", setup_disablecpuid);
@@ -11279,7 +11896,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/
#ifdef CONFIG_X86_64
struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table };
-@@ -1034,7 +987,7 @@ DEFINE_PER_CPU(struct task_struct *, cur
+@@ -1034,7 +987,7 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned =
EXPORT_PER_CPU_SYMBOL(current_task);
DEFINE_PER_CPU(unsigned long, kernel_stack) =
@@ -11288,7 +11905,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/
EXPORT_PER_CPU_SYMBOL(kernel_stack);
DEFINE_PER_CPU(char *, irq_stack_ptr) =
-@@ -1099,7 +1052,7 @@ struct pt_regs * __cpuinit idle_regs(str
+@@ -1099,7 +1052,7 @@ struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
{
memset(regs, 0, sizeof(struct pt_regs));
regs->fs = __KERNEL_PERCPU;
@@ -11332,10 +11949,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/common.c linux-3.1.4/arch/x86/kernel/
struct thread_struct *thread = &curr->thread;
if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/intel.c linux-3.1.4/arch/x86/kernel/cpu/intel.c
---- linux-3.1.4/arch/x86/kernel/cpu/intel.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/intel.c 2011-11-16 18:39:07.000000000 -0500
-@@ -172,7 +172,7 @@ static void __cpuinit trap_init_f00f_bug
+diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
+index ed6086e..a1dcf29 100644
+--- a/arch/x86/kernel/cpu/intel.c
++++ b/arch/x86/kernel/cpu/intel.c
+@@ -172,7 +172,7 @@ static void __cpuinit trap_init_f00f_bug(void)
* Update the IDT descriptor and reload the IDT so that
* it uses the read-only mapped virtual address.
*/
@@ -11344,23 +11962,25 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/intel.c linux-3.1.4/arch/x86/kernel/c
load_idt(&idt_descr);
}
#endif
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/Makefile linux-3.1.4/arch/x86/kernel/cpu/Makefile
---- linux-3.1.4/arch/x86/kernel/cpu/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/Makefile 2011-11-16 18:39:07.000000000 -0500
-@@ -8,10 +8,6 @@ CFLAGS_REMOVE_common.o = -pg
- CFLAGS_REMOVE_perf_event.o = -pg
- endif
-
--# Make sure load_percpu_segment has no stackprotector
--nostackp := $(call cc-option, -fno-stack-protector)
--CFLAGS_common.o := $(nostackp)
--
- obj-y := intel_cacheinfo.o scattered.o topology.o
- obj-y += proc.o capflags.o powerflags.o common.o
- obj-y += vmware.o hypervisor.o sched.o mshyperv.o
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c
---- linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
+index 0ed633c..82cef2a 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
++++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
+@@ -215,7 +215,9 @@ static int inject_init(void)
+ if (!alloc_cpumask_var(&mce_inject_cpumask, GFP_KERNEL))
+ return -ENOMEM;
+ printk(KERN_INFO "Machine check injector initialized\n");
+- mce_chrdev_ops.write = mce_write;
++ pax_open_kernel();
++ *(void **)&mce_chrdev_ops.write = mce_write;
++ pax_close_kernel();
+ register_die_notifier(&mce_raise_nb);
+ return 0;
+ }
+diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
+index 08363b0..ee26113 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce.c
++++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -42,6 +42,7 @@
#include <asm/processor.h>
#include <asm/mce.h>
@@ -11391,7 +12011,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
/* Panic in progress. Enable interrupts and wait for final IPI */
static void wait_for_panic(void)
-@@ -260,7 +261,7 @@ static void mce_panic(char *msg, struct
+@@ -260,7 +261,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
/*
* Make sure only one CPU runs in machine check panic
*/
@@ -11400,7 +12020,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
wait_for_panic();
barrier();
-@@ -268,7 +269,7 @@ static void mce_panic(char *msg, struct
+@@ -268,7 +269,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
console_verbose();
} else {
/* Don't log too much for fake panic */
@@ -11418,7 +12038,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
wait_for_panic();
if (!monarch_timeout)
goto out;
-@@ -1392,7 +1393,7 @@ static void unexpected_machine_check(str
+@@ -1392,7 +1393,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
}
/* Call the installed machine check handler for this CPU setup. */
@@ -11427,7 +12047,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
unexpected_machine_check;
/*
-@@ -1415,7 +1416,9 @@ void __cpuinit mcheck_cpu_init(struct cp
+@@ -1415,7 +1416,9 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
return;
}
@@ -11437,7 +12057,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
__mcheck_cpu_init_generic();
__mcheck_cpu_init_vendor(c);
-@@ -1429,7 +1432,7 @@ void __cpuinit mcheck_cpu_init(struct cp
+@@ -1429,7 +1432,7 @@ void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c)
*/
static DEFINE_SPINLOCK(mce_chrdev_state_lock);
@@ -11446,7 +12066,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
static int mce_chrdev_open_exclu; /* already open exclusive? */
static int mce_chrdev_open(struct inode *inode, struct file *file)
-@@ -1437,7 +1440,7 @@ static int mce_chrdev_open(struct inode
+@@ -1437,7 +1440,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
spin_lock(&mce_chrdev_state_lock);
if (mce_chrdev_open_exclu ||
@@ -11455,7 +12075,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
spin_unlock(&mce_chrdev_state_lock);
return -EBUSY;
-@@ -1445,7 +1448,7 @@ static int mce_chrdev_open(struct inode
+@@ -1445,7 +1448,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
if (file->f_flags & O_EXCL)
mce_chrdev_open_exclu = 1;
@@ -11464,7 +12084,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
spin_unlock(&mce_chrdev_state_lock);
-@@ -1456,7 +1459,7 @@ static int mce_chrdev_release(struct ino
+@@ -1456,7 +1459,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
{
spin_lock(&mce_chrdev_state_lock);
@@ -11482,24 +12102,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce.c linux-3.1.4/arch/x86/ker
atomic_set(&mce_executing, 0);
atomic_set(&mce_callin, 0);
atomic_set(&global_nwo, 0);
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce-inject.c linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce-inject.c
---- linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce-inject.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mcheck/mce-inject.c 2011-11-16 18:39:07.000000000 -0500
-@@ -215,7 +215,9 @@ static int inject_init(void)
- if (!alloc_cpumask_var(&mce_inject_cpumask, GFP_KERNEL))
- return -ENOMEM;
- printk(KERN_INFO "Machine check injector initialized\n");
-- mce_chrdev_ops.write = mce_write;
-+ pax_open_kernel();
-+ *(void **)&mce_chrdev_ops.write = mce_write;
-+ pax_close_kernel();
- register_die_notifier(&mce_raise_nb);
- return 0;
- }
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/p5.c linux-3.1.4/arch/x86/kernel/cpu/mcheck/p5.c
---- linux-3.1.4/arch/x86/kernel/cpu/mcheck/p5.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mcheck/p5.c 2011-12-02 17:38:47.000000000 -0500
-@@ -50,7 +50,9 @@ void intel_p5_mcheck_init(struct cpuinfo
+diff --git a/arch/x86/kernel/cpu/mcheck/p5.c b/arch/x86/kernel/cpu/mcheck/p5.c
+index 5c0e653..1e82c7c 100644
+--- a/arch/x86/kernel/cpu/mcheck/p5.c
++++ b/arch/x86/kernel/cpu/mcheck/p5.c
+@@ -50,7 +50,9 @@ void intel_p5_mcheck_init(struct cpuinfo_x86 *c)
if (!cpu_has(c, X86_FEATURE_MCE))
return;
@@ -11509,10 +12116,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/p5.c linux-3.1.4/arch/x86/kern
/* Make sure the vector pointer is visible before we enable MCEs: */
wmb();
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/winchip.c linux-3.1.4/arch/x86/kernel/cpu/mcheck/winchip.c
---- linux-3.1.4/arch/x86/kernel/cpu/mcheck/winchip.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mcheck/winchip.c 2011-12-02 17:38:47.000000000 -0500
-@@ -24,7 +24,9 @@ void winchip_mcheck_init(struct cpuinfo_
+diff --git a/arch/x86/kernel/cpu/mcheck/winchip.c b/arch/x86/kernel/cpu/mcheck/winchip.c
+index 54060f5..e6ba93d 100644
+--- a/arch/x86/kernel/cpu/mcheck/winchip.c
++++ b/arch/x86/kernel/cpu/mcheck/winchip.c
+@@ -24,7 +24,9 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c)
{
u32 lo, hi;
@@ -11522,9 +12130,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mcheck/winchip.c linux-3.1.4/arch/x86
/* Make sure the vector pointer is visible before we enable MCEs: */
wmb();
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mtrr/main.c linux-3.1.4/arch/x86/kernel/cpu/mtrr/main.c
---- linux-3.1.4/arch/x86/kernel/cpu/mtrr/main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mtrr/main.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
+index 6b96110..0da73eb 100644
+--- a/arch/x86/kernel/cpu/mtrr/main.c
++++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -62,7 +62,7 @@ static DEFINE_MUTEX(mtrr_mutex);
u64 size_or_mask, size_and_mask;
static bool mtrr_aps_delayed_init;
@@ -11534,9 +12143,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mtrr/main.c linux-3.1.4/arch/x86/kern
const struct mtrr_ops *mtrr_if;
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mtrr/mtrr.h linux-3.1.4/arch/x86/kernel/cpu/mtrr/mtrr.h
---- linux-3.1.4/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.h b/arch/x86/kernel/cpu/mtrr/mtrr.h
+index df5e41f..816c719 100644
+--- a/arch/x86/kernel/cpu/mtrr/mtrr.h
++++ b/arch/x86/kernel/cpu/mtrr/mtrr.h
@@ -25,7 +25,7 @@ struct mtrr_ops {
int (*validate_add_page)(unsigned long base, unsigned long size,
unsigned int type);
@@ -11546,10 +12156,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/mtrr/mtrr.h linux-3.1.4/arch/x86/kern
extern int generic_get_free_region(unsigned long base, unsigned long size,
int replace_reg);
-diff -urNp linux-3.1.4/arch/x86/kernel/cpu/perf_event.c linux-3.1.4/arch/x86/kernel/cpu/perf_event.c
---- linux-3.1.4/arch/x86/kernel/cpu/perf_event.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/cpu/perf_event.c 2011-11-16 18:40:08.000000000 -0500
-@@ -795,6 +795,8 @@ static int x86_schedule_events(struct cp
+diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
+index cfa62ec..9250dd7 100644
+--- a/arch/x86/kernel/cpu/perf_event.c
++++ b/arch/x86/kernel/cpu/perf_event.c
+@@ -795,6 +795,8 @@ static int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
int i, j, w, wmax, num = 0;
struct hw_perf_event *hwc;
@@ -11558,7 +12169,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/perf_event.c linux-3.1.4/arch/x86/ker
bitmap_zero(used_mask, X86_PMC_IDX_MAX);
for (i = 0; i < n; i++) {
-@@ -1919,7 +1921,7 @@ perf_callchain_user(struct perf_callchai
+@@ -1919,7 +1921,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
break;
perf_callchain_store(entry, frame.return_address);
@@ -11567,10 +12178,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/cpu/perf_event.c linux-3.1.4/arch/x86/ker
}
}
-diff -urNp linux-3.1.4/arch/x86/kernel/crash.c linux-3.1.4/arch/x86/kernel/crash.c
---- linux-3.1.4/arch/x86/kernel/crash.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/crash.c 2011-11-16 18:39:07.000000000 -0500
-@@ -42,7 +42,7 @@ static void kdump_nmi_callback(int cpu,
+diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
+index 764c7c2..c5d9c7b 100644
+--- a/arch/x86/kernel/crash.c
++++ b/arch/x86/kernel/crash.c
+@@ -42,7 +42,7 @@ static void kdump_nmi_callback(int cpu, struct die_args *args)
regs = args->regs;
#ifdef CONFIG_X86_32
@@ -11579,9 +12191,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/crash.c linux-3.1.4/arch/x86/kernel/crash
crash_fixup_ss_esp(&fixed_regs, regs);
regs = &fixed_regs;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/doublefault_32.c linux-3.1.4/arch/x86/kernel/doublefault_32.c
---- linux-3.1.4/arch/x86/kernel/doublefault_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/doublefault_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/doublefault_32.c b/arch/x86/kernel/doublefault_32.c
+index 37250fe..bf2ec74 100644
+--- a/arch/x86/kernel/doublefault_32.c
++++ b/arch/x86/kernel/doublefault_32.c
@@ -11,7 +11,7 @@
#define DOUBLEFAULT_STACKSIZE (1024)
@@ -11600,7 +12213,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/doublefault_32.c linux-3.1.4/arch/x86/ker
printk(KERN_EMERG "PANIC: double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
-@@ -58,10 +58,10 @@ struct tss_struct doublefault_tss __cach
+@@ -58,10 +58,10 @@ struct tss_struct doublefault_tss __cacheline_aligned = {
/* 0x2 bit is always set */
.flags = X86_EFLAGS_SF | 0x2,
.sp = STACK_START,
@@ -11613,10 +12226,158 @@ diff -urNp linux-3.1.4/arch/x86/kernel/doublefault_32.c linux-3.1.4/arch/x86/ker
.fs = __KERNEL_PERCPU,
.__cr3 = __pa_nodebug(swapper_pg_dir),
-diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_32.c linux-3.1.4/arch/x86/kernel/dumpstack_32.c
---- linux-3.1.4/arch/x86/kernel/dumpstack_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/dumpstack_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -38,15 +38,13 @@ void dump_trace(struct task_struct *task
+diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
+index 1aae78f..aab3a3d 100644
+--- a/arch/x86/kernel/dumpstack.c
++++ b/arch/x86/kernel/dumpstack.c
+@@ -2,6 +2,9 @@
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
+ */
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++#define __INCLUDED_BY_HIDESYM 1
++#endif
+ #include <linux/kallsyms.h>
+ #include <linux/kprobes.h>
+ #include <linux/uaccess.h>
+@@ -35,9 +38,8 @@ void printk_address(unsigned long address, int reliable)
+ static void
+ print_ftrace_graph_addr(unsigned long addr, void *data,
+ const struct stacktrace_ops *ops,
+- struct thread_info *tinfo, int *graph)
++ struct task_struct *task, int *graph)
+ {
+- struct task_struct *task = tinfo->task;
+ unsigned long ret_addr;
+ int index = task->curr_ret_stack;
+
+@@ -58,7 +60,7 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
+ static inline void
+ print_ftrace_graph_addr(unsigned long addr, void *data,
+ const struct stacktrace_ops *ops,
+- struct thread_info *tinfo, int *graph)
++ struct task_struct *task, int *graph)
+ { }
+ #endif
+
+@@ -69,10 +71,8 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
+ * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
+ */
+
+-static inline int valid_stack_ptr(struct thread_info *tinfo,
+- void *p, unsigned int size, void *end)
++static inline int valid_stack_ptr(void *t, void *p, unsigned int size, void *end)
+ {
+- void *t = tinfo;
+ if (end) {
+ if (p < end && p >= (end-THREAD_SIZE))
+ return 1;
+@@ -83,14 +83,14 @@ static inline int valid_stack_ptr(struct thread_info *tinfo,
+ }
+
+ unsigned long
+-print_context_stack(struct thread_info *tinfo,
++print_context_stack(struct task_struct *task, void *stack_start,
+ unsigned long *stack, unsigned long bp,
+ const struct stacktrace_ops *ops, void *data,
+ unsigned long *end, int *graph)
+ {
+ struct stack_frame *frame = (struct stack_frame *)bp;
+
+- while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
++ while (valid_stack_ptr(stack_start, stack, sizeof(*stack), end)) {
+ unsigned long addr;
+
+ addr = *stack;
+@@ -102,7 +102,7 @@ print_context_stack(struct thread_info *tinfo,
+ } else {
+ ops->address(data, addr, 0);
+ }
+- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
++ print_ftrace_graph_addr(addr, data, ops, task, graph);
+ }
+ stack++;
+ }
+@@ -111,7 +111,7 @@ print_context_stack(struct thread_info *tinfo,
+ EXPORT_SYMBOL_GPL(print_context_stack);
+
+ unsigned long
+-print_context_stack_bp(struct thread_info *tinfo,
++print_context_stack_bp(struct task_struct *task, void *stack_start,
+ unsigned long *stack, unsigned long bp,
+ const struct stacktrace_ops *ops, void *data,
+ unsigned long *end, int *graph)
+@@ -119,7 +119,7 @@ print_context_stack_bp(struct thread_info *tinfo,
+ struct stack_frame *frame = (struct stack_frame *)bp;
+ unsigned long *ret_addr = &frame->return_address;
+
+- while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) {
++ while (valid_stack_ptr(stack_start, ret_addr, sizeof(*ret_addr), end)) {
+ unsigned long addr = *ret_addr;
+
+ if (!__kernel_text_address(addr))
+@@ -128,7 +128,7 @@ print_context_stack_bp(struct thread_info *tinfo,
+ ops->address(data, addr, 1);
+ frame = frame->next_frame;
+ ret_addr = &frame->return_address;
+- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
++ print_ftrace_graph_addr(addr, data, ops, task, graph);
+ }
+
+ return (unsigned long)frame;
+@@ -186,7 +186,7 @@ void dump_stack(void)
+
+ bp = stack_frame(current, NULL);
+ printk("Pid: %d, comm: %.20s %s %s %.*s\n",
+- current->pid, current->comm, print_tainted(),
++ task_pid_nr(current), current->comm, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+ init_utsname()->version);
+@@ -222,6 +222,8 @@ unsigned __kprobes long oops_begin(void)
+ }
+ EXPORT_SYMBOL_GPL(oops_begin);
+
++extern void gr_handle_kernel_exploit(void);
++
+ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
+ {
+ if (regs && kexec_should_crash(current))
+@@ -243,7 +245,10 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
+ panic("Fatal exception in interrupt");
+ if (panic_on_oops)
+ panic("Fatal exception");
+- do_exit(signr);
++
++ gr_handle_kernel_exploit();
++
++ do_group_exit(signr);
+ }
+
+ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
+@@ -269,7 +274,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
+
+ show_registers(regs);
+ #ifdef CONFIG_X86_32
+- if (user_mode_vm(regs)) {
++ if (user_mode(regs)) {
+ sp = regs->sp;
+ ss = regs->ss & 0xffff;
+ } else {
+@@ -297,7 +302,7 @@ void die(const char *str, struct pt_regs *regs, long err)
+ unsigned long flags = oops_begin();
+ int sig = SIGSEGV;
+
+- if (!user_mode_vm(regs))
++ if (!user_mode(regs))
+ report_bug(regs->ip, regs);
+
+ if (__die(str, regs, err))
+diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
+index 3b97a80..667ce7a 100644
+--- a/arch/x86/kernel/dumpstack_32.c
++++ b/arch/x86/kernel/dumpstack_32.c
+@@ -38,15 +38,13 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
bp = stack_frame(task, regs);
for (;;) {
@@ -11636,7 +12397,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_32.c linux-3.1.4/arch/x86/kerne
if (ops->stack(data, "IRQ") < 0)
break;
touch_nmi_watchdog();
-@@ -96,21 +94,22 @@ void show_registers(struct pt_regs *regs
+@@ -96,21 +94,22 @@ void show_registers(struct pt_regs *regs)
* When in-kernel, we also print out the stack and code at the
* time of the fault..
*/
@@ -11662,7 +12423,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_32.c linux-3.1.4/arch/x86/kerne
code_len = code_len - code_prologue + 1;
}
for (i = 0; i < code_len; i++, ip++) {
-@@ -119,7 +118,7 @@ void show_registers(struct pt_regs *regs
+@@ -119,7 +118,7 @@ void show_registers(struct pt_regs *regs)
printk(" Bad EIP value.");
break;
}
@@ -11695,10 +12456,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_32.c linux-3.1.4/arch/x86/kerne
+}
+EXPORT_SYMBOL(pax_check_alloca);
+#endif
-diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kernel/dumpstack_64.c
---- linux-3.1.4/arch/x86/kernel/dumpstack_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/dumpstack_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -119,9 +119,9 @@ void dump_trace(struct task_struct *task
+diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
+index 19853ad..508ca79 100644
+--- a/arch/x86/kernel/dumpstack_64.c
++++ b/arch/x86/kernel/dumpstack_64.c
+@@ -119,9 +119,9 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
unsigned long *irq_stack_end =
(unsigned long *)per_cpu(irq_stack_ptr, cpu);
unsigned used = 0;
@@ -11709,7 +12471,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kerne
if (!task)
task = current;
-@@ -142,10 +142,10 @@ void dump_trace(struct task_struct *task
+@@ -142,10 +142,10 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
* current stack address. If the stacks consist of nested
* exceptions
*/
@@ -11721,7 +12483,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kerne
estack_end = in_exception_stack(cpu, (unsigned long)stack,
&used, &id);
-@@ -153,7 +153,7 @@ void dump_trace(struct task_struct *task
+@@ -153,7 +153,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (ops->stack(data, id) < 0)
break;
@@ -11730,7 +12492,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kerne
data, estack_end, &graph);
ops->stack(data, "<EOE>");
/*
-@@ -172,7 +172,7 @@ void dump_trace(struct task_struct *task
+@@ -172,7 +172,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (in_irq_stack(stack, irq_stack, irq_stack_end)) {
if (ops->stack(data, "IRQ") < 0)
break;
@@ -11739,7 +12501,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kerne
ops, data, irq_stack_end, &graph);
/*
* We link to the next stack (which would be
-@@ -191,7 +191,8 @@ void dump_trace(struct task_struct *task
+@@ -191,7 +191,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
/*
* This handles the process stack:
*/
@@ -11800,155 +12562,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack_64.c linux-3.1.4/arch/x86/kerne
+}
+EXPORT_SYMBOL(pax_check_alloca);
+#endif
-diff -urNp linux-3.1.4/arch/x86/kernel/dumpstack.c linux-3.1.4/arch/x86/kernel/dumpstack.c
---- linux-3.1.4/arch/x86/kernel/dumpstack.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/dumpstack.c 2011-11-16 18:40:08.000000000 -0500
-@@ -2,6 +2,9 @@
- * Copyright (C) 1991, 1992 Linus Torvalds
- * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
- */
-+#ifdef CONFIG_GRKERNSEC_HIDESYM
-+#define __INCLUDED_BY_HIDESYM 1
-+#endif
- #include <linux/kallsyms.h>
- #include <linux/kprobes.h>
- #include <linux/uaccess.h>
-@@ -35,9 +38,8 @@ void printk_address(unsigned long addres
- static void
- print_ftrace_graph_addr(unsigned long addr, void *data,
- const struct stacktrace_ops *ops,
-- struct thread_info *tinfo, int *graph)
-+ struct task_struct *task, int *graph)
- {
-- struct task_struct *task = tinfo->task;
- unsigned long ret_addr;
- int index = task->curr_ret_stack;
-
-@@ -58,7 +60,7 @@ print_ftrace_graph_addr(unsigned long ad
- static inline void
- print_ftrace_graph_addr(unsigned long addr, void *data,
- const struct stacktrace_ops *ops,
-- struct thread_info *tinfo, int *graph)
-+ struct task_struct *task, int *graph)
- { }
- #endif
-
-@@ -69,10 +71,8 @@ print_ftrace_graph_addr(unsigned long ad
- * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
- */
-
--static inline int valid_stack_ptr(struct thread_info *tinfo,
-- void *p, unsigned int size, void *end)
-+static inline int valid_stack_ptr(void *t, void *p, unsigned int size, void *end)
- {
-- void *t = tinfo;
- if (end) {
- if (p < end && p >= (end-THREAD_SIZE))
- return 1;
-@@ -83,14 +83,14 @@ static inline int valid_stack_ptr(struct
- }
-
- unsigned long
--print_context_stack(struct thread_info *tinfo,
-+print_context_stack(struct task_struct *task, void *stack_start,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- unsigned long *end, int *graph)
- {
- struct stack_frame *frame = (struct stack_frame *)bp;
-
-- while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
-+ while (valid_stack_ptr(stack_start, stack, sizeof(*stack), end)) {
- unsigned long addr;
-
- addr = *stack;
-@@ -102,7 +102,7 @@ print_context_stack(struct thread_info *
- } else {
- ops->address(data, addr, 0);
- }
-- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
-+ print_ftrace_graph_addr(addr, data, ops, task, graph);
- }
- stack++;
- }
-@@ -111,7 +111,7 @@ print_context_stack(struct thread_info *
- EXPORT_SYMBOL_GPL(print_context_stack);
-
- unsigned long
--print_context_stack_bp(struct thread_info *tinfo,
-+print_context_stack_bp(struct task_struct *task, void *stack_start,
- unsigned long *stack, unsigned long bp,
- const struct stacktrace_ops *ops, void *data,
- unsigned long *end, int *graph)
-@@ -119,7 +119,7 @@ print_context_stack_bp(struct thread_inf
- struct stack_frame *frame = (struct stack_frame *)bp;
- unsigned long *ret_addr = &frame->return_address;
-
-- while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) {
-+ while (valid_stack_ptr(stack_start, ret_addr, sizeof(*ret_addr), end)) {
- unsigned long addr = *ret_addr;
-
- if (!__kernel_text_address(addr))
-@@ -128,7 +128,7 @@ print_context_stack_bp(struct thread_inf
- ops->address(data, addr, 1);
- frame = frame->next_frame;
- ret_addr = &frame->return_address;
-- print_ftrace_graph_addr(addr, data, ops, tinfo, graph);
-+ print_ftrace_graph_addr(addr, data, ops, task, graph);
- }
-
- return (unsigned long)frame;
-@@ -186,7 +186,7 @@ void dump_stack(void)
-
- bp = stack_frame(current, NULL);
- printk("Pid: %d, comm: %.20s %s %s %.*s\n",
-- current->pid, current->comm, print_tainted(),
-+ task_pid_nr(current), current->comm, print_tainted(),
- init_utsname()->release,
- (int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
-@@ -222,6 +222,8 @@ unsigned __kprobes long oops_begin(void)
- }
- EXPORT_SYMBOL_GPL(oops_begin);
-
-+extern void gr_handle_kernel_exploit(void);
-+
- void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
- {
- if (regs && kexec_should_crash(current))
-@@ -243,7 +245,10 @@ void __kprobes oops_end(unsigned long fl
- panic("Fatal exception in interrupt");
- if (panic_on_oops)
- panic("Fatal exception");
-- do_exit(signr);
-+
-+ gr_handle_kernel_exploit();
-+
-+ do_group_exit(signr);
- }
-
- int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-@@ -269,7 +274,7 @@ int __kprobes __die(const char *str, str
-
- show_registers(regs);
- #ifdef CONFIG_X86_32
-- if (user_mode_vm(regs)) {
-+ if (user_mode(regs)) {
- sp = regs->sp;
- ss = regs->ss & 0xffff;
- } else {
-@@ -297,7 +302,7 @@ void die(const char *str, struct pt_regs
- unsigned long flags = oops_begin();
- int sig = SIGSEGV;
-
-- if (!user_mode_vm(regs))
-+ if (!user_mode(regs))
- report_bug(regs->ip, regs);
-
- if (__die(str, regs, err))
-diff -urNp linux-3.1.4/arch/x86/kernel/early_printk.c linux-3.1.4/arch/x86/kernel/early_printk.c
---- linux-3.1.4/arch/x86/kernel/early_printk.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/early_printk.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
+index cd28a35..2601699 100644
+--- a/arch/x86/kernel/early_printk.c
++++ b/arch/x86/kernel/early_printk.c
@@ -7,6 +7,7 @@
#include <linux/pci_regs.h>
#include <linux/pci_ids.h>
@@ -11957,7 +12574,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/early_printk.c linux-3.1.4/arch/x86/kerne
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/fcntl.h>
-@@ -179,6 +180,8 @@ asmlinkage void early_printk(const char
+@@ -179,6 +180,8 @@ asmlinkage void early_printk(const char *fmt, ...)
int n;
va_list ap;
@@ -11966,9 +12583,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/early_printk.c linux-3.1.4/arch/x86/kerne
va_start(ap, fmt);
n = vscnprintf(buf, sizeof(buf), fmt, ap);
early_console->write(early_console, buf, n);
-diff -urNp linux-3.1.4/arch/x86/kernel/entry_32.S linux-3.1.4/arch/x86/kernel/entry_32.S
---- linux-3.1.4/arch/x86/kernel/entry_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/entry_32.S 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
+index f3f6f53..0841b66 100644
+--- a/arch/x86/kernel/entry_32.S
++++ b/arch/x86/kernel/entry_32.S
@@ -186,13 +186,146 @@
/*CFI_REL_OFFSET gs, PT_GS*/
.endm
@@ -12619,7 +13237,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/entry_32.S linux-3.1.4/arch/x86/kernel/en
/*
* End of kprobes section
*/
-@@ -1109,7 +1358,7 @@ BUILD_INTERRUPT3(xen_hvm_callback_vector
+@@ -1109,7 +1358,7 @@ BUILD_INTERRUPT3(xen_hvm_callback_vector, XEN_HVM_EVTCHN_CALLBACK,
ENTRY(mcount)
ret
@@ -12746,9 +13364,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/entry_32.S linux-3.1.4/arch/x86/kernel/en
#endif
/*
-diff -urNp linux-3.1.4/arch/x86/kernel/entry_64.S linux-3.1.4/arch/x86/kernel/entry_64.S
---- linux-3.1.4/arch/x86/kernel/entry_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/entry_64.S 2011-12-02 17:40:13.000000000 -0500
+diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
+index 6419bb0..4f4cf2b 100644
+--- a/arch/x86/kernel/entry_64.S
++++ b/arch/x86/kernel/entry_64.S
@@ -55,6 +55,8 @@
#include <asm/paravirt.h>
#include <asm/ftrace.h>
@@ -13333,7 +13952,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/entry_64.S linux-3.1.4/arch/x86/kernel/en
je retint_kernel
/* Interrupt came from user space */
-@@ -842,12 +1150,16 @@ retint_swapgs: /* return to user-space
+@@ -842,12 +1150,16 @@ retint_swapgs: /* return to user-space */
* The iretq could re-enable interrupts:
*/
DISABLE_INTERRUPTS(CLBR_ANY)
@@ -13554,7 +14173,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/entry_64.S linux-3.1.4/arch/x86/kernel/en
#ifdef CONFIG_XEN
zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
-@@ -1244,7 +1616,7 @@ ENTRY(xen_do_hypervisor_callback) # do
+@@ -1244,7 +1616,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs)
decl PER_CPU_VAR(irq_count)
jmp error_exit
CFI_ENDPROC
@@ -13711,10 +14330,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/entry_64.S linux-3.1.4/arch/x86/kernel/en
/*
* End of kprobes section
-diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftrace.c
---- linux-3.1.4/arch/x86/kernel/ftrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/ftrace.c 2011-11-16 18:39:07.000000000 -0500
-@@ -126,7 +126,7 @@ static void *mod_code_ip; /* holds the
+diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
+index c9a281f..ce2f317 100644
+--- a/arch/x86/kernel/ftrace.c
++++ b/arch/x86/kernel/ftrace.c
+@@ -126,7 +126,7 @@ static void *mod_code_ip; /* holds the IP to write to */
static const void *mod_code_newcode; /* holds the text to write to the IP */
static unsigned nmi_wait_count;
@@ -13723,7 +14343,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftra
int ftrace_arch_read_dyn_info(char *buf, int size)
{
-@@ -134,7 +134,7 @@ int ftrace_arch_read_dyn_info(char *buf,
+@@ -134,7 +134,7 @@ int ftrace_arch_read_dyn_info(char *buf, int size)
r = snprintf(buf, size, "%u %u",
nmi_wait_count,
@@ -13744,7 +14364,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftra
}
/* Must have previous changes seen before executions */
smp_mb();
-@@ -271,6 +273,8 @@ ftrace_modify_code(unsigned long ip, uns
+@@ -271,6 +273,8 @@ ftrace_modify_code(unsigned long ip, unsigned const char *old_code,
{
unsigned char replaced[MCOUNT_INSN_SIZE];
@@ -13753,7 +14373,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftra
/*
* Note: Due to modules and __init, code can
* disappear and change, we need to protect against faulting
-@@ -327,7 +331,7 @@ int ftrace_update_ftrace_func(ftrace_fun
+@@ -327,7 +331,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
unsigned char old[MCOUNT_INSN_SIZE], *new;
int ret;
@@ -13762,7 +14382,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftra
new = ftrace_call_replace(ip, (unsigned long)func);
ret = ftrace_modify_code(ip, old, new);
-@@ -353,6 +357,8 @@ static int ftrace_mod_jmp(unsigned long
+@@ -353,6 +357,8 @@ static int ftrace_mod_jmp(unsigned long ip,
{
unsigned char code[MCOUNT_INSN_SIZE];
@@ -13771,9 +14391,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ftrace.c linux-3.1.4/arch/x86/kernel/ftra
if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
return -EFAULT;
-diff -urNp linux-3.1.4/arch/x86/kernel/head32.c linux-3.1.4/arch/x86/kernel/head32.c
---- linux-3.1.4/arch/x86/kernel/head32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/head32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
+index 3bb0850..55a56f4 100644
+--- a/arch/x86/kernel/head32.c
++++ b/arch/x86/kernel/head32.c
@@ -19,6 +19,7 @@
#include <asm/io_apic.h>
#include <asm/bios_ebda.h>
@@ -13791,9 +14412,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head32.c linux-3.1.4/arch/x86/kernel/head
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
-diff -urNp linux-3.1.4/arch/x86/kernel/head_32.S linux-3.1.4/arch/x86/kernel/head_32.S
---- linux-3.1.4/arch/x86/kernel/head_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/head_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
+index ce0be7c..c41476e 100644
+--- a/arch/x86/kernel/head_32.S
++++ b/arch/x86/kernel/head_32.S
@@ -25,6 +25,12 @@
/* Physical address */
#define pa(X) ((X) - __PAGE_OFFSET)
@@ -13820,7 +14442,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_32.S linux-3.1.4/arch/x86/kernel/hea
/* Number of possible pages in the lowmem region */
LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)
-@@ -77,6 +79,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P
+@@ -77,6 +79,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_PAGES) * PAGE_SIZE
RESERVE_BRK(pagetables, INIT_MAP_SIZE)
/*
@@ -14130,9 +14752,9 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_32.S linux-3.1.4/arch/x86/kernel/hea
ENTRY(stack_start)
- .long init_thread_union+THREAD_SIZE
+ .long init_thread_union+THREAD_SIZE-8
-+
-+ready: .byte 0
++ready: .byte 0
++
+.section .rodata,"a",@progbits
early_recursion_flag:
.long 0
@@ -14228,9 +14850,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_32.S linux-3.1.4/arch/x86/kernel/hea
+ /* Be sure this is zeroed to avoid false validations in Xen */
+ .fill PAGE_SIZE_asm - GDT_SIZE,1,0
+ .endr
-diff -urNp linux-3.1.4/arch/x86/kernel/head_64.S linux-3.1.4/arch/x86/kernel/head_64.S
---- linux-3.1.4/arch/x86/kernel/head_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/head_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
+index e11e394..3d66dfe 100644
+--- a/arch/x86/kernel/head_64.S
++++ b/arch/x86/kernel/head_64.S
@@ -19,6 +19,8 @@
#include <asm/cache.h>
#include <asm/processor-flags.h>
@@ -14240,7 +14863,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_64.S linux-3.1.4/arch/x86/kernel/hea
#ifdef CONFIG_PARAVIRT
#include <asm/asm-offsets.h>
-@@ -38,6 +40,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET
+@@ -38,6 +40,10 @@ L4_PAGE_OFFSET = pgd_index(__PAGE_OFFSET)
L3_PAGE_OFFSET = pud_index(__PAGE_OFFSET)
L4_START_KERNEL = pgd_index(__START_KERNEL_map)
L3_START_KERNEL = pud_index(__START_KERNEL_map)
@@ -14266,12 +14889,9 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_64.S linux-3.1.4/arch/x86/kernel/hea
- addq %rbp, level3_kernel_pgt + (510*8)(%rip)
- addq %rbp, level3_kernel_pgt + (511*8)(%rip)
-+ addq %rbp, level3_vmemmap_pgt + (L3_VMEMMAP_START*8)(%rip)
-
+-
- addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
-+ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8)(%rip)
-+ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8+8)(%rip)
-
+-
- /* Add an Identity mapping if I am above 1G */
- leaq _text(%rip), %rdi
- andq $PMD_PAGE_MASK, %rdi
@@ -14280,11 +14900,14 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_64.S linux-3.1.4/arch/x86/kernel/hea
- shrq $PUD_SHIFT, %rax
- andq $(PTRS_PER_PUD - 1), %rax
- jz ident_complete
--
++ addq %rbp, level3_vmemmap_pgt + (L3_VMEMMAP_START*8)(%rip)
+
- leaq (level2_spare_pgt - __START_KERNEL_map + _KERNPG_TABLE)(%rbp), %rdx
- leaq level3_ident_pgt(%rip), %rbx
- movq %rdx, 0(%rbx, %rax, 8)
--
++ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8)(%rip)
++ addq %rbp, level3_kernel_pgt + (L3_START_KERNEL*8+8)(%rip)
+
- movq %rdi, %rax
- shrq $PMD_SHIFT, %rax
- andq $(PTRS_PER_PMD - 1), %rax
@@ -14511,9 +15134,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/head_64.S linux-3.1.4/arch/x86/kernel/hea
__PAGE_ALIGNED_BSS
.align PAGE_SIZE
-diff -urNp linux-3.1.4/arch/x86/kernel/i386_ksyms_32.c linux-3.1.4/arch/x86/kernel/i386_ksyms_32.c
---- linux-3.1.4/arch/x86/kernel/i386_ksyms_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/i386_ksyms_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c
+index 9c3bd4a..e1d9b35 100644
+--- a/arch/x86/kernel/i386_ksyms_32.c
++++ b/arch/x86/kernel/i386_ksyms_32.c
@@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void);
EXPORT_SYMBOL(cmpxchg8b_emu);
#endif
@@ -14535,9 +15159,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/i386_ksyms_32.c linux-3.1.4/arch/x86/kern
+#ifdef CONFIG_PAX_KERNEXEC
+EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR);
+#endif
-diff -urNp linux-3.1.4/arch/x86/kernel/i8259.c linux-3.1.4/arch/x86/kernel/i8259.c
---- linux-3.1.4/arch/x86/kernel/i8259.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/i8259.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
+index 6104852..6114160 100644
+--- a/arch/x86/kernel/i8259.c
++++ b/arch/x86/kernel/i8259.c
@@ -210,7 +210,7 @@ spurious_8259A_irq:
"spurious 8259A interrupt: IRQ%d.\n", irq);
spurious_irq_mask |= irqmask;
@@ -14547,10 +15172,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/i8259.c linux-3.1.4/arch/x86/kernel/i8259
/*
* Theoretically we do not have to handle this IRQ,
* but in Linux this does not cause problems and is
-diff -urNp linux-3.1.4/arch/x86/kernel/init_task.c linux-3.1.4/arch/x86/kernel/init_task.c
---- linux-3.1.4/arch/x86/kernel/init_task.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/init_task.c 2011-11-16 18:39:07.000000000 -0500
-@@ -20,8 +20,7 @@ static struct sighand_struct init_sighan
+diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
+index 43e9ccf..44ccf6f 100644
+--- a/arch/x86/kernel/init_task.c
++++ b/arch/x86/kernel/init_task.c
+@@ -20,8 +20,7 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
@@ -14568,9 +15194,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/init_task.c linux-3.1.4/arch/x86/kernel/i
-
+struct tss_struct init_tss[NR_CPUS] ____cacheline_internodealigned_in_smp = { [0 ... NR_CPUS-1] = INIT_TSS };
+EXPORT_SYMBOL(init_tss);
-diff -urNp linux-3.1.4/arch/x86/kernel/ioport.c linux-3.1.4/arch/x86/kernel/ioport.c
---- linux-3.1.4/arch/x86/kernel/ioport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/ioport.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
+index 8c96897..be66bfa 100644
+--- a/arch/x86/kernel/ioport.c
++++ b/arch/x86/kernel/ioport.c
@@ -6,6 +6,7 @@
#include <linux/sched.h>
#include <linux/kernel.h>
@@ -14579,7 +15206,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ioport.c linux-3.1.4/arch/x86/kernel/iopo
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/ioport.h>
-@@ -28,6 +29,12 @@ asmlinkage long sys_ioperm(unsigned long
+@@ -28,6 +29,12 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
if ((from + num <= from) || (from + num > IO_BITMAP_BITS))
return -EINVAL;
@@ -14592,7 +15219,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ioport.c linux-3.1.4/arch/x86/kernel/iopo
if (turn_on && !capable(CAP_SYS_RAWIO))
return -EPERM;
-@@ -54,7 +61,7 @@ asmlinkage long sys_ioperm(unsigned long
+@@ -54,7 +61,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
* because the ->io_bitmap_max value must match the bitmap
* contents:
*/
@@ -14601,7 +15228,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ioport.c linux-3.1.4/arch/x86/kernel/iopo
if (turn_on)
bitmap_clear(t->io_bitmap_ptr, from, num);
-@@ -102,6 +109,12 @@ long sys_iopl(unsigned int level, struct
+@@ -102,6 +109,12 @@ long sys_iopl(unsigned int level, struct pt_regs *regs)
return -EINVAL;
/* Trying to gain more privileges? */
if (level > old) {
@@ -14614,9 +15241,48 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ioport.c linux-3.1.4/arch/x86/kernel/iopo
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_32.c
---- linux-3.1.4/arch/x86/kernel/irq_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/irq_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
+index 6c0802e..bea25ae 100644
+--- a/arch/x86/kernel/irq.c
++++ b/arch/x86/kernel/irq.c
+@@ -17,7 +17,7 @@
+ #include <asm/mce.h>
+ #include <asm/hw_irq.h>
+
+-atomic_t irq_err_count;
++atomic_unchecked_t irq_err_count;
+
+ /* Function pointer for generic interrupt vector handling */
+ void (*x86_platform_ipi_callback)(void) = NULL;
+@@ -116,9 +116,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
+ seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
+ seq_printf(p, " Machine check polls\n");
+ #endif
+- seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
++ seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read_unchecked(&irq_err_count));
+ #if defined(CONFIG_X86_IO_APIC)
+- seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
++ seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read_unchecked(&irq_mis_count));
+ #endif
+ return 0;
+ }
+@@ -158,10 +158,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
+
+ u64 arch_irq_stat(void)
+ {
+- u64 sum = atomic_read(&irq_err_count);
++ u64 sum = atomic_read_unchecked(&irq_err_count);
+
+ #ifdef CONFIG_X86_IO_APIC
+- sum += atomic_read(&irq_mis_count);
++ sum += atomic_read_unchecked(&irq_mis_count);
+ #endif
+ return sum;
+ }
+diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
+index 7209070..cbcd71a 100644
+--- a/arch/x86/kernel/irq_32.c
++++ b/arch/x86/kernel/irq_32.c
@@ -36,7 +36,7 @@ static int check_stack_overflow(void)
__asm__ __volatile__("andl %%esp,%0" :
"=r" (sp) : "0" (THREAD_SIZE - 1));
@@ -14626,7 +15292,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
}
static void print_stack_overflow(void)
-@@ -54,8 +54,8 @@ static inline void print_stack_overflow(
+@@ -54,8 +54,8 @@ static inline void print_stack_overflow(void) { }
* per-CPU IRQ handling contexts (thread information and stack)
*/
union irq_ctx {
@@ -14637,7 +15303,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
} __attribute__((aligned(THREAD_SIZE)));
static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx);
-@@ -75,10 +75,9 @@ static void call_on_stack(void *func, vo
+@@ -75,10 +75,9 @@ static void call_on_stack(void *func, void *stack)
static inline int
execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
{
@@ -14649,7 +15315,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
irqctx = __this_cpu_read(hardirq_ctx);
/*
-@@ -87,21 +86,16 @@ execute_on_irq_stack(int overflow, struc
+@@ -87,21 +86,16 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
* handler) we can't do that and just have to keep using the
* current stack (which is the irq stack already after all)
*/
@@ -14677,7 +15343,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
if (unlikely(overflow))
call_on_stack(print_stack_overflow, isp);
-@@ -113,6 +107,11 @@ execute_on_irq_stack(int overflow, struc
+@@ -113,6 +107,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
: "0" (irq), "1" (desc), "2" (isp),
"D" (desc->handle_irq)
: "memory", "cc", "ecx");
@@ -14689,7 +15355,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
return 1;
}
-@@ -121,29 +120,11 @@ execute_on_irq_stack(int overflow, struc
+@@ -121,29 +120,11 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
*/
void __cpuinit irq_ctx_init(int cpu)
{
@@ -14756,47 +15422,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/irq_32.c linux-3.1.4/arch/x86/kernel/irq_
/*
* Shouldn't happen, we returned above if in_interrupt():
*/
-diff -urNp linux-3.1.4/arch/x86/kernel/irq.c linux-3.1.4/arch/x86/kernel/irq.c
---- linux-3.1.4/arch/x86/kernel/irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -17,7 +17,7 @@
- #include <asm/mce.h>
- #include <asm/hw_irq.h>
-
--atomic_t irq_err_count;
-+atomic_unchecked_t irq_err_count;
-
- /* Function pointer for generic interrupt vector handling */
- void (*x86_platform_ipi_callback)(void) = NULL;
-@@ -116,9 +116,9 @@ int arch_show_interrupts(struct seq_file
- seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
- seq_printf(p, " Machine check polls\n");
- #endif
-- seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
-+ seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read_unchecked(&irq_err_count));
- #if defined(CONFIG_X86_IO_APIC)
-- seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
-+ seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read_unchecked(&irq_mis_count));
- #endif
- return 0;
- }
-@@ -158,10 +158,10 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
-
- u64 arch_irq_stat(void)
- {
-- u64 sum = atomic_read(&irq_err_count);
-+ u64 sum = atomic_read_unchecked(&irq_err_count);
-
- #ifdef CONFIG_X86_IO_APIC
-- sum += atomic_read(&irq_mis_count);
-+ sum += atomic_read_unchecked(&irq_mis_count);
- #endif
- return sum;
- }
-diff -urNp linux-3.1.4/arch/x86/kernel/kgdb.c linux-3.1.4/arch/x86/kernel/kgdb.c
---- linux-3.1.4/arch/x86/kernel/kgdb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/kgdb.c 2011-11-16 18:39:07.000000000 -0500
-@@ -124,11 +124,11 @@ char *dbg_get_reg(int regno, void *mem,
+diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
+index 00354d4..187ae44 100644
+--- a/arch/x86/kernel/kgdb.c
++++ b/arch/x86/kernel/kgdb.c
+@@ -124,11 +124,11 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
#ifdef CONFIG_X86_32
switch (regno) {
case GDB_SS:
@@ -14810,7 +15440,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kgdb.c linux-3.1.4/arch/x86/kernel/kgdb.c
*(unsigned long *)mem = kernel_stack_pointer(regs);
break;
case GDB_GS:
-@@ -473,12 +473,12 @@ int kgdb_arch_handle_exception(int e_vec
+@@ -473,12 +473,12 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
case 'k':
/* clear the trace bit */
linux_regs->flags &= ~X86_EFLAGS_TF;
@@ -14825,7 +15455,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kgdb.c linux-3.1.4/arch/x86/kernel/kgdb.c
raw_smp_processor_id());
}
-@@ -534,7 +534,7 @@ static int __kgdb_notify(struct die_args
+@@ -534,7 +534,7 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd)
return NOTIFY_DONE;
case DIE_DEBUG:
@@ -14834,10 +15464,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kgdb.c linux-3.1.4/arch/x86/kernel/kgdb.c
if (user_mode(regs))
return single_step_cont(regs, args);
break;
-diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kprobes.c
---- linux-3.1.4/arch/x86/kernel/kprobes.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/kprobes.c 2011-11-16 18:39:07.000000000 -0500
-@@ -117,8 +117,11 @@ static void __kprobes __synthesize_relat
+diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
+index 794bc95..c6e29e9 100644
+--- a/arch/x86/kernel/kprobes.c
++++ b/arch/x86/kernel/kprobes.c
+@@ -117,8 +117,11 @@ static void __kprobes __synthesize_relative_insn(void *from, void *to, u8 op)
} __attribute__((packed)) *insn;
insn = (struct __arch_relative_insn *)from;
@@ -14849,7 +15480,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
}
/* Insert a jump instruction at address 'from', which jumps to address 'to'.*/
-@@ -155,7 +158,7 @@ static int __kprobes can_boost(kprobe_op
+@@ -155,7 +158,7 @@ static int __kprobes can_boost(kprobe_opcode_t *opcodes)
kprobe_opcode_t opcode;
kprobe_opcode_t *orig_opcodes = opcodes;
@@ -14858,7 +15489,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
return 0; /* Page fault may occur on this address. */
retry:
-@@ -316,7 +319,9 @@ static int __kprobes __copy_instruction(
+@@ -316,7 +319,9 @@ static int __kprobes __copy_instruction(u8 *dest, u8 *src, int recover)
}
}
insn_get_length(&insn);
@@ -14868,7 +15499,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
#ifdef CONFIG_X86_64
if (insn_rip_relative(&insn)) {
-@@ -340,7 +345,9 @@ static int __kprobes __copy_instruction(
+@@ -340,7 +345,9 @@ static int __kprobes __copy_instruction(u8 *dest, u8 *src, int recover)
(u8 *) dest;
BUG_ON((s64) (s32) newdisp != newdisp); /* Sanity check. */
disp = (u8 *) dest + insn_offset_displacement(&insn);
@@ -14878,7 +15509,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
}
#endif
return insn.length;
-@@ -354,12 +361,12 @@ static void __kprobes arch_copy_kprobe(s
+@@ -354,12 +361,12 @@ static void __kprobes arch_copy_kprobe(struct kprobe *p)
*/
__copy_instruction(p->ainsn.insn, p->addr, 0);
@@ -14893,7 +15524,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
}
int __kprobes arch_prepare_kprobe(struct kprobe *p)
-@@ -476,7 +483,7 @@ static void __kprobes setup_singlestep(s
+@@ -476,7 +483,7 @@ static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs,
* nor set current_kprobe, because it doesn't use single
* stepping.
*/
@@ -14902,7 +15533,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
preempt_enable_no_resched();
return;
}
-@@ -495,7 +502,7 @@ static void __kprobes setup_singlestep(s
+@@ -495,7 +502,7 @@ static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs,
if (p->opcode == BREAKPOINT_INSTRUCTION)
regs->ip = (unsigned long)p->addr;
else
@@ -14911,7 +15542,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
}
/*
-@@ -574,7 +581,7 @@ static int __kprobes kprobe_handler(stru
+@@ -574,7 +581,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
setup_singlestep(p, regs, kcb, 0);
return 1;
}
@@ -14920,7 +15551,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
/*
* The breakpoint instruction was removed right
* after we hit it. Another cpu has removed
-@@ -682,6 +689,9 @@ static void __used __kprobes kretprobe_t
+@@ -682,6 +689,9 @@ static void __used __kprobes kretprobe_trampoline_holder(void)
" movq %rax, 152(%rsp)\n"
RESTORE_REGS_STRING
" popfq\n"
@@ -14930,7 +15561,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
#else
" pushf\n"
SAVE_REGS_STRING
-@@ -819,7 +829,7 @@ static void __kprobes resume_execution(s
+@@ -819,7 +829,7 @@ static void __kprobes resume_execution(struct kprobe *p,
struct pt_regs *regs, struct kprobe_ctlblk *kcb)
{
unsigned long *tos = stack_addr(regs);
@@ -14939,7 +15570,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
unsigned long orig_ip = (unsigned long)p->addr;
kprobe_opcode_t *insn = p->ainsn.insn;
-@@ -1001,7 +1011,7 @@ int __kprobes kprobe_exceptions_notify(s
+@@ -1001,7 +1011,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
struct die_args *args = data;
int ret = NOTIFY_DONE;
@@ -14948,7 +15579,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
return ret;
switch (val) {
-@@ -1383,7 +1393,7 @@ int __kprobes arch_prepare_optimized_kpr
+@@ -1383,7 +1393,7 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
* Verify if the address gap is in 2GB range, because this uses
* a relative jump.
*/
@@ -14957,7 +15588,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
if (abs(rel) > 0x7fffffff)
return -ERANGE;
-@@ -1404,11 +1414,11 @@ int __kprobes arch_prepare_optimized_kpr
+@@ -1404,11 +1414,11 @@ int __kprobes arch_prepare_optimized_kprobe(struct optimized_kprobe *op)
synthesize_set_arg1(buf + TMPL_MOVE_IDX, (unsigned long)op);
/* Set probe function call */
@@ -14971,7 +15602,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
flush_icache_range((unsigned long) buf,
(unsigned long) buf + TMPL_END_IDX +
-@@ -1430,7 +1440,7 @@ static void __kprobes setup_optimize_kpr
+@@ -1430,7 +1440,7 @@ static void __kprobes setup_optimize_kprobe(struct text_poke_param *tprm,
((long)op->kp.addr + RELATIVEJUMP_SIZE));
/* Backup instructions which will be replaced by jump address */
@@ -14980,10 +15611,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kprobes.c linux-3.1.4/arch/x86/kernel/kpr
RELATIVE_ADDR_SIZE);
insn_buf[0] = RELATIVEJUMP_OPCODE;
-diff -urNp linux-3.1.4/arch/x86/kernel/kvm.c linux-3.1.4/arch/x86/kernel/kvm.c
---- linux-3.1.4/arch/x86/kernel/kvm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/kvm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -437,6 +437,7 @@ static void __init paravirt_ops_setup(vo
+diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
+index a9c2116..a52d4fc 100644
+--- a/arch/x86/kernel/kvm.c
++++ b/arch/x86/kernel/kvm.c
+@@ -437,6 +437,7 @@ static void __init paravirt_ops_setup(void)
pv_mmu_ops.set_pud = kvm_set_pud;
#if PAGETABLE_LEVELS == 4
pv_mmu_ops.set_pgd = kvm_set_pgd;
@@ -14991,10 +15623,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/kvm.c linux-3.1.4/arch/x86/kernel/kvm.c
#endif
#endif
pv_mmu_ops.flush_tlb_user = kvm_flush_tlb;
-diff -urNp linux-3.1.4/arch/x86/kernel/ldt.c linux-3.1.4/arch/x86/kernel/ldt.c
---- linux-3.1.4/arch/x86/kernel/ldt.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/ldt.c 2011-11-16 18:39:07.000000000 -0500
-@@ -67,13 +67,13 @@ static int alloc_ldt(mm_context_t *pc, i
+diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
+index ea69726..604d066 100644
+--- a/arch/x86/kernel/ldt.c
++++ b/arch/x86/kernel/ldt.c
+@@ -67,13 +67,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
if (reload) {
#ifdef CONFIG_SMP
preempt_disable();
@@ -15010,7 +15643,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ldt.c linux-3.1.4/arch/x86/kernel/ldt.c
#endif
}
if (oldsize) {
-@@ -95,7 +95,7 @@ static inline int copy_ldt(mm_context_t
+@@ -95,7 +95,7 @@ static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
return err;
for (i = 0; i < old->size; i++)
@@ -15019,7 +15652,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ldt.c linux-3.1.4/arch/x86/kernel/ldt.c
return 0;
}
-@@ -116,6 +116,24 @@ int init_new_context(struct task_struct
+@@ -116,6 +116,24 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
retval = copy_ldt(&mm->context, &old_mm->context);
mutex_unlock(&old_mm->context.lock);
}
@@ -15044,7 +15677,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ldt.c linux-3.1.4/arch/x86/kernel/ldt.c
return retval;
}
-@@ -230,6 +248,13 @@ static int write_ldt(void __user *ptr, u
+@@ -230,6 +248,13 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
}
}
@@ -15058,9 +15691,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ldt.c linux-3.1.4/arch/x86/kernel/ldt.c
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;
-diff -urNp linux-3.1.4/arch/x86/kernel/machine_kexec_32.c linux-3.1.4/arch/x86/kernel/machine_kexec_32.c
---- linux-3.1.4/arch/x86/kernel/machine_kexec_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/machine_kexec_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
+index a3fa43b..8966f4c 100644
+--- a/arch/x86/kernel/machine_kexec_32.c
++++ b/arch/x86/kernel/machine_kexec_32.c
@@ -27,7 +27,7 @@
#include <asm/cacheflush.h>
#include <asm/debugreg.h>
@@ -15070,7 +15704,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/machine_kexec_32.c linux-3.1.4/arch/x86/k
{
struct desc_ptr curidt;
-@@ -39,7 +39,7 @@ static void set_idt(void *newidt, __u16
+@@ -39,7 +39,7 @@ static void set_idt(void *newidt, __u16 limit)
}
@@ -15088,10 +15722,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/machine_kexec_32.c linux-3.1.4/arch/x86/k
relocate_kernel_ptr = control_page;
page_list[PA_CONTROL_PAGE] = __pa(control_page);
-diff -urNp linux-3.1.4/arch/x86/kernel/microcode_intel.c linux-3.1.4/arch/x86/kernel/microcode_intel.c
---- linux-3.1.4/arch/x86/kernel/microcode_intel.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/microcode_intel.c 2011-11-16 18:39:07.000000000 -0500
-@@ -440,13 +440,13 @@ static enum ucode_state request_microcod
+diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
+index 1a1b606..5c89b55 100644
+--- a/arch/x86/kernel/microcode_intel.c
++++ b/arch/x86/kernel/microcode_intel.c
+@@ -440,13 +440,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
static int get_ucode_user(void *to, const void *from, size_t n)
{
@@ -15107,9 +15742,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/microcode_intel.c linux-3.1.4/arch/x86/ke
}
static void microcode_fini_cpu(int cpu)
-diff -urNp linux-3.1.4/arch/x86/kernel/module.c linux-3.1.4/arch/x86/kernel/module.c
---- linux-3.1.4/arch/x86/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/module.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
+index 925179f..85bec6c 100644
+--- a/arch/x86/kernel/module.c
++++ b/arch/x86/kernel/module.c
@@ -36,15 +36,60 @@
#define DEBUGP(fmt...)
#endif
@@ -15211,7 +15847,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/module.c linux-3.1.4/arch/x86/kernel/modu
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
-@@ -120,21 +171,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
+@@ -120,21 +171,30 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
case R_X86_64_NONE:
break;
case R_X86_64_64:
@@ -15242,9 +15878,23 @@ diff -urNp linux-3.1.4/arch/x86/kernel/module.c linux-3.1.4/arch/x86/kernel/modu
#if 0
if ((s64)val != *(s32 *)loc)
goto overflow;
-diff -urNp linux-3.1.4/arch/x86/kernel/paravirt.c linux-3.1.4/arch/x86/kernel/paravirt.c
---- linux-3.1.4/arch/x86/kernel/paravirt.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/paravirt.c 2011-11-17 18:29:42.000000000 -0500
+diff --git a/arch/x86/kernel/paravirt-spinlocks.c b/arch/x86/kernel/paravirt-spinlocks.c
+index 676b8c7..870ba04 100644
+--- a/arch/x86/kernel/paravirt-spinlocks.c
++++ b/arch/x86/kernel/paravirt-spinlocks.c
+@@ -13,7 +13,7 @@ default_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
+ arch_spin_lock(lock);
+ }
+
+-struct pv_lock_ops pv_lock_ops = {
++struct pv_lock_ops pv_lock_ops __read_only = {
+ #ifdef CONFIG_SMP
+ .spin_is_locked = __ticket_spin_is_locked,
+ .spin_is_contended = __ticket_spin_is_contended,
+diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
+index d90272e..2d54e8e 100644
+--- a/arch/x86/kernel/paravirt.c
++++ b/arch/x86/kernel/paravirt.c
@@ -53,6 +53,9 @@ u64 _paravirt_ident_64(u64 x)
{
return x;
@@ -15255,7 +15905,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/paravirt.c linux-3.1.4/arch/x86/kernel/pa
void __init default_banner(void)
{
-@@ -133,6 +136,9 @@ static void *get_call_destination(u8 typ
+@@ -133,6 +136,9 @@ static void *get_call_destination(u8 type)
.pv_lock_ops = pv_lock_ops,
#endif
};
@@ -15265,7 +15915,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/paravirt.c linux-3.1.4/arch/x86/kernel/pa
return *((void **)&tmpl + type);
}
-@@ -145,15 +151,19 @@ unsigned paravirt_patch_default(u8 type,
+@@ -145,15 +151,19 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
@@ -15288,7 +15938,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/paravirt.c linux-3.1.4/arch/x86/kernel/pa
else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
type == PARAVIRT_PATCH(pv_cpu_ops.irq_enable_sysexit) ||
-@@ -178,7 +188,7 @@ unsigned paravirt_patch_insns(void *insn
+@@ -178,7 +188,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
if (insn_len > len || start == NULL)
insn_len = len;
else
@@ -15386,21 +16036,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/paravirt.c linux-3.1.4/arch/x86/kernel/pa
};
EXPORT_SYMBOL_GPL(pv_time_ops);
-diff -urNp linux-3.1.4/arch/x86/kernel/paravirt-spinlocks.c linux-3.1.4/arch/x86/kernel/paravirt-spinlocks.c
---- linux-3.1.4/arch/x86/kernel/paravirt-spinlocks.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/paravirt-spinlocks.c 2011-11-16 18:39:07.000000000 -0500
-@@ -13,7 +13,7 @@ default_spin_lock_flags(arch_spinlock_t
- arch_spin_lock(lock);
- }
-
--struct pv_lock_ops pv_lock_ops = {
-+struct pv_lock_ops pv_lock_ops __read_only = {
- #ifdef CONFIG_SMP
- .spin_is_locked = __ticket_spin_is_locked,
- .spin_is_contended = __ticket_spin_is_contended,
-diff -urNp linux-3.1.4/arch/x86/kernel/pci-iommu_table.c linux-3.1.4/arch/x86/kernel/pci-iommu_table.c
---- linux-3.1.4/arch/x86/kernel/pci-iommu_table.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/pci-iommu_table.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/pci-iommu_table.c b/arch/x86/kernel/pci-iommu_table.c
+index 35ccf75..67e7d4d 100644
+--- a/arch/x86/kernel/pci-iommu_table.c
++++ b/arch/x86/kernel/pci-iommu_table.c
@@ -2,7 +2,7 @@
#include <asm/iommu_table.h>
#include <linux/string.h>
@@ -15410,7 +16049,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/pci-iommu_table.c linux-3.1.4/arch/x86/ke
#define DEBUG 1
-@@ -51,6 +51,8 @@ void __init check_iommu_entries(struct i
+@@ -51,6 +51,8 @@ void __init check_iommu_entries(struct iommu_table_entry *start,
{
struct iommu_table_entry *p, *q, *x;
@@ -15419,10 +16058,152 @@ diff -urNp linux-3.1.4/arch/x86/kernel/pci-iommu_table.c linux-3.1.4/arch/x86/ke
/* Simple cyclic dependency checker. */
for (p = start; p < finish; p++) {
q = find_dependents_of(start, finish, p);
-diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/process_32.c
---- linux-3.1.4/arch/x86/kernel/process_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/process_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -66,6 +66,7 @@ asmlinkage void ret_from_fork(void) __as
+diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
+index e7e3b01..43c5af3 100644
+--- a/arch/x86/kernel/process.c
++++ b/arch/x86/kernel/process.c
+@@ -48,16 +48,33 @@ void free_thread_xstate(struct task_struct *tsk)
+
+ void free_thread_info(struct thread_info *ti)
+ {
+- free_thread_xstate(ti->task);
+ free_pages((unsigned long)ti, get_order(THREAD_SIZE));
+ }
+
++static struct kmem_cache *task_struct_cachep;
++
+ void arch_task_cache_init(void)
+ {
+- task_xstate_cachep =
+- kmem_cache_create("task_xstate", xstate_size,
++ /* create a slab on which task_structs can be allocated */
++ task_struct_cachep =
++ kmem_cache_create("task_struct", sizeof(struct task_struct),
++ ARCH_MIN_TASKALIGN, SLAB_PANIC | SLAB_NOTRACK, NULL);
++
++ task_xstate_cachep =
++ kmem_cache_create("task_xstate", xstate_size,
+ __alignof__(union thread_xstate),
+- SLAB_PANIC | SLAB_NOTRACK, NULL);
++ SLAB_PANIC | SLAB_NOTRACK | SLAB_USERCOPY, NULL);
++}
++
++struct task_struct *alloc_task_struct_node(int node)
++{
++ return kmem_cache_alloc_node(task_struct_cachep, GFP_KERNEL, node);
++}
++
++void free_task_struct(struct task_struct *task)
++{
++ free_thread_xstate(task);
++ kmem_cache_free(task_struct_cachep, task);
+ }
+
+ /*
+@@ -70,7 +87,7 @@ void exit_thread(void)
+ unsigned long *bp = t->io_bitmap_ptr;
+
+ if (bp) {
+- struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
++ struct tss_struct *tss = init_tss + get_cpu();
+
+ t->io_bitmap_ptr = NULL;
+ clear_thread_flag(TIF_IO_BITMAP);
+@@ -106,7 +123,7 @@ void show_regs_common(void)
+
+ printk(KERN_CONT "\n");
+ printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s",
+- current->pid, current->comm, print_tainted(),
++ task_pid_nr(current), current->comm, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+ init_utsname()->version);
+@@ -120,6 +137,9 @@ void flush_thread(void)
+ {
+ struct task_struct *tsk = current;
+
++#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_PAX_MEMORY_UDEREF)
++ loadsegment(gs, 0);
++#endif
+ flush_ptrace_hw_breakpoint(tsk);
+ memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
+ /*
+@@ -282,10 +302,10 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
+ regs.di = (unsigned long) arg;
+
+ #ifdef CONFIG_X86_32
+- regs.ds = __USER_DS;
+- regs.es = __USER_DS;
++ regs.ds = __KERNEL_DS;
++ regs.es = __KERNEL_DS;
+ regs.fs = __KERNEL_PERCPU;
+- regs.gs = __KERNEL_STACK_CANARY;
++ savesegment(gs, regs.gs);
+ #else
+ regs.ss = __KERNEL_DS;
+ #endif
+@@ -403,7 +423,7 @@ void default_idle(void)
+ EXPORT_SYMBOL(default_idle);
+ #endif
+
+-void stop_this_cpu(void *dummy)
++__noreturn void stop_this_cpu(void *dummy)
+ {
+ local_irq_disable();
+ /*
+@@ -645,16 +665,37 @@ static int __init idle_setup(char *str)
+ }
+ early_param("idle", idle_setup);
+
+-unsigned long arch_align_stack(unsigned long sp)
++#ifdef CONFIG_PAX_RANDKSTACK
++void pax_randomize_kstack(struct pt_regs *regs)
+ {
+- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+- sp -= get_random_int() % 8192;
+- return sp & ~0xf;
+-}
++ struct thread_struct *thread = &current->thread;
++ unsigned long time;
+
+-unsigned long arch_randomize_brk(struct mm_struct *mm)
+-{
+- unsigned long range_end = mm->brk + 0x02000000;
+- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+-}
++ if (!randomize_va_space)
++ return;
++
++ if (v8086_mode(regs))
++ return;
+
++ rdtscl(time);
++
++ /* P4 seems to return a 0 LSB, ignore it */
++#ifdef CONFIG_MPENTIUM4
++ time &= 0x3EUL;
++ time <<= 2;
++#elif defined(CONFIG_X86_64)
++ time &= 0xFUL;
++ time <<= 4;
++#else
++ time &= 0x1FUL;
++ time <<= 3;
++#endif
++
++ thread->sp0 ^= time;
++ load_sp0(init_tss + smp_processor_id(), thread);
++
++#ifdef CONFIG_X86_64
++ percpu_write(kernel_stack, thread->sp0);
++#endif
++}
++#endif
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index 7a3b651..5a946f6 100644
+--- a/arch/x86/kernel/process_32.c
++++ b/arch/x86/kernel/process_32.c
+@@ -66,6 +66,7 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
unsigned long thread_saved_pc(struct task_struct *tsk)
{
return ((unsigned long *)tsk->thread.sp)[3];
@@ -15430,7 +16211,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
}
#ifndef CONFIG_SMP
-@@ -128,15 +129,14 @@ void __show_regs(struct pt_regs *regs, i
+@@ -128,15 +129,14 @@ void __show_regs(struct pt_regs *regs, int all)
unsigned long sp;
unsigned short ss, gs;
@@ -15448,7 +16229,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
show_regs_common();
-@@ -198,13 +198,14 @@ int copy_thread(unsigned long clone_flag
+@@ -198,13 +198,14 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
struct task_struct *tsk;
int err;
@@ -15464,7 +16245,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
p->thread.ip = (unsigned long) ret_from_fork;
-@@ -294,7 +295,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -294,7 +295,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
struct thread_struct *prev = &prev_p->thread,
*next = &next_p->thread;
int cpu = smp_processor_id();
@@ -15473,7 +16254,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
bool preload_fpu;
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
-@@ -329,6 +330,10 @@ __switch_to(struct task_struct *prev_p,
+@@ -329,6 +330,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
*/
lazy_save_gs(prev->gs);
@@ -15484,7 +16265,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
/*
* Load the per-thread Thread-Local Storage descriptor.
*/
-@@ -364,6 +369,9 @@ __switch_to(struct task_struct *prev_p,
+@@ -364,6 +369,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
*/
arch_end_context_switch(next_p);
@@ -15494,7 +16275,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
if (preload_fpu)
__math_state_restore();
-@@ -373,8 +381,6 @@ __switch_to(struct task_struct *prev_p,
+@@ -373,8 +381,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
if (prev->gs | next->gs)
lazy_load_gs(next->gs);
@@ -15503,14 +16284,15 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_32.c linux-3.1.4/arch/x86/kernel/
return prev_p;
}
-@@ -404,4 +410,3 @@ unsigned long get_wchan(struct task_stru
+@@ -404,4 +410,3 @@ unsigned long get_wchan(struct task_struct *p)
} while (count++ < 16);
return 0;
}
-
-diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/process_64.c
---- linux-3.1.4/arch/x86/kernel/process_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/process_64.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
+index f693e44..3c979b2 100644
+--- a/arch/x86/kernel/process_64.c
++++ b/arch/x86/kernel/process_64.c
@@ -88,7 +88,7 @@ static void __exit_idle(void)
void exit_idle(void)
{
@@ -15520,7 +16302,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
return;
__exit_idle();
}
-@@ -262,8 +262,7 @@ int copy_thread(unsigned long clone_flag
+@@ -262,8 +262,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
struct pt_regs *childregs;
struct task_struct *me = current;
@@ -15530,7 +16312,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
*childregs = *regs;
childregs->ax = 0;
-@@ -275,6 +274,7 @@ int copy_thread(unsigned long clone_flag
+@@ -275,6 +274,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
p->thread.sp = (unsigned long) childregs;
p->thread.sp0 = (unsigned long) (childregs+1);
p->thread.usersp = me->thread.usersp;
@@ -15538,7 +16320,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
set_tsk_thread_flag(p, TIF_FORK);
-@@ -377,7 +377,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -377,7 +377,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
@@ -15547,7 +16329,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
unsigned fsindex, gsindex;
bool preload_fpu;
-@@ -473,10 +473,9 @@ __switch_to(struct task_struct *prev_p,
+@@ -473,10 +473,9 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
prev->usersp = percpu_read(old_rsp);
percpu_write(old_rsp, next->usersp);
percpu_write(current_task, next_p);
@@ -15560,7 +16342,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
/*
* Now maybe reload the debug registers and handle I/O bitmaps
-@@ -538,12 +537,11 @@ unsigned long get_wchan(struct task_stru
+@@ -538,12 +537,11 @@ unsigned long get_wchan(struct task_struct *p)
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
@@ -15575,150 +16357,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/process_64.c linux-3.1.4/arch/x86/kernel/
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
-diff -urNp linux-3.1.4/arch/x86/kernel/process.c linux-3.1.4/arch/x86/kernel/process.c
---- linux-3.1.4/arch/x86/kernel/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/process.c 2011-11-16 18:39:07.000000000 -0500
-@@ -48,16 +48,33 @@ void free_thread_xstate(struct task_stru
-
- void free_thread_info(struct thread_info *ti)
- {
-- free_thread_xstate(ti->task);
- free_pages((unsigned long)ti, get_order(THREAD_SIZE));
- }
-
-+static struct kmem_cache *task_struct_cachep;
-+
- void arch_task_cache_init(void)
- {
-- task_xstate_cachep =
-- kmem_cache_create("task_xstate", xstate_size,
-+ /* create a slab on which task_structs can be allocated */
-+ task_struct_cachep =
-+ kmem_cache_create("task_struct", sizeof(struct task_struct),
-+ ARCH_MIN_TASKALIGN, SLAB_PANIC | SLAB_NOTRACK, NULL);
-+
-+ task_xstate_cachep =
-+ kmem_cache_create("task_xstate", xstate_size,
- __alignof__(union thread_xstate),
-- SLAB_PANIC | SLAB_NOTRACK, NULL);
-+ SLAB_PANIC | SLAB_NOTRACK | SLAB_USERCOPY, NULL);
-+}
-+
-+struct task_struct *alloc_task_struct_node(int node)
-+{
-+ return kmem_cache_alloc_node(task_struct_cachep, GFP_KERNEL, node);
-+}
-+
-+void free_task_struct(struct task_struct *task)
-+{
-+ free_thread_xstate(task);
-+ kmem_cache_free(task_struct_cachep, task);
- }
-
- /*
-@@ -70,7 +87,7 @@ void exit_thread(void)
- unsigned long *bp = t->io_bitmap_ptr;
-
- if (bp) {
-- struct tss_struct *tss = &per_cpu(init_tss, get_cpu());
-+ struct tss_struct *tss = init_tss + get_cpu();
-
- t->io_bitmap_ptr = NULL;
- clear_thread_flag(TIF_IO_BITMAP);
-@@ -106,7 +123,7 @@ void show_regs_common(void)
-
- printk(KERN_CONT "\n");
- printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s",
-- current->pid, current->comm, print_tainted(),
-+ task_pid_nr(current), current->comm, print_tainted(),
- init_utsname()->release,
- (int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
-@@ -120,6 +137,9 @@ void flush_thread(void)
- {
- struct task_struct *tsk = current;
-
-+#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_PAX_MEMORY_UDEREF)
-+ loadsegment(gs, 0);
-+#endif
- flush_ptrace_hw_breakpoint(tsk);
- memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
- /*
-@@ -282,10 +302,10 @@ int kernel_thread(int (*fn)(void *), voi
- regs.di = (unsigned long) arg;
-
- #ifdef CONFIG_X86_32
-- regs.ds = __USER_DS;
-- regs.es = __USER_DS;
-+ regs.ds = __KERNEL_DS;
-+ regs.es = __KERNEL_DS;
- regs.fs = __KERNEL_PERCPU;
-- regs.gs = __KERNEL_STACK_CANARY;
-+ savesegment(gs, regs.gs);
- #else
- regs.ss = __KERNEL_DS;
- #endif
-@@ -403,7 +423,7 @@ void default_idle(void)
- EXPORT_SYMBOL(default_idle);
- #endif
-
--void stop_this_cpu(void *dummy)
-+__noreturn void stop_this_cpu(void *dummy)
- {
- local_irq_disable();
- /*
-@@ -645,16 +665,37 @@ static int __init idle_setup(char *str)
- }
- early_param("idle", idle_setup);
-
--unsigned long arch_align_stack(unsigned long sp)
-+#ifdef CONFIG_PAX_RANDKSTACK
-+void pax_randomize_kstack(struct pt_regs *regs)
- {
-- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-- sp -= get_random_int() % 8192;
-- return sp & ~0xf;
--}
-+ struct thread_struct *thread = &current->thread;
-+ unsigned long time;
-
--unsigned long arch_randomize_brk(struct mm_struct *mm)
--{
-- unsigned long range_end = mm->brk + 0x02000000;
-- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
--}
-+ if (!randomize_va_space)
-+ return;
-+
-+ if (v8086_mode(regs))
-+ return;
-
-+ rdtscl(time);
-+
-+ /* P4 seems to return a 0 LSB, ignore it */
-+#ifdef CONFIG_MPENTIUM4
-+ time &= 0x3EUL;
-+ time <<= 2;
-+#elif defined(CONFIG_X86_64)
-+ time &= 0xFUL;
-+ time <<= 4;
-+#else
-+ time &= 0x1FUL;
-+ time <<= 3;
-+#endif
-+
-+ thread->sp0 ^= time;
-+ load_sp0(init_tss + smp_processor_id(), thread);
-+
-+#ifdef CONFIG_X86_64
-+ percpu_write(kernel_stack, thread->sp0);
-+#endif
-+}
-+#endif
-diff -urNp linux-3.1.4/arch/x86/kernel/ptrace.c linux-3.1.4/arch/x86/kernel/ptrace.c
---- linux-3.1.4/arch/x86/kernel/ptrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/ptrace.c 2011-11-16 18:39:07.000000000 -0500
-@@ -822,7 +822,7 @@ long arch_ptrace(struct task_struct *chi
+diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
+index 8252879..d3219e0 100644
+--- a/arch/x86/kernel/ptrace.c
++++ b/arch/x86/kernel/ptrace.c
+@@ -822,7 +822,7 @@ long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
int ret;
@@ -15727,7 +16370,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ptrace.c linux-3.1.4/arch/x86/kernel/ptra
switch (request) {
/* read the word at location addr in the USER area. */
-@@ -907,14 +907,14 @@ long arch_ptrace(struct task_struct *chi
+@@ -907,14 +907,14 @@ long arch_ptrace(struct task_struct *child, long request,
if ((int) addr < 0)
return -EIO;
ret = do_get_thread_area(child, addr,
@@ -15744,7 +16387,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ptrace.c linux-3.1.4/arch/x86/kernel/ptra
break;
#endif
-@@ -1331,7 +1331,7 @@ static void fill_sigtrap_info(struct tas
+@@ -1331,7 +1331,7 @@ static void fill_sigtrap_info(struct task_struct *tsk,
memset(info, 0, sizeof(*info));
info->si_signo = SIGTRAP;
info->si_code = si_code;
@@ -15753,10 +16396,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/ptrace.c linux-3.1.4/arch/x86/kernel/ptra
}
void user_single_step_siginfo(struct task_struct *tsk,
-diff -urNp linux-3.1.4/arch/x86/kernel/pvclock.c linux-3.1.4/arch/x86/kernel/pvclock.c
---- linux-3.1.4/arch/x86/kernel/pvclock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/pvclock.c 2011-11-16 18:39:07.000000000 -0500
-@@ -81,11 +81,11 @@ unsigned long pvclock_tsc_khz(struct pvc
+diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
+index 42eb330..139955c 100644
+--- a/arch/x86/kernel/pvclock.c
++++ b/arch/x86/kernel/pvclock.c
+@@ -81,11 +81,11 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
return pv_tsc_khz;
}
@@ -15770,7 +16414,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/pvclock.c linux-3.1.4/arch/x86/kernel/pvc
}
cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
-@@ -121,11 +121,11 @@ cycle_t pvclock_clocksource_read(struct
+@@ -121,11 +121,11 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
* updating at the same time, and one of them could be slightly behind,
* making the assumption that last_value always go forward fail to hold.
*/
@@ -15784,9 +16428,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/pvclock.c linux-3.1.4/arch/x86/kernel/pvc
} while (unlikely(last != ret));
return ret;
-diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/reboot.c
---- linux-3.1.4/arch/x86/kernel/reboot.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/reboot.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
+index 9242436..753954d 100644
+--- a/arch/x86/kernel/reboot.c
++++ b/arch/x86/kernel/reboot.c
@@ -35,7 +35,7 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
@@ -15816,7 +16461,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
local_irq_disable();
/* Write zero to CMOS register number 0x0f, which the BIOS POST
-@@ -347,14 +351,14 @@ void machine_real_restart(unsigned int t
+@@ -347,14 +351,14 @@ void machine_real_restart(unsigned int type)
boot)". This seems like a fairly standard thing that gets set by
REBOOT.COM programs, and the previous reset routine did this
too. */
@@ -15833,7 +16478,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
/* GDT[0]: GDT self-pointer */
lowmem_gdt[0] =
-@@ -365,7 +369,33 @@ void machine_real_restart(unsigned int t
+@@ -365,7 +369,33 @@ void machine_real_restart(unsigned int type)
GDT_ENTRY(0x009b, restart_pa, 0xffff);
/* Jump to the identity-mapped low memory code */
@@ -15867,7 +16512,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
}
#ifdef CONFIG_APM_MODULE
EXPORT_SYMBOL(machine_real_restart);
-@@ -523,7 +553,7 @@ void __attribute__((weak)) mach_reboot_f
+@@ -523,7 +553,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
* try to force a triple fault and then cycle between hitting the keyboard
* controller and doing that
*/
@@ -15892,7 +16537,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
{
printk("machine restart\n");
-@@ -662,7 +692,7 @@ static void native_machine_restart(char
+@@ -662,7 +692,7 @@ static void native_machine_restart(char *__unused)
__machine_emergency_restart(0);
}
@@ -15910,7 +16555,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
{
if (pm_power_off) {
if (!reboot_force)
-@@ -682,6 +712,7 @@ static void native_machine_power_off(voi
+@@ -682,6 +712,7 @@ static void native_machine_power_off(void)
}
/* a fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
@@ -15918,9 +16563,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/reboot.c linux-3.1.4/arch/x86/kernel/rebo
}
struct machine_ops machine_ops = {
-diff -urNp linux-3.1.4/arch/x86/kernel/relocate_kernel_64.S linux-3.1.4/arch/x86/kernel/relocate_kernel_64.S
---- linux-3.1.4/arch/x86/kernel/relocate_kernel_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/relocate_kernel_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
+index 7a6f3b3..bed145d7 100644
+--- a/arch/x86/kernel/relocate_kernel_64.S
++++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -11,6 +11,7 @@
#include <asm/kexec.h>
#include <asm/processor-flags.h>
@@ -15945,10 +16591,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/relocate_kernel_64.S linux-3.1.4/arch/x86
ret
1:
-diff -urNp linux-3.1.4/arch/x86/kernel/setup.c linux-3.1.4/arch/x86/kernel/setup.c
---- linux-3.1.4/arch/x86/kernel/setup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/setup.c 2011-11-16 18:39:07.000000000 -0500
-@@ -447,7 +447,7 @@ static void __init parse_setup_data(void
+diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
+index afaf384..1a101fe 100644
+--- a/arch/x86/kernel/setup.c
++++ b/arch/x86/kernel/setup.c
+@@ -447,7 +447,7 @@ static void __init parse_setup_data(void)
switch (data->type) {
case SETUP_E820_EXT:
@@ -15986,9 +16633,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/setup.c linux-3.1.4/arch/x86/kernel/setup
data_resource.end = virt_to_phys(_edata)-1;
bss_resource.start = virt_to_phys(&__bss_start);
bss_resource.end = virt_to_phys(&__bss_stop)-1;
-diff -urNp linux-3.1.4/arch/x86/kernel/setup_percpu.c linux-3.1.4/arch/x86/kernel/setup_percpu.c
---- linux-3.1.4/arch/x86/kernel/setup_percpu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/setup_percpu.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
+index 71f4727..16dc9f7 100644
+--- a/arch/x86/kernel/setup_percpu.c
++++ b/arch/x86/kernel/setup_percpu.c
@@ -21,19 +21,17 @@
#include <asm/cpu.h>
#include <asm/stackprotector.h>
@@ -16013,7 +16661,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/setup_percpu.c linux-3.1.4/arch/x86/kerne
[0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
};
EXPORT_SYMBOL(__per_cpu_offset);
-@@ -155,10 +153,10 @@ static inline void setup_percpu_segment(
+@@ -155,10 +153,10 @@ static inline void setup_percpu_segment(int cpu)
{
#ifdef CONFIG_X86_32
struct desc_struct gdt;
@@ -16052,10 +16700,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/setup_percpu.c linux-3.1.4/arch/x86/kerne
/*
* Up to this point, the boot CPU has been using .init.data
* area. Reload any changed state for the boot CPU.
-diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/signal.c
---- linux-3.1.4/arch/x86/kernel/signal.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/signal.c 2011-11-16 19:39:49.000000000 -0500
-@@ -198,7 +198,7 @@ static unsigned long align_sigframe(unsi
+diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
+index 54ddaeb2..a6aa4d2 100644
+--- a/arch/x86/kernel/signal.c
++++ b/arch/x86/kernel/signal.c
+@@ -198,7 +198,7 @@ static unsigned long align_sigframe(unsigned long sp)
* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0.
*/
@@ -16064,7 +16713,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
#else /* !CONFIG_X86_32 */
sp = round_down(sp, 16) - 8;
#endif
-@@ -249,11 +249,11 @@ get_sigframe(struct k_sigaction *ka, str
+@@ -249,11 +249,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
* Return an always-bogus address instead so we will die with SIGSEGV.
*/
if (onsigstack && !likely(on_sig_stack(sp)))
@@ -16078,7 +16727,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
return (void __user *)sp;
}
-@@ -308,9 +308,9 @@ __setup_frame(int sig, struct k_sigactio
+@@ -308,9 +308,9 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
}
if (current->mm->context.vdso)
@@ -16090,7 +16739,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
-@@ -324,7 +324,7 @@ __setup_frame(int sig, struct k_sigactio
+@@ -324,7 +324,7 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
* reasons and because gdb uses it as a signature to notice
* signal handler stack frames.
*/
@@ -16099,7 +16748,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
if (err)
return -EFAULT;
-@@ -378,7 +378,10 @@ static int __setup_rt_frame(int sig, str
+@@ -378,7 +378,10 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
/* Set up to return from userspace. */
@@ -16111,7 +16760,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
if (ka->sa.sa_flags & SA_RESTORER)
restorer = ka->sa.sa_restorer;
put_user_ex(restorer, &frame->pretcode);
-@@ -390,7 +393,7 @@ static int __setup_rt_frame(int sig, str
+@@ -390,7 +393,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
* reasons and because gdb uses it as a signature to notice
* signal handler stack frames.
*/
@@ -16120,7 +16769,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
} put_user_catch(err);
if (err)
-@@ -762,6 +765,8 @@ static void do_signal(struct pt_regs *re
+@@ -762,6 +765,8 @@ static void do_signal(struct pt_regs *regs)
siginfo_t info;
int signr;
@@ -16129,7 +16778,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
/*
* We want the common case to go fast, which is why we may in certain
* cases get here from kernel mode. Just return without doing anything
-@@ -769,7 +774,7 @@ static void do_signal(struct pt_regs *re
+@@ -769,7 +774,7 @@ static void do_signal(struct pt_regs *regs)
* X86_32: vm86 regs switched out by assembly code before reaching
* here, so testing against kernel CS suffices.
*/
@@ -16138,10 +16787,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/signal.c linux-3.1.4/arch/x86/kernel/sign
return;
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
-diff -urNp linux-3.1.4/arch/x86/kernel/smpboot.c linux-3.1.4/arch/x86/kernel/smpboot.c
---- linux-3.1.4/arch/x86/kernel/smpboot.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/smpboot.c 2011-11-16 18:39:07.000000000 -0500
-@@ -709,17 +709,20 @@ static int __cpuinit do_boot_cpu(int api
+diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
+index 9f548cb..caf76f7 100644
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -709,17 +709,20 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
set_idle_for_cpu(cpu, c_idle.idle);
do_rest:
per_cpu(current_task, cpu) = c_idle.idle;
@@ -16165,7 +16815,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/smpboot.c linux-3.1.4/arch/x86/kernel/smp
initial_code = (unsigned long)start_secondary;
stack_start = c_idle.idle->thread.sp;
-@@ -861,6 +864,12 @@ int __cpuinit native_cpu_up(unsigned int
+@@ -861,6 +864,12 @@ int __cpuinit native_cpu_up(unsigned int cpu)
per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
@@ -16178,10 +16828,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/smpboot.c linux-3.1.4/arch/x86/kernel/smp
err = do_boot_cpu(apicid, cpu);
if (err) {
pr_debug("do_boot_cpu failed %d\n", err);
-diff -urNp linux-3.1.4/arch/x86/kernel/step.c linux-3.1.4/arch/x86/kernel/step.c
---- linux-3.1.4/arch/x86/kernel/step.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/step.c 2011-11-16 18:39:07.000000000 -0500
-@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struc
+diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c
+index c346d11..d43b163 100644
+--- a/arch/x86/kernel/step.c
++++ b/arch/x86/kernel/step.c
+@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *re
struct desc_struct *desc;
unsigned long base;
@@ -16194,7 +16845,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/step.c linux-3.1.4/arch/x86/kernel/step.c
addr = -1L; /* bogus selector, access would fault */
else {
desc = child->mm->context.ldt + seg;
-@@ -42,7 +42,8 @@ unsigned long convert_ip_to_linear(struc
+@@ -42,7 +42,8 @@ unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *re
addr += base;
}
mutex_unlock(&child->mm->context.lock);
@@ -16204,7 +16855,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/step.c linux-3.1.4/arch/x86/kernel/step.c
return addr;
}
-@@ -53,6 +54,9 @@ static int is_setting_trap_flag(struct t
+@@ -53,6 +54,9 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs)
unsigned char opcode[15];
unsigned long addr = convert_ip_to_linear(child, regs);
@@ -16214,17 +16865,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/step.c linux-3.1.4/arch/x86/kernel/step.c
copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0);
for (i = 0; i < copied; i++) {
switch (opcode[i]) {
-diff -urNp linux-3.1.4/arch/x86/kernel/syscall_table_32.S linux-3.1.4/arch/x86/kernel/syscall_table_32.S
---- linux-3.1.4/arch/x86/kernel/syscall_table_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/syscall_table_32.S 2011-11-16 18:39:07.000000000 -0500
-@@ -1,3 +1,4 @@
-+.section .rodata,"a",@progbits
- ENTRY(sys_call_table)
- .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
- .long sys_exit
-diff -urNp linux-3.1.4/arch/x86/kernel/sys_i386_32.c linux-3.1.4/arch/x86/kernel/sys_i386_32.c
---- linux-3.1.4/arch/x86/kernel/sys_i386_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/sys_i386_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
+index 0b0cb5f..db6b9ed 100644
+--- a/arch/x86/kernel/sys_i386_32.c
++++ b/arch/x86/kernel/sys_i386_32.c
@@ -24,17 +24,224 @@
#include <asm/syscalls.h>
@@ -16237,12 +16881,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_i386_32.c linux-3.1.4/arch/x86/kernel
- const char *const argv[],
- const char *const envp[])
+int i386_mmap_check(unsigned long addr, unsigned long len, unsigned long flags)
- {
-- long __res;
-- asm volatile ("int $0x80"
-- : "=a" (__res)
-- : "0" (__NR_execve), "b" (filename), "c" (argv), "d" (envp) : "memory");
-- return __res;
++{
+ unsigned long pax_task_size = TASK_SIZE;
+
+#ifdef CONFIG_PAX_SEGMEXEC
@@ -16350,7 +16989,12 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_i386_32.c linux-3.1.4/arch/x86/kernel
+arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+ const unsigned long len, const unsigned long pgoff,
+ const unsigned long flags)
-+{
+ {
+- long __res;
+- asm volatile ("int $0x80"
+- : "=a" (__res)
+- : "0" (__NR_execve), "b" (filename), "c" (argv), "d" (envp) : "memory");
+- return __res;
+ struct vm_area_struct *vma;
+ struct mm_struct *mm = current->mm;
+ unsigned long base = mm->mmap_base, addr = addr0, pax_task_size = TASK_SIZE;
@@ -16462,9 +17106,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_i386_32.c linux-3.1.4/arch/x86/kernel
+
+ return addr;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/sys_x86_64.c
---- linux-3.1.4/arch/x86/kernel/sys_x86_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/sys_x86_64.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
+index ff14a50..35626c3 100644
+--- a/arch/x86/kernel/sys_x86_64.c
++++ b/arch/x86/kernel/sys_x86_64.c
@@ -32,8 +32,8 @@ out:
return error;
}
@@ -16476,7 +17121,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
{
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT)) {
unsigned long new_begin;
-@@ -52,7 +52,7 @@ static void find_start_end(unsigned long
+@@ -52,7 +52,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin,
*begin = new_begin;
}
} else {
@@ -16485,7 +17130,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
*end = TASK_SIZE;
}
}
-@@ -69,16 +69,19 @@ arch_get_unmapped_area(struct file *filp
+@@ -69,16 +69,19 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -16517,7 +17162,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
/*
* Remember the place where we stopped the search:
*/
-@@ -128,7 +131,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -128,7 +131,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
@@ -16526,7 +17171,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT))
goto bottomup;
@@ -16549,7 +17194,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
}
/* check if free_area_cache is useful for us */
-@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
@@ -16558,7 +17203,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
/* remember the address as a hint for next time */
return mm->free_area_cache = addr-len;
}
-@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -16567,7 +17212,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
/* remember the address as a hint for next time */
return mm->free_area_cache = addr;
-@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -16602,9 +17247,19 @@ diff -urNp linux-3.1.4/arch/x86/kernel/sys_x86_64.c linux-3.1.4/arch/x86/kernel/
mm->cached_hole_size = ~0UL;
return addr;
-diff -urNp linux-3.1.4/arch/x86/kernel/tboot.c linux-3.1.4/arch/x86/kernel/tboot.c
---- linux-3.1.4/arch/x86/kernel/tboot.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/tboot.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
+index bc19be3..0f5fbf7 100644
+--- a/arch/x86/kernel/syscall_table_32.S
++++ b/arch/x86/kernel/syscall_table_32.S
+@@ -1,3 +1,4 @@
++.section .rodata,"a",@progbits
+ ENTRY(sys_call_table)
+ .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
+ .long sys_exit
+diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
+index e07a2fc..db0369d 100644
+--- a/arch/x86/kernel/tboot.c
++++ b/arch/x86/kernel/tboot.c
@@ -218,7 +218,7 @@ static int tboot_setup_sleep(void)
void tboot_shutdown(u32 shutdown_type)
@@ -16623,7 +17278,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/tboot.c linux-3.1.4/arch/x86/kernel/tboot
shutdown();
/* should not reach here */
-@@ -297,7 +297,7 @@ void tboot_sleep(u8 sleep_state, u32 pm1
+@@ -297,7 +297,7 @@ void tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control)
tboot_shutdown(acpi_shutdown_map[sleep_state]);
}
@@ -16632,7 +17287,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/tboot.c linux-3.1.4/arch/x86/kernel/tboot
static int tboot_wait_for_aps(int num_aps)
{
-@@ -321,9 +321,9 @@ static int __cpuinit tboot_cpu_callback(
+@@ -321,9 +321,9 @@ static int __cpuinit tboot_cpu_callback(struct notifier_block *nfb,
{
switch (action) {
case CPU_DYING:
@@ -16653,10 +17308,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/tboot.c linux-3.1.4/arch/x86/kernel/tboot
register_hotcpu_notifier(&tboot_cpu_notifier);
return 0;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/time.c linux-3.1.4/arch/x86/kernel/time.c
---- linux-3.1.4/arch/x86/kernel/time.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/time.c 2011-11-16 18:39:07.000000000 -0500
-@@ -30,9 +30,9 @@ unsigned long profile_pc(struct pt_regs
+diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
+index 5a64d05..804587b 100644
+--- a/arch/x86/kernel/time.c
++++ b/arch/x86/kernel/time.c
+@@ -30,9 +30,9 @@ unsigned long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
@@ -16668,7 +17324,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/time.c linux-3.1.4/arch/x86/kernel/time.c
#else
unsigned long *sp =
(unsigned long *)kernel_stack_pointer(regs);
-@@ -41,11 +41,17 @@ unsigned long profile_pc(struct pt_regs
+@@ -41,11 +41,17 @@ unsigned long profile_pc(struct pt_regs *regs)
* or above a saved flags. Eflags has bits 22-31 zero,
* kernel addresses don't.
*/
@@ -16686,10 +17342,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/time.c linux-3.1.4/arch/x86/kernel/time.c
}
return pc;
}
-diff -urNp linux-3.1.4/arch/x86/kernel/tls.c linux-3.1.4/arch/x86/kernel/tls.c
---- linux-3.1.4/arch/x86/kernel/tls.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/tls.c 2011-11-16 18:39:07.000000000 -0500
-@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc
+diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
+index 6bb7b85..dd853e1 100644
+--- a/arch/x86/kernel/tls.c
++++ b/arch/x86/kernel/tls.c
+@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struct *p, int idx,
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
return -EINVAL;
@@ -16701,9 +17358,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/tls.c linux-3.1.4/arch/x86/kernel/tls.c
set_tls_desc(p, idx, &info, 1);
return 0;
-diff -urNp linux-3.1.4/arch/x86/kernel/trampoline_32.S linux-3.1.4/arch/x86/kernel/trampoline_32.S
---- linux-3.1.4/arch/x86/kernel/trampoline_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/trampoline_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/trampoline_32.S b/arch/x86/kernel/trampoline_32.S
+index 451c0a7..e57f551 100644
+--- a/arch/x86/kernel/trampoline_32.S
++++ b/arch/x86/kernel/trampoline_32.S
@@ -32,6 +32,12 @@
#include <asm/segment.h>
#include <asm/page_types.h>
@@ -16726,9 +17384,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/trampoline_32.S linux-3.1.4/arch/x86/kern
# These need to be in the same 64K segment as the above;
# hence we don't use the boot_gdt_descr defined in head.S
-diff -urNp linux-3.1.4/arch/x86/kernel/trampoline_64.S linux-3.1.4/arch/x86/kernel/trampoline_64.S
---- linux-3.1.4/arch/x86/kernel/trampoline_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/trampoline_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
+index 09ff517..df19fbff 100644
+--- a/arch/x86/kernel/trampoline_64.S
++++ b/arch/x86/kernel/trampoline_64.S
@@ -90,7 +90,7 @@ startup_32:
movl $__KERNEL_DS, %eax # Initialize the %ds segment register
movl %eax, %ds
@@ -16747,9 +17406,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/trampoline_64.S linux-3.1.4/arch/x86/kern
.long tgdt - r_base
.short 0
.quad 0x00cf9b000000ffff # __KERNEL32_CS
-diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps.c
---- linux-3.1.4/arch/x86/kernel/traps.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/traps.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
+index 6913369..7e7dff6 100644
+--- a/arch/x86/kernel/traps.c
++++ b/arch/x86/kernel/traps.c
@@ -70,12 +70,6 @@ asmlinkage int system_call(void);
/* Do we ignore FPU interrupts ? */
@@ -16763,7 +17423,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
#endif
DECLARE_BITMAP(used_vectors, NR_VECTORS);
-@@ -117,13 +111,13 @@ static inline void preempt_conditional_c
+@@ -117,13 +111,13 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
}
static void __kprobes
@@ -16779,7 +17439,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
/*
* traps 0, 1, 3, 4, and 5 should be forwarded to vm86.
* On nmi (interrupt 2), do_trap should not be called.
-@@ -134,7 +128,7 @@ do_trap(int trapnr, int signr, char *str
+@@ -134,7 +128,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
}
#endif
@@ -16818,7 +17478,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
return;
#ifdef CONFIG_X86_32
-@@ -264,14 +270,30 @@ do_general_protection(struct pt_regs *re
+@@ -264,14 +270,30 @@ do_general_protection(struct pt_regs *regs, long error_code)
conditional_sti(regs);
#ifdef CONFIG_X86_32
@@ -16865,7 +17525,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
die("general protection fault", regs, error_code);
}
-@@ -433,6 +462,17 @@ static notrace __kprobes void default_do
+@@ -433,6 +462,17 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
dotraplinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
@@ -16883,7 +17543,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
nmi_enter();
inc_irq_stat(__nmi_count);
-@@ -569,7 +609,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -569,7 +609,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
/* It's safe to allow irq's after DR6 has been saved */
preempt_conditional_sti(regs);
@@ -16892,7 +17552,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
handle_vm86_trap((struct kernel_vm86_regs *) regs,
error_code, 1);
preempt_conditional_cli(regs);
-@@ -583,7 +623,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -583,7 +623,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
* We already checked v86 mode above, so we can check for kernel mode
* by just checking the CPL of CS.
*/
@@ -16901,7 +17561,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
tsk->thread.debugreg6 &= ~DR_STEP;
set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
regs->flags &= ~X86_EFLAGS_TF;
-@@ -612,7 +652,7 @@ void math_error(struct pt_regs *regs, in
+@@ -612,7 +652,7 @@ void math_error(struct pt_regs *regs, int error_code, int trapnr)
return;
conditional_sti(regs);
@@ -16910,7 +17570,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
{
if (!fixup_exception(regs)) {
task->thread.error_code = error_code;
-@@ -723,7 +763,7 @@ asmlinkage void __attribute__((weak)) sm
+@@ -723,7 +763,7 @@ asmlinkage void __attribute__((weak)) smp_threshold_interrupt(void)
void __math_state_restore(void)
{
struct thread_info *thread = current_thread_info();
@@ -16929,9 +17589,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/traps.c linux-3.1.4/arch/x86/kernel/traps
if (!tsk_used_math(tsk)) {
local_irq_enable();
-diff -urNp linux-3.1.4/arch/x86/kernel/verify_cpu.S linux-3.1.4/arch/x86/kernel/verify_cpu.S
---- linux-3.1.4/arch/x86/kernel/verify_cpu.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/verify_cpu.S 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
+index b9242ba..50c5edd 100644
+--- a/arch/x86/kernel/verify_cpu.S
++++ b/arch/x86/kernel/verify_cpu.S
@@ -20,6 +20,7 @@
* arch/x86/boot/compressed/head_64.S: Boot cpu verification
* arch/x86/kernel/trampoline_64.S: secondary processor verification
@@ -16940,9 +17601,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/verify_cpu.S linux-3.1.4/arch/x86/kernel/
*
* verify_cpu, returns the status of longmode and SSE in register %eax.
* 0: Success 1: Failure
-diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm86_32.c
---- linux-3.1.4/arch/x86/kernel/vm86_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/vm86_32.c 2011-11-16 18:40:08.000000000 -0500
+diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
+index 863f875..4307295 100644
+--- a/arch/x86/kernel/vm86_32.c
++++ b/arch/x86/kernel/vm86_32.c
@@ -41,6 +41,7 @@
#include <linux/ptrace.h>
#include <linux/audit.h>
@@ -16951,7 +17613,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
#include <asm/uaccess.h>
#include <asm/io.h>
-@@ -148,7 +149,7 @@ struct pt_regs *save_v86_state(struct ke
+@@ -148,7 +149,7 @@ struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
do_exit(SIGSEGV);
}
@@ -16960,7 +17622,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
current->thread.sp0 = current->thread.saved_sp0;
current->thread.sysenter_cs = __KERNEL_CS;
load_sp0(tss, &current->thread);
-@@ -208,6 +209,13 @@ int sys_vm86old(struct vm86_struct __use
+@@ -208,6 +209,13 @@ int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs)
struct task_struct *tsk;
int tmp, ret = -EPERM;
@@ -16974,7 +17636,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
tsk = current;
if (tsk->thread.saved_sp0)
goto out;
-@@ -238,6 +246,14 @@ int sys_vm86(unsigned long cmd, unsigned
+@@ -238,6 +246,14 @@ int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs)
int tmp, ret;
struct vm86plus_struct __user *v86;
@@ -16989,7 +17651,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
tsk = current;
switch (cmd) {
case VM86_REQUEST_IRQ:
-@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm
+@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
tsk->thread.saved_fs = info->regs32->fs;
tsk->thread.saved_gs = get_user_gs(info->regs32);
@@ -16998,7 +17660,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
-@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_re
+@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
goto cannot_handle;
if (i == 0x21 && is_revectored(AH(regs), &KVM86->int21_revectored))
goto cannot_handle;
@@ -17007,9 +17669,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vm86_32.c linux-3.1.4/arch/x86/kernel/vm8
if (get_user(segoffs, intr_ptr))
goto cannot_handle;
if ((segoffs >> 16) == BIOSSEG)
-diff -urNp linux-3.1.4/arch/x86/kernel/vmlinux.lds.S linux-3.1.4/arch/x86/kernel/vmlinux.lds.S
---- linux-3.1.4/arch/x86/kernel/vmlinux.lds.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/vmlinux.lds.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
+index 0f703f1..9e15f64 100644
+--- a/arch/x86/kernel/vmlinux.lds.S
++++ b/arch/x86/kernel/vmlinux.lds.S
@@ -26,6 +26,13 @@
#include <asm/page_types.h>
#include <asm/cache.h>
@@ -17086,7 +17749,8 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vmlinux.lds.S linux-3.1.4/arch/x86/kernel
- NOTES :text :note
+ . += __KERNEL_TEXT_OFFSET;
-+
+
+- EXCEPTION_TABLE(16) :text = 0x9090
+#ifdef CONFIG_X86_32
+ . = ALIGN(PAGE_SIZE);
+ .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) {
@@ -17122,8 +17786,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vmlinux.lds.S linux-3.1.4/arch/x86/kernel
+
+ . = ALIGN(PAGE_SIZE);
+ NOTES :rodata :note
-
-- EXCEPTION_TABLE(16) :text = 0x9090
++
+ EXCEPTION_TABLE(16) :rodata
#if defined(CONFIG_DEBUG_RODATA)
@@ -17270,10 +17933,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vmlinux.lds.S linux-3.1.4/arch/x86/kernel
"kernel image bigger than KERNEL_IMAGE_SIZE");
#ifdef CONFIG_SMP
-diff -urNp linux-3.1.4/arch/x86/kernel/vsyscall_64.c linux-3.1.4/arch/x86/kernel/vsyscall_64.c
---- linux-3.1.4/arch/x86/kernel/vsyscall_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/vsyscall_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -56,15 +56,13 @@ DEFINE_VVAR(struct vsyscall_gtod_data, v
+diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
+index b56c65de..561a55b 100644
+--- a/arch/x86/kernel/vsyscall_64.c
++++ b/arch/x86/kernel/vsyscall_64.c
+@@ -56,15 +56,13 @@ DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) =
.lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock),
};
@@ -17290,7 +17954,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vsyscall_64.c linux-3.1.4/arch/x86/kernel
else if (!strcmp("none", str))
vsyscall_mode = NONE;
else
-@@ -177,7 +175,7 @@ bool emulate_vsyscall(struct pt_regs *re
+@@ -177,7 +175,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
tsk = current;
if (seccomp_mode(&tsk->seccomp))
@@ -17299,7 +17963,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vsyscall_64.c linux-3.1.4/arch/x86/kernel
switch (vsyscall_nr) {
case 0:
-@@ -219,8 +217,7 @@ bool emulate_vsyscall(struct pt_regs *re
+@@ -219,8 +217,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
return true;
sigsegv:
@@ -17321,9 +17985,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/vsyscall_64.c linux-3.1.4/arch/x86/kernel
BUILD_BUG_ON((unsigned long)__fix_to_virt(VSYSCALL_FIRST_PAGE) !=
(unsigned long)VSYSCALL_START);
-diff -urNp linux-3.1.4/arch/x86/kernel/x8664_ksyms_64.c linux-3.1.4/arch/x86/kernel/x8664_ksyms_64.c
---- linux-3.1.4/arch/x86/kernel/x8664_ksyms_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/x8664_ksyms_64.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c
+index 9796c2f..f686fbf 100644
+--- a/arch/x86/kernel/x8664_ksyms_64.c
++++ b/arch/x86/kernel/x8664_ksyms_64.c
@@ -29,8 +29,6 @@ EXPORT_SYMBOL(__put_user_8);
EXPORT_SYMBOL(copy_user_generic_string);
EXPORT_SYMBOL(copy_user_generic_unrolled);
@@ -17333,10 +17998,11 @@ diff -urNp linux-3.1.4/arch/x86/kernel/x8664_ksyms_64.c linux-3.1.4/arch/x86/ker
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);
-diff -urNp linux-3.1.4/arch/x86/kernel/xsave.c linux-3.1.4/arch/x86/kernel/xsave.c
---- linux-3.1.4/arch/x86/kernel/xsave.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kernel/xsave.c 2011-11-16 18:39:07.000000000 -0500
-@@ -130,7 +130,7 @@ int check_for_xstate(struct i387_fxsave_
+diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
+index a391134..d0b63b6e 100644
+--- a/arch/x86/kernel/xsave.c
++++ b/arch/x86/kernel/xsave.c
+@@ -130,7 +130,7 @@ int check_for_xstate(struct i387_fxsave_struct __user *buf,
fx_sw_user->xstate_size > fx_sw_user->extended_size)
return -EINVAL;
@@ -17354,7 +18020,7 @@ diff -urNp linux-3.1.4/arch/x86/kernel/xsave.c linux-3.1.4/arch/x86/kernel/xsave
}
/*
-@@ -299,7 +299,7 @@ int restore_i387_xstate(void __user *buf
+@@ -299,7 +299,7 @@ int restore_i387_xstate(void __user *buf)
if (use_xsave())
err = restore_user_xstate(buf);
else
@@ -17363,9 +18029,10 @@ diff -urNp linux-3.1.4/arch/x86/kernel/xsave.c linux-3.1.4/arch/x86/kernel/xsave
buf);
if (unlikely(err)) {
/*
-diff -urNp linux-3.1.4/arch/x86/kvm/emulate.c linux-3.1.4/arch/x86/kvm/emulate.c
---- linux-3.1.4/arch/x86/kvm/emulate.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/emulate.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
+index 8b4cc5f..f086b5b 100644
+--- a/arch/x86/kvm/emulate.c
++++ b/arch/x86/kvm/emulate.c
@@ -96,7 +96,7 @@
#define Src2ImmByte (2<<29)
#define Src2One (3<<29)
@@ -17400,9 +18067,10 @@ diff -urNp linux-3.1.4/arch/x86/kvm/emulate.c linux-3.1.4/arch/x86/kvm/emulate.c
switch ((_dst).bytes) { \
case 1: \
____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b",u8); \
-diff -urNp linux-3.1.4/arch/x86/kvm/lapic.c linux-3.1.4/arch/x86/kvm/lapic.c
---- linux-3.1.4/arch/x86/kvm/lapic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/lapic.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
+index 57dcbd4..79aba9b 100644
+--- a/arch/x86/kvm/lapic.c
++++ b/arch/x86/kvm/lapic.c
@@ -53,7 +53,7 @@
#define APIC_BUS_CYCLE_NS 1
@@ -17412,10 +18080,11 @@ diff -urNp linux-3.1.4/arch/x86/kvm/lapic.c linux-3.1.4/arch/x86/kvm/lapic.c
#define APIC_LVT_NUM 6
/* 14 is the version for Xeon and Pentium 8.4.8*/
-diff -urNp linux-3.1.4/arch/x86/kvm/mmu.c linux-3.1.4/arch/x86/kvm/mmu.c
---- linux-3.1.4/arch/x86/kvm/mmu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/mmu.c 2011-11-16 18:39:07.000000000 -0500
-@@ -3552,7 +3552,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *
+diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
+index 8e8da79..13bc641 100644
+--- a/arch/x86/kvm/mmu.c
++++ b/arch/x86/kvm/mmu.c
+@@ -3552,7 +3552,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
pgprintk("%s: gpa %llx bytes %d\n", __func__, gpa, bytes);
@@ -17424,7 +18093,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/mmu.c linux-3.1.4/arch/x86/kvm/mmu.c
/*
* Assume that the pte write on a page table of the same type
-@@ -3584,7 +3584,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *
+@@ -3584,7 +3584,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
}
spin_lock(&vcpu->kvm->mmu_lock);
@@ -17433,9 +18102,10 @@ diff -urNp linux-3.1.4/arch/x86/kvm/mmu.c linux-3.1.4/arch/x86/kvm/mmu.c
gentry = 0;
kvm_mmu_free_some_pages(vcpu);
++vcpu->kvm->stat.mmu_pte_write;
-diff -urNp linux-3.1.4/arch/x86/kvm/paging_tmpl.h linux-3.1.4/arch/x86/kvm/paging_tmpl.h
---- linux-3.1.4/arch/x86/kvm/paging_tmpl.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/paging_tmpl.h 2011-11-16 19:40:44.000000000 -0500
+diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
+index 507e2b8..fc55f89 100644
+--- a/arch/x86/kvm/paging_tmpl.h
++++ b/arch/x86/kvm/paging_tmpl.h
@@ -197,7 +197,7 @@ retry_walk:
if (unlikely(kvm_is_error_hva(host_addr)))
goto error;
@@ -17445,7 +18115,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/paging_tmpl.h linux-3.1.4/arch/x86/kvm/pagin
if (unlikely(__copy_from_user(&pte, ptep_user, sizeof(pte))))
goto error;
-@@ -575,6 +575,8 @@ static int FNAME(page_fault)(struct kvm_
+@@ -575,6 +575,8 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code,
unsigned long mmu_seq;
bool map_writable;
@@ -17454,7 +18124,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/paging_tmpl.h linux-3.1.4/arch/x86/kvm/pagin
pgprintk("%s: addr %lx err %x\n", __func__, addr, error_code);
if (unlikely(error_code & PFERR_RSVD_MASK))
-@@ -701,7 +703,7 @@ static void FNAME(invlpg)(struct kvm_vcp
+@@ -701,7 +703,7 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva)
if (need_flush)
kvm_flush_remote_tlbs(vcpu->kvm);
@@ -17463,10 +18133,11 @@ diff -urNp linux-3.1.4/arch/x86/kvm/paging_tmpl.h linux-3.1.4/arch/x86/kvm/pagin
spin_unlock(&vcpu->kvm->mmu_lock);
-diff -urNp linux-3.1.4/arch/x86/kvm/svm.c linux-3.1.4/arch/x86/kvm/svm.c
---- linux-3.1.4/arch/x86/kvm/svm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/svm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -3381,7 +3381,11 @@ static void reload_tss(struct kvm_vcpu *
+diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
+index 475d1c9..33658ff 100644
+--- a/arch/x86/kvm/svm.c
++++ b/arch/x86/kvm/svm.c
+@@ -3381,7 +3381,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
int cpu = raw_smp_processor_id();
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
@@ -17478,7 +18149,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/svm.c linux-3.1.4/arch/x86/kvm/svm.c
load_TR_desc();
}
-@@ -3759,6 +3763,10 @@ static void svm_vcpu_run(struct kvm_vcpu
+@@ -3759,6 +3763,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
#endif
#endif
@@ -17489,9 +18160,10 @@ diff -urNp linux-3.1.4/arch/x86/kvm/svm.c linux-3.1.4/arch/x86/kvm/svm.c
reload_tss(vcpu);
local_irq_disable();
-diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
---- linux-3.1.4/arch/x86/kvm/vmx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/vmx.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
+index e65a158..656dc24 100644
+--- a/arch/x86/kvm/vmx.c
++++ b/arch/x86/kvm/vmx.c
@@ -1251,7 +1251,11 @@ static void reload_tss(void)
struct desc_struct *descs;
@@ -17518,7 +18190,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
if (enable_ept && !cpu_has_vmx_ept_2m_page())
kvm_disable_largepages();
-@@ -3535,7 +3542,7 @@ static void vmx_set_constant_host_state(
+@@ -3535,7 +3542,7 @@ static void vmx_set_constant_host_state(void)
vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
asm("mov $.Lkvm_vmx_return, %0" : "=r"(tmpl));
@@ -17527,7 +18199,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
rdmsr(MSR_IA32_SYSENTER_CS, low32, high32);
vmcs_write32(HOST_IA32_SYSENTER_CS, low32);
-@@ -6021,6 +6028,12 @@ static void __noclone vmx_vcpu_run(struc
+@@ -6021,6 +6028,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
"jmp .Lkvm_vmx_return \n\t"
".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t"
".Lkvm_vmx_return: "
@@ -17540,7 +18212,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
/* Save guest registers, load host registers, keep flags */
"mov %0, %c[wordsize](%%"R"sp) \n\t"
"pop %0 \n\t"
-@@ -6069,6 +6082,11 @@ static void __noclone vmx_vcpu_run(struc
+@@ -6069,6 +6082,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
#endif
[cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)),
[wordsize]"i"(sizeof(ulong))
@@ -17552,7 +18224,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
: "cc", "memory"
, R"ax", R"bx", R"di", R"si"
#ifdef CONFIG_X86_64
-@@ -6097,7 +6115,16 @@ static void __noclone vmx_vcpu_run(struc
+@@ -6097,7 +6115,16 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
}
}
@@ -17570,10 +18242,11 @@ diff -urNp linux-3.1.4/arch/x86/kvm/vmx.c linux-3.1.4/arch/x86/kvm/vmx.c
vmx->loaded_vmcs->launched = 1;
vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
-diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
---- linux-3.1.4/arch/x86/kvm/x86.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/kvm/x86.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1334,8 +1334,8 @@ static int xen_hvm_config(struct kvm_vcp
+diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
+index 84a28ea..9326501 100644
+--- a/arch/x86/kvm/x86.c
++++ b/arch/x86/kvm/x86.c
+@@ -1334,8 +1334,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
{
struct kvm *kvm = vcpu->kvm;
int lm = is_long_mode(vcpu);
@@ -17584,7 +18257,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
u8 blob_size = lm ? kvm->arch.xen_hvm_config.blob_size_64
: kvm->arch.xen_hvm_config.blob_size_32;
u32 page_num = data & ~PAGE_MASK;
-@@ -2137,6 +2137,8 @@ long kvm_arch_dev_ioctl(struct file *fil
+@@ -2137,6 +2137,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
if (n < msr_list.nmsrs)
goto out;
r = -EFAULT;
@@ -17593,7 +18266,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
if (copy_to_user(user_msr_list->indices, &msrs_to_save,
num_msrs_to_save * sizeof(u32)))
goto out;
-@@ -2312,15 +2314,20 @@ static int kvm_vcpu_ioctl_set_cpuid2(str
+@@ -2312,15 +2314,20 @@ static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries)
{
@@ -17617,7 +18290,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
vcpu->arch.cpuid_nent = cpuid->nent;
kvm_apic_set_version(vcpu);
kvm_x86_ops->cpuid_update(vcpu);
-@@ -2335,15 +2342,19 @@ static int kvm_vcpu_ioctl_get_cpuid2(str
+@@ -2335,15 +2342,19 @@ static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries)
{
@@ -17640,7 +18313,7 @@ diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
return 0;
out:
-@@ -2718,7 +2729,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
+@@ -2718,7 +2729,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
struct kvm_interrupt *irq)
{
@@ -17658,10 +18331,11 @@ diff -urNp linux-3.1.4/arch/x86/kvm/x86.c linux-3.1.4/arch/x86/kvm/x86.c
{
int r;
struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
-diff -urNp linux-3.1.4/arch/x86/lguest/boot.c linux-3.1.4/arch/x86/lguest/boot.c
---- linux-3.1.4/arch/x86/lguest/boot.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lguest/boot.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1184,9 +1184,10 @@ static __init int early_put_chars(u32 vt
+diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
+index 13ee258..b9632f6 100644
+--- a/arch/x86/lguest/boot.c
++++ b/arch/x86/lguest/boot.c
+@@ -1184,9 +1184,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
* Rebooting also tells the Host we're finished, but the RESTART flag tells the
* Launcher to reboot us.
*/
@@ -17673,9 +18347,10 @@ diff -urNp linux-3.1.4/arch/x86/lguest/boot.c linux-3.1.4/arch/x86/lguest/boot.c
}
/*G:050
-diff -urNp linux-3.1.4/arch/x86/lib/atomic64_32.c linux-3.1.4/arch/x86/lib/atomic64_32.c
---- linux-3.1.4/arch/x86/lib/atomic64_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/atomic64_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
+index 042f682..c92afb6 100644
+--- a/arch/x86/lib/atomic64_32.c
++++ b/arch/x86/lib/atomic64_32.c
@@ -8,18 +8,30 @@
long long atomic64_read_cx8(long long, const atomic64_t *v);
@@ -17754,9 +18429,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/atomic64_32.c linux-3.1.4/arch/x86/lib/atomi
long long atomic64_dec_if_positive_386(atomic64_t *v);
EXPORT_SYMBOL(atomic64_dec_if_positive_386);
int atomic64_inc_not_zero_386(atomic64_t *v);
-diff -urNp linux-3.1.4/arch/x86/lib/atomic64_386_32.S linux-3.1.4/arch/x86/lib/atomic64_386_32.S
---- linux-3.1.4/arch/x86/lib/atomic64_386_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/atomic64_386_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/atomic64_386_32.S b/arch/x86/lib/atomic64_386_32.S
+index e8e7e0d..56fd1b0 100644
+--- a/arch/x86/lib/atomic64_386_32.S
++++ b/arch/x86/lib/atomic64_386_32.S
@@ -48,6 +48,10 @@ BEGIN(read)
movl (v), %eax
movl 4(v), %edx
@@ -18012,9 +18688,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/atomic64_386_32.S linux-3.1.4/arch/x86/lib/a
js 1f
movl %eax, (v)
movl %edx, 4(v)
-diff -urNp linux-3.1.4/arch/x86/lib/atomic64_cx8_32.S linux-3.1.4/arch/x86/lib/atomic64_cx8_32.S
---- linux-3.1.4/arch/x86/lib/atomic64_cx8_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/atomic64_cx8_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/atomic64_cx8_32.S b/arch/x86/lib/atomic64_cx8_32.S
+index 391a083..d658e9f 100644
+--- a/arch/x86/lib/atomic64_cx8_32.S
++++ b/arch/x86/lib/atomic64_cx8_32.S
@@ -35,10 +35,20 @@ ENTRY(atomic64_read_cx8)
CFI_STARTPROC
@@ -18236,9 +18913,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/atomic64_cx8_32.S linux-3.1.4/arch/x86/lib/a
ret
4:
testl %edx, %edx
-diff -urNp linux-3.1.4/arch/x86/lib/checksum_32.S linux-3.1.4/arch/x86/lib/checksum_32.S
---- linux-3.1.4/arch/x86/lib/checksum_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/checksum_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/checksum_32.S b/arch/x86/lib/checksum_32.S
+index 78d16a5..fbcf666 100644
+--- a/arch/x86/lib/checksum_32.S
++++ b/arch/x86/lib/checksum_32.S
@@ -28,7 +28,8 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -18249,7 +18927,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/checksum_32.S linux-3.1.4/arch/x86/lib/check
/*
* computes a partial checksum, e.g. for TCP/UDP fragments
*/
-@@ -296,9 +297,24 @@ unsigned int csum_partial_copy_generic (
+@@ -296,9 +297,24 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
#define ARGBASE 16
#define FP 12
@@ -18483,9 +19161,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/checksum_32.S linux-3.1.4/arch/x86/lib/check
#undef ROUND
#undef ROUND1
-diff -urNp linux-3.1.4/arch/x86/lib/clear_page_64.S linux-3.1.4/arch/x86/lib/clear_page_64.S
---- linux-3.1.4/arch/x86/lib/clear_page_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/clear_page_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/clear_page_64.S b/arch/x86/lib/clear_page_64.S
+index f2145cf..cea889d 100644
+--- a/arch/x86/lib/clear_page_64.S
++++ b/arch/x86/lib/clear_page_64.S
@@ -11,6 +11,7 @@ ENTRY(clear_page_c)
movl $4096/8,%ecx
xorl %eax,%eax
@@ -18519,9 +19198,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/clear_page_64.S linux-3.1.4/arch/x86/lib/cle
1: .byte 0xeb /* jmp <disp8> */
.byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
2: .byte 0xeb /* jmp <disp8> */
-diff -urNp linux-3.1.4/arch/x86/lib/cmpxchg16b_emu.S linux-3.1.4/arch/x86/lib/cmpxchg16b_emu.S
---- linux-3.1.4/arch/x86/lib/cmpxchg16b_emu.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/cmpxchg16b_emu.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/cmpxchg16b_emu.S b/arch/x86/lib/cmpxchg16b_emu.S
+index 1e572c5..2a162cd 100644
+--- a/arch/x86/lib/cmpxchg16b_emu.S
++++ b/arch/x86/lib/cmpxchg16b_emu.S
@@ -53,11 +53,13 @@ this_cpu_cmpxchg16b_emu:
popf
@@ -18536,9 +19216,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/cmpxchg16b_emu.S linux-3.1.4/arch/x86/lib/cm
ret
CFI_ENDPROC
-diff -urNp linux-3.1.4/arch/x86/lib/copy_page_64.S linux-3.1.4/arch/x86/lib/copy_page_64.S
---- linux-3.1.4/arch/x86/lib/copy_page_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/copy_page_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/copy_page_64.S b/arch/x86/lib/copy_page_64.S
+index 01c805b..dccb07f 100644
+--- a/arch/x86/lib/copy_page_64.S
++++ b/arch/x86/lib/copy_page_64.S
@@ -9,6 +9,7 @@ copy_page_c:
CFI_STARTPROC
movl $4096/8,%ecx
@@ -18600,9 +19281,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/copy_page_64.S linux-3.1.4/arch/x86/lib/copy
1: .byte 0xeb /* jmp <disp8> */
.byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-3.1.4/arch/x86/lib/copy_user_64.S linux-3.1.4/arch/x86/lib/copy_user_64.S
---- linux-3.1.4/arch/x86/lib/copy_user_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/copy_user_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
+index 0248402..821c786 100644
+--- a/arch/x86/lib/copy_user_64.S
++++ b/arch/x86/lib/copy_user_64.S
@@ -16,6 +16,7 @@
#include <asm/thread_info.h>
#include <asm/cpufeature.h>
@@ -18719,9 +19401,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/copy_user_64.S linux-3.1.4/arch/x86/lib/copy
ret
.section .fixup,"ax"
-diff -urNp linux-3.1.4/arch/x86/lib/copy_user_nocache_64.S linux-3.1.4/arch/x86/lib/copy_user_nocache_64.S
---- linux-3.1.4/arch/x86/lib/copy_user_nocache_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/copy_user_nocache_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/copy_user_nocache_64.S b/arch/x86/lib/copy_user_nocache_64.S
+index cb0c112..e3a6895 100644
+--- a/arch/x86/lib/copy_user_nocache_64.S
++++ b/arch/x86/lib/copy_user_nocache_64.S
@@ -8,12 +8,14 @@
#include <linux/linkage.h>
@@ -18785,9 +19468,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/copy_user_nocache_64.S linux-3.1.4/arch/x86/
ret
.section .fixup,"ax"
-diff -urNp linux-3.1.4/arch/x86/lib/csum-copy_64.S linux-3.1.4/arch/x86/lib/csum-copy_64.S
---- linux-3.1.4/arch/x86/lib/csum-copy_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/csum-copy_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S
+index fb903b7..c92b7f7 100644
+--- a/arch/x86/lib/csum-copy_64.S
++++ b/arch/x86/lib/csum-copy_64.S
@@ -8,6 +8,7 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -18804,10 +19488,11 @@ diff -urNp linux-3.1.4/arch/x86/lib/csum-copy_64.S linux-3.1.4/arch/x86/lib/csum
ret
CFI_RESTORE_STATE
-diff -urNp linux-3.1.4/arch/x86/lib/csum-wrappers_64.c linux-3.1.4/arch/x86/lib/csum-wrappers_64.c
---- linux-3.1.4/arch/x86/lib/csum-wrappers_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/csum-wrappers_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -52,7 +52,13 @@ csum_partial_copy_from_user(const void _
+diff --git a/arch/x86/lib/csum-wrappers_64.c b/arch/x86/lib/csum-wrappers_64.c
+index 459b58a..9570bc7 100644
+--- a/arch/x86/lib/csum-wrappers_64.c
++++ b/arch/x86/lib/csum-wrappers_64.c
+@@ -52,7 +52,13 @@ csum_partial_copy_from_user(const void __user *src, void *dst,
len -= 2;
}
}
@@ -18822,7 +19507,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/csum-wrappers_64.c linux-3.1.4/arch/x86/lib/
dst, len, isum, errp, NULL);
if (unlikely(*errp))
goto out_err;
-@@ -105,7 +111,13 @@ csum_partial_copy_to_user(const void *sr
+@@ -105,7 +111,13 @@ csum_partial_copy_to_user(const void *src, void __user *dst,
}
*errp = 0;
@@ -18837,9 +19522,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/csum-wrappers_64.c linux-3.1.4/arch/x86/lib/
len, isum, NULL, errp);
}
EXPORT_SYMBOL(csum_partial_copy_to_user);
-diff -urNp linux-3.1.4/arch/x86/lib/getuser.S linux-3.1.4/arch/x86/lib/getuser.S
---- linux-3.1.4/arch/x86/lib/getuser.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/getuser.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S
+index 51f1504..ddac4c1 100644
+--- a/arch/x86/lib/getuser.S
++++ b/arch/x86/lib/getuser.S
@@ -33,15 +33,38 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
@@ -18963,9 +19649,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/getuser.S linux-3.1.4/arch/x86/lib/getuser.S
ret
CFI_ENDPROC
END(bad_get_user)
-diff -urNp linux-3.1.4/arch/x86/lib/insn.c linux-3.1.4/arch/x86/lib/insn.c
---- linux-3.1.4/arch/x86/lib/insn.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/insn.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
+index 9f33b98..dfc7678 100644
+--- a/arch/x86/lib/insn.c
++++ b/arch/x86/lib/insn.c
@@ -21,6 +21,11 @@
#include <linux/string.h>
#include <asm/inat.h>
@@ -18989,9 +19676,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/insn.c linux-3.1.4/arch/x86/lib/insn.c
insn->x86_64 = x86_64 ? 1 : 0;
insn->opnd_bytes = 4;
if (x86_64)
-diff -urNp linux-3.1.4/arch/x86/lib/iomap_copy_64.S linux-3.1.4/arch/x86/lib/iomap_copy_64.S
---- linux-3.1.4/arch/x86/lib/iomap_copy_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/iomap_copy_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/iomap_copy_64.S b/arch/x86/lib/iomap_copy_64.S
+index 05a95e7..326f2fa 100644
+--- a/arch/x86/lib/iomap_copy_64.S
++++ b/arch/x86/lib/iomap_copy_64.S
@@ -17,6 +17,7 @@
#include <linux/linkage.h>
@@ -19008,9 +19696,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/iomap_copy_64.S linux-3.1.4/arch/x86/lib/iom
ret
CFI_ENDPROC
ENDPROC(__iowrite32_copy)
-diff -urNp linux-3.1.4/arch/x86/lib/memcpy_64.S linux-3.1.4/arch/x86/lib/memcpy_64.S
---- linux-3.1.4/arch/x86/lib/memcpy_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/memcpy_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/memcpy_64.S b/arch/x86/lib/memcpy_64.S
+index efbf2a0..8893637 100644
+--- a/arch/x86/lib/memcpy_64.S
++++ b/arch/x86/lib/memcpy_64.S
@@ -34,6 +34,7 @@
rep movsq
movl %edx, %ecx
@@ -19098,9 +19787,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/memcpy_64.S linux-3.1.4/arch/x86/lib/memcpy_
retq
CFI_ENDPROC
ENDPROC(memcpy)
-diff -urNp linux-3.1.4/arch/x86/lib/memmove_64.S linux-3.1.4/arch/x86/lib/memmove_64.S
---- linux-3.1.4/arch/x86/lib/memmove_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/memmove_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S
+index ee16461..c39c199 100644
+--- a/arch/x86/lib/memmove_64.S
++++ b/arch/x86/lib/memmove_64.S
@@ -61,13 +61,13 @@ ENTRY(memmove)
5:
sub $0x20, %rdx
@@ -19229,9 +19919,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/memmove_64.S linux-3.1.4/arch/x86/lib/memmov
retq
.Lmemmove_end_forward_efs:
.previous
-diff -urNp linux-3.1.4/arch/x86/lib/memset_64.S linux-3.1.4/arch/x86/lib/memset_64.S
---- linux-3.1.4/arch/x86/lib/memset_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/memset_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/memset_64.S b/arch/x86/lib/memset_64.S
+index 79bd454..dff325a 100644
+--- a/arch/x86/lib/memset_64.S
++++ b/arch/x86/lib/memset_64.S
@@ -31,6 +31,7 @@
movl %r8d,%ecx
rep stosb
@@ -19273,10 +19964,11 @@ diff -urNp linux-3.1.4/arch/x86/lib/memset_64.S linux-3.1.4/arch/x86/lib/memset_
ret
CFI_RESTORE_STATE
-diff -urNp linux-3.1.4/arch/x86/lib/mmx_32.c linux-3.1.4/arch/x86/lib/mmx_32.c
---- linux-3.1.4/arch/x86/lib/mmx_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/mmx_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *
+diff --git a/arch/x86/lib/mmx_32.c b/arch/x86/lib/mmx_32.c
+index c9f2d9b..e7fd2c0 100644
+--- a/arch/x86/lib/mmx_32.c
++++ b/arch/x86/lib/mmx_32.c
+@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
{
void *p;
int i;
@@ -19284,7 +19976,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/mmx_32.c linux-3.1.4/arch/x86/lib/mmx_32.c
if (unlikely(in_interrupt()))
return __memcpy(to, from, len);
-@@ -39,44 +40,72 @@ void *_mmx_memcpy(void *to, const void *
+@@ -39,44 +40,72 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
kernel_fpu_begin();
__asm__ __volatile__ (
@@ -19391,7 +20083,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/mmx_32.c linux-3.1.4/arch/x86/lib/mmx_32.c
kernel_fpu_begin();
-@@ -166,42 +196,70 @@ static void fast_copy_page(void *to, voi
+@@ -166,42 +196,70 @@ static void fast_copy_page(void *to, void *from)
* but that is for later. -AV
*/
__asm__ __volatile__(
@@ -19591,9 +20283,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/mmx_32.c linux-3.1.4/arch/x86/lib/mmx_32.c
from += 64;
to += 64;
-diff -urNp linux-3.1.4/arch/x86/lib/msr-reg.S linux-3.1.4/arch/x86/lib/msr-reg.S
---- linux-3.1.4/arch/x86/lib/msr-reg.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/msr-reg.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/lib/msr-reg.S b/arch/x86/lib/msr-reg.S
+index 69fa106..adda88b 100644
+--- a/arch/x86/lib/msr-reg.S
++++ b/arch/x86/lib/msr-reg.S
@@ -3,6 +3,7 @@
#include <asm/dwarf2.h>
#include <asm/asm.h>
@@ -19636,9 +20329,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/msr-reg.S linux-3.1.4/arch/x86/lib/msr-reg.S
ret
3:
CFI_RESTORE_STATE
-diff -urNp linux-3.1.4/arch/x86/lib/putuser.S linux-3.1.4/arch/x86/lib/putuser.S
---- linux-3.1.4/arch/x86/lib/putuser.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/putuser.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/putuser.S b/arch/x86/lib/putuser.S
+index 36b0d15..d381858 100644
+--- a/arch/x86/lib/putuser.S
++++ b/arch/x86/lib/putuser.S
@@ -15,7 +15,9 @@
#include <asm/thread_info.h>
#include <asm/errno.h>
@@ -19778,9 +20472,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/putuser.S linux-3.1.4/arch/x86/lib/putuser.S
#endif
xor %eax,%eax
EXIT
-diff -urNp linux-3.1.4/arch/x86/lib/rwlock.S linux-3.1.4/arch/x86/lib/rwlock.S
---- linux-3.1.4/arch/x86/lib/rwlock.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/rwlock.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/rwlock.S b/arch/x86/lib/rwlock.S
+index 1cad221..6cc4b8d 100644
+--- a/arch/x86/lib/rwlock.S
++++ b/arch/x86/lib/rwlock.S
@@ -23,6 +23,7 @@ ENTRY(__write_lock_failed)
WRITE_LOCK_SUB($RW_LOCK_BIAS) (%__lock_ptr)
jnz 0b
@@ -19797,9 +20492,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/rwlock.S linux-3.1.4/arch/x86/lib/rwlock.S
ret
CFI_ENDPROC
END(__read_lock_failed)
-diff -urNp linux-3.1.4/arch/x86/lib/rwsem.S linux-3.1.4/arch/x86/lib/rwsem.S
---- linux-3.1.4/arch/x86/lib/rwsem.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/rwsem.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/rwsem.S b/arch/x86/lib/rwsem.S
+index 5dff5f0..cadebf4 100644
+--- a/arch/x86/lib/rwsem.S
++++ b/arch/x86/lib/rwsem.S
@@ -94,6 +94,7 @@ ENTRY(call_rwsem_down_read_failed)
__ASM_SIZE(pop,_cfi) %__ASM_REG(dx)
CFI_RESTORE __ASM_REG(dx)
@@ -19834,9 +20530,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/rwsem.S linux-3.1.4/arch/x86/lib/rwsem.S
ret
CFI_ENDPROC
ENDPROC(call_rwsem_downgrade_wake)
-diff -urNp linux-3.1.4/arch/x86/lib/thunk_64.S linux-3.1.4/arch/x86/lib/thunk_64.S
---- linux-3.1.4/arch/x86/lib/thunk_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/thunk_64.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
+index a63efd6..ccecad8 100644
+--- a/arch/x86/lib/thunk_64.S
++++ b/arch/x86/lib/thunk_64.S
@@ -8,6 +8,7 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
@@ -19852,9 +20549,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/thunk_64.S linux-3.1.4/arch/x86/lib/thunk_64
+ pax_force_retaddr
ret
CFI_ENDPROC
-diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/usercopy_32.c
---- linux-3.1.4/arch/x86/lib/usercopy_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/usercopy_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c
+index e218d5d..35679b4 100644
+--- a/arch/x86/lib/usercopy_32.c
++++ b/arch/x86/lib/usercopy_32.c
@@ -43,7 +43,7 @@ do { \
__asm__ __volatile__( \
" testl %1,%1\n" \
@@ -19877,7 +20575,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
".section .fixup,\"ax\"\n" \
"3: lea 0(%2,%0,4),%0\n" \
" jmp 2b\n" \
-@@ -200,6 +202,7 @@ long strnlen_user(const char __user *s,
+@@ -200,6 +202,7 @@ long strnlen_user(const char __user *s, long n)
might_fault();
__asm__ __volatile__(
@@ -19885,7 +20583,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
" testl %0, %0\n"
" jz 3f\n"
" andl %0,%%ecx\n"
-@@ -208,6 +211,7 @@ long strnlen_user(const char __user *s,
+@@ -208,6 +211,7 @@ long strnlen_user(const char __user *s, long n)
" subl %%ecx,%0\n"
" addl %0,%%eax\n"
"1:\n"
@@ -19902,7 +20600,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
{
int d0, d1;
__asm__ __volatile__(
-@@ -239,36 +243,36 @@ __copy_user_intel(void __user *to, const
+@@ -239,36 +243,36 @@ __copy_user_intel(void __user *to, const void *from, unsigned long size)
" .align 2,0x90\n"
"3: movl 0(%4), %%eax\n"
"4: movl 4(%4), %%edx\n"
@@ -19955,7 +20653,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
" addl $-64, %0\n"
" addl $64, %4\n"
" addl $64, %3\n"
-@@ -278,10 +282,119 @@ __copy_user_intel(void __user *to, const
+@@ -278,10 +282,119 @@ __copy_user_intel(void __user *to, const void *from, unsigned long size)
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -20075,7 +20773,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
".section .fixup,\"ax\"\n"
"101: lea 0(%%eax,%0,4),%0\n"
" jmp 100b\n"
-@@ -339,41 +452,41 @@ __copy_user_zeroing_intel(void *to, cons
+@@ -339,41 +452,41 @@ __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
int d0, d1;
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -20135,7 +20833,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
" movl %%eax, 56(%3)\n"
" movl %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -385,9 +498,9 @@ __copy_user_zeroing_intel(void *to, cons
+@@ -385,9 +498,9 @@ __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size)
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -20147,7 +20845,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -440,41 +553,41 @@ static unsigned long __copy_user_zeroing
+@@ -440,41 +553,41 @@ static unsigned long __copy_user_zeroing_intel_nocache(void *to,
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -20207,7 +20905,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -487,9 +600,9 @@ static unsigned long __copy_user_zeroing
+@@ -487,9 +600,9 @@ static unsigned long __copy_user_zeroing_intel_nocache(void *to,
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -20219,7 +20917,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -537,41 +650,41 @@ static unsigned long __copy_user_intel_n
+@@ -537,41 +650,41 @@ static unsigned long __copy_user_intel_nocache(void *to,
__asm__ __volatile__(
" .align 2,0x90\n"
@@ -20279,7 +20977,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
-@@ -584,9 +697,9 @@ static unsigned long __copy_user_intel_n
+@@ -584,9 +697,9 @@ static unsigned long __copy_user_intel_nocache(void *to,
" shrl $2, %0\n"
" andl $3, %%eax\n"
" cld\n"
@@ -20291,7 +20989,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
-@@ -629,32 +742,36 @@ static unsigned long __copy_user_intel_n
+@@ -629,32 +742,36 @@ static unsigned long __copy_user_intel_nocache(void *to,
*/
unsigned long __copy_user_zeroing_intel(void *to, const void __user *from,
unsigned long size);
@@ -20363,7 +21061,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
return n;
}
EXPORT_SYMBOL(__copy_to_user_ll);
-@@ -797,10 +914,9 @@ unsigned long __copy_from_user_ll_nozero
+@@ -797,10 +914,9 @@ unsigned long __copy_from_user_ll_nozero(void *to, const void __user *from,
unsigned long n)
{
if (movsl_is_ok(to, from, n))
@@ -20376,7 +21074,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
return n;
}
EXPORT_SYMBOL(__copy_from_user_ll_nozero);
-@@ -827,65 +943,50 @@ unsigned long __copy_from_user_ll_nocach
+@@ -827,65 +943,50 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
if (n > 64 && cpu_has_xmm2)
n = __copy_user_intel_nocache(to, from, n);
else
@@ -20475,9 +21173,10 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_32.c linux-3.1.4/arch/x86/lib/userc
+}
+EXPORT_SYMBOL(set_fs);
+#endif
-diff -urNp linux-3.1.4/arch/x86/lib/usercopy_64.c linux-3.1.4/arch/x86/lib/usercopy_64.c
---- linux-3.1.4/arch/x86/lib/usercopy_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/lib/usercopy_64.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c
+index b7c2849..5ef0f95 100644
+--- a/arch/x86/lib/usercopy_64.c
++++ b/arch/x86/lib/usercopy_64.c
@@ -42,6 +42,12 @@ long
__strncpy_from_user(char *dst, const char __user *src, long count)
{
@@ -20491,7 +21190,7 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_64.c linux-3.1.4/arch/x86/lib/userc
__do_strncpy_from_user(dst, src, count, res);
return res;
}
-@@ -65,6 +71,12 @@ unsigned long __clear_user(void __user *
+@@ -65,6 +71,12 @@ unsigned long __clear_user(void __user *addr, unsigned long size)
{
long __d0;
might_fault();
@@ -20536,34 +21235,11 @@ diff -urNp linux-3.1.4/arch/x86/lib/usercopy_64.c linux-3.1.4/arch/x86/lib/userc
{
char c;
unsigned zero_len;
-diff -urNp linux-3.1.4/arch/x86/Makefile linux-3.1.4/arch/x86/Makefile
---- linux-3.1.4/arch/x86/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/Makefile 2011-11-17 18:30:30.000000000 -0500
-@@ -46,6 +46,7 @@ else
- UTS_MACHINE := x86_64
- CHECKFLAGS += -D__x86_64__ -m64
-
-+ biarch := $(call cc-option,-m64)
- KBUILD_AFLAGS += -m64
- KBUILD_CFLAGS += -m64
-
-@@ -195,3 +196,12 @@ define archhelp
- echo ' FDARGS="..." arguments for the booted kernel'
- echo ' FDINITRD=file initrd for the booted kernel'
- endef
-+
-+define OLD_LD
-+
-+*** ${VERSION}.${PATCHLEVEL} PaX kernels no longer build correctly with old versions of binutils.
-+*** Please upgrade your binutils to 2.18 or newer
-+endef
-+
-+archprepare:
-+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
-diff -urNp linux-3.1.4/arch/x86/mm/extable.c linux-3.1.4/arch/x86/mm/extable.c
---- linux-3.1.4/arch/x86/mm/extable.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/extable.c 2011-11-16 18:39:07.000000000 -0500
-@@ -8,7 +8,7 @@ int fixup_exception(struct pt_regs *regs
+diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
+index d0474ad..36e9257 100644
+--- a/arch/x86/mm/extable.c
++++ b/arch/x86/mm/extable.c
+@@ -8,7 +8,7 @@ int fixup_exception(struct pt_regs *regs)
const struct exception_table_entry *fixup;
#ifdef CONFIG_PNPBIOS
@@ -20572,9 +21248,10 @@ diff -urNp linux-3.1.4/arch/x86/mm/extable.c linux-3.1.4/arch/x86/mm/extable.c
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap;
pnp_bios_is_utter_crap = 1;
-diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
---- linux-3.1.4/arch/x86/mm/fault.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/fault.c 2011-11-16 20:43:50.000000000 -0500
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index 0d17c8c..4f4764f 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
@@ -13,11 +13,18 @@
#include <linux/perf_event.h> /* perf_sw_event */
#include <linux/hugetlb.h> /* hstate_index_to_shift */
@@ -20594,7 +21271,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
/*
* Page fault error code bits:
-@@ -55,7 +62,7 @@ static inline int __kprobes notify_page_
+@@ -55,7 +62,7 @@ static inline int __kprobes notify_page_fault(struct pt_regs *regs)
int ret = 0;
/* kprobe_running() needs smp_processor_id() */
@@ -20603,7 +21280,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
preempt_disable();
if (kprobe_running() && kprobe_fault_handler(regs, 14))
ret = 1;
-@@ -116,7 +123,10 @@ check_prefetch_opcode(struct pt_regs *re
+@@ -116,7 +123,10 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr,
return !instr_lo || (instr_lo>>1) == 1;
case 0x00:
/* Prefetch instruction is 0x0F0D or 0x0F18 */
@@ -20615,7 +21292,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
return 0;
*prefetch = (instr_lo == 0xF) &&
-@@ -150,7 +160,10 @@ is_prefetch(struct pt_regs *regs, unsign
+@@ -150,7 +160,10 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
while (instr < max_instr) {
unsigned char opcode;
@@ -20627,7 +21304,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
break;
instr++;
-@@ -181,6 +194,34 @@ force_sig_info_fault(int si_signo, int s
+@@ -181,6 +194,34 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
force_sig_info(si_signo, &info, tsk);
}
@@ -20700,7 +21377,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
if (!ret)
break;
-@@ -277,6 +335,11 @@ static noinline __kprobes int vmalloc_fa
+@@ -277,6 +335,11 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
* an interrupt in the middle of a task switch..
*/
pgd_paddr = read_cr3();
@@ -20712,7 +21389,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
if (!pmd_k)
return -1;
-@@ -372,7 +435,14 @@ static noinline __kprobes int vmalloc_fa
+@@ -372,7 +435,14 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
* happen within a race in page table update. In the later
* case just flush:
*/
@@ -20727,7 +21404,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
pgd_ref = pgd_offset_k(address);
if (pgd_none(*pgd_ref))
return -1;
-@@ -534,7 +604,7 @@ static int is_errata93(struct pt_regs *r
+@@ -534,7 +604,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
static int is_errata100(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_64
@@ -20736,7 +21413,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
return 1;
#endif
return 0;
-@@ -561,7 +631,7 @@ static int is_f00f_bug(struct pt_regs *r
+@@ -561,7 +631,7 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
}
static const char nx_warning[] = KERN_CRIT
@@ -20745,7 +21422,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
static void
show_fault_oops(struct pt_regs *regs, unsigned long error_code,
-@@ -570,14 +640,25 @@ show_fault_oops(struct pt_regs *regs, un
+@@ -570,15 +640,26 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
if (!oops_may_print())
return;
@@ -20758,8 +21435,8 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
if (pte && pte_present(*pte) && !pte_exec(*pte))
- printk(nx_warning, current_uid());
+ printk(nx_warning, current_uid(), current->comm, task_pid_nr(current));
-+ }
-+
+ }
+
+#ifdef CONFIG_PAX_KERNEXEC
+ if (init_mm.start_code <= address && address < init_mm.end_code) {
+ if (current->signal->curr_ip)
@@ -20768,12 +21445,13 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
+ else
+ printk(KERN_ERR "PAX: %s:%d, uid/euid: %u/%u, attempted to modify kernel code\n",
+ current->comm, task_pid_nr(current), current_uid(), current_euid());
- }
++ }
+#endif
-
++
printk(KERN_ALERT "BUG: unable to handle kernel ");
if (address < PAGE_SIZE)
-@@ -733,6 +814,21 @@ __bad_area_nosemaphore(struct pt_regs *r
+ printk(KERN_CONT "NULL pointer dereference");
+@@ -733,6 +814,21 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
}
#endif
@@ -20795,7 +21473,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
if (unlikely(show_unhandled_signals))
show_signal_msg(regs, error_code, address, tsk);
-@@ -829,7 +925,7 @@ do_sigbus(struct pt_regs *regs, unsigned
+@@ -829,7 +925,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
printk(KERN_ERR
"MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
@@ -20804,7 +21482,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
code = BUS_MCEERR_AR;
}
#endif
-@@ -884,6 +980,99 @@ static int spurious_fault_check(unsigned
+@@ -884,6 +980,99 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte)
return 1;
}
@@ -20914,7 +21592,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
if (error_code & PF_WRITE) {
/* write, present and write, not present: */
if (unlikely(!(vma->vm_flags & VM_WRITE)))
-@@ -989,19 +1181,33 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -989,19 +1181,33 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
{
struct vm_area_struct *vma;
struct task_struct *tsk;
@@ -20952,7 +21630,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
/*
* Detect and handle instructions that would cause a page fault for
* both a tracked kernel page and a userspace page.
-@@ -1061,7 +1267,7 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1061,7 +1267,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code)
* User-mode registers count as a user access even for any
* potential system fault or CPU buglet:
*/
@@ -20997,13 +21675,13 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
+ if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < task_pt_regs(tsk)->sp)) {
+ bad_area(regs, error_code, address);
+ return;
- }
++ }
+
+#ifdef CONFIG_PAX_SEGMEXEC
+ if (unlikely((mm->pax_flags & MF_PAX_SEGMEXEC) && vma->vm_end - SEGMEXEC_TASK_SIZE - 1 < address - SEGMEXEC_TASK_SIZE - 1)) {
+ bad_area(regs, error_code, address);
+ return;
-+ }
+ }
+#endif
+
if (unlikely(expand_stack(vma, address))) {
@@ -21250,10 +21928,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/fault.c linux-3.1.4/arch/x86/mm/fault.c
+
+ return ret ? -EFAULT : 0;
+}
-diff -urNp linux-3.1.4/arch/x86/mm/gup.c linux-3.1.4/arch/x86/mm/gup.c
---- linux-3.1.4/arch/x86/mm/gup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/gup.c 2011-11-16 18:39:07.000000000 -0500
-@@ -253,7 +253,7 @@ int __get_user_pages_fast(unsigned long
+diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
+index ea30585..b5e1508 100644
+--- a/arch/x86/mm/gup.c
++++ b/arch/x86/mm/gup.c
+@@ -253,7 +253,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
addr = start;
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
@@ -21262,10 +21941,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/gup.c linux-3.1.4/arch/x86/mm/gup.c
(void __user *)start, len)))
return 0;
-diff -urNp linux-3.1.4/arch/x86/mm/highmem_32.c linux-3.1.4/arch/x86/mm/highmem_32.c
---- linux-3.1.4/arch/x86/mm/highmem_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/highmem_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -44,7 +44,10 @@ void *kmap_atomic_prot(struct page *page
+diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
+index b499626..6fd1882 100644
+--- a/arch/x86/mm/highmem_32.c
++++ b/arch/x86/mm/highmem_32.c
+@@ -44,7 +44,10 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
BUG_ON(!pte_none(*(kmap_pte-idx)));
@@ -21276,10 +21956,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/highmem_32.c linux-3.1.4/arch/x86/mm/highmem_
return (void *)vaddr;
}
-diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlbpage.c
---- linux-3.1.4/arch/x86/mm/hugetlbpage.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/hugetlbpage.c 2011-11-16 18:39:07.000000000 -0500
-@@ -266,13 +266,20 @@ static unsigned long hugetlb_get_unmappe
+diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
+index f581a18..29efd37 100644
+--- a/arch/x86/mm/hugetlbpage.c
++++ b/arch/x86/mm/hugetlbpage.c
+@@ -266,13 +266,20 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
@@ -21339,7 +22020,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlb
}
static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
-@@ -308,10 +316,9 @@ static unsigned long hugetlb_get_unmappe
+@@ -308,10 +316,9 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
{
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
@@ -21352,7 +22033,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlb
/* don't allow allocations above current base */
if (mm->free_area_cache > base)
-@@ -321,64 +328,63 @@ static unsigned long hugetlb_get_unmappe
+@@ -321,64 +328,63 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
largest_hole = 0;
mm->free_area_cache = base;
}
@@ -21455,7 +22136,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlb
mm->free_area_cache = base;
mm->cached_hole_size = ~0UL;
-@@ -399,10 +406,19 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -399,10 +406,19 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
@@ -21476,7 +22157,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlb
return -ENOMEM;
if (flags & MAP_FIXED) {
-@@ -414,8 +430,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -414,8 +430,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (addr) {
addr = ALIGN(addr, huge_page_size(h));
vma = find_vma(mm, addr);
@@ -21486,9 +22167,141 @@ diff -urNp linux-3.1.4/arch/x86/mm/hugetlbpage.c linux-3.1.4/arch/x86/mm/hugetlb
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
---- linux-3.1.4/arch/x86/mm/init_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/init_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
+index 87488b9..7129f32 100644
+--- a/arch/x86/mm/init.c
++++ b/arch/x86/mm/init.c
+@@ -31,7 +31,7 @@ int direct_gbpages
+ static void __init find_early_table_space(unsigned long end, int use_pse,
+ int use_gbpages)
+ {
+- unsigned long puds, pmds, ptes, tables, start = 0, good_end = end;
++ unsigned long puds, pmds, ptes, tables, start = 0x100000, good_end = end;
+ phys_addr_t base;
+
+ puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
+@@ -312,8 +312,29 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
+ */
+ int devmem_is_allowed(unsigned long pagenr)
+ {
+- if (pagenr <= 256)
++#ifdef CONFIG_GRKERNSEC_KMEM
++ /* allow BDA */
++ if (!pagenr)
++ return 1;
++ /* allow EBDA */
++ if ((0x9f000 >> PAGE_SHIFT) == pagenr)
++ return 1;
++#else
++ if (!pagenr)
++ return 1;
++#ifdef CONFIG_VM86
++ if (pagenr < (ISA_START_ADDRESS >> PAGE_SHIFT))
++ return 1;
++#endif
++#endif
++
++ if ((ISA_START_ADDRESS >> PAGE_SHIFT) <= pagenr && pagenr < (ISA_END_ADDRESS >> PAGE_SHIFT))
+ return 1;
++#ifdef CONFIG_GRKERNSEC_KMEM
++ /* throw out everything else below 1MB */
++ if (pagenr <= 256)
++ return 0;
++#endif
+ if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
+ return 0;
+ if (!page_is_ram(pagenr))
+@@ -372,6 +393,86 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
+
+ void free_initmem(void)
+ {
++
++#ifdef CONFIG_PAX_KERNEXEC
++#ifdef CONFIG_X86_32
++ /* PaX: limit KERNEL_CS to actual size */
++ unsigned long addr, limit;
++ struct desc_struct d;
++ int cpu;
++
++ limit = paravirt_enabled() ? ktva_ktla(0xffffffff) : (unsigned long)&_etext;
++ limit = (limit - 1UL) >> PAGE_SHIFT;
++
++ memset(__LOAD_PHYSICAL_ADDR + PAGE_OFFSET, POISON_FREE_INITMEM, PAGE_SIZE);
++ for (cpu = 0; cpu < NR_CPUS; cpu++) {
++ pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC);
++ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S);
++ }
++
++ /* PaX: make KERNEL_CS read-only */
++ addr = PFN_ALIGN(ktla_ktva((unsigned long)&_text));
++ if (!paravirt_enabled())
++ set_memory_ro(addr, (PFN_ALIGN(_sdata) - addr) >> PAGE_SHIFT);
++/*
++ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_sdata; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ }
++*/
++#ifdef CONFIG_X86_PAE
++ set_memory_nx(PFN_ALIGN(__init_begin), (PFN_ALIGN(__init_end) - PFN_ALIGN(__init_begin)) >> PAGE_SHIFT);
++/*
++ for (addr = (unsigned long)&__init_begin; addr < (unsigned long)&__init_end; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
++ }
++*/
++#endif
++
++#ifdef CONFIG_MODULES
++ set_memory_4k((unsigned long)MODULES_EXEC_VADDR, (MODULES_EXEC_END - MODULES_EXEC_VADDR) >> PAGE_SHIFT);
++#endif
++
++#else
++ pgd_t *pgd;
++ pud_t *pud;
++ pmd_t *pmd;
++ unsigned long addr, end;
++
++ /* PaX: make kernel code/rodata read-only, rest non-executable */
++ for (addr = __START_KERNEL_map; addr < __START_KERNEL_map + KERNEL_IMAGE_SIZE; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ if (!pmd_present(*pmd))
++ continue;
++ if ((unsigned long)_text <= addr && addr < (unsigned long)_sdata)
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ else
++ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
++ }
++
++ addr = (unsigned long)__va(__pa(__START_KERNEL_map));
++ end = addr + KERNEL_IMAGE_SIZE;
++ for (; addr < end; addr += PMD_SIZE) {
++ pgd = pgd_offset_k(addr);
++ pud = pud_offset(pgd, addr);
++ pmd = pmd_offset(pud, addr);
++ if (!pmd_present(*pmd))
++ continue;
++ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_sdata)))
++ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
++ }
++#endif
++
++ flush_tlb_all();
++#endif
++
+ free_init_pages("unused kernel memory",
+ (unsigned long)(&__init_begin),
+ (unsigned long)(&__init_end));
+diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
+index 29f7c6d..b46b35b 100644
+--- a/arch/x86/mm/init_32.c
++++ b/arch/x86/mm/init_32.c
@@ -74,36 +74,6 @@ static __init void *alloc_low_page(void)
}
@@ -21526,7 +22339,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
* Create a page table and place a pointer to it in a middle page
* directory entry:
*/
-@@ -123,13 +93,28 @@ static pte_t * __init one_page_table_ini
+@@ -123,13 +93,28 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
page_table = (pte_t *)alloc_low_page();
paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
@@ -21555,7 +22368,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
pmd_t * __init populate_extra_pmd(unsigned long vaddr)
{
int pgd_idx = pgd_index(vaddr);
-@@ -203,6 +188,7 @@ page_table_range_init(unsigned long star
+@@ -203,6 +188,7 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
int pgd_idx, pmd_idx;
unsigned long vaddr;
pgd_t *pgd;
@@ -21563,7 +22376,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
pmd_t *pmd;
pte_t *pte = NULL;
-@@ -212,8 +198,13 @@ page_table_range_init(unsigned long star
+@@ -212,8 +198,13 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
pgd = pgd_base + pgd_idx;
for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
@@ -21579,7 +22392,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
pmd++, pmd_idx++) {
pte = page_table_kmap_check(one_page_table_init(pmd),
-@@ -225,11 +216,20 @@ page_table_range_init(unsigned long star
+@@ -225,11 +216,20 @@ page_table_range_init(unsigned long start, unsigned long end, pgd_t *pgd_base)
}
}
@@ -21604,7 +22417,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
}
/*
-@@ -246,9 +246,10 @@ kernel_physical_mapping_init(unsigned lo
+@@ -246,9 +246,10 @@ kernel_physical_mapping_init(unsigned long start,
unsigned long last_map_addr = end;
unsigned long start_pfn, end_pfn;
pgd_t *pgd_base = swapper_pg_dir;
@@ -21679,7 +22492,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
prot = PAGE_KERNEL_EXEC;
pages_4k++;
-@@ -472,7 +473,7 @@ void __init native_pagetable_setup_start
+@@ -472,7 +473,7 @@ void __init native_pagetable_setup_start(pgd_t *base)
pud = pud_offset(pgd, va);
pmd = pmd_offset(pud, va);
@@ -21688,7 +22501,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
break;
pte = pte_offset_kernel(pmd, va);
-@@ -524,12 +525,10 @@ void __init early_ioremap_page_table_ran
+@@ -524,12 +525,10 @@ void __init early_ioremap_page_table_range_init(void)
static void __init pagetable_init(void)
{
@@ -21763,10 +22576,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_32.c linux-3.1.4/arch/x86/mm/init_32.c
set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
printk(KERN_INFO "Write protecting the kernel text: %luk\n",
size >> 10);
-diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
---- linux-3.1.4/arch/x86/mm/init_64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/init_64.c 2011-11-16 18:39:07.000000000 -0500
-@@ -75,7 +75,7 @@ early_param("gbpages", parse_direct_gbpa
+diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
+index bbaaa00..16dffad 100644
+--- a/arch/x86/mm/init_64.c
++++ b/arch/x86/mm/init_64.c
+@@ -75,7 +75,7 @@ early_param("gbpages", parse_direct_gbpages_on);
* around without checking the pgd every time.
*/
@@ -21775,7 +22589,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
EXPORT_SYMBOL_GPL(__supported_pte_mask);
int force_personality32;
-@@ -108,12 +108,22 @@ void sync_global_pgds(unsigned long star
+@@ -108,12 +108,22 @@ void sync_global_pgds(unsigned long start, unsigned long end)
for (address = start; address <= end; address += PGDIR_SIZE) {
const pgd_t *pgd_ref = pgd_offset_k(address);
@@ -21798,7 +22612,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
list_for_each_entry(page, &pgd_list, lru) {
pgd_t *pgd;
spinlock_t *pgt_lock;
-@@ -122,6 +132,7 @@ void sync_global_pgds(unsigned long star
+@@ -122,6 +132,7 @@ void sync_global_pgds(unsigned long start, unsigned long end)
/* the pgt_lock only for Xen */
pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
spin_lock(pgt_lock);
@@ -21806,7 +22620,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
if (pgd_none(*pgd))
set_pgd(pgd, *pgd_ref);
-@@ -129,7 +140,10 @@ void sync_global_pgds(unsigned long star
+@@ -129,7 +140,10 @@ void sync_global_pgds(unsigned long start, unsigned long end)
BUG_ON(pgd_page_vaddr(*pgd)
!= pgd_page_vaddr(*pgd_ref));
@@ -21817,7 +22631,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
}
spin_unlock(&pgd_lock);
}
-@@ -203,7 +217,9 @@ void set_pte_vaddr_pud(pud_t *pud_page,
+@@ -203,7 +217,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
pmd = fill_pmd(pud, vaddr);
pte = fill_pte(pmd, vaddr);
@@ -21827,7 +22641,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
/*
* It's enough to flush this one mapping.
-@@ -262,14 +278,12 @@ static void __init __init_extra_mapping(
+@@ -262,14 +278,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
pgd = pgd_offset_k((unsigned long)__va(phys));
if (pgd_none(*pgd)) {
pud = (pud_t *) spp_getpage();
@@ -21844,7 +22658,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
}
pmd = pmd_offset(pud, phys);
BUG_ON(!pmd_none(*pmd));
-@@ -330,7 +344,7 @@ static __ref void *alloc_low_page(unsign
+@@ -330,7 +344,7 @@ static __ref void *alloc_low_page(unsigned long *phys)
if (pfn >= pgt_buf_top)
panic("alloc_low_page: ran out of memory");
@@ -21853,7 +22667,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
clear_page(adr);
*phys = pfn * PAGE_SIZE;
return adr;
-@@ -346,7 +360,7 @@ static __ref void *map_low_page(void *vi
+@@ -346,7 +360,7 @@ static __ref void *map_low_page(void *virt)
phys = __pa(virt);
left = phys & (PAGE_SIZE - 1);
@@ -21886,7 +22700,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
};
struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
-@@ -888,7 +908,7 @@ int in_gate_area_no_mm(unsigned long add
+@@ -888,7 +908,7 @@ int in_gate_area_no_mm(unsigned long addr)
const char *arch_vma_name(struct vm_area_struct *vma)
{
@@ -21895,140 +22709,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/init_64.c linux-3.1.4/arch/x86/mm/init_64.c
return "[vdso]";
if (vma == &gate_vma)
return "[vsyscall]";
-diff -urNp linux-3.1.4/arch/x86/mm/init.c linux-3.1.4/arch/x86/mm/init.c
---- linux-3.1.4/arch/x86/mm/init.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/init.c 2011-11-17 18:31:28.000000000 -0500
-@@ -31,7 +31,7 @@ int direct_gbpages
- static void __init find_early_table_space(unsigned long end, int use_pse,
- int use_gbpages)
- {
-- unsigned long puds, pmds, ptes, tables, start = 0, good_end = end;
-+ unsigned long puds, pmds, ptes, tables, start = 0x100000, good_end = end;
- phys_addr_t base;
-
- puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
-@@ -312,8 +312,29 @@ unsigned long __init_refok init_memory_m
- */
- int devmem_is_allowed(unsigned long pagenr)
- {
-- if (pagenr <= 256)
-+#ifdef CONFIG_GRKERNSEC_KMEM
-+ /* allow BDA */
-+ if (!pagenr)
-+ return 1;
-+ /* allow EBDA */
-+ if ((0x9f000 >> PAGE_SHIFT) == pagenr)
-+ return 1;
-+#else
-+ if (!pagenr)
-+ return 1;
-+#ifdef CONFIG_VM86
-+ if (pagenr < (ISA_START_ADDRESS >> PAGE_SHIFT))
-+ return 1;
-+#endif
-+#endif
-+
-+ if ((ISA_START_ADDRESS >> PAGE_SHIFT) <= pagenr && pagenr < (ISA_END_ADDRESS >> PAGE_SHIFT))
- return 1;
-+#ifdef CONFIG_GRKERNSEC_KMEM
-+ /* throw out everything else below 1MB */
-+ if (pagenr <= 256)
-+ return 0;
-+#endif
- if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
- return 0;
- if (!page_is_ram(pagenr))
-@@ -372,6 +393,86 @@ void free_init_pages(char *what, unsigne
-
- void free_initmem(void)
- {
-+
-+#ifdef CONFIG_PAX_KERNEXEC
-+#ifdef CONFIG_X86_32
-+ /* PaX: limit KERNEL_CS to actual size */
-+ unsigned long addr, limit;
-+ struct desc_struct d;
-+ int cpu;
-+
-+ limit = paravirt_enabled() ? ktva_ktla(0xffffffff) : (unsigned long)&_etext;
-+ limit = (limit - 1UL) >> PAGE_SHIFT;
-+
-+ memset(__LOAD_PHYSICAL_ADDR + PAGE_OFFSET, POISON_FREE_INITMEM, PAGE_SIZE);
-+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
-+ pack_descriptor(&d, get_desc_base(&get_cpu_gdt_table(cpu)[GDT_ENTRY_KERNEL_CS]), limit, 0x9B, 0xC);
-+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_KERNEL_CS, &d, DESCTYPE_S);
-+ }
-+
-+ /* PaX: make KERNEL_CS read-only */
-+ addr = PFN_ALIGN(ktla_ktva((unsigned long)&_text));
-+ if (!paravirt_enabled())
-+ set_memory_ro(addr, (PFN_ALIGN(_sdata) - addr) >> PAGE_SHIFT);
-+/*
-+ for (addr = ktla_ktva((unsigned long)&_text); addr < (unsigned long)&_sdata; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ }
-+*/
-+#ifdef CONFIG_X86_PAE
-+ set_memory_nx(PFN_ALIGN(__init_begin), (PFN_ALIGN(__init_end) - PFN_ALIGN(__init_begin)) >> PAGE_SHIFT);
-+/*
-+ for (addr = (unsigned long)&__init_begin; addr < (unsigned long)&__init_end; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
-+ }
-+*/
-+#endif
-+
-+#ifdef CONFIG_MODULES
-+ set_memory_4k((unsigned long)MODULES_EXEC_VADDR, (MODULES_EXEC_END - MODULES_EXEC_VADDR) >> PAGE_SHIFT);
-+#endif
-+
-+#else
-+ pgd_t *pgd;
-+ pud_t *pud;
-+ pmd_t *pmd;
-+ unsigned long addr, end;
-+
-+ /* PaX: make kernel code/rodata read-only, rest non-executable */
-+ for (addr = __START_KERNEL_map; addr < __START_KERNEL_map + KERNEL_IMAGE_SIZE; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ if (!pmd_present(*pmd))
-+ continue;
-+ if ((unsigned long)_text <= addr && addr < (unsigned long)_sdata)
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ else
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) | (_PAGE_NX & __supported_pte_mask)));
-+ }
-+
-+ addr = (unsigned long)__va(__pa(__START_KERNEL_map));
-+ end = addr + KERNEL_IMAGE_SIZE;
-+ for (; addr < end; addr += PMD_SIZE) {
-+ pgd = pgd_offset_k(addr);
-+ pud = pud_offset(pgd, addr);
-+ pmd = pmd_offset(pud, addr);
-+ if (!pmd_present(*pmd))
-+ continue;
-+ if ((unsigned long)__va(__pa(_text)) <= addr && addr < (unsigned long)__va(__pa(_sdata)))
-+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_RW));
-+ }
-+#endif
-+
-+ flush_tlb_all();
-+#endif
-+
- free_init_pages("unused kernel memory",
- (unsigned long)(&__init_begin),
- (unsigned long)(&__init_end));
-diff -urNp linux-3.1.4/arch/x86/mm/iomap_32.c linux-3.1.4/arch/x86/mm/iomap_32.c
---- linux-3.1.4/arch/x86/mm/iomap_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/iomap_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -64,7 +64,11 @@ void *kmap_atomic_prot_pfn(unsigned long
+diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
+index 7b179b4..6bd1777 100644
+--- a/arch/x86/mm/iomap_32.c
++++ b/arch/x86/mm/iomap_32.c
+@@ -64,7 +64,11 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
type = kmap_atomic_idx_push();
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -22040,10 +22725,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/iomap_32.c linux-3.1.4/arch/x86/mm/iomap_32.c
arch_flush_lazy_mmu_mode();
return (void *)vaddr;
-diff -urNp linux-3.1.4/arch/x86/mm/ioremap.c linux-3.1.4/arch/x86/mm/ioremap.c
---- linux-3.1.4/arch/x86/mm/ioremap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/ioremap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -97,7 +97,7 @@ static void __iomem *__ioremap_caller(re
+diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
+index be1ef57..9680edc 100644
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
+@@ -97,7 +97,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
for (pfn = phys_addr >> PAGE_SHIFT; pfn <= last_pfn; pfn++) {
int is_ram = page_is_ram(pfn);
@@ -22052,7 +22738,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/ioremap.c linux-3.1.4/arch/x86/mm/ioremap.c
return NULL;
WARN_ON_ONCE(is_ram);
}
-@@ -344,7 +344,7 @@ static int __init early_ioremap_debug_se
+@@ -344,7 +344,7 @@ static int __init early_ioremap_debug_setup(char *str)
early_param("early_ioremap_debug", early_ioremap_debug_setup);
static __initdata int after_paging_init;
@@ -22071,10 +22757,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/ioremap.c linux-3.1.4/arch/x86/mm/ioremap.c
/*
* The boot-ioremap range spans multiple pmds, for which
-diff -urNp linux-3.1.4/arch/x86/mm/kmemcheck/kmemcheck.c linux-3.1.4/arch/x86/mm/kmemcheck/kmemcheck.c
---- linux-3.1.4/arch/x86/mm/kmemcheck/kmemcheck.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/kmemcheck/kmemcheck.c 2011-11-16 18:39:07.000000000 -0500
-@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *reg
+diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
+index d87dd6d..bf3fa66 100644
+--- a/arch/x86/mm/kmemcheck/kmemcheck.c
++++ b/arch/x86/mm/kmemcheck/kmemcheck.c
+@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *regs, unsigned long address,
* memory (e.g. tracked pages)? For now, we need this to avoid
* invoking kmemcheck for PnP BIOS calls.
*/
@@ -22086,10 +22773,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/kmemcheck/kmemcheck.c linux-3.1.4/arch/x86/mm
return false;
pte = kmemcheck_pte_lookup(address);
-diff -urNp linux-3.1.4/arch/x86/mm/mmap.c linux-3.1.4/arch/x86/mm/mmap.c
---- linux-3.1.4/arch/x86/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/mmap.c 2011-11-16 18:39:07.000000000 -0500
-@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size
+diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
+index 1dab519..60a7e5f 100644
+--- a/arch/x86/mm/mmap.c
++++ b/arch/x86/mm/mmap.c
+@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size(void)
* Leave an at least ~128 MB hole with possible stack randomization.
*/
#define MIN_GAP (128*1024*1024UL + stack_maxrandom_size())
@@ -22144,7 +22832,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/mmap.c linux-3.1.4/arch/x86/mm/mmap.c
return TASK_UNMAPPED_BASE + mmap_rnd();
}
-@@ -125,11 +138,23 @@ static unsigned long mmap_legacy_base(vo
+@@ -125,11 +138,23 @@ static unsigned long mmap_legacy_base(void)
void arch_pick_mmap_layout(struct mm_struct *mm)
{
if (mmap_is_legacy()) {
@@ -22170,10 +22858,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/mmap.c linux-3.1.4/arch/x86/mm/mmap.c
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-3.1.4/arch/x86/mm/mmio-mod.c linux-3.1.4/arch/x86/mm/mmio-mod.c
---- linux-3.1.4/arch/x86/mm/mmio-mod.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/mmio-mod.c 2011-11-16 18:39:07.000000000 -0500
-@@ -195,7 +195,7 @@ static void pre(struct kmmio_probe *p, s
+diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
+index 67421f3..8d6b107 100644
+--- a/arch/x86/mm/mmio-mod.c
++++ b/arch/x86/mm/mmio-mod.c
+@@ -195,7 +195,7 @@ static void pre(struct kmmio_probe *p, struct pt_regs *regs,
break;
default:
{
@@ -22182,7 +22871,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/mmio-mod.c linux-3.1.4/arch/x86/mm/mmio-mod.c
my_trace->opcode = MMIO_UNKNOWN_OP;
my_trace->width = 0;
my_trace->value = (*ip) << 16 | *(ip + 1) << 8 |
-@@ -235,7 +235,7 @@ static void post(struct kmmio_probe *p,
+@@ -235,7 +235,7 @@ static void post(struct kmmio_probe *p, unsigned long condition,
static void ioremap_trace_core(resource_size_t offset, unsigned long size,
void __iomem *addr)
{
@@ -22191,7 +22880,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/mmio-mod.c linux-3.1.4/arch/x86/mm/mmio-mod.c
struct remap_trace *trace = kmalloc(sizeof(*trace), GFP_KERNEL);
/* These are page-unaligned. */
struct mmiotrace_map map = {
-@@ -259,7 +259,7 @@ static void ioremap_trace_core(resource_
+@@ -259,7 +259,7 @@ static void ioremap_trace_core(resource_size_t offset, unsigned long size,
.private = trace
},
.phys = offset,
@@ -22200,10 +22889,24 @@ diff -urNp linux-3.1.4/arch/x86/mm/mmio-mod.c linux-3.1.4/arch/x86/mm/mmio-mod.c
};
map.map_id = trace->id;
-diff -urNp linux-3.1.4/arch/x86/mm/pageattr.c linux-3.1.4/arch/x86/mm/pageattr.c
---- linux-3.1.4/arch/x86/mm/pageattr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pageattr.c 2011-11-16 18:39:07.000000000 -0500
-@@ -261,7 +261,7 @@ static inline pgprot_t static_protection
+diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
+index b008656..773eac2 100644
+--- a/arch/x86/mm/pageattr-test.c
++++ b/arch/x86/mm/pageattr-test.c
+@@ -36,7 +36,7 @@ enum {
+
+ static int pte_testbit(pte_t pte)
+ {
+- return pte_flags(pte) & _PAGE_UNUSED1;
++ return pte_flags(pte) & _PAGE_CPA_TEST;
+ }
+
+ struct split_state {
+diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
+index f9e5267..6f6e27f 100644
+--- a/arch/x86/mm/pageattr.c
++++ b/arch/x86/mm/pageattr.c
+@@ -261,7 +261,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
*/
#ifdef CONFIG_PCI_BIOS
if (pcibios_enabled && within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
@@ -22212,7 +22915,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pageattr.c linux-3.1.4/arch/x86/mm/pageattr.c
#endif
/*
-@@ -269,9 +269,10 @@ static inline pgprot_t static_protection
+@@ -269,9 +269,10 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
* Does not cover __inittext since that is gone later on. On
* 64bit we do not enforce !NX on the low mapping
*/
@@ -22225,7 +22928,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pageattr.c linux-3.1.4/arch/x86/mm/pageattr.c
/*
* The .rodata section needs to be read-only. Using the pfn
* catches all aliases.
-@@ -279,6 +280,7 @@ static inline pgprot_t static_protection
+@@ -279,6 +280,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
__pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
pgprot_val(forbidden) |= _PAGE_RW;
@@ -22233,7 +22936,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pageattr.c linux-3.1.4/arch/x86/mm/pageattr.c
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
/*
-@@ -317,6 +319,13 @@ static inline pgprot_t static_protection
+@@ -317,6 +319,13 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
}
#endif
@@ -22287,21 +22990,10 @@ diff -urNp linux-3.1.4/arch/x86/mm/pageattr.c linux-3.1.4/arch/x86/mm/pageattr.c
}
static int
-diff -urNp linux-3.1.4/arch/x86/mm/pageattr-test.c linux-3.1.4/arch/x86/mm/pageattr-test.c
---- linux-3.1.4/arch/x86/mm/pageattr-test.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pageattr-test.c 2011-11-16 18:39:07.000000000 -0500
-@@ -36,7 +36,7 @@ enum {
-
- static int pte_testbit(pte_t pte)
- {
-- return pte_flags(pte) & _PAGE_UNUSED1;
-+ return pte_flags(pte) & _PAGE_CPA_TEST;
- }
-
- struct split_state {
-diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
---- linux-3.1.4/arch/x86/mm/pat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pat.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
+index f6ff57b..481690f 100644
+--- a/arch/x86/mm/pat.c
++++ b/arch/x86/mm/pat.c
@@ -361,7 +361,7 @@ int free_memtype(u64 start, u64 end)
if (!entry) {
@@ -22311,7 +23003,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
return -EINVAL;
}
-@@ -492,8 +492,8 @@ static inline int range_is_allowed(unsig
+@@ -492,8 +492,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
printk(KERN_INFO
@@ -22322,7 +23014,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
return 0;
}
cursor += PAGE_SIZE;
-@@ -557,7 +557,7 @@ int kernel_map_sync_memtype(u64 base, un
+@@ -557,7 +557,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
printk(KERN_INFO
"%s:%d ioremap_change_attr failed %s "
"for %Lx-%Lx\n",
@@ -22331,7 +23023,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
cattr_name(flags),
base, (unsigned long long)(base + size));
return -EINVAL;
-@@ -593,7 +593,7 @@ static int reserve_pfn_range(u64 paddr,
+@@ -593,7 +593,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
if (want_flags != flags) {
printk(KERN_WARNING
"%s:%d map pfn RAM range req %s for %Lx-%Lx, got %s\n",
@@ -22340,7 +23032,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
cattr_name(want_flags),
(unsigned long long)paddr,
(unsigned long long)(paddr + size),
-@@ -615,7 +615,7 @@ static int reserve_pfn_range(u64 paddr,
+@@ -615,7 +615,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
free_memtype(paddr, paddr + size);
printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
" for %Lx-%Lx, got %s\n",
@@ -22349,10 +23041,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/pat.c linux-3.1.4/arch/x86/mm/pat.c
cattr_name(want_flags),
(unsigned long long)paddr,
(unsigned long long)(paddr + size),
-diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
---- linux-3.1.4/arch/x86/mm/pf_in.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pf_in.c 2011-11-16 18:39:07.000000000 -0500
-@@ -148,7 +148,7 @@ enum reason_type get_ins_type(unsigned l
+diff --git a/arch/x86/mm/pf_in.c b/arch/x86/mm/pf_in.c
+index 9f0614d..92ae64a 100644
+--- a/arch/x86/mm/pf_in.c
++++ b/arch/x86/mm/pf_in.c
+@@ -148,7 +148,7 @@ enum reason_type get_ins_type(unsigned long ins_addr)
int i;
enum reason_type rv = OTHERS;
@@ -22361,7 +23054,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -168,7 +168,7 @@ static unsigned int get_ins_reg_width(un
+@@ -168,7 +168,7 @@ static unsigned int get_ins_reg_width(unsigned long ins_addr)
struct prefix_bits prf;
int i;
@@ -22370,7 +23063,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -191,7 +191,7 @@ unsigned int get_ins_mem_width(unsigned
+@@ -191,7 +191,7 @@ unsigned int get_ins_mem_width(unsigned long ins_addr)
struct prefix_bits prf;
int i;
@@ -22379,7 +23072,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
-@@ -415,7 +415,7 @@ unsigned long get_ins_reg_val(unsigned l
+@@ -415,7 +415,7 @@ unsigned long get_ins_reg_val(unsigned long ins_addr, struct pt_regs *regs)
struct prefix_bits prf;
int i;
@@ -22388,7 +23081,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
for (i = 0; i < ARRAY_SIZE(reg_rop); i++)
-@@ -470,7 +470,7 @@ unsigned long get_ins_imm_val(unsigned l
+@@ -470,7 +470,7 @@ unsigned long get_ins_imm_val(unsigned long ins_addr)
struct prefix_bits prf;
int i;
@@ -22397,27 +23090,11 @@ diff -urNp linux-3.1.4/arch/x86/mm/pf_in.c linux-3.1.4/arch/x86/mm/pf_in.c
p += skip_prefix(p, &prf);
p += get_opcode(p, &opcode);
for (i = 0; i < ARRAY_SIZE(imm_wop); i++)
-diff -urNp linux-3.1.4/arch/x86/mm/pgtable_32.c linux-3.1.4/arch/x86/mm/pgtable_32.c
---- linux-3.1.4/arch/x86/mm/pgtable_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pgtable_32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -48,10 +48,13 @@ void set_pte_vaddr(unsigned long vaddr,
- return;
- }
- pte = pte_offset_kernel(pmd, vaddr);
-+
-+ pax_open_kernel();
- if (pte_val(pteval))
- set_pte_at(&init_mm, vaddr, pte, pteval);
- else
- pte_clear(&init_mm, vaddr, pte);
-+ pax_close_kernel();
-
- /*
- * It's enough to flush this one mapping.
-diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
---- linux-3.1.4/arch/x86/mm/pgtable.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/pgtable.c 2011-11-16 18:39:07.000000000 -0500
-@@ -84,10 +84,52 @@ static inline void pgd_list_del(pgd_t *p
+diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
+index 8573b83..6372501 100644
+--- a/arch/x86/mm/pgtable.c
++++ b/arch/x86/mm/pgtable.c
+@@ -84,10 +84,52 @@ static inline void pgd_list_del(pgd_t *pgd)
list_del(&page->lru);
}
@@ -22443,7 +23120,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
+#else
+ *dst++ = *src++;
+#endif
-
++
+}
+#endif
+
@@ -22464,7 +23141,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
+#define pyd_offset(mm ,address) pud_offset((mm), (address))
+#define PYD_SIZE PUD_SIZE
+#endif
-+
+
+#ifdef CONFIG_PAX_PER_CPU_PGD
+static inline void pgd_ctor(struct mm_struct *mm, pgd_t *pgd) {}
+static inline void pgd_dtor(pgd_t *pgd) {}
@@ -22498,7 +23175,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
{
-@@ -170,36 +213,38 @@ void pud_populate(struct mm_struct *mm,
+@@ -170,36 +213,38 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
*/
flush_tlb_mm(mm);
}
@@ -22548,7 +23225,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
return -ENOMEM;
}
-@@ -212,51 +257,55 @@ static int preallocate_pmds(pmd_t *pmds[
+@@ -212,51 +257,55 @@ static int preallocate_pmds(pmd_t *pmds[])
* preallocate which never got a corresponding vma will need to be
* freed manually.
*/
@@ -22662,9 +23339,28 @@ diff -urNp linux-3.1.4/arch/x86/mm/pgtable.c linux-3.1.4/arch/x86/mm/pgtable.c
pgd_dtor(pgd);
paravirt_pgd_free(mm, pgd);
free_page((unsigned long)pgd);
-diff -urNp linux-3.1.4/arch/x86/mm/setup_nx.c linux-3.1.4/arch/x86/mm/setup_nx.c
---- linux-3.1.4/arch/x86/mm/setup_nx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/setup_nx.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
+index cac7184..09a39fa 100644
+--- a/arch/x86/mm/pgtable_32.c
++++ b/arch/x86/mm/pgtable_32.c
+@@ -48,10 +48,13 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pteval)
+ return;
+ }
+ pte = pte_offset_kernel(pmd, vaddr);
++
++ pax_open_kernel();
+ if (pte_val(pteval))
+ set_pte_at(&init_mm, vaddr, pte, pteval);
+ else
+ pte_clear(&init_mm, vaddr, pte);
++ pax_close_kernel();
+
+ /*
+ * It's enough to flush this one mapping.
+diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
+index 410531d..0f16030 100644
+--- a/arch/x86/mm/setup_nx.c
++++ b/arch/x86/mm/setup_nx.c
@@ -5,8 +5,10 @@
#include <asm/pgtable.h>
#include <asm/proto.h>
@@ -22676,7 +23372,7 @@ diff -urNp linux-3.1.4/arch/x86/mm/setup_nx.c linux-3.1.4/arch/x86/mm/setup_nx.c
/*
* noexec = on|off
*
-@@ -28,12 +30,17 @@ static int __init noexec_setup(char *str
+@@ -28,12 +30,17 @@ static int __init noexec_setup(char *str)
return 0;
}
early_param("noexec", noexec_setup);
@@ -22694,9 +23390,10 @@ diff -urNp linux-3.1.4/arch/x86/mm/setup_nx.c linux-3.1.4/arch/x86/mm/setup_nx.c
__supported_pte_mask &= ~_PAGE_NX;
}
-diff -urNp linux-3.1.4/arch/x86/mm/tlb.c linux-3.1.4/arch/x86/mm/tlb.c
---- linux-3.1.4/arch/x86/mm/tlb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/mm/tlb.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
+index d6c0418..06a0ad5 100644
+--- a/arch/x86/mm/tlb.c
++++ b/arch/x86/mm/tlb.c
@@ -65,7 +65,11 @@ void leave_mm(int cpu)
BUG();
cpumask_clear_cpu(cpu,
@@ -22709,90 +23406,10 @@ diff -urNp linux-3.1.4/arch/x86/mm/tlb.c linux-3.1.4/arch/x86/mm/tlb.c
}
EXPORT_SYMBOL_GPL(leave_mm);
-diff -urNp linux-3.1.4/arch/x86/net/bpf_jit_comp.c linux-3.1.4/arch/x86/net/bpf_jit_comp.c
---- linux-3.1.4/arch/x86/net/bpf_jit_comp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/net/bpf_jit_comp.c 2011-11-20 19:21:53.000000000 -0500
-@@ -117,6 +117,10 @@ static inline void bpf_flush_icache(void
- set_fs(old_fs);
- }
-
-+struct bpf_jit_work {
-+ struct work_struct work;
-+ void *image;
-+};
-
- void bpf_jit_compile(struct sk_filter *fp)
- {
-@@ -141,6 +145,10 @@ void bpf_jit_compile(struct sk_filter *f
- if (addrs == NULL)
- return;
-
-+ fp->work = kmalloc(sizeof(*fp->work), GFP_KERNEL);
-+ if (!fp->work)
-+ goto out;
-+
- /* Before first pass, make a rough estimation of addrs[]
- * each bpf instruction is translated to less than 64 bytes
- */
-@@ -585,11 +593,12 @@ cond_branch: f_offset = addrs[i + filt
- if (image) {
- if (unlikely(proglen + ilen > oldproglen)) {
- pr_err("bpb_jit_compile fatal error\n");
-- kfree(addrs);
-- module_free(NULL, image);
-- return;
-+ module_free_exec(NULL, image);
-+ goto out;
- }
-+ pax_open_kernel();
- memcpy(image + proglen, temp, ilen);
-+ pax_close_kernel();
- }
- proglen += ilen;
- addrs[i] = proglen;
-@@ -609,7 +618,7 @@ cond_branch: f_offset = addrs[i + filt
- break;
- }
- if (proglen == oldproglen) {
-- image = module_alloc(max_t(unsigned int,
-+ image = module_alloc_exec(max_t(unsigned int,
- proglen,
- sizeof(struct work_struct)));
- if (!image)
-@@ -631,24 +640,27 @@ cond_branch: f_offset = addrs[i + filt
- fp->bpf_func = (void *)image;
- }
- out:
-+ kfree(fp->work);
- kfree(addrs);
- return;
- }
-
- static void jit_free_defer(struct work_struct *arg)
- {
-- module_free(NULL, arg);
-+ module_free_exec(NULL, ((struct bpf_jit_work*)arg)->image);
-+ kfree(arg);
- }
-
- /* run from softirq, we must use a work_struct to call
-- * module_free() from process context
-+ * module_free_exec() from process context
- */
- void bpf_jit_free(struct sk_filter *fp)
- {
- if (fp->bpf_func != sk_run_filter) {
-- struct work_struct *work = (struct work_struct *)fp->bpf_func;
-+ struct work_struct *work = &fp->work->work;
-
- INIT_WORK(work, jit_free_defer);
-+ fp->work->image = fp->bpf_func;
- schedule_work(work);
- }
- }
-diff -urNp linux-3.1.4/arch/x86/net/bpf_jit.S linux-3.1.4/arch/x86/net/bpf_jit.S
---- linux-3.1.4/arch/x86/net/bpf_jit.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/net/bpf_jit.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/net/bpf_jit.S b/arch/x86/net/bpf_jit.S
+index 6687022..ceabcfa 100644
+--- a/arch/x86/net/bpf_jit.S
++++ b/arch/x86/net/bpf_jit.S
@@ -9,6 +9,7 @@
*/
#include <linux/linkage.h>
@@ -22870,10 +23487,93 @@ diff -urNp linux-3.1.4/arch/x86/net/bpf_jit.S linux-3.1.4/arch/x86/net/bpf_jit.S
xchg %eax,%ebx
+ pax_force_retaddr
ret
-diff -urNp linux-3.1.4/arch/x86/oprofile/backtrace.c linux-3.1.4/arch/x86/oprofile/backtrace.c
---- linux-3.1.4/arch/x86/oprofile/backtrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/oprofile/backtrace.c 2011-11-16 18:39:07.000000000 -0500
-@@ -46,11 +46,11 @@ dump_user_backtrace_32(struct stack_fram
+diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
+index bfab3fa..05aac3a 100644
+--- a/arch/x86/net/bpf_jit_comp.c
++++ b/arch/x86/net/bpf_jit_comp.c
+@@ -117,6 +117,10 @@ static inline void bpf_flush_icache(void *start, void *end)
+ set_fs(old_fs);
+ }
+
++struct bpf_jit_work {
++ struct work_struct work;
++ void *image;
++};
+
+ void bpf_jit_compile(struct sk_filter *fp)
+ {
+@@ -141,6 +145,10 @@ void bpf_jit_compile(struct sk_filter *fp)
+ if (addrs == NULL)
+ return;
+
++ fp->work = kmalloc(sizeof(*fp->work), GFP_KERNEL);
++ if (!fp->work)
++ goto out;
++
+ /* Before first pass, make a rough estimation of addrs[]
+ * each bpf instruction is translated to less than 64 bytes
+ */
+@@ -585,11 +593,12 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
+ if (image) {
+ if (unlikely(proglen + ilen > oldproglen)) {
+ pr_err("bpb_jit_compile fatal error\n");
+- kfree(addrs);
+- module_free(NULL, image);
+- return;
++ module_free_exec(NULL, image);
++ goto out;
+ }
++ pax_open_kernel();
+ memcpy(image + proglen, temp, ilen);
++ pax_close_kernel();
+ }
+ proglen += ilen;
+ addrs[i] = proglen;
+@@ -609,7 +618,7 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
+ break;
+ }
+ if (proglen == oldproglen) {
+- image = module_alloc(max_t(unsigned int,
++ image = module_alloc_exec(max_t(unsigned int,
+ proglen,
+ sizeof(struct work_struct)));
+ if (!image)
+@@ -631,24 +640,27 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
+ fp->bpf_func = (void *)image;
+ }
+ out:
++ kfree(fp->work);
+ kfree(addrs);
+ return;
+ }
+
+ static void jit_free_defer(struct work_struct *arg)
+ {
+- module_free(NULL, arg);
++ module_free_exec(NULL, ((struct bpf_jit_work*)arg)->image);
++ kfree(arg);
+ }
+
+ /* run from softirq, we must use a work_struct to call
+- * module_free() from process context
++ * module_free_exec() from process context
+ */
+ void bpf_jit_free(struct sk_filter *fp)
+ {
+ if (fp->bpf_func != sk_run_filter) {
+- struct work_struct *work = (struct work_struct *)fp->bpf_func;
++ struct work_struct *work = &fp->work->work;
+
+ INIT_WORK(work, jit_free_defer);
++ fp->work->image = fp->bpf_func;
+ schedule_work(work);
+ }
+ }
+diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
+index bff89df..377758a 100644
+--- a/arch/x86/oprofile/backtrace.c
++++ b/arch/x86/oprofile/backtrace.c
+@@ -46,11 +46,11 @@ dump_user_backtrace_32(struct stack_frame_ia32 *head)
struct stack_frame_ia32 *fp;
unsigned long bytes;
@@ -22887,7 +23587,7 @@ diff -urNp linux-3.1.4/arch/x86/oprofile/backtrace.c linux-3.1.4/arch/x86/oprofi
oprofile_add_trace(bufhead[0].return_address);
-@@ -92,7 +92,7 @@ static struct stack_frame *dump_user_bac
+@@ -92,7 +92,7 @@ static struct stack_frame *dump_user_backtrace(struct stack_frame *head)
struct stack_frame bufhead[2];
unsigned long bytes;
@@ -22896,7 +23596,7 @@ diff -urNp linux-3.1.4/arch/x86/oprofile/backtrace.c linux-3.1.4/arch/x86/oprofi
if (bytes != sizeof(bufhead))
return NULL;
-@@ -111,7 +111,7 @@ x86_backtrace(struct pt_regs * const reg
+@@ -111,7 +111,7 @@ x86_backtrace(struct pt_regs * const regs, unsigned int depth)
{
struct stack_frame *head = (struct stack_frame *)frame_pointer(regs);
@@ -22905,9 +23605,10 @@ diff -urNp linux-3.1.4/arch/x86/oprofile/backtrace.c linux-3.1.4/arch/x86/oprofi
unsigned long stack = kernel_stack_pointer(regs);
if (depth)
dump_trace(NULL, regs, (unsigned long *)stack, 0,
-diff -urNp linux-3.1.4/arch/x86/pci/mrst.c linux-3.1.4/arch/x86/pci/mrst.c
---- linux-3.1.4/arch/x86/pci/mrst.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/pci/mrst.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
+index cb29191..036766d 100644
+--- a/arch/x86/pci/mrst.c
++++ b/arch/x86/pci/mrst.c
@@ -234,7 +234,9 @@ int __init pci_mrst_init(void)
printk(KERN_INFO "Moorestown platform detected, using MRST PCI ops\n");
pci_mmcfg_late_init();
@@ -22919,9 +23620,10 @@ diff -urNp linux-3.1.4/arch/x86/pci/mrst.c linux-3.1.4/arch/x86/pci/mrst.c
/* Continue with standard init */
return 1;
}
-diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
---- linux-3.1.4/arch/x86/pci/pcbios.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/pci/pcbios.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
+index f685535..2b76a81 100644
+--- a/arch/x86/pci/pcbios.c
++++ b/arch/x86/pci/pcbios.c
@@ -79,50 +79,93 @@ union bios32 {
static struct {
unsigned long address;
@@ -23057,7 +23759,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
: "memory");
local_irq_restore(flags);
-@@ -189,7 +235,10 @@ static int pci_bios_read(unsigned int se
+@@ -189,7 +235,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
switch (len) {
case 1:
@@ -23069,7 +23771,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -198,7 +247,8 @@ static int pci_bios_read(unsigned int se
+@@ -198,7 +247,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_BYTE),
"b" (bx),
"D" ((long)reg),
@@ -23079,7 +23781,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
/*
* Zero-extend the result beyond 8 bits, do not trust the
* BIOS having done it:
-@@ -206,7 +256,10 @@ static int pci_bios_read(unsigned int se
+@@ -206,7 +256,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
*value &= 0xff;
break;
case 2:
@@ -23091,7 +23793,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -215,7 +268,8 @@ static int pci_bios_read(unsigned int se
+@@ -215,7 +268,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_WORD),
"b" (bx),
"D" ((long)reg),
@@ -23101,7 +23803,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
/*
* Zero-extend the result beyond 16 bits, do not trust the
* BIOS having done it:
-@@ -223,7 +277,10 @@ static int pci_bios_read(unsigned int se
+@@ -223,7 +277,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
*value &= 0xffff;
break;
case 4:
@@ -23113,7 +23815,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -232,7 +289,8 @@ static int pci_bios_read(unsigned int se
+@@ -232,7 +289,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
: "1" (PCIBIOS_READ_CONFIG_DWORD),
"b" (bx),
"D" ((long)reg),
@@ -23123,7 +23825,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
break;
}
-@@ -256,7 +314,10 @@ static int pci_bios_write(unsigned int s
+@@ -256,7 +314,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
switch (len) {
case 1:
@@ -23135,7 +23837,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -265,10 +326,14 @@ static int pci_bios_write(unsigned int s
+@@ -265,10 +326,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -23152,7 +23854,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -277,10 +342,14 @@ static int pci_bios_write(unsigned int s
+@@ -277,10 +342,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -23169,7 +23871,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -289,7 +358,8 @@ static int pci_bios_write(unsigned int s
+@@ -289,7 +358,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
"c" (value),
"b" (bx),
"D" ((long)reg),
@@ -23179,7 +23881,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
break;
}
-@@ -394,10 +464,13 @@ struct irq_routing_table * pcibios_get_i
+@@ -394,10 +464,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
DBG("PCI: Fetching IRQ routing table... ");
__asm__("push %%es\n\t"
@@ -23194,7 +23896,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -408,7 +481,8 @@ struct irq_routing_table * pcibios_get_i
+@@ -408,7 +481,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
"1" (0),
"D" ((long) &opt),
"S" (&pci_indirect),
@@ -23204,7 +23906,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00)
-@@ -432,7 +506,10 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -432,7 +506,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
{
int ret;
@@ -23216,7 +23918,7 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -440,7 +517,8 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -440,7 +517,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
: "0" (PCIBIOS_SET_PCI_HW_INT),
"b" ((dev->bus->number << 8) | dev->devfn),
"c" ((irq << 8) | (pin + 10)),
@@ -23226,9 +23928,10 @@ diff -urNp linux-3.1.4/arch/x86/pci/pcbios.c linux-3.1.4/arch/x86/pci/pcbios.c
return !(ret & 0xff00);
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
-diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_32.c linux-3.1.4/arch/x86/platform/efi/efi_32.c
---- linux-3.1.4/arch/x86/platform/efi/efi_32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/platform/efi/efi_32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
+index 5cab48e..b025f9b 100644
+--- a/arch/x86/platform/efi/efi_32.c
++++ b/arch/x86/platform/efi/efi_32.c
@@ -38,70 +38,56 @@
*/
@@ -23243,10 +23946,11 @@ diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_32.c linux-3.1.4/arch/x86/platf
- unsigned long temp;
struct desc_ptr gdt_descr;
-- local_irq_save(efi_rt_eflags);
+#ifdef CONFIG_PAX_KERNEXEC
+ struct desc_struct d;
+#endif
++
+ local_irq_save(efi_rt_eflags);
- /*
- * If I don't have PAE, I should just duplicate two entries in page
@@ -23254,8 +23958,7 @@ diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_32.c linux-3.1.4/arch/x86/platf
- * page directory.
- */
- cr4 = read_cr4_safe();
-+ local_irq_save(efi_rt_eflags);
-
+-
- if (cr4 & X86_CR4_PAE) {
- efi_bak_pg_dir_pointer[0].pgd =
- swapper_pg_dir[pgd_index(0)].pgd;
@@ -23326,9 +24029,10 @@ diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_32.c linux-3.1.4/arch/x86/platf
/*
* After the lock is released, the original page table is restored.
-diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_stub_32.S linux-3.1.4/arch/x86/platform/efi/efi_stub_32.S
---- linux-3.1.4/arch/x86/platform/efi/efi_stub_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/platform/efi/efi_stub_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/platform/efi/efi_stub_32.S b/arch/x86/platform/efi/efi_stub_32.S
+index fbe66e6..c5c0dd2 100644
+--- a/arch/x86/platform/efi/efi_stub_32.S
++++ b/arch/x86/platform/efi/efi_stub_32.S
@@ -6,7 +6,9 @@
*/
@@ -23437,9 +24141,10 @@ diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_stub_32.S linux-3.1.4/arch/x86/
saved_return_addr:
.long 0
efi_rt_function_ptr:
-diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_stub_64.S linux-3.1.4/arch/x86/platform/efi/efi_stub_64.S
---- linux-3.1.4/arch/x86/platform/efi/efi_stub_64.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/platform/efi/efi_stub_64.S 2011-12-02 17:38:47.000000000 -0500
+diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S
+index 4c07cca..2c8427d 100644
+--- a/arch/x86/platform/efi/efi_stub_64.S
++++ b/arch/x86/platform/efi/efi_stub_64.S
@@ -7,6 +7,7 @@
*/
@@ -23503,9 +24208,10 @@ diff -urNp linux-3.1.4/arch/x86/platform/efi/efi_stub_64.S linux-3.1.4/arch/x86/
+ pax_force_retaddr 0, 1
ret
ENDPROC(efi_call6)
-diff -urNp linux-3.1.4/arch/x86/platform/mrst/mrst.c linux-3.1.4/arch/x86/platform/mrst/mrst.c
---- linux-3.1.4/arch/x86/platform/mrst/mrst.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/platform/mrst/mrst.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
+index fe73276..70fe25a 100644
+--- a/arch/x86/platform/mrst/mrst.c
++++ b/arch/x86/platform/mrst/mrst.c
@@ -239,14 +239,16 @@ static int mrst_i8042_detect(void)
}
@@ -23525,10 +24231,11 @@ diff -urNp linux-3.1.4/arch/x86/platform/mrst/mrst.c linux-3.1.4/arch/x86/platfo
}
/*
-diff -urNp linux-3.1.4/arch/x86/platform/uv/tlb_uv.c linux-3.1.4/arch/x86/platform/uv/tlb_uv.c
---- linux-3.1.4/arch/x86/platform/uv/tlb_uv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/platform/uv/tlb_uv.c 2011-11-16 19:39:11.000000000 -0500
-@@ -377,6 +377,8 @@ static void reset_with_ipi(struct pnmask
+diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
+index 5b55219..b326540 100644
+--- a/arch/x86/platform/uv/tlb_uv.c
++++ b/arch/x86/platform/uv/tlb_uv.c
+@@ -377,6 +377,8 @@ static void reset_with_ipi(struct pnmask *distribution, struct bau_control *bcp)
struct bau_control *smaster = bcp->socket_master;
struct reset_args reset_args;
@@ -23537,9 +24244,10 @@ diff -urNp linux-3.1.4/arch/x86/platform/uv/tlb_uv.c linux-3.1.4/arch/x86/platfo
reset_args.sender = sender;
cpus_clear(*mask);
/* find a single cpu for each uvhub in this distribution mask */
-diff -urNp linux-3.1.4/arch/x86/power/cpu.c linux-3.1.4/arch/x86/power/cpu.c
---- linux-3.1.4/arch/x86/power/cpu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/power/cpu.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
+index 87bb35e..eff2da8 100644
+--- a/arch/x86/power/cpu.c
++++ b/arch/x86/power/cpu.c
@@ -130,7 +130,7 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
@@ -23559,9 +24267,10 @@ diff -urNp linux-3.1.4/arch/x86/power/cpu.c linux-3.1.4/arch/x86/power/cpu.c
syscall_init(); /* This sets MSR_*STAR and related */
#endif
-diff -urNp linux-3.1.4/arch/x86/vdso/Makefile linux-3.1.4/arch/x86/vdso/Makefile
---- linux-3.1.4/arch/x86/vdso/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/vdso/Makefile 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
+index 5d17950..2253fc9 100644
+--- a/arch/x86/vdso/Makefile
++++ b/arch/x86/vdso/Makefile
@@ -137,7 +137,7 @@ quiet_cmd_vdso = VDSO $@
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
@@ -23571,9 +24280,10 @@ diff -urNp linux-3.1.4/arch/x86/vdso/Makefile linux-3.1.4/arch/x86/vdso/Makefile
GCOV_PROFILE := n
#
-diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vdso32-setup.c
---- linux-3.1.4/arch/x86/vdso/vdso32-setup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/vdso/vdso32-setup.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
+index 468d591..8e80a0a 100644
+--- a/arch/x86/vdso/vdso32-setup.c
++++ b/arch/x86/vdso/vdso32-setup.c
@@ -25,6 +25,7 @@
#include <asm/tlbflush.h>
#include <asm/vdso.h>
@@ -23582,7 +24292,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vd
enum {
VDSO_DISABLED = 0,
-@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int m
+@@ -226,7 +227,7 @@ static inline void map_compat_vdso(int map)
void enable_sep_cpu(void)
{
int cpu = get_cpu();
@@ -23600,7 +24310,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vd
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct l
+@@ -331,14 +332,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
if (compat)
addr = VDSO_HIGH_BASE;
else {
@@ -23617,7 +24327,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vd
if (compat_uses_vma || !compat) {
/*
-@@ -361,11 +362,11 @@ int arch_setup_additional_pages(struct l
+@@ -361,11 +362,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
}
current_thread_info()->sysenter_return =
@@ -23647,7 +24357,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vd
return NULL;
}
-@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(stru
+@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
* Check to see if the corresponding task was created in compat vdso
* mode.
*/
@@ -23656,9 +24366,10 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vdso32-setup.c linux-3.1.4/arch/x86/vdso/vd
return &gate_vma;
return NULL;
}
-diff -urNp linux-3.1.4/arch/x86/vdso/vma.c linux-3.1.4/arch/x86/vdso/vma.c
---- linux-3.1.4/arch/x86/vdso/vma.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/vdso/vma.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
+index 316fbca..4638633 100644
+--- a/arch/x86/vdso/vma.c
++++ b/arch/x86/vdso/vma.c
@@ -16,8 +16,6 @@
#include <asm/vdso.h>
#include <asm/page.h>
@@ -23668,7 +24379,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vma.c linux-3.1.4/arch/x86/vdso/vma.c
extern char vdso_start[], vdso_end[];
extern unsigned short vdso_sync_cpuid;
-@@ -97,13 +95,15 @@ static unsigned long vdso_addr(unsigned
+@@ -97,13 +95,15 @@ static unsigned long vdso_addr(unsigned long start, unsigned len)
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{
struct mm_struct *mm = current->mm;
@@ -23688,7 +24399,7 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vma.c linux-3.1.4/arch/x86/vdso/vma.c
addr = vdso_addr(mm->start_stack, vdso_size);
addr = get_unmapped_area(NULL, addr, vdso_size, 0, 0);
if (IS_ERR_VALUE(addr)) {
-@@ -111,26 +111,18 @@ int arch_setup_additional_pages(struct l
+@@ -111,26 +111,18 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
goto up_fail;
}
@@ -23719,9 +24430,10 @@ diff -urNp linux-3.1.4/arch/x86/vdso/vma.c linux-3.1.4/arch/x86/vdso/vma.c
- return 0;
-}
-__setup("vdso=", vdso_setup);
-diff -urNp linux-3.1.4/arch/x86/xen/enlighten.c linux-3.1.4/arch/x86/xen/enlighten.c
---- linux-3.1.4/arch/x86/xen/enlighten.c 2011-11-26 19:57:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/enlighten.c 2011-11-26 19:58:40.000000000 -0500
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index 46c8069..6330d3c 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
@@ -85,8 +85,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
struct shared_info xen_dummy_shared_info;
@@ -23731,7 +24443,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/enlighten.c linux-3.1.4/arch/x86/xen/enlight
RESERVE_BRK(shared_info_page_brk, PAGE_SIZE);
__read_mostly int xen_have_vector_callback;
EXPORT_SYMBOL_GPL(xen_have_vector_callback);
-@@ -1028,7 +1026,7 @@ static const struct pv_apic_ops xen_apic
+@@ -1028,7 +1026,7 @@ static const struct pv_apic_ops xen_apic_ops __initconst = {
#endif
};
@@ -23761,7 +24473,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/enlighten.c linux-3.1.4/arch/x86/xen/enlight
{
xen_reboot(SHUTDOWN_poweroff);
}
-@@ -1152,7 +1150,17 @@ asmlinkage void __init xen_start_kernel(
+@@ -1152,7 +1150,17 @@ asmlinkage void __init xen_start_kernel(void)
__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
/* Work out if we support NX */
@@ -23780,7 +24492,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/enlighten.c linux-3.1.4/arch/x86/xen/enlight
xen_setup_features();
-@@ -1183,13 +1191,6 @@ asmlinkage void __init xen_start_kernel(
+@@ -1183,13 +1191,6 @@ asmlinkage void __init xen_start_kernel(void)
machine_ops = xen_machine_ops;
@@ -23794,10 +24506,11 @@ diff -urNp linux-3.1.4/arch/x86/xen/enlighten.c linux-3.1.4/arch/x86/xen/enlight
xen_smp_init();
#ifdef CONFIG_ACPI_NUMA
-diff -urNp linux-3.1.4/arch/x86/xen/mmu.c linux-3.1.4/arch/x86/xen/mmu.c
---- linux-3.1.4/arch/x86/xen/mmu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/mmu.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1768,6 +1768,8 @@ pgd_t * __init xen_setup_kernel_pagetabl
+diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
+index 3dd53f9..9e8ba48 100644
+--- a/arch/x86/xen/mmu.c
++++ b/arch/x86/xen/mmu.c
+@@ -1768,6 +1768,8 @@ pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd,
convert_pfn_mfn(init_level4_pgt);
convert_pfn_mfn(level3_ident_pgt);
convert_pfn_mfn(level3_kernel_pgt);
@@ -23806,7 +24519,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/mmu.c linux-3.1.4/arch/x86/xen/mmu.c
l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud);
-@@ -1786,7 +1788,10 @@ pgd_t * __init xen_setup_kernel_pagetabl
+@@ -1786,7 +1788,10 @@ pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd,
set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
@@ -23817,7 +24530,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/mmu.c linux-3.1.4/arch/x86/xen/mmu.c
set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
-@@ -2000,6 +2005,7 @@ static void __init xen_post_allocator_in
+@@ -2000,6 +2005,7 @@ static void __init xen_post_allocator_init(void)
pv_mmu_ops.set_pud = xen_set_pud;
#if PAGETABLE_LEVELS == 4
pv_mmu_ops.set_pgd = xen_set_pgd;
@@ -23825,7 +24538,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/mmu.c linux-3.1.4/arch/x86/xen/mmu.c
#endif
/* This will work as long as patching hasn't happened yet
-@@ -2081,6 +2087,7 @@ static const struct pv_mmu_ops xen_mmu_o
+@@ -2081,6 +2087,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
.pud_val = PV_CALLEE_SAVE(xen_pud_val),
.make_pud = PV_CALLEE_SAVE(xen_make_pud),
.set_pgd = xen_set_pgd_hyper,
@@ -23833,10 +24546,11 @@ diff -urNp linux-3.1.4/arch/x86/xen/mmu.c linux-3.1.4/arch/x86/xen/mmu.c
.alloc_pud = xen_alloc_pmd_init,
.release_pud = xen_release_pmd_init,
-diff -urNp linux-3.1.4/arch/x86/xen/smp.c linux-3.1.4/arch/x86/xen/smp.c
---- linux-3.1.4/arch/x86/xen/smp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/smp.c 2011-11-16 18:39:07.000000000 -0500
-@@ -194,11 +194,6 @@ static void __init xen_smp_prepare_boot_
+diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
+index 041d4fe..7666b7e 100644
+--- a/arch/x86/xen/smp.c
++++ b/arch/x86/xen/smp.c
+@@ -194,11 +194,6 @@ static void __init xen_smp_prepare_boot_cpu(void)
{
BUG_ON(smp_processor_id() != 0);
native_smp_prepare_boot_cpu();
@@ -23848,7 +24562,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/smp.c linux-3.1.4/arch/x86/xen/smp.c
xen_filter_cpu_maps();
xen_setup_vcpu_info_placement();
}
-@@ -275,12 +270,12 @@ cpu_initialize_context(unsigned int cpu,
+@@ -275,12 +270,12 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
gdt = get_cpu_gdt_table(cpu);
ctxt->flags = VGCF_IN_KERNEL;
@@ -23864,7 +24578,7 @@ diff -urNp linux-3.1.4/arch/x86/xen/smp.c linux-3.1.4/arch/x86/xen/smp.c
#else
ctxt->gs_base_kernel = per_cpu_offset(cpu);
#endif
-@@ -331,13 +326,12 @@ static int __cpuinit xen_cpu_up(unsigned
+@@ -331,13 +326,12 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
int rc;
per_cpu(current_task, cpu) = idle;
@@ -23880,9 +24594,10 @@ diff -urNp linux-3.1.4/arch/x86/xen/smp.c linux-3.1.4/arch/x86/xen/smp.c
#endif
xen_setup_runstate_info(cpu);
xen_setup_timer(cpu);
-diff -urNp linux-3.1.4/arch/x86/xen/xen-asm_32.S linux-3.1.4/arch/x86/xen/xen-asm_32.S
---- linux-3.1.4/arch/x86/xen/xen-asm_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/xen-asm_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
+index b040b0e..8cc4fe0 100644
+--- a/arch/x86/xen/xen-asm_32.S
++++ b/arch/x86/xen/xen-asm_32.S
@@ -83,14 +83,14 @@ ENTRY(xen_iret)
ESP_OFFSET=4 # bytes pushed onto stack
@@ -23904,9 +24619,10 @@ diff -urNp linux-3.1.4/arch/x86/xen/xen-asm_32.S linux-3.1.4/arch/x86/xen/xen-as
#else
movl xen_vcpu, %eax
#endif
-diff -urNp linux-3.1.4/arch/x86/xen/xen-head.S linux-3.1.4/arch/x86/xen/xen-head.S
---- linux-3.1.4/arch/x86/xen/xen-head.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/xen-head.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
+index aaa7291..3f77960 100644
+--- a/arch/x86/xen/xen-head.S
++++ b/arch/x86/xen/xen-head.S
@@ -19,6 +19,17 @@ ENTRY(startup_xen)
#ifdef CONFIG_X86_32
mov %esi,xen_start_info
@@ -23925,9 +24641,10 @@ diff -urNp linux-3.1.4/arch/x86/xen/xen-head.S linux-3.1.4/arch/x86/xen/xen-head
#else
mov %rsi,xen_start_info
mov $init_thread_union+THREAD_SIZE,%rsp
-diff -urNp linux-3.1.4/arch/x86/xen/xen-ops.h linux-3.1.4/arch/x86/xen/xen-ops.h
---- linux-3.1.4/arch/x86/xen/xen-ops.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/arch/x86/xen/xen-ops.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
+index b095739..8c17bcd 100644
+--- a/arch/x86/xen/xen-ops.h
++++ b/arch/x86/xen/xen-ops.h
@@ -10,8 +10,6 @@
extern const char xen_hypervisor_callback[];
extern const char xen_failsafe_callback[];
@@ -23937,10 +24654,11 @@ diff -urNp linux-3.1.4/arch/x86/xen/xen-ops.h linux-3.1.4/arch/x86/xen/xen-ops.h
struct trap_info;
void xen_copy_trap_info(struct trap_info *traps);
-diff -urNp linux-3.1.4/block/blk-iopoll.c linux-3.1.4/block/blk-iopoll.c
---- linux-3.1.4/block/blk-iopoll.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/block/blk-iopoll.c 2011-11-16 18:39:07.000000000 -0500
-@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopo
+diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
+index 58916af..9cb880b 100644
+--- a/block/blk-iopoll.c
++++ b/block/blk-iopoll.c
+@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopoll *iopoll)
}
EXPORT_SYMBOL(blk_iopoll_complete);
@@ -23949,10 +24667,11 @@ diff -urNp linux-3.1.4/block/blk-iopoll.c linux-3.1.4/block/blk-iopoll.c
{
struct list_head *list = &__get_cpu_var(blk_cpu_iopoll);
int rearm = 0, budget = blk_iopoll_budget;
-diff -urNp linux-3.1.4/block/blk-map.c linux-3.1.4/block/blk-map.c
---- linux-3.1.4/block/blk-map.c 2011-11-26 19:57:27.000000000 -0500
-+++ linux-3.1.4/block/blk-map.c 2011-11-26 19:58:40.000000000 -0500
-@@ -302,7 +302,7 @@ int blk_rq_map_kern(struct request_queue
+diff --git a/block/blk-map.c b/block/blk-map.c
+index 164cd00..6d96fc1 100644
+--- a/block/blk-map.c
++++ b/block/blk-map.c
+@@ -302,7 +302,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
if (!len || !kbuf)
return -EINVAL;
@@ -23961,10 +24680,11 @@ diff -urNp linux-3.1.4/block/blk-map.c linux-3.1.4/block/blk-map.c
if (do_copy)
bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
else
-diff -urNp linux-3.1.4/block/blk-softirq.c linux-3.1.4/block/blk-softirq.c
---- linux-3.1.4/block/blk-softirq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/block/blk-softirq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head,
+diff --git a/block/blk-softirq.c b/block/blk-softirq.c
+index 1366a89..e17f54b 100644
+--- a/block/blk-softirq.c
++++ b/block/blk-softirq.c
+@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
* Softirq action handler - move entries to local list and loop over them
* while passing them to the queue registered handler.
*/
@@ -23973,10 +24693,11 @@ diff -urNp linux-3.1.4/block/blk-softirq.c linux-3.1.4/block/blk-softirq.c
{
struct list_head *cpu_list, local_list;
-diff -urNp linux-3.1.4/block/bsg.c linux-3.1.4/block/bsg.c
---- linux-3.1.4/block/bsg.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/block/bsg.c 2011-11-16 18:39:07.000000000 -0500
-@@ -176,16 +176,24 @@ static int blk_fill_sgv4_hdr_rq(struct r
+diff --git a/block/bsg.c b/block/bsg.c
+index 702f131..37808bf 100644
+--- a/block/bsg.c
++++ b/block/bsg.c
+@@ -176,16 +176,24 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
struct sg_io_v4 *hdr, struct bsg_device *bd,
fmode_t has_write_perm)
{
@@ -24003,10 +24724,11 @@ diff -urNp linux-3.1.4/block/bsg.c linux-3.1.4/block/bsg.c
if (hdr->subprotocol == BSG_SUB_PROTOCOL_SCSI_CMD) {
if (blk_verify_command(rq->cmd, has_write_perm))
return -EPERM;
-diff -urNp linux-3.1.4/block/compat_ioctl.c linux-3.1.4/block/compat_ioctl.c
---- linux-3.1.4/block/compat_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/block/compat_ioctl.c 2011-11-16 18:39:07.000000000 -0500
-@@ -340,7 +340,7 @@ static int compat_fd_ioctl(struct block_
+diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
+index 7b72502..646105c 100644
+--- a/block/compat_ioctl.c
++++ b/block/compat_ioctl.c
+@@ -340,7 +340,7 @@ static int compat_fd_ioctl(struct block_device *bdev, fmode_t mode,
err |= __get_user(f->spec1, &uf->spec1);
err |= __get_user(f->fmt_gap, &uf->fmt_gap);
err |= __get_user(name, &uf->name);
@@ -24015,9 +24737,10 @@ diff -urNp linux-3.1.4/block/compat_ioctl.c linux-3.1.4/block/compat_ioctl.c
if (err) {
err = -EFAULT;
goto out;
-diff -urNp linux-3.1.4/block/scsi_ioctl.c linux-3.1.4/block/scsi_ioctl.c
---- linux-3.1.4/block/scsi_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/block/scsi_ioctl.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
+index 4f4230b..0feae9a 100644
+--- a/block/scsi_ioctl.c
++++ b/block/scsi_ioctl.c
@@ -222,8 +222,20 @@ EXPORT_SYMBOL(blk_verify_command);
static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
struct sg_io_hdr *hdr, fmode_t mode)
@@ -24040,7 +24763,7 @@ diff -urNp linux-3.1.4/block/scsi_ioctl.c linux-3.1.4/block/scsi_ioctl.c
if (blk_verify_command(rq->cmd, mode & FMODE_WRITE))
return -EPERM;
-@@ -432,6 +444,8 @@ int sg_scsi_ioctl(struct request_queue *
+@@ -432,6 +444,8 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
int err;
unsigned int in_len, out_len, bytes, opcode, cmdlen;
char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
@@ -24049,7 +24772,7 @@ diff -urNp linux-3.1.4/block/scsi_ioctl.c linux-3.1.4/block/scsi_ioctl.c
if (!sic)
return -EINVAL;
-@@ -465,9 +479,18 @@ int sg_scsi_ioctl(struct request_queue *
+@@ -465,9 +479,18 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
*/
err = -EFAULT;
rq->cmd_len = cmdlen;
@@ -24069,9 +24792,10 @@ diff -urNp linux-3.1.4/block/scsi_ioctl.c linux-3.1.4/block/scsi_ioctl.c
if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len))
goto error;
-diff -urNp linux-3.1.4/crypto/cryptd.c linux-3.1.4/crypto/cryptd.c
---- linux-3.1.4/crypto/cryptd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/crypto/cryptd.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/crypto/cryptd.c b/crypto/cryptd.c
+index 671d4d6..5f24030 100644
+--- a/crypto/cryptd.c
++++ b/crypto/cryptd.c
@@ -63,7 +63,7 @@ struct cryptd_blkcipher_ctx {
struct cryptd_blkcipher_request_ctx {
@@ -24090,10 +24814,11 @@ diff -urNp linux-3.1.4/crypto/cryptd.c linux-3.1.4/crypto/cryptd.c
static void cryptd_queue_worker(struct work_struct *work);
-diff -urNp linux-3.1.4/crypto/serpent.c linux-3.1.4/crypto/serpent.c
---- linux-3.1.4/crypto/serpent.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/crypto/serpent.c 2011-11-16 18:40:10.000000000 -0500
-@@ -224,6 +224,8 @@ static int serpent_setkey(struct crypto_
+diff --git a/crypto/serpent.c b/crypto/serpent.c
+index b651a55..a9ddd79b 100644
+--- a/crypto/serpent.c
++++ b/crypto/serpent.c
+@@ -224,6 +224,8 @@ static int serpent_setkey(struct crypto_tfm *tfm, const u8 *key,
u32 r0,r1,r2,r3,r4;
int i;
@@ -24102,194 +24827,10 @@ diff -urNp linux-3.1.4/crypto/serpent.c linux-3.1.4/crypto/serpent.c
/* Copy key, add padding */
for (i = 0; i < keylen; ++i)
-diff -urNp linux-3.1.4/Documentation/dontdiff linux-3.1.4/Documentation/dontdiff
---- linux-3.1.4/Documentation/dontdiff 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/Documentation/dontdiff 2011-12-02 17:38:47.000000000 -0500
-@@ -5,6 +5,7 @@
- *.cis
- *.cpio
- *.csp
-+*.dbg
- *.dsp
- *.dvi
- *.elf
-@@ -14,6 +15,7 @@
- *.gcov
- *.gen.S
- *.gif
-+*.gmo
- *.grep
- *.grp
- *.gz
-@@ -48,9 +50,11 @@
- *.tab.h
- *.tex
- *.ver
-+*.vim
- *.xml
- *.xz
- *_MODULES
-+*_reg_safe.h
- *_vga16.c
- *~
- \#*#
-@@ -70,6 +74,7 @@ Kerntypes
- Module.markers
- Module.symvers
- PENDING
-+PERF*
- SCCS
- System.map*
- TAGS
-@@ -93,19 +98,24 @@ bounds.h
- bsetup
- btfixupprep
- build
-+builtin-policy.h
- bvmlinux
- bzImage*
- capability_names.h
- capflags.c
- classlist.h*
-+clut_vga16.c
-+common-cmds.h
- comp*.log
- compile.h*
- conf
- config
- config-*
- config_data.h*
-+config.c
- config.mak
- config.mak.autogen
-+config.tmp
- conmakehash
- consolemap_deftbl.c*
- cpustr.h
-@@ -119,6 +129,7 @@ dslm
- elf2ecoff
- elfconfig.h*
- evergreen_reg_safe.h
-+exception_policy.conf
- fixdep
- flask.h
- fore200e_mkfirm
-@@ -126,12 +137,15 @@ fore200e_pca_fw.c*
- gconf
- gconf.glade.h
- gen-devlist
-+gen-kdb_cmds.c
- gen_crc32table
- gen_init_cpio
- generated
- genheaders
- genksyms
- *_gray256.c
-+hash
-+hid-example
- hpet_example
- hugepage-mmap
- hugepage-shm
-@@ -146,7 +160,7 @@ int32.c
- int4.c
- int8.c
- kallsyms
--kconfig
-+kern_constants.h
- keywords.c
- ksym.c*
- ksym.h*
-@@ -154,7 +168,6 @@ kxgettext
- lkc_defs.h
- lex.c
- lex.*.c
--linux
- logo_*.c
- logo_*_clut224.c
- logo_*_mono.c
-@@ -166,14 +179,15 @@ machtypes.h
- map
- map_hugetlb
- maui_boot.h
--media
- mconf
-+mdp
- miboot*
- mk_elfconfig
- mkboot
- mkbugboot
- mkcpustr
- mkdep
-+mkpiggy
- mkprep
- mkregtable
- mktables
-@@ -209,6 +223,7 @@ r300_reg_safe.h
- r420_reg_safe.h
- r600_reg_safe.h
- recordmcount
-+regdb.c
- relocs
- rlim_names.h
- rn50_reg_safe.h
-@@ -219,6 +234,7 @@ setup
- setup.bin
- setup.elf
- sImage
-+slabinfo
- sm_tbl*
- split-include
- syscalltab.h
-@@ -229,6 +245,7 @@ tftpboot.img
- timeconst.h
- times.h*
- trix_boot.h
-+user_constants.h
- utsrelease.h*
- vdso-syms.lds
- vdso.lds
-@@ -246,7 +263,9 @@ vmlinux
- vmlinux-*
- vmlinux.aout
- vmlinux.bin.all
-+vmlinux.bin.bz2
- vmlinux.lds
-+vmlinux.relocs
- vmlinuz
- voffset.h
- vsyscall.lds
-@@ -254,9 +273,11 @@ vsyscall_32.lds
- wanxlfw.inc
- uImage
- unifdef
-+utsrelease.h
- wakeup.bin
- wakeup.elf
- wakeup.lds
- zImage*
- zconf.hash.c
-+zconf.lex.c
- zoffset.h
-diff -urNp linux-3.1.4/Documentation/kernel-parameters.txt linux-3.1.4/Documentation/kernel-parameters.txt
---- linux-3.1.4/Documentation/kernel-parameters.txt 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/Documentation/kernel-parameters.txt 2011-11-16 18:39:07.000000000 -0500
-@@ -1898,6 +1898,13 @@ bytes respectively. Such letter suffixes
- the specified number of seconds. This is to be used if
- your oopses keep scrolling off the screen.
-
-+ pax_nouderef [X86] disables UDEREF. Most likely needed under certain
-+ virtualization environments that don't cope well with the
-+ expand down segment used by UDEREF on X86-32 or the frequent
-+ page table updates on X86-64.
-+
-+ pax_softmode= 0/1 to disable/enable PaX softmode on boot already.
-+
- pcbit= [HW,ISDN]
-
- pcd. [PARIDE]
-diff -urNp linux-3.1.4/drivers/acpi/apei/cper.c linux-3.1.4/drivers/acpi/apei/cper.c
---- linux-3.1.4/drivers/acpi/apei/cper.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/acpi/apei/cper.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c
+index 5d41894..22021e4 100644
+--- a/drivers/acpi/apei/cper.c
++++ b/drivers/acpi/apei/cper.c
@@ -38,12 +38,12 @@
*/
u64 cper_next_record_id(void)
@@ -24307,9 +24848,10 @@ diff -urNp linux-3.1.4/drivers/acpi/apei/cper.c linux-3.1.4/drivers/acpi/apei/cp
}
EXPORT_SYMBOL_GPL(cper_next_record_id);
-diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
---- linux-3.1.4/drivers/acpi/ec_sys.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/acpi/ec_sys.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c
+index 22f918b..9fafb84 100644
+--- a/drivers/acpi/ec_sys.c
++++ b/drivers/acpi/ec_sys.c
@@ -11,6 +11,7 @@
#include <linux/kernel.h>
#include <linux/acpi.h>
@@ -24318,7 +24860,7 @@ diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
#include "internal.h"
MODULE_AUTHOR("Thomas Renninger <trenn@suse.de>");
-@@ -39,7 +40,7 @@ static ssize_t acpi_ec_read_io(struct fi
+@@ -39,7 +40,7 @@ static ssize_t acpi_ec_read_io(struct file *f, char __user *buf,
* struct acpi_ec *ec = ((struct seq_file *)f->private_data)->private;
*/
unsigned int size = EC_SPACE_SIZE;
@@ -24327,7 +24869,7 @@ diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
loff_t init_off = *off;
int err = 0;
-@@ -52,9 +53,11 @@ static ssize_t acpi_ec_read_io(struct fi
+@@ -52,9 +53,11 @@ static ssize_t acpi_ec_read_io(struct file *f, char __user *buf,
size = count;
while (size) {
@@ -24340,7 +24882,7 @@ diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
*off += 1;
size--;
}
-@@ -70,7 +73,6 @@ static ssize_t acpi_ec_write_io(struct f
+@@ -70,7 +73,6 @@ static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf,
unsigned int size = count;
loff_t init_off = *off;
@@ -24348,7 +24890,7 @@ diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
int err = 0;
if (*off >= EC_SPACE_SIZE)
-@@ -81,7 +83,9 @@ static ssize_t acpi_ec_write_io(struct f
+@@ -81,7 +83,9 @@ static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf,
}
while (size) {
@@ -24359,35 +24901,36 @@ diff -urNp linux-3.1.4/drivers/acpi/ec_sys.c linux-3.1.4/drivers/acpi/ec_sys.c
err = ec_write(*off, byte_write);
if (err)
return err;
-diff -urNp linux-3.1.4/drivers/acpi/proc.c linux-3.1.4/drivers/acpi/proc.c
---- linux-3.1.4/drivers/acpi/proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/acpi/proc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -342,19 +342,13 @@ acpi_system_write_wakeup_device(struct f
+diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
+index f5f9869..da87aeb 100644
+--- a/drivers/acpi/proc.c
++++ b/drivers/acpi/proc.c
+@@ -342,19 +342,13 @@ acpi_system_write_wakeup_device(struct file *file,
size_t count, loff_t * ppos)
{
struct list_head *node, *next;
- char strbuf[5];
- char str[5] = "";
- unsigned int len = count;
--
++ char strbuf[5] = {0};
+
- if (len > 4)
- len = 4;
- if (len < 0)
-- return -EFAULT;
-+ char strbuf[5] = {0};
-
-- if (copy_from_user(strbuf, buffer, len))
+ if (count > 4)
+ count = 4;
+ if (copy_from_user(strbuf, buffer, count))
return -EFAULT;
+-
+- if (copy_from_user(strbuf, buffer, len))
+- return -EFAULT;
- strbuf[len] = '\0';
- sscanf(strbuf, "%s", str);
+ strbuf[count] = '\0';
mutex_lock(&acpi_device_lock);
list_for_each_safe(node, next, &acpi_wakeup_device_list) {
-@@ -363,7 +357,7 @@ acpi_system_write_wakeup_device(struct f
+@@ -363,7 +357,7 @@ acpi_system_write_wakeup_device(struct file *file,
if (!dev->wakeup.flags.valid)
continue;
@@ -24396,10 +24939,11 @@ diff -urNp linux-3.1.4/drivers/acpi/proc.c linux-3.1.4/drivers/acpi/proc.c
if (device_can_wakeup(&dev->dev)) {
bool enable = !device_may_wakeup(&dev->dev);
device_set_wakeup_enable(&dev->dev, enable);
-diff -urNp linux-3.1.4/drivers/acpi/processor_driver.c linux-3.1.4/drivers/acpi/processor_driver.c
---- linux-3.1.4/drivers/acpi/processor_driver.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/acpi/processor_driver.c 2011-11-16 18:39:07.000000000 -0500
-@@ -473,7 +473,7 @@ static int __cpuinit acpi_processor_add(
+diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
+index a4e0f1b..9793b28 100644
+--- a/drivers/acpi/processor_driver.c
++++ b/drivers/acpi/processor_driver.c
+@@ -473,7 +473,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
return 0;
#endif
@@ -24408,10 +24952,11 @@ diff -urNp linux-3.1.4/drivers/acpi/processor_driver.c linux-3.1.4/drivers/acpi/
/*
* Buggy BIOS check
-diff -urNp linux-3.1.4/drivers/ata/libata-core.c linux-3.1.4/drivers/ata/libata-core.c
---- linux-3.1.4/drivers/ata/libata-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ata/libata-core.c 2011-11-16 18:39:07.000000000 -0500
-@@ -4733,7 +4733,7 @@ void ata_qc_free(struct ata_queued_cmd *
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index 4a3a5ae..cbee192 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -4733,7 +4733,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
struct ata_port *ap;
unsigned int tag;
@@ -24420,7 +24965,7 @@ diff -urNp linux-3.1.4/drivers/ata/libata-core.c linux-3.1.4/drivers/ata/libata-
ap = qc->ap;
qc->flags = 0;
-@@ -4749,7 +4749,7 @@ void __ata_qc_complete(struct ata_queued
+@@ -4749,7 +4749,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap;
struct ata_link *link;
@@ -24429,7 +24974,7 @@ diff -urNp linux-3.1.4/drivers/ata/libata-core.c linux-3.1.4/drivers/ata/libata-
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;
-@@ -5754,6 +5754,7 @@ static void ata_finalize_port_ops(struct
+@@ -5754,6 +5754,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
return;
spin_lock(&lock);
@@ -24437,7 +24982,7 @@ diff -urNp linux-3.1.4/drivers/ata/libata-core.c linux-3.1.4/drivers/ata/libata-
for (cur = ops->inherits; cur; cur = cur->inherits) {
void **inherit = (void **)cur;
-@@ -5767,8 +5768,9 @@ static void ata_finalize_port_ops(struct
+@@ -5767,8 +5768,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
if (IS_ERR(*pp))
*pp = NULL;
@@ -24448,9 +24993,10 @@ diff -urNp linux-3.1.4/drivers/ata/libata-core.c linux-3.1.4/drivers/ata/libata-
spin_unlock(&lock);
}
-diff -urNp linux-3.1.4/drivers/ata/libata-eh.c linux-3.1.4/drivers/ata/libata-eh.c
---- linux-3.1.4/drivers/ata/libata-eh.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ata/libata-eh.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
+index ed16fbe..fc92cb8 100644
+--- a/drivers/ata/libata-eh.c
++++ b/drivers/ata/libata-eh.c
@@ -2515,6 +2515,8 @@ void ata_eh_report(struct ata_port *ap)
{
struct ata_link *link;
@@ -24460,10 +25006,11 @@ diff -urNp linux-3.1.4/drivers/ata/libata-eh.c linux-3.1.4/drivers/ata/libata-eh
ata_for_each_link(link, ap, HOST_FIRST)
ata_eh_link_report(link);
}
-diff -urNp linux-3.1.4/drivers/ata/pata_arasan_cf.c linux-3.1.4/drivers/ata/pata_arasan_cf.c
---- linux-3.1.4/drivers/ata/pata_arasan_cf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ata/pata_arasan_cf.c 2011-11-16 18:39:07.000000000 -0500
-@@ -862,7 +862,9 @@ static int __devinit arasan_cf_probe(str
+diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
+index 719bb73..79ce858 100644
+--- a/drivers/ata/pata_arasan_cf.c
++++ b/drivers/ata/pata_arasan_cf.c
+@@ -862,7 +862,9 @@ static int __devinit arasan_cf_probe(struct platform_device *pdev)
/* Handle platform specific quirks */
if (pdata->quirk) {
if (pdata->quirk & CF_BROKEN_PIO) {
@@ -24474,10 +25021,11 @@ diff -urNp linux-3.1.4/drivers/ata/pata_arasan_cf.c linux-3.1.4/drivers/ata/pata
ap->pio_mask = 0;
}
if (pdata->quirk & CF_BROKEN_MWDMA)
-diff -urNp linux-3.1.4/drivers/atm/adummy.c linux-3.1.4/drivers/atm/adummy.c
---- linux-3.1.4/drivers/atm/adummy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/adummy.c 2011-11-16 18:39:07.000000000 -0500
-@@ -114,7 +114,7 @@ adummy_send(struct atm_vcc *vcc, struct
+diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
+index f9b983a..887b9d8 100644
+--- a/drivers/atm/adummy.c
++++ b/drivers/atm/adummy.c
+@@ -114,7 +114,7 @@ adummy_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -24486,10 +25034,11 @@ diff -urNp linux-3.1.4/drivers/atm/adummy.c linux-3.1.4/drivers/atm/adummy.c
return 0;
}
-diff -urNp linux-3.1.4/drivers/atm/ambassador.c linux-3.1.4/drivers/atm/ambassador.c
---- linux-3.1.4/drivers/atm/ambassador.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/ambassador.c 2011-11-16 18:39:07.000000000 -0500
-@@ -454,7 +454,7 @@ static void tx_complete (amb_dev * dev,
+diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
+index f8f41e0..1f987dd 100644
+--- a/drivers/atm/ambassador.c
++++ b/drivers/atm/ambassador.c
+@@ -454,7 +454,7 @@ static void tx_complete (amb_dev * dev, tx_out * tx) {
PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx);
// VC layer stats
@@ -24498,7 +25047,7 @@ diff -urNp linux-3.1.4/drivers/atm/ambassador.c linux-3.1.4/drivers/atm/ambassad
// free the descriptor
kfree (tx_descr);
-@@ -495,7 +495,7 @@ static void rx_complete (amb_dev * dev,
+@@ -495,7 +495,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
dump_skb ("<<<", vc, skb);
// VC layer stats
@@ -24507,7 +25056,7 @@ diff -urNp linux-3.1.4/drivers/atm/ambassador.c linux-3.1.4/drivers/atm/ambassad
__net_timestamp(skb);
// end of our responsibility
atm_vcc->push (atm_vcc, skb);
-@@ -510,7 +510,7 @@ static void rx_complete (amb_dev * dev,
+@@ -510,7 +510,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
} else {
PRINTK (KERN_INFO, "dropped over-size frame");
// should we count this?
@@ -24516,7 +25065,7 @@ diff -urNp linux-3.1.4/drivers/atm/ambassador.c linux-3.1.4/drivers/atm/ambassad
}
} else {
-@@ -1338,7 +1338,7 @@ static int amb_send (struct atm_vcc * at
+@@ -1338,7 +1338,7 @@ static int amb_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
}
if (check_area (skb->data, skb->len)) {
@@ -24525,10 +25074,11 @@ diff -urNp linux-3.1.4/drivers/atm/ambassador.c linux-3.1.4/drivers/atm/ambassad
return -ENOMEM; // ?
}
-diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
---- linux-3.1.4/drivers/atm/atmtcp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/atmtcp.c 2011-11-16 18:39:07.000000000 -0500
-@@ -207,7 +207,7 @@ static int atmtcp_v_send(struct atm_vcc
+diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
+index b22d71c..d6e1049 100644
+--- a/drivers/atm/atmtcp.c
++++ b/drivers/atm/atmtcp.c
+@@ -207,7 +207,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
if (dev_data) return 0;
@@ -24537,7 +25087,7 @@ diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
return -ENOLINK;
}
size = skb->len+sizeof(struct atmtcp_hdr);
-@@ -215,7 +215,7 @@ static int atmtcp_v_send(struct atm_vcc
+@@ -215,7 +215,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (!new_skb) {
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
@@ -24546,7 +25096,7 @@ diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
return -ENOBUFS;
}
hdr = (void *) skb_put(new_skb,sizeof(struct atmtcp_hdr));
-@@ -226,8 +226,8 @@ static int atmtcp_v_send(struct atm_vcc
+@@ -226,8 +226,8 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
out_vcc->push(out_vcc,new_skb);
@@ -24557,7 +25107,7 @@ diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
return 0;
}
-@@ -301,7 +301,7 @@ static int atmtcp_c_send(struct atm_vcc
+@@ -301,7 +301,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci));
read_unlock(&vcc_sklist_lock);
if (!out_vcc) {
@@ -24566,7 +25116,7 @@ diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
goto done;
}
skb_pull(skb,sizeof(struct atmtcp_hdr));
-@@ -313,8 +313,8 @@ static int atmtcp_c_send(struct atm_vcc
+@@ -313,8 +313,8 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
__net_timestamp(new_skb);
skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
out_vcc->push(out_vcc,new_skb);
@@ -24577,9 +25127,10 @@ diff -urNp linux-3.1.4/drivers/atm/atmtcp.c linux-3.1.4/drivers/atm/atmtcp.c
done:
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
-diff -urNp linux-3.1.4/drivers/atm/eni.c linux-3.1.4/drivers/atm/eni.c
---- linux-3.1.4/drivers/atm/eni.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/eni.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
+index 9307141..d8521bf 100644
+--- a/drivers/atm/eni.c
++++ b/drivers/atm/eni.c
@@ -526,7 +526,7 @@ static int rx_aal0(struct atm_vcc *vcc)
DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
vcc->dev->number);
@@ -24616,7 +25167,7 @@ diff -urNp linux-3.1.4/drivers/atm/eni.c linux-3.1.4/drivers/atm/eni.c
}
wake_up(&eni_dev->rx_wait);
}
-@@ -1228,7 +1228,7 @@ static void dequeue_tx(struct atm_dev *d
+@@ -1228,7 +1228,7 @@ static void dequeue_tx(struct atm_dev *dev)
PCI_DMA_TODEVICE);
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb_irq(skb);
@@ -24634,10 +25185,11 @@ diff -urNp linux-3.1.4/drivers/atm/eni.c linux-3.1.4/drivers/atm/eni.c
"MMF", "SMF", "MMF", "03?", /* 0- 3 */
"UTP", "05?", "06?", "07?", /* 4- 7 */
"TAXI","09?", "10?", "11?", /* 8-11 */
-diff -urNp linux-3.1.4/drivers/atm/firestream.c linux-3.1.4/drivers/atm/firestream.c
---- linux-3.1.4/drivers/atm/firestream.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/firestream.c 2011-11-16 18:39:07.000000000 -0500
-@@ -750,7 +750,7 @@ static void process_txdone_queue (struct
+diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
+index 5072f8a..fa52520 100644
+--- a/drivers/atm/firestream.c
++++ b/drivers/atm/firestream.c
+@@ -750,7 +750,7 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q)
}
}
@@ -24646,7 +25198,7 @@ diff -urNp linux-3.1.4/drivers/atm/firestream.c linux-3.1.4/drivers/atm/firestre
fs_dprintk (FS_DEBUG_TXMEM, "i");
fs_dprintk (FS_DEBUG_ALLOC, "Free t-skb: %p\n", skb);
-@@ -817,7 +817,7 @@ static void process_incoming (struct fs_
+@@ -817,7 +817,7 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
#endif
skb_put (skb, qe->p1 & 0xffff);
ATM_SKB(skb)->vcc = atm_vcc;
@@ -24655,7 +25207,7 @@ diff -urNp linux-3.1.4/drivers/atm/firestream.c linux-3.1.4/drivers/atm/firestre
__net_timestamp(skb);
fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb);
atm_vcc->push (atm_vcc, skb);
-@@ -838,12 +838,12 @@ static void process_incoming (struct fs_
+@@ -838,12 +838,12 @@ static void process_incoming (struct fs_dev *dev, struct queue *q)
kfree (pe);
}
if (atm_vcc)
@@ -24670,10 +25222,11 @@ diff -urNp linux-3.1.4/drivers/atm/firestream.c linux-3.1.4/drivers/atm/firestre
break;
default: /* Hmm. Haven't written the code to handle the others yet... -- REW */
printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n",
-diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
---- linux-3.1.4/drivers/atm/fore200e.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/fore200e.c 2011-11-16 18:39:07.000000000 -0500
-@@ -933,9 +933,9 @@ fore200e_tx_irq(struct fore200e* fore200
+diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
+index 361f5ae..7fc552d 100644
+--- a/drivers/atm/fore200e.c
++++ b/drivers/atm/fore200e.c
+@@ -933,9 +933,9 @@ fore200e_tx_irq(struct fore200e* fore200e)
#endif
/* check error condition */
if (*entry->status & STATUS_ERROR)
@@ -24685,7 +25238,7 @@ diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
}
}
-@@ -1084,7 +1084,7 @@ fore200e_push_rpd(struct fore200e* fore2
+@@ -1084,7 +1084,7 @@ fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rp
if (skb == NULL) {
DPRINTK(2, "unable to alloc new skb, rx PDU length = %d\n", pdu_len);
@@ -24694,7 +25247,7 @@ diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
return -ENOMEM;
}
-@@ -1127,14 +1127,14 @@ fore200e_push_rpd(struct fore200e* fore2
+@@ -1127,14 +1127,14 @@ fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rp
dev_kfree_skb_any(skb);
@@ -24711,7 +25264,7 @@ diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0);
-@@ -1212,7 +1212,7 @@ fore200e_rx_irq(struct fore200e* fore200
+@@ -1212,7 +1212,7 @@ fore200e_rx_irq(struct fore200e* fore200e)
DPRINTK(2, "damaged PDU on %d.%d.%d\n",
fore200e->atm_dev->number,
entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci);
@@ -24720,7 +25273,7 @@ diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
}
}
-@@ -1657,7 +1657,7 @@ fore200e_send(struct atm_vcc *vcc, struc
+@@ -1657,7 +1657,7 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
goto retry_here;
}
@@ -24729,10 +25282,11 @@ diff -urNp linux-3.1.4/drivers/atm/fore200e.c linux-3.1.4/drivers/atm/fore200e.c
fore200e->tx_sat++;
DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
-diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
---- linux-3.1.4/drivers/atm/he.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/he.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1709,7 +1709,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+diff --git a/drivers/atm/he.c b/drivers/atm/he.c
+index 9a51df4..f3bb5f8 100644
+--- a/drivers/atm/he.c
++++ b/drivers/atm/he.c
+@@ -1709,7 +1709,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
hprintk("HBUF_ERR! (cid 0x%x)\n", cid);
@@ -24741,7 +25295,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
goto return_host_buffers;
}
-@@ -1736,7 +1736,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+@@ -1736,7 +1736,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
RBRQ_LEN_ERR(he_dev->rbrq_head)
? "LEN_ERR" : "",
vcc->vpi, vcc->vci);
@@ -24750,7 +25304,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
goto return_host_buffers;
}
-@@ -1788,7 +1788,7 @@ he_service_rbrq(struct he_dev *he_dev, i
+@@ -1788,7 +1788,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
vcc->push(vcc, skb);
spin_lock(&he_dev->global_lock);
@@ -24759,7 +25313,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
return_host_buffers:
++pdus_assembled;
-@@ -2114,7 +2114,7 @@ __enqueue_tpd(struct he_dev *he_dev, str
+@@ -2114,7 +2114,7 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
tpd->vcc->pop(tpd->vcc, tpd->skb);
else
dev_kfree_skb_any(tpd->skb);
@@ -24768,7 +25322,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
}
pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
return;
-@@ -2526,7 +2526,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2526,7 +2526,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -24777,7 +25331,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
return -EINVAL;
}
-@@ -2537,7 +2537,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2537,7 +2537,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -24786,7 +25340,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
return -EINVAL;
}
#endif
-@@ -2549,7 +2549,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2549,7 +2549,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -24795,7 +25349,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
spin_unlock_irqrestore(&he_dev->global_lock, flags);
return -ENOMEM;
}
-@@ -2591,7 +2591,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2591,7 +2591,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
@@ -24804,7 +25358,7 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
spin_unlock_irqrestore(&he_dev->global_lock, flags);
return -ENOMEM;
}
-@@ -2622,7 +2622,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
+@@ -2622,7 +2622,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb)
__enqueue_tpd(he_dev, tpd, cid);
spin_unlock_irqrestore(&he_dev->global_lock, flags);
@@ -24813,10 +25367,11 @@ diff -urNp linux-3.1.4/drivers/atm/he.c linux-3.1.4/drivers/atm/he.c
return 0;
}
-diff -urNp linux-3.1.4/drivers/atm/horizon.c linux-3.1.4/drivers/atm/horizon.c
---- linux-3.1.4/drivers/atm/horizon.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/horizon.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1035,7 +1035,7 @@ static void rx_schedule (hrz_dev * dev,
+diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
+index b812103..e391a49 100644
+--- a/drivers/atm/horizon.c
++++ b/drivers/atm/horizon.c
+@@ -1035,7 +1035,7 @@ static void rx_schedule (hrz_dev * dev, int irq) {
{
struct atm_vcc * vcc = ATM_SKB(skb)->vcc;
// VC layer stats
@@ -24825,7 +25380,7 @@ diff -urNp linux-3.1.4/drivers/atm/horizon.c linux-3.1.4/drivers/atm/horizon.c
__net_timestamp(skb);
// end of our responsibility
vcc->push (vcc, skb);
-@@ -1187,7 +1187,7 @@ static void tx_schedule (hrz_dev * const
+@@ -1187,7 +1187,7 @@ static void tx_schedule (hrz_dev * const dev, int irq) {
dev->tx_iovec = NULL;
// VC layer stats
@@ -24834,10 +25389,11 @@ diff -urNp linux-3.1.4/drivers/atm/horizon.c linux-3.1.4/drivers/atm/horizon.c
// free the skb
hrz_kfree_skb (skb);
-diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
---- linux-3.1.4/drivers/atm/idt77252.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/idt77252.c 2011-11-16 18:39:07.000000000 -0500
-@@ -812,7 +812,7 @@ drain_scq(struct idt77252_dev *card, str
+diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
+index db06f34..dcebb61 100644
+--- a/drivers/atm/idt77252.c
++++ b/drivers/atm/idt77252.c
+@@ -812,7 +812,7 @@ drain_scq(struct idt77252_dev *card, struct vc_map *vc)
else
dev_kfree_skb(skb);
@@ -24846,7 +25402,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
}
atomic_dec(&scq->used);
-@@ -1075,13 +1075,13 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1075,13 +1075,13 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
if ((sb = dev_alloc_skb(64)) == NULL) {
printk("%s: Can't allocate buffers for aal0.\n",
card->name);
@@ -24862,7 +25418,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
dev_kfree_skb(sb);
break;
}
-@@ -1098,7 +1098,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1098,7 +1098,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -24871,7 +25427,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
cell += ATM_CELL_PAYLOAD;
}
-@@ -1135,13 +1135,13 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1135,13 +1135,13 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
"(CDC: %08x)\n",
card->name, len, rpp->len, readl(SAR_REG_CDC));
recycle_rx_pool_skb(card, rpp);
@@ -24887,7 +25443,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
return;
}
if (skb_queue_len(&rpp->queue) > 1) {
-@@ -1152,7 +1152,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1152,7 +1152,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
RXPRINTK("%s: Can't alloc RX skb.\n",
card->name);
recycle_rx_pool_skb(card, rpp);
@@ -24896,7 +25452,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
return;
}
if (!atm_charge(vcc, skb->truesize)) {
-@@ -1171,7 +1171,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1171,7 +1171,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -24905,7 +25461,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
return;
}
-@@ -1193,7 +1193,7 @@ dequeue_rx(struct idt77252_dev *card, st
+@@ -1193,7 +1193,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -24914,7 +25470,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
if (skb->truesize > SAR_FB_SIZE_3)
add_rx_skb(card, 3, SAR_FB_SIZE_3, 1);
-@@ -1304,14 +1304,14 @@ idt77252_rx_raw(struct idt77252_dev *car
+@@ -1304,14 +1304,14 @@ idt77252_rx_raw(struct idt77252_dev *card)
if (vcc->qos.aal != ATM_AAL0) {
RPRINTK("%s: raw cell for non AAL0 vc %u.%u\n",
card->name, vpi, vci);
@@ -24931,7 +25487,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
goto drop;
}
-@@ -1330,7 +1330,7 @@ idt77252_rx_raw(struct idt77252_dev *car
+@@ -1330,7 +1330,7 @@ idt77252_rx_raw(struct idt77252_dev *card)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -24940,7 +25496,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
drop:
skb_pull(queue, 64);
-@@ -1955,13 +1955,13 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1955,13 +1955,13 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
if (vc == NULL) {
printk("%s: NULL connection in send().\n", card->name);
@@ -24956,7 +25512,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
dev_kfree_skb(skb);
return -EINVAL;
}
-@@ -1973,14 +1973,14 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1973,14 +1973,14 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
break;
default:
printk("%s: Unsupported AAL: %d\n", card->name, vcc->qos.aal);
@@ -24973,7 +25529,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
dev_kfree_skb(skb);
return -EINVAL;
}
-@@ -1988,7 +1988,7 @@ idt77252_send_skb(struct atm_vcc *vcc, s
+@@ -1988,7 +1988,7 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam)
err = queue_skb(card, vc, skb, oam);
if (err) {
@@ -24982,7 +25538,7 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
dev_kfree_skb(skb);
return err;
}
-@@ -2011,7 +2011,7 @@ idt77252_send_oam(struct atm_vcc *vcc, v
+@@ -2011,7 +2011,7 @@ idt77252_send_oam(struct atm_vcc *vcc, void *cell, int flags)
skb = dev_alloc_skb(64);
if (!skb) {
printk("%s: Out of memory in send_oam().\n", card->name);
@@ -24991,10 +25547,11 @@ diff -urNp linux-3.1.4/drivers/atm/idt77252.c linux-3.1.4/drivers/atm/idt77252.c
return -ENOMEM;
}
atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
---- linux-3.1.4/drivers/atm/iphase.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/iphase.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1121,7 +1121,7 @@ static int rx_pkt(struct atm_dev *dev)
+diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
+index cb90f7a..bd33566 100644
+--- a/drivers/atm/iphase.c
++++ b/drivers/atm/iphase.c
+@@ -1121,7 +1121,7 @@ static int rx_pkt(struct atm_dev *dev)
status = (u_short) (buf_desc_ptr->desc_mode);
if (status & (RX_CER | RX_PTE | RX_OFL))
{
@@ -25003,7 +25560,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
IF_ERR(printk("IA: bad packet, dropping it");)
if (status & RX_CER) {
IF_ERR(printk(" cause: packet CRC error\n");)
-@@ -1144,7 +1144,7 @@ static int rx_pkt(struct atm_dev *dev)
+@@ -1144,7 +1144,7 @@ static int rx_pkt(struct atm_dev *dev)
len = dma_addr - buf_addr;
if (len > iadev->rx_buf_sz) {
printk("Over %d bytes sdu received, dropped!!!\n", iadev->rx_buf_sz);
@@ -25012,7 +25569,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
goto out_free_desc;
}
-@@ -1294,7 +1294,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1294,7 +1294,7 @@ static void rx_dle_intr(struct atm_dev *dev)
ia_vcc = INPH_IA_VCC(vcc);
if (ia_vcc == NULL)
{
@@ -25021,7 +25578,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
dev_kfree_skb_any(skb);
atm_return(vcc, atm_guess_pdu2truesize(len));
goto INCR_DLE;
-@@ -1306,7 +1306,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1306,7 +1306,7 @@ static void rx_dle_intr(struct atm_dev *dev)
if ((length > iadev->rx_buf_sz) || (length >
(skb->len - sizeof(struct cpcs_trailer))))
{
@@ -25030,7 +25587,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
IF_ERR(printk("rx_dle_intr: Bad AAL5 trailer %d (skb len %d)",
length, skb->len);)
dev_kfree_skb_any(skb);
-@@ -1322,7 +1322,7 @@ static void rx_dle_intr(struct atm_dev *
+@@ -1322,7 +1322,7 @@ static void rx_dle_intr(struct atm_dev *dev)
IF_RX(printk("rx_dle_intr: skb push");)
vcc->push(vcc,skb);
@@ -25039,7 +25596,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
iadev->rx_pkt_cnt++;
}
INCR_DLE:
-@@ -2802,15 +2802,15 @@ static int ia_ioctl(struct atm_dev *dev,
+@@ -2802,15 +2802,15 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
{
struct k_sonet_stats *stats;
stats = &PRIV(_ia_dev[board])->sonet_stats;
@@ -25064,7 +25621,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
}
ia_cmds.status = 0;
break;
-@@ -2915,7 +2915,7 @@ static int ia_pkt_tx (struct atm_vcc *vc
+@@ -2915,7 +2915,7 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
if ((desc == 0) || (desc > iadev->num_tx_desc))
{
IF_ERR(printk(DEV_LABEL "invalid desc for send: %d\n", desc);)
@@ -25073,7 +25630,7 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
if (vcc->pop)
vcc->pop(vcc, skb);
else
-@@ -3020,14 +3020,14 @@ static int ia_pkt_tx (struct atm_vcc *vc
+@@ -3020,14 +3020,14 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
ATM_DESC(skb) = vcc->vci;
skb_queue_tail(&iadev->tx_dma_q, skb);
@@ -25090,10 +25647,11 @@ diff -urNp linux-3.1.4/drivers/atm/iphase.c linux-3.1.4/drivers/atm/iphase.c
if (iavcc->vc_desc_cnt > 10) {
vcc->tx_quota = vcc->tx_quota * 3 / 4;
printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
-diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
---- linux-3.1.4/drivers/atm/lanai.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/lanai.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct l
+diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
+index e828c54..ae83976 100644
+--- a/drivers/atm/lanai.c
++++ b/drivers/atm/lanai.c
+@@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct lanai_dev *lanai,
vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0);
lanai_endtx(lanai, lvcc);
lanai_free_skb(lvcc->tx.atmvcc, skb);
@@ -25102,7 +25660,7 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
}
/* Try to fill the buffer - don't call unless there is backlog */
-@@ -1426,7 +1426,7 @@ static void vcc_rx_aal5(struct lanai_vcc
+@@ -1426,7 +1426,7 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr)
ATM_SKB(skb)->vcc = lvcc->rx.atmvcc;
__net_timestamp(skb);
lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb);
@@ -25111,7 +25669,7 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
out:
lvcc->rx.buf.ptr = end;
cardvcc_write(lvcc, endptr, vcc_rxreadptr);
-@@ -1668,7 +1668,7 @@ static int handle_service(struct lanai_d
+@@ -1668,7 +1668,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
DPRINTK("(itf %d) got RX service entry 0x%X for non-AAL5 "
"vcc %d\n", lanai->number, (unsigned int) s, vci);
lanai->stats.service_rxnotaal5++;
@@ -25120,7 +25678,7 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
return 0;
}
if (likely(!(s & (SERVICE_TRASH | SERVICE_STREAM | SERVICE_CRCERR)))) {
-@@ -1680,7 +1680,7 @@ static int handle_service(struct lanai_d
+@@ -1680,7 +1680,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
int bytes;
read_unlock(&vcc_sklist_lock);
DPRINTK("got trashed rx pdu on vci %d\n", vci);
@@ -25129,7 +25687,7 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
lvcc->stats.x.aal5.service_trash++;
bytes = (SERVICE_GET_END(s) * 16) -
(((unsigned long) lvcc->rx.buf.ptr) -
-@@ -1692,7 +1692,7 @@ static int handle_service(struct lanai_d
+@@ -1692,7 +1692,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
}
if (s & SERVICE_STREAM) {
read_unlock(&vcc_sklist_lock);
@@ -25138,7 +25696,7 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
lvcc->stats.x.aal5.service_stream++;
printk(KERN_ERR DEV_LABEL "(itf %d): Got AAL5 stream "
"PDU on VCI %d!\n", lanai->number, vci);
-@@ -1700,7 +1700,7 @@ static int handle_service(struct lanai_d
+@@ -1700,7 +1700,7 @@ static int handle_service(struct lanai_dev *lanai, u32 s)
return 0;
}
DPRINTK("got rx crc error on vci %d\n", vci);
@@ -25147,10 +25705,11 @@ diff -urNp linux-3.1.4/drivers/atm/lanai.c linux-3.1.4/drivers/atm/lanai.c
lvcc->stats.x.aal5.service_rxcrc++;
lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4];
cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr);
-diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
---- linux-3.1.4/drivers/atm/nicstar.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/nicstar.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1654,7 +1654,7 @@ static int ns_send(struct atm_vcc *vcc,
+diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
+index 1c70c45..300718d 100644
+--- a/drivers/atm/nicstar.c
++++ b/drivers/atm/nicstar.c
+@@ -1654,7 +1654,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if ((vc = (vc_map *) vcc->dev_data) == NULL) {
printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n",
card->index);
@@ -25159,7 +25718,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1662,7 +1662,7 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1662,7 +1662,7 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (!vc->tx) {
printk("nicstar%d: Trying to transmit on a non-tx VC.\n",
card->index);
@@ -25168,7 +25727,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1670,14 +1670,14 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1670,14 +1670,14 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (vcc->qos.aal != ATM_AAL5 && vcc->qos.aal != ATM_AAL0) {
printk("nicstar%d: Only AAL0 and AAL5 are supported.\n",
card->index);
@@ -25185,7 +25744,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
dev_kfree_skb_any(skb);
return -EINVAL;
}
-@@ -1725,11 +1725,11 @@ static int ns_send(struct atm_vcc *vcc,
+@@ -1725,11 +1725,11 @@ static int ns_send(struct atm_vcc *vcc, struct sk_buff *skb)
}
if (push_scqe(card, vc, scq, &scqe, skb) != 0) {
@@ -25199,7 +25758,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
return 0;
}
-@@ -2046,14 +2046,14 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2046,14 +2046,14 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
printk
("nicstar%d: Can't allocate buffers for aal0.\n",
card->index);
@@ -25216,7 +25775,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
dev_kfree_skb_any(sb);
break;
}
-@@ -2068,7 +2068,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2068,7 +2068,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -25225,7 +25784,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
cell += ATM_CELL_PAYLOAD;
}
-@@ -2085,7 +2085,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2085,7 +2085,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
if (iovb == NULL) {
printk("nicstar%d: Out of iovec buffers.\n",
card->index);
@@ -25234,7 +25793,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_rx_buf(card, skb);
return;
}
-@@ -2109,7 +2109,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2109,7 +2109,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
small or large buffer itself. */
} else if (NS_PRV_IOVCNT(iovb) >= NS_MAX_IOVECS) {
printk("nicstar%d: received too big AAL5 SDU.\n", card->index);
@@ -25243,7 +25802,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
NS_MAX_IOVECS);
NS_PRV_IOVCNT(iovb) = 0;
-@@ -2129,7 +2129,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2129,7 +2129,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
("nicstar%d: Expected a small buffer, and this is not one.\n",
card->index);
which_list(card, skb);
@@ -25252,7 +25811,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_rx_buf(card, skb);
vc->rx_iov = NULL;
recycle_iov_buf(card, iovb);
-@@ -2142,7 +2142,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2142,7 +2142,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
("nicstar%d: Expected a large buffer, and this is not one.\n",
card->index);
which_list(card, skb);
@@ -25261,7 +25820,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
NS_PRV_IOVCNT(iovb));
vc->rx_iov = NULL;
-@@ -2165,7 +2165,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2165,7 +2165,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
printk(" - PDU size mismatch.\n");
else
printk(".\n");
@@ -25270,7 +25829,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data,
NS_PRV_IOVCNT(iovb));
vc->rx_iov = NULL;
-@@ -2179,7 +2179,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2179,7 +2179,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
/* skb points to a small buffer */
if (!atm_charge(vcc, skb->truesize)) {
push_rxbufs(card, skb);
@@ -25279,7 +25838,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
} else {
skb_put(skb, len);
dequeue_sm_buf(card, skb);
-@@ -2189,7 +2189,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2189,7 +2189,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
ATM_SKB(skb)->vcc = vcc;
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -25288,7 +25847,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
}
} else if (NS_PRV_IOVCNT(iovb) == 2) { /* One small plus one large buffer */
struct sk_buff *sb;
-@@ -2200,7 +2200,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2200,7 +2200,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
if (len <= NS_SMBUFSIZE) {
if (!atm_charge(vcc, sb->truesize)) {
push_rxbufs(card, sb);
@@ -25297,7 +25856,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
} else {
skb_put(sb, len);
dequeue_sm_buf(card, sb);
-@@ -2210,7 +2210,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2210,7 +2210,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
ATM_SKB(sb)->vcc = vcc;
__net_timestamp(sb);
vcc->push(vcc, sb);
@@ -25306,7 +25865,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
}
push_rxbufs(card, skb);
-@@ -2219,7 +2219,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2219,7 +2219,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
if (!atm_charge(vcc, skb->truesize)) {
push_rxbufs(card, skb);
@@ -25315,7 +25874,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
} else {
dequeue_lg_buf(card, skb);
#ifdef NS_USE_DESTRUCTORS
-@@ -2232,7 +2232,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2232,7 +2232,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
ATM_SKB(skb)->vcc = vcc;
__net_timestamp(skb);
vcc->push(vcc, skb);
@@ -25324,7 +25883,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
}
push_rxbufs(card, sb);
-@@ -2253,7 +2253,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2253,7 +2253,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
printk
("nicstar%d: Out of huge buffers.\n",
card->index);
@@ -25333,7 +25892,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
recycle_iovec_rx_bufs(card,
(struct iovec *)
iovb->data,
-@@ -2304,7 +2304,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2304,7 +2304,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
card->hbpool.count++;
} else
dev_kfree_skb_any(hb);
@@ -25342,7 +25901,7 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
} else {
/* Copy the small buffer to the huge buffer */
sb = (struct sk_buff *)iov->iov_base;
-@@ -2341,7 +2341,7 @@ static void dequeue_rx(ns_dev * card, ns
+@@ -2341,7 +2341,7 @@ static void dequeue_rx(ns_dev * card, ns_rsqe * rsqe)
#endif /* NS_USE_DESTRUCTORS */
__net_timestamp(hb);
vcc->push(vcc, hb);
@@ -25351,9 +25910,10 @@ diff -urNp linux-3.1.4/drivers/atm/nicstar.c linux-3.1.4/drivers/atm/nicstar.c
}
}
-diff -urNp linux-3.1.4/drivers/atm/solos-pci.c linux-3.1.4/drivers/atm/solos-pci.c
---- linux-3.1.4/drivers/atm/solos-pci.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/solos-pci.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
+index 5d1d076..4f31f42 100644
+--- a/drivers/atm/solos-pci.c
++++ b/drivers/atm/solos-pci.c
@@ -714,7 +714,7 @@ void solos_bh(unsigned long card_arg)
}
atm_charge(vcc, skb->truesize);
@@ -25363,7 +25923,7 @@ diff -urNp linux-3.1.4/drivers/atm/solos-pci.c linux-3.1.4/drivers/atm/solos-pci
break;
case PKT_STATUS:
-@@ -899,6 +899,8 @@ static int print_buffer(struct sk_buff *
+@@ -899,6 +899,8 @@ static int print_buffer(struct sk_buff *buf)
char msg[500];
char item[10];
@@ -25372,7 +25932,7 @@ diff -urNp linux-3.1.4/drivers/atm/solos-pci.c linux-3.1.4/drivers/atm/solos-pci
len = buf->len;
for (i = 0; i < len; i++){
if(i % 8 == 0)
-@@ -1008,7 +1010,7 @@ static uint32_t fpga_tx(struct solos_car
+@@ -1008,7 +1010,7 @@ static uint32_t fpga_tx(struct solos_card *card)
vcc = SKB_CB(oldskb)->vcc;
if (vcc) {
@@ -25381,9 +25941,10 @@ diff -urNp linux-3.1.4/drivers/atm/solos-pci.c linux-3.1.4/drivers/atm/solos-pci
solos_pop(vcc, oldskb);
} else
dev_kfree_skb_irq(oldskb);
-diff -urNp linux-3.1.4/drivers/atm/suni.c linux-3.1.4/drivers/atm/suni.c
---- linux-3.1.4/drivers/atm/suni.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/suni.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c
+index 90f1ccc..04c4a1e 100644
+--- a/drivers/atm/suni.c
++++ b/drivers/atm/suni.c
@@ -50,8 +50,8 @@ static DEFINE_SPINLOCK(sunis_lock);
@@ -25395,10 +25956,11 @@ diff -urNp linux-3.1.4/drivers/atm/suni.c linux-3.1.4/drivers/atm/suni.c
static void suni_hz(unsigned long from_timer)
-diff -urNp linux-3.1.4/drivers/atm/uPD98402.c linux-3.1.4/drivers/atm/uPD98402.c
---- linux-3.1.4/drivers/atm/uPD98402.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/uPD98402.c 2011-11-16 18:39:07.000000000 -0500
-@@ -42,7 +42,7 @@ static int fetch_stats(struct atm_dev *d
+diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c
+index 5120a96..e2572bd 100644
+--- a/drivers/atm/uPD98402.c
++++ b/drivers/atm/uPD98402.c
+@@ -42,7 +42,7 @@ static int fetch_stats(struct atm_dev *dev,struct sonet_stats __user *arg,int ze
struct sonet_stats tmp;
int error = 0;
@@ -25407,7 +25969,7 @@ diff -urNp linux-3.1.4/drivers/atm/uPD98402.c linux-3.1.4/drivers/atm/uPD98402.c
sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp);
if (arg) error = copy_to_user(arg,&tmp,sizeof(tmp));
if (zero && !error) {
-@@ -161,9 +161,9 @@ static int uPD98402_ioctl(struct atm_dev
+@@ -161,9 +161,9 @@ static int uPD98402_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
#define ADD_LIMITED(s,v) \
@@ -25420,7 +25982,7 @@ diff -urNp linux-3.1.4/drivers/atm/uPD98402.c linux-3.1.4/drivers/atm/uPD98402.c
static void stat_event(struct atm_dev *dev)
-@@ -194,7 +194,7 @@ static void uPD98402_int(struct atm_dev
+@@ -194,7 +194,7 @@ static void uPD98402_int(struct atm_dev *dev)
if (reason & uPD98402_INT_PFM) stat_event(dev);
if (reason & uPD98402_INT_PCO) {
(void) GET(PCOCR); /* clear interrupt cause */
@@ -25429,7 +25991,7 @@ diff -urNp linux-3.1.4/drivers/atm/uPD98402.c linux-3.1.4/drivers/atm/uPD98402.c
&PRIV(dev)->sonet_stats.uncorr_hcs);
}
if ((reason & uPD98402_INT_RFO) &&
-@@ -222,9 +222,9 @@ static int uPD98402_start(struct atm_dev
+@@ -222,9 +222,9 @@ static int uPD98402_start(struct atm_dev *dev)
PUT(~(uPD98402_INT_PFM | uPD98402_INT_ALM | uPD98402_INT_RFO |
uPD98402_INT_LOS),PIMR); /* enable them */
(void) fetch_stats(dev,NULL,1); /* clear kernel counters */
@@ -25442,10 +26004,11 @@ diff -urNp linux-3.1.4/drivers/atm/uPD98402.c linux-3.1.4/drivers/atm/uPD98402.c
return 0;
}
-diff -urNp linux-3.1.4/drivers/atm/zatm.c linux-3.1.4/drivers/atm/zatm.c
---- linux-3.1.4/drivers/atm/zatm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/atm/zatm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -460,7 +460,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
+diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
+index d889f56..17eb71e 100644
+--- a/drivers/atm/zatm.c
++++ b/drivers/atm/zatm.c
+@@ -460,7 +460,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]);
}
if (!size) {
dev_kfree_skb_irq(skb);
@@ -25454,7 +26017,7 @@ diff -urNp linux-3.1.4/drivers/atm/zatm.c linux-3.1.4/drivers/atm/zatm.c
continue;
}
if (!atm_charge(vcc,skb->truesize)) {
-@@ -470,7 +470,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
+@@ -470,7 +470,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]);
skb->len = size;
ATM_SKB(skb)->vcc = vcc;
vcc->push(vcc,skb);
@@ -25463,7 +26026,7 @@ diff -urNp linux-3.1.4/drivers/atm/zatm.c linux-3.1.4/drivers/atm/zatm.c
}
zout(pos & 0xffff,MTA(mbx));
#if 0 /* probably a stupid idea */
-@@ -734,7 +734,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD
+@@ -734,7 +734,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD_V | uPD98401_TXPD_DP |
skb_queue_head(&zatm_vcc->backlog,skb);
break;
}
@@ -25472,9 +26035,10 @@ diff -urNp linux-3.1.4/drivers/atm/zatm.c linux-3.1.4/drivers/atm/zatm.c
wake_up(&zatm_vcc->tx_wait);
}
-diff -urNp linux-3.1.4/drivers/base/devtmpfs.c linux-3.1.4/drivers/base/devtmpfs.c
---- linux-3.1.4/drivers/base/devtmpfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/base/devtmpfs.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
+index a4760e0..51283cf 100644
+--- a/drivers/base/devtmpfs.c
++++ b/drivers/base/devtmpfs.c
@@ -368,7 +368,7 @@ int devtmpfs_mount(const char *mntdir)
if (!thread)
return 0;
@@ -25484,9 +26048,10 @@ diff -urNp linux-3.1.4/drivers/base/devtmpfs.c linux-3.1.4/drivers/base/devtmpfs
if (err)
printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
else
-diff -urNp linux-3.1.4/drivers/base/power/wakeup.c linux-3.1.4/drivers/base/power/wakeup.c
---- linux-3.1.4/drivers/base/power/wakeup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/base/power/wakeup.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
+index 84f7c7d..37cfd87 100644
+--- a/drivers/base/power/wakeup.c
++++ b/drivers/base/power/wakeup.c
@@ -29,14 +29,14 @@ bool events_check_enabled;
* They need to be modified together atomically, so it's better to use one
* atomic variable to hold them both.
@@ -25504,7 +26069,7 @@ diff -urNp linux-3.1.4/drivers/base/power/wakeup.c linux-3.1.4/drivers/base/powe
*cnt = (comb >> IN_PROGRESS_BITS);
*inpr = comb & MAX_IN_PROGRESS;
-@@ -350,7 +350,7 @@ static void wakeup_source_activate(struc
+@@ -350,7 +350,7 @@ static void wakeup_source_activate(struct wakeup_source *ws)
ws->last_time = ktime_get();
/* Increment the counter of events in progress. */
@@ -25513,7 +26078,7 @@ diff -urNp linux-3.1.4/drivers/base/power/wakeup.c linux-3.1.4/drivers/base/powe
}
/**
-@@ -440,7 +440,7 @@ static void wakeup_source_deactivate(str
+@@ -440,7 +440,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
* Increment the counter of registered wakeup events and decrement the
* couter of wakeup events in progress simultaneously.
*/
@@ -25522,10 +26087,24 @@ diff -urNp linux-3.1.4/drivers/base/power/wakeup.c linux-3.1.4/drivers/base/powe
}
/**
-diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
---- linux-3.1.4/drivers/block/cciss.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/cciss.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1179,6 +1179,8 @@ static int cciss_ioctl32_passthru(struct
+diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
+index e086fbb..398e1fe 100644
+--- a/drivers/block/DAC960.c
++++ b/drivers/block/DAC960.c
+@@ -1980,6 +1980,8 @@ static bool DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
+ unsigned long flags;
+ int Channel, TargetID;
+
++ pax_track_stack();
++
+ if (!init_dma_loaf(Controller->PCIDevice, &local_dma,
+ DAC960_V1_MaxChannels*(sizeof(DAC960_V1_DCDB_T) +
+ sizeof(DAC960_SCSI_Inquiry_T) +
+diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
+index c2f9b3e..5911988 100644
+--- a/drivers/block/cciss.c
++++ b/drivers/block/cciss.c
+@@ -1179,6 +1179,8 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode,
int err;
u32 cp;
@@ -25573,7 +26152,7 @@ diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
(h->interrupts_enabled == 0));
}
-@@ -3465,7 +3467,7 @@ static inline u32 next_command(ctlr_info
+@@ -3465,7 +3467,7 @@ static inline u32 next_command(ctlr_info_t *h)
u32 a;
if (unlikely(!(h->transMethod & CFGTBL_Trans_Performant)))
@@ -25582,7 +26161,7 @@ diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
a = *(h->reply_pool_head); /* Next cmd in ring buffer */
-@@ -4020,7 +4022,7 @@ static void __devinit cciss_put_controll
+@@ -4020,7 +4022,7 @@ static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)
trans_support & CFGTBL_Trans_use_short_tags);
/* Change the access methods to the performant access methods */
@@ -25591,7 +26170,7 @@ diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
h->transMethod = CFGTBL_Trans_Performant;
return;
-@@ -4292,7 +4294,7 @@ static int __devinit cciss_pci_init(ctlr
+@@ -4292,7 +4294,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *h)
if (prod_index < 0)
return -ENODEV;
h->product_name = products[prod_index].product_name;
@@ -25639,7 +26218,7 @@ diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
/* Get the firmware version */
inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
-@@ -5178,7 +5180,7 @@ static void cciss_shutdown(struct pci_de
+@@ -5178,7 +5180,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
kfree(flush_buf);
if (return_code != IO_OK)
dev_warn(&h->pdev->dev, "Error flushing cache\n");
@@ -25648,9 +26227,10 @@ diff -urNp linux-3.1.4/drivers/block/cciss.c linux-3.1.4/drivers/block/cciss.c
free_irq(h->intr[PERF_MODE_INT], h);
}
-diff -urNp linux-3.1.4/drivers/block/cciss.h linux-3.1.4/drivers/block/cciss.h
---- linux-3.1.4/drivers/block/cciss.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/cciss.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
+index c049548..a09cb6e 100644
+--- a/drivers/block/cciss.h
++++ b/drivers/block/cciss.h
@@ -100,7 +100,7 @@ struct ctlr_info
/* information about each logical volume */
drive_info_struct *drv[CISS_MAX_LUN];
@@ -25660,10 +26240,11 @@ diff -urNp linux-3.1.4/drivers/block/cciss.h linux-3.1.4/drivers/block/cciss.h
/* queue and queue Info */
struct list_head reqQ;
-diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarray.c
---- linux-3.1.4/drivers/block/cpqarray.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/cpqarray.c 2011-11-16 18:40:10.000000000 -0500
-@@ -404,7 +404,7 @@ static int __devinit cpqarray_register_c
+diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
+index b2fceb5..87fec83 100644
+--- a/drivers/block/cpqarray.c
++++ b/drivers/block/cpqarray.c
+@@ -404,7 +404,7 @@ static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev)
if (register_blkdev(COMPAQ_SMART2_MAJOR+i, hba[i]->devname)) {
goto Enomem4;
}
@@ -25672,7 +26253,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
if (request_irq(hba[i]->intr, do_ida_intr,
IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
{
-@@ -459,7 +459,7 @@ static int __devinit cpqarray_register_c
+@@ -459,7 +459,7 @@ static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev)
add_timer(&hba[i]->timer);
/* Enable IRQ now that spinlock and rate limit timer are set up */
@@ -25690,7 +26271,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
break;
}
}
-@@ -792,7 +792,7 @@ static int __devinit cpqarray_eisa_detec
+@@ -792,7 +792,7 @@ static int __devinit cpqarray_eisa_detect(void)
hba[ctlr]->intr = intr;
sprintf(hba[ctlr]->devname, "ida%d", nr_ctlr);
hba[ctlr]->product_name = products[j].product_name;
@@ -25699,7 +26280,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
hba[ctlr]->ctlr = ctlr;
hba[ctlr]->board_id = board_id;
hba[ctlr]->pci_dev = NULL; /* not PCI */
-@@ -911,6 +911,8 @@ static void do_ida_request(struct reques
+@@ -911,6 +911,8 @@ static void do_ida_request(struct request_queue *q)
struct scatterlist tmp_sg[SG_MAX];
int i, dir, seg;
@@ -25726,7 +26307,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
/* Get onto the completion Q */
addQ(&h->cmpQ, c);
-@@ -1050,7 +1052,7 @@ static irqreturn_t do_ida_intr(int irq,
+@@ -1050,7 +1052,7 @@ static irqreturn_t do_ida_intr(int irq, void *dev_id)
unsigned long flags;
__u32 a,a1;
@@ -25735,7 +26316,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
/* Is this interrupt for us? */
if (istat == 0)
return IRQ_NONE;
-@@ -1061,7 +1063,7 @@ static irqreturn_t do_ida_intr(int irq,
+@@ -1061,7 +1063,7 @@ static irqreturn_t do_ida_intr(int irq, void *dev_id)
*/
spin_lock_irqsave(IDA_LOCK(h->ctlr), flags);
if (istat & FIFO_NOT_EMPTY) {
@@ -25767,7 +26348,7 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
complete = pollcomplete(ctlr);
pci_unmap_single(info_p->pci_dev, (dma_addr_t) c->req.sg[0].addr,
-@@ -1549,9 +1551,9 @@ static int revalidate_allvol(ctlr_info_t
+@@ -1549,9 +1551,9 @@ static int revalidate_allvol(ctlr_info_t *host)
* we check the new geometry. Then turn interrupts back on when
* we're done.
*/
@@ -25788,9 +26369,10 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.c linux-3.1.4/drivers/block/cpqarr
if (done == 0) {
udelay(10); /* a short fixed delay */
} else
-diff -urNp linux-3.1.4/drivers/block/cpqarray.h linux-3.1.4/drivers/block/cpqarray.h
---- linux-3.1.4/drivers/block/cpqarray.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/cpqarray.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/block/cpqarray.h b/drivers/block/cpqarray.h
+index be73e9d..7fbf140 100644
+--- a/drivers/block/cpqarray.h
++++ b/drivers/block/cpqarray.h
@@ -99,7 +99,7 @@ struct ctlr_info {
drv_info_t drv[NWD];
struct proc_dir_entry *proc;
@@ -25800,21 +26382,10 @@ diff -urNp linux-3.1.4/drivers/block/cpqarray.h linux-3.1.4/drivers/block/cpqarr
cmdlist_t *reqQ;
cmdlist_t *cmpQ;
-diff -urNp linux-3.1.4/drivers/block/DAC960.c linux-3.1.4/drivers/block/DAC960.c
---- linux-3.1.4/drivers/block/DAC960.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/DAC960.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1980,6 +1980,8 @@ static bool DAC960_V1_ReadDeviceConfigur
- unsigned long flags;
- int Channel, TargetID;
-
-+ pax_track_stack();
-+
- if (!init_dma_loaf(Controller->PCIDevice, &local_dma,
- DAC960_V1_MaxChannels*(sizeof(DAC960_V1_DCDB_T) +
- sizeof(DAC960_SCSI_Inquiry_T) +
-diff -urNp linux-3.1.4/drivers/block/drbd/drbd_int.h linux-3.1.4/drivers/block/drbd/drbd_int.h
---- linux-3.1.4/drivers/block/drbd/drbd_int.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/drbd/drbd_int.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
+index ef2ceed..c9cb18e 100644
+--- a/drivers/block/drbd/drbd_int.h
++++ b/drivers/block/drbd/drbd_int.h
@@ -737,7 +737,7 @@ struct drbd_request;
struct drbd_epoch {
struct list_head list;
@@ -25833,7 +26404,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_int.h linux-3.1.4/drivers/block/d
unsigned int peer_seq;
spinlock_t peer_seq_lock;
unsigned int minor;
-@@ -1618,30 +1618,30 @@ static inline int drbd_setsockopt(struct
+@@ -1618,30 +1618,30 @@ static inline int drbd_setsockopt(struct socket *sock, int level, int optname,
static inline void drbd_tcp_cork(struct socket *sock)
{
@@ -25872,10 +26443,11 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_int.h linux-3.1.4/drivers/block/d
}
void drbd_bump_write_ordering(struct drbd_conf *mdev, enum write_ordering_e wo);
-diff -urNp linux-3.1.4/drivers/block/drbd/drbd_main.c linux-3.1.4/drivers/block/drbd/drbd_main.c
---- linux-3.1.4/drivers/block/drbd/drbd_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/drbd/drbd_main.c 2011-11-16 18:39:07.000000000 -0500
-@@ -2397,7 +2397,7 @@ static int _drbd_send_ack(struct drbd_co
+diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
+index 0358e55..bc33689 100644
+--- a/drivers/block/drbd/drbd_main.c
++++ b/drivers/block/drbd/drbd_main.c
+@@ -2397,7 +2397,7 @@ static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packets cmd,
p.sector = sector;
p.block_id = block_id;
p.blksize = blksize;
@@ -25884,7 +26456,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_main.c linux-3.1.4/drivers/block/
if (!mdev->meta.socket || mdev->state.conn < C_CONNECTED)
return false;
-@@ -2696,7 +2696,7 @@ int drbd_send_dblock(struct drbd_conf *m
+@@ -2696,7 +2696,7 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req)
p.sector = cpu_to_be64(req->sector);
p.block_id = (unsigned long)req;
p.seq_num = cpu_to_be32(req->seq_num =
@@ -25893,7 +26465,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_main.c linux-3.1.4/drivers/block/
dp_flags = bio_flags_to_wire(mdev, req->master_bio->bi_rw);
-@@ -2981,7 +2981,7 @@ void drbd_init_set_defaults(struct drbd_
+@@ -2981,7 +2981,7 @@ void drbd_init_set_defaults(struct drbd_conf *mdev)
atomic_set(&mdev->unacked_cnt, 0);
atomic_set(&mdev->local_cnt, 0);
atomic_set(&mdev->net_cnt, 0);
@@ -25902,7 +26474,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_main.c linux-3.1.4/drivers/block/
atomic_set(&mdev->pp_in_use, 0);
atomic_set(&mdev->pp_in_use_by_net, 0);
atomic_set(&mdev->rs_sect_in, 0);
-@@ -3063,8 +3063,8 @@ void drbd_mdev_cleanup(struct drbd_conf
+@@ -3063,8 +3063,8 @@ void drbd_mdev_cleanup(struct drbd_conf *mdev)
mdev->receiver.t_state);
/* no need to lock it, I'm the only thread alive */
@@ -25913,10 +26485,11 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_main.c linux-3.1.4/drivers/block/
mdev->al_writ_cnt =
mdev->bm_writ_cnt =
mdev->read_cnt =
-diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/drbd/drbd_nl.c
---- linux-3.1.4/drivers/block/drbd/drbd_nl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/drbd/drbd_nl.c 2011-11-16 18:39:07.000000000 -0500
-@@ -2359,7 +2359,7 @@ static void drbd_connector_callback(stru
+diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
+index 0feab26..5d9b3dd 100644
+--- a/drivers/block/drbd/drbd_nl.c
++++ b/drivers/block/drbd/drbd_nl.c
+@@ -2359,7 +2359,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
module_put(THIS_MODULE);
}
@@ -25925,7 +26498,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/dr
static unsigned short *
__tl_add_blob(unsigned short *tl, enum drbd_tags tag, const void *data,
-@@ -2430,7 +2430,7 @@ void drbd_bcast_state(struct drbd_conf *
+@@ -2430,7 +2430,7 @@ void drbd_bcast_state(struct drbd_conf *mdev, union drbd_state state)
cn_reply->id.idx = CN_IDX_DRBD;
cn_reply->id.val = CN_VAL_DRBD;
@@ -25934,7 +26507,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/dr
cn_reply->ack = 0; /* not used here. */
cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char *)tl - (char *)reply->tag_list);
-@@ -2462,7 +2462,7 @@ void drbd_bcast_ev_helper(struct drbd_co
+@@ -2462,7 +2462,7 @@ void drbd_bcast_ev_helper(struct drbd_conf *mdev, char *helper_name)
cn_reply->id.idx = CN_IDX_DRBD;
cn_reply->id.val = CN_VAL_DRBD;
@@ -25943,7 +26516,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/dr
cn_reply->ack = 0; /* not used here. */
cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char *)tl - (char *)reply->tag_list);
-@@ -2540,7 +2540,7 @@ void drbd_bcast_ee(struct drbd_conf *mde
+@@ -2540,7 +2540,7 @@ void drbd_bcast_ee(struct drbd_conf *mdev,
cn_reply->id.idx = CN_IDX_DRBD;
cn_reply->id.val = CN_VAL_DRBD;
@@ -25952,7 +26525,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/dr
cn_reply->ack = 0; // not used here.
cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char*)tl - (char*)reply->tag_list);
-@@ -2579,7 +2579,7 @@ void drbd_bcast_sync_progress(struct drb
+@@ -2579,7 +2579,7 @@ void drbd_bcast_sync_progress(struct drbd_conf *mdev)
cn_reply->id.idx = CN_IDX_DRBD;
cn_reply->id.val = CN_VAL_DRBD;
@@ -25961,9 +26534,10 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_nl.c linux-3.1.4/drivers/block/dr
cn_reply->ack = 0; /* not used here. */
cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char *)tl - (char *)reply->tag_list);
-diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/block/drbd/drbd_receiver.c
---- linux-3.1.4/drivers/block/drbd/drbd_receiver.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/drbd/drbd_receiver.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
+index 43beaca..4a5b1dd 100644
+--- a/drivers/block/drbd/drbd_receiver.c
++++ b/drivers/block/drbd/drbd_receiver.c
@@ -894,7 +894,7 @@ retry:
sock->sk->sk_sndtimeo = mdev->net_conf->timeout*HZ/10;
sock->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT;
@@ -25973,7 +26547,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
mdev->peer_seq = 0;
drbd_thread_start(&mdev->asender);
-@@ -985,7 +985,7 @@ static enum finish_epoch drbd_may_finish
+@@ -985,7 +985,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
do {
next_epoch = NULL;
@@ -25982,7 +26556,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
switch (ev & ~EV_CLEANUP) {
case EV_PUT:
-@@ -1020,7 +1020,7 @@ static enum finish_epoch drbd_may_finish
+@@ -1020,7 +1020,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
rv = FE_DESTROYED;
} else {
epoch->flags = 0;
@@ -25991,7 +26565,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
/* atomic_set(&epoch->active, 0); is already zero */
if (rv == FE_STILL_LIVE)
rv = FE_RECYCLED;
-@@ -1191,14 +1191,14 @@ static int receive_Barrier(struct drbd_c
+@@ -1191,14 +1191,14 @@ static int receive_Barrier(struct drbd_conf *mdev, enum drbd_packets cmd, unsign
drbd_wait_ee_list_empty(mdev, &mdev->active_ee);
drbd_flush(mdev);
@@ -26008,7 +26582,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
D_ASSERT(atomic_read(&epoch->active) == 0);
D_ASSERT(epoch->flags == 0);
-@@ -1210,11 +1210,11 @@ static int receive_Barrier(struct drbd_c
+@@ -1210,11 +1210,11 @@ static int receive_Barrier(struct drbd_conf *mdev, enum drbd_packets cmd, unsign
}
epoch->flags = 0;
@@ -26022,7 +26596,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
list_add(&epoch->list, &mdev->current_epoch->list);
mdev->current_epoch = epoch;
mdev->epochs++;
-@@ -1663,7 +1663,7 @@ static int receive_Data(struct drbd_conf
+@@ -1663,7 +1663,7 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned
spin_unlock(&mdev->peer_seq_lock);
drbd_send_ack_dp(mdev, P_NEG_ACK, p, data_size);
@@ -26031,7 +26605,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
return drbd_drain_block(mdev, data_size);
}
-@@ -1689,7 +1689,7 @@ static int receive_Data(struct drbd_conf
+@@ -1689,7 +1689,7 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned
spin_lock(&mdev->epoch_lock);
e->epoch = mdev->current_epoch;
@@ -26040,7 +26614,7 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
atomic_inc(&e->epoch->active);
spin_unlock(&mdev->epoch_lock);
-@@ -3885,7 +3885,7 @@ static void drbd_disconnect(struct drbd_
+@@ -3885,7 +3885,7 @@ static void drbd_disconnect(struct drbd_conf *mdev)
D_ASSERT(list_empty(&mdev->done_ee));
/* ok, no more ee's on the fly, it is safe to reset the epoch_size */
@@ -26049,10 +26623,11 @@ diff -urNp linux-3.1.4/drivers/block/drbd/drbd_receiver.c linux-3.1.4/drivers/bl
D_ASSERT(list_empty(&mdev->current_epoch->list));
}
-diff -urNp linux-3.1.4/drivers/block/loop.c linux-3.1.4/drivers/block/loop.c
---- linux-3.1.4/drivers/block/loop.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/loop.c 2011-11-16 18:39:07.000000000 -0500
-@@ -283,7 +283,7 @@ static int __do_lo_send_write(struct fil
+diff --git a/drivers/block/loop.c b/drivers/block/loop.c
+index 4720c7a..2c49af1 100644
+--- a/drivers/block/loop.c
++++ b/drivers/block/loop.c
+@@ -283,7 +283,7 @@ static int __do_lo_send_write(struct file *file,
mm_segment_t old_fs = get_fs();
set_fs(get_ds());
@@ -26061,10 +26636,11 @@ diff -urNp linux-3.1.4/drivers/block/loop.c linux-3.1.4/drivers/block/loop.c
set_fs(old_fs);
if (likely(bw == len))
return 0;
-diff -urNp linux-3.1.4/drivers/block/nbd.c linux-3.1.4/drivers/block/nbd.c
---- linux-3.1.4/drivers/block/nbd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/block/nbd.c 2011-11-16 18:40:10.000000000 -0500
-@@ -157,6 +157,8 @@ static int sock_xmit(struct nbd_device *
+diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
+index f533f33..6177bcb 100644
+--- a/drivers/block/nbd.c
++++ b/drivers/block/nbd.c
+@@ -157,6 +157,8 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
struct kvec iov;
sigset_t blocked, oldset;
@@ -26073,7 +26649,7 @@ diff -urNp linux-3.1.4/drivers/block/nbd.c linux-3.1.4/drivers/block/nbd.c
if (unlikely(!sock)) {
printk(KERN_ERR "%s: Attempted %s on closed socket in sock_xmit\n",
lo->disk->disk_name, (send ? "send" : "recv"));
-@@ -572,6 +574,8 @@ static void do_nbd_request(struct reques
+@@ -572,6 +574,8 @@ static void do_nbd_request(struct request_queue *q)
static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
unsigned int cmd, unsigned long arg)
{
@@ -26082,10 +26658,33 @@ diff -urNp linux-3.1.4/drivers/block/nbd.c linux-3.1.4/drivers/block/nbd.c
switch (cmd) {
case NBD_DISCONNECT: {
struct request sreq;
-diff -urNp linux-3.1.4/drivers/char/agp/frontend.c linux-3.1.4/drivers/char/agp/frontend.c
---- linux-3.1.4/drivers/char/agp/frontend.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/agp/frontend.c 2011-11-16 18:39:07.000000000 -0500
-@@ -817,7 +817,7 @@ static int agpioc_reserve_wrap(struct ag
+diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
+index 423fd56..06d3be0 100644
+--- a/drivers/char/Kconfig
++++ b/drivers/char/Kconfig
+@@ -8,7 +8,8 @@ source "drivers/tty/Kconfig"
+
+ config DEVKMEM
+ bool "/dev/kmem virtual device support"
+- default y
++ default n
++ depends on !GRKERNSEC_KMEM
+ help
+ Say Y here if you want to support the /dev/kmem device. The
+ /dev/kmem device is rarely used, but can be used for certain
+@@ -596,6 +597,7 @@ config DEVPORT
+ bool
+ depends on !M68K
+ depends on ISA || PCI
++ depends on !GRKERNSEC_KMEM
+ default y
+
+ source "drivers/s390/char/Kconfig"
+diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
+index 2e04433..22afc64 100644
+--- a/drivers/char/agp/frontend.c
++++ b/drivers/char/agp/frontend.c
+@@ -817,7 +817,7 @@ static int agpioc_reserve_wrap(struct agp_file_private *priv, void __user *arg)
if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
return -EFAULT;
@@ -26094,9 +26693,10 @@ diff -urNp linux-3.1.4/drivers/char/agp/frontend.c linux-3.1.4/drivers/char/agp/
return -EFAULT;
client = agp_find_client_by_pid(reserve.pid);
-diff -urNp linux-3.1.4/drivers/char/briq_panel.c linux-3.1.4/drivers/char/briq_panel.c
---- linux-3.1.4/drivers/char/briq_panel.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/briq_panel.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c
+index 095ab90..afad0a4 100644
+--- a/drivers/char/briq_panel.c
++++ b/drivers/char/briq_panel.c
@@ -9,6 +9,7 @@
#include <linux/types.h>
#include <linux/errno.h>
@@ -26113,7 +26713,7 @@ diff -urNp linux-3.1.4/drivers/char/briq_panel.c linux-3.1.4/drivers/char/briq_p
static void update_vfd(void)
{
-@@ -140,12 +142,15 @@ static ssize_t briq_panel_write(struct f
+@@ -140,12 +142,15 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
if (!vfd_is_open)
return -EBUSY;
@@ -26130,7 +26730,7 @@ diff -urNp linux-3.1.4/drivers/char/briq_panel.c linux-3.1.4/drivers/char/briq_p
if (esc) {
set_led(c);
esc = 0;
-@@ -175,6 +180,7 @@ static ssize_t briq_panel_write(struct f
+@@ -175,6 +180,7 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
buf++;
}
update_vfd();
@@ -26138,10 +26738,11 @@ diff -urNp linux-3.1.4/drivers/char/briq_panel.c linux-3.1.4/drivers/char/briq_p
return len;
}
-diff -urNp linux-3.1.4/drivers/char/genrtc.c linux-3.1.4/drivers/char/genrtc.c
---- linux-3.1.4/drivers/char/genrtc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/genrtc.c 2011-11-16 18:40:10.000000000 -0500
-@@ -273,6 +273,7 @@ static int gen_rtc_ioctl(struct file *fi
+diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
+index f773a9d..65cd683 100644
+--- a/drivers/char/genrtc.c
++++ b/drivers/char/genrtc.c
+@@ -273,6 +273,7 @@ static int gen_rtc_ioctl(struct file *file,
switch (cmd) {
case RTC_PLL_GET:
@@ -26149,10 +26750,11 @@ diff -urNp linux-3.1.4/drivers/char/genrtc.c linux-3.1.4/drivers/char/genrtc.c
if (get_rtc_pll(&pll))
return -EINVAL;
else
-diff -urNp linux-3.1.4/drivers/char/hpet.c linux-3.1.4/drivers/char/hpet.c
---- linux-3.1.4/drivers/char/hpet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/hpet.c 2011-11-16 18:39:07.000000000 -0500
-@@ -572,7 +572,7 @@ static inline unsigned long hpet_time_di
+diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
+index 0833896..cccce52 100644
+--- a/drivers/char/hpet.c
++++ b/drivers/char/hpet.c
+@@ -572,7 +572,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
}
static int
@@ -26161,9 +26763,10 @@ diff -urNp linux-3.1.4/drivers/char/hpet.c linux-3.1.4/drivers/char/hpet.c
struct hpet_info *info)
{
struct hpet_timer __iomem *timer;
-diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c
---- linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
+index 58c0e63..25aed94 100644
+--- a/drivers/char/ipmi/ipmi_msghandler.c
++++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -415,7 +415,7 @@ struct ipmi_smi {
struct proc_dir_entry *proc_dir;
char proc_dir_name[10];
@@ -26185,7 +26788,7 @@ diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c linux-3.1.4/drivers/c
static int is_lan_addr(struct ipmi_addr *addr)
{
-@@ -2868,7 +2868,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
+@@ -2868,7 +2868,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
INIT_LIST_HEAD(&intf->cmd_rcvrs);
init_waitqueue_head(&intf->waitq);
for (i = 0; i < IPMI_NUM_STATS; i++)
@@ -26203,9 +26806,10 @@ diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_msghandler.c linux-3.1.4/drivers/c
si = (struct ipmi_system_interface_addr *) &addr;
si->addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
si->channel = IPMI_BMC_CHANNEL;
-diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c
---- linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
+index 9397ab4..d01bee1 100644
+--- a/drivers/char/ipmi/ipmi_si_intf.c
++++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -277,7 +277,7 @@ struct smi_info {
unsigned char slave_addr;
@@ -26227,7 +26831,7 @@ diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c linux-3.1.4/drivers/char
#define SI_MAX_PARMS 4
-@@ -3230,7 +3230,7 @@ static int try_smi_init(struct smi_info
+@@ -3230,7 +3230,7 @@ static int try_smi_init(struct smi_info *new_smi)
atomic_set(&new_smi->req_events, 0);
new_smi->run_to_completion = 0;
for (i = 0; i < SI_NUM_STATS; i++)
@@ -26236,31 +26840,11 @@ diff -urNp linux-3.1.4/drivers/char/ipmi/ipmi_si_intf.c linux-3.1.4/drivers/char
new_smi->interrupt_disabled = 1;
atomic_set(&new_smi->stop_operation, 0);
-diff -urNp linux-3.1.4/drivers/char/Kconfig linux-3.1.4/drivers/char/Kconfig
---- linux-3.1.4/drivers/char/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/Kconfig 2011-11-16 18:40:10.000000000 -0500
-@@ -8,7 +8,8 @@ source "drivers/tty/Kconfig"
-
- config DEVKMEM
- bool "/dev/kmem virtual device support"
-- default y
-+ default n
-+ depends on !GRKERNSEC_KMEM
- help
- Say Y here if you want to support the /dev/kmem device. The
- /dev/kmem device is rarely used, but can be used for certain
-@@ -596,6 +597,7 @@ config DEVPORT
- bool
- depends on !M68K
- depends on ISA || PCI
-+ depends on !GRKERNSEC_KMEM
- default y
-
- source "drivers/s390/char/Kconfig"
-diff -urNp linux-3.1.4/drivers/char/mbcs.c linux-3.1.4/drivers/char/mbcs.c
---- linux-3.1.4/drivers/char/mbcs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/mbcs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -800,7 +800,7 @@ static int mbcs_remove(struct cx_dev *de
+diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
+index 1aeaaba..e018570 100644
+--- a/drivers/char/mbcs.c
++++ b/drivers/char/mbcs.c
+@@ -800,7 +800,7 @@ static int mbcs_remove(struct cx_dev *dev)
return 0;
}
@@ -26269,9 +26853,10 @@ diff -urNp linux-3.1.4/drivers/char/mbcs.c linux-3.1.4/drivers/char/mbcs.c
{
.part_num = MBCS_PART_NUM,
.mfg_num = MBCS_MFG_NUM,
-diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
---- linux-3.1.4/drivers/char/mem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/mem.c 2011-11-17 18:31:56.000000000 -0500
+diff --git a/drivers/char/mem.c b/drivers/char/mem.c
+index 8fc04b4..cebdeec 100644
+--- a/drivers/char/mem.c
++++ b/drivers/char/mem.c
@@ -18,6 +18,7 @@
#include <linux/raw.h>
#include <linux/tty.h>
@@ -26291,7 +26876,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
static inline unsigned long size_inside_page(unsigned long start,
unsigned long size)
{
-@@ -65,9 +70,13 @@ static inline int range_is_allowed(unsig
+@@ -65,9 +70,13 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
@@ -26305,7 +26890,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
return 0;
}
cursor += PAGE_SIZE;
-@@ -75,6 +84,11 @@ static inline int range_is_allowed(unsig
+@@ -75,6 +84,11 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
}
return 1;
}
@@ -26317,7 +26902,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
#else
static inline int range_is_allowed(unsigned long pfn, unsigned long size)
{
-@@ -117,6 +131,7 @@ static ssize_t read_mem(struct file *fil
+@@ -117,6 +131,7 @@ static ssize_t read_mem(struct file *file, char __user *buf,
while (count > 0) {
unsigned long remaining;
@@ -26325,7 +26910,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
sz = size_inside_page(p, count);
-@@ -132,7 +147,23 @@ static ssize_t read_mem(struct file *fil
+@@ -132,7 +147,23 @@ static ssize_t read_mem(struct file *file, char __user *buf,
if (!ptr)
return -EFAULT;
@@ -26350,7 +26935,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
unxlate_dev_mem_ptr(p, ptr);
if (remaining)
return -EFAULT;
-@@ -395,9 +426,8 @@ static ssize_t read_kmem(struct file *fi
+@@ -395,9 +426,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
unsigned long p = *ppos;
@@ -26361,7 +26946,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
read = 0;
if (p < (unsigned long) high_memory) {
-@@ -419,6 +449,8 @@ static ssize_t read_kmem(struct file *fi
+@@ -419,6 +449,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
}
#endif
while (low_count > 0) {
@@ -26370,7 +26955,7 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
sz = size_inside_page(p, low_count);
/*
-@@ -428,7 +460,22 @@ static ssize_t read_kmem(struct file *fi
+@@ -428,7 +460,22 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
*/
kbuf = xlate_dev_kmem_ptr((char *)p);
@@ -26404,10 +26989,11 @@ diff -urNp linux-3.1.4/drivers/char/mem.c linux-3.1.4/drivers/char/mem.c
};
static int memory_open(struct inode *inode, struct file *filp)
-diff -urNp linux-3.1.4/drivers/char/nvram.c linux-3.1.4/drivers/char/nvram.c
---- linux-3.1.4/drivers/char/nvram.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/nvram.c 2011-11-16 18:39:07.000000000 -0500
-@@ -248,7 +248,7 @@ static ssize_t nvram_read(struct file *f
+diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
+index da3cfee..a5a6606 100644
+--- a/drivers/char/nvram.c
++++ b/drivers/char/nvram.c
+@@ -248,7 +248,7 @@ static ssize_t nvram_read(struct file *file, char __user *buf,
spin_unlock_irq(&rtc_lock);
@@ -26416,9 +27002,10 @@ diff -urNp linux-3.1.4/drivers/char/nvram.c linux-3.1.4/drivers/char/nvram.c
return -EFAULT;
*ppos = i;
-diff -urNp linux-3.1.4/drivers/char/random.c linux-3.1.4/drivers/char/random.c
---- linux-3.1.4/drivers/char/random.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/random.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index c35a785..6d82202 100644
+--- a/drivers/char/random.c
++++ b/drivers/char/random.c
@@ -261,8 +261,13 @@
/*
* Configuration information
@@ -26451,7 +27038,7 @@ diff -urNp linux-3.1.4/drivers/char/random.c linux-3.1.4/drivers/char/random.c
#if 0
/* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */
{ 2048, 1638, 1231, 819, 411, 1 },
-@@ -909,7 +921,7 @@ static ssize_t extract_entropy_user(stru
+@@ -909,7 +921,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf,
extract_buf(r, tmp);
i = min_t(int, nbytes, EXTRACT_SIZE);
@@ -26469,9 +27056,10 @@ diff -urNp linux-3.1.4/drivers/char/random.c linux-3.1.4/drivers/char/random.c
static int max_write_thresh = INPUT_POOL_WORDS * 32;
static char sysctl_bootid[16];
-diff -urNp linux-3.1.4/drivers/char/sonypi.c linux-3.1.4/drivers/char/sonypi.c
---- linux-3.1.4/drivers/char/sonypi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/sonypi.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
+index 1ee8ce7..b778bef 100644
+--- a/drivers/char/sonypi.c
++++ b/drivers/char/sonypi.c
@@ -55,6 +55,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -26489,7 +27077,7 @@ diff -urNp linux-3.1.4/drivers/char/sonypi.c linux-3.1.4/drivers/char/sonypi.c
int model;
struct input_dev *input_jog_dev;
struct input_dev *input_key_dev;
-@@ -898,7 +899,7 @@ static int sonypi_misc_fasync(int fd, st
+@@ -898,7 +899,7 @@ static int sonypi_misc_fasync(int fd, struct file *filp, int on)
static int sonypi_misc_release(struct inode *inode, struct file *file)
{
mutex_lock(&sonypi_device.lock);
@@ -26498,7 +27086,7 @@ diff -urNp linux-3.1.4/drivers/char/sonypi.c linux-3.1.4/drivers/char/sonypi.c
mutex_unlock(&sonypi_device.lock);
return 0;
}
-@@ -907,9 +908,9 @@ static int sonypi_misc_open(struct inode
+@@ -907,9 +908,9 @@ static int sonypi_misc_open(struct inode *inode, struct file *file)
{
mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */
@@ -26510,10 +27098,33 @@ diff -urNp linux-3.1.4/drivers/char/sonypi.c linux-3.1.4/drivers/char/sonypi.c
mutex_unlock(&sonypi_device.lock);
return 0;
-diff -urNp linux-3.1.4/drivers/char/tpm/tpm_bios.c linux-3.1.4/drivers/char/tpm/tpm_bios.c
---- linux-3.1.4/drivers/char/tpm/tpm_bios.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/tpm/tpm_bios.c 2011-11-16 18:39:07.000000000 -0500
-@@ -173,7 +173,7 @@ static void *tpm_bios_measurements_start
+diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
+index 9ca5c02..7ce352c 100644
+--- a/drivers/char/tpm/tpm.c
++++ b/drivers/char/tpm/tpm.c
+@@ -414,7 +414,7 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
+ chip->vendor.req_complete_val)
+ goto out_recv;
+
+- if ((status == chip->vendor.req_canceled)) {
++ if (status == chip->vendor.req_canceled) {
+ dev_err(chip->dev, "Operation Canceled\n");
+ rc = -ECANCELED;
+ goto out;
+@@ -862,6 +862,8 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr,
+
+ struct tpm_chip *chip = dev_get_drvdata(dev);
+
++ pax_track_stack();
++
+ tpm_cmd.header.in = tpm_readpubek_header;
+ err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE,
+ "attempting to read the PUBEK");
+diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
+index 0636520..169c1d0 100644
+--- a/drivers/char/tpm/tpm_bios.c
++++ b/drivers/char/tpm/tpm_bios.c
+@@ -173,7 +173,7 @@ static void *tpm_bios_measurements_start(struct seq_file *m, loff_t *pos)
event = addr;
if ((event->event_type == 0 && event->event_size == 0) ||
@@ -26522,7 +27133,7 @@ diff -urNp linux-3.1.4/drivers/char/tpm/tpm_bios.c linux-3.1.4/drivers/char/tpm/
return NULL;
return addr;
-@@ -198,7 +198,7 @@ static void *tpm_bios_measurements_next(
+@@ -198,7 +198,7 @@ static void *tpm_bios_measurements_next(struct seq_file *m, void *v,
return NULL;
if ((event->event_type == 0 && event->event_size == 0) ||
@@ -26531,7 +27142,7 @@ diff -urNp linux-3.1.4/drivers/char/tpm/tpm_bios.c linux-3.1.4/drivers/char/tpm/
return NULL;
(*pos)++;
-@@ -291,7 +291,8 @@ static int tpm_binary_bios_measurements_
+@@ -291,7 +291,8 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
int i;
for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++)
@@ -26541,7 +27152,7 @@ diff -urNp linux-3.1.4/drivers/char/tpm/tpm_bios.c linux-3.1.4/drivers/char/tpm/
return 0;
}
-@@ -410,8 +411,13 @@ static int read_log(struct tpm_bios_log
+@@ -410,8 +411,13 @@ static int read_log(struct tpm_bios_log *log)
log->bios_event_log_end = log->bios_event_log + len;
virt = acpi_os_map_memory(start, len);
@@ -26556,31 +27167,11 @@ diff -urNp linux-3.1.4/drivers/char/tpm/tpm_bios.c linux-3.1.4/drivers/char/tpm/
acpi_os_unmap_memory(virt, len);
return 0;
-diff -urNp linux-3.1.4/drivers/char/tpm/tpm.c linux-3.1.4/drivers/char/tpm/tpm.c
---- linux-3.1.4/drivers/char/tpm/tpm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/tpm/tpm.c 2011-11-16 18:40:10.000000000 -0500
-@@ -414,7 +414,7 @@ static ssize_t tpm_transmit(struct tpm_c
- chip->vendor.req_complete_val)
- goto out_recv;
-
-- if ((status == chip->vendor.req_canceled)) {
-+ if (status == chip->vendor.req_canceled) {
- dev_err(chip->dev, "Operation Canceled\n");
- rc = -ECANCELED;
- goto out;
-@@ -862,6 +862,8 @@ ssize_t tpm_show_pubek(struct device *de
-
- struct tpm_chip *chip = dev_get_drvdata(dev);
-
-+ pax_track_stack();
-+
- tpm_cmd.header.in = tpm_readpubek_header;
- err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE,
- "attempting to read the PUBEK");
-diff -urNp linux-3.1.4/drivers/char/virtio_console.c linux-3.1.4/drivers/char/virtio_console.c
---- linux-3.1.4/drivers/char/virtio_console.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/char/virtio_console.c 2011-11-16 18:39:07.000000000 -0500
-@@ -555,7 +555,7 @@ static ssize_t fill_readbuf(struct port
+diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
+index fb68b12..0f6c6ca 100644
+--- a/drivers/char/virtio_console.c
++++ b/drivers/char/virtio_console.c
+@@ -555,7 +555,7 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count,
if (to_user) {
ssize_t ret;
@@ -26589,7 +27180,7 @@ diff -urNp linux-3.1.4/drivers/char/virtio_console.c linux-3.1.4/drivers/char/vi
if (ret)
return -EFAULT;
} else {
-@@ -654,7 +654,7 @@ static ssize_t port_fops_read(struct fil
+@@ -654,7 +654,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf,
if (!port_has_data(port) && !port->host_connected)
return 0;
@@ -26598,10 +27189,11 @@ diff -urNp linux-3.1.4/drivers/char/virtio_console.c linux-3.1.4/drivers/char/vi
}
static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
-diff -urNp linux-3.1.4/drivers/crypto/hifn_795x.c linux-3.1.4/drivers/crypto/hifn_795x.c
---- linux-3.1.4/drivers/crypto/hifn_795x.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/crypto/hifn_795x.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1655,6 +1655,8 @@ static int hifn_test(struct hifn_device
+diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
+index a84250a..68c725e 100644
+--- a/drivers/crypto/hifn_795x.c
++++ b/drivers/crypto/hifn_795x.c
+@@ -1655,6 +1655,8 @@ static int hifn_test(struct hifn_device *dev, int encdec, u8 snum)
0xCA, 0x34, 0x2B, 0x2E};
struct scatterlist sg;
@@ -26610,10 +27202,11 @@ diff -urNp linux-3.1.4/drivers/crypto/hifn_795x.c linux-3.1.4/drivers/crypto/hif
memset(src, 0, sizeof(src));
memset(ctx.key, 0, sizeof(ctx.key));
-diff -urNp linux-3.1.4/drivers/crypto/padlock-aes.c linux-3.1.4/drivers/crypto/padlock-aes.c
---- linux-3.1.4/drivers/crypto/padlock-aes.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/crypto/padlock-aes.c 2011-11-16 18:40:10.000000000 -0500
-@@ -109,6 +109,8 @@ static int aes_set_key(struct crypto_tfm
+diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
+index db33d30..7823369 100644
+--- a/drivers/crypto/padlock-aes.c
++++ b/drivers/crypto/padlock-aes.c
+@@ -109,6 +109,8 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
struct crypto_aes_ctx gen_aes;
int cpu;
@@ -26622,10 +27215,11 @@ diff -urNp linux-3.1.4/drivers/crypto/padlock-aes.c linux-3.1.4/drivers/crypto/p
if (key_len % 8) {
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
-diff -urNp linux-3.1.4/drivers/edac/amd64_edac.c linux-3.1.4/drivers/edac/amd64_edac.c
---- linux-3.1.4/drivers/edac/amd64_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/amd64_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -2670,7 +2670,7 @@ static void __devexit amd64_remove_one_i
+diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
+index 9a8bebc..b1e4989 100644
+--- a/drivers/edac/amd64_edac.c
++++ b/drivers/edac/amd64_edac.c
+@@ -2670,7 +2670,7 @@ static void __devexit amd64_remove_one_instance(struct pci_dev *pdev)
* PCI core identifies what devices are on a system during boot, and then
* inquiry this table to see if this driver is for a given device found.
*/
@@ -26634,10 +27228,11 @@ diff -urNp linux-3.1.4/drivers/edac/amd64_edac.c linux-3.1.4/drivers/edac/amd64_
{
.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_K8_NB_MEMCTL,
-diff -urNp linux-3.1.4/drivers/edac/amd76x_edac.c linux-3.1.4/drivers/edac/amd76x_edac.c
---- linux-3.1.4/drivers/edac/amd76x_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/amd76x_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -321,7 +321,7 @@ static void __devexit amd76x_remove_one(
+diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
+index e47e73b..348e0bd 100644
+--- a/drivers/edac/amd76x_edac.c
++++ b/drivers/edac/amd76x_edac.c
+@@ -321,7 +321,7 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26646,10 +27241,11 @@ diff -urNp linux-3.1.4/drivers/edac/amd76x_edac.c linux-3.1.4/drivers/edac/amd76
{
PCI_VEND_DEV(AMD, FE_GATE_700C), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
AMD762},
-diff -urNp linux-3.1.4/drivers/edac/e752x_edac.c linux-3.1.4/drivers/edac/e752x_edac.c
---- linux-3.1.4/drivers/edac/e752x_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/e752x_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1380,7 +1380,7 @@ static void __devexit e752x_remove_one(s
+diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
+index 1af531a..3a8ff27 100644
+--- a/drivers/edac/e752x_edac.c
++++ b/drivers/edac/e752x_edac.c
+@@ -1380,7 +1380,7 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26658,10 +27254,11 @@ diff -urNp linux-3.1.4/drivers/edac/e752x_edac.c linux-3.1.4/drivers/edac/e752x_
{
PCI_VEND_DEV(INTEL, 7520_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
E7520},
-diff -urNp linux-3.1.4/drivers/edac/e7xxx_edac.c linux-3.1.4/drivers/edac/e7xxx_edac.c
---- linux-3.1.4/drivers/edac/e7xxx_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/e7xxx_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -525,7 +525,7 @@ static void __devexit e7xxx_remove_one(s
+diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
+index 6ffb6d2..383d8d7 100644
+--- a/drivers/edac/e7xxx_edac.c
++++ b/drivers/edac/e7xxx_edac.c
+@@ -525,7 +525,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26670,10 +27267,11 @@ diff -urNp linux-3.1.4/drivers/edac/e7xxx_edac.c linux-3.1.4/drivers/edac/e7xxx_
{
PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
E7205},
-diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/edac_pci_sysfs.c
---- linux-3.1.4/drivers/edac/edac_pci_sysfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/edac_pci_sysfs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -26,8 +26,8 @@ static int edac_pci_log_pe = 1; /* log
+diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
+index 495198a..ac08c85 100644
+--- a/drivers/edac/edac_pci_sysfs.c
++++ b/drivers/edac/edac_pci_sysfs.c
+@@ -26,8 +26,8 @@ static int edac_pci_log_pe = 1; /* log PCI parity errors */
static int edac_pci_log_npe = 1; /* log PCI non-parity error errors */
static int edac_pci_poll_msec = 1000; /* one second workq period */
@@ -26684,7 +27282,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
static struct kobject *edac_pci_top_main_kobj;
static atomic_t edac_pci_sysfs_refcount = ATOMIC_INIT(0);
-@@ -582,7 +582,7 @@ static void edac_pci_dev_parity_test(str
+@@ -582,7 +582,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI,
"Signaled System Error on %s\n",
pci_name(dev));
@@ -26693,7 +27291,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -590,7 +590,7 @@ static void edac_pci_dev_parity_test(str
+@@ -590,7 +590,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on %s\n",
pci_name(dev));
@@ -26702,7 +27300,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -598,7 +598,7 @@ static void edac_pci_dev_parity_test(str
+@@ -598,7 +598,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -26711,7 +27309,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
}
}
-@@ -619,7 +619,7 @@ static void edac_pci_dev_parity_test(str
+@@ -619,7 +619,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
"Signaled System Error on %s\n",
pci_name(dev));
@@ -26720,7 +27318,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -627,7 +627,7 @@ static void edac_pci_dev_parity_test(str
+@@ -627,7 +627,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on "
"%s\n", pci_name(dev));
@@ -26729,7 +27327,7 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -635,7 +635,7 @@ static void edac_pci_dev_parity_test(str
+@@ -635,7 +635,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -26756,10 +27354,11 @@ diff -urNp linux-3.1.4/drivers/edac/edac_pci_sysfs.c linux-3.1.4/drivers/edac/ed
panic("EDAC: PCI Parity Error");
}
}
-diff -urNp linux-3.1.4/drivers/edac/i3000_edac.c linux-3.1.4/drivers/edac/i3000_edac.c
---- linux-3.1.4/drivers/edac/i3000_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i3000_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -470,7 +470,7 @@ static void __devexit i3000_remove_one(s
+diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
+index c0510b3..6e2a954 100644
+--- a/drivers/edac/i3000_edac.c
++++ b/drivers/edac/i3000_edac.c
+@@ -470,7 +470,7 @@ static void __devexit i3000_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26768,10 +27367,11 @@ diff -urNp linux-3.1.4/drivers/edac/i3000_edac.c linux-3.1.4/drivers/edac/i3000_
{
PCI_VEND_DEV(INTEL, 3000_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I3000},
-diff -urNp linux-3.1.4/drivers/edac/i3200_edac.c linux-3.1.4/drivers/edac/i3200_edac.c
---- linux-3.1.4/drivers/edac/i3200_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i3200_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -456,7 +456,7 @@ static void __devexit i3200_remove_one(s
+diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
+index aa08497..7e6822a 100644
+--- a/drivers/edac/i3200_edac.c
++++ b/drivers/edac/i3200_edac.c
+@@ -456,7 +456,7 @@ static void __devexit i3200_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26780,10 +27380,11 @@ diff -urNp linux-3.1.4/drivers/edac/i3200_edac.c linux-3.1.4/drivers/edac/i3200_
{
PCI_VEND_DEV(INTEL, 3200_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I3200},
-diff -urNp linux-3.1.4/drivers/edac/i5000_edac.c linux-3.1.4/drivers/edac/i5000_edac.c
---- linux-3.1.4/drivers/edac/i5000_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i5000_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1516,7 +1516,7 @@ static void __devexit i5000_remove_one(s
+diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
+index 4dc3ac2..67d05a6 100644
+--- a/drivers/edac/i5000_edac.c
++++ b/drivers/edac/i5000_edac.c
+@@ -1516,7 +1516,7 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev)
*
* The "E500P" device is the first device supported.
*/
@@ -26792,10 +27393,11 @@ diff -urNp linux-3.1.4/drivers/edac/i5000_edac.c linux-3.1.4/drivers/edac/i5000_
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000_DEV16),
.driver_data = I5000P},
-diff -urNp linux-3.1.4/drivers/edac/i5100_edac.c linux-3.1.4/drivers/edac/i5100_edac.c
---- linux-3.1.4/drivers/edac/i5100_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i5100_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1051,7 +1051,7 @@ static void __devexit i5100_remove_one(s
+diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
+index bcbdeec..9886d16 100644
+--- a/drivers/edac/i5100_edac.c
++++ b/drivers/edac/i5100_edac.c
+@@ -1051,7 +1051,7 @@ static void __devexit i5100_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26804,10 +27406,11 @@ diff -urNp linux-3.1.4/drivers/edac/i5100_edac.c linux-3.1.4/drivers/edac/i5100_
/* Device 16, Function 0, Channel 0 Memory Map, Error Flag/Mask, ... */
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5100_16) },
{ 0, }
-diff -urNp linux-3.1.4/drivers/edac/i5400_edac.c linux-3.1.4/drivers/edac/i5400_edac.c
---- linux-3.1.4/drivers/edac/i5400_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i5400_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1383,7 +1383,7 @@ static void __devexit i5400_remove_one(s
+diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
+index 74d6ec34..baff517 100644
+--- a/drivers/edac/i5400_edac.c
++++ b/drivers/edac/i5400_edac.c
+@@ -1383,7 +1383,7 @@ static void __devexit i5400_remove_one(struct pci_dev *pdev)
*
* The "E500P" device is the first device supported.
*/
@@ -26816,10 +27419,11 @@ diff -urNp linux-3.1.4/drivers/edac/i5400_edac.c linux-3.1.4/drivers/edac/i5400_
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR)},
{0,} /* 0 terminated list. */
};
-diff -urNp linux-3.1.4/drivers/edac/i7300_edac.c linux-3.1.4/drivers/edac/i7300_edac.c
---- linux-3.1.4/drivers/edac/i7300_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i7300_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1191,7 +1191,7 @@ static void __devexit i7300_remove_one(s
+diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
+index a76fe83..15479e6 100644
+--- a/drivers/edac/i7300_edac.c
++++ b/drivers/edac/i7300_edac.c
+@@ -1191,7 +1191,7 @@ static void __devexit i7300_remove_one(struct pci_dev *pdev)
*
* Has only 8086:360c PCI ID
*/
@@ -26828,10 +27432,11 @@ diff -urNp linux-3.1.4/drivers/edac/i7300_edac.c linux-3.1.4/drivers/edac/i7300_
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I7300_MCH_ERR)},
{0,} /* 0 terminated list. */
};
-diff -urNp linux-3.1.4/drivers/edac/i7core_edac.c linux-3.1.4/drivers/edac/i7core_edac.c
---- linux-3.1.4/drivers/edac/i7core_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i7core_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -359,7 +359,7 @@ static const struct pci_id_table pci_dev
+diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
+index f6cf448..3f612e9 100644
+--- a/drivers/edac/i7core_edac.c
++++ b/drivers/edac/i7core_edac.c
+@@ -359,7 +359,7 @@ static const struct pci_id_table pci_dev_table[] = {
/*
* pci_device_id table for which devices we are looking for
*/
@@ -26840,10 +27445,11 @@ diff -urNp linux-3.1.4/drivers/edac/i7core_edac.c linux-3.1.4/drivers/edac/i7cor
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X58_HUB_MGMT)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_LINK0)},
{0,} /* 0 terminated list. */
-diff -urNp linux-3.1.4/drivers/edac/i82443bxgx_edac.c linux-3.1.4/drivers/edac/i82443bxgx_edac.c
---- linux-3.1.4/drivers/edac/i82443bxgx_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i82443bxgx_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -380,7 +380,7 @@ static void __devexit i82443bxgx_edacmc_
+diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
+index 4329d39..f3022ef 100644
+--- a/drivers/edac/i82443bxgx_edac.c
++++ b/drivers/edac/i82443bxgx_edac.c
+@@ -380,7 +380,7 @@ static void __devexit i82443bxgx_edacmc_remove_one(struct pci_dev *pdev)
EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_remove_one);
@@ -26852,10 +27458,11 @@ diff -urNp linux-3.1.4/drivers/edac/i82443bxgx_edac.c linux-3.1.4/drivers/edac/i
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0)},
-diff -urNp linux-3.1.4/drivers/edac/i82860_edac.c linux-3.1.4/drivers/edac/i82860_edac.c
---- linux-3.1.4/drivers/edac/i82860_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i82860_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -270,7 +270,7 @@ static void __devexit i82860_remove_one(
+diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
+index 931a057..fd28340 100644
+--- a/drivers/edac/i82860_edac.c
++++ b/drivers/edac/i82860_edac.c
+@@ -270,7 +270,7 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26864,10 +27471,11 @@ diff -urNp linux-3.1.4/drivers/edac/i82860_edac.c linux-3.1.4/drivers/edac/i8286
{
PCI_VEND_DEV(INTEL, 82860_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82860},
-diff -urNp linux-3.1.4/drivers/edac/i82875p_edac.c linux-3.1.4/drivers/edac/i82875p_edac.c
---- linux-3.1.4/drivers/edac/i82875p_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i82875p_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -511,7 +511,7 @@ static void __devexit i82875p_remove_one
+diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
+index 33864c6..01edc61 100644
+--- a/drivers/edac/i82875p_edac.c
++++ b/drivers/edac/i82875p_edac.c
+@@ -511,7 +511,7 @@ static void __devexit i82875p_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26876,10 +27484,11 @@ diff -urNp linux-3.1.4/drivers/edac/i82875p_edac.c linux-3.1.4/drivers/edac/i828
{
PCI_VEND_DEV(INTEL, 82875_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82875P},
-diff -urNp linux-3.1.4/drivers/edac/i82975x_edac.c linux-3.1.4/drivers/edac/i82975x_edac.c
---- linux-3.1.4/drivers/edac/i82975x_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/i82975x_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -604,7 +604,7 @@ static void __devexit i82975x_remove_one
+diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
+index a5da732..983363b 100644
+--- a/drivers/edac/i82975x_edac.c
++++ b/drivers/edac/i82975x_edac.c
+@@ -604,7 +604,7 @@ static void __devexit i82975x_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26888,9 +27497,10 @@ diff -urNp linux-3.1.4/drivers/edac/i82975x_edac.c linux-3.1.4/drivers/edac/i829
{
PCI_VEND_DEV(INTEL, 82975_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I82975X
-diff -urNp linux-3.1.4/drivers/edac/mce_amd.h linux-3.1.4/drivers/edac/mce_amd.h
---- linux-3.1.4/drivers/edac/mce_amd.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/mce_amd.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h
+index 795a320..3bbc3d3 100644
+--- a/drivers/edac/mce_amd.h
++++ b/drivers/edac/mce_amd.h
@@ -83,7 +83,7 @@ struct amd_decoder_ops {
bool (*dc_mce)(u16, u8);
bool (*ic_mce)(u16, u8);
@@ -26900,10 +27510,11 @@ diff -urNp linux-3.1.4/drivers/edac/mce_amd.h linux-3.1.4/drivers/edac/mce_amd.h
void amd_report_gart_errors(bool);
void amd_register_ecc_decoder(void (*f)(int, struct mce *, u32));
-diff -urNp linux-3.1.4/drivers/edac/r82600_edac.c linux-3.1.4/drivers/edac/r82600_edac.c
---- linux-3.1.4/drivers/edac/r82600_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/r82600_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -373,7 +373,7 @@ static void __devexit r82600_remove_one(
+diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
+index b153674..ad2ba9b 100644
+--- a/drivers/edac/r82600_edac.c
++++ b/drivers/edac/r82600_edac.c
+@@ -373,7 +373,7 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26912,10 +27523,11 @@ diff -urNp linux-3.1.4/drivers/edac/r82600_edac.c linux-3.1.4/drivers/edac/r8260
{
PCI_DEVICE(PCI_VENDOR_ID_RADISYS, R82600_BRIDGE_ID)
},
-diff -urNp linux-3.1.4/drivers/edac/x38_edac.c linux-3.1.4/drivers/edac/x38_edac.c
---- linux-3.1.4/drivers/edac/x38_edac.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/edac/x38_edac.c 2011-11-16 18:39:07.000000000 -0500
-@@ -440,7 +440,7 @@ static void __devexit x38_remove_one(str
+diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
+index b6f47de..c5acf3a 100644
+--- a/drivers/edac/x38_edac.c
++++ b/drivers/edac/x38_edac.c
+@@ -440,7 +440,7 @@ static void __devexit x38_remove_one(struct pci_dev *pdev)
edac_mc_free(mci);
}
@@ -26924,9 +27536,10 @@ diff -urNp linux-3.1.4/drivers/edac/x38_edac.c linux-3.1.4/drivers/edac/x38_edac
{
PCI_VEND_DEV(INTEL, X38_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
X38},
-diff -urNp linux-3.1.4/drivers/firewire/core-card.c linux-3.1.4/drivers/firewire/core-card.c
---- linux-3.1.4/drivers/firewire/core-card.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/firewire/core-card.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
+index 85661b0..c784559a 100644
+--- a/drivers/firewire/core-card.c
++++ b/drivers/firewire/core-card.c
@@ -657,7 +657,7 @@ void fw_card_release(struct kref *kref)
void fw_core_remove_card(struct fw_card *card)
@@ -26936,10 +27549,11 @@ diff -urNp linux-3.1.4/drivers/firewire/core-card.c linux-3.1.4/drivers/firewire
card->driver->update_phy_reg(card, 4,
PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
-diff -urNp linux-3.1.4/drivers/firewire/core-cdev.c linux-3.1.4/drivers/firewire/core-cdev.c
---- linux-3.1.4/drivers/firewire/core-cdev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/firewire/core-cdev.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1331,8 +1331,7 @@ static int init_iso_resource(struct clie
+diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
+index 4799393..37bd3ab 100644
+--- a/drivers/firewire/core-cdev.c
++++ b/drivers/firewire/core-cdev.c
+@@ -1331,8 +1331,7 @@ static int init_iso_resource(struct client *client,
int ret;
if ((request->channels == 0 && request->bandwidth == 0) ||
@@ -26949,20 +27563,10 @@ diff -urNp linux-3.1.4/drivers/firewire/core-cdev.c linux-3.1.4/drivers/firewire
return -EINVAL;
r = kmalloc(sizeof(*r), GFP_KERNEL);
-diff -urNp linux-3.1.4/drivers/firewire/core.h linux-3.1.4/drivers/firewire/core.h
---- linux-3.1.4/drivers/firewire/core.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/firewire/core.h 2011-11-16 18:39:07.000000000 -0500
-@@ -101,6 +101,7 @@ struct fw_card_driver {
-
- int (*stop_iso)(struct fw_iso_context *ctx);
- };
-+typedef struct fw_card_driver __no_const fw_card_driver_no_const;
-
- void fw_card_initialize(struct fw_card *card,
- const struct fw_card_driver *driver, struct device *device);
-diff -urNp linux-3.1.4/drivers/firewire/core-transaction.c linux-3.1.4/drivers/firewire/core-transaction.c
---- linux-3.1.4/drivers/firewire/core-transaction.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/firewire/core-transaction.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
+index 334b82a..ea5261d 100644
+--- a/drivers/firewire/core-transaction.c
++++ b/drivers/firewire/core-transaction.c
@@ -37,6 +37,7 @@
#include <linux/timer.h>
#include <linux/types.h>
@@ -26971,7 +27575,7 @@ diff -urNp linux-3.1.4/drivers/firewire/core-transaction.c linux-3.1.4/drivers/f
#include <asm/byteorder.h>
-@@ -422,6 +423,8 @@ int fw_run_transaction(struct fw_card *c
+@@ -422,6 +423,8 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id,
struct transaction_callback_data d;
struct fw_transaction t;
@@ -26980,9 +27584,22 @@ diff -urNp linux-3.1.4/drivers/firewire/core-transaction.c linux-3.1.4/drivers/f
init_timer_on_stack(&t.split_timeout_timer);
init_completion(&d.done);
d.payload = payload;
-diff -urNp linux-3.1.4/drivers/firmware/dmi_scan.c linux-3.1.4/drivers/firmware/dmi_scan.c
---- linux-3.1.4/drivers/firmware/dmi_scan.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/firmware/dmi_scan.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
+index b45be57..5fad18b 100644
+--- a/drivers/firewire/core.h
++++ b/drivers/firewire/core.h
+@@ -101,6 +101,7 @@ struct fw_card_driver {
+
+ int (*stop_iso)(struct fw_iso_context *ctx);
+ };
++typedef struct fw_card_driver __no_const fw_card_driver_no_const;
+
+ void fw_card_initialize(struct fw_card *card,
+ const struct fw_card_driver *driver, struct device *device);
+diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
+index bcb1126..2cc2121 100644
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
@@ -449,11 +449,6 @@ void __init dmi_scan_machine(void)
}
}
@@ -26995,7 +27612,7 @@ diff -urNp linux-3.1.4/drivers/firmware/dmi_scan.c linux-3.1.4/drivers/firmware/
p = dmi_ioremap(0xF0000, 0x10000);
if (p == NULL)
goto error;
-@@ -725,7 +720,7 @@ int dmi_walk(void (*decode)(const struct
+@@ -725,7 +720,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
if (buf == NULL)
return -1;
@@ -27004,9 +27621,10 @@ diff -urNp linux-3.1.4/drivers/firmware/dmi_scan.c linux-3.1.4/drivers/firmware/
iounmap(buf);
return 0;
-diff -urNp linux-3.1.4/drivers/gpio/gpio-vr41xx.c linux-3.1.4/drivers/gpio/gpio-vr41xx.c
---- linux-3.1.4/drivers/gpio/gpio-vr41xx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpio/gpio-vr41xx.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
+index 98723cb..10ca85b 100644
+--- a/drivers/gpio/gpio-vr41xx.c
++++ b/drivers/gpio/gpio-vr41xx.c
@@ -204,7 +204,7 @@ static int giu_get_irq(unsigned int irq)
printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
maskl, pendl, maskh, pendh);
@@ -27016,10 +27634,11 @@ diff -urNp linux-3.1.4/drivers/gpio/gpio-vr41xx.c linux-3.1.4/drivers/gpio/gpio-
return -EINVAL;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/drm_crtc.c
---- linux-3.1.4/drivers/gpu/drm/drm_crtc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_crtc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1374,7 +1374,7 @@ int drm_mode_getconnector(struct drm_dev
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index fe738f0..2d03563 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
+@@ -1374,7 +1374,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
*/
if ((out_resp->count_modes >= mode_count) && mode_count) {
copied = 0;
@@ -27028,7 +27647,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
list_for_each_entry(mode, &connector->modes, head) {
drm_crtc_convert_to_umode(&u_mode, mode);
if (copy_to_user(mode_ptr + copied,
-@@ -1389,8 +1389,8 @@ int drm_mode_getconnector(struct drm_dev
+@@ -1389,8 +1389,8 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
if ((out_resp->count_props >= props_count) && props_count) {
copied = 0;
@@ -27039,7 +27658,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) {
if (connector->property_ids[i] != 0) {
if (put_user(connector->property_ids[i],
-@@ -1412,7 +1412,7 @@ int drm_mode_getconnector(struct drm_dev
+@@ -1412,7 +1412,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data,
if ((out_resp->count_encoders >= encoders_count) && encoders_count) {
copied = 0;
@@ -27048,7 +27667,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
if (connector->encoder_ids[i] != 0) {
if (put_user(connector->encoder_ids[i],
-@@ -1571,7 +1571,7 @@ int drm_mode_setcrtc(struct drm_device *
+@@ -1571,7 +1571,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
}
for (i = 0; i < crtc_req->count_connectors; i++) {
@@ -27057,7 +27676,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
if (get_user(out_id, &set_connectors_ptr[i])) {
ret = -EFAULT;
goto out;
-@@ -1852,7 +1852,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_de
+@@ -1852,7 +1852,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
fb = obj_to_fb(obj);
num_clips = r->num_clips;
@@ -27066,7 +27685,18 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
if (!num_clips != !clips_ptr) {
ret = -EINVAL;
-@@ -2272,7 +2272,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -1868,6 +1868,10 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
+ }
+
+ if (num_clips && clips_ptr) {
++ if (num_clips < 0 || num_clips > DRM_MODE_FB_DIRTY_MAX_CLIPS) {
++ ret = -EINVAL;
++ goto out_err1;
++ }
+ clips = kzalloc(num_clips * sizeof(*clips), GFP_KERNEL);
+ if (!clips) {
+ ret = -ENOMEM;
+@@ -2272,7 +2276,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
out_resp->flags = property->flags;
if ((out_resp->count_values >= value_count) && value_count) {
@@ -27075,7 +27705,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
for (i = 0; i < value_count; i++) {
if (copy_to_user(values_ptr + i, &property->values[i], sizeof(uint64_t))) {
ret = -EFAULT;
-@@ -2285,7 +2285,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -2285,7 +2289,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
if (property->flags & DRM_MODE_PROP_ENUM) {
if ((out_resp->count_enum_blobs >= enum_count) && enum_count) {
copied = 0;
@@ -27084,7 +27714,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
list_for_each_entry(prop_enum, &property->enum_blob_list, head) {
if (copy_to_user(&enum_ptr[copied].value, &prop_enum->value, sizeof(uint64_t))) {
-@@ -2308,7 +2308,7 @@ int drm_mode_getproperty_ioctl(struct dr
+@@ -2308,7 +2312,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
if ((out_resp->count_enum_blobs >= blob_count) && blob_count) {
copied = 0;
blob_id_ptr = (uint32_t *)(unsigned long)out_resp->enum_blob_ptr;
@@ -27093,7 +27723,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
list_for_each_entry(prop_blob, &property->enum_blob_list, head) {
if (put_user(prop_blob->base.id, blob_id_ptr + copied)) {
-@@ -2369,7 +2369,7 @@ int drm_mode_getblob_ioctl(struct drm_de
+@@ -2369,7 +2373,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
struct drm_mode_get_blob *out_resp = data;
struct drm_property_blob *blob;
int ret = 0;
@@ -27102,7 +27732,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
-@@ -2383,7 +2383,7 @@ int drm_mode_getblob_ioctl(struct drm_de
+@@ -2383,7 +2387,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
blob = obj_to_blob(obj);
if (out_resp->length == blob->length) {
@@ -27111,10 +27741,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc.c linux-3.1.4/drivers/gpu/drm/dr
if (copy_to_user(blob_ptr, blob->data, blob->length)){
ret = -EFAULT;
goto done;
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c
---- linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c 2011-11-16 18:40:10.000000000 -0500
-@@ -276,7 +276,7 @@ static bool drm_encoder_crtc_ok(struct d
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index f88a9b2..8f4078f 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -276,7 +276,7 @@ static bool drm_encoder_crtc_ok(struct drm_encoder *encoder,
struct drm_crtc *tmp;
int crtc_mask = 1;
@@ -27123,7 +27754,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c linux-3.1.4/drivers/gpu
dev = crtc->dev;
-@@ -343,6 +343,8 @@ bool drm_crtc_helper_set_mode(struct drm
+@@ -343,6 +343,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
struct drm_encoder *encoder;
bool ret = true;
@@ -27132,9 +27763,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_crtc_helper.c linux-3.1.4/drivers/gpu
crtc->enabled = drm_helper_crtc_in_use(crtc);
if (!crtc->enabled)
return true;
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_drv.c linux-3.1.4/drivers/gpu/drm/drm_drv.c
---- linux-3.1.4/drivers/gpu/drm/drm_drv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_drv.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index 93a112d..c8b065d 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
@@ -307,7 +307,7 @@ module_exit(drm_core_exit);
/**
* Copy and IOCTL return string to user space
@@ -27153,10 +27785,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_drv.c linux-3.1.4/drivers/gpu/drm/drm
++file_priv->ioctl_count;
DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/drm_fops.c
---- linux-3.1.4/drivers/gpu/drm/drm_fops.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_fops.c 2011-11-16 18:39:07.000000000 -0500
-@@ -70,7 +70,7 @@ static int drm_setup(struct drm_device *
+diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
+index 2ec7d48..be14bb1 100644
+--- a/drivers/gpu/drm/drm_fops.c
++++ b/drivers/gpu/drm/drm_fops.c
+@@ -70,7 +70,7 @@ static int drm_setup(struct drm_device * dev)
}
for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
@@ -27165,7 +27798,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/dr
dev->sigdata.lock = NULL;
-@@ -134,8 +134,8 @@ int drm_open(struct inode *inode, struct
+@@ -134,8 +134,8 @@ int drm_open(struct inode *inode, struct file *filp)
retcode = drm_open_helper(inode, filp, dev);
if (!retcode) {
@@ -27176,7 +27809,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/dr
retcode = drm_setup(dev);
}
if (!retcode) {
-@@ -472,7 +472,7 @@ int drm_release(struct inode *inode, str
+@@ -472,7 +472,7 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock(&drm_global_mutex);
@@ -27185,7 +27818,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/dr
if (dev->driver->preclose)
dev->driver->preclose(dev, file_priv);
-@@ -484,7 +484,7 @@ int drm_release(struct inode *inode, str
+@@ -484,7 +484,7 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
task_pid_nr(current),
(long)old_encode_dev(file_priv->minor->device),
@@ -27194,7 +27827,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/dr
/* if the master has gone away we can't do anything with the lock */
if (file_priv->minor->master)
-@@ -565,8 +565,8 @@ int drm_release(struct inode *inode, str
+@@ -565,8 +565,8 @@ int drm_release(struct inode *inode, struct file *filp)
* End inline drm_release
*/
@@ -27205,9 +27838,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_fops.c linux-3.1.4/drivers/gpu/drm/dr
if (atomic_read(&dev->ioctl_count)) {
DRM_ERROR("Device busy: %d\n",
atomic_read(&dev->ioctl_count));
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_global.c linux-3.1.4/drivers/gpu/drm/drm_global.c
---- linux-3.1.4/drivers/gpu/drm/drm_global.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_global.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/drm_global.c b/drivers/gpu/drm/drm_global.c
+index c87dc96..326055d 100644
+--- a/drivers/gpu/drm/drm_global.c
++++ b/drivers/gpu/drm/drm_global.c
@@ -36,7 +36,7 @@
struct drm_global_item {
struct mutex mutex;
@@ -27235,7 +27869,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_global.c linux-3.1.4/drivers/gpu/drm/
}
}
-@@ -70,7 +70,7 @@ int drm_global_item_ref(struct drm_globa
+@@ -70,7 +70,7 @@ int drm_global_item_ref(struct drm_global_reference *ref)
void *object;
mutex_lock(&item->mutex);
@@ -27244,7 +27878,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_global.c linux-3.1.4/drivers/gpu/drm/
item->object = kzalloc(ref->size, GFP_KERNEL);
if (unlikely(item->object == NULL)) {
ret = -ENOMEM;
-@@ -83,7 +83,7 @@ int drm_global_item_ref(struct drm_globa
+@@ -83,7 +83,7 @@ int drm_global_item_ref(struct drm_global_reference *ref)
goto out_err;
}
@@ -27253,7 +27887,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_global.c linux-3.1.4/drivers/gpu/drm/
ref->object = item->object;
object = item->object;
mutex_unlock(&item->mutex);
-@@ -100,9 +100,9 @@ void drm_global_item_unref(struct drm_gl
+@@ -100,9 +100,9 @@ void drm_global_item_unref(struct drm_global_reference *ref)
struct drm_global_item *item = &glob[ref->global_type];
mutex_lock(&item->mutex);
@@ -27265,10 +27899,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_global.c linux-3.1.4/drivers/gpu/drm/
ref->release(ref);
item->object = NULL;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_info.c linux-3.1.4/drivers/gpu/drm/drm_info.c
---- linux-3.1.4/drivers/gpu/drm/drm_info.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_info.c 2011-11-16 18:40:10.000000000 -0500
-@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void
+diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
+index ab1162d..42587b2 100644
+--- a/drivers/gpu/drm/drm_info.c
++++ b/drivers/gpu/drm/drm_info.c
+@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void *data)
struct drm_local_map *map;
struct drm_map_list *r_list;
@@ -27287,7 +27922,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_info.c linux-3.1.4/drivers/gpu/drm/dr
const char *type;
int i;
-@@ -89,7 +93,7 @@ int drm_vm_info(struct seq_file *m, void
+@@ -89,7 +93,7 @@ int drm_vm_info(struct seq_file *m, void *data)
map = r_list->map;
if (!map)
continue;
@@ -27296,7 +27931,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_info.c linux-3.1.4/drivers/gpu/drm/dr
type = "??";
else
type = types[map->type];
-@@ -290,7 +294,11 @@ int drm_vma_info(struct seq_file *m, voi
+@@ -290,7 +294,11 @@ int drm_vma_info(struct seq_file *m, void *data)
vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
vma->vm_flags & VM_LOCKED ? 'l' : '-',
vma->vm_flags & VM_IO ? 'i' : '-',
@@ -27308,10 +27943,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_info.c linux-3.1.4/drivers/gpu/drm/dr
#if defined(__i386__)
pgprot = pgprot_val(vma->vm_page_prot);
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_ioc32.c linux-3.1.4/drivers/gpu/drm/drm_ioc32.c
---- linux-3.1.4/drivers/gpu/drm/drm_ioc32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_ioc32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -455,7 +455,7 @@ static int compat_drm_infobufs(struct fi
+diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
+index 4a058c7..b42cd92 100644
+--- a/drivers/gpu/drm/drm_ioc32.c
++++ b/drivers/gpu/drm/drm_ioc32.c
+@@ -455,7 +455,7 @@ static int compat_drm_infobufs(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(nbytes);
if (!access_ok(VERIFY_WRITE, request, nbytes))
return -EFAULT;
@@ -27320,7 +27956,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_ioc32.c linux-3.1.4/drivers/gpu/drm/d
if (__put_user(count, &request->count)
|| __put_user(list, &request->list))
-@@ -516,7 +516,7 @@ static int compat_drm_mapbufs(struct fil
+@@ -516,7 +516,7 @@ static int compat_drm_mapbufs(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(nbytes);
if (!access_ok(VERIFY_WRITE, request, nbytes))
return -EFAULT;
@@ -27329,10 +27965,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_ioc32.c linux-3.1.4/drivers/gpu/drm/d
if (__put_user(count, &request->count)
|| __put_user(list, &request->list))
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_ioctl.c linux-3.1.4/drivers/gpu/drm/drm_ioctl.c
---- linux-3.1.4/drivers/gpu/drm/drm_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_ioctl.c 2011-11-16 18:39:07.000000000 -0500
-@@ -256,7 +256,7 @@ int drm_getstats(struct drm_device *dev,
+diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
+index 904d7e9..ab88581 100644
+--- a/drivers/gpu/drm/drm_ioctl.c
++++ b/drivers/gpu/drm/drm_ioctl.c
+@@ -256,7 +256,7 @@ int drm_getstats(struct drm_device *dev, void *data,
stats->data[i].value =
(file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
else
@@ -27341,10 +27978,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_ioctl.c linux-3.1.4/drivers/gpu/drm/d
stats->data[i].type = dev->types[i];
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/drm_lock.c linux-3.1.4/drivers/gpu/drm/drm_lock.c
---- linux-3.1.4/drivers/gpu/drm/drm_lock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/drm_lock.c 2011-11-16 18:39:07.000000000 -0500
-@@ -89,7 +89,7 @@ int drm_lock(struct drm_device *dev, voi
+diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
+index 632ae24..244cf4a 100644
+--- a/drivers/gpu/drm/drm_lock.c
++++ b/drivers/gpu/drm/drm_lock.c
+@@ -89,7 +89,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (drm_lock_take(&master->lock, lock->context)) {
master->lock.file_priv = file_priv;
master->lock.lock_time = jiffies;
@@ -27353,7 +27991,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_lock.c linux-3.1.4/drivers/gpu/drm/dr
break; /* Got lock */
}
-@@ -160,7 +160,7 @@ int drm_unlock(struct drm_device *dev, v
+@@ -160,7 +160,7 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
return -EINVAL;
}
@@ -27362,10 +28000,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/drm_lock.c linux-3.1.4/drivers/gpu/drm/dr
if (drm_lock_free(&master->lock, lock->context)) {
/* FIXME: Should really bail out here. */
-diff -urNp linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c
---- linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c 2011-11-16 18:39:07.000000000 -0500
-@@ -950,8 +950,8 @@ static int i810_dma_vertex(struct drm_de
+diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
+index 8f371e8..9f85d52 100644
+--- a/drivers/gpu/drm/i810/i810_dma.c
++++ b/drivers/gpu/drm/i810/i810_dma.c
+@@ -950,8 +950,8 @@ static int i810_dma_vertex(struct drm_device *dev, void *data,
dma->buflist[vertex->idx],
vertex->discard, vertex->used);
@@ -27376,7 +28015,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c linux-3.1.4/drivers/gpu/d
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-@@ -1111,8 +1111,8 @@ static int i810_dma_mc(struct drm_device
+@@ -1111,8 +1111,8 @@ static int i810_dma_mc(struct drm_device *dev, void *data,
i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used,
mc->last_render);
@@ -27387,9 +28026,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i810/i810_dma.c linux-3.1.4/drivers/gpu/d
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-diff -urNp linux-3.1.4/drivers/gpu/drm/i810/i810_drv.h linux-3.1.4/drivers/gpu/drm/i810/i810_drv.h
---- linux-3.1.4/drivers/gpu/drm/i810/i810_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i810/i810_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
+index c9339f4..f5e1b9d 100644
+--- a/drivers/gpu/drm/i810/i810_drv.h
++++ b/drivers/gpu/drm/i810/i810_drv.h
@@ -108,8 +108,8 @@ typedef struct drm_i810_private {
int page_flipping;
@@ -27401,10 +28041,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i810/i810_drv.h linux-3.1.4/drivers/gpu/d
int front_offset;
} drm_i810_private_t;
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c
---- linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -497,7 +497,7 @@ static int i915_interrupt_info(struct se
+diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
+index 3c395a5..02889c2 100644
+--- a/drivers/gpu/drm/i915/i915_debugfs.c
++++ b/drivers/gpu/drm/i915/i915_debugfs.c
+@@ -497,7 +497,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
I915_READ(GTIMR));
}
seq_printf(m, "Interrupts received: %d\n",
@@ -27413,7 +28054,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c linux-3.1.4/drivers/g
for (i = 0; i < I915_NUM_RINGS; i++) {
if (IS_GEN6(dev) || IS_GEN7(dev)) {
seq_printf(m, "Graphics Interrupt mask (%s): %08x\n",
-@@ -1185,7 +1185,7 @@ static int i915_opregion(struct seq_file
+@@ -1185,7 +1185,7 @@ static int i915_opregion(struct seq_file *m, void *unused)
return ret;
if (opregion->header)
@@ -27422,10 +28063,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_debugfs.c linux-3.1.4/drivers/g
mutex_unlock(&dev->struct_mutex);
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_dma.c linux-3.1.4/drivers/gpu/drm/i915/i915_dma.c
---- linux-3.1.4/drivers/gpu/drm/i915/i915_dma.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/i915_dma.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1171,7 +1171,7 @@ static bool i915_switcheroo_can_switch(s
+diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
+index 8a3942c..1b73bf1 100644
+--- a/drivers/gpu/drm/i915/i915_dma.c
++++ b/drivers/gpu/drm/i915/i915_dma.c
+@@ -1171,7 +1171,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
bool can_switch;
spin_lock(&dev->count_lock);
@@ -27434,9 +28076,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_dma.c linux-3.1.4/drivers/gpu/d
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h
---- linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+index 7916bd9..7c17a0f 100644
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -222,7 +222,7 @@ struct drm_i915_display_funcs {
/* render clock increase/decrease */
/* display clock increase/decrease */
@@ -27464,7 +28107,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h linux-3.1.4/drivers/gpu/d
};
#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
-@@ -1262,7 +1262,7 @@ extern int intel_setup_gmbus(struct drm_
+@@ -1262,7 +1262,7 @@ extern int intel_setup_gmbus(struct drm_device *dev);
extern void intel_teardown_gmbus(struct drm_device *dev);
extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
@@ -27473,10 +28116,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_drv.h linux-3.1.4/drivers/gpu/d
{
return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-3.1.4/drivers/gpu/drm/i915/i915_gem_execbuffer.c
---- linux-3.1.4/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2011-11-16 18:39:07.000000000 -0500
-@@ -188,7 +188,7 @@ i915_gem_object_set_to_gpu_domain(struct
+diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+index 4934cf8..52e8e83 100644
+--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+@@ -188,7 +188,7 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj,
i915_gem_clflush_object(obj);
if (obj->base.pending_write_domain)
@@ -27485,10 +28129,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-3.1.4/dr
/* The actual obj->write_domain will be updated with
* pending_write_domain after we emit the accumulated flush for all
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c
---- linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -475,7 +475,7 @@ static irqreturn_t ivybridge_irq_handler
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
+index 9cbb0cd..958a31f 100644
+--- a/drivers/gpu/drm/i915/i915_irq.c
++++ b/drivers/gpu/drm/i915/i915_irq.c
+@@ -475,7 +475,7 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)
u32 de_iir, gt_iir, de_ier, pch_iir, pm_iir;
struct drm_i915_master_private *master_priv;
@@ -27497,7 +28142,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/d
/* disable master interrupt before clearing iir */
de_ier = I915_READ(DEIER);
-@@ -565,7 +565,7 @@ static irqreturn_t ironlake_irq_handler(
+@@ -565,7 +565,7 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
struct drm_i915_master_private *master_priv;
u32 bsd_usr_interrupt = GT_BSD_USER_INTERRUPT;
@@ -27506,7 +28151,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/d
if (IS_GEN6(dev))
bsd_usr_interrupt = GT_GEN6_BSD_USER_INTERRUPT;
-@@ -1228,7 +1228,7 @@ static irqreturn_t i915_driver_irq_handl
+@@ -1228,7 +1228,7 @@ static irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
int ret = IRQ_NONE, pipe;
bool blc_event = false;
@@ -27515,7 +28160,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/d
iir = I915_READ(IIR);
-@@ -1740,7 +1740,7 @@ static void ironlake_irq_preinstall(stru
+@@ -1740,7 +1740,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -27524,7 +28169,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/d
INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-@@ -1904,7 +1904,7 @@ static void i915_driver_irq_preinstall(s
+@@ -1904,7 +1904,7 @@ static void i915_driver_irq_preinstall(struct drm_device * dev)
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
int pipe;
@@ -27533,10 +28178,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/i915_irq.c linux-3.1.4/drivers/gpu/d
INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/gpu/drm/i915/intel_display.c
---- linux-3.1.4/drivers/gpu/drm/i915/intel_display.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/i915/intel_display.c 2011-11-26 20:00:43.000000000 -0500
-@@ -2205,7 +2205,7 @@ intel_pipe_set_base(struct drm_crtc *crt
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index e1340a2..24f40c3 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -2205,7 +2205,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
wait_event(dev_priv->pending_flip_queue,
atomic_read(&dev_priv->mm.wedged) ||
@@ -27545,7 +28191,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/
/* Big Hammer, we also need to ensure that any pending
* MI_WAIT_FOR_EVENT inside a user batch buffer on the
-@@ -2826,7 +2826,7 @@ static void intel_crtc_wait_for_pending_
+@@ -2826,7 +2826,7 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
obj = to_intel_framebuffer(crtc->fb)->obj;
dev_priv = crtc->dev->dev_private;
wait_event(dev_priv->pending_flip_queue,
@@ -27554,7 +28200,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/
}
static bool intel_crtc_driving_pch(struct drm_crtc *crtc)
-@@ -6676,7 +6676,7 @@ static void do_intel_finish_page_flip(st
+@@ -6676,7 +6676,7 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
atomic_clear_mask(1 << intel_crtc->plane,
&obj->pending_flip.counter);
@@ -27563,7 +28209,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/
wake_up(&dev_priv->pending_flip_queue);
schedule_work(&work->work);
-@@ -6965,7 +6965,7 @@ static int intel_crtc_page_flip(struct d
+@@ -6965,7 +6965,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
/* Block clients from rendering to the new back buffer until
* the flip occurs and the object is no longer visible.
*/
@@ -27572,7 +28218,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/
ret = dev_priv->display.queue_flip(dev, crtc, fb, obj);
if (ret)
-@@ -6979,7 +6979,7 @@ static int intel_crtc_page_flip(struct d
+@@ -6979,7 +6979,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
return 0;
cleanup_pending:
@@ -27581,9 +28227,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/i915/intel_display.c linux-3.1.4/drivers/
cleanup_objs:
drm_gem_object_unreference(&work->old_fb_obj->base);
drm_gem_object_unreference(&obj->base);
-diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_drv.h linux-3.1.4/drivers/gpu/drm/mga/mga_drv.h
---- linux-3.1.4/drivers/gpu/drm/mga/mga_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/mga/mga_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h
+index 54558a0..2d97005 100644
+--- a/drivers/gpu/drm/mga/mga_drv.h
++++ b/drivers/gpu/drm/mga/mga_drv.h
@@ -120,9 +120,9 @@ typedef struct drm_mga_private {
u32 clear_cmd;
u32 maccess;
@@ -27596,10 +28243,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_drv.h linux-3.1.4/drivers/gpu/drm
u32 next_fence_to_post;
unsigned int fb_cpp;
-diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c
---- linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -44,7 +44,7 @@ u32 mga_get_vblank_counter(struct drm_de
+diff --git a/drivers/gpu/drm/mga/mga_irq.c b/drivers/gpu/drm/mga/mga_irq.c
+index 2581202..f230a8d9 100644
+--- a/drivers/gpu/drm/mga/mga_irq.c
++++ b/drivers/gpu/drm/mga/mga_irq.c
+@@ -44,7 +44,7 @@ u32 mga_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -27608,7 +28256,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c linux-3.1.4/drivers/gpu/drm
}
-@@ -60,7 +60,7 @@ irqreturn_t mga_driver_irq_handler(DRM_I
+@@ -60,7 +60,7 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
/* VBLANK interrupt */
if (status & MGA_VLINEPEN) {
MGA_WRITE(MGA_ICLEAR, MGA_VLINEICLR);
@@ -27617,7 +28265,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c linux-3.1.4/drivers/gpu/drm
drm_handle_vblank(dev, 0);
handled = 1;
}
-@@ -79,7 +79,7 @@ irqreturn_t mga_driver_irq_handler(DRM_I
+@@ -79,7 +79,7 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS)
if ((prim_start & ~0x03) != (prim_end & ~0x03))
MGA_WRITE(MGA_PRIMEND, prim_end);
@@ -27626,7 +28274,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c linux-3.1.4/drivers/gpu/drm
DRM_WAKEUP(&dev_priv->fence_queue);
handled = 1;
}
-@@ -130,7 +130,7 @@ int mga_driver_fence_wait(struct drm_dev
+@@ -130,7 +130,7 @@ int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence)
* using fences.
*/
DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * DRM_HZ,
@@ -27635,9 +28283,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/mga/mga_irq.c linux-3.1.4/drivers/gpu/drm
- *sequence) <= (1 << 23)));
*sequence = cur_fence;
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c
---- linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
+index b311fab..dc11d6a 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
++++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -201,7 +201,7 @@ struct methods {
const char desc[8];
void (*loadbios)(struct drm_device *, uint8_t *);
@@ -27647,7 +28296,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c linux-3.1.4/driver
static struct methods shadow_methods[] = {
{ "PRAMIN", load_vbios_pramin, true },
-@@ -5489,7 +5489,7 @@ parse_bit_displayport_tbl_entry(struct d
+@@ -5489,7 +5489,7 @@ parse_bit_displayport_tbl_entry(struct drm_device *dev, struct nvbios *bios,
struct bit_table {
const char id;
int (* const parse_fn)(struct drm_device *, struct nvbios *, struct bit_entry *);
@@ -27656,9 +28305,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_bios.c linux-3.1.4/driver
#define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry })
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_drv.h linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_drv.h
---- linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
+index d7d51de..7c6a7f1 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
++++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -238,7 +238,7 @@ struct nouveau_channel {
struct list_head pending;
uint32_t sequence;
@@ -27711,10 +28361,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_drv.h linux-3.1.4/drivers
} ttm;
struct {
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c
---- linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-11-26 19:57:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c 2011-11-26 20:00:06.000000000 -0500
-@@ -85,7 +85,7 @@ nouveau_fence_update(struct nouveau_chan
+diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
+index ae22dfa..4f09960 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
++++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
+@@ -85,7 +85,7 @@ nouveau_fence_update(struct nouveau_channel *chan)
if (USE_REFCNT(dev))
sequence = nvchan_rd32(chan, 0x48);
else
@@ -27723,7 +28374,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c linux-3.1.4/drive
if (chan->fence.sequence_ack == sequence)
goto out;
-@@ -539,7 +539,7 @@ nouveau_fence_channel_init(struct nouvea
+@@ -539,7 +539,7 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
return ret;
}
@@ -27732,10 +28383,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_fence.c linux-3.1.4/drive
return 0;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_gem.c linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_gem.c
---- linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_gem.c 2011-11-16 18:39:07.000000000 -0500
-@@ -314,7 +314,7 @@ validate_init(struct nouveau_channel *ch
+diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
+index 5f0bc57..eb9fac8 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
++++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
+@@ -314,7 +314,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
int trycnt = 0;
int ret, i;
@@ -27744,10 +28396,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_gem.c linux-3.1.4/drivers
retry:
if (++trycnt > 100000) {
NV_ERROR(dev, "%s failed and gave up.\n", __func__);
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_state.c linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_state.c
---- linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_state.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_state.c 2011-11-16 18:39:07.000000000 -0500
-@@ -496,7 +496,7 @@ static bool nouveau_switcheroo_can_switc
+diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
+index 10656e4..59bf2a4 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_state.c
++++ b/drivers/gpu/drm/nouveau/nouveau_state.c
+@@ -496,7 +496,7 @@ static bool nouveau_switcheroo_can_switch(struct pci_dev *pdev)
bool can_switch;
spin_lock(&dev->count_lock);
@@ -27756,9 +28409,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nouveau_state.c linux-3.1.4/drive
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nv04_graph.c linux-3.1.4/drivers/gpu/drm/nouveau/nv04_graph.c
---- linux-3.1.4/drivers/gpu/drm/nouveau/nv04_graph.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/nouveau/nv04_graph.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c
+index dbdea8e..cd6eeeb 100644
+--- a/drivers/gpu/drm/nouveau/nv04_graph.c
++++ b/drivers/gpu/drm/nouveau/nv04_graph.c
@@ -554,7 +554,7 @@ static int
nv04_graph_mthd_set_ref(struct nouveau_channel *chan,
u32 class, u32 mthd, u32 data)
@@ -27768,10 +28422,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/nouveau/nv04_graph.c linux-3.1.4/drivers/
return 0;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_cce.c linux-3.1.4/drivers/gpu/drm/r128/r128_cce.c
---- linux-3.1.4/drivers/gpu/drm/r128/r128_cce.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/r128/r128_cce.c 2011-11-16 18:39:07.000000000 -0500
-@@ -377,7 +377,7 @@ static int r128_do_init_cce(struct drm_d
+diff --git a/drivers/gpu/drm/r128/r128_cce.c b/drivers/gpu/drm/r128/r128_cce.c
+index 570e190..084a31a 100644
+--- a/drivers/gpu/drm/r128/r128_cce.c
++++ b/drivers/gpu/drm/r128/r128_cce.c
+@@ -377,7 +377,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
/* GH: Simple idle check.
*/
@@ -27780,9 +28435,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_cce.c linux-3.1.4/drivers/gpu/d
/* We don't support anything other than bus-mastering ring mode,
* but the ring can be in either AGP or PCI space for the ring
-diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_drv.h linux-3.1.4/drivers/gpu/drm/r128/r128_drv.h
---- linux-3.1.4/drivers/gpu/drm/r128/r128_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/r128/r128_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
+index 930c71b..499aded 100644
+--- a/drivers/gpu/drm/r128/r128_drv.h
++++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -90,14 +90,14 @@ typedef struct drm_r128_private {
int is_pci;
unsigned long cce_buffers_offset;
@@ -27800,10 +28456,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_drv.h linux-3.1.4/drivers/gpu/d
u32 color_fmt;
unsigned int front_offset;
-diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c
---- linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -42,7 +42,7 @@ u32 r128_get_vblank_counter(struct drm_d
+diff --git a/drivers/gpu/drm/r128/r128_irq.c b/drivers/gpu/drm/r128/r128_irq.c
+index 429d5a0..7e899ed 100644
+--- a/drivers/gpu/drm/r128/r128_irq.c
++++ b/drivers/gpu/drm/r128/r128_irq.c
+@@ -42,7 +42,7 @@ u32 r128_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -27812,7 +28469,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c linux-3.1.4/drivers/gpu/d
}
irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
-@@ -56,7 +56,7 @@ irqreturn_t r128_driver_irq_handler(DRM_
+@@ -56,7 +56,7 @@ irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS)
/* VBLANK interrupt */
if (status & R128_CRTC_VBLANK_INT) {
R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK);
@@ -27821,10 +28478,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_irq.c linux-3.1.4/drivers/gpu/d
drm_handle_vblank(dev, 0);
return IRQ_HANDLED;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_state.c linux-3.1.4/drivers/gpu/drm/r128/r128_state.c
---- linux-3.1.4/drivers/gpu/drm/r128/r128_state.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/r128/r128_state.c 2011-11-16 18:39:07.000000000 -0500
-@@ -321,10 +321,10 @@ static void r128_clear_box(drm_r128_priv
+diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c
+index a9e33ce..09edd4b 100644
+--- a/drivers/gpu/drm/r128/r128_state.c
++++ b/drivers/gpu/drm/r128/r128_state.c
+@@ -321,10 +321,10 @@ static void r128_clear_box(drm_r128_private_t *dev_priv,
static void r128_cce_performance_boxes(drm_r128_private_t *dev_priv)
{
@@ -27837,10 +28495,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/r128/r128_state.c linux-3.1.4/drivers/gpu
}
#endif
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/atom.c linux-3.1.4/drivers/gpu/drm/radeon/atom.c
---- linux-3.1.4/drivers/gpu/drm/radeon/atom.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/atom.c 2011-11-16 19:09:42.000000000 -0500
-@@ -1254,6 +1254,8 @@ struct atom_context *atom_parse(struct c
+diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
+index 14cc88a..cc7b3a5 100644
+--- a/drivers/gpu/drm/radeon/atom.c
++++ b/drivers/gpu/drm/radeon/atom.c
+@@ -1254,6 +1254,8 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
char name[512];
int i;
@@ -27849,10 +28508,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/atom.c linux-3.1.4/drivers/gpu/drm
if (!ctx)
return NULL;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/mkregtable.c linux-3.1.4/drivers/gpu/drm/radeon/mkregtable.c
---- linux-3.1.4/drivers/gpu/drm/radeon/mkregtable.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/mkregtable.c 2011-11-16 18:39:07.000000000 -0500
-@@ -637,14 +637,14 @@ static int parser_auth(struct table *t,
+diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c
+index 5a82b6b..9e69c73 100644
+--- a/drivers/gpu/drm/radeon/mkregtable.c
++++ b/drivers/gpu/drm/radeon/mkregtable.c
+@@ -637,14 +637,14 @@ static int parser_auth(struct table *t, const char *filename)
regex_t mask_rex;
regmatch_t match[4];
char buf[1024];
@@ -27869,10 +28529,33 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/mkregtable.c linux-3.1.4/drivers/g
if (regcomp
(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_atombios.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_atombios.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_atombios.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_atombios.c 2011-11-16 18:40:10.000000000 -0500
-@@ -545,6 +545,8 @@ bool radeon_get_atom_connector_info_from
+diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
+index 184628c..30e1725 100644
+--- a/drivers/gpu/drm/radeon/radeon.h
++++ b/drivers/gpu/drm/radeon/radeon.h
+@@ -192,7 +192,7 @@ extern int sumo_get_temp(struct radeon_device *rdev);
+ */
+ struct radeon_fence_driver {
+ uint32_t scratch_reg;
+- atomic_t seq;
++ atomic_unchecked_t seq;
+ uint32_t last_seq;
+ unsigned long last_jiffies;
+ unsigned long last_timeout;
+@@ -962,7 +962,7 @@ struct radeon_asic {
+ void (*pre_page_flip)(struct radeon_device *rdev, int crtc);
+ u32 (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base);
+ void (*post_page_flip)(struct radeon_device *rdev, int crtc);
+-};
++} __no_const;
+
+ /*
+ * Asic structures
+diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
+index bf2b615..c821ec8 100644
+--- a/drivers/gpu/drm/radeon/radeon_atombios.c
++++ b/drivers/gpu/drm/radeon/radeon_atombios.c
+@@ -545,6 +545,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
struct radeon_gpio_rec gpio;
struct radeon_hpd hpd;
@@ -27881,10 +28564,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_atombios.c linux-3.1.4/driv
if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset))
return false;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_device.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_device.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_device.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_device.c 2011-11-16 18:39:07.000000000 -0500
-@@ -684,7 +684,7 @@ static bool radeon_switcheroo_can_switch
+diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
+index b51e157..8f14fb9 100644
+--- a/drivers/gpu/drm/radeon/radeon_device.c
++++ b/drivers/gpu/drm/radeon/radeon_device.c
+@@ -684,7 +684,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
bool can_switch;
spin_lock(&dev->count_lock);
@@ -27893,10 +28577,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_device.c linux-3.1.4/driver
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_display.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_display.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_display.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_display.c 2011-11-16 18:40:10.000000000 -0500
-@@ -925,6 +925,8 @@ void radeon_compute_pll_legacy(struct ra
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index 6adb3e5..b91553e2 100644
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -925,6 +925,8 @@ void radeon_compute_pll_legacy(struct radeon_pll *pll,
uint32_t post_div;
u32 pll_out_min, pll_out_max;
@@ -27905,9 +28590,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_display.c linux-3.1.4/drive
DRM_DEBUG_KMS("PLL freq %llu %u %u\n", freq, pll->min_ref_div, pll->max_ref_div);
freq = freq * 1000;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_drv.h linux-3.1.4/drivers/gpu/drm/radeon/radeon_drv.h
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
+index a1b59ca..86f2d44 100644
+--- a/drivers/gpu/drm/radeon/radeon_drv.h
++++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -255,7 +255,7 @@ typedef struct drm_radeon_private {
/* SW interrupt */
@@ -27917,10 +28603,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_drv.h linux-3.1.4/drivers/g
int vblank_crtc;
uint32_t irq_enable_reg;
uint32_t r500_disp_irq_reg;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c 2011-11-16 18:39:07.000000000 -0500
-@@ -78,7 +78,7 @@ int radeon_fence_emit(struct radeon_devi
+diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
+index 7fd4e3e..9748ab5 100644
+--- a/drivers/gpu/drm/radeon/radeon_fence.c
++++ b/drivers/gpu/drm/radeon/radeon_fence.c
+@@ -78,7 +78,7 @@ int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
write_unlock_irqrestore(&rdev->fence_drv.lock, irq_flags);
return 0;
}
@@ -27929,7 +28616,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c linux-3.1.4/drivers
if (!rdev->cp.ready)
/* FIXME: cp is not running assume everythings is done right
* away
-@@ -373,7 +373,7 @@ int radeon_fence_driver_init(struct rade
+@@ -373,7 +373,7 @@ int radeon_fence_driver_init(struct radeon_device *rdev)
return r;
}
radeon_fence_write(rdev, 0);
@@ -27938,31 +28625,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_fence.c linux-3.1.4/drivers
INIT_LIST_HEAD(&rdev->fence_drv.created);
INIT_LIST_HEAD(&rdev->fence_drv.emited);
INIT_LIST_HEAD(&rdev->fence_drv.signaled);
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon.h linux-3.1.4/drivers/gpu/drm/radeon/radeon.h
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon.h 2011-11-16 18:39:07.000000000 -0500
-@@ -192,7 +192,7 @@ extern int sumo_get_temp(struct radeon_d
- */
- struct radeon_fence_driver {
- uint32_t scratch_reg;
-- atomic_t seq;
-+ atomic_unchecked_t seq;
- uint32_t last_seq;
- unsigned long last_jiffies;
- unsigned long last_timeout;
-@@ -962,7 +962,7 @@ struct radeon_asic {
- void (*pre_page_flip)(struct radeon_device *rdev, int crtc);
- u32 (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base);
- void (*post_page_flip)(struct radeon_device *rdev, int crtc);
--};
-+} __no_const;
-
- /*
- * Asic structures
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_ioc32.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_ioc32.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_ioc32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_ioc32.c 2011-11-16 18:39:07.000000000 -0500
-@@ -359,7 +359,7 @@ static int compat_radeon_cp_setparam(str
+diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
+index 48b7cea..342236f 100644
+--- a/drivers/gpu/drm/radeon/radeon_ioc32.c
++++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
+@@ -359,7 +359,7 @@ static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd,
request = compat_alloc_user_space(sizeof(*request));
if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
|| __put_user(req32.param, &request->param)
@@ -27971,10 +28638,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_ioc32.c linux-3.1.4/drivers
&request->value))
return -EFAULT;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -225,8 +225,8 @@ static int radeon_emit_irq(struct drm_de
+diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c
+index 465746b..cb2b055 100644
+--- a/drivers/gpu/drm/radeon/radeon_irq.c
++++ b/drivers/gpu/drm/radeon/radeon_irq.c
+@@ -225,8 +225,8 @@ static int radeon_emit_irq(struct drm_device * dev)
unsigned int ret;
RING_LOCALS;
@@ -27985,7 +28653,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c linux-3.1.4/drivers/g
BEGIN_RING(4);
OUT_RING_REG(RADEON_LAST_SWI_REG, ret);
-@@ -352,7 +352,7 @@ int radeon_driver_irq_postinstall(struct
+@@ -352,7 +352,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private;
@@ -27994,10 +28662,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_irq.c linux-3.1.4/drivers/g
DRM_INIT_WAITQUEUE(&dev_priv->swi_queue);
dev->max_vblank_count = 0x001fffff;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c 2011-11-16 18:39:07.000000000 -0500
-@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_de
+diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
+index 92e7ea7..147ffad 100644
+--- a/drivers/gpu/drm/radeon/radeon_state.c
++++ b/drivers/gpu/drm/radeon/radeon_state.c
+@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
@@ -28006,7 +28675,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c linux-3.1.4/drivers
sarea_priv->nbox * sizeof(depth_boxes[0])))
return -EFAULT;
-@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm
+@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
{
drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_getparam_t *param = data;
@@ -28015,10 +28684,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_state.c linux-3.1.4/drivers
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_ttm.c linux-3.1.4/drivers/gpu/drm/radeon/radeon_ttm.c
---- linux-3.1.4/drivers/gpu/drm/radeon/radeon_ttm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/radeon_ttm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -672,8 +672,10 @@ int radeon_mmap(struct file *filp, struc
+diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
+index 0b5468b..9c4b308 100644
+--- a/drivers/gpu/drm/radeon/radeon_ttm.c
++++ b/drivers/gpu/drm/radeon/radeon_ttm.c
+@@ -672,8 +672,10 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
}
if (unlikely(ttm_vm_ops == NULL)) {
ttm_vm_ops = vma->vm_ops;
@@ -28031,10 +28701,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/radeon_ttm.c linux-3.1.4/drivers/g
}
vma->vm_ops = &radeon_ttm_vm_ops;
return 0;
-diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/rs690.c linux-3.1.4/drivers/gpu/drm/radeon/rs690.c
---- linux-3.1.4/drivers/gpu/drm/radeon/rs690.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/radeon/rs690.c 2011-11-16 18:39:07.000000000 -0500
-@@ -304,9 +304,11 @@ void rs690_crtc_bandwidth_compute(struct
+diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
+index a9049ed..501f284 100644
+--- a/drivers/gpu/drm/radeon/rs690.c
++++ b/drivers/gpu/drm/radeon/rs690.c
+@@ -304,9 +304,11 @@ void rs690_crtc_bandwidth_compute(struct radeon_device *rdev,
if (rdev->pm.max_bandwidth.full > rdev->pm.sideport_bandwidth.full &&
rdev->pm.sideport_bandwidth.full)
rdev->pm.max_bandwidth = rdev->pm.sideport_bandwidth;
@@ -28047,10 +28718,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/radeon/rs690.c linux-3.1.4/drivers/gpu/dr
} else {
if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full &&
rdev->pm.k8_bandwidth.full)
-diff -urNp linux-3.1.4/drivers/gpu/drm/ttm/ttm_page_alloc.c linux-3.1.4/drivers/gpu/drm/ttm/ttm_page_alloc.c
---- linux-3.1.4/drivers/gpu/drm/ttm/ttm_page_alloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/ttm/ttm_page_alloc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -398,9 +398,9 @@ static int ttm_pool_get_num_unused_pages
+diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
+index 727e93d..1565650 100644
+--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
++++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
+@@ -398,9 +398,9 @@ static int ttm_pool_get_num_unused_pages(void)
static int ttm_pool_mm_shrink(struct shrinker *shrink,
struct shrink_control *sc)
{
@@ -28062,9 +28734,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/ttm/ttm_page_alloc.c linux-3.1.4/drivers/
struct ttm_page_pool *pool;
int shrink_pages = sc->nr_to_scan;
-diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_drv.h linux-3.1.4/drivers/gpu/drm/via/via_drv.h
---- linux-3.1.4/drivers/gpu/drm/via/via_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/via/via_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
+index 9cf87d9..2000b7d 100644
+--- a/drivers/gpu/drm/via/via_drv.h
++++ b/drivers/gpu/drm/via/via_drv.h
@@ -51,7 +51,7 @@ typedef struct drm_via_ring_buffer {
typedef uint32_t maskarray_t[5];
@@ -28083,10 +28756,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_drv.h linux-3.1.4/drivers/gpu/drm
drm_via_state_t hc_state;
char pci_buf[VIA_PCI_BUF_SIZE];
const uint32_t *fire_offsets[VIA_FIRE_BUF_SIZE];
-diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm/via/via_irq.c
---- linux-3.1.4/drivers/gpu/drm/via/via_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/via/via_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -102,7 +102,7 @@ u32 via_get_vblank_counter(struct drm_de
+diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
+index d391f48..10c8ca3 100644
+--- a/drivers/gpu/drm/via/via_irq.c
++++ b/drivers/gpu/drm/via/via_irq.c
+@@ -102,7 +102,7 @@ u32 via_get_vblank_counter(struct drm_device *dev, int crtc)
if (crtc != 0)
return 0;
@@ -28095,7 +28769,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
}
irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
-@@ -117,8 +117,8 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -117,8 +117,8 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
status = VIA_READ(VIA_REG_INTERRUPT);
if (status & VIA_IRQ_VBLANK_PENDING) {
@@ -28106,7 +28780,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
do_gettimeofday(&cur_vblank);
if (dev_priv->last_vblank_valid) {
dev_priv->usec_per_vblank =
-@@ -128,7 +128,7 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -128,7 +128,7 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
dev_priv->last_vblank = cur_vblank;
dev_priv->last_vblank_valid = 1;
}
@@ -28115,7 +28789,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
DRM_DEBUG("US per vblank is: %u\n",
dev_priv->usec_per_vblank);
}
-@@ -138,7 +138,7 @@ irqreturn_t via_driver_irq_handler(DRM_I
+@@ -138,7 +138,7 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
for (i = 0; i < dev_priv->num_irqs; ++i) {
if (status & cur_irq->pending_mask) {
@@ -28124,7 +28798,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
DRM_WAKEUP(&cur_irq->irq_queue);
handled = 1;
if (dev_priv->irq_map[drm_via_irq_dma0_td] == i)
-@@ -243,11 +243,11 @@ via_driver_irq_wait(struct drm_device *d
+@@ -243,11 +243,11 @@ via_driver_irq_wait(struct drm_device *dev, unsigned int irq, int force_sequence
DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * DRM_HZ,
((VIA_READ(masks[irq][2]) & masks[irq][3]) ==
masks[irq][4]));
@@ -28138,7 +28812,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
*sequence) <= (1 << 23)));
}
*sequence = cur_irq_sequence;
-@@ -285,7 +285,7 @@ void via_driver_irq_preinstall(struct dr
+@@ -285,7 +285,7 @@ void via_driver_irq_preinstall(struct drm_device *dev)
}
for (i = 0; i < dev_priv->num_irqs; ++i) {
@@ -28147,7 +28821,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
cur_irq->enable_mask = dev_priv->irq_masks[i][0];
cur_irq->pending_mask = dev_priv->irq_masks[i][1];
DRM_INIT_WAITQUEUE(&cur_irq->irq_queue);
-@@ -367,7 +367,7 @@ int via_wait_irq(struct drm_device *dev,
+@@ -367,7 +367,7 @@ int via_wait_irq(struct drm_device *dev, void *data, struct drm_file *file_priv)
switch (irqwait->request.type & ~VIA_IRQ_FLAGS_MASK) {
case VIA_IRQ_RELATIVE:
irqwait->request.sequence +=
@@ -28156,9 +28830,10 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/via/via_irq.c linux-3.1.4/drivers/gpu/drm
irqwait->request.type &= ~_DRM_VBLANK_RELATIVE;
case VIA_IRQ_ABSOLUTE:
break;
-diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
---- linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+index 10fc01f..b4e9822 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -240,7 +240,7 @@ struct vmw_private {
* Fencing and IRQs.
*/
@@ -28168,10 +28843,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h linux-3.1.4/drivers/g
wait_queue_head_t fence_queue;
wait_queue_head_t fifo_queue;
atomic_t fence_queue_waiters;
-diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
---- linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c 2011-11-16 18:39:07.000000000 -0500
-@@ -610,7 +610,7 @@ int vmw_execbuf_ioctl(struct drm_device
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+index 41b95ed..69ea504 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+@@ -610,7 +610,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
struct drm_vmw_fence_rep fence_rep;
struct drm_vmw_fence_rep __user *user_fence_rep;
int ret;
@@ -28180,10 +28856,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c linux-3.1.4/drive
void *cmd;
uint32_t sequence;
struct vmw_sw_context *sw_context = &dev_priv->ctx;
-diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
---- linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 2011-11-16 18:39:07.000000000 -0500
-@@ -151,7 +151,7 @@ int vmw_wait_lag(struct vmw_private *dev
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+index 61eacc1..ee38ce8 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+@@ -151,7 +151,7 @@ int vmw_wait_lag(struct vmw_private *dev_priv,
while (!vmw_lag_lt(queue, us)) {
spin_lock(&queue->lock);
if (list_empty(&queue->head))
@@ -28192,10 +28869,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c linux-3.1.4/drivers
else {
fence = list_first_entry(&queue->head,
struct vmw_fence, head);
-diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
---- linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 2011-11-16 18:39:07.000000000 -0500
-@@ -137,7 +137,7 @@ int vmw_fifo_init(struct vmw_private *de
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+index 635c0ff..2641bbb 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+@@ -137,7 +137,7 @@ int vmw_fifo_init(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
(unsigned int) min,
(unsigned int) fifo->capabilities);
@@ -28204,7 +28882,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c linux-3.1.4/drivers/
iowrite32(dev_priv->last_read_sequence, fifo_mem + SVGA_FIFO_FENCE);
vmw_fence_queue_init(&fifo->fence_queue);
return vmw_fifo_send_fence(dev_priv, &dummy);
-@@ -356,7 +356,7 @@ void *vmw_fifo_reserve(struct vmw_privat
+@@ -356,7 +356,7 @@ void *vmw_fifo_reserve(struct vmw_private *dev_priv, uint32_t bytes)
if (reserveable)
iowrite32(bytes, fifo_mem +
SVGA_FIFO_RESERVED);
@@ -28213,7 +28891,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c linux-3.1.4/drivers/
} else {
need_bounce = true;
}
-@@ -476,7 +476,7 @@ int vmw_fifo_send_fence(struct vmw_priva
+@@ -476,7 +476,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *sequence)
fm = vmw_fifo_reserve(dev_priv, bytes);
if (unlikely(fm == NULL)) {
@@ -28222,7 +28900,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c linux-3.1.4/drivers/
ret = -ENOMEM;
(void)vmw_fallback_wait(dev_priv, false, true, *sequence,
false, 3*HZ);
-@@ -484,7 +484,7 @@ int vmw_fifo_send_fence(struct vmw_priva
+@@ -484,7 +484,7 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *sequence)
}
do {
@@ -28231,10 +28909,11 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c linux-3.1.4/drivers/
} while (*sequence == 0);
if (!(fifo_state->capabilities & SVGA_FIFO_CAP_FENCE)) {
-diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
---- linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c 2011-11-16 18:39:07.000000000 -0500
-@@ -100,7 +100,7 @@ bool vmw_fence_signaled(struct vmw_priva
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
+index e92298a..f68f2d6 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
+@@ -100,7 +100,7 @@ bool vmw_fence_signaled(struct vmw_private *dev_priv,
* emitted. Then the fence is stale and signaled.
*/
@@ -28243,7 +28922,7 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c linux-3.1.4/drivers/g
> VMW_FENCE_WRAP);
return ret;
-@@ -131,7 +131,7 @@ int vmw_fallback_wait(struct vmw_private
+@@ -131,7 +131,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
if (fifo_idle)
down_read(&fifo_state->rwsem);
@@ -28252,10 +28931,42 @@ diff -urNp linux-3.1.4/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c linux-3.1.4/drivers/g
ret = 0;
for (;;) {
-diff -urNp linux-3.1.4/drivers/hid/hid-core.c linux-3.1.4/drivers/hid/hid-core.c
---- linux-3.1.4/drivers/hid/hid-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/hid/hid-core.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1951,7 +1951,7 @@ static bool hid_ignore(struct hid_device
+diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
+index c72f1c0..18376f1 100644
+--- a/drivers/gpu/vga/vgaarb.c
++++ b/drivers/gpu/vga/vgaarb.c
+@@ -993,14 +993,20 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ uc = &priv->cards[i];
+ }
+
+- if (!uc)
+- return -EINVAL;
++ if (!uc) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+- if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0)
+- return -EINVAL;
++ if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+- if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0)
+- return -EINVAL;
++ if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0) {
++ ret_val = -EINVAL;
++ goto done;
++ }
+
+ vga_put(pdev, io_state);
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index 5be9f47..aa81d42 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -1951,7 +1951,7 @@ static bool hid_ignore(struct hid_device *hdev)
int hid_add_device(struct hid_device *hdev)
{
@@ -28264,7 +28975,7 @@ diff -urNp linux-3.1.4/drivers/hid/hid-core.c linux-3.1.4/drivers/hid/hid-core.c
int ret;
if (WARN_ON(hdev->status & HID_STAT_ADDED))
-@@ -1966,7 +1966,7 @@ int hid_add_device(struct hid_device *hd
+@@ -1966,7 +1966,7 @@ int hid_add_device(struct hid_device *hdev)
/* XXX hack, any other cleaner solution after the driver core
* is converted to allow more than 20 bytes as the device name? */
dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
@@ -28273,10 +28984,11 @@ diff -urNp linux-3.1.4/drivers/hid/hid-core.c linux-3.1.4/drivers/hid/hid-core.c
hid_debug_register(hdev, dev_name(&hdev->dev));
ret = device_add(&hdev->dev);
-diff -urNp linux-3.1.4/drivers/hid/usbhid/hiddev.c linux-3.1.4/drivers/hid/usbhid/hiddev.c
---- linux-3.1.4/drivers/hid/usbhid/hiddev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/hid/usbhid/hiddev.c 2011-11-16 18:39:07.000000000 -0500
-@@ -624,7 +624,7 @@ static long hiddev_ioctl(struct file *fi
+diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
+index 7c1188b..5a64357 100644
+--- a/drivers/hid/usbhid/hiddev.c
++++ b/drivers/hid/usbhid/hiddev.c
+@@ -624,7 +624,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
case HIDIOCAPPLICATION:
@@ -28285,10 +28997,11 @@ diff -urNp linux-3.1.4/drivers/hid/usbhid/hiddev.c linux-3.1.4/drivers/hid/usbhi
break;
for (i = 0; i < hid->maxcollection; i++)
-diff -urNp linux-3.1.4/drivers/hwmon/acpi_power_meter.c linux-3.1.4/drivers/hwmon/acpi_power_meter.c
---- linux-3.1.4/drivers/hwmon/acpi_power_meter.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/hwmon/acpi_power_meter.c 2011-11-16 18:39:07.000000000 -0500
-@@ -316,8 +316,6 @@ static ssize_t set_trip(struct device *d
+diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
+index 66f6729..2d6de0a 100644
+--- a/drivers/hwmon/acpi_power_meter.c
++++ b/drivers/hwmon/acpi_power_meter.c
+@@ -316,8 +316,6 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
return res;
temp /= 1000;
@@ -28297,9 +29010,10 @@ diff -urNp linux-3.1.4/drivers/hwmon/acpi_power_meter.c linux-3.1.4/drivers/hwmo
mutex_lock(&resource->lock);
resource->trip[attr->index - 7] = temp;
-diff -urNp linux-3.1.4/drivers/hwmon/sht15.c linux-3.1.4/drivers/hwmon/sht15.c
---- linux-3.1.4/drivers/hwmon/sht15.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/hwmon/sht15.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
+index fe4104c..346febb 100644
+--- a/drivers/hwmon/sht15.c
++++ b/drivers/hwmon/sht15.c
@@ -166,7 +166,7 @@ struct sht15_data {
int supply_uV;
bool supply_uV_valid;
@@ -28309,7 +29023,7 @@ diff -urNp linux-3.1.4/drivers/hwmon/sht15.c linux-3.1.4/drivers/hwmon/sht15.c
};
/**
-@@ -509,13 +509,13 @@ static int sht15_measurement(struct sht1
+@@ -509,13 +509,13 @@ static int sht15_measurement(struct sht15_data *data,
return ret;
gpio_direction_input(data->pdata->gpio_data);
@@ -28325,7 +29039,7 @@ diff -urNp linux-3.1.4/drivers/hwmon/sht15.c linux-3.1.4/drivers/hwmon/sht15.c
schedule_work(&data->read_work);
}
ret = wait_event_timeout(data->wait_queue,
-@@ -782,7 +782,7 @@ static irqreturn_t sht15_interrupt_fired
+@@ -782,7 +782,7 @@ static irqreturn_t sht15_interrupt_fired(int irq, void *d)
/* First disable the interrupt */
disable_irq_nosync(irq);
@@ -28334,7 +29048,7 @@ diff -urNp linux-3.1.4/drivers/hwmon/sht15.c linux-3.1.4/drivers/hwmon/sht15.c
/* Then schedule a reading work struct */
if (data->state != SHT15_READING_NOTHING)
schedule_work(&data->read_work);
-@@ -804,11 +804,11 @@ static void sht15_bh_read_data(struct wo
+@@ -804,11 +804,11 @@ static void sht15_bh_read_data(struct work_struct *work_s)
* If not, then start the interrupt again - care here as could
* have gone low in meantime so verify it hasn't!
*/
@@ -28348,9 +29062,10 @@ diff -urNp linux-3.1.4/drivers/hwmon/sht15.c linux-3.1.4/drivers/hwmon/sht15.c
return;
}
-diff -urNp linux-3.1.4/drivers/i2c/busses/i2c-amd756-s4882.c linux-3.1.4/drivers/i2c/busses/i2c-amd756-s4882.c
---- linux-3.1.4/drivers/i2c/busses/i2c-amd756-s4882.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/i2c/busses/i2c-amd756-s4882.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
+index 378fcb5..5e91fa8 100644
+--- a/drivers/i2c/busses/i2c-amd756-s4882.c
++++ b/drivers/i2c/busses/i2c-amd756-s4882.c
@@ -43,7 +43,7 @@
extern struct i2c_adapter amd756_smbus;
@@ -28360,9 +29075,10 @@ diff -urNp linux-3.1.4/drivers/i2c/busses/i2c-amd756-s4882.c linux-3.1.4/drivers
/* Wrapper access functions for multiplexed SMBus */
static DEFINE_MUTEX(amd756_lock);
-diff -urNp linux-3.1.4/drivers/i2c/busses/i2c-nforce2-s4985.c linux-3.1.4/drivers/i2c/busses/i2c-nforce2-s4985.c
---- linux-3.1.4/drivers/i2c/busses/i2c-nforce2-s4985.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/i2c/busses/i2c-nforce2-s4985.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c
+index 29015eb..af2d8e9 100644
+--- a/drivers/i2c/busses/i2c-nforce2-s4985.c
++++ b/drivers/i2c/busses/i2c-nforce2-s4985.c
@@ -41,7 +41,7 @@
extern struct i2c_adapter *nforce2_smbus;
@@ -28372,9 +29088,10 @@ diff -urNp linux-3.1.4/drivers/i2c/busses/i2c-nforce2-s4985.c linux-3.1.4/driver
/* Wrapper access functions for multiplexed SMBus */
static DEFINE_MUTEX(nforce2_lock);
-diff -urNp linux-3.1.4/drivers/i2c/i2c-mux.c linux-3.1.4/drivers/i2c/i2c-mux.c
---- linux-3.1.4/drivers/i2c/i2c-mux.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/i2c/i2c-mux.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
+index d7a4833..7fae376 100644
+--- a/drivers/i2c/i2c-mux.c
++++ b/drivers/i2c/i2c-mux.c
@@ -28,7 +28,7 @@
/* multiplexer per channel data */
struct i2c_mux_priv {
@@ -28384,10 +29101,11 @@ diff -urNp linux-3.1.4/drivers/i2c/i2c-mux.c linux-3.1.4/drivers/i2c/i2c-mux.c
struct i2c_adapter *parent;
void *mux_dev; /* the mux chip/device */
-diff -urNp linux-3.1.4/drivers/ide/aec62xx.c linux-3.1.4/drivers/ide/aec62xx.c
---- linux-3.1.4/drivers/ide/aec62xx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/aec62xx.c 2011-11-16 18:39:07.000000000 -0500
-@@ -181,7 +181,7 @@ static const struct ide_port_ops atp86x_
+diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c
+index 57d00ca..0145194 100644
+--- a/drivers/ide/aec62xx.c
++++ b/drivers/ide/aec62xx.c
+@@ -181,7 +181,7 @@ static const struct ide_port_ops atp86x_port_ops = {
.cable_detect = atp86x_cable_detect,
};
@@ -28396,10 +29114,11 @@ diff -urNp linux-3.1.4/drivers/ide/aec62xx.c linux-3.1.4/drivers/ide/aec62xx.c
{ /* 0: AEC6210 */
.name = DRV_NAME,
.init_chipset = init_chipset_aec62xx,
-diff -urNp linux-3.1.4/drivers/ide/alim15x3.c linux-3.1.4/drivers/ide/alim15x3.c
---- linux-3.1.4/drivers/ide/alim15x3.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/alim15x3.c 2011-11-16 18:39:07.000000000 -0500
-@@ -512,7 +512,7 @@ static const struct ide_dma_ops ali_dma_
+diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
+index 2c8016a..911a27c 100644
+--- a/drivers/ide/alim15x3.c
++++ b/drivers/ide/alim15x3.c
+@@ -512,7 +512,7 @@ static const struct ide_dma_ops ali_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28408,10 +29127,11 @@ diff -urNp linux-3.1.4/drivers/ide/alim15x3.c linux-3.1.4/drivers/ide/alim15x3.c
.name = DRV_NAME,
.init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3,
-diff -urNp linux-3.1.4/drivers/ide/amd74xx.c linux-3.1.4/drivers/ide/amd74xx.c
---- linux-3.1.4/drivers/ide/amd74xx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/amd74xx.c 2011-11-16 18:39:07.000000000 -0500
-@@ -223,7 +223,7 @@ static const struct ide_port_ops amd_por
+diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c
+index 3747b25..56fc995 100644
+--- a/drivers/ide/amd74xx.c
++++ b/drivers/ide/amd74xx.c
+@@ -223,7 +223,7 @@ static const struct ide_port_ops amd_port_ops = {
.udma_mask = udma, \
}
@@ -28420,10 +29140,11 @@ diff -urNp linux-3.1.4/drivers/ide/amd74xx.c linux-3.1.4/drivers/ide/amd74xx.c
/* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2),
/* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4),
/* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5),
-diff -urNp linux-3.1.4/drivers/ide/atiixp.c linux-3.1.4/drivers/ide/atiixp.c
---- linux-3.1.4/drivers/ide/atiixp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/atiixp.c 2011-11-16 18:39:07.000000000 -0500
-@@ -139,7 +139,7 @@ static const struct ide_port_ops atiixp_
+diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
+index 15f0ead..cb43480 100644
+--- a/drivers/ide/atiixp.c
++++ b/drivers/ide/atiixp.c
+@@ -139,7 +139,7 @@ static const struct ide_port_ops atiixp_port_ops = {
.cable_detect = atiixp_cable_detect,
};
@@ -28432,10 +29153,11 @@ diff -urNp linux-3.1.4/drivers/ide/atiixp.c linux-3.1.4/drivers/ide/atiixp.c
{ /* 0: IXP200/300/400/700 */
.name = DRV_NAME,
.enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
-diff -urNp linux-3.1.4/drivers/ide/cmd64x.c linux-3.1.4/drivers/ide/cmd64x.c
---- linux-3.1.4/drivers/ide/cmd64x.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/cmd64x.c 2011-11-16 18:39:07.000000000 -0500
-@@ -327,7 +327,7 @@ static const struct ide_dma_ops cmd646_r
+diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
+index 5f80312..d1fc438 100644
+--- a/drivers/ide/cmd64x.c
++++ b/drivers/ide/cmd64x.c
+@@ -327,7 +327,7 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28444,10 +29166,11 @@ diff -urNp linux-3.1.4/drivers/ide/cmd64x.c linux-3.1.4/drivers/ide/cmd64x.c
{ /* 0: CMD643 */
.name = DRV_NAME,
.init_chipset = init_chipset_cmd64x,
-diff -urNp linux-3.1.4/drivers/ide/cs5520.c linux-3.1.4/drivers/ide/cs5520.c
---- linux-3.1.4/drivers/ide/cs5520.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/cs5520.c 2011-11-16 18:39:07.000000000 -0500
-@@ -94,7 +94,7 @@ static const struct ide_port_ops cs5520_
+diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c
+index 2c1e5f7..1444762 100644
+--- a/drivers/ide/cs5520.c
++++ b/drivers/ide/cs5520.c
+@@ -94,7 +94,7 @@ static const struct ide_port_ops cs5520_port_ops = {
.set_dma_mode = cs5520_set_dma_mode,
};
@@ -28456,10 +29179,11 @@ diff -urNp linux-3.1.4/drivers/ide/cs5520.c linux-3.1.4/drivers/ide/cs5520.c
.name = DRV_NAME,
.enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } },
.port_ops = &cs5520_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/cs5530.c linux-3.1.4/drivers/ide/cs5530.c
---- linux-3.1.4/drivers/ide/cs5530.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/cs5530.c 2011-11-16 18:39:07.000000000 -0500
-@@ -245,7 +245,7 @@ static const struct ide_port_ops cs5530_
+diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
+index 4dc4eb9..49b40ad 100644
+--- a/drivers/ide/cs5530.c
++++ b/drivers/ide/cs5530.c
+@@ -245,7 +245,7 @@ static const struct ide_port_ops cs5530_port_ops = {
.udma_filter = cs5530_udma_filter,
};
@@ -28468,10 +29192,11 @@ diff -urNp linux-3.1.4/drivers/ide/cs5530.c linux-3.1.4/drivers/ide/cs5530.c
.name = DRV_NAME,
.init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530,
-diff -urNp linux-3.1.4/drivers/ide/cs5535.c linux-3.1.4/drivers/ide/cs5535.c
---- linux-3.1.4/drivers/ide/cs5535.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/cs5535.c 2011-11-16 18:39:07.000000000 -0500
-@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_
+diff --git a/drivers/ide/cs5535.c b/drivers/ide/cs5535.c
+index 5059faf..18d4c85 100644
+--- a/drivers/ide/cs5535.c
++++ b/drivers/ide/cs5535.c
+@@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_port_ops = {
.cable_detect = cs5535_cable_detect,
};
@@ -28480,10 +29205,11 @@ diff -urNp linux-3.1.4/drivers/ide/cs5535.c linux-3.1.4/drivers/ide/cs5535.c
.name = DRV_NAME,
.port_ops = &cs5535_port_ops,
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE,
-diff -urNp linux-3.1.4/drivers/ide/cy82c693.c linux-3.1.4/drivers/ide/cy82c693.c
---- linux-3.1.4/drivers/ide/cy82c693.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/cy82c693.c 2011-11-16 18:39:07.000000000 -0500
-@@ -163,7 +163,7 @@ static const struct ide_port_ops cy82c69
+diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c
+index 67cbcfa..37ea151 100644
+--- a/drivers/ide/cy82c693.c
++++ b/drivers/ide/cy82c693.c
+@@ -163,7 +163,7 @@ static const struct ide_port_ops cy82c693_port_ops = {
.set_dma_mode = cy82c693_set_dma_mode,
};
@@ -28492,10 +29218,11 @@ diff -urNp linux-3.1.4/drivers/ide/cy82c693.c linux-3.1.4/drivers/ide/cy82c693.c
.name = DRV_NAME,
.init_iops = init_iops_cy82c693,
.port_ops = &cy82c693_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
---- linux-3.1.4/drivers/ide/hpt366.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/hpt366.c 2011-11-16 18:39:07.000000000 -0500
-@@ -443,7 +443,7 @@ static struct hpt_timings hpt37x_timings
+diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
+index 58c51cd..4aec3b8 100644
+--- a/drivers/ide/hpt366.c
++++ b/drivers/ide/hpt366.c
+@@ -443,7 +443,7 @@ static struct hpt_timings hpt37x_timings = {
}
};
@@ -28504,7 +29231,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT36x",
.chip_type = HPT36x,
.udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2,
-@@ -451,7 +451,7 @@ static const struct hpt_info hpt36x __de
+@@ -451,7 +451,7 @@ static const struct hpt_info hpt36x __devinitdata = {
.timings = &hpt36x_timings
};
@@ -28513,7 +29240,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT370",
.chip_type = HPT370,
.udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
-@@ -459,7 +459,7 @@ static const struct hpt_info hpt370 __de
+@@ -459,7 +459,7 @@ static const struct hpt_info hpt370 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28522,7 +29249,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT370A",
.chip_type = HPT370A,
.udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4,
-@@ -467,7 +467,7 @@ static const struct hpt_info hpt370a __d
+@@ -467,7 +467,7 @@ static const struct hpt_info hpt370a __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28531,7 +29258,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT374",
.chip_type = HPT374,
.udma_mask = ATA_UDMA5,
-@@ -475,7 +475,7 @@ static const struct hpt_info hpt374 __de
+@@ -475,7 +475,7 @@ static const struct hpt_info hpt374 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28540,7 +29267,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT372",
.chip_type = HPT372,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -483,7 +483,7 @@ static const struct hpt_info hpt372 __de
+@@ -483,7 +483,7 @@ static const struct hpt_info hpt372 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28549,7 +29276,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT372A",
.chip_type = HPT372A,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -491,7 +491,7 @@ static const struct hpt_info hpt372a __d
+@@ -491,7 +491,7 @@ static const struct hpt_info hpt372a __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28558,7 +29285,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT302",
.chip_type = HPT302,
.udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -499,7 +499,7 @@ static const struct hpt_info hpt302 __de
+@@ -499,7 +499,7 @@ static const struct hpt_info hpt302 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28567,7 +29294,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT371",
.chip_type = HPT371,
.udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -507,7 +507,7 @@ static const struct hpt_info hpt371 __de
+@@ -507,7 +507,7 @@ static const struct hpt_info hpt371 __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28576,7 +29303,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT372N",
.chip_type = HPT372N,
.udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -515,7 +515,7 @@ static const struct hpt_info hpt372n __d
+@@ -515,7 +515,7 @@ static const struct hpt_info hpt372n __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28585,7 +29312,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT302N",
.chip_type = HPT302N,
.udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -523,7 +523,7 @@ static const struct hpt_info hpt302n __d
+@@ -523,7 +523,7 @@ static const struct hpt_info hpt302n __devinitdata = {
.timings = &hpt37x_timings
};
@@ -28594,7 +29321,7 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
.chip_name = "HPT371N",
.chip_type = HPT371N,
.udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5,
-@@ -1361,7 +1361,7 @@ static const struct ide_dma_ops hpt36x_d
+@@ -1361,7 +1361,7 @@ static const struct ide_dma_ops hpt36x_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28603,10 +29330,11 @@ diff -urNp linux-3.1.4/drivers/ide/hpt366.c linux-3.1.4/drivers/ide/hpt366.c
{ /* 0: HPT36x */
.name = DRV_NAME,
.init_chipset = init_chipset_hpt366,
-diff -urNp linux-3.1.4/drivers/ide/ide-cd.c linux-3.1.4/drivers/ide/ide-cd.c
---- linux-3.1.4/drivers/ide/ide-cd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/ide-cd.c 2011-11-16 18:39:07.000000000 -0500
-@@ -769,7 +769,7 @@ static void cdrom_do_block_pc(ide_drive_
+diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
+index 04b0956..f5b47dc 100644
+--- a/drivers/ide/ide-cd.c
++++ b/drivers/ide/ide-cd.c
+@@ -769,7 +769,7 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
if ((unsigned long)buf & alignment
|| blk_rq_bytes(rq) & q->dma_pad_mask
@@ -28615,10 +29343,11 @@ diff -urNp linux-3.1.4/drivers/ide/ide-cd.c linux-3.1.4/drivers/ide/ide-cd.c
drive->dma = 0;
}
}
-diff -urNp linux-3.1.4/drivers/ide/ide-floppy.c linux-3.1.4/drivers/ide/ide-floppy.c
---- linux-3.1.4/drivers/ide/ide-floppy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/ide-floppy.c 2011-11-16 18:40:10.000000000 -0500
-@@ -379,6 +379,8 @@ static int ide_floppy_get_capacity(ide_d
+diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
+index 61fdf54..2834ea6 100644
+--- a/drivers/ide/ide-floppy.c
++++ b/drivers/ide/ide-floppy.c
+@@ -379,6 +379,8 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
u8 pc_buf[256], header_len, desc_cnt;
int i, rc = 1, blocks, length;
@@ -28627,10 +29356,11 @@ diff -urNp linux-3.1.4/drivers/ide/ide-floppy.c linux-3.1.4/drivers/ide/ide-flop
ide_debug_log(IDE_DBG_FUNC, "enter");
drive->bios_cyl = 0;
-diff -urNp linux-3.1.4/drivers/ide/ide-pci-generic.c linux-3.1.4/drivers/ide/ide-pci-generic.c
---- linux-3.1.4/drivers/ide/ide-pci-generic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/ide-pci-generic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell
+diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c
+index a743e68..1cfd674 100644
+--- a/drivers/ide/ide-pci-generic.c
++++ b/drivers/ide/ide-pci-generic.c
+@@ -53,7 +53,7 @@ static const struct ide_port_ops netcell_port_ops = {
.udma_mask = ATA_UDMA6, \
}
@@ -28639,10 +29369,11 @@ diff -urNp linux-3.1.4/drivers/ide/ide-pci-generic.c linux-3.1.4/drivers/ide/ide
/* 0: Unknown */
DECLARE_GENERIC_PCI_DEV(0),
-diff -urNp linux-3.1.4/drivers/ide/it8172.c linux-3.1.4/drivers/ide/it8172.c
---- linux-3.1.4/drivers/ide/it8172.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/it8172.c 2011-11-16 18:39:07.000000000 -0500
-@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_
+diff --git a/drivers/ide/it8172.c b/drivers/ide/it8172.c
+index 560e66d..d5dd180 100644
+--- a/drivers/ide/it8172.c
++++ b/drivers/ide/it8172.c
+@@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_port_ops = {
.set_dma_mode = it8172_set_dma_mode,
};
@@ -28651,10 +29382,11 @@ diff -urNp linux-3.1.4/drivers/ide/it8172.c linux-3.1.4/drivers/ide/it8172.c
.name = DRV_NAME,
.port_ops = &it8172_port_ops,
.enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} },
-diff -urNp linux-3.1.4/drivers/ide/it8213.c linux-3.1.4/drivers/ide/it8213.c
---- linux-3.1.4/drivers/ide/it8213.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/it8213.c 2011-11-16 18:39:07.000000000 -0500
-@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_
+diff --git a/drivers/ide/it8213.c b/drivers/ide/it8213.c
+index 46816ba..1847aeb 100644
+--- a/drivers/ide/it8213.c
++++ b/drivers/ide/it8213.c
+@@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_port_ops = {
.cable_detect = it8213_cable_detect,
};
@@ -28663,10 +29395,11 @@ diff -urNp linux-3.1.4/drivers/ide/it8213.c linux-3.1.4/drivers/ide/it8213.c
.name = DRV_NAME,
.enablebits = { {0x41, 0x80, 0x80} },
.port_ops = &it8213_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/it821x.c linux-3.1.4/drivers/ide/it821x.c
---- linux-3.1.4/drivers/ide/it821x.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/it821x.c 2011-11-16 18:39:07.000000000 -0500
-@@ -630,7 +630,7 @@ static const struct ide_port_ops it821x_
+diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c
+index 2e3169f..c5611db 100644
+--- a/drivers/ide/it821x.c
++++ b/drivers/ide/it821x.c
+@@ -630,7 +630,7 @@ static const struct ide_port_ops it821x_port_ops = {
.cable_detect = it821x_cable_detect,
};
@@ -28675,10 +29408,11 @@ diff -urNp linux-3.1.4/drivers/ide/it821x.c linux-3.1.4/drivers/ide/it821x.c
.name = DRV_NAME,
.init_chipset = init_chipset_it821x,
.init_hwif = init_hwif_it821x,
-diff -urNp linux-3.1.4/drivers/ide/jmicron.c linux-3.1.4/drivers/ide/jmicron.c
---- linux-3.1.4/drivers/ide/jmicron.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/jmicron.c 2011-11-16 18:39:07.000000000 -0500
-@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron
+diff --git a/drivers/ide/jmicron.c b/drivers/ide/jmicron.c
+index 74c2c4a..efddd7d 100644
+--- a/drivers/ide/jmicron.c
++++ b/drivers/ide/jmicron.c
+@@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron_port_ops = {
.cable_detect = jmicron_cable_detect,
};
@@ -28687,10 +29421,11 @@ diff -urNp linux-3.1.4/drivers/ide/jmicron.c linux-3.1.4/drivers/ide/jmicron.c
.name = DRV_NAME,
.enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
.port_ops = &jmicron_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/ns87415.c linux-3.1.4/drivers/ide/ns87415.c
---- linux-3.1.4/drivers/ide/ns87415.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/ns87415.c 2011-11-16 18:39:07.000000000 -0500
-@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_
+diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
+index 95327a2..73f78d8 100644
+--- a/drivers/ide/ns87415.c
++++ b/drivers/ide/ns87415.c
+@@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_dma_ops = {
.dma_sff_read_status = superio_dma_sff_read_status,
};
@@ -28699,10 +29434,11 @@ diff -urNp linux-3.1.4/drivers/ide/ns87415.c linux-3.1.4/drivers/ide/ns87415.c
.name = DRV_NAME,
.init_hwif = init_hwif_ns87415,
.tp_ops = &ns87415_tp_ops,
-diff -urNp linux-3.1.4/drivers/ide/opti621.c linux-3.1.4/drivers/ide/opti621.c
---- linux-3.1.4/drivers/ide/opti621.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/opti621.c 2011-11-16 18:39:07.000000000 -0500
-@@ -131,7 +131,7 @@ static const struct ide_port_ops opti621
+diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c
+index 1a53a4c..39edc66 100644
+--- a/drivers/ide/opti621.c
++++ b/drivers/ide/opti621.c
+@@ -131,7 +131,7 @@ static const struct ide_port_ops opti621_port_ops = {
.set_pio_mode = opti621_set_pio_mode,
};
@@ -28711,10 +29447,11 @@ diff -urNp linux-3.1.4/drivers/ide/opti621.c linux-3.1.4/drivers/ide/opti621.c
.name = DRV_NAME,
.enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
.port_ops = &opti621_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/pdc202xx_new.c linux-3.1.4/drivers/ide/pdc202xx_new.c
---- linux-3.1.4/drivers/ide/pdc202xx_new.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/pdc202xx_new.c 2011-11-16 18:39:07.000000000 -0500
-@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_
+diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c
+index 9546fe2..2e5ceb6 100644
+--- a/drivers/ide/pdc202xx_new.c
++++ b/drivers/ide/pdc202xx_new.c
+@@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_port_ops = {
.udma_mask = udma, \
}
@@ -28723,10 +29460,11 @@ diff -urNp linux-3.1.4/drivers/ide/pdc202xx_new.c linux-3.1.4/drivers/ide/pdc202
/* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5),
/* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6),
};
-diff -urNp linux-3.1.4/drivers/ide/pdc202xx_old.c linux-3.1.4/drivers/ide/pdc202xx_old.c
---- linux-3.1.4/drivers/ide/pdc202xx_old.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/pdc202xx_old.c 2011-11-16 18:39:07.000000000 -0500
-@@ -270,7 +270,7 @@ static const struct ide_dma_ops pdc2026x
+diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
+index 3a35ec6..5634510 100644
+--- a/drivers/ide/pdc202xx_old.c
++++ b/drivers/ide/pdc202xx_old.c
+@@ -270,7 +270,7 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
.max_sectors = sectors, \
}
@@ -28735,10 +29473,11 @@ diff -urNp linux-3.1.4/drivers/ide/pdc202xx_old.c linux-3.1.4/drivers/ide/pdc202
{ /* 0: PDC20246 */
.name = DRV_NAME,
.init_chipset = init_chipset_pdc202xx,
-diff -urNp linux-3.1.4/drivers/ide/piix.c linux-3.1.4/drivers/ide/piix.c
---- linux-3.1.4/drivers/ide/piix.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/piix.c 2011-11-16 18:39:07.000000000 -0500
-@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_por
+diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
+index b59d04c..368c2a7 100644
+--- a/drivers/ide/piix.c
++++ b/drivers/ide/piix.c
+@@ -344,7 +344,7 @@ static const struct ide_port_ops ich_port_ops = {
.udma_mask = udma, \
}
@@ -28747,10 +29486,11 @@ diff -urNp linux-3.1.4/drivers/ide/piix.c linux-3.1.4/drivers/ide/piix.c
/* 0: MPIIX */
{ /*
* MPIIX actually has only a single IDE channel mapped to
-diff -urNp linux-3.1.4/drivers/ide/rz1000.c linux-3.1.4/drivers/ide/rz1000.c
---- linux-3.1.4/drivers/ide/rz1000.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/rz1000.c 2011-11-16 18:39:07.000000000 -0500
-@@ -38,7 +38,7 @@ static int __devinit rz1000_disable_read
+diff --git a/drivers/ide/rz1000.c b/drivers/ide/rz1000.c
+index a6414a8..c04173e 100644
+--- a/drivers/ide/rz1000.c
++++ b/drivers/ide/rz1000.c
+@@ -38,7 +38,7 @@ static int __devinit rz1000_disable_readahead(struct pci_dev *dev)
}
}
@@ -28759,10 +29499,11 @@ diff -urNp linux-3.1.4/drivers/ide/rz1000.c linux-3.1.4/drivers/ide/rz1000.c
.name = DRV_NAME,
.host_flags = IDE_HFLAG_NO_DMA,
};
-diff -urNp linux-3.1.4/drivers/ide/sc1200.c linux-3.1.4/drivers/ide/sc1200.c
---- linux-3.1.4/drivers/ide/sc1200.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/sc1200.c 2011-11-16 18:39:07.000000000 -0500
-@@ -291,7 +291,7 @@ static const struct ide_dma_ops sc1200_d
+diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c
+index 356b9b5..d4758eb 100644
+--- a/drivers/ide/sc1200.c
++++ b/drivers/ide/sc1200.c
+@@ -291,7 +291,7 @@ static const struct ide_dma_ops sc1200_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28771,10 +29512,11 @@ diff -urNp linux-3.1.4/drivers/ide/sc1200.c linux-3.1.4/drivers/ide/sc1200.c
.name = DRV_NAME,
.port_ops = &sc1200_port_ops,
.dma_ops = &sc1200_dma_ops,
-diff -urNp linux-3.1.4/drivers/ide/scc_pata.c linux-3.1.4/drivers/ide/scc_pata.c
---- linux-3.1.4/drivers/ide/scc_pata.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/scc_pata.c 2011-11-16 18:39:07.000000000 -0500
-@@ -811,7 +811,7 @@ static const struct ide_dma_ops scc_dma_
+diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
+index b7f5b0c..9701038 100644
+--- a/drivers/ide/scc_pata.c
++++ b/drivers/ide/scc_pata.c
+@@ -811,7 +811,7 @@ static const struct ide_dma_ops scc_dma_ops = {
.dma_sff_read_status = scc_dma_sff_read_status,
};
@@ -28783,10 +29525,11 @@ diff -urNp linux-3.1.4/drivers/ide/scc_pata.c linux-3.1.4/drivers/ide/scc_pata.c
.name = "sccIDE",
.init_iops = init_iops_scc,
.init_dma = scc_init_dma,
-diff -urNp linux-3.1.4/drivers/ide/serverworks.c linux-3.1.4/drivers/ide/serverworks.c
---- linux-3.1.4/drivers/ide/serverworks.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/serverworks.c 2011-11-16 18:39:07.000000000 -0500
-@@ -337,7 +337,7 @@ static const struct ide_port_ops svwks_p
+diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
+index 35fb8da..24d72ef 100644
+--- a/drivers/ide/serverworks.c
++++ b/drivers/ide/serverworks.c
+@@ -337,7 +337,7 @@ static const struct ide_port_ops svwks_port_ops = {
.cable_detect = svwks_cable_detect,
};
@@ -28795,10 +29538,11 @@ diff -urNp linux-3.1.4/drivers/ide/serverworks.c linux-3.1.4/drivers/ide/serverw
{ /* 0: OSB4 */
.name = DRV_NAME,
.init_chipset = init_chipset_svwks,
-diff -urNp linux-3.1.4/drivers/ide/setup-pci.c linux-3.1.4/drivers/ide/setup-pci.c
---- linux-3.1.4/drivers/ide/setup-pci.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/setup-pci.c 2011-11-16 18:40:10.000000000 -0500
-@@ -542,6 +542,8 @@ int ide_pci_init_two(struct pci_dev *dev
+diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
+index ab3db61..afed580 100644
+--- a/drivers/ide/setup-pci.c
++++ b/drivers/ide/setup-pci.c
+@@ -542,6 +542,8 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
int ret, i, n_ports = dev2 ? 4 : 2;
struct ide_hw hw[4], *hws[] = { NULL, NULL, NULL, NULL };
@@ -28807,10 +29551,11 @@ diff -urNp linux-3.1.4/drivers/ide/setup-pci.c linux-3.1.4/drivers/ide/setup-pci
for (i = 0; i < n_ports / 2; i++) {
ret = ide_setup_pci_controller(pdev[i], d, !i);
if (ret < 0)
-diff -urNp linux-3.1.4/drivers/ide/siimage.c linux-3.1.4/drivers/ide/siimage.c
---- linux-3.1.4/drivers/ide/siimage.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/siimage.c 2011-11-16 18:39:07.000000000 -0500
-@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_
+diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c
+index ddeda44..46f7e30 100644
+--- a/drivers/ide/siimage.c
++++ b/drivers/ide/siimage.c
+@@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_ops = {
.udma_mask = ATA_UDMA6, \
}
@@ -28819,10 +29564,11 @@ diff -urNp linux-3.1.4/drivers/ide/siimage.c linux-3.1.4/drivers/ide/siimage.c
/* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops),
/* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops)
};
-diff -urNp linux-3.1.4/drivers/ide/sis5513.c linux-3.1.4/drivers/ide/sis5513.c
---- linux-3.1.4/drivers/ide/sis5513.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/sis5513.c 2011-11-16 18:39:07.000000000 -0500
-@@ -563,7 +563,7 @@ static const struct ide_port_ops sis_ata
+diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c
+index 4a00225..09e61b4 100644
+--- a/drivers/ide/sis5513.c
++++ b/drivers/ide/sis5513.c
+@@ -563,7 +563,7 @@ static const struct ide_port_ops sis_ata133_port_ops = {
.cable_detect = sis_cable_detect,
};
@@ -28831,10 +29577,11 @@ diff -urNp linux-3.1.4/drivers/ide/sis5513.c linux-3.1.4/drivers/ide/sis5513.c
.name = DRV_NAME,
.init_chipset = init_chipset_sis5513,
.enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} },
-diff -urNp linux-3.1.4/drivers/ide/sl82c105.c linux-3.1.4/drivers/ide/sl82c105.c
---- linux-3.1.4/drivers/ide/sl82c105.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/sl82c105.c 2011-11-16 18:39:07.000000000 -0500
-@@ -299,7 +299,7 @@ static const struct ide_dma_ops sl82c105
+diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
+index f21dc2a..d051cd2 100644
+--- a/drivers/ide/sl82c105.c
++++ b/drivers/ide/sl82c105.c
+@@ -299,7 +299,7 @@ static const struct ide_dma_ops sl82c105_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28843,10 +29590,11 @@ diff -urNp linux-3.1.4/drivers/ide/sl82c105.c linux-3.1.4/drivers/ide/sl82c105.c
.name = DRV_NAME,
.init_chipset = init_chipset_sl82c105,
.enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}},
-diff -urNp linux-3.1.4/drivers/ide/slc90e66.c linux-3.1.4/drivers/ide/slc90e66.c
---- linux-3.1.4/drivers/ide/slc90e66.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/slc90e66.c 2011-11-16 18:39:07.000000000 -0500
-@@ -132,7 +132,7 @@ static const struct ide_port_ops slc90e6
+diff --git a/drivers/ide/slc90e66.c b/drivers/ide/slc90e66.c
+index 864ffe0..863a5e9 100644
+--- a/drivers/ide/slc90e66.c
++++ b/drivers/ide/slc90e66.c
+@@ -132,7 +132,7 @@ static const struct ide_port_ops slc90e66_port_ops = {
.cable_detect = slc90e66_cable_detect,
};
@@ -28855,10 +29603,11 @@ diff -urNp linux-3.1.4/drivers/ide/slc90e66.c linux-3.1.4/drivers/ide/slc90e66.c
.name = DRV_NAME,
.enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} },
.port_ops = &slc90e66_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/tc86c001.c linux-3.1.4/drivers/ide/tc86c001.c
---- linux-3.1.4/drivers/ide/tc86c001.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/tc86c001.c 2011-11-16 18:39:07.000000000 -0500
-@@ -191,7 +191,7 @@ static const struct ide_dma_ops tc86c001
+diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c
+index e444d24..ba577de 100644
+--- a/drivers/ide/tc86c001.c
++++ b/drivers/ide/tc86c001.c
+@@ -191,7 +191,7 @@ static const struct ide_dma_ops tc86c001_dma_ops = {
.dma_sff_read_status = ide_dma_sff_read_status,
};
@@ -28867,10 +29616,11 @@ diff -urNp linux-3.1.4/drivers/ide/tc86c001.c linux-3.1.4/drivers/ide/tc86c001.c
.name = DRV_NAME,
.init_hwif = init_hwif_tc86c001,
.port_ops = &tc86c001_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/triflex.c linux-3.1.4/drivers/ide/triflex.c
---- linux-3.1.4/drivers/ide/triflex.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/triflex.c 2011-11-16 18:39:07.000000000 -0500
-@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex
+diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c
+index e53a1b7..d11aff7 100644
+--- a/drivers/ide/triflex.c
++++ b/drivers/ide/triflex.c
+@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex_port_ops = {
.set_dma_mode = triflex_set_mode,
};
@@ -28879,10 +29629,11 @@ diff -urNp linux-3.1.4/drivers/ide/triflex.c linux-3.1.4/drivers/ide/triflex.c
.name = DRV_NAME,
.enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
.port_ops = &triflex_port_ops,
-diff -urNp linux-3.1.4/drivers/ide/trm290.c linux-3.1.4/drivers/ide/trm290.c
---- linux-3.1.4/drivers/ide/trm290.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/trm290.c 2011-11-16 18:39:07.000000000 -0500
-@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops
+diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
+index 4b42ca0..e494a98 100644
+--- a/drivers/ide/trm290.c
++++ b/drivers/ide/trm290.c
+@@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops = {
.dma_check = trm290_dma_check,
};
@@ -28891,10 +29642,11 @@ diff -urNp linux-3.1.4/drivers/ide/trm290.c linux-3.1.4/drivers/ide/trm290.c
.name = DRV_NAME,
.init_hwif = init_hwif_trm290,
.tp_ops = &trm290_tp_ops,
-diff -urNp linux-3.1.4/drivers/ide/via82cxxx.c linux-3.1.4/drivers/ide/via82cxxx.c
---- linux-3.1.4/drivers/ide/via82cxxx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/ide/via82cxxx.c 2011-11-16 18:39:07.000000000 -0500
-@@ -403,7 +403,7 @@ static const struct ide_port_ops via_por
+diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
+index f46f49c..eb77678 100644
+--- a/drivers/ide/via82cxxx.c
++++ b/drivers/ide/via82cxxx.c
+@@ -403,7 +403,7 @@ static const struct ide_port_ops via_port_ops = {
.cable_detect = via82cxxx_cable_detect,
};
@@ -28903,10 +29655,11 @@ diff -urNp linux-3.1.4/drivers/ide/via82cxxx.c linux-3.1.4/drivers/ide/via82cxxx
.name = DRV_NAME,
.init_chipset = init_chipset_via82cxxx,
.enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } },
-diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniband/core/cm.c
---- linux-3.1.4/drivers/infiniband/core/cm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/core/cm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -113,7 +113,7 @@ static char const counter_group_names[CM
+diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
+index fc0f2bd..ac2f8a5 100644
+--- a/drivers/infiniband/core/cm.c
++++ b/drivers/infiniband/core/cm.c
+@@ -113,7 +113,7 @@ static char const counter_group_names[CM_COUNTER_GROUPS]
struct cm_counter_group {
struct kobject obj;
@@ -28915,7 +29668,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
};
struct cm_counter_attribute {
-@@ -1387,7 +1387,7 @@ static void cm_dup_req_handler(struct cm
+@@ -1387,7 +1387,7 @@ static void cm_dup_req_handler(struct cm_work *work,
struct ib_mad_send_buf *msg = NULL;
int ret;
@@ -28924,7 +29677,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_REQ_COUNTER]);
/* Quick state check to discard duplicate REQs. */
-@@ -1765,7 +1765,7 @@ static void cm_dup_rep_handler(struct cm
+@@ -1765,7 +1765,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
if (!cm_id_priv)
return;
@@ -28933,7 +29686,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_REP_COUNTER]);
ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
if (ret)
-@@ -1932,7 +1932,7 @@ static int cm_rtu_handler(struct cm_work
+@@ -1932,7 +1932,7 @@ static int cm_rtu_handler(struct cm_work *work)
if (cm_id_priv->id.state != IB_CM_REP_SENT &&
cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
spin_unlock_irq(&cm_id_priv->lock);
@@ -28942,7 +29695,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_RTU_COUNTER]);
goto out;
}
-@@ -2115,7 +2115,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2115,7 +2115,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
dreq_msg->local_comm_id);
if (!cm_id_priv) {
@@ -28951,7 +29704,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_DREQ_COUNTER]);
cm_issue_drep(work->port, work->mad_recv_wc);
return -EINVAL;
-@@ -2140,7 +2140,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2140,7 +2140,7 @@ static int cm_dreq_handler(struct cm_work *work)
case IB_CM_MRA_REP_RCVD:
break;
case IB_CM_TIMEWAIT:
@@ -28960,7 +29713,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_DREQ_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2154,7 +2154,7 @@ static int cm_dreq_handler(struct cm_wor
+@@ -2154,7 +2154,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_DREQ_RCVD:
@@ -28969,7 +29722,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_DREQ_COUNTER]);
goto unlock;
default:
-@@ -2521,7 +2521,7 @@ static int cm_mra_handler(struct cm_work
+@@ -2521,7 +2521,7 @@ static int cm_mra_handler(struct cm_work *work)
ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv->msg, timeout)) {
if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
@@ -28978,7 +29731,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter_group[CM_RECV_DUPLICATES].
counter[CM_MRA_COUNTER]);
goto out;
-@@ -2530,7 +2530,7 @@ static int cm_mra_handler(struct cm_work
+@@ -2530,7 +2530,7 @@ static int cm_mra_handler(struct cm_work *work)
break;
case IB_CM_MRA_REQ_RCVD:
case IB_CM_MRA_REP_RCVD:
@@ -28987,7 +29740,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_MRA_COUNTER]);
/* fall through */
default:
-@@ -2692,7 +2692,7 @@ static int cm_lap_handler(struct cm_work
+@@ -2692,7 +2692,7 @@ static int cm_lap_handler(struct cm_work *work)
case IB_CM_LAP_IDLE:
break;
case IB_CM_MRA_LAP_SENT:
@@ -28996,7 +29749,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_LAP_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2708,7 +2708,7 @@ static int cm_lap_handler(struct cm_work
+@@ -2708,7 +2708,7 @@ static int cm_lap_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_LAP_RCVD:
@@ -29005,7 +29758,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_LAP_COUNTER]);
goto unlock;
default:
-@@ -2992,7 +2992,7 @@ static int cm_sidr_req_handler(struct cm
+@@ -2992,7 +2992,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
if (cur_cm_id_priv) {
spin_unlock_irq(&cm.lock);
@@ -29014,7 +29767,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[CM_SIDR_REQ_COUNTER]);
goto out; /* Duplicate message. */
}
-@@ -3204,10 +3204,10 @@ static void cm_send_handler(struct ib_ma
+@@ -3204,10 +3204,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
msg->retries = 1;
@@ -29027,7 +29780,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
&port->counter_group[CM_XMIT_RETRIES].
counter[attr_index]);
-@@ -3417,7 +3417,7 @@ static void cm_recv_handler(struct ib_ma
+@@ -3417,7 +3417,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
}
attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
@@ -29036,7 +29789,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
counter[attr_id - CM_ATTR_ID_OFFSET]);
work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
-@@ -3615,7 +3615,7 @@ static ssize_t cm_show_counter(struct ko
+@@ -3615,7 +3615,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
cm_attr = container_of(attr, struct cm_counter_attribute, attr);
return sprintf(buf, "%ld\n",
@@ -29045,9 +29798,10 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/cm.c linux-3.1.4/drivers/infiniba
}
static const struct sysfs_ops cm_counter_ops = {
-diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/infiniband/core/fmr_pool.c
---- linux-3.1.4/drivers/infiniband/core/fmr_pool.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/core/fmr_pool.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
+index 4507043..14ad522 100644
+--- a/drivers/infiniband/core/fmr_pool.c
++++ b/drivers/infiniband/core/fmr_pool.c
@@ -97,8 +97,8 @@ struct ib_fmr_pool {
struct task_struct *thread;
@@ -29059,7 +29813,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
wait_queue_head_t force_wait;
};
-@@ -179,10 +179,10 @@ static int ib_fmr_cleanup_thread(void *p
+@@ -179,10 +179,10 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
struct ib_fmr_pool *pool = pool_ptr;
do {
@@ -29072,7 +29826,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
wake_up_interruptible(&pool->force_wait);
if (pool->flush_function)
-@@ -190,7 +190,7 @@ static int ib_fmr_cleanup_thread(void *p
+@@ -190,7 +190,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
}
set_current_state(TASK_INTERRUPTIBLE);
@@ -29081,7 +29835,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
!kthread_should_stop())
schedule();
__set_current_state(TASK_RUNNING);
-@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(s
+@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
pool->dirty_watermark = params->dirty_watermark;
pool->dirty_len = 0;
spin_lock_init(&pool->pool_lock);
@@ -29092,7 +29846,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
init_waitqueue_head(&pool->force_wait);
pool->thread = kthread_run(ib_fmr_cleanup_thread,
-@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool
+@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
}
spin_unlock_irq(&pool->pool_lock);
@@ -29106,7 +29860,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
return -EINTR;
return 0;
-@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr
+@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
} else {
list_add_tail(&fmr->list, &pool->dirty_list);
if (++pool->dirty_len >= pool->dirty_watermark) {
@@ -29115,10 +29869,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/core/fmr_pool.c linux-3.1.4/drivers/in
wake_up_process(pool->thread);
}
}
-diff -urNp linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c
---- linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c 2011-11-16 18:39:07.000000000 -0500
-@@ -122,7 +122,7 @@ static int write_tpt_entry(struct c4iw_r
+diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
+index 40c8353..946b0e4 100644
+--- a/drivers/infiniband/hw/cxgb4/mem.c
++++ b/drivers/infiniband/hw/cxgb4/mem.c
+@@ -122,7 +122,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
int err;
struct fw_ri_tpte tpt;
u32 stag_idx;
@@ -29127,7 +29882,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c linux-3.1.4/drivers/inf
if (c4iw_fatal_error(rdev))
return -EIO;
-@@ -135,7 +135,7 @@ static int write_tpt_entry(struct c4iw_r
+@@ -135,7 +135,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
&rdev->resource.tpt_fifo_lock);
if (!stag_idx)
return -ENOMEM;
@@ -29136,10 +29891,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/cxgb4/mem.c linux-3.1.4/drivers/inf
}
PDBG("%s stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n",
__func__, stag_state, type, pdid, stag_idx);
-diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_fs.c linux-3.1.4/drivers/infiniband/hw/ipath/ipath_fs.c
---- linux-3.1.4/drivers/infiniband/hw/ipath/ipath_fs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/ipath/ipath_fs.c 2011-11-16 18:40:10.000000000 -0500
-@@ -113,6 +113,8 @@ static ssize_t atomic_counters_read(stru
+diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
+index 31ae1b1..2f5b038 100644
+--- a/drivers/infiniband/hw/ipath/ipath_fs.c
++++ b/drivers/infiniband/hw/ipath/ipath_fs.c
+@@ -113,6 +113,8 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
struct infinipath_counters counters;
struct ipath_devdata *dd;
@@ -29148,10 +29904,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_fs.c linux-3.1.4/driver
dd = file->f_path.dentry->d_inode->i_private;
dd->ipath_f_read_counters(dd, &counters);
-diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c
---- linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1868,7 +1868,7 @@ void ipath_rc_rcv(struct ipath_ibdev *de
+diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
+index 79b3dbc..96e5fcc 100644
+--- a/drivers/infiniband/hw/ipath/ipath_rc.c
++++ b/drivers/infiniband/hw/ipath/ipath_rc.c
+@@ -1868,7 +1868,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
struct ib_atomic_eth *ateth;
struct ipath_ack_entry *e;
u64 vaddr;
@@ -29160,7 +29917,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c linux-3.1.4/driver
u64 sdata;
u32 rkey;
u8 next;
-@@ -1903,11 +1903,11 @@ void ipath_rc_rcv(struct ipath_ibdev *de
+@@ -1903,11 +1903,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
IB_ACCESS_REMOTE_ATOMIC)))
goto nack_acc_unlck;
/* Perform atomic OP and save result. */
@@ -29174,10 +29931,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_rc.c linux-3.1.4/driver
(u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
be64_to_cpu(ateth->compare_data),
sdata);
-diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_ruc.c linux-3.1.4/drivers/infiniband/hw/ipath/ipath_ruc.c
---- linux-3.1.4/drivers/infiniband/hw/ipath/ipath_ruc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/ipath/ipath_ruc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -266,7 +266,7 @@ static void ipath_ruc_loopback(struct ip
+diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c
+index 1f95bba..9530f87 100644
+--- a/drivers/infiniband/hw/ipath/ipath_ruc.c
++++ b/drivers/infiniband/hw/ipath/ipath_ruc.c
+@@ -266,7 +266,7 @@ static void ipath_ruc_loopback(struct ipath_qp *sqp)
unsigned long flags;
struct ib_wc wc;
u64 sdata;
@@ -29200,10 +29958,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/ipath/ipath_ruc.c linux-3.1.4/drive
(u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
sdata, wqe->wr.wr.atomic.swap);
goto send_comp;
-diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes.c linux-3.1.4/drivers/infiniband/hw/nes/nes.c
---- linux-3.1.4/drivers/infiniband/hw/nes/nes.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/nes/nes.c 2011-11-16 18:39:07.000000000 -0500
-@@ -103,7 +103,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limi
+diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
+index 2d668c6..3312bb7 100644
+--- a/drivers/infiniband/hw/nes/nes.c
++++ b/drivers/infiniband/hw/nes/nes.c
+@@ -103,7 +103,7 @@ MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes");
LIST_HEAD(nes_adapter_list);
static LIST_HEAD(nes_dev_list);
@@ -29212,7 +29971,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes.c linux-3.1.4/drivers/infin
static unsigned int ee_flsh_adapter;
static unsigned int sysfs_nonidx_addr;
-@@ -275,7 +275,7 @@ static void nes_cqp_rem_ref_callback(str
+@@ -275,7 +275,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
struct nes_qp *nesqp = cqp_request->cqp_callback_pointer;
struct nes_adapter *nesadapter = nesdev->nesadapter;
@@ -29221,9 +29980,65 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes.c linux-3.1.4/drivers/infin
/* Free the control structures */
-diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c
---- linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
+index 6fe7987..68637b5 100644
+--- a/drivers/infiniband/hw/nes/nes.h
++++ b/drivers/infiniband/hw/nes/nes.h
+@@ -175,17 +175,17 @@ extern unsigned int nes_debug_level;
+ extern unsigned int wqm_quanta;
+ extern struct list_head nes_adapter_list;
+
+-extern atomic_t cm_connects;
+-extern atomic_t cm_accepts;
+-extern atomic_t cm_disconnects;
+-extern atomic_t cm_closes;
+-extern atomic_t cm_connecteds;
+-extern atomic_t cm_connect_reqs;
+-extern atomic_t cm_rejects;
+-extern atomic_t mod_qp_timouts;
+-extern atomic_t qps_created;
+-extern atomic_t qps_destroyed;
+-extern atomic_t sw_qps_destroyed;
++extern atomic_unchecked_t cm_connects;
++extern atomic_unchecked_t cm_accepts;
++extern atomic_unchecked_t cm_disconnects;
++extern atomic_unchecked_t cm_closes;
++extern atomic_unchecked_t cm_connecteds;
++extern atomic_unchecked_t cm_connect_reqs;
++extern atomic_unchecked_t cm_rejects;
++extern atomic_unchecked_t mod_qp_timouts;
++extern atomic_unchecked_t qps_created;
++extern atomic_unchecked_t qps_destroyed;
++extern atomic_unchecked_t sw_qps_destroyed;
+ extern u32 mh_detected;
+ extern u32 mh_pauses_sent;
+ extern u32 cm_packets_sent;
+@@ -194,14 +194,14 @@ extern u32 cm_packets_created;
+ extern u32 cm_packets_received;
+ extern u32 cm_packets_dropped;
+ extern u32 cm_packets_retrans;
+-extern atomic_t cm_listens_created;
+-extern atomic_t cm_listens_destroyed;
++extern atomic_unchecked_t cm_listens_created;
++extern atomic_unchecked_t cm_listens_destroyed;
+ extern u32 cm_backlog_drops;
+-extern atomic_t cm_loopbacks;
+-extern atomic_t cm_nodes_created;
+-extern atomic_t cm_nodes_destroyed;
+-extern atomic_t cm_accel_dropped_pkts;
+-extern atomic_t cm_resets_recvd;
++extern atomic_unchecked_t cm_loopbacks;
++extern atomic_unchecked_t cm_nodes_created;
++extern atomic_unchecked_t cm_nodes_destroyed;
++extern atomic_unchecked_t cm_accel_dropped_pkts;
++extern atomic_unchecked_t cm_resets_recvd;
+
+ extern u32 int_mod_timer_init;
+ extern u32 int_mod_cq_depth_256;
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index c118663..049a3ab 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -68,14 +68,14 @@ u32 cm_packets_dropped;
u32 cm_packets_retrans;
u32 cm_packets_created;
@@ -29267,7 +30082,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
/**
-@@ -1045,7 +1045,7 @@ static int mini_cm_dec_refcnt_listen(str
+@@ -1045,7 +1045,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core,
kfree(listener);
listener = NULL;
ret = 0;
@@ -29276,7 +30091,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
} else {
spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
}
-@@ -1240,7 +1240,7 @@ static struct nes_cm_node *make_cm_node(
+@@ -1240,7 +1240,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
cm_node->rem_mac);
add_hte_node(cm_core, cm_node);
@@ -29285,7 +30100,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
return cm_node;
}
-@@ -1298,7 +1298,7 @@ static int rem_ref_cm_node(struct nes_cm
+@@ -1298,7 +1298,7 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core,
}
atomic_dec(&cm_core->node_cnt);
@@ -29294,7 +30109,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nesqp = cm_node->nesqp;
if (nesqp) {
nesqp->cm_node = NULL;
-@@ -1365,7 +1365,7 @@ static int process_options(struct nes_cm
+@@ -1365,7 +1365,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc,
static void drop_packet(struct sk_buff *skb)
{
@@ -29303,7 +30118,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
dev_kfree_skb_any(skb);
}
-@@ -1428,7 +1428,7 @@ static void handle_rst_pkt(struct nes_cm
+@@ -1428,7 +1428,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
{
int reset = 0; /* whether to send reset in case of err.. */
@@ -29312,7 +30127,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_debug(NES_DBG_CM, "Received Reset, cm_node = %p, state = %u."
" refcnt=%d\n", cm_node, cm_node->state,
atomic_read(&cm_node->ref_count));
-@@ -2057,7 +2057,7 @@ static struct nes_cm_node *mini_cm_conne
+@@ -2057,7 +2057,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
rem_ref_cm_node(cm_node->cm_core, cm_node);
return NULL;
}
@@ -29321,7 +30136,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
loopbackremotenode->loopbackpartner = cm_node;
loopbackremotenode->tcp_cntxt.rcv_wscale =
NES_CM_DEFAULT_RCV_WND_SCALE;
-@@ -2332,7 +2332,7 @@ static int mini_cm_recv_pkt(struct nes_c
+@@ -2332,7 +2332,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core,
add_ref_cm_node(cm_node);
} else if (cm_node->state == NES_CM_STATE_TSA) {
rem_ref_cm_node(cm_core, cm_node);
@@ -29330,7 +30145,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
dev_kfree_skb_any(skb);
break;
}
-@@ -2638,7 +2638,7 @@ static int nes_cm_disconn_true(struct ne
+@@ -2638,7 +2638,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
if ((cm_id) && (cm_id->event_handler)) {
if (issue_disconn) {
@@ -29339,7 +30154,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
cm_event.event = IW_CM_EVENT_DISCONNECT;
cm_event.status = disconn_status;
cm_event.local_addr = cm_id->local_addr;
-@@ -2660,7 +2660,7 @@ static int nes_cm_disconn_true(struct ne
+@@ -2660,7 +2660,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
}
if (issue_close) {
@@ -29348,7 +30163,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_disconnect(nesqp, 1);
cm_id->provider_data = nesqp;
-@@ -2791,7 +2791,7 @@ int nes_accept(struct iw_cm_id *cm_id, s
+@@ -2791,7 +2791,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n",
nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener);
@@ -29357,7 +30172,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_debug(NES_DBG_CM, "netdev refcnt = %u.\n",
netdev_refcnt_read(nesvnic->netdev));
-@@ -3001,7 +3001,7 @@ int nes_reject(struct iw_cm_id *cm_id, c
+@@ -3001,7 +3001,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
struct nes_cm_core *cm_core;
@@ -29366,7 +30181,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
cm_node = (struct nes_cm_node *) cm_id->provider_data;
loopback = cm_node->loopbackpartner;
cm_core = cm_node->cm_core;
-@@ -3067,7 +3067,7 @@ int nes_connect(struct iw_cm_id *cm_id,
+@@ -3067,7 +3067,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ntohl(cm_id->local_addr.sin_addr.s_addr),
ntohs(cm_id->local_addr.sin_port));
@@ -29375,7 +30190,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nesqp->active_conn = 1;
/* cache the cm_id in the qp */
-@@ -3173,7 +3173,7 @@ int nes_create_listen(struct iw_cm_id *c
+@@ -3173,7 +3173,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
g_cm_core->api->stop_listener(g_cm_core, (void *)cm_node);
return err;
}
@@ -29384,7 +30199,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
}
cm_id->add_ref(cm_id);
-@@ -3278,7 +3278,7 @@ static void cm_event_connected(struct ne
+@@ -3278,7 +3278,7 @@ static void cm_event_connected(struct nes_cm_event *event)
if (nesqp->destroyed) {
return;
}
@@ -29393,7 +30208,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_debug(NES_DBG_CM, "QP%u attempting to connect to 0x%08X:0x%04X on"
" local port 0x%04X. jiffies = %lu.\n",
nesqp->hwqp.qp_id,
-@@ -3493,7 +3493,7 @@ static void cm_event_reset(struct nes_cm
+@@ -3493,7 +3493,7 @@ static void cm_event_reset(struct nes_cm_event *event)
cm_id->add_ref(cm_id);
ret = cm_id->event_handler(cm_id, &cm_event);
@@ -29402,7 +30217,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
cm_event.event = IW_CM_EVENT_CLOSE;
cm_event.status = 0;
cm_event.provider_data = cm_id->provider_data;
-@@ -3529,7 +3529,7 @@ static void cm_event_mpa_req(struct nes_
+@@ -3529,7 +3529,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -29411,7 +30226,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
cm_node, cm_id, jiffies);
-@@ -3567,7 +3567,7 @@ static void cm_event_mpa_reject(struct n
+@@ -3567,7 +3567,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -29420,64 +30235,11 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_cm.c linux-3.1.4/drivers/in
nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
cm_node, cm_id, jiffies);
-diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes.h linux-3.1.4/drivers/infiniband/hw/nes/nes.h
---- linux-3.1.4/drivers/infiniband/hw/nes/nes.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/nes/nes.h 2011-11-16 18:39:07.000000000 -0500
-@@ -175,17 +175,17 @@ extern unsigned int nes_debug_level;
- extern unsigned int wqm_quanta;
- extern struct list_head nes_adapter_list;
-
--extern atomic_t cm_connects;
--extern atomic_t cm_accepts;
--extern atomic_t cm_disconnects;
--extern atomic_t cm_closes;
--extern atomic_t cm_connecteds;
--extern atomic_t cm_connect_reqs;
--extern atomic_t cm_rejects;
--extern atomic_t mod_qp_timouts;
--extern atomic_t qps_created;
--extern atomic_t qps_destroyed;
--extern atomic_t sw_qps_destroyed;
-+extern atomic_unchecked_t cm_connects;
-+extern atomic_unchecked_t cm_accepts;
-+extern atomic_unchecked_t cm_disconnects;
-+extern atomic_unchecked_t cm_closes;
-+extern atomic_unchecked_t cm_connecteds;
-+extern atomic_unchecked_t cm_connect_reqs;
-+extern atomic_unchecked_t cm_rejects;
-+extern atomic_unchecked_t mod_qp_timouts;
-+extern atomic_unchecked_t qps_created;
-+extern atomic_unchecked_t qps_destroyed;
-+extern atomic_unchecked_t sw_qps_destroyed;
- extern u32 mh_detected;
- extern u32 mh_pauses_sent;
- extern u32 cm_packets_sent;
-@@ -194,14 +194,14 @@ extern u32 cm_packets_created;
- extern u32 cm_packets_received;
- extern u32 cm_packets_dropped;
- extern u32 cm_packets_retrans;
--extern atomic_t cm_listens_created;
--extern atomic_t cm_listens_destroyed;
-+extern atomic_unchecked_t cm_listens_created;
-+extern atomic_unchecked_t cm_listens_destroyed;
- extern u32 cm_backlog_drops;
--extern atomic_t cm_loopbacks;
--extern atomic_t cm_nodes_created;
--extern atomic_t cm_nodes_destroyed;
--extern atomic_t cm_accel_dropped_pkts;
--extern atomic_t cm_resets_recvd;
-+extern atomic_unchecked_t cm_loopbacks;
-+extern atomic_unchecked_t cm_nodes_created;
-+extern atomic_unchecked_t cm_nodes_destroyed;
-+extern atomic_unchecked_t cm_accel_dropped_pkts;
-+extern atomic_unchecked_t cm_resets_recvd;
-
- extern u32 int_mod_timer_init;
- extern u32 int_mod_cq_depth_256;
-diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_nic.c linux-3.1.4/drivers/infiniband/hw/nes/nes_nic.c
---- linux-3.1.4/drivers/infiniband/hw/nes/nes_nic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/nes/nes_nic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1274,31 +1274,31 @@ static void nes_netdev_get_ethtool_stats
+diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
+index 9d7ffeb..a95dd7d 100644
+--- a/drivers/infiniband/hw/nes/nes_nic.c
++++ b/drivers/infiniband/hw/nes/nes_nic.c
+@@ -1274,31 +1274,31 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = mh_detected;
target_stat_values[++index] = mh_pauses_sent;
target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits;
@@ -29527,9 +30289,10 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_nic.c linux-3.1.4/drivers/i
target_stat_values[++index] = nesadapter->free_4kpbl;
target_stat_values[++index] = nesadapter->free_256pbl;
target_stat_values[++index] = int_mod_timer_init;
-diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c
---- linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
+index 9f2f7d4..6d2fee2 100644
+--- a/drivers/infiniband/hw/nes/nes_verbs.c
++++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -46,9 +46,9 @@
#include <rdma/ib_umem.h>
@@ -29543,7 +30306,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c linux-3.1.4/drivers
static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
-@@ -1131,7 +1131,7 @@ static struct ib_qp *nes_create_qp(struc
+@@ -1131,7 +1131,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
if (init_attr->create_flags)
return ERR_PTR(-EINVAL);
@@ -29552,7 +30315,7 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c linux-3.1.4/drivers
switch (init_attr->qp_type) {
case IB_QPT_RC:
if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
-@@ -1460,7 +1460,7 @@ static int nes_destroy_qp(struct ib_qp *
+@@ -1460,7 +1460,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
struct iw_cm_event cm_event;
int ret;
@@ -29561,9 +30324,10 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/nes/nes_verbs.c linux-3.1.4/drivers
nesqp->destroyed = 1;
/* Blow away the connection if it exists. */
-diff -urNp linux-3.1.4/drivers/infiniband/hw/qib/qib.h linux-3.1.4/drivers/infiniband/hw/qib/qib.h
---- linux-3.1.4/drivers/infiniband/hw/qib/qib.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/infiniband/hw/qib/qib.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h
+index c9624ea..e025b66 100644
+--- a/drivers/infiniband/hw/qib/qib.h
++++ b/drivers/infiniband/hw/qib/qib.h
@@ -51,6 +51,7 @@
#include <linux/completion.h>
#include <linux/kref.h>
@@ -29572,9 +30336,10 @@ diff -urNp linux-3.1.4/drivers/infiniband/hw/qib/qib.h linux-3.1.4/drivers/infin
#include "qib_common.h"
#include "qib_verbs.h"
-diff -urNp linux-3.1.4/drivers/input/gameport/gameport.c linux-3.1.4/drivers/input/gameport/gameport.c
---- linux-3.1.4/drivers/input/gameport/gameport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/gameport/gameport.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
+index c351aa4..e6967c2 100644
+--- a/drivers/input/gameport/gameport.c
++++ b/drivers/input/gameport/gameport.c
@@ -488,14 +488,14 @@ EXPORT_SYMBOL(gameport_set_phys);
*/
static void gameport_init_port(struct gameport *gameport)
@@ -29592,10 +30357,11 @@ diff -urNp linux-3.1.4/drivers/input/gameport/gameport.c linux-3.1.4/drivers/inp
gameport->dev.bus = &gameport_bus;
gameport->dev.release = gameport_release_port;
if (gameport->parent)
-diff -urNp linux-3.1.4/drivers/input/input.c linux-3.1.4/drivers/input/input.c
---- linux-3.1.4/drivers/input/input.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/input.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1814,7 +1814,7 @@ static void input_cleanse_bitmasks(struc
+diff --git a/drivers/input/input.c b/drivers/input/input.c
+index da38d97..2aa0b79 100644
+--- a/drivers/input/input.c
++++ b/drivers/input/input.c
+@@ -1814,7 +1814,7 @@ static void input_cleanse_bitmasks(struct input_dev *dev)
*/
int input_register_device(struct input_dev *dev)
{
@@ -29604,7 +30370,7 @@ diff -urNp linux-3.1.4/drivers/input/input.c linux-3.1.4/drivers/input/input.c
struct input_handler *handler;
const char *path;
int error;
-@@ -1851,7 +1851,7 @@ int input_register_device(struct input_d
+@@ -1851,7 +1851,7 @@ int input_register_device(struct input_dev *dev)
dev->setkeycode = input_default_setkeycode;
dev_set_name(&dev->dev, "input%ld",
@@ -29613,9 +30379,10 @@ diff -urNp linux-3.1.4/drivers/input/input.c linux-3.1.4/drivers/input/input.c
error = device_add(&dev->dev);
if (error)
-diff -urNp linux-3.1.4/drivers/input/joystick/sidewinder.c linux-3.1.4/drivers/input/joystick/sidewinder.c
---- linux-3.1.4/drivers/input/joystick/sidewinder.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/joystick/sidewinder.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
+index b8d8611..15f8d2c 100644
+--- a/drivers/input/joystick/sidewinder.c
++++ b/drivers/input/joystick/sidewinder.c
@@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
@@ -29633,10 +30400,11 @@ diff -urNp linux-3.1.4/drivers/input/joystick/sidewinder.c linux-3.1.4/drivers/i
i = sw_read_packet(sw->gameport, buf, sw->length, 0);
if (sw->type == SW_ID_3DP && sw->length == 66 && i != 66) { /* Broken packet, try to fix */
-diff -urNp linux-3.1.4/drivers/input/joystick/xpad.c linux-3.1.4/drivers/input/joystick/xpad.c
---- linux-3.1.4/drivers/input/joystick/xpad.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/joystick/xpad.c 2011-11-16 18:39:07.000000000 -0500
-@@ -710,7 +710,7 @@ static void xpad_led_set(struct led_clas
+diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
+index d728875..844c89b 100644
+--- a/drivers/input/joystick/xpad.c
++++ b/drivers/input/joystick/xpad.c
+@@ -710,7 +710,7 @@ static void xpad_led_set(struct led_classdev *led_cdev,
static int xpad_led_probe(struct usb_xpad *xpad)
{
@@ -29645,7 +30413,7 @@ diff -urNp linux-3.1.4/drivers/input/joystick/xpad.c linux-3.1.4/drivers/input/j
long led_no;
struct xpad_led *led;
struct led_classdev *led_cdev;
-@@ -723,7 +723,7 @@ static int xpad_led_probe(struct usb_xpa
+@@ -723,7 +723,7 @@ static int xpad_led_probe(struct usb_xpad *xpad)
if (!led)
return -ENOMEM;
@@ -29654,10 +30422,11 @@ diff -urNp linux-3.1.4/drivers/input/joystick/xpad.c linux-3.1.4/drivers/input/j
snprintf(led->name, sizeof(led->name), "xpad%ld", led_no);
led->xpad = xpad;
-diff -urNp linux-3.1.4/drivers/input/mousedev.c linux-3.1.4/drivers/input/mousedev.c
---- linux-3.1.4/drivers/input/mousedev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/mousedev.c 2011-11-16 18:39:07.000000000 -0500
-@@ -763,7 +763,7 @@ static ssize_t mousedev_read(struct file
+diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
+index 0110b5a..d3ad144 100644
+--- a/drivers/input/mousedev.c
++++ b/drivers/input/mousedev.c
+@@ -763,7 +763,7 @@ static ssize_t mousedev_read(struct file *file, char __user *buffer,
spin_unlock_irq(&client->packet_lock);
@@ -29666,10 +30435,11 @@ diff -urNp linux-3.1.4/drivers/input/mousedev.c linux-3.1.4/drivers/input/moused
return -EFAULT;
return count;
-diff -urNp linux-3.1.4/drivers/input/serio/serio.c linux-3.1.4/drivers/input/serio/serio.c
---- linux-3.1.4/drivers/input/serio/serio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/input/serio/serio.c 2011-11-16 18:39:07.000000000 -0500
-@@ -497,7 +497,7 @@ static void serio_release_port(struct de
+diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
+index ba70058..571d25d 100644
+--- a/drivers/input/serio/serio.c
++++ b/drivers/input/serio/serio.c
+@@ -497,7 +497,7 @@ static void serio_release_port(struct device *dev)
*/
static void serio_init_port(struct serio *serio)
{
@@ -29678,7 +30448,7 @@ diff -urNp linux-3.1.4/drivers/input/serio/serio.c linux-3.1.4/drivers/input/ser
__module_get(THIS_MODULE);
-@@ -508,7 +508,7 @@ static void serio_init_port(struct serio
+@@ -508,7 +508,7 @@ static void serio_init_port(struct serio *serio)
mutex_init(&serio->drv_mutex);
device_initialize(&serio->dev);
dev_set_name(&serio->dev, "serio%ld",
@@ -29687,9 +30457,10 @@ diff -urNp linux-3.1.4/drivers/input/serio/serio.c linux-3.1.4/drivers/input/ser
serio->dev.bus = &serio_bus;
serio->dev.release = serio_release_port;
serio->dev.groups = serio_device_attr_groups;
-diff -urNp linux-3.1.4/drivers/isdn/capi/capi.c linux-3.1.4/drivers/isdn/capi/capi.c
---- linux-3.1.4/drivers/isdn/capi/capi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/capi/capi.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
+index e44933d..9ba484a 100644
+--- a/drivers/isdn/capi/capi.c
++++ b/drivers/isdn/capi/capi.c
@@ -83,8 +83,8 @@ struct capiminor {
struct capi20_appl *ap;
@@ -29701,7 +30472,7 @@ diff -urNp linux-3.1.4/drivers/isdn/capi/capi.c linux-3.1.4/drivers/isdn/capi/ca
struct tty_port port;
int ttyinstop;
-@@ -397,7 +397,7 @@ gen_data_b3_resp_for(struct capiminor *m
+@@ -397,7 +397,7 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb)
capimsg_setu16(s, 2, mp->ap->applid);
capimsg_setu8 (s, 4, CAPI_DATA_B3);
capimsg_setu8 (s, 5, CAPI_RESP);
@@ -29710,7 +30481,7 @@ diff -urNp linux-3.1.4/drivers/isdn/capi/capi.c linux-3.1.4/drivers/isdn/capi/ca
capimsg_setu32(s, 8, mp->ncci);
capimsg_setu16(s, 12, datahandle);
}
-@@ -518,14 +518,14 @@ static void handle_minor_send(struct cap
+@@ -518,14 +518,14 @@ static void handle_minor_send(struct capiminor *mp)
mp->outbytes -= len;
spin_unlock_bh(&mp->outlock);
@@ -29727,10 +30498,11 @@ diff -urNp linux-3.1.4/drivers/isdn/capi/capi.c linux-3.1.4/drivers/isdn/capi/ca
capimsg_setu32(skb->data, 8, mp->ncci); /* NCCI */
capimsg_setu32(skb->data, 12, (u32)(long)skb->data);/* Data32 */
capimsg_setu16(skb->data, 16, len); /* Data length */
-diff -urNp linux-3.1.4/drivers/isdn/gigaset/common.c linux-3.1.4/drivers/isdn/gigaset/common.c
---- linux-3.1.4/drivers/isdn/gigaset/common.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/gigaset/common.c 2011-11-16 18:39:07.000000000 -0500
-@@ -723,7 +723,7 @@ struct cardstate *gigaset_initcs(struct
+diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
+index db621db..825ea1a 100644
+--- a/drivers/isdn/gigaset/common.c
++++ b/drivers/isdn/gigaset/common.c
+@@ -723,7 +723,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
cs->commands_pending = 0;
cs->cur_at_seq = 0;
cs->gotfwver = -1;
@@ -29739,9 +30511,10 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/common.c linux-3.1.4/drivers/isdn/gi
cs->dev = NULL;
cs->tty = NULL;
cs->tty_dev = NULL;
-diff -urNp linux-3.1.4/drivers/isdn/gigaset/gigaset.h linux-3.1.4/drivers/isdn/gigaset/gigaset.h
---- linux-3.1.4/drivers/isdn/gigaset/gigaset.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/gigaset/gigaset.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
+index 212efaf..f187c6b 100644
+--- a/drivers/isdn/gigaset/gigaset.h
++++ b/drivers/isdn/gigaset/gigaset.h
@@ -35,6 +35,7 @@
#include <linux/tty_driver.h>
#include <linux/list.h>
@@ -29759,10 +30532,11 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/gigaset.h linux-3.1.4/drivers/isdn/g
struct tty_struct *tty;
struct tasklet_struct if_wake_tasklet;
unsigned control_state;
-diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn/gigaset/interface.c
---- linux-3.1.4/drivers/isdn/gigaset/interface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/gigaset/interface.c 2011-11-16 18:39:07.000000000 -0500
-@@ -162,9 +162,7 @@ static int if_open(struct tty_struct *tt
+diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
+index e35058b..5898a8b 100644
+--- a/drivers/isdn/gigaset/interface.c
++++ b/drivers/isdn/gigaset/interface.c
+@@ -162,9 +162,7 @@ static int if_open(struct tty_struct *tty, struct file *filp)
}
tty->driver_data = cs;
@@ -29773,7 +30547,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
spin_lock_irqsave(&cs->lock, flags);
cs->tty = tty;
spin_unlock_irqrestore(&cs->lock, flags);
-@@ -192,10 +190,10 @@ static void if_close(struct tty_struct *
+@@ -192,10 +190,10 @@ static void if_close(struct tty_struct *tty, struct file *filp)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -29786,7 +30560,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
spin_lock_irqsave(&cs->lock, flags);
cs->tty = NULL;
spin_unlock_irqrestore(&cs->lock, flags);
-@@ -230,7 +228,7 @@ static int if_ioctl(struct tty_struct *t
+@@ -230,7 +228,7 @@ static int if_ioctl(struct tty_struct *tty,
if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
@@ -29795,7 +30569,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
retval = 0;
-@@ -360,7 +358,7 @@ static int if_write(struct tty_struct *t
+@@ -360,7 +358,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
retval = -ENODEV;
goto done;
}
@@ -29804,7 +30578,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
retval = -ENODEV;
goto done;
-@@ -413,7 +411,7 @@ static int if_write_room(struct tty_stru
+@@ -413,7 +411,7 @@ static int if_write_room(struct tty_struct *tty)
if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
@@ -29813,7 +30587,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n");
-@@ -443,7 +441,7 @@ static int if_chars_in_buffer(struct tty
+@@ -443,7 +441,7 @@ static int if_chars_in_buffer(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected");
@@ -29822,7 +30596,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED)
dev_warn(cs->dev, "can't write to unlocked device\n");
-@@ -471,7 +469,7 @@ static void if_throttle(struct tty_struc
+@@ -471,7 +469,7 @@ static void if_throttle(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -29831,7 +30605,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else
gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
-@@ -495,7 +493,7 @@ static void if_unthrottle(struct tty_str
+@@ -495,7 +493,7 @@ static void if_unthrottle(struct tty_struct *tty)
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -29840,7 +30614,7 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else
gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
-@@ -526,7 +524,7 @@ static void if_set_termios(struct tty_st
+@@ -526,7 +524,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
goto out;
}
@@ -29849,10 +30623,11 @@ diff -urNp linux-3.1.4/drivers/isdn/gigaset/interface.c linux-3.1.4/drivers/isdn
dev_warn(cs->dev, "%s: device not opened\n", __func__);
goto out;
}
-diff -urNp linux-3.1.4/drivers/isdn/hardware/avm/b1.c linux-3.1.4/drivers/isdn/hardware/avm/b1.c
---- linux-3.1.4/drivers/isdn/hardware/avm/b1.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/avm/b1.c 2011-11-16 18:39:07.000000000 -0500
-@@ -176,7 +176,7 @@ int b1_load_t4file(avmcard *card, capilo
+diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
+index 2a57da59..e7a12ed 100644
+--- a/drivers/isdn/hardware/avm/b1.c
++++ b/drivers/isdn/hardware/avm/b1.c
+@@ -176,7 +176,7 @@ int b1_load_t4file(avmcard *card, capiloaddatapart * t4file)
}
if (left) {
if (t4file->user) {
@@ -29861,7 +30636,7 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/avm/b1.c linux-3.1.4/drivers/isdn/h
return -EFAULT;
} else {
memcpy(buf, dp, left);
-@@ -224,7 +224,7 @@ int b1_load_config(avmcard *card, capilo
+@@ -224,7 +224,7 @@ int b1_load_config(avmcard *card, capiloaddatapart * config)
}
if (left) {
if (config->user) {
@@ -29870,10 +30645,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/avm/b1.c linux-3.1.4/drivers/isdn/h
return -EFAULT;
} else {
memcpy(buf, dp, left);
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/capidtmf.c linux-3.1.4/drivers/isdn/hardware/eicon/capidtmf.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/capidtmf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/capidtmf.c 2011-11-16 18:40:10.000000000 -0500
-@@ -498,6 +498,7 @@ void capidtmf_recv_block (t_capidtmf_sta
+diff --git a/drivers/isdn/hardware/eicon/capidtmf.c b/drivers/isdn/hardware/eicon/capidtmf.c
+index f130724..c373c68 100644
+--- a/drivers/isdn/hardware/eicon/capidtmf.c
++++ b/drivers/isdn/hardware/eicon/capidtmf.c
+@@ -498,6 +498,7 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
byte goertzel_result_buffer[CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT];
short windowed_sample_buffer[CAPIDTMF_RECV_WINDOWED_SAMPLES];
@@ -29881,9 +30657,10 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/capidtmf.c linux-3.1.4/driver
if (p_state->recv.state & CAPIDTMF_RECV_STATE_DTMF_ACTIVE)
{
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/capifunc.c linux-3.1.4/drivers/isdn/hardware/eicon/capifunc.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/capifunc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/capifunc.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
+index 4d425c6..a9be6c4 100644
+--- a/drivers/isdn/hardware/eicon/capifunc.c
++++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -1055,6 +1055,8 @@ static int divacapi_connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -29893,10 +30670,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/capifunc.c linux-3.1.4/driver
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/diddfunc.c linux-3.1.4/drivers/isdn/hardware/eicon/diddfunc.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/diddfunc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/diddfunc.c 2011-11-16 18:40:10.000000000 -0500
-@@ -54,6 +54,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c
+index 3029234..ef0d9e2 100644
+--- a/drivers/isdn/hardware/eicon/diddfunc.c
++++ b/drivers/isdn/hardware/eicon/diddfunc.c
+@@ -54,6 +54,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -29905,10 +30683,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/diddfunc.c linux-3.1.4/driver
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/divasfunc.c linux-3.1.4/drivers/isdn/hardware/eicon/divasfunc.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/divasfunc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/divasfunc.c 2011-11-16 18:40:10.000000000 -0500
-@@ -160,6 +160,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c
+index 0bbee78..a0d0a01 100644
+--- a/drivers/isdn/hardware/eicon/divasfunc.c
++++ b/drivers/isdn/hardware/eicon/divasfunc.c
+@@ -160,6 +160,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -29917,9 +30696,10 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/divasfunc.c linux-3.1.4/drive
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/divasync.h linux-3.1.4/drivers/isdn/hardware/eicon/divasync.h
---- linux-3.1.4/drivers/isdn/hardware/eicon/divasync.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/divasync.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h
+index 85784a7..a19ca98 100644
+--- a/drivers/isdn/hardware/eicon/divasync.h
++++ b/drivers/isdn/hardware/eicon/divasync.h
@@ -146,7 +146,7 @@ typedef struct _diva_didd_add_adapter {
} diva_didd_add_adapter_t;
typedef struct _diva_didd_remove_adapter {
@@ -29929,10 +30709,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/divasync.h linux-3.1.4/driver
typedef struct _diva_didd_read_adapter_array {
void * buffer;
dword length;
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/idifunc.c linux-3.1.4/drivers/isdn/hardware/eicon/idifunc.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/idifunc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/idifunc.c 2011-11-16 18:40:10.000000000 -0500
-@@ -188,6 +188,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
+index db87d51..7d09acf 100644
+--- a/drivers/isdn/hardware/eicon/idifunc.c
++++ b/drivers/isdn/hardware/eicon/idifunc.c
+@@ -188,6 +188,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -29941,9 +30722,10 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/idifunc.c linux-3.1.4/drivers
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/message.c linux-3.1.4/drivers/isdn/hardware/eicon/message.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/message.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/message.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
+index a339598..b6a8bfc 100644
+--- a/drivers/isdn/hardware/eicon/message.c
++++ b/drivers/isdn/hardware/eicon/message.c
@@ -4886,6 +4886,8 @@ static void sig_ind(PLCI *plci)
dword d;
word w;
@@ -29953,7 +30735,7 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/message.c linux-3.1.4/drivers
a = plci->adapter;
Id = ((word)plci->Id<<8)|a->Id;
PUT_WORD(&SS_Ind[4],0x0000);
-@@ -7480,6 +7482,8 @@ static word add_b1(PLCI *plci, API_PARSE
+@@ -7480,6 +7482,8 @@ static word add_b1(PLCI *plci, API_PARSE *bp, word b_channel_info,
word j, n, w;
dword d;
@@ -29962,7 +30744,7 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/message.c linux-3.1.4/drivers
for(i=0;i<8;i++) bp_parms[i].length = 0;
for(i=0;i<2;i++) global_config[i].length = 0;
-@@ -7954,6 +7958,8 @@ static word add_b23(PLCI *plci, API_PARS
+@@ -7954,6 +7958,8 @@ static word add_b23(PLCI *plci, API_PARSE *bp)
const byte llc3[] = {4,3,2,2,6,6,0};
const byte header[] = {0,2,3,3,0,0,0};
@@ -29971,7 +30753,7 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/message.c linux-3.1.4/drivers
for(i=0;i<8;i++) bp_parms[i].length = 0;
for(i=0;i<6;i++) b2_config_parms[i].length = 0;
for(i=0;i<5;i++) b3_config_parms[i].length = 0;
-@@ -14741,6 +14747,8 @@ static void group_optimization(DIVA_CAPI
+@@ -14741,6 +14747,8 @@ static void group_optimization(DIVA_CAPI_ADAPTER * a, PLCI * plci)
word appl_number_group_type[MAX_APPL];
PLCI *auxplci;
@@ -29980,10 +30762,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/message.c linux-3.1.4/drivers
set_group_ind_mask (plci); /* all APPLs within this inc. call are allowed to dial in */
if(!a->group_optimization_enabled)
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/mntfunc.c linux-3.1.4/drivers/isdn/hardware/eicon/mntfunc.c
---- linux-3.1.4/drivers/isdn/hardware/eicon/mntfunc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/mntfunc.c 2011-11-16 18:40:10.000000000 -0500
-@@ -79,6 +79,8 @@ static int DIVA_INIT_FUNCTION connect_di
+diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
+index a564b75..f3cf8b5 100644
+--- a/drivers/isdn/hardware/eicon/mntfunc.c
++++ b/drivers/isdn/hardware/eicon/mntfunc.c
+@@ -79,6 +79,8 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
IDI_SYNC_REQ req;
DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
@@ -29992,9 +30775,10 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/mntfunc.c linux-3.1.4/drivers
DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
for (x = 0; x < MAX_DESCRIPTORS; x++) {
-diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/xdi_adapter.h linux-3.1.4/drivers/isdn/hardware/eicon/xdi_adapter.h
---- linux-3.1.4/drivers/isdn/hardware/eicon/xdi_adapter.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/hardware/eicon/xdi_adapter.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/isdn/hardware/eicon/xdi_adapter.h b/drivers/isdn/hardware/eicon/xdi_adapter.h
+index a3bd163..8956575 100644
+--- a/drivers/isdn/hardware/eicon/xdi_adapter.h
++++ b/drivers/isdn/hardware/eicon/xdi_adapter.h
@@ -44,7 +44,7 @@ typedef struct _xdi_mbox_t {
typedef struct _diva_os_idi_adapter_interface {
diva_init_card_proc_t cleanup_adapter_proc;
@@ -30004,10 +30788,11 @@ diff -urNp linux-3.1.4/drivers/isdn/hardware/eicon/xdi_adapter.h linux-3.1.4/dri
typedef struct _diva_os_xdi_adapter {
struct list_head link;
-diff -urNp linux-3.1.4/drivers/isdn/i4l/isdn_common.c linux-3.1.4/drivers/isdn/i4l/isdn_common.c
---- linux-3.1.4/drivers/isdn/i4l/isdn_common.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/i4l/isdn_common.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1286,6 +1286,8 @@ isdn_ioctl(struct file *file, uint cmd,
+diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
+index 6ed82ad..b05ac05 100644
+--- a/drivers/isdn/i4l/isdn_common.c
++++ b/drivers/isdn/i4l/isdn_common.c
+@@ -1286,6 +1286,8 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
} iocpar;
void __user *argp = (void __user *)arg;
@@ -30016,10 +30801,11 @@ diff -urNp linux-3.1.4/drivers/isdn/i4l/isdn_common.c linux-3.1.4/drivers/isdn/i
#define name iocpar.name
#define bname iocpar.bname
#define iocts iocpar.iocts
-diff -urNp linux-3.1.4/drivers/isdn/icn/icn.c linux-3.1.4/drivers/isdn/icn/icn.c
---- linux-3.1.4/drivers/isdn/icn/icn.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/isdn/icn/icn.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1045,7 +1045,7 @@ icn_writecmd(const u_char * buf, int len
+diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
+index 1f355bb..43f1fea 100644
+--- a/drivers/isdn/icn/icn.c
++++ b/drivers/isdn/icn/icn.c
+@@ -1045,7 +1045,7 @@ icn_writecmd(const u_char * buf, int len, int user, icn_card * card)
if (count > len)
count = len;
if (user) {
@@ -30028,9 +30814,10 @@ diff -urNp linux-3.1.4/drivers/isdn/icn/icn.c linux-3.1.4/drivers/isdn/icn/icn.c
return -EFAULT;
} else
memcpy(msg, buf, count);
-diff -urNp linux-3.1.4/drivers/lguest/core.c linux-3.1.4/drivers/lguest/core.c
---- linux-3.1.4/drivers/lguest/core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/lguest/core.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
+index 2535933..09a8e86 100644
+--- a/drivers/lguest/core.c
++++ b/drivers/lguest/core.c
@@ -92,9 +92,17 @@ static __init int map_switcher(void)
* it's worked so far. The end address needs +1 because __get_vm_area
* allocates an extra guard page, so we need space for that.
@@ -30058,9 +30845,10 @@ diff -urNp linux-3.1.4/drivers/lguest/core.c linux-3.1.4/drivers/lguest/core.c
end_switcher_text - start_switcher_text);
printk(KERN_INFO "lguest: mapped switcher at %p\n",
-diff -urNp linux-3.1.4/drivers/lguest/x86/core.c linux-3.1.4/drivers/lguest/x86/core.c
---- linux-3.1.4/drivers/lguest/x86/core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/lguest/x86/core.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
+index 65af42f..530c87a 100644
+--- a/drivers/lguest/x86/core.c
++++ b/drivers/lguest/x86/core.c
@@ -59,7 +59,7 @@ static struct {
/* Offset from where switcher.S was compiled to where we've copied it */
static unsigned long switcher_offset(void)
@@ -30070,7 +30858,7 @@ diff -urNp linux-3.1.4/drivers/lguest/x86/core.c linux-3.1.4/drivers/lguest/x86/
}
/* This cpu's struct lguest_pages. */
-@@ -100,7 +100,13 @@ static void copy_in_guest_info(struct lg
+@@ -100,7 +100,13 @@ static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages)
* These copies are pretty cheap, so we do them unconditionally: */
/* Save the current Host top-level page directory.
*/
@@ -30102,9 +30890,10 @@ diff -urNp linux-3.1.4/drivers/lguest/x86/core.c linux-3.1.4/drivers/lguest/x86/
lguest_entry.segment = LGUEST_CS;
/*
-diff -urNp linux-3.1.4/drivers/lguest/x86/switcher_32.S linux-3.1.4/drivers/lguest/x86/switcher_32.S
---- linux-3.1.4/drivers/lguest/x86/switcher_32.S 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/lguest/x86/switcher_32.S 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/lguest/x86/switcher_32.S b/drivers/lguest/x86/switcher_32.S
+index 40634b0..4f5855e 100644
+--- a/drivers/lguest/x86/switcher_32.S
++++ b/drivers/lguest/x86/switcher_32.S
@@ -87,6 +87,7 @@
#include <asm/page.h>
#include <asm/segment.h>
@@ -30163,10 +30952,11 @@ diff -urNp linux-3.1.4/drivers/lguest/x86/switcher_32.S linux-3.1.4/drivers/lgue
// Every interrupt can come to us here
// But we must truly tell each apart.
-diff -urNp linux-3.1.4/drivers/macintosh/macio_asic.c linux-3.1.4/drivers/macintosh/macio_asic.c
---- linux-3.1.4/drivers/macintosh/macio_asic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/macintosh/macio_asic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -748,7 +748,7 @@ static void __devexit macio_pci_remove(s
+diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
+index 4daf9e5..b8d1d0f 100644
+--- a/drivers/macintosh/macio_asic.c
++++ b/drivers/macintosh/macio_asic.c
+@@ -748,7 +748,7 @@ static void __devexit macio_pci_remove(struct pci_dev* pdev)
* MacIO is matched against any Apple ID, it's probe() function
* will then decide wether it applies or not
*/
@@ -30175,67 +30965,11 @@ diff -urNp linux-3.1.4/drivers/macintosh/macio_asic.c linux-3.1.4/drivers/macint
.vendor = PCI_VENDOR_ID_APPLE,
.device = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
-diff -urNp linux-3.1.4/drivers/md/dm.c linux-3.1.4/drivers/md/dm.c
---- linux-3.1.4/drivers/md/dm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/dm.c 2011-11-16 18:39:07.000000000 -0500
-@@ -165,9 +165,9 @@ struct mapped_device {
- /*
- * Event handling.
- */
-- atomic_t event_nr;
-+ atomic_unchecked_t event_nr;
- wait_queue_head_t eventq;
-- atomic_t uevent_seq;
-+ atomic_unchecked_t uevent_seq;
- struct list_head uevent_list;
- spinlock_t uevent_lock; /* Protect access to uevent_list */
-
-@@ -1843,8 +1843,8 @@ static struct mapped_device *alloc_dev(i
- rwlock_init(&md->map_lock);
- atomic_set(&md->holders, 1);
- atomic_set(&md->open_count, 0);
-- atomic_set(&md->event_nr, 0);
-- atomic_set(&md->uevent_seq, 0);
-+ atomic_set_unchecked(&md->event_nr, 0);
-+ atomic_set_unchecked(&md->uevent_seq, 0);
- INIT_LIST_HEAD(&md->uevent_list);
- spin_lock_init(&md->uevent_lock);
-
-@@ -1978,7 +1978,7 @@ static void event_callback(void *context
-
- dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
-
-- atomic_inc(&md->event_nr);
-+ atomic_inc_unchecked(&md->event_nr);
- wake_up(&md->eventq);
- }
-
-@@ -2614,18 +2614,18 @@ int dm_kobject_uevent(struct mapped_devi
-
- uint32_t dm_next_uevent_seq(struct mapped_device *md)
- {
-- return atomic_add_return(1, &md->uevent_seq);
-+ return atomic_add_return_unchecked(1, &md->uevent_seq);
- }
-
- uint32_t dm_get_event_nr(struct mapped_device *md)
- {
-- return atomic_read(&md->event_nr);
-+ return atomic_read_unchecked(&md->event_nr);
- }
-
- int dm_wait_event(struct mapped_device *md, int event_nr)
- {
- return wait_event_interruptible(md->eventq,
-- (event_nr != atomic_read(&md->event_nr)));
-+ (event_nr != atomic_read_unchecked(&md->event_nr)));
- }
-
- void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
-diff -urNp linux-3.1.4/drivers/md/dm-ioctl.c linux-3.1.4/drivers/md/dm-ioctl.c
---- linux-3.1.4/drivers/md/dm-ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/dm-ioctl.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1578,7 +1578,7 @@ static int validate_params(uint cmd, str
+diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
+index 2e9a3ca..c2fb229 100644
+--- a/drivers/md/dm-ioctl.c
++++ b/drivers/md/dm-ioctl.c
+@@ -1578,7 +1578,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
cmd == DM_LIST_VERSIONS_CMD)
return 0;
@@ -30244,9 +30978,10 @@ diff -urNp linux-3.1.4/drivers/md/dm-ioctl.c linux-3.1.4/drivers/md/dm-ioctl.c
if (!*param->name) {
DMWARN("name not supplied when creating device");
return -EINVAL;
-diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
---- linux-3.1.4/drivers/md/dm-raid1.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/dm-raid1.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
+index 9bfd057..01180bc 100644
+--- a/drivers/md/dm-raid1.c
++++ b/drivers/md/dm-raid1.c
@@ -40,7 +40,7 @@ enum dm_raid1_error {
struct mirror {
@@ -30256,7 +30991,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
unsigned long error_type;
struct dm_dev *dev;
sector_t offset;
-@@ -185,7 +185,7 @@ static struct mirror *get_valid_mirror(s
+@@ -185,7 +185,7 @@ static struct mirror *get_valid_mirror(struct mirror_set *ms)
struct mirror *m;
for (m = ms->mirror; m < ms->mirror + ms->nr_mirrors; m++)
@@ -30265,7 +31000,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
return m;
return NULL;
-@@ -217,7 +217,7 @@ static void fail_mirror(struct mirror *m
+@@ -217,7 +217,7 @@ static void fail_mirror(struct mirror *m, enum dm_raid1_error error_type)
* simple way to tell if a device has encountered
* errors.
*/
@@ -30274,7 +31009,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
if (test_and_set_bit(error_type, &m->error_type))
return;
-@@ -408,7 +408,7 @@ static struct mirror *choose_mirror(stru
+@@ -408,7 +408,7 @@ static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector)
struct mirror *m = get_default_mirror(ms);
do {
@@ -30292,7 +31027,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
}
static int mirror_available(struct mirror_set *ms, struct bio *bio)
-@@ -559,7 +559,7 @@ static void do_reads(struct mirror_set *
+@@ -559,7 +559,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
*/
if (likely(region_in_sync(ms, region, 1)))
m = choose_mirror(ms, bio->bi_sector);
@@ -30301,7 +31036,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
m = NULL;
if (likely(m))
-@@ -937,7 +937,7 @@ static int get_mirror(struct mirror_set
+@@ -937,7 +937,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
}
ms->mirror[mirror].ms = ms;
@@ -30310,7 +31045,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
ms->mirror[mirror].error_type = 0;
ms->mirror[mirror].offset = offset;
-@@ -1347,7 +1347,7 @@ static void mirror_resume(struct dm_targ
+@@ -1347,7 +1347,7 @@ static void mirror_resume(struct dm_target *ti)
*/
static char device_status_char(struct mirror *m)
{
@@ -30319,9 +31054,10 @@ diff -urNp linux-3.1.4/drivers/md/dm-raid1.c linux-3.1.4/drivers/md/dm-raid1.c
return 'A';
return (test_bit(DM_RAID1_FLUSH_ERROR, &(m->error_type))) ? 'F' :
-diff -urNp linux-3.1.4/drivers/md/dm-stripe.c linux-3.1.4/drivers/md/dm-stripe.c
---- linux-3.1.4/drivers/md/dm-stripe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/dm-stripe.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
+index 3d80cf0..b77cc47 100644
+--- a/drivers/md/dm-stripe.c
++++ b/drivers/md/dm-stripe.c
@@ -20,7 +20,7 @@ struct stripe {
struct dm_dev *dev;
sector_t physical_start;
@@ -30331,7 +31067,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-stripe.c linux-3.1.4/drivers/md/dm-stripe.c
};
struct stripe_c {
-@@ -192,7 +192,7 @@ static int stripe_ctr(struct dm_target *
+@@ -192,7 +192,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
kfree(sc);
return r;
}
@@ -30340,7 +31076,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-stripe.c linux-3.1.4/drivers/md/dm-stripe.c
}
ti->private = sc;
-@@ -314,7 +314,7 @@ static int stripe_status(struct dm_targe
+@@ -314,7 +314,7 @@ static int stripe_status(struct dm_target *ti,
DMEMIT("%d ", sc->stripes);
for (i = 0; i < sc->stripes; i++) {
DMEMIT("%s ", sc->stripe[i].dev->name);
@@ -30349,7 +31085,7 @@ diff -urNp linux-3.1.4/drivers/md/dm-stripe.c linux-3.1.4/drivers/md/dm-stripe.c
'D' : 'A';
}
buffer[i] = '\0';
-@@ -361,8 +361,8 @@ static int stripe_end_io(struct dm_targe
+@@ -361,8 +361,8 @@ static int stripe_end_io(struct dm_target *ti, struct bio *bio,
*/
for (i = 0; i < sc->stripes; i++)
if (!strcmp(sc->stripe[i].dev->name, major_minor)) {
@@ -30360,10 +31096,11 @@ diff -urNp linux-3.1.4/drivers/md/dm-stripe.c linux-3.1.4/drivers/md/dm-stripe.c
DM_IO_ERROR_THRESHOLD)
schedule_work(&sc->trigger_event);
}
-diff -urNp linux-3.1.4/drivers/md/dm-table.c linux-3.1.4/drivers/md/dm-table.c
---- linux-3.1.4/drivers/md/dm-table.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/dm-table.c 2011-11-16 18:39:07.000000000 -0500
-@@ -389,7 +389,7 @@ static int device_area_is_invalid(struct
+diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
+index bc04518..7a83b81 100644
+--- a/drivers/md/dm-table.c
++++ b/drivers/md/dm-table.c
+@@ -389,7 +389,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
if (!dev_size)
return 0;
@@ -30372,9 +31109,68 @@ diff -urNp linux-3.1.4/drivers/md/dm-table.c linux-3.1.4/drivers/md/dm-table.c
DMWARN("%s: %s too small for target: "
"start=%llu, len=%llu, dev_size=%llu",
dm_device_name(ti->table->md), bdevname(bdev, b),
-diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
---- linux-3.1.4/drivers/md/md.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/md.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/md/dm.c b/drivers/md/dm.c
+index 52b39f3..83a8b6b 100644
+--- a/drivers/md/dm.c
++++ b/drivers/md/dm.c
+@@ -165,9 +165,9 @@ struct mapped_device {
+ /*
+ * Event handling.
+ */
+- atomic_t event_nr;
++ atomic_unchecked_t event_nr;
+ wait_queue_head_t eventq;
+- atomic_t uevent_seq;
++ atomic_unchecked_t uevent_seq;
+ struct list_head uevent_list;
+ spinlock_t uevent_lock; /* Protect access to uevent_list */
+
+@@ -1843,8 +1843,8 @@ static struct mapped_device *alloc_dev(int minor)
+ rwlock_init(&md->map_lock);
+ atomic_set(&md->holders, 1);
+ atomic_set(&md->open_count, 0);
+- atomic_set(&md->event_nr, 0);
+- atomic_set(&md->uevent_seq, 0);
++ atomic_set_unchecked(&md->event_nr, 0);
++ atomic_set_unchecked(&md->uevent_seq, 0);
+ INIT_LIST_HEAD(&md->uevent_list);
+ spin_lock_init(&md->uevent_lock);
+
+@@ -1978,7 +1978,7 @@ static void event_callback(void *context)
+
+ dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
+
+- atomic_inc(&md->event_nr);
++ atomic_inc_unchecked(&md->event_nr);
+ wake_up(&md->eventq);
+ }
+
+@@ -2614,18 +2614,18 @@ int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
+
+ uint32_t dm_next_uevent_seq(struct mapped_device *md)
+ {
+- return atomic_add_return(1, &md->uevent_seq);
++ return atomic_add_return_unchecked(1, &md->uevent_seq);
+ }
+
+ uint32_t dm_get_event_nr(struct mapped_device *md)
+ {
+- return atomic_read(&md->event_nr);
++ return atomic_read_unchecked(&md->event_nr);
+ }
+
+ int dm_wait_event(struct mapped_device *md, int event_nr)
+ {
+ return wait_event_interruptible(md->eventq,
+- (event_nr != atomic_read(&md->event_nr)));
++ (event_nr != atomic_read_unchecked(&md->event_nr)));
+ }
+
+ void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
+diff --git a/drivers/md/md.c b/drivers/md/md.c
+index 5c95ccb..217fa57 100644
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
@@ -280,10 +280,10 @@ EXPORT_SYMBOL_GPL(md_trim_bio);
* start build, activate spare
*/
@@ -30397,7 +31193,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
wake_up(&md_event_waiters);
}
-@@ -1531,7 +1531,7 @@ static int super_1_load(mdk_rdev_t *rdev
+@@ -1531,7 +1531,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
rdev->preferred_minor = 0xffff;
rdev->data_offset = le64_to_cpu(sb->data_offset);
@@ -30406,7 +31202,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
-@@ -1748,7 +1748,7 @@ static void super_1_sync(mddev_t *mddev,
+@@ -1748,7 +1748,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
else
sb->resync_offset = cpu_to_le64(0);
@@ -30415,7 +31211,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
sb->raid_disks = cpu_to_le32(mddev->raid_disks);
sb->size = cpu_to_le64(mddev->dev_sectors);
-@@ -2643,7 +2643,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_sho
+@@ -2643,7 +2643,7 @@ __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
static ssize_t
errors_show(mdk_rdev_t *rdev, char *page)
{
@@ -30424,7 +31220,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
}
static ssize_t
-@@ -2652,7 +2652,7 @@ errors_store(mdk_rdev_t *rdev, const cha
+@@ -2652,7 +2652,7 @@ errors_store(mdk_rdev_t *rdev, const char *buf, size_t len)
char *e;
unsigned long n = simple_strtoul(buf, &e, 10);
if (*buf && (*e == 0 || *e == '\n')) {
@@ -30444,7 +31240,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
INIT_LIST_HEAD(&rdev->same_set);
init_waitqueue_head(&rdev->blocked_wait);
-@@ -6667,7 +6667,7 @@ static int md_seq_show(struct seq_file *
+@@ -6667,7 +6667,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
spin_unlock(&pers_lock);
seq_printf(seq, "\n");
@@ -30453,7 +31249,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
return 0;
}
if (v == (void*)2) {
-@@ -6756,7 +6756,7 @@ static int md_seq_show(struct seq_file *
+@@ -6756,7 +6756,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
chunk_kb ? "KB" : "B");
if (bitmap->file) {
seq_printf(seq, ", file: ");
@@ -30462,7 +31258,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
}
seq_printf(seq, "\n");
-@@ -6787,7 +6787,7 @@ static int md_seq_open(struct inode *ino
+@@ -6787,7 +6787,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
return error;
seq = file->private_data;
@@ -30471,7 +31267,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
return error;
}
-@@ -6801,7 +6801,7 @@ static unsigned int mdstat_poll(struct f
+@@ -6801,7 +6801,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
/* always allow read */
mask = POLLIN | POLLRDNORM;
@@ -30480,7 +31276,7 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
mask |= POLLERR | POLLPRI;
return mask;
}
-@@ -6845,7 +6845,7 @@ static int is_mddev_idle(mddev_t *mddev,
+@@ -6845,7 +6845,7 @@ static int is_mddev_idle(mddev_t *mddev, int init)
struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
(int)part_stat_read(&disk->part0, sectors[1]) -
@@ -30489,9 +31285,10 @@ diff -urNp linux-3.1.4/drivers/md/md.c linux-3.1.4/drivers/md/md.c
/* sync IO will cause sync_io to increase before the disk_stats
* as sync_io is counted when a request starts, and
* disk_stats is counted when it completes.
-diff -urNp linux-3.1.4/drivers/md/md.h linux-3.1.4/drivers/md/md.h
---- linux-3.1.4/drivers/md/md.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/md.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/md/md.h b/drivers/md/md.h
+index 0a309dc..7e01d7f 100644
+--- a/drivers/md/md.h
++++ b/drivers/md/md.h
@@ -124,13 +124,13 @@ struct mdk_rdev_s
* only maintained for arrays that
* support hot removal
@@ -30508,7 +31305,7 @@ diff -urNp linux-3.1.4/drivers/md/md.h linux-3.1.4/drivers/md/md.h
* for reporting to userspace and storing
* in superblock.
*/
-@@ -415,7 +415,7 @@ static inline void rdev_dec_pending(mdk_
+@@ -415,7 +415,7 @@ static inline void rdev_dec_pending(mdk_rdev_t *rdev, mddev_t *mddev)
static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
{
@@ -30517,10 +31314,33 @@ diff -urNp linux-3.1.4/drivers/md/md.h linux-3.1.4/drivers/md/md.h
}
struct mdk_personality
-diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
---- linux-3.1.4/drivers/md/raid10.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/raid10.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1423,7 +1423,7 @@ static void end_sync_read(struct bio *bi
+diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
+index d9587df..83a0dc3 100644
+--- a/drivers/md/raid1.c
++++ b/drivers/md/raid1.c
+@@ -1541,7 +1541,7 @@ static int fix_sync_read_error(r1bio_t *r1_bio)
+ if (r1_sync_page_io(rdev, sect, s,
+ bio->bi_io_vec[idx].bv_page,
+ READ) != 0)
+- atomic_add(s, &rdev->corrected_errors);
++ atomic_add_unchecked(s, &rdev->corrected_errors);
+ }
+ sectors -= s;
+ sect += s;
+@@ -1754,7 +1754,7 @@ static void fix_read_error(conf_t *conf, int read_disk,
+ test_bit(In_sync, &rdev->flags)) {
+ if (r1_sync_page_io(rdev, sect, s,
+ conf->tmppage, READ)) {
+- atomic_add(s, &rdev->corrected_errors);
++ atomic_add_unchecked(s, &rdev->corrected_errors);
+ printk(KERN_INFO
+ "md/raid1:%s: read error corrected "
+ "(%d sectors at %llu on %s)\n",
+diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
+index 1d44228..98db57d 100644
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -1423,7 +1423,7 @@ static void end_sync_read(struct bio *bio, int error)
/* The write handler will notice the lack of
* R10BIO_Uptodate and record any errors etc
*/
@@ -30529,7 +31349,7 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
&conf->mirrors[d].rdev->corrected_errors);
/* for reconstruct, we always reschedule after a read.
-@@ -1723,7 +1723,7 @@ static void check_decay_read_errors(mdde
+@@ -1723,7 +1723,7 @@ static void check_decay_read_errors(mddev_t *mddev, mdk_rdev_t *rdev)
{
struct timespec cur_time_mon;
unsigned long hours_since_last;
@@ -30538,7 +31358,7 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
ktime_get_ts(&cur_time_mon);
-@@ -1745,9 +1745,9 @@ static void check_decay_read_errors(mdde
+@@ -1745,9 +1745,9 @@ static void check_decay_read_errors(mddev_t *mddev, mdk_rdev_t *rdev)
* overflowing the shift of read_errors by hours_since_last.
*/
if (hours_since_last >= 8 * sizeof(read_errors))
@@ -30550,7 +31370,7 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
}
static int r10_sync_page_io(mdk_rdev_t *rdev, sector_t sector,
-@@ -1797,8 +1797,8 @@ static void fix_read_error(conf_t *conf,
+@@ -1797,8 +1797,8 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
return;
check_decay_read_errors(mddev, rdev);
@@ -30561,7 +31381,7 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
char b[BDEVNAME_SIZE];
bdevname(rdev->bdev, b);
-@@ -1806,7 +1806,7 @@ static void fix_read_error(conf_t *conf,
+@@ -1806,7 +1806,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
"md/raid10:%s: %s: Raid device exceeded "
"read_error threshold [cur %d:max %d]\n",
mdname(mddev), b,
@@ -30570,7 +31390,7 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
printk(KERN_NOTICE
"md/raid10:%s: %s: Failing raid device\n",
mdname(mddev), b);
-@@ -1951,7 +1951,7 @@ static void fix_read_error(conf_t *conf,
+@@ -1951,7 +1951,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
(unsigned long long)(
sect + rdev->data_offset),
bdevname(rdev->bdev, b));
@@ -30579,31 +31399,11 @@ diff -urNp linux-3.1.4/drivers/md/raid10.c linux-3.1.4/drivers/md/raid10.c
}
rdev_dec_pending(rdev, mddev);
-diff -urNp linux-3.1.4/drivers/md/raid1.c linux-3.1.4/drivers/md/raid1.c
---- linux-3.1.4/drivers/md/raid1.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/raid1.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1541,7 +1541,7 @@ static int fix_sync_read_error(r1bio_t *
- if (r1_sync_page_io(rdev, sect, s,
- bio->bi_io_vec[idx].bv_page,
- READ) != 0)
-- atomic_add(s, &rdev->corrected_errors);
-+ atomic_add_unchecked(s, &rdev->corrected_errors);
- }
- sectors -= s;
- sect += s;
-@@ -1754,7 +1754,7 @@ static void fix_read_error(conf_t *conf,
- test_bit(In_sync, &rdev->flags)) {
- if (r1_sync_page_io(rdev, sect, s,
- conf->tmppage, READ)) {
-- atomic_add(s, &rdev->corrected_errors);
-+ atomic_add_unchecked(s, &rdev->corrected_errors);
- printk(KERN_INFO
- "md/raid1:%s: read error corrected "
- "(%d sectors at %llu on %s)\n",
-diff -urNp linux-3.1.4/drivers/md/raid5.c linux-3.1.4/drivers/md/raid5.c
---- linux-3.1.4/drivers/md/raid5.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/md/raid5.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1616,19 +1616,19 @@ static void raid5_end_read_request(struc
+diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
+index b6200c3..02e8702 100644
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -1616,19 +1616,19 @@ static void raid5_end_read_request(struct bio * bi, int error)
(unsigned long long)(sh->sector
+ rdev->data_offset),
bdevname(rdev->bdev, b));
@@ -30627,7 +31427,7 @@ diff -urNp linux-3.1.4/drivers/md/raid5.c linux-3.1.4/drivers/md/raid5.c
if (conf->mddev->degraded >= conf->max_degraded)
printk_ratelimited(
KERN_WARNING
-@@ -1648,7 +1648,7 @@ static void raid5_end_read_request(struc
+@@ -1648,7 +1648,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
(unsigned long long)(sh->sector
+ rdev->data_offset),
bdn);
@@ -30636,7 +31436,7 @@ diff -urNp linux-3.1.4/drivers/md/raid5.c linux-3.1.4/drivers/md/raid5.c
> conf->max_nr_stripes)
printk(KERN_WARNING
"md/raid:%s: Too many read errors, failing device %s.\n",
-@@ -1978,6 +1978,7 @@ static sector_t compute_blocknr(struct s
+@@ -1978,6 +1978,7 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
sector_t r_sector;
struct stripe_head sh2;
@@ -30644,10 +31444,11 @@ diff -urNp linux-3.1.4/drivers/md/raid5.c linux-3.1.4/drivers/md/raid5.c
chunk_offset = sector_div(new_sector, sectors_per_chunk);
stripe = new_sector;
-diff -urNp linux-3.1.4/drivers/media/common/saa7146_hlp.c linux-3.1.4/drivers/media/common/saa7146_hlp.c
---- linux-3.1.4/drivers/media/common/saa7146_hlp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/common/saa7146_hlp.c 2011-11-16 18:40:10.000000000 -0500
-@@ -353,6 +353,8 @@ static void calculate_clipping_registers
+diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c
+index 1d1d8d2..6c6837a 100644
+--- a/drivers/media/common/saa7146_hlp.c
++++ b/drivers/media/common/saa7146_hlp.c
+@@ -353,6 +353,8 @@ static void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct sa
int x[32], y[32], w[32], h[32];
@@ -30656,9 +31457,10 @@ diff -urNp linux-3.1.4/drivers/media/common/saa7146_hlp.c linux-3.1.4/drivers/me
/* clear out memory */
memset(&line_list[0], 0x00, sizeof(u32)*32);
memset(&pixel_list[0], 0x00, sizeof(u32)*32);
-diff -urNp linux-3.1.4/drivers/media/dvb/ddbridge/ddbridge-core.c linux-3.1.4/drivers/media/dvb/ddbridge/ddbridge-core.c
---- linux-3.1.4/drivers/media/dvb/ddbridge/ddbridge-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/ddbridge/ddbridge-core.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c
+index 573d540..16f78f3 100644
+--- a/drivers/media/dvb/ddbridge/ddbridge-core.c
++++ b/drivers/media/dvb/ddbridge/ddbridge-core.c
@@ -1675,7 +1675,7 @@ static struct ddb_info ddb_v6 = {
.subvendor = _subvend, .subdevice = _subdev, \
.driver_data = (unsigned long)&_driverdata }
@@ -30668,10 +31470,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/ddbridge/ddbridge-core.c linux-3.1.4/dr
DDB_ID(DDVID, 0x0002, DDVID, 0x0001, ddb_octopus),
DDB_ID(DDVID, 0x0003, DDVID, 0x0001, ddb_octopus),
DDB_ID(DDVID, 0x0003, DDVID, 0x0002, ddb_octopus_le),
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
---- linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2011-11-16 18:40:10.000000000 -0500
-@@ -590,6 +590,8 @@ static int dvb_ca_en50221_read_data(stru
+diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+index 7ea517b..252fe54 100644
+--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
++++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+@@ -590,6 +590,8 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * eb
u8 buf[HOST_LINK_BUF_SIZE];
int i;
@@ -30680,7 +31483,7 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-3.1.4/d
dprintk("%s\n", __func__);
/* check if we have space for a link buf in the rx_buffer */
-@@ -1285,6 +1287,8 @@ static ssize_t dvb_ca_en50221_io_write(s
+@@ -1285,6 +1287,8 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
unsigned long timeout;
int written;
@@ -30689,9 +31492,10 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-3.1.4/d
dprintk("%s\n", __func__);
/* Incoming packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvb_demux.h linux-3.1.4/drivers/media/dvb/dvb-core/dvb_demux.h
---- linux-3.1.4/drivers/media/dvb/dvb-core/dvb_demux.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-core/dvb_demux.h 2011-11-17 18:34:32.000000000 -0500
+diff --git a/drivers/media/dvb/dvb-core/dvb_demux.h b/drivers/media/dvb/dvb-core/dvb_demux.h
+index a7d876f..8c21b61 100644
+--- a/drivers/media/dvb/dvb-core/dvb_demux.h
++++ b/drivers/media/dvb/dvb-core/dvb_demux.h
@@ -73,7 +73,7 @@ struct dvb_demux_feed {
union {
dmx_ts_cb ts;
@@ -30701,10 +31505,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvb_demux.h linux-3.1.4/driver
struct dvb_demux *demux;
void *priv;
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvbdev.c linux-3.1.4/drivers/media/dvb/dvb-core/dvbdev.c
---- linux-3.1.4/drivers/media/dvb/dvb-core/dvbdev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-core/dvbdev.c 2011-11-16 18:39:07.000000000 -0500
-@@ -192,7 +192,7 @@ int dvb_register_device(struct dvb_adapt
+diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
+index f732877..d38c35a 100644
+--- a/drivers/media/dvb/dvb-core/dvbdev.c
++++ b/drivers/media/dvb/dvb-core/dvbdev.c
+@@ -192,7 +192,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
const struct dvb_device *template, void *priv, int type)
{
struct dvb_device *dvbdev;
@@ -30713,10 +31518,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-core/dvbdev.c linux-3.1.4/drivers/m
struct device *clsdev;
int minor;
int id;
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/cxusb.c linux-3.1.4/drivers/media/dvb/dvb-usb/cxusb.c
---- linux-3.1.4/drivers/media/dvb/dvb-usb/cxusb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-usb/cxusb.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1059,7 +1059,7 @@ static struct dib0070_config dib7070p_di
+diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
+index acb5fb2..2413f1d 100644
+--- a/drivers/media/dvb/dvb-usb/cxusb.c
++++ b/drivers/media/dvb/dvb-usb/cxusb.c
+@@ -1059,7 +1059,7 @@ static struct dib0070_config dib7070p_dib0070_config = {
struct dib0700_adapter_state {
int (*set_param_save) (struct dvb_frontend *,
struct dvb_frontend_parameters *);
@@ -30725,10 +31531,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/cxusb.c linux-3.1.4/drivers/med
static int dib7070_set_param_override(struct dvb_frontend *fe,
struct dvb_frontend_parameters *fep)
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/dib0700_core.c linux-3.1.4/drivers/media/dvb/dvb-usb/dib0700_core.c
---- linux-3.1.4/drivers/media/dvb/dvb-usb/dib0700_core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-usb/dib0700_core.c 2011-11-16 18:40:10.000000000 -0500
-@@ -478,6 +478,8 @@ int dib0700_download_firmware(struct usb
+diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
+index a224e94..503b76a 100644
+--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
++++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
+@@ -478,6 +478,8 @@ int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw
if (!buf)
return -ENOMEM;
@@ -30737,9 +31544,10 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/dib0700_core.c linux-3.1.4/driv
while ((ret = dvb_usb_get_hexline(fw, &hx, &pos)) > 0) {
deb_fwdata("writing to address 0x%08x (buffer: 0x%02x %02x)\n",
hx.addr, hx.len, hx.chk);
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/dw2102.c linux-3.1.4/drivers/media/dvb/dvb-usb/dw2102.c
---- linux-3.1.4/drivers/media/dvb/dvb-usb/dw2102.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-usb/dw2102.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
+index 058b231..183d2b3 100644
+--- a/drivers/media/dvb/dvb-usb/dw2102.c
++++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -95,7 +95,7 @@ struct su3000_state {
struct s6x0_state {
@@ -30749,10 +31557,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/dw2102.c linux-3.1.4/drivers/me
/* debug */
static int dvb_usb_dw2102_debug;
-diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c
---- linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c 2011-11-16 18:40:10.000000000 -0500
-@@ -742,6 +742,7 @@ static int lme2510_download_firmware(str
+diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c
+index 37b1469..28a6f6f 100644
+--- a/drivers/media/dvb/dvb-usb/lmedm04.c
++++ b/drivers/media/dvb/dvb-usb/lmedm04.c
+@@ -742,6 +742,7 @@ static int lme2510_download_firmware(struct usb_device *dev,
usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
0x06, 0x80, 0x0200, 0x00, data, 0x0109, 1000);
@@ -30760,7 +31569,7 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c linux-3.1.4/drivers/m
data[0] = 0x8a;
len_in = 1;
-@@ -764,6 +765,8 @@ static void lme_coldreset(struct usb_dev
+@@ -764,6 +765,8 @@ static void lme_coldreset(struct usb_device *dev)
int ret = 0, len_in;
u8 data[512] = {0};
@@ -30769,9 +31578,10 @@ diff -urNp linux-3.1.4/drivers/media/dvb/dvb-usb/lmedm04.c linux-3.1.4/drivers/m
data[0] = 0x0a;
len_in = 1;
info("FRM Firmware Cold Reset");
-diff -urNp linux-3.1.4/drivers/media/dvb/frontends/dib3000.h linux-3.1.4/drivers/media/dvb/frontends/dib3000.h
---- linux-3.1.4/drivers/media/dvb/frontends/dib3000.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/frontends/dib3000.h 2011-11-17 18:38:05.000000000 -0500
+diff --git a/drivers/media/dvb/frontends/dib3000.h b/drivers/media/dvb/frontends/dib3000.h
+index ba91735..4261d84 100644
+--- a/drivers/media/dvb/frontends/dib3000.h
++++ b/drivers/media/dvb/frontends/dib3000.h
@@ -39,7 +39,7 @@ struct dib_fe_xfer_ops
int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
@@ -30781,10 +31591,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/frontends/dib3000.h linux-3.1.4/drivers
#if defined(CONFIG_DVB_DIB3000MB) || (defined(CONFIG_DVB_DIB3000MB_MODULE) && defined(MODULE))
extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
-diff -urNp linux-3.1.4/drivers/media/dvb/frontends/mb86a16.c linux-3.1.4/drivers/media/dvb/frontends/mb86a16.c
---- linux-3.1.4/drivers/media/dvb/frontends/mb86a16.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/frontends/mb86a16.c 2011-11-16 18:40:10.000000000 -0500
-@@ -1060,6 +1060,8 @@ static int mb86a16_set_fe(struct mb86a16
+diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c
+index c283112..7f367a7 100644
+--- a/drivers/media/dvb/frontends/mb86a16.c
++++ b/drivers/media/dvb/frontends/mb86a16.c
+@@ -1060,6 +1060,8 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
int ret = -1;
int sync;
@@ -30793,10 +31604,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/frontends/mb86a16.c linux-3.1.4/drivers
dprintk(verbose, MB86A16_INFO, 1, "freq=%d Mhz, symbrt=%d Ksps", state->frequency, state->srate);
fcp = 3000;
-diff -urNp linux-3.1.4/drivers/media/dvb/frontends/or51211.c linux-3.1.4/drivers/media/dvb/frontends/or51211.c
---- linux-3.1.4/drivers/media/dvb/frontends/or51211.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/frontends/or51211.c 2011-11-16 18:40:10.000000000 -0500
-@@ -113,6 +113,8 @@ static int or51211_load_firmware (struct
+diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c
+index c709ce6..b3fe620 100644
+--- a/drivers/media/dvb/frontends/or51211.c
++++ b/drivers/media/dvb/frontends/or51211.c
+@@ -113,6 +113,8 @@ static int or51211_load_firmware (struct dvb_frontend* fe,
u8 tudata[585];
int i;
@@ -30805,10 +31617,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/frontends/or51211.c linux-3.1.4/drivers
dprintk("Firmware is %zd bytes\n",fw->size);
/* Get eprom data */
-diff -urNp linux-3.1.4/drivers/media/dvb/ngene/ngene-cards.c linux-3.1.4/drivers/media/dvb/ngene/ngene-cards.c
---- linux-3.1.4/drivers/media/dvb/ngene/ngene-cards.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/dvb/ngene/ngene-cards.c 2011-11-16 18:39:07.000000000 -0500
-@@ -477,7 +477,7 @@ static struct ngene_info ngene_info_m780
+diff --git a/drivers/media/dvb/ngene/ngene-cards.c b/drivers/media/dvb/ngene/ngene-cards.c
+index 0564192..75b16f5 100644
+--- a/drivers/media/dvb/ngene/ngene-cards.c
++++ b/drivers/media/dvb/ngene/ngene-cards.c
+@@ -477,7 +477,7 @@ static struct ngene_info ngene_info_m780 = {
/****************************************************************************/
@@ -30817,10 +31630,11 @@ diff -urNp linux-3.1.4/drivers/media/dvb/ngene/ngene-cards.c linux-3.1.4/drivers
NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2),
NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2),
NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2),
-diff -urNp linux-3.1.4/drivers/media/radio/radio-cadet.c linux-3.1.4/drivers/media/radio/radio-cadet.c
---- linux-3.1.4/drivers/media/radio/radio-cadet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/radio/radio-cadet.c 2011-11-16 18:39:07.000000000 -0500
-@@ -326,6 +326,8 @@ static ssize_t cadet_read(struct file *f
+diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
+index 16a089f..ab1667d 100644
+--- a/drivers/media/radio/radio-cadet.c
++++ b/drivers/media/radio/radio-cadet.c
+@@ -326,6 +326,8 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
unsigned char readbuf[RDS_BUFFER];
int i = 0;
@@ -30829,9 +31643,10 @@ diff -urNp linux-3.1.4/drivers/media/radio/radio-cadet.c linux-3.1.4/drivers/med
mutex_lock(&dev->lock);
if (dev->rdsstat == 0) {
dev->rdsstat = 1;
-diff -urNp linux-3.1.4/drivers/media/video/au0828/au0828.h linux-3.1.4/drivers/media/video/au0828/au0828.h
---- linux-3.1.4/drivers/media/video/au0828/au0828.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/au0828/au0828.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h
+index 9cde353..8c6a1c3 100644
+--- a/drivers/media/video/au0828/au0828.h
++++ b/drivers/media/video/au0828/au0828.h
@@ -191,7 +191,7 @@ struct au0828_dev {
/* I2C */
@@ -30841,10 +31656,11 @@ diff -urNp linux-3.1.4/drivers/media/video/au0828/au0828.h linux-3.1.4/drivers/m
struct i2c_client i2c_client;
u32 i2c_rc;
-diff -urNp linux-3.1.4/drivers/media/video/cx18/cx18-driver.c linux-3.1.4/drivers/media/video/cx18/cx18-driver.c
---- linux-3.1.4/drivers/media/video/cx18/cx18-driver.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/cx18/cx18-driver.c 2011-11-16 18:40:10.000000000 -0500
-@@ -327,6 +327,8 @@ void cx18_read_eeprom(struct cx18 *cx, s
+diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
+index 9e2f870..22e3a08 100644
+--- a/drivers/media/video/cx18/cx18-driver.c
++++ b/drivers/media/video/cx18/cx18-driver.c
+@@ -327,6 +327,8 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
struct i2c_client c;
u8 eedata[256];
@@ -30853,10 +31669,11 @@ diff -urNp linux-3.1.4/drivers/media/video/cx18/cx18-driver.c linux-3.1.4/driver
memset(&c, 0, sizeof(c));
strlcpy(c.name, "cx18 tveeprom tmp", sizeof(c.name));
c.adapter = &cx->i2c_adap[0];
-diff -urNp linux-3.1.4/drivers/media/video/cx23885/cx23885-input.c linux-3.1.4/drivers/media/video/cx23885/cx23885-input.c
---- linux-3.1.4/drivers/media/video/cx23885/cx23885-input.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/cx23885/cx23885-input.c 2011-11-16 18:40:10.000000000 -0500
-@@ -53,6 +53,8 @@ static void cx23885_input_process_measur
+diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
+index ce765e3..f9e1b04 100644
+--- a/drivers/media/video/cx23885/cx23885-input.c
++++ b/drivers/media/video/cx23885/cx23885-input.c
+@@ -53,6 +53,8 @@ static void cx23885_input_process_measurements(struct cx23885_dev *dev,
bool handle = false;
struct ir_raw_event ir_core_event[64];
@@ -30865,10 +31682,11 @@ diff -urNp linux-3.1.4/drivers/media/video/cx23885/cx23885-input.c linux-3.1.4/d
do {
num = 0;
v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) ir_core_event,
-diff -urNp linux-3.1.4/drivers/media/video/cx88/cx88-alsa.c linux-3.1.4/drivers/media/video/cx88/cx88-alsa.c
---- linux-3.1.4/drivers/media/video/cx88/cx88-alsa.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/cx88/cx88-alsa.c 2011-11-16 18:39:07.000000000 -0500
-@@ -766,7 +766,7 @@ static struct snd_kcontrol_new snd_cx88_
+diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
+index 68d1240..46b32eb 100644
+--- a/drivers/media/video/cx88/cx88-alsa.c
++++ b/drivers/media/video/cx88/cx88-alsa.c
+@@ -766,7 +766,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = {
* Only boards with eeprom and byte 1 at eeprom=1 have it
*/
@@ -30877,10 +31695,11 @@ diff -urNp linux-3.1.4/drivers/media/video/cx88/cx88-alsa.c linux-3.1.4/drivers/
{0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0, }
-diff -urNp linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-eeprom.c linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
---- linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-eeprom.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-eeprom.c 2011-11-16 18:40:10.000000000 -0500
-@@ -120,6 +120,8 @@ int pvr2_eeprom_analyze(struct pvr2_hdw
+diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+index 9515f3a..c9ecb85 100644
+--- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+@@ -120,6 +120,8 @@ int pvr2_eeprom_analyze(struct pvr2_hdw *hdw)
u8 *eeprom;
struct tveeprom tvdata;
@@ -30889,9 +31708,10 @@ diff -urNp linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-eeprom.c linux-3.1.4/
memset(&tvdata,0,sizeof(tvdata));
eeprom = pvr2_eeprom_fetch(hdw);
-diff -urNp linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
---- linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+index 305e6aa..0143317 100644
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -196,7 +196,7 @@ struct pvr2_hdw {
/* I2C stuff */
@@ -30901,10 +31721,11 @@ diff -urNp linux-3.1.4/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h linux-
pvr2_i2c_func i2c_func[PVR2_I2C_FUNC_CNT];
int i2c_cx25840_hack_state;
int i2c_linked;
-diff -urNp linux-3.1.4/drivers/media/video/saa7134/saa6752hs.c linux-3.1.4/drivers/media/video/saa7134/saa6752hs.c
---- linux-3.1.4/drivers/media/video/saa7134/saa6752hs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/saa7134/saa6752hs.c 2011-11-16 18:40:10.000000000 -0500
-@@ -682,6 +682,8 @@ static int saa6752hs_init(struct v4l2_su
+diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c
+index f9f29cc..5a2e330 100644
+--- a/drivers/media/video/saa7134/saa6752hs.c
++++ b/drivers/media/video/saa7134/saa6752hs.c
+@@ -682,6 +682,8 @@ static int saa6752hs_init(struct v4l2_subdev *sd, u32 leading_null_bytes)
unsigned char localPAT[256];
unsigned char localPMT[256];
@@ -30913,10 +31734,11 @@ diff -urNp linux-3.1.4/drivers/media/video/saa7134/saa6752hs.c linux-3.1.4/drive
/* Set video format - must be done first as it resets other settings */
set_reg8(client, 0x41, h->video_format);
-diff -urNp linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c
---- linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c 2011-11-16 18:40:10.000000000 -0500
-@@ -88,6 +88,8 @@ int saa7164_irq_dequeue(struct saa7164_d
+diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c
+index 62fac7f..f29e0b9 100644
+--- a/drivers/media/video/saa7164/saa7164-cmd.c
++++ b/drivers/media/video/saa7164/saa7164-cmd.c
+@@ -88,6 +88,8 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev)
u8 tmp[512];
dprintk(DBGLVL_CMD, "%s()\n", __func__);
@@ -30925,7 +31747,7 @@ diff -urNp linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c linux-3.1.4/dri
/* While any outstand message on the bus exists... */
do {
-@@ -141,6 +143,8 @@ int saa7164_cmd_dequeue(struct saa7164_d
+@@ -141,6 +143,8 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev)
u8 tmp[512];
dprintk(DBGLVL_CMD, "%s()\n", __func__);
@@ -30934,10 +31756,11 @@ diff -urNp linux-3.1.4/drivers/media/video/saa7164/saa7164-cmd.c linux-3.1.4/dri
while (loop) {
struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
-diff -urNp linux-3.1.4/drivers/media/video/timblogiw.c linux-3.1.4/drivers/media/video/timblogiw.c
---- linux-3.1.4/drivers/media/video/timblogiw.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/timblogiw.c 2011-11-17 18:36:32.000000000 -0500
-@@ -744,7 +744,7 @@ static int timblogiw_mmap(struct file *f
+diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
+index 84cd1b6..f741e07 100644
+--- a/drivers/media/video/timblogiw.c
++++ b/drivers/media/video/timblogiw.c
+@@ -744,7 +744,7 @@ static int timblogiw_mmap(struct file *file, struct vm_area_struct *vma)
/* Platform device functions */
@@ -30946,7 +31769,7 @@ diff -urNp linux-3.1.4/drivers/media/video/timblogiw.c linux-3.1.4/drivers/media
.vidioc_querycap = timblogiw_querycap,
.vidioc_enum_fmt_vid_cap = timblogiw_enum_fmt,
.vidioc_g_fmt_vid_cap = timblogiw_g_fmt,
-@@ -766,7 +766,7 @@ static __devinitconst struct v4l2_ioctl_
+@@ -766,7 +766,7 @@ static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
.vidioc_enum_framesizes = timblogiw_enum_framesizes,
};
@@ -30955,10 +31778,11 @@ diff -urNp linux-3.1.4/drivers/media/video/timblogiw.c linux-3.1.4/drivers/media
.owner = THIS_MODULE,
.open = timblogiw_open,
.release = timblogiw_close,
-diff -urNp linux-3.1.4/drivers/media/video/usbvision/usbvision-core.c linux-3.1.4/drivers/media/video/usbvision/usbvision-core.c
---- linux-3.1.4/drivers/media/video/usbvision/usbvision-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/usbvision/usbvision-core.c 2011-11-16 18:40:10.000000000 -0500
-@@ -707,6 +707,8 @@ static enum parse_state usbvision_parse_
+diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
+index f344411..6ae9974 100644
+--- a/drivers/media/video/usbvision/usbvision-core.c
++++ b/drivers/media/video/usbvision/usbvision-core.c
+@@ -707,6 +707,8 @@ static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision
unsigned char rv, gv, bv;
static unsigned char *Y, *U, *V;
@@ -30967,9 +31791,10 @@ diff -urNp linux-3.1.4/drivers/media/video/usbvision/usbvision-core.c linux-3.1.
frame = usbvision->cur_frame;
image_size = frame->frmwidth * frame->frmheight;
if ((frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) ||
-diff -urNp linux-3.1.4/drivers/media/video/videobuf-dma-sg.c linux-3.1.4/drivers/media/video/videobuf-dma-sg.c
---- linux-3.1.4/drivers/media/video/videobuf-dma-sg.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/media/video/videobuf-dma-sg.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
+index f300dea..04834ba 100644
+--- a/drivers/media/video/videobuf-dma-sg.c
++++ b/drivers/media/video/videobuf-dma-sg.c
@@ -607,6 +607,8 @@ void *videobuf_sg_alloc(size_t size)
{
struct videobuf_queue q;
@@ -30979,10 +31804,11 @@ diff -urNp linux-3.1.4/drivers/media/video/videobuf-dma-sg.c linux-3.1.4/drivers
/* Required to make generic handler to call __videobuf_alloc */
q.int_ops = &sg_ops;
-diff -urNp linux-3.1.4/drivers/message/fusion/mptbase.c linux-3.1.4/drivers/message/fusion/mptbase.c
---- linux-3.1.4/drivers/message/fusion/mptbase.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/fusion/mptbase.c 2011-11-16 18:40:10.000000000 -0500
-@@ -6681,8 +6681,13 @@ static int mpt_iocinfo_proc_show(struct
+diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
+index 7956a10..f39232f 100644
+--- a/drivers/message/fusion/mptbase.c
++++ b/drivers/message/fusion/mptbase.c
+@@ -6681,8 +6681,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
@@ -30996,10 +31822,11 @@ diff -urNp linux-3.1.4/drivers/message/fusion/mptbase.c linux-3.1.4/drivers/mess
/*
* Rounding UP to nearest 4-kB boundary here...
*/
-diff -urNp linux-3.1.4/drivers/message/fusion/mptsas.c linux-3.1.4/drivers/message/fusion/mptsas.c
---- linux-3.1.4/drivers/message/fusion/mptsas.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/fusion/mptsas.c 2011-11-16 18:39:07.000000000 -0500
-@@ -439,6 +439,23 @@ mptsas_is_end_device(struct mptsas_devin
+diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
+index 7596aec..f7ae9aa 100644
+--- a/drivers/message/fusion/mptsas.c
++++ b/drivers/message/fusion/mptsas.c
+@@ -439,6 +439,23 @@ mptsas_is_end_device(struct mptsas_devinfo * attached)
return 0;
}
@@ -31023,7 +31850,7 @@ diff -urNp linux-3.1.4/drivers/message/fusion/mptsas.c linux-3.1.4/drivers/messa
/* no mutex */
static void
mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details)
-@@ -477,23 +494,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *p
+@@ -477,23 +494,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *phy_info)
return NULL;
}
@@ -31047,9 +31874,10 @@ diff -urNp linux-3.1.4/drivers/message/fusion/mptsas.c linux-3.1.4/drivers/messa
static inline struct sas_port *
mptsas_get_port(struct mptsas_phyinfo *phy_info)
{
-diff -urNp linux-3.1.4/drivers/message/fusion/mptscsih.c linux-3.1.4/drivers/message/fusion/mptscsih.c
---- linux-3.1.4/drivers/message/fusion/mptscsih.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/fusion/mptscsih.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
+index ce61a57..3da8862 100644
+--- a/drivers/message/fusion/mptscsih.c
++++ b/drivers/message/fusion/mptscsih.c
@@ -1268,15 +1268,16 @@ mptscsih_info(struct Scsi_Host *SChost)
h = shost_priv(SChost);
@@ -31075,10 +31903,11 @@ diff -urNp linux-3.1.4/drivers/message/fusion/mptscsih.c linux-3.1.4/drivers/mes
return h->info_kbuf;
}
-diff -urNp linux-3.1.4/drivers/message/i2o/i2o_config.c linux-3.1.4/drivers/message/i2o/i2o_config.c
---- linux-3.1.4/drivers/message/i2o/i2o_config.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/i2o/i2o_config.c 2011-11-16 18:40:10.000000000 -0500
-@@ -781,6 +781,8 @@ static int i2o_cfg_passthru(unsigned lon
+diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
+index 098de2b..fbb922c 100644
+--- a/drivers/message/i2o/i2o_config.c
++++ b/drivers/message/i2o/i2o_config.c
+@@ -781,6 +781,8 @@ static int i2o_cfg_passthru(unsigned long arg)
struct i2o_message *msg;
unsigned int iop;
@@ -31087,9 +31916,10 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_config.c linux-3.1.4/drivers/mess
if (get_user(iop, &cmd->iop) || get_user(user_msg, &cmd->msg))
return -EFAULT;
-diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/message/i2o/i2o_proc.c
---- linux-3.1.4/drivers/message/i2o/i2o_proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/i2o/i2o_proc.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
+index 07dbeaf..5533142 100644
+--- a/drivers/message/i2o/i2o_proc.c
++++ b/drivers/message/i2o/i2o_proc.c
@@ -255,13 +255,6 @@ static char *scsi_devices[] = {
"Array Controller Device"
};
@@ -31104,7 +31934,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
static int i2o_report_query_status(struct seq_file *seq, int block_status,
char *group)
{
-@@ -838,8 +831,7 @@ static int i2o_seq_show_ddm_table(struct
+@@ -838,8 +831,7 @@ static int i2o_seq_show_ddm_table(struct seq_file *seq, void *v)
seq_printf(seq, "%-#7x", ddm_table.i2o_vendor_id);
seq_printf(seq, "%-#8x", ddm_table.module_id);
@@ -31114,7 +31944,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
seq_printf(seq, "%9d ", ddm_table.data_size);
seq_printf(seq, "%8d", ddm_table.code_size);
-@@ -940,8 +932,8 @@ static int i2o_seq_show_drivers_stored(s
+@@ -940,8 +932,8 @@ static int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v)
seq_printf(seq, "%-#7x", dst->i2o_vendor_id);
seq_printf(seq, "%-#8x", dst->module_id);
@@ -31125,7 +31955,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
seq_printf(seq, "%8d ", dst->module_size);
seq_printf(seq, "%8d ", dst->mpb_size);
seq_printf(seq, "0x%04x", dst->module_flags);
-@@ -1272,14 +1264,10 @@ static int i2o_seq_show_dev_identity(str
+@@ -1272,14 +1264,10 @@ static int i2o_seq_show_dev_identity(struct seq_file *seq, void *v)
seq_printf(seq, "Device Class : %s\n", i2o_get_class_name(work16[0]));
seq_printf(seq, "Owner TID : %0#5x\n", work16[2]);
seq_printf(seq, "Parent TID : %0#5x\n", work16[3]);
@@ -31144,7 +31974,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
seq_printf(seq, "Serial number : ");
print_serial_number(seq, (u8 *) (work32 + 16),
-@@ -1324,10 +1312,8 @@ static int i2o_seq_show_ddm_identity(str
+@@ -1324,10 +1312,8 @@ static int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v)
}
seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid);
@@ -31157,7 +31987,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
seq_printf(seq, "Serial number : ");
print_serial_number(seq, result.serial_number, sizeof(result) - 36);
-@@ -1358,14 +1344,10 @@ static int i2o_seq_show_uinfo(struct seq
+@@ -1358,14 +1344,10 @@ static int i2o_seq_show_uinfo(struct seq_file *seq, void *v)
return 0;
}
@@ -31176,10 +32006,11 @@ diff -urNp linux-3.1.4/drivers/message/i2o/i2o_proc.c linux-3.1.4/drivers/messag
return 0;
}
-diff -urNp linux-3.1.4/drivers/message/i2o/iop.c linux-3.1.4/drivers/message/i2o/iop.c
---- linux-3.1.4/drivers/message/i2o/iop.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/message/i2o/iop.c 2011-11-16 18:39:07.000000000 -0500
-@@ -111,10 +111,10 @@ u32 i2o_cntxt_list_add(struct i2o_contro
+diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
+index a8c08f3..155fe3d 100644
+--- a/drivers/message/i2o/iop.c
++++ b/drivers/message/i2o/iop.c
+@@ -111,10 +111,10 @@ u32 i2o_cntxt_list_add(struct i2o_controller * c, void *ptr)
spin_lock_irqsave(&c->context_list_lock, flags);
@@ -31193,7 +32024,7 @@ diff -urNp linux-3.1.4/drivers/message/i2o/iop.c linux-3.1.4/drivers/message/i2o
list_add(&entry->list, &c->context_list);
-@@ -1077,7 +1077,7 @@ struct i2o_controller *i2o_iop_alloc(voi
+@@ -1077,7 +1077,7 @@ struct i2o_controller *i2o_iop_alloc(void)
#if BITS_PER_LONG == 64
spin_lock_init(&c->context_list_lock);
@@ -31202,9 +32033,10 @@ diff -urNp linux-3.1.4/drivers/message/i2o/iop.c linux-3.1.4/drivers/message/i2o
INIT_LIST_HEAD(&c->context_list);
#endif
-diff -urNp linux-3.1.4/drivers/mfd/ab3100-core.c linux-3.1.4/drivers/mfd/ab3100-core.c
---- linux-3.1.4/drivers/mfd/ab3100-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mfd/ab3100-core.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
+index a20e1c4..4f57255 100644
+--- a/drivers/mfd/ab3100-core.c
++++ b/drivers/mfd/ab3100-core.c
@@ -809,7 +809,7 @@ struct ab_family_id {
char *name;
};
@@ -31214,9 +32046,10 @@ diff -urNp linux-3.1.4/drivers/mfd/ab3100-core.c linux-3.1.4/drivers/mfd/ab3100-
/* AB3100 */
{
.id = 0xc0,
-diff -urNp linux-3.1.4/drivers/mfd/abx500-core.c linux-3.1.4/drivers/mfd/abx500-core.c
---- linux-3.1.4/drivers/mfd/abx500-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mfd/abx500-core.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
+index f12720d..3c251fd 100644
+--- a/drivers/mfd/abx500-core.c
++++ b/drivers/mfd/abx500-core.c
@@ -14,7 +14,7 @@ static LIST_HEAD(abx500_list);
struct abx500_device_entry {
@@ -31226,9 +32059,10 @@ diff -urNp linux-3.1.4/drivers/mfd/abx500-core.c linux-3.1.4/drivers/mfd/abx500-
struct device *dev;
};
-diff -urNp linux-3.1.4/drivers/mfd/janz-cmodio.c linux-3.1.4/drivers/mfd/janz-cmodio.c
---- linux-3.1.4/drivers/mfd/janz-cmodio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mfd/janz-cmodio.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c
+index 5c2a06a..8fa077c 100644
+--- a/drivers/mfd/janz-cmodio.c
++++ b/drivers/mfd/janz-cmodio.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
@@ -31237,10 +32071,11 @@ diff -urNp linux-3.1.4/drivers/mfd/janz-cmodio.c linux-3.1.4/drivers/mfd/janz-cm
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
-diff -urNp linux-3.1.4/drivers/mfd/wm8350-i2c.c linux-3.1.4/drivers/mfd/wm8350-i2c.c
---- linux-3.1.4/drivers/mfd/wm8350-i2c.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mfd/wm8350-i2c.c 2011-11-16 18:40:10.000000000 -0500
-@@ -44,6 +44,8 @@ static int wm8350_i2c_write_device(struc
+diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c
+index 5fe5de1..af64f53 100644
+--- a/drivers/mfd/wm8350-i2c.c
++++ b/drivers/mfd/wm8350-i2c.c
+@@ -44,6 +44,8 @@ static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg,
u8 msg[(WM8350_MAX_REGISTER << 1) + 1];
int ret;
@@ -31249,10 +32084,11 @@ diff -urNp linux-3.1.4/drivers/mfd/wm8350-i2c.c linux-3.1.4/drivers/mfd/wm8350-i
if (bytes > ((WM8350_MAX_REGISTER << 1) + 1))
return -EINVAL;
-diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c
---- linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c 2011-11-16 18:39:07.000000000 -0500
-@@ -437,7 +437,7 @@ static irqreturn_t lis302dl_interrupt(in
+diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
+index 8b51cd6..f628f8d 100644
+--- a/drivers/misc/lis3lv02d/lis3lv02d.c
++++ b/drivers/misc/lis3lv02d/lis3lv02d.c
+@@ -437,7 +437,7 @@ static irqreturn_t lis302dl_interrupt(int irq, void *dummy)
* the lid is closed. This leads to interrupts as soon as a little move
* is done.
*/
@@ -31261,7 +32097,7 @@ diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c linux-3.1.4/drivers/mi
wake_up_interruptible(&lis3_dev.misc_wait);
kill_fasync(&lis3_dev.async_queue, SIGIO, POLL_IN);
-@@ -520,7 +520,7 @@ static int lis3lv02d_misc_open(struct in
+@@ -520,7 +520,7 @@ static int lis3lv02d_misc_open(struct inode *inode, struct file *file)
if (lis3_dev.pm_dev)
pm_runtime_get_sync(lis3_dev.pm_dev);
@@ -31270,7 +32106,7 @@ diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c linux-3.1.4/drivers/mi
return 0;
}
-@@ -547,7 +547,7 @@ static ssize_t lis3lv02d_misc_read(struc
+@@ -547,7 +547,7 @@ static ssize_t lis3lv02d_misc_read(struct file *file, char __user *buf,
add_wait_queue(&lis3_dev.misc_wait, &wait);
while (true) {
set_current_state(TASK_INTERRUPTIBLE);
@@ -31288,9 +32124,10 @@ diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.c linux-3.1.4/drivers/mi
return POLLIN | POLLRDNORM;
return 0;
}
-diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.h linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.h
---- linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/misc/lis3lv02d/lis3lv02d.h b/drivers/misc/lis3lv02d/lis3lv02d.h
+index a193958..4d7ecd2 100644
+--- a/drivers/misc/lis3lv02d/lis3lv02d.h
++++ b/drivers/misc/lis3lv02d/lis3lv02d.h
@@ -265,7 +265,7 @@ struct lis3lv02d {
struct input_polled_dev *idev; /* input device */
struct platform_device *pdev; /* platform device */
@@ -31300,10 +32137,11 @@ diff -urNp linux-3.1.4/drivers/misc/lis3lv02d/lis3lv02d.h linux-3.1.4/drivers/mi
union axis_conversion ac; /* hw -> logical axis */
int mapped_btns[3];
-diff -urNp linux-3.1.4/drivers/misc/sgi-gru/gruhandles.c linux-3.1.4/drivers/misc/sgi-gru/gruhandles.c
---- linux-3.1.4/drivers/misc/sgi-gru/gruhandles.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-gru/gruhandles.c 2011-11-16 18:39:07.000000000 -0500
-@@ -44,8 +44,8 @@ static void update_mcs_stats(enum mcs_op
+diff --git a/drivers/misc/sgi-gru/gruhandles.c b/drivers/misc/sgi-gru/gruhandles.c
+index 2f30bad..c4c13d0 100644
+--- a/drivers/misc/sgi-gru/gruhandles.c
++++ b/drivers/misc/sgi-gru/gruhandles.c
+@@ -44,8 +44,8 @@ static void update_mcs_stats(enum mcs_op op, unsigned long clks)
unsigned long nsec;
nsec = CLKS2NSEC(clks);
@@ -31314,9 +32152,10 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/gruhandles.c linux-3.1.4/drivers/mis
if (mcs_op_statistics[op].max < nsec)
mcs_op_statistics[op].max = nsec;
}
-diff -urNp linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c
---- linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/misc/sgi-gru/gruprocfs.c b/drivers/misc/sgi-gru/gruprocfs.c
+index 7768b87..f8aac38 100644
+--- a/drivers/misc/sgi-gru/gruprocfs.c
++++ b/drivers/misc/sgi-gru/gruprocfs.c
@@ -32,9 +32,9 @@
#define printstat(s, f) printstat_val(s, &gru_stats.f, #f)
@@ -31329,7 +32168,7 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c linux-3.1.4/drivers/misc
seq_printf(s, "%16lu %s\n", val, id);
}
-@@ -134,8 +134,8 @@ static int mcs_statistics_show(struct se
+@@ -134,8 +134,8 @@ static int mcs_statistics_show(struct seq_file *s, void *p)
seq_printf(s, "%-20s%12s%12s%12s\n", "#id", "count", "aver-clks", "max-clks");
for (op = 0; op < mcsop_last; op++) {
@@ -31340,9 +32179,10 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/gruprocfs.c linux-3.1.4/drivers/misc
max = mcs_op_statistics[op].max;
seq_printf(s, "%-20s%12ld%12ld%12ld\n", id[op], count,
count ? total / count : 0, max);
-diff -urNp linux-3.1.4/drivers/misc/sgi-gru/grutables.h linux-3.1.4/drivers/misc/sgi-gru/grutables.h
---- linux-3.1.4/drivers/misc/sgi-gru/grutables.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-gru/grutables.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h
+index 5c3ce24..4915ccb 100644
+--- a/drivers/misc/sgi-gru/grutables.h
++++ b/drivers/misc/sgi-gru/grutables.h
@@ -167,82 +167,82 @@ extern unsigned int gru_max_gids;
* GRU statistics.
*/
@@ -31502,7 +32342,7 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/grutables.h linux-3.1.4/drivers/misc
};
-@@ -251,8 +251,8 @@ enum mcs_op {cchop_allocate, cchop_start
+@@ -251,8 +251,8 @@ enum mcs_op {cchop_allocate, cchop_start, cchop_interrupt, cchop_interrupt_sync,
tghop_invalidate, mcsop_last};
struct mcs_op_statistic {
@@ -31513,7 +32353,7 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/grutables.h linux-3.1.4/drivers/misc
unsigned long max;
};
-@@ -275,7 +275,7 @@ extern struct mcs_op_statistic mcs_op_st
+@@ -275,7 +275,7 @@ extern struct mcs_op_statistic mcs_op_statistics[mcsop_last];
#define STAT(id) do { \
if (gru_options & OPT_STATS) \
@@ -31522,9 +32362,23 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-gru/grutables.h linux-3.1.4/drivers/misc
} while (0)
#ifdef CONFIG_SGI_GRU_DEBUG
-diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xpc.h linux-3.1.4/drivers/misc/sgi-xp/xpc.h
---- linux-3.1.4/drivers/misc/sgi-xp/xpc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-xp/xpc.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h
+index 851b2f2..a4ec097 100644
+--- a/drivers/misc/sgi-xp/xp.h
++++ b/drivers/misc/sgi-xp/xp.h
+@@ -289,7 +289,7 @@ struct xpc_interface {
+ xpc_notify_func, void *);
+ void (*received) (short, int, void *);
+ enum xp_retval (*partid_to_nasids) (short, void *);
+-};
++} __no_const;
+
+ extern struct xpc_interface xpc_interface;
+
+diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
+index b94d5f7..7f494c5 100644
+--- a/drivers/misc/sgi-xp/xpc.h
++++ b/drivers/misc/sgi-xp/xpc.h
@@ -835,6 +835,7 @@ struct xpc_arch_operations {
void (*received_payload) (struct xpc_channel *, void *);
void (*notify_senders_of_disconnect) (struct xpc_channel *);
@@ -31533,7 +32387,7 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xpc.h linux-3.1.4/drivers/misc/sgi-xp
/* struct xpc_partition act_state values (for XPC HB) */
-@@ -876,7 +877,7 @@ extern struct xpc_registration xpc_regis
+@@ -876,7 +877,7 @@ extern struct xpc_registration xpc_registrations[];
/* found in xpc_main.c */
extern struct device *xpc_part;
extern struct device *xpc_chan;
@@ -31542,10 +32396,11 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xpc.h linux-3.1.4/drivers/misc/sgi-xp
extern int xpc_disengage_timelimit;
extern int xpc_disengage_timedout;
extern int xpc_activate_IRQ_rcvd;
-diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xpc_main.c linux-3.1.4/drivers/misc/sgi-xp/xpc_main.c
---- linux-3.1.4/drivers/misc/sgi-xp/xpc_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-xp/xpc_main.c 2011-11-16 18:39:07.000000000 -0500
-@@ -162,7 +162,7 @@ static struct notifier_block xpc_die_not
+diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
+index 8d082b4..aa749ae 100644
+--- a/drivers/misc/sgi-xp/xpc_main.c
++++ b/drivers/misc/sgi-xp/xpc_main.c
+@@ -162,7 +162,7 @@ static struct notifier_block xpc_die_notifier = {
.notifier_call = xpc_system_die,
};
@@ -31554,22 +32409,11 @@ diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xpc_main.c linux-3.1.4/drivers/misc/s
/*
* Timer function to enforce the timelimit on the partition disengage.
-diff -urNp linux-3.1.4/drivers/misc/sgi-xp/xp.h linux-3.1.4/drivers/misc/sgi-xp/xp.h
---- linux-3.1.4/drivers/misc/sgi-xp/xp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/misc/sgi-xp/xp.h 2011-11-16 18:39:07.000000000 -0500
-@@ -289,7 +289,7 @@ struct xpc_interface {
- xpc_notify_func, void *);
- void (*received) (short, int, void *);
- enum xp_retval (*partid_to_nasids) (short, void *);
--};
-+} __no_const;
-
- extern struct xpc_interface xpc_interface;
-
-diff -urNp linux-3.1.4/drivers/mmc/host/sdhci-pci.c linux-3.1.4/drivers/mmc/host/sdhci-pci.c
---- linux-3.1.4/drivers/mmc/host/sdhci-pci.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mmc/host/sdhci-pci.c 2011-11-16 18:39:07.000000000 -0500
-@@ -542,7 +542,7 @@ static const struct sdhci_pci_fixes sdhc
+diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
+index 26c5286..292d261 100644
+--- a/drivers/mmc/host/sdhci-pci.c
++++ b/drivers/mmc/host/sdhci-pci.c
+@@ -542,7 +542,7 @@ static const struct sdhci_pci_fixes sdhci_via = {
.probe = via_probe,
};
@@ -31578,10 +32422,11 @@ diff -urNp linux-3.1.4/drivers/mmc/host/sdhci-pci.c linux-3.1.4/drivers/mmc/host
{
.vendor = PCI_VENDOR_ID_RICOH,
.device = PCI_DEVICE_ID_RICOH_R5C822,
-diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c
---- linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c 2011-11-16 18:40:10.000000000 -0500
-@@ -757,6 +757,8 @@ static int chip_ready (struct map_info *
+diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
+index e1e122f..d99a6ea 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0001.c
++++ b/drivers/mtd/chips/cfi_cmdset_0001.c
+@@ -757,6 +757,8 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long
struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
unsigned long timeo = jiffies + HZ;
@@ -31590,7 +32435,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c linux-3.1.4/drivers/m
/* Prevent setting state FL_SYNCING for chip in suspended state. */
if (mode == FL_SYNCING && chip->oldstate != FL_READY)
goto sleep;
-@@ -1653,6 +1655,8 @@ static int __xipram do_write_buffer(stru
+@@ -1653,6 +1655,8 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long initial_adr;
int initial_len = len;
@@ -31599,7 +32444,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c linux-3.1.4/drivers/m
wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
adr += chip->start;
initial_adr = adr;
-@@ -1871,6 +1875,8 @@ static int __xipram do_erase_oneblock(st
+@@ -1871,6 +1875,8 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
int retries = 3;
int ret;
@@ -31608,10 +32453,11 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0001.c linux-3.1.4/drivers/m
adr += chip->start;
retry:
-diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c
---- linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c 2011-11-16 18:40:10.000000000 -0500
-@@ -255,6 +255,8 @@ static inline int do_read_onechip(struct
+diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
+index 179814a..abe9d60 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0020.c
++++ b/drivers/mtd/chips/cfi_cmdset_0020.c
+@@ -255,6 +255,8 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof
unsigned long cmd_addr;
struct cfi_private *cfi = map->fldrv_priv;
@@ -31620,7 +32466,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/m
adr += chip->start;
/* Ensure cmd read/writes are aligned. */
-@@ -429,6 +431,8 @@ static inline int do_write_buffer(struct
+@@ -429,6 +431,8 @@ static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
DECLARE_WAITQUEUE(wait, current);
int wbufsize, z;
@@ -31629,7 +32475,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/m
/* M58LW064A requires bus alignment for buffer wriets -- saw */
if (adr & (map_bankwidth(map)-1))
return -EINVAL;
-@@ -743,6 +747,8 @@ static inline int do_erase_oneblock(stru
+@@ -743,6 +747,8 @@ static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, u
DECLARE_WAITQUEUE(wait, current);
int ret = 0;
@@ -31638,7 +32484,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/m
adr += chip->start;
/* Let's determine this according to the interleave only once */
-@@ -1048,6 +1054,8 @@ static inline int do_lock_oneblock(struc
+@@ -1048,6 +1054,8 @@ static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, un
unsigned long timeo = jiffies + HZ;
DECLARE_WAITQUEUE(wait, current);
@@ -31647,7 +32493,7 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/m
adr += chip->start;
/* Let's determine this according to the interleave only once */
-@@ -1197,6 +1205,8 @@ static inline int do_unlock_oneblock(str
+@@ -1197,6 +1205,8 @@ static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip,
unsigned long timeo = jiffies + HZ;
DECLARE_WAITQUEUE(wait, current);
@@ -31656,10 +32502,11 @@ diff -urNp linux-3.1.4/drivers/mtd/chips/cfi_cmdset_0020.c linux-3.1.4/drivers/m
adr += chip->start;
/* Let's determine this according to the interleave only once */
-diff -urNp linux-3.1.4/drivers/mtd/devices/doc2000.c linux-3.1.4/drivers/mtd/devices/doc2000.c
---- linux-3.1.4/drivers/mtd/devices/doc2000.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/devices/doc2000.c 2011-11-16 18:39:07.000000000 -0500
-@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt
+diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
+index f7fbf60..9866457 100644
+--- a/drivers/mtd/devices/doc2000.c
++++ b/drivers/mtd/devices/doc2000.c
+@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
/* The ECC will not be calculated correctly if less than 512 is written */
/* DBB-
@@ -31668,10 +32515,11 @@ diff -urNp linux-3.1.4/drivers/mtd/devices/doc2000.c linux-3.1.4/drivers/mtd/dev
printk(KERN_WARNING
"ECC needs a full sector write (adr: %lx size %lx)\n",
(long) to, (long) len);
-diff -urNp linux-3.1.4/drivers/mtd/devices/doc2001.c linux-3.1.4/drivers/mtd/devices/doc2001.c
---- linux-3.1.4/drivers/mtd/devices/doc2001.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/devices/doc2001.c 2011-11-16 18:39:07.000000000 -0500
-@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mt
+diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
+index 241192f..d0c35a3 100644
+--- a/drivers/mtd/devices/doc2001.c
++++ b/drivers/mtd/devices/doc2001.c
+@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len,
struct Nand *mychip = &this->chips[from >> (this->chipshift)];
/* Don't allow read past end of device */
@@ -31680,10 +32528,11 @@ diff -urNp linux-3.1.4/drivers/mtd/devices/doc2001.c linux-3.1.4/drivers/mtd/dev
return -EINVAL;
/* Don't allow a single read to cross a 512-byte block boundary */
-diff -urNp linux-3.1.4/drivers/mtd/ftl.c linux-3.1.4/drivers/mtd/ftl.c
---- linux-3.1.4/drivers/mtd/ftl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/ftl.c 2011-11-16 18:40:10.000000000 -0500
-@@ -474,6 +474,8 @@ static int copy_erase_unit(partition_t *
+diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
+index 037b399..225a71d 100644
+--- a/drivers/mtd/ftl.c
++++ b/drivers/mtd/ftl.c
+@@ -474,6 +474,8 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit,
loff_t offset;
uint16_t srcunitswap = cpu_to_le16(srcunit);
@@ -31692,10 +32541,11 @@ diff -urNp linux-3.1.4/drivers/mtd/ftl.c linux-3.1.4/drivers/mtd/ftl.c
eun = &part->EUNInfo[srcunit];
xfer = &part->XferInfo[xferunit];
DEBUG(2, "ftl_cs: copying block 0x%x to 0x%x\n",
-diff -urNp linux-3.1.4/drivers/mtd/inftlcore.c linux-3.1.4/drivers/mtd/inftlcore.c
---- linux-3.1.4/drivers/mtd/inftlcore.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/inftlcore.c 2011-11-16 18:40:10.000000000 -0500
-@@ -259,6 +259,8 @@ static u16 INFTL_foldchain(struct INFTLr
+diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
+index d7592e6..31c505c 100644
+--- a/drivers/mtd/inftlcore.c
++++ b/drivers/mtd/inftlcore.c
+@@ -259,6 +259,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
struct inftl_oob oob;
size_t retlen;
@@ -31704,10 +32554,11 @@ diff -urNp linux-3.1.4/drivers/mtd/inftlcore.c linux-3.1.4/drivers/mtd/inftlcore
DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d,"
"pending=%d)\n", inftl, thisVUC, pendingblock);
-diff -urNp linux-3.1.4/drivers/mtd/inftlmount.c linux-3.1.4/drivers/mtd/inftlmount.c
---- linux-3.1.4/drivers/mtd/inftlmount.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/inftlmount.c 2011-11-16 18:40:10.000000000 -0500
-@@ -53,6 +53,8 @@ static int find_boot_record(struct INFTL
+diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
+index 104052e..6232be5 100644
+--- a/drivers/mtd/inftlmount.c
++++ b/drivers/mtd/inftlmount.c
+@@ -53,6 +53,8 @@ static int find_boot_record(struct INFTLrecord *inftl)
struct INFTLPartition *ip;
size_t retlen;
@@ -31716,10 +32567,11 @@ diff -urNp linux-3.1.4/drivers/mtd/inftlmount.c linux-3.1.4/drivers/mtd/inftlmou
DEBUG(MTD_DEBUG_LEVEL3, "INFTL: find_boot_record(inftl=%p)\n", inftl);
/*
-diff -urNp linux-3.1.4/drivers/mtd/lpddr/qinfo_probe.c linux-3.1.4/drivers/mtd/lpddr/qinfo_probe.c
---- linux-3.1.4/drivers/mtd/lpddr/qinfo_probe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/lpddr/qinfo_probe.c 2011-11-16 18:40:10.000000000 -0500
-@@ -106,6 +106,8 @@ static int lpddr_pfow_present(struct map
+diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c
+index dbfe17b..c7b0918 100644
+--- a/drivers/mtd/lpddr/qinfo_probe.c
++++ b/drivers/mtd/lpddr/qinfo_probe.c
+@@ -106,6 +106,8 @@ static int lpddr_pfow_present(struct map_info *map, struct lpddr_private *lpddr)
{
map_word pfow_val[4];
@@ -31728,10 +32580,11 @@ diff -urNp linux-3.1.4/drivers/mtd/lpddr/qinfo_probe.c linux-3.1.4/drivers/mtd/l
/* Check identification string */
pfow_val[0] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_P);
pfow_val[1] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_F);
-diff -urNp linux-3.1.4/drivers/mtd/mtdchar.c linux-3.1.4/drivers/mtd/mtdchar.c
---- linux-3.1.4/drivers/mtd/mtdchar.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/mtdchar.c 2011-11-16 18:40:10.000000000 -0500
-@@ -554,6 +554,8 @@ static int mtd_ioctl(struct file *file,
+diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
+index 49e20a4..60fbfa5 100644
+--- a/drivers/mtd/mtdchar.c
++++ b/drivers/mtd/mtdchar.c
+@@ -554,6 +554,8 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
u_long size;
struct mtd_info_user info;
@@ -31740,9 +32593,10 @@ diff -urNp linux-3.1.4/drivers/mtd/mtdchar.c linux-3.1.4/drivers/mtd/mtdchar.c
DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n");
size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
-diff -urNp linux-3.1.4/drivers/mtd/nand/denali.c linux-3.1.4/drivers/mtd/nand/denali.c
---- linux-3.1.4/drivers/mtd/nand/denali.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/nand/denali.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
+index d527621..2491fab 100644
+--- a/drivers/mtd/nand/denali.c
++++ b/drivers/mtd/nand/denali.c
@@ -26,6 +26,7 @@
#include <linux/pci.h>
#include <linux/mtd/mtd.h>
@@ -31751,10 +32605,11 @@ diff -urNp linux-3.1.4/drivers/mtd/nand/denali.c linux-3.1.4/drivers/mtd/nand/de
#include "denali.h"
-diff -urNp linux-3.1.4/drivers/mtd/nftlcore.c linux-3.1.4/drivers/mtd/nftlcore.c
---- linux-3.1.4/drivers/mtd/nftlcore.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/nftlcore.c 2011-11-16 18:40:10.000000000 -0500
-@@ -264,6 +264,8 @@ static u16 NFTL_foldchain (struct NFTLre
+diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
+index b155666..611b801 100644
+--- a/drivers/mtd/nftlcore.c
++++ b/drivers/mtd/nftlcore.c
+@@ -264,6 +264,8 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p
int inplace = 1;
size_t retlen;
@@ -31763,9 +32618,10 @@ diff -urNp linux-3.1.4/drivers/mtd/nftlcore.c linux-3.1.4/drivers/mtd/nftlcore.c
memset(BlockMap, 0xff, sizeof(BlockMap));
memset(BlockFreeFound, 0, sizeof(BlockFreeFound));
-diff -urNp linux-3.1.4/drivers/mtd/nftlmount.c linux-3.1.4/drivers/mtd/nftlmount.c
---- linux-3.1.4/drivers/mtd/nftlmount.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/nftlmount.c 2011-11-16 18:40:10.000000000 -0500
+diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
+index e3cd1ff..0ea79a3 100644
+--- a/drivers/mtd/nftlmount.c
++++ b/drivers/mtd/nftlmount.c
@@ -24,6 +24,7 @@
#include <asm/errno.h>
#include <linux/delay.h>
@@ -31774,7 +32630,7 @@ diff -urNp linux-3.1.4/drivers/mtd/nftlmount.c linux-3.1.4/drivers/mtd/nftlmount
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nftl.h>
-@@ -45,6 +46,8 @@ static int find_boot_record(struct NFTLr
+@@ -45,6 +46,8 @@ static int find_boot_record(struct NFTLrecord *nftl)
struct mtd_info *mtd = nftl->mbd.mtd;
unsigned int i;
@@ -31783,9 +32639,10 @@ diff -urNp linux-3.1.4/drivers/mtd/nftlmount.c linux-3.1.4/drivers/mtd/nftlmount
/* Assume logical EraseSize == physical erasesize for starting the scan.
We'll sort it out later if we find a MediaHeader which says otherwise */
/* Actually, we won't. The new DiskOnChip driver has already scanned
-diff -urNp linux-3.1.4/drivers/mtd/ubi/build.c linux-3.1.4/drivers/mtd/ubi/build.c
---- linux-3.1.4/drivers/mtd/ubi/build.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/mtd/ubi/build.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
+index 6c3fb5a..c542a81 100644
+--- a/drivers/mtd/ubi/build.c
++++ b/drivers/mtd/ubi/build.c
@@ -1311,7 +1311,7 @@ module_exit(ubi_exit);
static int __init bytes_str_to_int(const char *str)
{
@@ -31795,7 +32652,7 @@ diff -urNp linux-3.1.4/drivers/mtd/ubi/build.c linux-3.1.4/drivers/mtd/ubi/build
result = simple_strtoul(str, &endp, 0);
if (str == endp || result >= INT_MAX) {
-@@ -1322,11 +1322,11 @@ static int __init bytes_str_to_int(const
+@@ -1322,11 +1322,11 @@ static int __init bytes_str_to_int(const char *str)
switch (*endp) {
case 'G':
@@ -31810,7 +32667,7 @@ diff -urNp linux-3.1.4/drivers/mtd/ubi/build.c linux-3.1.4/drivers/mtd/ubi/build
if (endp[1] == 'i' && endp[2] == 'B')
endp += 2;
case '\0':
-@@ -1337,7 +1337,13 @@ static int __init bytes_str_to_int(const
+@@ -1337,7 +1337,13 @@ static int __init bytes_str_to_int(const char *str)
return -EINVAL;
}
@@ -31825,10 +32682,11 @@ diff -urNp linux-3.1.4/drivers/mtd/ubi/build.c linux-3.1.4/drivers/mtd/ubi/build
}
/**
-diff -urNp linux-3.1.4/drivers/net/atlx/atl2.c linux-3.1.4/drivers/net/atlx/atl2.c
---- linux-3.1.4/drivers/net/atlx/atl2.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/atlx/atl2.c 2011-11-16 18:39:07.000000000 -0500
-@@ -2857,7 +2857,7 @@ static void atl2_force_ps(struct atl2_hw
+diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
+index d4f7dda..d627d46 100644
+--- a/drivers/net/atlx/atl2.c
++++ b/drivers/net/atlx/atl2.c
+@@ -2857,7 +2857,7 @@ static void atl2_force_ps(struct atl2_hw *hw)
*/
#define ATL2_PARAM(X, desc) \
@@ -31837,10 +32695,11 @@ diff -urNp linux-3.1.4/drivers/net/atlx/atl2.c linux-3.1.4/drivers/net/atlx/atl2
MODULE_PARM(X, "1-" __MODULE_STRING(ATL2_MAX_NIC) "i"); \
MODULE_PARM_DESC(X, desc);
#else
-diff -urNp linux-3.1.4/drivers/net/bna/bfa_ioc_ct.c linux-3.1.4/drivers/net/bna/bfa_ioc_ct.c
---- linux-3.1.4/drivers/net/bna/bfa_ioc_ct.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/bna/bfa_ioc_ct.c 2011-11-16 18:39:07.000000000 -0500
-@@ -48,7 +48,21 @@ static void bfa_ioc_ct_sync_ack(struct b
+diff --git a/drivers/net/bna/bfa_ioc_ct.c b/drivers/net/bna/bfa_ioc_ct.c
+index 87aecdf..ec23470 100644
+--- a/drivers/net/bna/bfa_ioc_ct.c
++++ b/drivers/net/bna/bfa_ioc_ct.c
+@@ -48,7 +48,21 @@ static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc);
static bool bfa_ioc_ct_sync_complete(struct bfa_ioc *ioc);
static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb, bool fcmode);
@@ -31884,10 +32743,11 @@ diff -urNp linux-3.1.4/drivers/net/bna/bfa_ioc_ct.c linux-3.1.4/drivers/net/bna/
ioc->ioc_hwif = &nw_hwif_ct;
}
-diff -urNp linux-3.1.4/drivers/net/bna/bnad.c linux-3.1.4/drivers/net/bna/bnad.c
---- linux-3.1.4/drivers/net/bna/bnad.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/bna/bnad.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1673,7 +1673,14 @@ bnad_setup_tx(struct bnad *bnad, uint tx
+diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
+index 8e35b25..c39f205 100644
+--- a/drivers/net/bna/bnad.c
++++ b/drivers/net/bna/bnad.c
+@@ -1673,7 +1673,14 @@ bnad_setup_tx(struct bnad *bnad, uint tx_id)
struct bna_intr_info *intr_info =
&res_info[BNA_TX_RES_INTR_T_TXCMPL].res_u.intr_info;
struct bna_tx_config *tx_config = &bnad->tx_config[tx_id];
@@ -31903,7 +32763,7 @@ diff -urNp linux-3.1.4/drivers/net/bna/bnad.c linux-3.1.4/drivers/net/bna/bnad.c
struct bna_tx *tx;
unsigned long flags;
-@@ -1682,13 +1689,6 @@ bnad_setup_tx(struct bnad *bnad, uint tx
+@@ -1682,13 +1689,6 @@ bnad_setup_tx(struct bnad *bnad, uint tx_id)
tx_config->txq_depth = bnad->txq_depth;
tx_config->tx_type = BNA_TX_T_REGULAR;
@@ -31917,7 +32777,7 @@ diff -urNp linux-3.1.4/drivers/net/bna/bnad.c linux-3.1.4/drivers/net/bna/bnad.c
/* Get BNA's resource requirement for one tx object */
spin_lock_irqsave(&bnad->bna_lock, flags);
bna_tx_res_req(bnad->num_txq_per_tx,
-@@ -1819,21 +1819,21 @@ bnad_setup_rx(struct bnad *bnad, uint rx
+@@ -1819,21 +1819,21 @@ bnad_setup_rx(struct bnad *bnad, uint rx_id)
struct bna_intr_info *intr_info =
&res_info[BNA_RX_RES_T_INTR].res_u.intr_info;
struct bna_rx_config *rx_config = &bnad->rx_config[rx_id];
@@ -31948,9 +32808,10 @@ diff -urNp linux-3.1.4/drivers/net/bna/bnad.c linux-3.1.4/drivers/net/bna/bnad.c
/* Get BNA's resource requirement for one Rx object */
spin_lock_irqsave(&bnad->bna_lock, flags);
bna_rx_res_req(rx_config, res_info);
-diff -urNp linux-3.1.4/drivers/net/bnx2.c linux-3.1.4/drivers/net/bnx2.c
---- linux-3.1.4/drivers/net/bnx2.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/bnx2.c 2011-11-16 18:40:11.000000000 -0500
+diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
+index 4b2b570..31033f4 100644
+--- a/drivers/net/bnx2.c
++++ b/drivers/net/bnx2.c
@@ -5877,6 +5877,8 @@ bnx2_test_nvram(struct bnx2 *bp)
int rc = 0;
u32 magic, csum;
@@ -31960,10 +32821,11 @@ diff -urNp linux-3.1.4/drivers/net/bnx2.c linux-3.1.4/drivers/net/bnx2.c
if ((rc = bnx2_nvram_read(bp, 0, data, 4)) != 0)
goto test_nvram_done;
-diff -urNp linux-3.1.4/drivers/net/bnx2x/bnx2x_ethtool.c linux-3.1.4/drivers/net/bnx2x/bnx2x_ethtool.c
---- linux-3.1.4/drivers/net/bnx2x/bnx2x_ethtool.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/bnx2x/bnx2x_ethtool.c 2011-11-16 18:40:11.000000000 -0500
-@@ -1943,6 +1943,8 @@ static int bnx2x_test_nvram(struct bnx2x
+diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c
+index cf3e479..5dc0ecc 100644
+--- a/drivers/net/bnx2x/bnx2x_ethtool.c
++++ b/drivers/net/bnx2x/bnx2x_ethtool.c
+@@ -1943,6 +1943,8 @@ static int bnx2x_test_nvram(struct bnx2x *bp)
int i, rc;
u32 magic, crc;
@@ -31972,9 +32834,10 @@ diff -urNp linux-3.1.4/drivers/net/bnx2x/bnx2x_ethtool.c linux-3.1.4/drivers/net
if (BP_NOMCP(bp))
return 0;
-diff -urNp linux-3.1.4/drivers/net/bnx2x/bnx2x_sp.h linux-3.1.4/drivers/net/bnx2x/bnx2x_sp.h
---- linux-3.1.4/drivers/net/bnx2x/bnx2x_sp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/bnx2x/bnx2x_sp.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/bnx2x/bnx2x_sp.h b/drivers/net/bnx2x/bnx2x_sp.h
+index 9a517c2..a50cfcb 100644
+--- a/drivers/net/bnx2x/bnx2x_sp.h
++++ b/drivers/net/bnx2x/bnx2x_sp.h
@@ -449,7 +449,7 @@ struct bnx2x_rx_mode_obj {
int (*wait_comp)(struct bnx2x *bp,
@@ -31984,10 +32847,11 @@ diff -urNp linux-3.1.4/drivers/net/bnx2x/bnx2x_sp.h linux-3.1.4/drivers/net/bnx2
/********************** Set multicast group ***********************************/
-diff -urNp linux-3.1.4/drivers/net/cxgb3/l2t.h linux-3.1.4/drivers/net/cxgb3/l2t.h
---- linux-3.1.4/drivers/net/cxgb3/l2t.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/cxgb3/l2t.h 2011-11-16 18:39:07.000000000 -0500
-@@ -87,7 +87,7 @@ typedef void (*arp_failure_handler_func)
+diff --git a/drivers/net/cxgb3/l2t.h b/drivers/net/cxgb3/l2t.h
+index c5f5479..2e8c260 100644
+--- a/drivers/net/cxgb3/l2t.h
++++ b/drivers/net/cxgb3/l2t.h
+@@ -87,7 +87,7 @@ typedef void (*arp_failure_handler_func)(struct t3cdev * dev,
*/
struct l2t_skb_cb {
arp_failure_handler_func arp_failure_handler;
@@ -31996,10 +32860,11 @@ diff -urNp linux-3.1.4/drivers/net/cxgb3/l2t.h linux-3.1.4/drivers/net/cxgb3/l2t
#define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb)
-diff -urNp linux-3.1.4/drivers/net/cxgb4/cxgb4_main.c linux-3.1.4/drivers/net/cxgb4/cxgb4_main.c
---- linux-3.1.4/drivers/net/cxgb4/cxgb4_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/cxgb4/cxgb4_main.c 2011-11-16 18:40:22.000000000 -0500
-@@ -3396,6 +3396,8 @@ static int __devinit enable_msix(struct
+diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
+index b4efa29..c5f2703 100644
+--- a/drivers/net/cxgb4/cxgb4_main.c
++++ b/drivers/net/cxgb4/cxgb4_main.c
+@@ -3396,6 +3396,8 @@ static int __devinit enable_msix(struct adapter *adap)
unsigned int nchan = adap->params.nports;
struct msix_entry entries[MAX_INGQ + 1];
@@ -32008,10 +32873,11 @@ diff -urNp linux-3.1.4/drivers/net/cxgb4/cxgb4_main.c linux-3.1.4/drivers/net/cx
for (i = 0; i < ARRAY_SIZE(entries); ++i)
entries[i].entry = i;
-diff -urNp linux-3.1.4/drivers/net/cxgb4/t4_hw.c linux-3.1.4/drivers/net/cxgb4/t4_hw.c
---- linux-3.1.4/drivers/net/cxgb4/t4_hw.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/cxgb4/t4_hw.c 2011-11-16 18:40:22.000000000 -0500
-@@ -362,6 +362,8 @@ static int get_vpd_params(struct adapter
+diff --git a/drivers/net/cxgb4/t4_hw.c b/drivers/net/cxgb4/t4_hw.c
+index d1ec111..12735bc 100644
+--- a/drivers/net/cxgb4/t4_hw.c
++++ b/drivers/net/cxgb4/t4_hw.c
+@@ -362,6 +362,8 @@ static int get_vpd_params(struct adapter *adapter, struct vpd_params *p)
u8 vpd[VPD_LEN], csum;
unsigned int vpdr_len, kw_offset, id_len;
@@ -32020,10 +32886,11 @@ diff -urNp linux-3.1.4/drivers/net/cxgb4/t4_hw.c linux-3.1.4/drivers/net/cxgb4/t
ret = pci_read_vpd(adapter->pdev, VPD_BASE, sizeof(vpd), vpd);
if (ret < 0)
return ret;
-diff -urNp linux-3.1.4/drivers/net/e1000e/82571.c linux-3.1.4/drivers/net/e1000e/82571.c
---- linux-3.1.4/drivers/net/e1000e/82571.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/e1000e/82571.c 2011-11-16 18:39:07.000000000 -0500
-@@ -239,7 +239,7 @@ static s32 e1000_init_mac_params_82571(s
+diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
+index 536b3a5..e6f8dcc 100644
+--- a/drivers/net/e1000e/82571.c
++++ b/drivers/net/e1000e/82571.c
+@@ -239,7 +239,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
@@ -32032,10 +32899,11 @@ diff -urNp linux-3.1.4/drivers/net/e1000e/82571.c linux-3.1.4/drivers/net/e1000e
u32 swsm = 0;
u32 swsm2 = 0;
bool force_clear_smbi = false;
-diff -urNp linux-3.1.4/drivers/net/e1000e/es2lan.c linux-3.1.4/drivers/net/e1000e/es2lan.c
---- linux-3.1.4/drivers/net/e1000e/es2lan.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/e1000e/es2lan.c 2011-11-16 18:39:07.000000000 -0500
-@@ -205,7 +205,7 @@ static s32 e1000_init_mac_params_80003es
+diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c
+index e4f4225..24da2ea 100644
+--- a/drivers/net/e1000e/es2lan.c
++++ b/drivers/net/e1000e/es2lan.c
+@@ -205,7 +205,7 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
@@ -32044,9 +32912,10 @@ diff -urNp linux-3.1.4/drivers/net/e1000e/es2lan.c linux-3.1.4/drivers/net/e1000
/* Set media type */
switch (adapter->pdev->device) {
-diff -urNp linux-3.1.4/drivers/net/e1000e/hw.h linux-3.1.4/drivers/net/e1000e/hw.h
---- linux-3.1.4/drivers/net/e1000e/hw.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/e1000e/hw.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
+index 2967039..ca8c40c 100644
+--- a/drivers/net/e1000e/hw.h
++++ b/drivers/net/e1000e/hw.h
@@ -778,6 +778,7 @@ struct e1000_mac_operations {
void (*write_vfta)(struct e1000_hw *, u32, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
@@ -32093,9 +32962,10 @@ diff -urNp linux-3.1.4/drivers/net/e1000e/hw.h linux-3.1.4/drivers/net/e1000e/hw
enum e1000_nvm_type type;
enum e1000_nvm_override override;
-diff -urNp linux-3.1.4/drivers/net/fealnx.c linux-3.1.4/drivers/net/fealnx.c
---- linux-3.1.4/drivers/net/fealnx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/fealnx.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
+index fa8677c..196356f 100644
+--- a/drivers/net/fealnx.c
++++ b/drivers/net/fealnx.c
@@ -150,7 +150,7 @@ struct chip_info {
int flags;
};
@@ -32105,10 +32975,11 @@ diff -urNp linux-3.1.4/drivers/net/fealnx.c linux-3.1.4/drivers/net/fealnx.c
{ "100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
{ "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR },
{ "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
-diff -urNp linux-3.1.4/drivers/net/hamradio/6pack.c linux-3.1.4/drivers/net/hamradio/6pack.c
---- linux-3.1.4/drivers/net/hamradio/6pack.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/hamradio/6pack.c 2011-11-16 18:40:22.000000000 -0500
-@@ -463,6 +463,8 @@ static void sixpack_receive_buf(struct t
+diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
+index 2a5a34d..be871cc 100644
+--- a/drivers/net/hamradio/6pack.c
++++ b/drivers/net/hamradio/6pack.c
+@@ -463,6 +463,8 @@ static void sixpack_receive_buf(struct tty_struct *tty,
unsigned char buf[512];
int count1;
@@ -32117,9 +32988,10 @@ diff -urNp linux-3.1.4/drivers/net/hamradio/6pack.c linux-3.1.4/drivers/net/hamr
if (!count)
return;
-diff -urNp linux-3.1.4/drivers/net/igb/e1000_hw.h linux-3.1.4/drivers/net/igb/e1000_hw.h
---- linux-3.1.4/drivers/net/igb/e1000_hw.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/igb/e1000_hw.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index 4519a13..f97fcd0 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
@@ -314,6 +314,7 @@ struct e1000_mac_operations {
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*get_speed_and_duplex)(struct e1000_hw *, u16 *, u16 *);
@@ -32188,9 +33060,10 @@ diff -urNp linux-3.1.4/drivers/net/igb/e1000_hw.h linux-3.1.4/drivers/net/igb/e1
struct e1000_mbx_stats stats;
u32 timeout;
u32 usec_delay;
-diff -urNp linux-3.1.4/drivers/net/igbvf/vf.h linux-3.1.4/drivers/net/igbvf/vf.h
---- linux-3.1.4/drivers/net/igbvf/vf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/igbvf/vf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/igbvf/vf.h b/drivers/net/igbvf/vf.h
+index d7ed58f..64cde36 100644
+--- a/drivers/net/igbvf/vf.h
++++ b/drivers/net/igbvf/vf.h
@@ -189,9 +189,10 @@ struct e1000_mac_operations {
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*set_vfta)(struct e1000_hw *, u16, bool);
@@ -32220,10 +33093,11 @@ diff -urNp linux-3.1.4/drivers/net/igbvf/vf.h linux-3.1.4/drivers/net/igbvf/vf.h
struct e1000_mbx_stats stats;
u32 timeout;
u32 usec_delay;
-diff -urNp linux-3.1.4/drivers/net/ixgb/ixgb_main.c linux-3.1.4/drivers/net/ixgb/ixgb_main.c
---- linux-3.1.4/drivers/net/ixgb/ixgb_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ixgb/ixgb_main.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1070,6 +1070,8 @@ ixgb_set_multi(struct net_device *netdev
+diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
+index 6a130eb..1aeb9e4 100644
+--- a/drivers/net/ixgb/ixgb_main.c
++++ b/drivers/net/ixgb/ixgb_main.c
+@@ -1070,6 +1070,8 @@ ixgb_set_multi(struct net_device *netdev)
u32 rctl;
int i;
@@ -32232,9 +33106,10 @@ diff -urNp linux-3.1.4/drivers/net/ixgb/ixgb_main.c linux-3.1.4/drivers/net/ixgb
/* Check for Promiscuous and All Multicast modes */
rctl = IXGB_READ_REG(hw, RCTL);
-diff -urNp linux-3.1.4/drivers/net/ixgb/ixgb_param.c linux-3.1.4/drivers/net/ixgb/ixgb_param.c
---- linux-3.1.4/drivers/net/ixgb/ixgb_param.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ixgb/ixgb_param.c 2011-11-16 18:40:22.000000000 -0500
+diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c
+index dd7fbeb..44b9bbf 100644
+--- a/drivers/net/ixgb/ixgb_param.c
++++ b/drivers/net/ixgb/ixgb_param.c
@@ -261,6 +261,9 @@ void __devinit
ixgb_check_options(struct ixgb_adapter *adapter)
{
@@ -32245,9 +33120,10 @@ diff -urNp linux-3.1.4/drivers/net/ixgb/ixgb_param.c linux-3.1.4/drivers/net/ixg
if (bd >= IXGB_MAX_NIC) {
pr_notice("Warning: no configuration for board #%i\n", bd);
pr_notice("Using defaults for all values\n");
-diff -urNp linux-3.1.4/drivers/net/ixgbe/ixgbe_type.h linux-3.1.4/drivers/net/ixgbe/ixgbe_type.h
---- linux-3.1.4/drivers/net/ixgbe/ixgbe_type.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ixgbe/ixgbe_type.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
+index e0d970e..1cfdea5 100644
+--- a/drivers/net/ixgbe/ixgbe_type.h
++++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -2642,6 +2642,7 @@ struct ixgbe_eeprom_operations {
s32 (*update_checksum)(struct ixgbe_hw *);
u16 (*calc_checksum)(struct ixgbe_hw *);
@@ -32311,9 +33187,10 @@ diff -urNp linux-3.1.4/drivers/net/ixgbe/ixgbe_type.h linux-3.1.4/drivers/net/ix
struct ixgbe_mbx_stats stats;
u32 timeout;
u32 usec_delay;
-diff -urNp linux-3.1.4/drivers/net/ixgbevf/vf.h linux-3.1.4/drivers/net/ixgbevf/vf.h
---- linux-3.1.4/drivers/net/ixgbevf/vf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ixgbevf/vf.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h
+index 10306b4..28df758 100644
+--- a/drivers/net/ixgbevf/vf.h
++++ b/drivers/net/ixgbevf/vf.h
@@ -70,6 +70,7 @@ struct ixgbe_mac_operations {
s32 (*clear_vfta)(struct ixgbe_hw *);
s32 (*set_vfta)(struct ixgbe_hw *, u32, u32, bool);
@@ -32348,10 +33225,11 @@ diff -urNp linux-3.1.4/drivers/net/ixgbevf/vf.h linux-3.1.4/drivers/net/ixgbevf/
struct ixgbe_mbx_stats stats;
u32 timeout;
u32 udelay;
-diff -urNp linux-3.1.4/drivers/net/ksz884x.c linux-3.1.4/drivers/net/ksz884x.c
---- linux-3.1.4/drivers/net/ksz884x.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ksz884x.c 2011-11-16 18:40:22.000000000 -0500
-@@ -6533,6 +6533,8 @@ static void netdev_get_ethtool_stats(str
+diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
+index 27418d3..adf15bb 100644
+--- a/drivers/net/ksz884x.c
++++ b/drivers/net/ksz884x.c
+@@ -6533,6 +6533,8 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
int rc;
u64 counter[TOTAL_PORT_COUNTER_NUM];
@@ -32360,9 +33238,10 @@ diff -urNp linux-3.1.4/drivers/net/ksz884x.c linux-3.1.4/drivers/net/ksz884x.c
mutex_lock(&hw_priv->lock);
n = SWITCH_PORT_NUM;
for (i = 0, p = port->first_port; i < port->mib_port_cnt; i++, p++) {
-diff -urNp linux-3.1.4/drivers/net/mlx4/main.c linux-3.1.4/drivers/net/mlx4/main.c
---- linux-3.1.4/drivers/net/mlx4/main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/mlx4/main.c 2011-11-16 18:40:22.000000000 -0500
+diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
+index f0ee35d..3831c8a 100644
+--- a/drivers/net/mlx4/main.c
++++ b/drivers/net/mlx4/main.c
@@ -40,6 +40,7 @@
#include <linux/dma-mapping.h>
#include <linux/slab.h>
@@ -32371,7 +33250,7 @@ diff -urNp linux-3.1.4/drivers/net/mlx4/main.c linux-3.1.4/drivers/net/mlx4/main
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
-@@ -762,6 +763,8 @@ static int mlx4_init_hca(struct mlx4_dev
+@@ -762,6 +763,8 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
u64 icm_size;
int err;
@@ -32380,10 +33259,11 @@ diff -urNp linux-3.1.4/drivers/net/mlx4/main.c linux-3.1.4/drivers/net/mlx4/main
err = mlx4_QUERY_FW(dev);
if (err) {
if (err == -EACCES)
-diff -urNp linux-3.1.4/drivers/net/niu.c linux-3.1.4/drivers/net/niu.c
---- linux-3.1.4/drivers/net/niu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/niu.c 2011-11-16 18:40:22.000000000 -0500
-@@ -9061,6 +9061,8 @@ static void __devinit niu_try_msix(struc
+diff --git a/drivers/net/niu.c b/drivers/net/niu.c
+index ed47585..5e5be8f 100644
+--- a/drivers/net/niu.c
++++ b/drivers/net/niu.c
+@@ -9061,6 +9061,8 @@ static void __devinit niu_try_msix(struct niu *np, u8 *ldg_num_map)
int i, num_irqs, err;
u8 first_ldg;
@@ -32392,9 +33272,10 @@ diff -urNp linux-3.1.4/drivers/net/niu.c linux-3.1.4/drivers/net/niu.c
first_ldg = (NIU_NUM_LDG / parent->num_ports) * np->port;
for (i = 0; i < (NIU_NUM_LDG / parent->num_ports); i++)
ldg_num_map[i] = first_ldg + i;
-diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
---- linux-3.1.4/drivers/net/pcnet32.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/pcnet32.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
+index 80b6f36..5cd8938 100644
+--- a/drivers/net/pcnet32.c
++++ b/drivers/net/pcnet32.c
@@ -270,7 +270,7 @@ struct pcnet32_private {
struct sk_buff **rx_skbuff;
dma_addr_t *tx_dma_addr;
@@ -32404,7 +33285,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
spinlock_t lock; /* Guard lock */
unsigned int cur_rx, cur_tx; /* The next free ring entry */
unsigned int rx_ring_size; /* current rx ring size */
-@@ -460,9 +460,9 @@ static void pcnet32_netif_start(struct n
+@@ -460,9 +460,9 @@ static void pcnet32_netif_start(struct net_device *dev)
u16 val;
netif_wake_queue(dev);
@@ -32416,7 +33297,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
napi_enable(&lp->napi);
}
-@@ -730,7 +730,7 @@ static u32 pcnet32_get_link(struct net_d
+@@ -730,7 +730,7 @@ static u32 pcnet32_get_link(struct net_device *dev)
r = mii_link_ok(&lp->mii_if);
} else if (lp->chip_version >= PCNET32_79C970A) {
ulong ioaddr = dev->base_addr; /* card base I/O address */
@@ -32425,7 +33306,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
} else { /* can not detect link on really old chips */
r = 1;
}
-@@ -792,7 +792,7 @@ static int pcnet32_set_ringparam(struct
+@@ -792,7 +792,7 @@ static int pcnet32_set_ringparam(struct net_device *dev,
pcnet32_netif_stop(dev);
spin_lock_irqsave(&lp->lock, flags);
@@ -32434,7 +33315,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
size = min(ering->tx_pending, (unsigned int)TX_MAX_RING_SIZE);
-@@ -868,7 +868,7 @@ static void pcnet32_ethtool_test(struct
+@@ -868,7 +868,7 @@ static void pcnet32_ethtool_test(struct net_device *dev,
static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
{
struct pcnet32_private *lp = netdev_priv(dev);
@@ -32443,7 +33324,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
ulong ioaddr = dev->base_addr; /* card base I/O address */
struct sk_buff *skb; /* sk buff */
int x, i; /* counters */
-@@ -888,21 +888,21 @@ static int pcnet32_loopback_test(struct
+@@ -888,21 +888,21 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
pcnet32_netif_stop(dev);
spin_lock_irqsave(&lp->lock, flags);
@@ -32470,7 +33351,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* Initialize Transmit buffers. */
size = data_len + 15;
-@@ -947,10 +947,10 @@ static int pcnet32_loopback_test(struct
+@@ -947,10 +947,10 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
/* set int loopback in CSR15 */
x = a->read_csr(ioaddr, CSR15) & 0xfffc;
@@ -32483,7 +33364,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* Check status of descriptors */
for (x = 0; x < numbuffs; x++) {
-@@ -969,7 +969,7 @@ static int pcnet32_loopback_test(struct
+@@ -969,7 +969,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
}
}
@@ -32501,7 +33382,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -1026,7 +1026,7 @@ static int pcnet32_set_phys_id(struct ne
+@@ -1026,7 +1026,7 @@ static int pcnet32_set_phys_id(struct net_device *dev,
enum ethtool_phys_id_state state)
{
struct pcnet32_private *lp = netdev_priv(dev);
@@ -32510,7 +33391,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
ulong ioaddr = dev->base_addr;
unsigned long flags;
int i;
-@@ -1067,7 +1067,7 @@ static int pcnet32_suspend(struct net_de
+@@ -1067,7 +1067,7 @@ static int pcnet32_suspend(struct net_device *dev, unsigned long *flags,
{
int csr5;
struct pcnet32_private *lp = netdev_priv(dev);
@@ -32519,7 +33400,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
ulong ioaddr = dev->base_addr;
int ticks;
-@@ -1324,8 +1324,8 @@ static int pcnet32_poll(struct napi_stru
+@@ -1324,8 +1324,8 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
spin_lock_irqsave(&lp->lock, flags);
if (pcnet32_tx(dev)) {
/* reset the chip to clear the error condition, then restart */
@@ -32530,7 +33411,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
pcnet32_restart(dev, CSR0_START);
netif_wake_queue(dev);
}
-@@ -1337,12 +1337,12 @@ static int pcnet32_poll(struct napi_stru
+@@ -1337,12 +1337,12 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
__napi_complete(napi);
/* clear interrupt masks */
@@ -32546,7 +33427,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
spin_unlock_irqrestore(&lp->lock, flags);
}
-@@ -1365,7 +1365,7 @@ static void pcnet32_get_regs(struct net_
+@@ -1365,7 +1365,7 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
int i, csr0;
u16 *buff = ptr;
struct pcnet32_private *lp = netdev_priv(dev);
@@ -32555,7 +33436,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
ulong ioaddr = dev->base_addr;
unsigned long flags;
-@@ -1401,9 +1401,9 @@ static void pcnet32_get_regs(struct net_
+@@ -1401,9 +1401,9 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
for (j = 0; j < PCNET32_MAX_PHYS; j++) {
if (lp->phymask & (1 << j)) {
for (i = 0; i < PCNET32_REGS_PER_PHY; i++) {
@@ -32567,7 +33448,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
}
}
-@@ -1785,7 +1785,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1785,7 +1785,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
((cards_found >= MAX_UNITS) || full_duplex[cards_found]))
lp->options |= PCNET32_PORT_FD;
@@ -32576,7 +33457,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* prior to register_netdev, dev->name is not yet correct */
if (pcnet32_alloc_ring(dev, pci_name(lp->pci_dev))) {
-@@ -1844,7 +1844,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1844,7 +1844,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
if (lp->mii) {
/* lp->phycount and lp->phymask are set to 0 by memset above */
@@ -32585,7 +33466,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* scan for PHYs */
for (i = 0; i < PCNET32_MAX_PHYS; i++) {
unsigned short id1, id2;
-@@ -1864,7 +1864,7 @@ pcnet32_probe1(unsigned long ioaddr, int
+@@ -1864,7 +1864,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
pr_info("Found PHY %04x:%04x at address %d\n",
id1, id2, i);
}
@@ -32594,7 +33475,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
if (lp->phycount > 1)
lp->options |= PCNET32_PORT_MII;
}
-@@ -2020,10 +2020,10 @@ static int pcnet32_open(struct net_devic
+@@ -2020,10 +2020,10 @@ static int pcnet32_open(struct net_device *dev)
}
/* Reset the PCNET32 */
@@ -32607,7 +33488,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
netif_printk(lp, ifup, KERN_DEBUG, dev,
"%s() irq %d tx/rx rings %#x/%#x init %#x\n",
-@@ -2032,14 +2032,14 @@ static int pcnet32_open(struct net_devic
+@@ -2032,14 +2032,14 @@ static int pcnet32_open(struct net_device *dev)
(u32) (lp->init_dma_addr));
/* set/reset autoselect bit */
@@ -32625,7 +33506,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
if (lp->options & PCNET32_PORT_FD) {
val |= 1;
if (lp->options == (PCNET32_PORT_FD | PCNET32_PORT_AUI))
-@@ -2049,14 +2049,14 @@ static int pcnet32_open(struct net_devic
+@@ -2049,14 +2049,14 @@ static int pcnet32_open(struct net_device *dev)
if (lp->chip_version == 0x2627)
val |= 3;
}
@@ -32643,7 +33524,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
if (pdev && pdev->subsystem_vendor == PCI_VENDOR_ID_AT &&
-@@ -2075,24 +2075,24 @@ static int pcnet32_open(struct net_devic
+@@ -2075,24 +2075,24 @@ static int pcnet32_open(struct net_device *dev)
* duplex, and/or enable auto negotiation, and clear DANAS
*/
if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) {
@@ -32676,7 +33557,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
}
} else {
-@@ -2105,10 +2105,10 @@ static int pcnet32_open(struct net_devic
+@@ -2105,10 +2105,10 @@ static int pcnet32_open(struct net_device *dev)
* There is really no good other way to handle multiple PHYs
* other than turning off all automatics
*/
@@ -32691,7 +33572,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
if (!(lp->options & PCNET32_PORT_ASEL)) {
/* setup ecmd */
-@@ -2118,7 +2118,7 @@ static int pcnet32_open(struct net_devic
+@@ -2118,7 +2118,7 @@ static int pcnet32_open(struct net_device *dev)
ethtool_cmd_speed_set(&ecmd,
(lp->options & PCNET32_PORT_100) ?
SPEED_100 : SPEED_10);
@@ -32700,7 +33581,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
if (lp->options & PCNET32_PORT_FD) {
ecmd.duplex = DUPLEX_FULL;
-@@ -2127,7 +2127,7 @@ static int pcnet32_open(struct net_devic
+@@ -2127,7 +2127,7 @@ static int pcnet32_open(struct net_device *dev)
ecmd.duplex = DUPLEX_HALF;
bcr9 |= ~(1 << 0);
}
@@ -32709,7 +33590,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
for (i = 0; i < PCNET32_MAX_PHYS; i++) {
-@@ -2158,9 +2158,9 @@ static int pcnet32_open(struct net_devic
+@@ -2158,9 +2158,9 @@ static int pcnet32_open(struct net_device *dev)
#ifdef DO_DXSUFLO
if (lp->dxsuflo) { /* Disable transmit stop on underflow */
@@ -32721,7 +33602,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
#endif
-@@ -2176,11 +2176,11 @@ static int pcnet32_open(struct net_devic
+@@ -2176,11 +2176,11 @@ static int pcnet32_open(struct net_device *dev)
napi_enable(&lp->napi);
/* Re-initialize the PCNET32, and start it when done. */
@@ -32737,7 +33618,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
netif_start_queue(dev);
-@@ -2192,19 +2192,19 @@ static int pcnet32_open(struct net_devic
+@@ -2192,19 +2192,19 @@ static int pcnet32_open(struct net_device *dev)
i = 0;
while (i++ < 100)
@@ -32769,7 +33650,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
err_free_irq:
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -2323,7 +2323,7 @@ static void pcnet32_restart(struct net_d
+@@ -2323,7 +2323,7 @@ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
/* wait for stop */
for (i = 0; i < 100; i++)
@@ -32778,7 +33659,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
break;
if (i >= 100)
-@@ -2335,13 +2335,13 @@ static void pcnet32_restart(struct net_d
+@@ -2335,13 +2335,13 @@ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
return;
/* ReInit Ring */
@@ -32795,7 +33676,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
static void pcnet32_tx_timeout(struct net_device *dev)
-@@ -2353,8 +2353,8 @@ static void pcnet32_tx_timeout(struct ne
+@@ -2353,8 +2353,8 @@ static void pcnet32_tx_timeout(struct net_device *dev)
/* Transmitter timeout, serious problems. */
if (pcnet32_debug & NETIF_MSG_DRV)
pr_err("%s: transmit timed out, status %4.4x, resetting\n",
@@ -32806,7 +33687,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
dev->stats.tx_errors++;
if (netif_msg_tx_err(lp)) {
int i;
-@@ -2397,7 +2397,7 @@ static netdev_tx_t pcnet32_start_xmit(st
+@@ -2397,7 +2397,7 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
netif_printk(lp, tx_queued, KERN_DEBUG, dev,
"%s() called, csr0 %4.4x\n",
@@ -32815,7 +33696,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
/* Default status -- will not enable Successful-TxDone
* interrupt when that option is available to us.
-@@ -2427,7 +2427,7 @@ static netdev_tx_t pcnet32_start_xmit(st
+@@ -2427,7 +2427,7 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb,
dev->stats.tx_bytes += skb->len;
/* Trigger an immediate send poll. */
@@ -32868,7 +33749,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
spin_unlock(&lp->lock);
-@@ -2520,20 +2520,20 @@ static int pcnet32_close(struct net_devi
+@@ -2520,20 +2520,20 @@ static int pcnet32_close(struct net_device *dev)
spin_lock_irqsave(&lp->lock, flags);
@@ -32893,7 +33774,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
spin_unlock_irqrestore(&lp->lock, flags);
-@@ -2556,7 +2556,7 @@ static struct net_device_stats *pcnet32_
+@@ -2556,7 +2556,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *dev)
unsigned long flags;
spin_lock_irqsave(&lp->lock, flags);
@@ -32902,7 +33783,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
spin_unlock_irqrestore(&lp->lock, flags);
return &dev->stats;
-@@ -2577,10 +2577,10 @@ static void pcnet32_load_multicast(struc
+@@ -2577,10 +2577,10 @@ static void pcnet32_load_multicast(struct net_device *dev)
if (dev->flags & IFF_ALLMULTI) {
ib->filter[0] = cpu_to_le32(~0U);
ib->filter[1] = cpu_to_le32(~0U);
@@ -32917,7 +33798,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
return;
}
/* clear the multicast filter */
-@@ -2594,7 +2594,7 @@ static void pcnet32_load_multicast(struc
+@@ -2594,7 +2594,7 @@ static void pcnet32_load_multicast(struct net_device *dev)
mcast_table[crc >> 4] |= cpu_to_le16(1 << (crc & 0xf));
}
for (i = 0; i < 4; i++)
@@ -32926,7 +33807,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
le16_to_cpu(mcast_table[i]));
}
-@@ -2609,28 +2609,28 @@ static void pcnet32_set_multicast_list(s
+@@ -2609,28 +2609,28 @@ static void pcnet32_set_multicast_list(struct net_device *dev)
spin_lock_irqsave(&lp->lock, flags);
suspended = pcnet32_suspend(dev, &flags, 0);
@@ -32961,7 +33842,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
pcnet32_restart(dev, CSR0_NORMAL);
netif_wake_queue(dev);
}
-@@ -2648,8 +2648,8 @@ static int mdio_read(struct net_device *
+@@ -2648,8 +2648,8 @@ static int mdio_read(struct net_device *dev, int phy_id, int reg_num)
if (!lp->mii)
return 0;
@@ -32972,7 +33853,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
return val_out;
}
-@@ -2663,8 +2663,8 @@ static void mdio_write(struct net_device
+@@ -2663,8 +2663,8 @@ static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val)
if (!lp->mii)
return;
@@ -32983,7 +33864,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-@@ -2741,7 +2741,7 @@ static void pcnet32_check_media(struct n
+@@ -2741,7 +2741,7 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
curr_link = mii_link_ok(&lp->mii_if);
} else {
ulong ioaddr = dev->base_addr; /* card base I/O address */
@@ -32992,7 +33873,7 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
if (!curr_link) {
if (prev_link || verbose) {
-@@ -2764,13 +2764,13 @@ static void pcnet32_check_media(struct n
+@@ -2764,13 +2764,13 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
(ecmd.duplex == DUPLEX_FULL)
? "full" : "half");
}
@@ -33008,10 +33889,11 @@ diff -urNp linux-3.1.4/drivers/net/pcnet32.c linux-3.1.4/drivers/net/pcnet32.c
}
} else {
netif_info(lp, link, dev, "link up\n");
-diff -urNp linux-3.1.4/drivers/net/ppp_generic.c linux-3.1.4/drivers/net/ppp_generic.c
---- linux-3.1.4/drivers/net/ppp_generic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/ppp_generic.c 2011-11-16 18:39:07.000000000 -0500
-@@ -987,7 +987,6 @@ ppp_net_ioctl(struct net_device *dev, st
+diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
+index edfa15d..002bfa9 100644
+--- a/drivers/net/ppp_generic.c
++++ b/drivers/net/ppp_generic.c
+@@ -987,7 +987,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
struct ppp_stats stats;
struct ppp_comp_stats cstats;
@@ -33019,7 +33901,7 @@ diff -urNp linux-3.1.4/drivers/net/ppp_generic.c linux-3.1.4/drivers/net/ppp_gen
switch (cmd) {
case SIOCGPPPSTATS:
-@@ -1009,8 +1008,7 @@ ppp_net_ioctl(struct net_device *dev, st
+@@ -1009,8 +1008,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
break;
case SIOCGPPPVER:
@@ -33029,9 +33911,10 @@ diff -urNp linux-3.1.4/drivers/net/ppp_generic.c linux-3.1.4/drivers/net/ppp_gen
break;
err = 0;
break;
-diff -urNp linux-3.1.4/drivers/net/r8169.c linux-3.1.4/drivers/net/r8169.c
---- linux-3.1.4/drivers/net/r8169.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/r8169.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
+index 6d657ca..d1be94b 100644
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
@@ -663,12 +663,12 @@ struct rtl8169_private {
struct mdio_ops {
void (*write)(void __iomem *, int, int);
@@ -33047,10 +33930,11 @@ diff -urNp linux-3.1.4/drivers/net/r8169.c linux-3.1.4/drivers/net/r8169.c
int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv);
int (*get_settings)(struct net_device *, struct ethtool_cmd *);
-diff -urNp linux-3.1.4/drivers/net/sis190.c linux-3.1.4/drivers/net/sis190.c
---- linux-3.1.4/drivers/net/sis190.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/sis190.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1624,7 +1624,7 @@ static int __devinit sis190_get_mac_addr
+diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
+index 3c0f131..17f8b02 100644
+--- a/drivers/net/sis190.c
++++ b/drivers/net/sis190.c
+@@ -1624,7 +1624,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
struct net_device *dev)
{
@@ -33059,9 +33943,10 @@ diff -urNp linux-3.1.4/drivers/net/sis190.c linux-3.1.4/drivers/net/sis190.c
struct sis190_private *tp = netdev_priv(dev);
struct pci_dev *isa_bridge;
u8 reg, tmp8;
-diff -urNp linux-3.1.4/drivers/net/sundance.c linux-3.1.4/drivers/net/sundance.c
---- linux-3.1.4/drivers/net/sundance.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/sundance.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
+index 4793df8..44c9849 100644
+--- a/drivers/net/sundance.c
++++ b/drivers/net/sundance.c
@@ -218,7 +218,7 @@ enum {
struct pci_id_info {
const char *name;
@@ -33071,9 +33956,10 @@ diff -urNp linux-3.1.4/drivers/net/sundance.c linux-3.1.4/drivers/net/sundance.c
{"D-Link DFE-550TX FAST Ethernet Adapter"},
{"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
{"D-Link DFE-580TX 4 port Server Adapter"},
-diff -urNp linux-3.1.4/drivers/net/tg3.h linux-3.1.4/drivers/net/tg3.h
---- linux-3.1.4/drivers/net/tg3.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tg3.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
+index 2ea456d..3ad9523 100644
+--- a/drivers/net/tg3.h
++++ b/drivers/net/tg3.h
@@ -134,6 +134,7 @@
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A1 0x4001
@@ -33082,10 +33968,11 @@ diff -urNp linux-3.1.4/drivers/net/tg3.h linux-3.1.4/drivers/net/tg3.h
#define CHIPREV_ID_5750_C2 0x4202
#define CHIPREV_ID_5752_A0_HW 0x5000
#define CHIPREV_ID_5752_A0 0x6000
-diff -urNp linux-3.1.4/drivers/net/tokenring/abyss.c linux-3.1.4/drivers/net/tokenring/abyss.c
---- linux-3.1.4/drivers/net/tokenring/abyss.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tokenring/abyss.c 2011-11-16 18:39:07.000000000 -0500
-@@ -451,10 +451,12 @@ static struct pci_driver abyss_driver =
+diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
+index 515f122..41dd273 100644
+--- a/drivers/net/tokenring/abyss.c
++++ b/drivers/net/tokenring/abyss.c
+@@ -451,10 +451,12 @@ static struct pci_driver abyss_driver = {
static int __init abyss_init (void)
{
@@ -33101,10 +33988,11 @@ diff -urNp linux-3.1.4/drivers/net/tokenring/abyss.c linux-3.1.4/drivers/net/tok
return pci_register_driver(&abyss_driver);
}
-diff -urNp linux-3.1.4/drivers/net/tokenring/madgemc.c linux-3.1.4/drivers/net/tokenring/madgemc.c
---- linux-3.1.4/drivers/net/tokenring/madgemc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tokenring/madgemc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -744,9 +744,11 @@ static struct mca_driver madgemc_driver
+diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
+index 6153cfd..cf69c1c 100644
+--- a/drivers/net/tokenring/madgemc.c
++++ b/drivers/net/tokenring/madgemc.c
+@@ -744,9 +744,11 @@ static struct mca_driver madgemc_driver = {
static int __init madgemc_init (void)
{
@@ -33119,9 +34007,10 @@ diff -urNp linux-3.1.4/drivers/net/tokenring/madgemc.c linux-3.1.4/drivers/net/t
return mca_register_driver (&madgemc_driver);
}
-diff -urNp linux-3.1.4/drivers/net/tokenring/proteon.c linux-3.1.4/drivers/net/tokenring/proteon.c
---- linux-3.1.4/drivers/net/tokenring/proteon.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tokenring/proteon.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
+index 8d362e6..f91cc52 100644
+--- a/drivers/net/tokenring/proteon.c
++++ b/drivers/net/tokenring/proteon.c
@@ -353,9 +353,11 @@ static int __init proteon_init(void)
struct platform_device *pdev;
int i, num = 0, err = 0;
@@ -33137,9 +34026,10 @@ diff -urNp linux-3.1.4/drivers/net/tokenring/proteon.c linux-3.1.4/drivers/net/t
err = platform_driver_register(&proteon_driver);
if (err)
-diff -urNp linux-3.1.4/drivers/net/tokenring/skisa.c linux-3.1.4/drivers/net/tokenring/skisa.c
---- linux-3.1.4/drivers/net/tokenring/skisa.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tokenring/skisa.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
+index 46db5c5..37c1536 100644
+--- a/drivers/net/tokenring/skisa.c
++++ b/drivers/net/tokenring/skisa.c
@@ -363,9 +363,11 @@ static int __init sk_isa_init(void)
struct platform_device *pdev;
int i, num = 0, err = 0;
@@ -33155,10 +34045,11 @@ diff -urNp linux-3.1.4/drivers/net/tokenring/skisa.c linux-3.1.4/drivers/net/tok
err = platform_driver_register(&sk_isa_driver);
if (err)
-diff -urNp linux-3.1.4/drivers/net/tulip/de2104x.c linux-3.1.4/drivers/net/tulip/de2104x.c
---- linux-3.1.4/drivers/net/tulip/de2104x.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tulip/de2104x.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1795,6 +1795,8 @@ static void __devinit de21041_get_srom_i
+diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
+index ce90efc..2676f89 100644
+--- a/drivers/net/tulip/de2104x.c
++++ b/drivers/net/tulip/de2104x.c
+@@ -1795,6 +1795,8 @@ static void __devinit de21041_get_srom_info (struct de_private *de)
struct de_srom_info_leaf *il;
void *bufp;
@@ -33167,10 +34058,11 @@ diff -urNp linux-3.1.4/drivers/net/tulip/de2104x.c linux-3.1.4/drivers/net/tulip
/* download entire eeprom */
for (i = 0; i < DE_EEPROM_WORDS; i++)
((__le16 *)ee_data)[i] =
-diff -urNp linux-3.1.4/drivers/net/tulip/de4x5.c linux-3.1.4/drivers/net/tulip/de4x5.c
---- linux-3.1.4/drivers/net/tulip/de4x5.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tulip/de4x5.c 2011-11-16 18:39:07.000000000 -0500
-@@ -5397,7 +5397,7 @@ de4x5_ioctl(struct net_device *dev, stru
+diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
+index 959b410..c97fac2 100644
+--- a/drivers/net/tulip/de4x5.c
++++ b/drivers/net/tulip/de4x5.c
+@@ -5397,7 +5397,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
for (i=0; i<ETH_ALEN; i++) {
tmp.addr[i] = dev->dev_addr[i];
}
@@ -33179,7 +34071,7 @@ diff -urNp linux-3.1.4/drivers/net/tulip/de4x5.c linux-3.1.4/drivers/net/tulip/d
break;
case DE4X5_SET_HWADDR: /* Set the hardware address */
-@@ -5437,7 +5437,7 @@ de4x5_ioctl(struct net_device *dev, stru
+@@ -5437,7 +5437,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irqsave(&lp->lock, flags);
memcpy(&statbuf, &lp->pktStats, ioc->len);
spin_unlock_irqrestore(&lp->lock, flags);
@@ -33188,10 +34080,11 @@ diff -urNp linux-3.1.4/drivers/net/tulip/de4x5.c linux-3.1.4/drivers/net/tulip/d
return -EFAULT;
break;
}
-diff -urNp linux-3.1.4/drivers/net/tulip/eeprom.c linux-3.1.4/drivers/net/tulip/eeprom.c
---- linux-3.1.4/drivers/net/tulip/eeprom.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tulip/eeprom.c 2011-11-16 18:39:07.000000000 -0500
-@@ -81,7 +81,7 @@ static struct eeprom_fixup eeprom_fixups
+diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
+index fa5eee9..e074432 100644
+--- a/drivers/net/tulip/eeprom.c
++++ b/drivers/net/tulip/eeprom.c
+@@ -81,7 +81,7 @@ static struct eeprom_fixup eeprom_fixups[] __devinitdata = {
{NULL}};
@@ -33200,9 +34093,10 @@ diff -urNp linux-3.1.4/drivers/net/tulip/eeprom.c linux-3.1.4/drivers/net/tulip/
"21140 non-MII",
"21140 MII PHY",
"21142 Serial PHY",
-diff -urNp linux-3.1.4/drivers/net/tulip/winbond-840.c linux-3.1.4/drivers/net/tulip/winbond-840.c
---- linux-3.1.4/drivers/net/tulip/winbond-840.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/tulip/winbond-840.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
+index 862eadf..3eee1e6 100644
+--- a/drivers/net/tulip/winbond-840.c
++++ b/drivers/net/tulip/winbond-840.c
@@ -236,7 +236,7 @@ struct pci_id_info {
int drv_flags; /* Driver use, intended as capability flags. */
};
@@ -33212,9 +34106,10 @@ diff -urNp linux-3.1.4/drivers/net/tulip/winbond-840.c linux-3.1.4/drivers/net/t
{ /* Sometime a Level-One switch card. */
"Winbond W89c840", CanHaveMII | HasBrokenTx | FDXOnNoMII},
{ "Winbond W89c840", CanHaveMII | HasBrokenTx},
-diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
---- linux-3.1.4/drivers/net/usb/hso.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/usb/hso.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
+index 304fe78..db112fa 100644
+--- a/drivers/net/usb/hso.c
++++ b/drivers/net/usb/hso.c
@@ -71,7 +71,7 @@
#include <asm/byteorder.h>
#include <linux/serial_core.h>
@@ -33233,7 +34128,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
spinlock_t serial_lock;
int (*write_data) (struct hso_serial *serial);
-@@ -1190,7 +1190,7 @@ static void put_rxbuf_data_and_resubmit_
+@@ -1190,7 +1190,7 @@ static void put_rxbuf_data_and_resubmit_ctrl_urb(struct hso_serial *serial)
struct urb *urb;
urb = serial->rx_urb[0];
@@ -33242,7 +34137,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
count = put_rxbuf_data(urb, serial);
if (count == -1)
return;
-@@ -1226,7 +1226,7 @@ static void hso_std_serial_read_bulk_cal
+@@ -1226,7 +1226,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
DUMP1(urb->transfer_buffer, urb->actual_length);
/* Anyone listening? */
@@ -33251,7 +34146,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
return;
if (status == 0) {
-@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_st
+@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
spin_unlock_irq(&serial->serial_lock);
/* check for port already opened, if not set the termios */
@@ -33261,7 +34156,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
serial->rx_state = RX_IDLE;
/* Force default termio settings */
_hso_serial_set_termios(tty, NULL);
-@@ -1324,7 +1323,7 @@ static int hso_serial_open(struct tty_st
+@@ -1324,7 +1323,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
result = hso_start_serial_device(serial->parent, GFP_KERNEL);
if (result) {
hso_stop_serial_device(serial->parent);
@@ -33270,7 +34165,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
kref_put(&serial->parent->ref, hso_serial_ref_free);
}
} else {
-@@ -1361,10 +1360,10 @@ static void hso_serial_close(struct tty_
+@@ -1361,10 +1360,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
/* reset the rts and dtr */
/* do the actual close */
@@ -33284,7 +34179,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
spin_lock_irq(&serial->serial_lock);
if (serial->tty == tty) {
serial->tty->driver_data = NULL;
-@@ -1446,7 +1445,7 @@ static void hso_serial_set_termios(struc
+@@ -1446,7 +1445,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
/* the actual setup */
spin_lock_irqsave(&serial->serial_lock, flags);
@@ -33293,7 +34188,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
_hso_serial_set_termios(tty, old);
else
tty->termios = old;
-@@ -1905,7 +1904,7 @@ static void intr_callback(struct urb *ur
+@@ -1905,7 +1904,7 @@ static void intr_callback(struct urb *urb)
D1("Pending read interrupt on port %d\n", i);
spin_lock(&serial->serial_lock);
if (serial->rx_state == RX_IDLE &&
@@ -33302,7 +34197,7 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
/* Setup and send a ctrl req read on
* port i */
if (!serial->rx_urb_filled[0]) {
-@@ -3098,7 +3097,7 @@ static int hso_resume(struct usb_interfa
+@@ -3098,7 +3097,7 @@ static int hso_resume(struct usb_interface *iface)
/* Start all serial ports */
for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
if (serial_table[i] && (serial_table[i]->interface == iface)) {
@@ -33311,10 +34206,11 @@ diff -urNp linux-3.1.4/drivers/net/usb/hso.c linux-3.1.4/drivers/net/usb/hso.c
result =
hso_start_serial_device(serial_table[i], GFP_NOIO);
hso_kick_transmit(dev2ser(serial_table[i]));
-diff -urNp linux-3.1.4/drivers/net/vmxnet3/vmxnet3_ethtool.c linux-3.1.4/drivers/net/vmxnet3/vmxnet3_ethtool.c
---- linux-3.1.4/drivers/net/vmxnet3/vmxnet3_ethtool.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/vmxnet3/vmxnet3_ethtool.c 2011-11-16 18:39:07.000000000 -0500
-@@ -601,8 +601,7 @@ vmxnet3_set_rss_indir(struct net_device
+diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
+index 27400ed..c796e05 100644
+--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
++++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
+@@ -601,8 +601,7 @@ vmxnet3_set_rss_indir(struct net_device *netdev,
* Return with error code if any of the queue indices
* is out of range
*/
@@ -33324,9 +34220,10 @@ diff -urNp linux-3.1.4/drivers/net/vmxnet3/vmxnet3_ethtool.c linux-3.1.4/drivers
return -EINVAL;
}
-diff -urNp linux-3.1.4/drivers/net/vxge/vxge-config.h linux-3.1.4/drivers/net/vxge/vxge-config.h
---- linux-3.1.4/drivers/net/vxge/vxge-config.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/vxge/vxge-config.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h
+index dd36258..e47fd31 100644
+--- a/drivers/net/vxge/vxge-config.h
++++ b/drivers/net/vxge/vxge-config.h
@@ -514,7 +514,7 @@ struct vxge_hw_uld_cbs {
void (*link_down)(struct __vxge_hw_device *devh);
void (*crit_err)(struct __vxge_hw_device *devh,
@@ -33336,10 +34233,11 @@ diff -urNp linux-3.1.4/drivers/net/vxge/vxge-config.h linux-3.1.4/drivers/net/vx
/*
* struct __vxge_hw_blockpool_entry - Block private data structure
-diff -urNp linux-3.1.4/drivers/net/vxge/vxge-main.c linux-3.1.4/drivers/net/vxge/vxge-main.c
---- linux-3.1.4/drivers/net/vxge/vxge-main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/vxge/vxge-main.c 2011-11-16 18:40:22.000000000 -0500
-@@ -100,6 +100,8 @@ static inline void VXGE_COMPLETE_VPATH_T
+diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
+index 178348a2..18bb433 100644
+--- a/drivers/net/vxge/vxge-main.c
++++ b/drivers/net/vxge/vxge-main.c
+@@ -100,6 +100,8 @@ static inline void VXGE_COMPLETE_VPATH_TX(struct vxge_fifo *fifo)
struct sk_buff *completed[NR_SKB_COMPLETED];
int more;
@@ -33348,7 +34246,7 @@ diff -urNp linux-3.1.4/drivers/net/vxge/vxge-main.c linux-3.1.4/drivers/net/vxge
do {
more = 0;
skb_ptr = completed;
-@@ -1915,6 +1917,8 @@ static enum vxge_hw_status vxge_rth_conf
+@@ -1915,6 +1917,8 @@ static enum vxge_hw_status vxge_rth_configure(struct vxgedev *vdev)
u8 mtable[256] = {0}; /* CPU to vpath mapping */
int index;
@@ -33357,9 +34255,10 @@ diff -urNp linux-3.1.4/drivers/net/vxge/vxge-main.c linux-3.1.4/drivers/net/vxge
/*
* Filling
* - itable with bucket numbers
-diff -urNp linux-3.1.4/drivers/net/vxge/vxge-traffic.h linux-3.1.4/drivers/net/vxge/vxge-traffic.h
---- linux-3.1.4/drivers/net/vxge/vxge-traffic.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/vxge/vxge-traffic.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/vxge/vxge-traffic.h b/drivers/net/vxge/vxge-traffic.h
+index 4a518a3..936b334 100644
+--- a/drivers/net/vxge/vxge-traffic.h
++++ b/drivers/net/vxge/vxge-traffic.h
@@ -2088,7 +2088,7 @@ struct vxge_hw_mempool_cbs {
struct vxge_hw_mempool_dma *dma_object,
u32 index,
@@ -33369,10 +34268,11 @@ diff -urNp linux-3.1.4/drivers/net/vxge/vxge-traffic.h linux-3.1.4/drivers/net/v
#define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \
((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next)
-diff -urNp linux-3.1.4/drivers/net/wan/hdlc_x25.c linux-3.1.4/drivers/net/wan/hdlc_x25.c
---- linux-3.1.4/drivers/net/wan/hdlc_x25.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wan/hdlc_x25.c 2011-11-16 18:39:07.000000000 -0500
-@@ -134,16 +134,16 @@ static netdev_tx_t x25_xmit(struct sk_bu
+diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
+index 56aeb01..547f71f 100644
+--- a/drivers/net/wan/hdlc_x25.c
++++ b/drivers/net/wan/hdlc_x25.c
+@@ -134,16 +134,16 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
static int x25_open(struct net_device *dev)
{
@@ -33397,10 +34297,11 @@ diff -urNp linux-3.1.4/drivers/net/wan/hdlc_x25.c linux-3.1.4/drivers/net/wan/hd
result = lapb_register(dev, &cb);
if (result != LAPB_OK)
return result;
-diff -urNp linux-3.1.4/drivers/net/wimax/i2400m/usb-fw.c linux-3.1.4/drivers/net/wimax/i2400m/usb-fw.c
---- linux-3.1.4/drivers/net/wimax/i2400m/usb-fw.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wimax/i2400m/usb-fw.c 2011-11-16 18:40:22.000000000 -0500
-@@ -287,6 +287,8 @@ ssize_t i2400mu_bus_bm_wait_for_ack(stru
+diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
+index 1fda46c..f2858f2 100644
+--- a/drivers/net/wimax/i2400m/usb-fw.c
++++ b/drivers/net/wimax/i2400m/usb-fw.c
+@@ -287,6 +287,8 @@ ssize_t i2400mu_bus_bm_wait_for_ack(struct i2400m *i2400m,
int do_autopm = 1;
DECLARE_COMPLETION_ONSTACK(notif_completion);
@@ -33409,10 +34310,11 @@ diff -urNp linux-3.1.4/drivers/net/wimax/i2400m/usb-fw.c linux-3.1.4/drivers/net
d_fnstart(8, dev, "(i2400m %p ack %p size %zu)\n",
i2400m, ack, ack_size);
BUG_ON(_ack == i2400m->bm_ack_buf);
-diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wireless/airo.c
---- linux-3.1.4/drivers/net/wireless/airo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/airo.c 2011-11-16 18:40:22.000000000 -0500
-@@ -3003,6 +3003,8 @@ static void airo_process_scan_results (s
+diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
+index e1b3e3c..e413f18 100644
+--- a/drivers/net/wireless/airo.c
++++ b/drivers/net/wireless/airo.c
+@@ -3003,6 +3003,8 @@ static void airo_process_scan_results (struct airo_info *ai) {
BSSListElement * loop_net;
BSSListElement * tmp_net;
@@ -33421,7 +34323,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
/* Blow away current list of scan results */
list_for_each_entry_safe (loop_net, tmp_net, &ai->network_list, list) {
list_move_tail (&loop_net->list, &ai->network_free_list);
-@@ -3794,6 +3796,8 @@ static u16 setup_card(struct airo_info *
+@@ -3794,6 +3796,8 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
WepKeyRid wkr;
int rc;
@@ -33430,7 +34332,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
memset( &mySsid, 0, sizeof( mySsid ) );
kfree (ai->flash);
ai->flash = NULL;
-@@ -4753,6 +4757,8 @@ static int proc_stats_rid_open( struct i
+@@ -4753,6 +4757,8 @@ static int proc_stats_rid_open( struct inode *inode,
__le32 *vals = stats.vals;
int len;
@@ -33439,7 +34341,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
return -ENOMEM;
data = file->private_data;
-@@ -5476,6 +5482,8 @@ static int proc_BSSList_open( struct ino
+@@ -5476,6 +5482,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
/* If doLoseSync is not 1, we won't do a Lose Sync */
int doLoseSync = -1;
@@ -33448,7 +34350,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
return -ENOMEM;
data = file->private_data;
-@@ -7181,6 +7189,8 @@ static int airo_get_aplist(struct net_de
+@@ -7181,6 +7189,8 @@ static int airo_get_aplist(struct net_device *dev,
int i;
int loseSync = capable(CAP_NET_ADMIN) ? 1: -1;
@@ -33457,7 +34359,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
qual = kmalloc(IW_MAX_AP * sizeof(*qual), GFP_KERNEL);
if (!qual)
return -ENOMEM;
-@@ -7741,6 +7751,8 @@ static void airo_read_wireless_stats(str
+@@ -7741,6 +7751,8 @@ static void airo_read_wireless_stats(struct airo_info *local)
CapabilityRid cap_rid;
__le32 *vals = stats_rid.vals;
@@ -33466,10 +34368,23 @@ diff -urNp linux-3.1.4/drivers/net/wireless/airo.c linux-3.1.4/drivers/net/wirel
/* Get stats out of the card */
clear_bit(JOB_WSTATS, &local->jobs);
if (local->power.event) {
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c
---- linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c 2011-11-16 19:08:21.000000000 -0500
-@@ -203,6 +203,8 @@ static ssize_t read_file_beacon(struct f
+diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
+index 17c4b56..00d836f 100644
+--- a/drivers/net/wireless/ath/ath.h
++++ b/drivers/net/wireless/ath/ath.h
+@@ -121,6 +121,7 @@ struct ath_ops {
+ void (*write_flush) (void *);
+ u32 (*rmw)(void *, u32 reg_offset, u32 set, u32 clr);
+ };
++typedef struct ath_ops __no_const ath_ops_no_const;
+
+ struct ath_common;
+ struct ath_bus_ops;
+diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
+index ccca724..7afbadc 100644
+--- a/drivers/net/wireless/ath/ath5k/debug.c
++++ b/drivers/net/wireless/ath/ath5k/debug.c
+@@ -203,6 +203,8 @@ static ssize_t read_file_beacon(struct file *file, char __user *user_buf,
unsigned int v;
u64 tsf;
@@ -33478,7 +34393,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
v = ath5k_hw_reg_read(ah, AR5K_BEACON);
len += snprintf(buf + len, sizeof(buf) - len,
"%-24s0x%08x\tintval: %d\tTIM: 0x%x\n",
-@@ -321,6 +323,8 @@ static ssize_t read_file_debug(struct fi
+@@ -321,6 +323,8 @@ static ssize_t read_file_debug(struct file *file, char __user *user_buf,
unsigned int len = 0;
unsigned int i;
@@ -33487,7 +34402,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len,
"DEBUG LEVEL: 0x%08x\n\n", ah->debug.level);
-@@ -492,6 +496,8 @@ static ssize_t read_file_misc(struct fil
+@@ -492,6 +496,8 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
unsigned int len = 0;
u32 filt = ath5k_hw_get_rx_filter(ah);
@@ -33496,7 +34411,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len, "bssid-mask: %pM\n",
ah->bssidmask);
len += snprintf(buf + len, sizeof(buf) - len, "filter-flags: 0x%x ",
-@@ -548,6 +554,8 @@ static ssize_t read_file_frameerrors(str
+@@ -548,6 +554,8 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf,
unsigned int len = 0;
int i;
@@ -33505,7 +34420,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len,
"RX\n---------------------\n");
len += snprintf(buf + len, sizeof(buf) - len, "CRC\t%u\t(%u%%)\n",
-@@ -665,6 +673,8 @@ static ssize_t read_file_ani(struct file
+@@ -665,6 +673,8 @@ static ssize_t read_file_ani(struct file *file, char __user *user_buf,
char buf[700];
unsigned int len = 0;
@@ -33514,7 +34429,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len,
"HW has PHY error counters:\t%s\n",
ah->ah_capabilities.cap_has_phyerr_counters ?
-@@ -829,6 +839,8 @@ static ssize_t read_file_queue(struct fi
+@@ -829,6 +839,8 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
struct ath5k_buf *bf, *bf0;
int i, n;
@@ -33523,10 +34438,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath5k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len,
"available txbuffers: %d\n", ah->txbuf_len);
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_calib.c linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_calib.c
---- linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_calib.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_calib.c 2011-11-16 18:40:22.000000000 -0500
-@@ -758,6 +758,8 @@ static void ar9003_hw_tx_iq_cal_post_pro
+diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+index 7c2aaad..ad14dee 100644
+--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+@@ -758,6 +758,8 @@ static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah)
int i, im, j;
int nmeasurement;
@@ -33535,10 +34451,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_calib.c linux-3.1.4
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (ah->txchainmask & (1 << i))
num_chains++;
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_paprd.c linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
---- linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_paprd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_paprd.c 2011-11-16 18:40:22.000000000 -0500
-@@ -406,6 +406,8 @@ static bool create_pa_curve(u32 *data_L,
+diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+index f80d1d6..08b773d 100644
+--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+@@ -406,6 +406,8 @@ static bool create_pa_curve(u32 *data_L, u32 *data_U, u32 *pa_table, u16 *gain)
int theta_low_bin = 0;
int i;
@@ -33547,10 +34464,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/ar9003_paprd.c linux-3.1.4
/* disregard any bin that contains <= 16 samples */
thresh_accum_cnt = 16;
scale_factor = 5;
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c
---- linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c 2011-11-16 18:40:22.000000000 -0500
-@@ -387,6 +387,8 @@ static ssize_t read_file_interrupt(struc
+diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
+index d1eb896..8b67cd4 100644
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -387,6 +387,8 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
char buf[512];
unsigned int len = 0;
@@ -33559,7 +34477,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c linux-3.1.4/driver
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);
-@@ -477,6 +479,8 @@ static ssize_t read_file_wiphy(struct fi
+@@ -477,6 +479,8 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
u8 addr[ETH_ALEN];
u32 tmp;
@@ -33568,10 +34486,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/debug.c linux-3.1.4/driver
len += snprintf(buf + len, sizeof(buf) - len,
"%s (chan=%d center-freq: %d MHz channel-type: %d (%s))\n",
wiphy_name(sc->hw->wiphy),
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
---- linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c 2011-11-16 18:40:22.000000000 -0500
-@@ -31,6 +31,8 @@ static ssize_t read_file_tgt_int_stats(s
+diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+index d3ff33c..309398e 100644
+--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
++++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+@@ -31,6 +31,8 @@ static ssize_t read_file_tgt_int_stats(struct file *file, char __user *user_buf,
unsigned int len = 0;
int ret = 0;
@@ -33580,7 +34499,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
memset(&cmd_rsp, 0, sizeof(cmd_rsp));
ath9k_htc_ps_wakeup(priv);
-@@ -89,6 +91,8 @@ static ssize_t read_file_tgt_tx_stats(st
+@@ -89,6 +91,8 @@ static ssize_t read_file_tgt_tx_stats(struct file *file, char __user *user_buf,
unsigned int len = 0;
int ret = 0;
@@ -33589,7 +34508,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
memset(&cmd_rsp, 0, sizeof(cmd_rsp));
ath9k_htc_ps_wakeup(priv);
-@@ -159,6 +163,8 @@ static ssize_t read_file_tgt_rx_stats(st
+@@ -159,6 +163,8 @@ static ssize_t read_file_tgt_rx_stats(struct file *file, char __user *user_buf,
unsigned int len = 0;
int ret = 0;
@@ -33598,7 +34517,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
memset(&cmd_rsp, 0, sizeof(cmd_rsp));
ath9k_htc_ps_wakeup(priv);
-@@ -203,6 +209,8 @@ static ssize_t read_file_xmit(struct fil
+@@ -203,6 +209,8 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
char buf[512];
unsigned int len = 0;
@@ -33607,7 +34526,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "Buffers queued",
priv->debug.tx_stats.buf_queued);
-@@ -376,6 +384,8 @@ static ssize_t read_file_slot(struct fil
+@@ -376,6 +384,8 @@ static ssize_t read_file_slot(struct file *file, char __user *user_buf,
char buf[512];
unsigned int len = 0;
@@ -33616,7 +34535,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
spin_lock_bh(&priv->tx.tx_lock);
len += snprintf(buf + len, sizeof(buf) - len, "TX slot bitmap : ");
-@@ -411,6 +421,8 @@ static ssize_t read_file_queue(struct fi
+@@ -411,6 +421,8 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
char buf[512];
unsigned int len = 0;
@@ -33625,9 +34544,10 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/htc_drv_debug.c linux-3.1.
len += snprintf(buf + len, sizeof(buf) - len, "%20s : %10u\n",
"Mgmt endpoint", skb_queue_len(&priv->tx.mgmt_ep_queue));
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/hw.h linux-3.1.4/drivers/net/wireless/ath/ath9k/hw.h
---- linux-3.1.4/drivers/net/wireless/ath/ath9k/hw.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath9k/hw.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
+index c798890..c19a8fb 100644
+--- a/drivers/net/wireless/ath/ath9k/hw.h
++++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -588,7 +588,7 @@ struct ath_hw_private_ops {
/* ANI */
@@ -33655,21 +34575,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath9k/hw.h linux-3.1.4/drivers/n
struct ieee80211_hw *hw;
struct ath_common common;
-diff -urNp linux-3.1.4/drivers/net/wireless/ath/ath.h linux-3.1.4/drivers/net/wireless/ath/ath.h
---- linux-3.1.4/drivers/net/wireless/ath/ath.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ath/ath.h 2011-11-16 18:39:07.000000000 -0500
-@@ -121,6 +121,7 @@ struct ath_ops {
- void (*write_flush) (void *);
- u32 (*rmw)(void *, u32 reg_offset, u32 set, u32 clr);
- };
-+typedef struct ath_ops __no_const ath_ops_no_const;
-
- struct ath_common;
- struct ath_bus_ops;
-diff -urNp linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c
---- linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c 2011-11-16 18:40:22.000000000 -0500
-@@ -2102,6 +2102,8 @@ static int ipw2100_set_essid(struct ipw2
+diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
+index ef9ad79..f5f8d80 100644
+--- a/drivers/net/wireless/ipw2x00/ipw2100.c
++++ b/drivers/net/wireless/ipw2x00/ipw2100.c
+@@ -2102,6 +2102,8 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
int err;
DECLARE_SSID_BUF(ssid);
@@ -33678,7 +34588,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c linux-3.1.4/driver
IPW_DEBUG_HC("SSID: '%s'\n", print_ssid(ssid, essid, ssid_len));
if (ssid_len)
-@@ -5451,6 +5453,8 @@ static int ipw2100_set_key(struct ipw210
+@@ -5451,6 +5453,8 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
struct ipw2100_wep_key *wep_key = (void *)cmd.host_command_parameters;
int err;
@@ -33687,10 +34597,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ipw2x00/ipw2100.c linux-3.1.4/driver
IPW_DEBUG_HC("WEP_KEY_INFO: index = %d, len = %d/%d\n",
idx, keylen, len);
-diff -urNp linux-3.1.4/drivers/net/wireless/ipw2x00/libipw_rx.c linux-3.1.4/drivers/net/wireless/ipw2x00/libipw_rx.c
---- linux-3.1.4/drivers/net/wireless/ipw2x00/libipw_rx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/ipw2x00/libipw_rx.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1565,6 +1565,8 @@ static void libipw_process_probe_respons
+diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
+index 32a9966..de69787 100644
+--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
++++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
+@@ -1565,6 +1565,8 @@ static void libipw_process_probe_response(struct libipw_device
unsigned long flags;
DECLARE_SSID_BUF(ssid);
@@ -33699,10 +34610,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/ipw2x00/libipw_rx.c linux-3.1.4/driv
LIBIPW_DEBUG_SCAN("'%s' (%pM"
"): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n",
print_ssid(ssid, info_element->data, info_element->len),
-diff -urNp linux-3.1.4/drivers/net/wireless/iwlegacy/iwl3945-base.c linux-3.1.4/drivers/net/wireless/iwlegacy/iwl3945-base.c
---- linux-3.1.4/drivers/net/wireless/iwlegacy/iwl3945-base.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/iwlegacy/iwl3945-base.c 2011-11-16 18:39:07.000000000 -0500
-@@ -3687,7 +3687,9 @@ static int iwl3945_pci_probe(struct pci_
+diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
+index 66ee1562..b90412b 100644
+--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
++++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
+@@ -3687,7 +3687,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
*/
if (iwl3945_mod_params.disable_hw_scan) {
IWL_DEBUG_INFO(priv, "Disabling hw_scan\n");
@@ -33713,10 +34625,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwlegacy/iwl3945-base.c linux-3.1.4/
}
IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
-diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
---- linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c 2011-11-16 18:40:22.000000000 -0500
-@@ -920,6 +920,8 @@ static void rs_tx_status(void *priv_r, s
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+index 3789ff4..22ab151 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+@@ -920,6 +920,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
struct iwl_rxon_context *ctx = sta_priv->common.ctx;
@@ -33725,7 +34638,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-3.1.4/dri
IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n");
/* Treat uninitialized rate scaling data same as non-existing. */
-@@ -2931,6 +2933,8 @@ static void rs_fill_link_cmd(struct iwl_
+@@ -2931,6 +2933,8 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
container_of(lq_sta, struct iwl_station_priv, lq_sta);
struct iwl_link_quality_cmd *lq_cmd = &lq_sta->lq;
@@ -33734,10 +34647,26 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-3.1.4/dri
/* Override starting rate (index 0) if needed for debug purposes */
rs_dbgfs_set_mcs(lq_sta, &new_rate, index);
-diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c
---- linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c 2011-11-16 18:40:22.000000000 -0500
-@@ -561,6 +561,8 @@ static ssize_t iwl_dbgfs_status_read(str
+diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
+index f9a407e..a6f2bb7 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
++++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
+@@ -68,8 +68,8 @@ do { \
+ } while (0)
+
+ #else
+-#define IWL_DEBUG(__priv, level, fmt, args...)
+-#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
++#define IWL_DEBUG(__priv, level, fmt, args...) do {} while (0)
++#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) do {} while (0)
+ static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
+ const void *p, u32 len)
+ {}
+diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+index ec1485b..900c3bd 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
++++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+@@ -561,6 +561,8 @@ static ssize_t iwl_dbgfs_status_read(struct file *file,
int pos = 0;
const size_t bufsz = sizeof(buf);
@@ -33746,7 +34675,7 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-3.1.4/dr
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_HCMD_ACTIVE:\t %d\n",
test_bit(STATUS_HCMD_ACTIVE, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_INT_ENABLED:\t %d\n",
-@@ -693,6 +695,8 @@ static ssize_t iwl_dbgfs_qos_read(struct
+@@ -693,6 +695,8 @@ static ssize_t iwl_dbgfs_qos_read(struct file *file, char __user *user_buf,
char buf[256 * NUM_IWL_RXON_CTX];
const size_t bufsz = sizeof(buf);
@@ -33755,24 +34684,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debugfs.c linux-3.1.4/dr
for_each_context(priv, ctx) {
pos += scnprintf(buf + pos, bufsz - pos, "context %d:\n",
ctx->ctxid);
-diff -urNp linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debug.h linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debug.h
---- linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-11-16 18:39:07.000000000 -0500
-@@ -68,8 +68,8 @@ do {
- } while (0)
-
- #else
--#define IWL_DEBUG(__priv, level, fmt, args...)
--#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
-+#define IWL_DEBUG(__priv, level, fmt, args...) do {} while (0)
-+#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) do {} while (0)
- static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
- const void *p, u32 len)
- {}
-diff -urNp linux-3.1.4/drivers/net/wireless/iwmc3200wifi/debugfs.c linux-3.1.4/drivers/net/wireless/iwmc3200wifi/debugfs.c
---- linux-3.1.4/drivers/net/wireless/iwmc3200wifi/debugfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/iwmc3200wifi/debugfs.c 2011-11-16 18:40:22.000000000 -0500
-@@ -327,6 +327,8 @@ static ssize_t iwm_debugfs_fw_err_read(s
+diff --git a/drivers/net/wireless/iwmc3200wifi/debugfs.c b/drivers/net/wireless/iwmc3200wifi/debugfs.c
+index 0a0cc96..fd49ad8 100644
+--- a/drivers/net/wireless/iwmc3200wifi/debugfs.c
++++ b/drivers/net/wireless/iwmc3200wifi/debugfs.c
+@@ -327,6 +327,8 @@ static ssize_t iwm_debugfs_fw_err_read(struct file *filp,
int buf_len = 512;
size_t len = 0;
@@ -33781,10 +34697,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/iwmc3200wifi/debugfs.c linux-3.1.4/d
if (*ppos != 0)
return 0;
if (count < sizeof(buf))
-diff -urNp linux-3.1.4/drivers/net/wireless/mac80211_hwsim.c linux-3.1.4/drivers/net/wireless/mac80211_hwsim.c
---- linux-3.1.4/drivers/net/wireless/mac80211_hwsim.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/mac80211_hwsim.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1670,9 +1670,11 @@ static int __init init_mac80211_hwsim(vo
+diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
+index 031cd89..bdc8435 100644
+--- a/drivers/net/wireless/mac80211_hwsim.c
++++ b/drivers/net/wireless/mac80211_hwsim.c
+@@ -1670,9 +1670,11 @@ static int __init init_mac80211_hwsim(void)
return -EINVAL;
if (fake_hw_scan) {
@@ -33799,9 +34716,10 @@ diff -urNp linux-3.1.4/drivers/net/wireless/mac80211_hwsim.c linux-3.1.4/drivers
}
spin_lock_init(&hwsim_radio_lock);
-diff -urNp linux-3.1.4/drivers/net/wireless/mwifiex/main.h linux-3.1.4/drivers/net/wireless/mwifiex/main.h
---- linux-3.1.4/drivers/net/wireless/mwifiex/main.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/mwifiex/main.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
+index 2215c3c..64e6a47 100644
+--- a/drivers/net/wireless/mwifiex/main.h
++++ b/drivers/net/wireless/mwifiex/main.h
@@ -560,7 +560,7 @@ struct mwifiex_if_ops {
void (*update_mp_end_port) (struct mwifiex_adapter *, u16);
@@ -33811,10 +34729,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/mwifiex/main.h linux-3.1.4/drivers/n
struct mwifiex_adapter {
struct mwifiex_private *priv[MWIFIEX_MAX_BSS_NUM];
-diff -urNp linux-3.1.4/drivers/net/wireless/rndis_wlan.c linux-3.1.4/drivers/net/wireless/rndis_wlan.c
---- linux-3.1.4/drivers/net/wireless/rndis_wlan.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/rndis_wlan.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1277,7 +1277,7 @@ static int set_rts_threshold(struct usbn
+diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
+index 29f9389..f6d2ce0 100644
+--- a/drivers/net/wireless/rndis_wlan.c
++++ b/drivers/net/wireless/rndis_wlan.c
+@@ -1277,7 +1277,7 @@ static int set_rts_threshold(struct usbnet *usbdev, u32 rts_threshold)
netdev_dbg(usbdev->net, "%s(): %i\n", __func__, rts_threshold);
@@ -33823,10 +34742,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/rndis_wlan.c linux-3.1.4/drivers/net
rts_threshold = 2347;
tmp = cpu_to_le32(rts_threshold);
-diff -urNp linux-3.1.4/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c linux-3.1.4/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
---- linux-3.1.4/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c 2011-11-16 18:40:22.000000000 -0500
-@@ -837,6 +837,8 @@ bool _rtl92c_phy_sw_chnl_step_by_step(st
+diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
+index 3b11642..d6bb049 100644
+--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
+@@ -837,6 +837,8 @@ bool _rtl92c_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
u8 rfpath;
u8 num_total_rfpath = rtlphy->num_total_rfpath;
@@ -33835,9 +34755,10 @@ diff -urNp linux-3.1.4/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c linux-
precommoncmdcnt = 0;
_rtl92c_phy_set_sw_chnl_cmdarray(precommoncmd, precommoncmdcnt++,
MAX_PRECMD_CNT,
-diff -urNp linux-3.1.4/drivers/net/wireless/wl1251/wl1251.h linux-3.1.4/drivers/net/wireless/wl1251/wl1251.h
---- linux-3.1.4/drivers/net/wireless/wl1251/wl1251.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/wl1251/wl1251.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h
+index a77f1bb..c608b2b 100644
+--- a/drivers/net/wireless/wl1251/wl1251.h
++++ b/drivers/net/wireless/wl1251/wl1251.h
@@ -266,7 +266,7 @@ struct wl1251_if_operations {
void (*reset)(struct wl1251 *wl);
void (*enable_irq)(struct wl1251 *wl);
@@ -33847,10 +34768,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/wl1251/wl1251.h linux-3.1.4/drivers/
struct wl1251 {
struct ieee80211_hw *hw;
-diff -urNp linux-3.1.4/drivers/net/wireless/wl12xx/spi.c linux-3.1.4/drivers/net/wireless/wl12xx/spi.c
---- linux-3.1.4/drivers/net/wireless/wl12xx/spi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/net/wireless/wl12xx/spi.c 2011-11-16 18:40:22.000000000 -0500
-@@ -281,6 +281,8 @@ static void wl1271_spi_raw_write(struct
+diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
+index e0b3736..4b466e6 100644
+--- a/drivers/net/wireless/wl12xx/spi.c
++++ b/drivers/net/wireless/wl12xx/spi.c
+@@ -281,6 +281,8 @@ static void wl1271_spi_raw_write(struct wl1271 *wl, int addr, void *buf,
u32 chunk_len;
int i;
@@ -33859,10 +34781,11 @@ diff -urNp linux-3.1.4/drivers/net/wireless/wl12xx/spi.c linux-3.1.4/drivers/net
WARN_ON(len > WL1271_AGGR_BUFFER_SIZE);
spi_message_init(&m);
-diff -urNp linux-3.1.4/drivers/oprofile/buffer_sync.c linux-3.1.4/drivers/oprofile/buffer_sync.c
---- linux-3.1.4/drivers/oprofile/buffer_sync.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/buffer_sync.c 2011-11-16 18:39:07.000000000 -0500
-@@ -343,7 +343,7 @@ static void add_data(struct op_entry *en
+diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
+index f34b5b2..b5abb9f 100644
+--- a/drivers/oprofile/buffer_sync.c
++++ b/drivers/oprofile/buffer_sync.c
+@@ -343,7 +343,7 @@ static void add_data(struct op_entry *entry, struct mm_struct *mm)
if (cookie == NO_COOKIE)
offset = pc;
if (cookie == INVALID_COOKIE) {
@@ -33871,7 +34794,7 @@ diff -urNp linux-3.1.4/drivers/oprofile/buffer_sync.c linux-3.1.4/drivers/oprofi
offset = pc;
}
if (cookie != last_cookie) {
-@@ -387,14 +387,14 @@ add_sample(struct mm_struct *mm, struct
+@@ -387,14 +387,14 @@ add_sample(struct mm_struct *mm, struct op_sample *s, int in_kernel)
/* add userspace sample */
if (!mm) {
@@ -33897,10 +34820,11 @@ diff -urNp linux-3.1.4/drivers/oprofile/buffer_sync.c linux-3.1.4/drivers/oprofi
}
}
release_mm(mm);
-diff -urNp linux-3.1.4/drivers/oprofile/event_buffer.c linux-3.1.4/drivers/oprofile/event_buffer.c
---- linux-3.1.4/drivers/oprofile/event_buffer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/event_buffer.c 2011-11-16 18:39:07.000000000 -0500
-@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value
+diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
+index dd87e86..bc0148c 100644
+--- a/drivers/oprofile/event_buffer.c
++++ b/drivers/oprofile/event_buffer.c
+@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value)
}
if (buffer_pos == buffer_size) {
@@ -33909,10 +34833,11 @@ diff -urNp linux-3.1.4/drivers/oprofile/event_buffer.c linux-3.1.4/drivers/oprof
return;
}
-diff -urNp linux-3.1.4/drivers/oprofile/oprof.c linux-3.1.4/drivers/oprofile/oprof.c
---- linux-3.1.4/drivers/oprofile/oprof.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/oprof.c 2011-11-16 18:39:07.000000000 -0500
-@@ -110,7 +110,7 @@ static void switch_worker(struct work_st
+diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
+index dccd863..8d35669 100644
+--- a/drivers/oprofile/oprof.c
++++ b/drivers/oprofile/oprof.c
+@@ -110,7 +110,7 @@ static void switch_worker(struct work_struct *work)
if (oprofile_ops.switch_events())
return;
@@ -33921,21 +34846,10 @@ diff -urNp linux-3.1.4/drivers/oprofile/oprof.c linux-3.1.4/drivers/oprofile/opr
start_switch_worker();
}
-diff -urNp linux-3.1.4/drivers/oprofile/oprofilefs.c linux-3.1.4/drivers/oprofile/oprofilefs.c
---- linux-3.1.4/drivers/oprofile/oprofilefs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/oprofilefs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -186,7 +186,7 @@ static const struct file_operations atom
-
-
- int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
-- char const *name, atomic_t *val)
-+ char const *name, atomic_unchecked_t *val)
- {
- return __oprofilefs_create_file(sb, root, name,
- &atomic_ro_fops, 0444, val);
-diff -urNp linux-3.1.4/drivers/oprofile/oprofile_stats.c linux-3.1.4/drivers/oprofile/oprofile_stats.c
---- linux-3.1.4/drivers/oprofile/oprofile_stats.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/oprofile_stats.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
+index 917d28e..d62d981 100644
+--- a/drivers/oprofile/oprofile_stats.c
++++ b/drivers/oprofile/oprofile_stats.c
@@ -30,11 +30,11 @@ void oprofile_reset_stats(void)
cpu_buf->sample_invalid_eip = 0;
}
@@ -33953,9 +34867,10 @@ diff -urNp linux-3.1.4/drivers/oprofile/oprofile_stats.c linux-3.1.4/drivers/opr
}
-diff -urNp linux-3.1.4/drivers/oprofile/oprofile_stats.h linux-3.1.4/drivers/oprofile/oprofile_stats.h
---- linux-3.1.4/drivers/oprofile/oprofile_stats.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/oprofile/oprofile_stats.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h
+index 38b6fc0..b5cbfce 100644
+--- a/drivers/oprofile/oprofile_stats.h
++++ b/drivers/oprofile/oprofile_stats.h
@@ -13,11 +13,11 @@
#include <linux/atomic.h>
@@ -33973,10 +34888,24 @@ diff -urNp linux-3.1.4/drivers/oprofile/oprofile_stats.h linux-3.1.4/drivers/opr
};
extern struct oprofile_stat_struct oprofile_stats;
-diff -urNp linux-3.1.4/drivers/parport/procfs.c linux-3.1.4/drivers/parport/procfs.c
---- linux-3.1.4/drivers/parport/procfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/parport/procfs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *t
+diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
+index e9ff6f7..28e259a 100644
+--- a/drivers/oprofile/oprofilefs.c
++++ b/drivers/oprofile/oprofilefs.c
+@@ -186,7 +186,7 @@ static const struct file_operations atomic_ro_fops = {
+
+
+ int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
+- char const *name, atomic_t *val)
++ char const *name, atomic_unchecked_t *val)
+ {
+ return __oprofilefs_create_file(sb, root, name,
+ &atomic_ro_fops, 0444, val);
+diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
+index 3f56bc0..707d642 100644
+--- a/drivers/parport/procfs.c
++++ b/drivers/parport/procfs.c
+@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *table, int write,
*ppos += len;
@@ -33985,7 +34914,7 @@ diff -urNp linux-3.1.4/drivers/parport/procfs.c linux-3.1.4/drivers/parport/proc
}
#ifdef CONFIG_PARPORT_1284
-@@ -106,7 +106,7 @@ static int do_autoprobe(ctl_table *table
+@@ -106,7 +106,7 @@ static int do_autoprobe(ctl_table *table, int write,
*ppos += len;
@@ -33994,9 +34923,10 @@ diff -urNp linux-3.1.4/drivers/parport/procfs.c linux-3.1.4/drivers/parport/proc
}
#endif /* IEEE1284.3 support. */
-diff -urNp linux-3.1.4/drivers/pci/hotplug/cpci_hotplug.h linux-3.1.4/drivers/pci/hotplug/cpci_hotplug.h
---- linux-3.1.4/drivers/pci/hotplug/cpci_hotplug.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/hotplug/cpci_hotplug.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/pci/hotplug/cpci_hotplug.h b/drivers/pci/hotplug/cpci_hotplug.h
+index 9fff878..ad0ad53 100644
+--- a/drivers/pci/hotplug/cpci_hotplug.h
++++ b/drivers/pci/hotplug/cpci_hotplug.h
@@ -59,7 +59,7 @@ struct cpci_hp_controller_ops {
int (*hardware_test) (struct slot* slot, u32 value);
u8 (*get_power) (struct slot* slot);
@@ -34006,10 +34936,11 @@ diff -urNp linux-3.1.4/drivers/pci/hotplug/cpci_hotplug.h linux-3.1.4/drivers/pc
struct cpci_hp_controller {
unsigned int irq;
-diff -urNp linux-3.1.4/drivers/pci/hotplug/cpqphp_nvram.c linux-3.1.4/drivers/pci/hotplug/cpqphp_nvram.c
---- linux-3.1.4/drivers/pci/hotplug/cpqphp_nvram.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/hotplug/cpqphp_nvram.c 2011-11-16 18:39:07.000000000 -0500
-@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_
+diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
+index 76ba8a1..20ca857 100644
+--- a/drivers/pci/hotplug/cpqphp_nvram.c
++++ b/drivers/pci/hotplug/cpqphp_nvram.c
+@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_start)
void compaq_nvram_init (void __iomem *rom_start)
{
@@ -34023,9 +34954,10 @@ diff -urNp linux-3.1.4/drivers/pci/hotplug/cpqphp_nvram.c linux-3.1.4/drivers/pc
dbg("int15 entry = %p\n", compaq_int15_entry_point);
/* initialize our int15 lock */
-diff -urNp linux-3.1.4/drivers/pci/pcie/aspm.c linux-3.1.4/drivers/pci/pcie/aspm.c
---- linux-3.1.4/drivers/pci/pcie/aspm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/pcie/aspm.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
+index cbfbab1..6a9fced 100644
+--- a/drivers/pci/pcie/aspm.c
++++ b/drivers/pci/pcie/aspm.c
@@ -27,9 +27,9 @@
#define MODULE_PARAM_PREFIX "pcie_aspm."
@@ -34039,10 +34971,11 @@ diff -urNp linux-3.1.4/drivers/pci/pcie/aspm.c linux-3.1.4/drivers/pci/pcie/aspm
#define ASPM_STATE_L0S (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
#define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1)
-diff -urNp linux-3.1.4/drivers/pci/probe.c linux-3.1.4/drivers/pci/probe.c
---- linux-3.1.4/drivers/pci/probe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/probe.c 2011-11-16 18:39:07.000000000 -0500
-@@ -136,7 +136,7 @@ int __pci_read_base(struct pci_dev *dev,
+diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
+index 6ab6bd3..72bdc69 100644
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -136,7 +136,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
u32 l, sz, mask;
u16 orig_cmd;
@@ -34051,10 +34984,11 @@ diff -urNp linux-3.1.4/drivers/pci/probe.c linux-3.1.4/drivers/pci/probe.c
if (!dev->mmio_always_on) {
pci_read_config_word(dev, PCI_COMMAND, &orig_cmd);
-diff -urNp linux-3.1.4/drivers/pci/proc.c linux-3.1.4/drivers/pci/proc.c
---- linux-3.1.4/drivers/pci/proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/proc.c 2011-11-16 18:40:22.000000000 -0500
-@@ -476,7 +476,16 @@ static const struct file_operations proc
+diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
+index 27911b5..5b6db88 100644
+--- a/drivers/pci/proc.c
++++ b/drivers/pci/proc.c
+@@ -476,7 +476,16 @@ static const struct file_operations proc_bus_pci_dev_operations = {
static int __init pci_proc_init(void)
{
struct pci_dev *dev = NULL;
@@ -34071,10 +35005,11 @@ diff -urNp linux-3.1.4/drivers/pci/proc.c linux-3.1.4/drivers/pci/proc.c
proc_create("devices", 0, proc_bus_pci_dir,
&proc_bus_pci_dev_operations);
proc_initialized = 1;
-diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pcifront.c
---- linux-3.1.4/drivers/pci/xen-pcifront.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pci/xen-pcifront.c 2011-11-16 18:40:22.000000000 -0500
-@@ -187,6 +187,8 @@ static int pcifront_bus_read(struct pci_
+diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
+index 90832a9..419089a 100644
+--- a/drivers/pci/xen-pcifront.c
++++ b/drivers/pci/xen-pcifront.c
+@@ -187,6 +187,8 @@ static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn,
struct pcifront_sd *sd = bus->sysdata;
struct pcifront_device *pdev = pcifront_get_pdev(sd);
@@ -34083,7 +35018,7 @@ diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pc
if (verbose_request)
dev_info(&pdev->xdev->dev,
"read dev=%04x:%02x:%02x.%01x - offset %x size %d\n",
-@@ -226,6 +228,8 @@ static int pcifront_bus_write(struct pci
+@@ -226,6 +228,8 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn,
struct pcifront_sd *sd = bus->sysdata;
struct pcifront_device *pdev = pcifront_get_pdev(sd);
@@ -34092,7 +35027,7 @@ diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pc
if (verbose_request)
dev_info(&pdev->xdev->dev,
"write dev=%04x:%02x:%02x.%01x - "
-@@ -258,6 +262,8 @@ static int pci_frontend_enable_msix(stru
+@@ -258,6 +262,8 @@ static int pci_frontend_enable_msix(struct pci_dev *dev,
struct pcifront_device *pdev = pcifront_get_pdev(sd);
struct msi_desc *entry;
@@ -34101,7 +35036,7 @@ diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pc
if (nvec > SH_INFO_MAX_VEC) {
dev_err(&dev->dev, "too much vector for pci frontend: %x."
" Increase SH_INFO_MAX_VEC.\n", nvec);
-@@ -309,6 +315,8 @@ static void pci_frontend_disable_msix(st
+@@ -309,6 +315,8 @@ static void pci_frontend_disable_msix(struct pci_dev *dev)
struct pcifront_sd *sd = dev->bus->sysdata;
struct pcifront_device *pdev = pcifront_get_pdev(sd);
@@ -34110,7 +35045,7 @@ diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pc
err = do_pci_op(pdev, &op);
/* What should do for error ? */
-@@ -328,6 +336,8 @@ static int pci_frontend_enable_msi(struc
+@@ -328,6 +336,8 @@ static int pci_frontend_enable_msi(struct pci_dev *dev, int vector[])
struct pcifront_sd *sd = dev->bus->sysdata;
struct pcifront_device *pdev = pcifront_get_pdev(sd);
@@ -34119,9 +35054,10 @@ diff -urNp linux-3.1.4/drivers/pci/xen-pcifront.c linux-3.1.4/drivers/pci/xen-pc
err = do_pci_op(pdev, &op);
if (likely(!err)) {
vector[0] = op.value;
-diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c
---- linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
+index 7bd829f..a3237ad 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2094,7 +2094,7 @@ static int hotkey_mask_get(void)
return 0;
}
@@ -34131,7 +35067,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
{
/* log only what the user can fix... */
const u32 wantedmask = hotkey_driver_mask &
-@@ -2325,11 +2325,6 @@ static void hotkey_read_nvram(struct tp_
+@@ -2325,11 +2325,6 @@ static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
}
}
@@ -34143,7 +35079,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
#define TPACPI_COMPARE_KEY(__scancode, __member) \
do { \
if ((event_mask & (1 << __scancode)) && \
-@@ -2343,36 +2338,42 @@ static void hotkey_compare_and_issue_eve
+@@ -2343,36 +2338,42 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
tpacpi_hotkey_send_key(__scancode); \
} while (0)
@@ -34210,7 +35146,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_THINKPAD, thinkpad_toggle);
TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_FNSPACE, zoom_toggle);
TPACPI_COMPARE_KEY(TP_ACPI_HOTKEYSCAN_FNF7, display_toggle);
-@@ -2406,7 +2407,7 @@ static void hotkey_compare_and_issue_eve
+@@ -2406,7 +2407,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
oldn->volume_level != newn->volume_level) {
/* recently muted, or repeated mute keypress, or
* multiple presses ending in mute */
@@ -34219,7 +35155,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_MUTE);
}
} else {
-@@ -2416,7 +2417,7 @@ static void hotkey_compare_and_issue_eve
+@@ -2416,7 +2417,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_VOLUMEUP);
}
if (oldn->volume_level != newn->volume_level) {
@@ -34228,7 +35164,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
} else if (oldn->volume_toggle != newn->volume_toggle) {
/* repeated vol up/down keypress at end of scale ? */
if (newn->volume_level == 0)
-@@ -2429,7 +2430,8 @@ static void hotkey_compare_and_issue_eve
+@@ -2429,7 +2430,8 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
/* handle brightness */
if (oldn->brightness_level != newn->brightness_level) {
issue_brightnesschange(oldn->brightness_level,
@@ -34238,7 +35174,7 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
} else if (oldn->brightness_toggle != newn->brightness_toggle) {
/* repeated key presses that didn't change state */
if (newn->brightness_level == 0)
-@@ -2438,10 +2440,10 @@ static void hotkey_compare_and_issue_eve
+@@ -2438,10 +2440,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
&& !tp_features.bright_unkfw)
TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_FNHOME);
}
@@ -34250,9 +35186,10 @@ diff -urNp linux-3.1.4/drivers/platform/x86/thinkpad_acpi.c linux-3.1.4/drivers/
/*
* Polling driver
-diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c
---- linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
+index b859d16..5cc6b1a 100644
+--- a/drivers/pnp/pnpbios/bioscalls.c
++++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -59,7 +59,7 @@ do { \
set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \
} while(0)
@@ -34262,7 +35199,7 @@ diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/p
(unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1);
/*
-@@ -96,7 +96,10 @@ static inline u16 call_pnp_bios(u16 func
+@@ -96,7 +96,10 @@ static inline u16 call_pnp_bios(u16 func, u16 arg1, u16 arg2, u16 arg3,
cpu = get_cpu();
save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8];
@@ -34273,7 +35210,7 @@ diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/p
/* On some boxes IRQ's during PnP BIOS calls are deadly. */
spin_lock_irqsave(&pnp_bios_lock, flags);
-@@ -134,7 +137,10 @@ static inline u16 call_pnp_bios(u16 func
+@@ -134,7 +137,10 @@ static inline u16 call_pnp_bios(u16 func, u16 arg1, u16 arg2, u16 arg3,
:"memory");
spin_unlock_irqrestore(&pnp_bios_lock, flags);
@@ -34284,7 +35221,7 @@ diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/p
put_cpu();
/* If we get here and this is set then the PnP BIOS faulted on us. */
-@@ -468,7 +474,7 @@ int pnp_bios_read_escd(char *data, u32 n
+@@ -468,7 +474,7 @@ int pnp_bios_read_escd(char *data, u32 nvram_base)
return status;
}
@@ -34293,7 +35230,7 @@ diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/p
{
int i;
-@@ -476,6 +482,8 @@ void pnpbios_calls_init(union pnp_bios_i
+@@ -476,6 +482,8 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
pnp_bios_callpoint.offset = header->fields.pm16offset;
pnp_bios_callpoint.segment = PNP_CS16;
@@ -34302,17 +35239,18 @@ diff -urNp linux-3.1.4/drivers/pnp/pnpbios/bioscalls.c linux-3.1.4/drivers/pnp/p
for_each_possible_cpu(i) {
struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt)
-@@ -487,4 +495,6 @@ void pnpbios_calls_init(union pnp_bios_i
+@@ -487,4 +495,6 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS],
(unsigned long)__va(header->fields.pm16dseg));
}
+
+ pax_close_kernel();
}
-diff -urNp linux-3.1.4/drivers/pnp/resource.c linux-3.1.4/drivers/pnp/resource.c
---- linux-3.1.4/drivers/pnp/resource.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/pnp/resource.c 2011-11-16 18:39:07.000000000 -0500
-@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, s
+diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
+index b0ecacb..7c9da2e 100644
+--- a/drivers/pnp/resource.c
++++ b/drivers/pnp/resource.c
+@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
return 1;
/* check if the resource is valid */
@@ -34321,7 +35259,7 @@ diff -urNp linux-3.1.4/drivers/pnp/resource.c linux-3.1.4/drivers/pnp/resource.c
return 0;
/* check if the resource is reserved */
-@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, s
+@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
return 1;
/* check if the resource is valid */
@@ -34330,9 +35268,10 @@ diff -urNp linux-3.1.4/drivers/pnp/resource.c linux-3.1.4/drivers/pnp/resource.c
return 0;
/* check if the resource is reserved */
-diff -urNp linux-3.1.4/drivers/power/bq27x00_battery.c linux-3.1.4/drivers/power/bq27x00_battery.c
---- linux-3.1.4/drivers/power/bq27x00_battery.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/power/bq27x00_battery.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
+index bb16f5b..c751eef 100644
+--- a/drivers/power/bq27x00_battery.c
++++ b/drivers/power/bq27x00_battery.c
@@ -67,7 +67,7 @@
struct bq27x00_device_info;
struct bq27x00_access_methods {
@@ -34342,10 +35281,11 @@ diff -urNp linux-3.1.4/drivers/power/bq27x00_battery.c linux-3.1.4/drivers/power
enum bq27x00_chip { BQ27000, BQ27500 };
-diff -urNp linux-3.1.4/drivers/regulator/max8660.c linux-3.1.4/drivers/regulator/max8660.c
---- linux-3.1.4/drivers/regulator/max8660.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/regulator/max8660.c 2011-11-16 18:39:07.000000000 -0500
-@@ -383,8 +383,10 @@ static int __devinit max8660_probe(struc
+diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
+index 33f5d9a..d957d3f 100644
+--- a/drivers/regulator/max8660.c
++++ b/drivers/regulator/max8660.c
+@@ -383,8 +383,10 @@ static int __devinit max8660_probe(struct i2c_client *client,
max8660->shadow_regs[MAX8660_OVER1] = 5;
} else {
/* Otherwise devices can be toggled via software */
@@ -34358,10 +35298,11 @@ diff -urNp linux-3.1.4/drivers/regulator/max8660.c linux-3.1.4/drivers/regulator
}
/*
-diff -urNp linux-3.1.4/drivers/regulator/mc13892-regulator.c linux-3.1.4/drivers/regulator/mc13892-regulator.c
---- linux-3.1.4/drivers/regulator/mc13892-regulator.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/regulator/mc13892-regulator.c 2011-11-16 18:39:07.000000000 -0500
-@@ -564,10 +564,12 @@ static int __devinit mc13892_regulator_p
+diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
+index 3285d41..ab7c22a 100644
+--- a/drivers/regulator/mc13892-regulator.c
++++ b/drivers/regulator/mc13892-regulator.c
+@@ -564,10 +564,12 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
}
mc13xxx_unlock(mc13892);
@@ -34376,9 +35317,10 @@ diff -urNp linux-3.1.4/drivers/regulator/mc13892-regulator.c linux-3.1.4/drivers
for (i = 0; i < pdata->num_regulators; i++) {
init_data = &pdata->regulators[i];
priv->regulators[i] = regulator_register(
-diff -urNp linux-3.1.4/drivers/rtc/rtc-dev.c linux-3.1.4/drivers/rtc/rtc-dev.c
---- linux-3.1.4/drivers/rtc/rtc-dev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/rtc/rtc-dev.c 2011-11-16 18:40:22.000000000 -0500
+diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
+index cace6d3..f623fda 100644
+--- a/drivers/rtc/rtc-dev.c
++++ b/drivers/rtc/rtc-dev.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/rtc.h>
@@ -34387,7 +35329,7 @@ diff -urNp linux-3.1.4/drivers/rtc/rtc-dev.c linux-3.1.4/drivers/rtc/rtc-dev.c
#include "rtc-core.h"
static dev_t rtc_devt;
-@@ -345,6 +346,8 @@ static long rtc_dev_ioctl(struct file *f
+@@ -345,6 +346,8 @@ static long rtc_dev_ioctl(struct file *file,
if (copy_from_user(&tm, uarg, sizeof(tm)))
return -EFAULT;
@@ -34396,9 +35338,23 @@ diff -urNp linux-3.1.4/drivers/rtc/rtc-dev.c linux-3.1.4/drivers/rtc/rtc-dev.c
return rtc_set_time(rtc, &tm);
case RTC_PIE_ON:
-diff -urNp linux-3.1.4/drivers/scsi/aacraid/aacraid.h linux-3.1.4/drivers/scsi/aacraid/aacraid.h
---- linux-3.1.4/drivers/scsi/aacraid/aacraid.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/aacraid/aacraid.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
+index f66c33b..7ae5823 100644
+--- a/drivers/scsi/BusLogic.c
++++ b/drivers/scsi/BusLogic.c
+@@ -962,6 +962,8 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
+ static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter
+ *PrototypeHostAdapter)
+ {
++ pax_track_stack();
++
+ /*
+ If a PCI BIOS is present, interrogate it for MultiMaster and FlashPoint
+ Host Adapters; otherwise, default to the standard ISA MultiMaster probe.
+diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
+index ffb5878..e6d785c 100644
+--- a/drivers/scsi/aacraid/aacraid.h
++++ b/drivers/scsi/aacraid/aacraid.h
@@ -492,7 +492,7 @@ struct adapter_ops
int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd);
/* Administrative operations */
@@ -34408,10 +35364,11 @@ diff -urNp linux-3.1.4/drivers/scsi/aacraid/aacraid.h linux-3.1.4/drivers/scsi/a
/*
* Define which interrupt handler needs to be installed
-diff -urNp linux-3.1.4/drivers/scsi/aacraid/commctrl.c linux-3.1.4/drivers/scsi/aacraid/commctrl.c
---- linux-3.1.4/drivers/scsi/aacraid/commctrl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/aacraid/commctrl.c 2011-11-16 18:40:22.000000000 -0500
-@@ -482,6 +482,7 @@ static int aac_send_raw_srb(struct aac_d
+diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
+index 8a0b330..b4286de 100644
+--- a/drivers/scsi/aacraid/commctrl.c
++++ b/drivers/scsi/aacraid/commctrl.c
+@@ -482,6 +482,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
u32 actual_fibsize64, actual_fibsize = 0;
int i;
@@ -34419,10 +35376,11 @@ diff -urNp linux-3.1.4/drivers/scsi/aacraid/commctrl.c linux-3.1.4/drivers/scsi/
if (dev->in_reset) {
dprintk((KERN_DEBUG"aacraid: send raw srb -EBUSY\n"));
-diff -urNp linux-3.1.4/drivers/scsi/aacraid/linit.c linux-3.1.4/drivers/scsi/aacraid/linit.c
---- linux-3.1.4/drivers/scsi/aacraid/linit.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/aacraid/linit.c 2011-11-26 20:00:43.000000000 -0500
-@@ -93,7 +93,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_
+diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
+index c7b6fed..4db0569 100644
+--- a/drivers/scsi/aacraid/linit.c
++++ b/drivers/scsi/aacraid/linit.c
+@@ -93,7 +93,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_tbl) = {
#elif defined(__devinitconst)
static const struct pci_device_id aac_pci_tbl[] __devinitconst = {
#else
@@ -34431,10 +35389,11 @@ diff -urNp linux-3.1.4/drivers/scsi/aacraid/linit.c linux-3.1.4/drivers/scsi/aac
#endif
{ 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */
{ 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */
-diff -urNp linux-3.1.4/drivers/scsi/aic94xx/aic94xx_init.c linux-3.1.4/drivers/scsi/aic94xx/aic94xx_init.c
---- linux-3.1.4/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/aic94xx/aic94xx_init.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1012,7 +1012,7 @@ static struct sas_domain_function_templa
+diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
+index d5ff142..49c0ebb 100644
+--- a/drivers/scsi/aic94xx/aic94xx_init.c
++++ b/drivers/scsi/aic94xx/aic94xx_init.c
+@@ -1012,7 +1012,7 @@ static struct sas_domain_function_template aic94xx_transport_functions = {
.lldd_control_phy = asd_control_phy,
};
@@ -34443,22 +35402,24 @@ diff -urNp linux-3.1.4/drivers/scsi/aic94xx/aic94xx_init.c linux-3.1.4/drivers/s
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1},
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1},
{PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1},
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfad.c linux-3.1.4/drivers/scsi/bfa/bfad.c
---- linux-3.1.4/drivers/scsi/bfa/bfad.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfad.c 2011-11-16 19:01:15.000000000 -0500
-@@ -1019,6 +1019,8 @@ bfad_start_ops(struct bfad_s *bfad) {
- struct bfad_vport_s *vport, *vport_new;
- struct bfa_fcs_driver_info_s driver_info;
+diff --git a/drivers/scsi/bfa/bfa.h b/drivers/scsi/bfa/bfa.h
+index a796de9..1ef20e1 100644
+--- a/drivers/scsi/bfa/bfa.h
++++ b/drivers/scsi/bfa/bfa.h
+@@ -196,7 +196,7 @@ struct bfa_hwif_s {
+ u32 *end);
+ int cpe_vec_q0;
+ int rme_vec_q0;
+-};
++} __no_const;
+ typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
-+ pax_track_stack();
-+
- /* Limit min/max. xfer size to [64k-32MB] */
- if (max_xfer_size < BFAD_MIN_SECTORS >> 1)
- max_xfer_size = BFAD_MIN_SECTORS >> 1;
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.c linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.c
---- linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.c 2011-11-16 18:39:07.000000000 -0500
-@@ -4179,7 +4179,7 @@ bfa_itn_create(struct bfa_s *bfa, struct
+ struct bfa_faa_cbfn_s {
+diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
+index e07bd47..dbd260a 100644
+--- a/drivers/scsi/bfa/bfa_fcpim.c
++++ b/drivers/scsi/bfa/bfa_fcpim.c
+@@ -4179,7 +4179,7 @@ bfa_itn_create(struct bfa_s *bfa, struct bfa_rport_s *rport,
void (*isr)(struct bfa_s *bfa, struct bfi_msg_s *m))
{
struct bfa_fcp_mod_s *fcp = BFA_FCP_MOD(bfa);
@@ -34467,9 +35428,10 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.c linux-3.1.4/drivers/scsi/bfa
itn = BFA_ITN_FROM_TAG(fcp, rport->rport_tag);
itn->isr = isr;
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.h linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.h
---- linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h
+index 1080bcb..a3b39e3 100644
+--- a/drivers/scsi/bfa/bfa_fcpim.h
++++ b/drivers/scsi/bfa/bfa_fcpim.h
@@ -37,6 +37,7 @@ struct bfa_iotag_s {
struct bfa_itn_s {
bfa_isr_func_t isr;
@@ -34487,10 +35449,11 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcpim.h linux-3.1.4/drivers/scsi/bfa
int num_ioim_reqs;
int num_fwtio_reqs;
int num_itns;
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c
---- linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1700,6 +1700,8 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struc
+diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
+index d4f951f..197c350 100644
+--- a/drivers/scsi/bfa/bfa_fcs_lport.c
++++ b/drivers/scsi/bfa/bfa_fcs_lport.c
+@@ -1700,6 +1700,8 @@ bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
u16 len, count;
u16 templen;
@@ -34499,7 +35462,7 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c linux-3.1.4/drivers/scsi
/*
* get hba attributes
*/
-@@ -1977,6 +1979,8 @@ bfa_fcs_lport_fdmi_build_portattr_block(
+@@ -1977,6 +1979,8 @@ bfa_fcs_lport_fdmi_build_portattr_block(struct bfa_fcs_lport_fdmi_s *fdmi,
u8 count = 0;
u16 templen;
@@ -34508,10 +35471,11 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcs_lport.c linux-3.1.4/drivers/scsi
/*
* get port attributes
*/
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcs_rport.c linux-3.1.4/drivers/scsi/bfa/bfa_fcs_rport.c
---- linux-3.1.4/drivers/scsi/bfa/bfa_fcs_rport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa_fcs_rport.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1871,6 +1871,8 @@ bfa_fcs_rport_process_rpsc(struct bfa_fc
+diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
+index 52628d5..f89d033 100644
+--- a/drivers/scsi/bfa/bfa_fcs_rport.c
++++ b/drivers/scsi/bfa/bfa_fcs_rport.c
+@@ -1871,6 +1871,8 @@ bfa_fcs_rport_process_rpsc(struct bfa_fcs_rport_s *rport,
struct fc_rpsc_speed_info_s speeds;
struct bfa_port_attr_s pport_attr;
@@ -34520,21 +35484,10 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_fcs_rport.c linux-3.1.4/drivers/scsi
bfa_trc(port->fcs, rx_fchs->s_id);
bfa_trc(port->fcs, rx_fchs->d_id);
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa.h linux-3.1.4/drivers/scsi/bfa/bfa.h
---- linux-3.1.4/drivers/scsi/bfa/bfa.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa.h 2011-11-16 18:39:07.000000000 -0500
-@@ -196,7 +196,7 @@ struct bfa_hwif_s {
- u32 *end);
- int cpe_vec_q0;
- int rme_vec_q0;
--};
-+} __no_const;
- typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
-
- struct bfa_faa_cbfn_s {
-diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_ioc.h linux-3.1.4/drivers/scsi/bfa/bfa_ioc.h
---- linux-3.1.4/drivers/scsi/bfa/bfa_ioc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/bfa/bfa_ioc.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h
+index 546d46b..642fa5b 100644
+--- a/drivers/scsi/bfa/bfa_ioc.h
++++ b/drivers/scsi/bfa/bfa_ioc.h
@@ -258,7 +258,7 @@ struct bfa_ioc_cbfn_s {
bfa_ioc_disable_cbfn_t disable_cbfn;
bfa_ioc_hbfail_cbfn_t hbfail_cbfn;
@@ -34553,22 +35506,24 @@ diff -urNp linux-3.1.4/drivers/scsi/bfa/bfa_ioc.h linux-3.1.4/drivers/scsi/bfa/b
/*
* Queue element to wait for room in request queue. FIFO order is
-diff -urNp linux-3.1.4/drivers/scsi/BusLogic.c linux-3.1.4/drivers/scsi/BusLogic.c
---- linux-3.1.4/drivers/scsi/BusLogic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/BusLogic.c 2011-11-16 18:40:22.000000000 -0500
-@@ -962,6 +962,8 @@ static int __init BusLogic_InitializeFla
- static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter
- *PrototypeHostAdapter)
- {
+diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
+index 66fb725..0fe05ab 100644
+--- a/drivers/scsi/bfa/bfad.c
++++ b/drivers/scsi/bfa/bfad.c
+@@ -1019,6 +1019,8 @@ bfad_start_ops(struct bfad_s *bfad) {
+ struct bfad_vport_s *vport, *vport_new;
+ struct bfa_fcs_driver_info_s driver_info;
+
+ pax_track_stack();
+
- /*
- If a PCI BIOS is present, interrogate it for MultiMaster and FlashPoint
- Host Adapters; otherwise, default to the standard ISA MultiMaster probe.
-diff -urNp linux-3.1.4/drivers/scsi/dpt_i2o.c linux-3.1.4/drivers/scsi/dpt_i2o.c
---- linux-3.1.4/drivers/scsi/dpt_i2o.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/dpt_i2o.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1811,6 +1811,8 @@ static int adpt_i2o_passthru(adpt_hba* p
+ /* Limit min/max. xfer size to [64k-32MB] */
+ if (max_xfer_size < BFAD_MIN_SECTORS >> 1)
+ max_xfer_size = BFAD_MIN_SECTORS >> 1;
+diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
+index b4f6c9a..0eb1938 100644
+--- a/drivers/scsi/dpt_i2o.c
++++ b/drivers/scsi/dpt_i2o.c
+@@ -1811,6 +1811,8 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
dma_addr_t addr;
ulong flags = 0;
@@ -34577,7 +35532,7 @@ diff -urNp linux-3.1.4/drivers/scsi/dpt_i2o.c linux-3.1.4/drivers/scsi/dpt_i2o.c
memset(&msg, 0, MAX_MESSAGE_SIZE*4);
// get user msg size in u32s
if(get_user(size, &user_msg[0])){
-@@ -2317,6 +2319,8 @@ static s32 adpt_scsi_to_i2o(adpt_hba* pH
+@@ -2317,6 +2319,8 @@ static s32 adpt_scsi_to_i2o(adpt_hba* pHba, struct scsi_cmnd* cmd, struct adpt_d
s32 rcode;
dma_addr_t addr;
@@ -34586,10 +35541,11 @@ diff -urNp linux-3.1.4/drivers/scsi/dpt_i2o.c linux-3.1.4/drivers/scsi/dpt_i2o.c
memset(msg, 0 , sizeof(msg));
len = scsi_bufflen(cmd);
direction = 0x00000000;
-diff -urNp linux-3.1.4/drivers/scsi/eata.c linux-3.1.4/drivers/scsi/eata.c
---- linux-3.1.4/drivers/scsi/eata.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/eata.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1087,6 +1087,8 @@ static int port_detect(unsigned long por
+diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
+index 94de889..ca4f0cf 100644
+--- a/drivers/scsi/eata.c
++++ b/drivers/scsi/eata.c
+@@ -1087,6 +1087,8 @@ static int port_detect(unsigned long port_base, unsigned int j,
struct hostdata *ha;
char name[16];
@@ -34598,10 +35554,11 @@ diff -urNp linux-3.1.4/drivers/scsi/eata.c linux-3.1.4/drivers/scsi/eata.c
sprintf(name, "%s%d", driver_name, j);
if (!request_region(port_base, REGION_SIZE, driver_name)) {
-diff -urNp linux-3.1.4/drivers/scsi/fcoe/fcoe_ctlr.c linux-3.1.4/drivers/scsi/fcoe/fcoe_ctlr.c
---- linux-3.1.4/drivers/scsi/fcoe/fcoe_ctlr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/fcoe/fcoe_ctlr.c 2011-11-16 18:40:22.000000000 -0500
-@@ -2503,6 +2503,8 @@ static int fcoe_ctlr_vn_recv(struct fcoe
+diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
+index c74c4b8..c41ca3f 100644
+--- a/drivers/scsi/fcoe/fcoe_ctlr.c
++++ b/drivers/scsi/fcoe/fcoe_ctlr.c
+@@ -2503,6 +2503,8 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
} buf;
int rc;
@@ -34610,9 +35567,10 @@ diff -urNp linux-3.1.4/drivers/scsi/fcoe/fcoe_ctlr.c linux-3.1.4/drivers/scsi/fc
fiph = (struct fip_header *)skb->data;
sub = fiph->fip_subcode;
-diff -urNp linux-3.1.4/drivers/scsi/gdth.c linux-3.1.4/drivers/scsi/gdth.c
---- linux-3.1.4/drivers/scsi/gdth.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/gdth.c 2011-11-16 18:40:22.000000000 -0500
+diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
+index 3242bca..45a83e7 100644
+--- a/drivers/scsi/gdth.c
++++ b/drivers/scsi/gdth.c
@@ -4107,6 +4107,8 @@ static int ioc_lockdrv(void __user *arg)
unsigned long flags;
gdth_ha_str *ha;
@@ -34622,7 +35580,7 @@ diff -urNp linux-3.1.4/drivers/scsi/gdth.c linux-3.1.4/drivers/scsi/gdth.c
if (copy_from_user(&ldrv, arg, sizeof(gdth_ioctl_lockdrv)))
return -EFAULT;
ha = gdth_find_ha(ldrv.ionode);
-@@ -4139,6 +4141,8 @@ static int ioc_resetdrv(void __user *arg
+@@ -4139,6 +4141,8 @@ static int ioc_resetdrv(void __user *arg, char *cmnd)
gdth_ha_str *ha;
int rval;
@@ -34631,7 +35589,7 @@ diff -urNp linux-3.1.4/drivers/scsi/gdth.c linux-3.1.4/drivers/scsi/gdth.c
if (copy_from_user(&res, arg, sizeof(gdth_ioctl_reset)) ||
res.number >= MAX_HDRIVES)
return -EFAULT;
-@@ -4174,6 +4178,8 @@ static int ioc_general(void __user *arg,
+@@ -4174,6 +4178,8 @@ static int ioc_general(void __user *arg, char *cmnd)
gdth_ha_str *ha;
int rval;
@@ -34650,10 +35608,11 @@ diff -urNp linux-3.1.4/drivers/scsi/gdth.c linux-3.1.4/drivers/scsi/gdth.c
memset(cmnd, 0xff, MAX_COMMAND_SIZE);
TRACE2(("gdth_flush() hanum %d\n", ha->hanum));
-diff -urNp linux-3.1.4/drivers/scsi/gdth_proc.c linux-3.1.4/drivers/scsi/gdth_proc.c
---- linux-3.1.4/drivers/scsi/gdth_proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/gdth_proc.c 2011-11-16 18:40:22.000000000 -0500
-@@ -47,6 +47,9 @@ static int gdth_set_asc_info(struct Scsi
+diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
+index 6527543..81e4fe2 100644
+--- a/drivers/scsi/gdth_proc.c
++++ b/drivers/scsi/gdth_proc.c
+@@ -47,6 +47,9 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer,
u64 paddr;
char cmnd[MAX_COMMAND_SIZE];
@@ -34663,7 +35622,7 @@ diff -urNp linux-3.1.4/drivers/scsi/gdth_proc.c linux-3.1.4/drivers/scsi/gdth_pr
memset(cmnd, 0xff, 12);
memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
-@@ -175,6 +178,8 @@ static int gdth_get_info(char *buffer,ch
+@@ -175,6 +178,8 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
gdth_hget_str *phg;
char cmnd[MAX_COMMAND_SIZE];
@@ -34672,9 +35631,10 @@ diff -urNp linux-3.1.4/drivers/scsi/gdth_proc.c linux-3.1.4/drivers/scsi/gdth_pr
gdtcmd = kmalloc(sizeof(*gdtcmd), GFP_KERNEL);
estr = kmalloc(sizeof(*estr), GFP_KERNEL);
if (!gdtcmd || !estr)
-diff -urNp linux-3.1.4/drivers/scsi/hosts.c linux-3.1.4/drivers/scsi/hosts.c
---- linux-3.1.4/drivers/scsi/hosts.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/hosts.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
+index 351dc0b..951dc32 100644
+--- a/drivers/scsi/hosts.c
++++ b/drivers/scsi/hosts.c
@@ -42,7 +42,7 @@
#include "scsi_logging.h"
@@ -34684,7 +35644,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hosts.c linux-3.1.4/drivers/scsi/hosts.c
static void scsi_host_cls_release(struct device *dev)
-@@ -357,7 +357,7 @@ struct Scsi_Host *scsi_host_alloc(struct
+@@ -357,7 +357,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
* subtract one because we increment first then return, but we need to
* know what the next host number was before increment
*/
@@ -34693,10 +35653,11 @@ diff -urNp linux-3.1.4/drivers/scsi/hosts.c linux-3.1.4/drivers/scsi/hosts.c
shost->dma_channel = 0xff;
/* These three are default values which can be overridden */
-diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
---- linux-3.1.4/drivers/scsi/hpsa.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/hpsa.c 2011-11-26 20:00:43.000000000 -0500
-@@ -499,7 +499,7 @@ static inline u32 next_command(struct ct
+diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
+index 418ce83..7ee1225 100644
+--- a/drivers/scsi/hpsa.c
++++ b/drivers/scsi/hpsa.c
+@@ -499,7 +499,7 @@ static inline u32 next_command(struct ctlr_info *h)
u32 a;
if (unlikely(!(h->transMethod & CFGTBL_Trans_Performant)))
@@ -34705,7 +35666,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
a = *(h->reply_pool_head); /* Next cmd in ring buffer */
-@@ -2956,7 +2956,7 @@ static void start_io(struct ctlr_info *h
+@@ -2956,7 +2956,7 @@ static void start_io(struct ctlr_info *h)
while (!list_empty(&h->reqQ)) {
c = list_entry(h->reqQ.next, struct CommandList, list);
/* can't do anything if fifo is full */
@@ -34714,7 +35675,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
dev_warn(&h->pdev->dev, "fifo full\n");
break;
}
-@@ -2966,7 +2966,7 @@ static void start_io(struct ctlr_info *h
+@@ -2966,7 +2966,7 @@ static void start_io(struct ctlr_info *h)
h->Qdepth--;
/* Tell the controller execute command */
@@ -34723,7 +35684,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
/* Put job onto the completed Q */
addQ(&h->cmpQ, c);
-@@ -2975,17 +2975,17 @@ static void start_io(struct ctlr_info *h
+@@ -2975,17 +2975,17 @@ static void start_io(struct ctlr_info *h)
static inline unsigned long get_next_completion(struct ctlr_info *h)
{
@@ -34744,7 +35705,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
(h->interrupts_enabled == 0);
}
-@@ -3882,7 +3882,7 @@ static int __devinit hpsa_pci_init(struc
+@@ -3882,7 +3882,7 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h)
if (prod_index < 0)
return -ENODEV;
h->product_name = products[prod_index].product_name;
@@ -34792,7 +35753,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
hpsa_hba_inquiry(h);
hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */
-@@ -4292,7 +4292,7 @@ static void hpsa_shutdown(struct pci_dev
+@@ -4292,7 +4292,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
* To write all data in the battery backed cache to disks
*/
hpsa_flush_cache(h);
@@ -34801,7 +35762,7 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
free_irq(h->intr[h->intr_mode], h);
#ifdef CONFIG_PCI_MSI
if (h->msix_vector)
-@@ -4455,7 +4455,7 @@ static __devinit void hpsa_enter_perform
+@@ -4455,7 +4455,7 @@ static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h,
return;
}
/* Change the access methods to the performant access methods */
@@ -34810,9 +35771,10 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.c linux-3.1.4/drivers/scsi/hpsa.c
h->transMethod = CFGTBL_Trans_Performant;
}
-diff -urNp linux-3.1.4/drivers/scsi/hpsa.h linux-3.1.4/drivers/scsi/hpsa.h
---- linux-3.1.4/drivers/scsi/hpsa.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/hpsa.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
+index 7f53cea..a8c7188 100644
+--- a/drivers/scsi/hpsa.h
++++ b/drivers/scsi/hpsa.h
@@ -73,7 +73,7 @@ struct ctlr_info {
unsigned int msix_vector;
unsigned int msi_vector;
@@ -34822,9 +35784,10 @@ diff -urNp linux-3.1.4/drivers/scsi/hpsa.h linux-3.1.4/drivers/scsi/hpsa.h
/* queue and queue Info */
struct list_head reqQ;
-diff -urNp linux-3.1.4/drivers/scsi/ips.h linux-3.1.4/drivers/scsi/ips.h
---- linux-3.1.4/drivers/scsi/ips.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/ips.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
+index f2df059..a3a9930 100644
+--- a/drivers/scsi/ips.h
++++ b/drivers/scsi/ips.h
@@ -1027,7 +1027,7 @@ typedef struct {
int (*intr)(struct ips_ha *);
void (*enableint)(struct ips_ha *);
@@ -34834,9 +35797,10 @@ diff -urNp linux-3.1.4/drivers/scsi/ips.h linux-3.1.4/drivers/scsi/ips.h
typedef struct ips_ha {
uint8_t ha_id[IPS_MAX_CHANNELS+1];
-diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/libfc/fc_exch.c
---- linux-3.1.4/drivers/scsi/libfc/fc_exch.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/libfc/fc_exch.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
+index d261e98..1e00f35 100644
+--- a/drivers/scsi/libfc/fc_exch.c
++++ b/drivers/scsi/libfc/fc_exch.c
@@ -105,12 +105,12 @@ struct fc_exch_mgr {
* all together if not used XXX
*/
@@ -34856,7 +35820,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
} stats;
};
-@@ -718,7 +718,7 @@ static struct fc_exch *fc_exch_em_alloc(
+@@ -718,7 +718,7 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport,
/* allocate memory for exchange */
ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC);
if (!ep) {
@@ -34874,7 +35838,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
mempool_free(ep, mp->ep_pool);
return NULL;
}
-@@ -922,7 +922,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -922,7 +922,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
xid = ntohs(fh->fh_ox_id); /* we originated exch */
ep = fc_exch_find(mp, xid);
if (!ep) {
@@ -34883,7 +35847,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
reject = FC_RJT_OX_ID;
goto out;
}
-@@ -952,7 +952,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -952,7 +952,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
ep = fc_exch_find(mp, xid);
if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) {
if (ep) {
@@ -34892,7 +35856,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
reject = FC_RJT_RX_ID;
goto rel;
}
-@@ -963,7 +963,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -963,7 +963,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
}
xid = ep->xid; /* get our XID */
} else if (!ep) {
@@ -34901,7 +35865,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
reject = FC_RJT_RX_ID; /* XID not found */
goto out;
}
-@@ -980,7 +980,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -980,7 +980,7 @@ static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport,
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
@@ -34910,7 +35874,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
if (f_ctl & FC_FC_END_SEQ) {
/*
* Update sequence_id based on incoming last
-@@ -1430,22 +1430,22 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1430,22 +1430,22 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
ep = fc_exch_find(mp, ntohs(fh->fh_ox_id));
if (!ep) {
@@ -34937,7 +35901,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
goto rel;
}
sof = fr_sof(fp);
-@@ -1454,7 +1454,7 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1454,7 +1454,7 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
sp->ssb_stat |= SSB_ST_RESP;
sp->id = fh->fh_seq_id;
} else if (sp->id != fh->fh_seq_id) {
@@ -34946,7 +35910,7 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
goto rel;
}
-@@ -1518,9 +1518,9 @@ static void fc_exch_recv_resp(struct fc_
+@@ -1518,9 +1518,9 @@ static void fc_exch_recv_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */
if (!sp)
@@ -34958,10 +35922,11 @@ diff -urNp linux-3.1.4/drivers/scsi/libfc/fc_exch.c linux-3.1.4/drivers/scsi/lib
fc_frame_free(fp);
}
-diff -urNp linux-3.1.4/drivers/scsi/libsas/sas_ata.c linux-3.1.4/drivers/scsi/libsas/sas_ata.c
---- linux-3.1.4/drivers/scsi/libsas/sas_ata.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/libsas/sas_ata.c 2011-11-16 18:39:07.000000000 -0500
-@@ -368,7 +368,7 @@ static struct ata_port_operations sas_sa
+diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
+index db9238f..4378ed2 100644
+--- a/drivers/scsi/libsas/sas_ata.c
++++ b/drivers/scsi/libsas/sas_ata.c
+@@ -368,7 +368,7 @@ static struct ata_port_operations sas_sata_ops = {
.postreset = ata_std_postreset,
.error_handler = ata_std_error_handler,
.post_internal_cmd = sas_ata_post_internal,
@@ -34970,10 +35935,44 @@ diff -urNp linux-3.1.4/drivers/scsi/libsas/sas_ata.c linux-3.1.4/drivers/scsi/li
.qc_prep = ata_noop_qc_prep,
.qc_issue = sas_ata_qc_issue,
.qc_fill_rtf = sas_ata_qc_fill_rtf,
-diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c
---- linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c 2011-11-16 18:40:22.000000000 -0500
-@@ -105,7 +105,7 @@ MODULE_PARM_DESC(lpfc_debugfs_mask_disc_
+diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
+index c088a36..01c73b0 100644
+--- a/drivers/scsi/lpfc/lpfc.h
++++ b/drivers/scsi/lpfc/lpfc.h
+@@ -425,7 +425,7 @@ struct lpfc_vport {
+ struct dentry *debug_nodelist;
+ struct dentry *vport_debugfs_root;
+ struct lpfc_debugfs_trc *disc_trc;
+- atomic_t disc_trc_cnt;
++ atomic_unchecked_t disc_trc_cnt;
+ #endif
+ uint8_t stat_data_enabled;
+ uint8_t stat_data_blocked;
+@@ -835,8 +835,8 @@ struct lpfc_hba {
+ struct timer_list fabric_block_timer;
+ unsigned long bit_flags;
+ #define FABRIC_COMANDS_BLOCKED 0
+- atomic_t num_rsrc_err;
+- atomic_t num_cmd_success;
++ atomic_unchecked_t num_rsrc_err;
++ atomic_unchecked_t num_cmd_success;
+ unsigned long last_rsrc_error_time;
+ unsigned long last_ramp_down_time;
+ unsigned long last_ramp_up_time;
+@@ -850,7 +850,7 @@ struct lpfc_hba {
+ struct dentry *debug_dumpDif; /* BlockGuard BPL*/
+ struct dentry *debug_slow_ring_trc;
+ struct lpfc_debugfs_trc *slow_ring_trc;
+- atomic_t slow_ring_trc_cnt;
++ atomic_unchecked_t slow_ring_trc_cnt;
+ /* iDiag debugfs sub-directory */
+ struct dentry *idiag_root;
+ struct dentry *idiag_pci_cfg;
+diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
+index a0424dd..2499b6b 100644
+--- a/drivers/scsi/lpfc/lpfc_debugfs.c
++++ b/drivers/scsi/lpfc/lpfc_debugfs.c
+@@ -105,7 +105,7 @@ MODULE_PARM_DESC(lpfc_debugfs_mask_disc_trc,
#include <linux/debugfs.h>
@@ -34982,7 +35981,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
static unsigned long lpfc_debugfs_start_time = 0L;
/* iDiag */
-@@ -146,7 +146,7 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -146,7 +146,7 @@ lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size)
lpfc_debugfs_enable = 0;
len = 0;
@@ -34991,7 +35990,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
(lpfc_debugfs_max_disc_trc - 1);
for (i = index; i < lpfc_debugfs_max_disc_trc; i++) {
dtp = vport->disc_trc + i;
-@@ -212,7 +212,7 @@ lpfc_debugfs_slow_ring_trc_data(struct l
+@@ -212,7 +212,7 @@ lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size)
lpfc_debugfs_enable = 0;
len = 0;
@@ -35000,7 +35999,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
(lpfc_debugfs_max_slow_ring_trc - 1);
for (i = index; i < lpfc_debugfs_max_slow_ring_trc; i++) {
dtp = phba->slow_ring_trc + i;
-@@ -635,14 +635,14 @@ lpfc_debugfs_disc_trc(struct lpfc_vport
+@@ -635,14 +635,14 @@ lpfc_debugfs_disc_trc(struct lpfc_vport *vport, int mask, char *fmt,
!vport || !vport->disc_trc)
return;
@@ -35017,7 +36016,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
dtp->jif = jiffies;
#endif
return;
-@@ -673,14 +673,14 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_h
+@@ -673,14 +673,14 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_hba *phba, char *fmt,
!phba || !phba->slow_ring_trc)
return;
@@ -35034,7 +36033,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
dtp->jif = jiffies;
#endif
return;
-@@ -3828,7 +3828,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -3828,7 +3828,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
"slow_ring buffer\n");
goto debug_failed;
}
@@ -35043,7 +36042,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
memset(phba->slow_ring_trc, 0,
(sizeof(struct lpfc_debugfs_trc) *
lpfc_debugfs_max_slow_ring_trc));
-@@ -3874,7 +3874,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -3874,7 +3874,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
"buffer\n");
goto debug_failed;
}
@@ -35052,41 +36051,10 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_debugfs.c linux-3.1.4/drivers/scsi
snprintf(name, sizeof(name), "discovery_trace");
vport->debug_disc_trc =
-diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc.h linux-3.1.4/drivers/scsi/lpfc/lpfc.h
---- linux-3.1.4/drivers/scsi/lpfc/lpfc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/lpfc/lpfc.h 2011-11-16 18:39:07.000000000 -0500
-@@ -425,7 +425,7 @@ struct lpfc_vport {
- struct dentry *debug_nodelist;
- struct dentry *vport_debugfs_root;
- struct lpfc_debugfs_trc *disc_trc;
-- atomic_t disc_trc_cnt;
-+ atomic_unchecked_t disc_trc_cnt;
- #endif
- uint8_t stat_data_enabled;
- uint8_t stat_data_blocked;
-@@ -835,8 +835,8 @@ struct lpfc_hba {
- struct timer_list fabric_block_timer;
- unsigned long bit_flags;
- #define FABRIC_COMANDS_BLOCKED 0
-- atomic_t num_rsrc_err;
-- atomic_t num_cmd_success;
-+ atomic_unchecked_t num_rsrc_err;
-+ atomic_unchecked_t num_cmd_success;
- unsigned long last_rsrc_error_time;
- unsigned long last_ramp_down_time;
- unsigned long last_ramp_up_time;
-@@ -850,7 +850,7 @@ struct lpfc_hba {
- struct dentry *debug_dumpDif; /* BlockGuard BPL*/
- struct dentry *debug_slow_ring_trc;
- struct lpfc_debugfs_trc *slow_ring_trc;
-- atomic_t slow_ring_trc_cnt;
-+ atomic_unchecked_t slow_ring_trc_cnt;
- /* iDiag debugfs sub-directory */
- struct dentry *idiag_root;
- struct dentry *idiag_pci_cfg;
-diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_init.c linux-3.1.4/drivers/scsi/lpfc/lpfc_init.c
---- linux-3.1.4/drivers/scsi/lpfc/lpfc_init.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/lpfc/lpfc_init.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
+index a3c8200..31e562e 100644
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9969,8 +9969,10 @@ lpfc_init(void)
printk(LPFC_COPYRIGHT "\n");
@@ -35100,10 +36068,11 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_init.c linux-3.1.4/drivers/scsi/lp
}
lpfc_transport_template =
fc_attach_transport(&lpfc_transport_functions);
-diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c
---- linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c 2011-11-16 18:39:07.000000000 -0500
-@@ -297,7 +297,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hb
+diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
+index eadd241..26c8e0f 100644
+--- a/drivers/scsi/lpfc/lpfc_scsi.c
++++ b/drivers/scsi/lpfc/lpfc_scsi.c
+@@ -297,7 +297,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
uint32_t evt_posted;
spin_lock_irqsave(&phba->hbalock, flags);
@@ -35112,7 +36081,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lp
phba->last_rsrc_error_time = jiffies;
if ((phba->last_ramp_down_time + QUEUE_RAMP_DOWN_INTERVAL) > jiffies) {
-@@ -338,7 +338,7 @@ lpfc_rampup_queue_depth(struct lpfc_vpor
+@@ -338,7 +338,7 @@ lpfc_rampup_queue_depth(struct lpfc_vport *vport,
unsigned long flags;
struct lpfc_hba *phba = vport->phba;
uint32_t evt_posted;
@@ -35121,7 +36090,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lp
if (vport->cfg_lun_queue_depth <= queue_depth)
return;
-@@ -382,8 +382,8 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -382,8 +382,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
unsigned long num_rsrc_err, num_cmd_success;
int i;
@@ -35132,7 +36101,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lp
vports = lpfc_create_vport_work_array(phba);
if (vports != NULL)
-@@ -403,8 +403,8 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -403,8 +403,8 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)
}
}
lpfc_destroy_vport_work_array(phba, vports);
@@ -35143,7 +36112,7 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lp
}
/**
-@@ -438,8 +438,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -438,8 +438,8 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
}
}
lpfc_destroy_vport_work_array(phba, vports);
@@ -35154,10 +36123,11 @@ diff -urNp linux-3.1.4/drivers/scsi/lpfc/lpfc_scsi.c linux-3.1.4/drivers/scsi/lp
}
/**
-diff -urNp linux-3.1.4/drivers/scsi/megaraid/megaraid_mbox.c linux-3.1.4/drivers/scsi/megaraid/megaraid_mbox.c
---- linux-3.1.4/drivers/scsi/megaraid/megaraid_mbox.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/megaraid/megaraid_mbox.c 2011-11-16 18:40:22.000000000 -0500
-@@ -3503,6 +3503,8 @@ megaraid_cmm_register(adapter_t *adapter
+diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
+index 2e6619e..fa64494 100644
+--- a/drivers/scsi/megaraid/megaraid_mbox.c
++++ b/drivers/scsi/megaraid/megaraid_mbox.c
+@@ -3503,6 +3503,8 @@ megaraid_cmm_register(adapter_t *adapter)
int rval;
int i;
@@ -35166,10 +36136,11 @@ diff -urNp linux-3.1.4/drivers/scsi/megaraid/megaraid_mbox.c linux-3.1.4/drivers
// Allocate memory for the base list of scb for management module.
adapter->uscb_list = kcalloc(MBOX_MAX_USER_CMDS, sizeof(scb_t), GFP_KERNEL);
-diff -urNp linux-3.1.4/drivers/scsi/osd/osd_initiator.c linux-3.1.4/drivers/scsi/osd/osd_initiator.c
---- linux-3.1.4/drivers/scsi/osd/osd_initiator.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/osd/osd_initiator.c 2011-11-16 18:40:22.000000000 -0500
-@@ -97,6 +97,8 @@ static int _osd_get_print_system_info(st
+diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
+index 86afb13f..c912398 100644
+--- a/drivers/scsi/osd/osd_initiator.c
++++ b/drivers/scsi/osd/osd_initiator.c
+@@ -97,6 +97,8 @@ static int _osd_get_print_system_info(struct osd_dev *od,
int nelem = ARRAY_SIZE(get_attrs), a = 0;
int ret;
@@ -35178,10 +36149,11 @@ diff -urNp linux-3.1.4/drivers/scsi/osd/osd_initiator.c linux-3.1.4/drivers/scsi
or = osd_start_request(od, GFP_KERNEL);
if (!or)
return -ENOMEM;
-diff -urNp linux-3.1.4/drivers/scsi/pmcraid.c linux-3.1.4/drivers/scsi/pmcraid.c
---- linux-3.1.4/drivers/scsi/pmcraid.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/pmcraid.c 2011-11-16 18:39:07.000000000 -0500
-@@ -201,8 +201,8 @@ static int pmcraid_slave_alloc(struct sc
+diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
+index d079f9a..d26072c 100644
+--- a/drivers/scsi/pmcraid.c
++++ b/drivers/scsi/pmcraid.c
+@@ -201,8 +201,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
res->scsi_dev = scsi_dev;
scsi_dev->hostdata = res;
res->change_detected = 0;
@@ -35192,7 +36164,7 @@ diff -urNp linux-3.1.4/drivers/scsi/pmcraid.c linux-3.1.4/drivers/scsi/pmcraid.c
rc = 0;
}
spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags);
-@@ -2677,9 +2677,9 @@ static int pmcraid_error_handler(struct
+@@ -2677,9 +2677,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd)
/* If this was a SCSI read/write command keep count of errors */
if (SCSI_CMD_TYPE(scsi_cmd->cmnd[0]) == SCSI_READ_CMD)
@@ -35222,7 +36194,7 @@ diff -urNp linux-3.1.4/drivers/scsi/pmcraid.c linux-3.1.4/drivers/scsi/pmcraid.c
pinstance->num_hrrq;
if (request_size) {
-@@ -4498,7 +4498,7 @@ static void pmcraid_worker_function(stru
+@@ -4498,7 +4498,7 @@ static void pmcraid_worker_function(struct work_struct *workp)
pinstance = container_of(workp, struct pmcraid_instance, worker_q);
/* add resources only after host is added into system */
@@ -35231,7 +36203,7 @@ diff -urNp linux-3.1.4/drivers/scsi/pmcraid.c linux-3.1.4/drivers/scsi/pmcraid.c
return;
fw_version = be16_to_cpu(pinstance->inq_data->fw_version);
-@@ -5332,8 +5332,8 @@ static int __devinit pmcraid_init_instan
+@@ -5332,8 +5332,8 @@ static int __devinit pmcraid_init_instance(
init_waitqueue_head(&pinstance->reset_wait_q);
atomic_set(&pinstance->outstanding_cmds, 0);
@@ -35251,9 +36223,10 @@ diff -urNp linux-3.1.4/drivers/scsi/pmcraid.c linux-3.1.4/drivers/scsi/pmcraid.c
schedule_work(&pinstance->worker_q);
return rc;
-diff -urNp linux-3.1.4/drivers/scsi/pmcraid.h linux-3.1.4/drivers/scsi/pmcraid.h
---- linux-3.1.4/drivers/scsi/pmcraid.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/pmcraid.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
+index f920baf..4417389 100644
+--- a/drivers/scsi/pmcraid.h
++++ b/drivers/scsi/pmcraid.h
@@ -749,7 +749,7 @@ struct pmcraid_instance {
struct pmcraid_isr_param hrrq_vector[PMCRAID_NUM_MSIX_VECTORS];
@@ -35283,9 +36256,10 @@ diff -urNp linux-3.1.4/drivers/scsi/pmcraid.h linux-3.1.4/drivers/scsi/pmcraid.h
/* To indicate add/delete/modify during CCN */
u8 change_detected;
-diff -urNp linux-3.1.4/drivers/scsi/qla2xxx/qla_def.h linux-3.1.4/drivers/scsi/qla2xxx/qla_def.h
---- linux-3.1.4/drivers/scsi/qla2xxx/qla_def.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/qla2xxx/qla_def.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index a03eaf4..a6b3fd9 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2244,7 +2244,7 @@ struct isp_operations {
int (*get_flash_version) (struct scsi_qla_host *, void *);
int (*start_scsi) (srb_t *);
@@ -35295,9 +36269,10 @@ diff -urNp linux-3.1.4/drivers/scsi/qla2xxx/qla_def.h linux-3.1.4/drivers/scsi/q
/* MSI-X Support *************************************************************/
-diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_def.h linux-3.1.4/drivers/scsi/qla4xxx/ql4_def.h
---- linux-3.1.4/drivers/scsi/qla4xxx/ql4_def.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/qla4xxx/ql4_def.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
+index 473c5c8..4e2f24a 100644
+--- a/drivers/scsi/qla4xxx/ql4_def.h
++++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -256,7 +256,7 @@ struct ddb_entry {
atomic_t retry_relogin_timer; /* Min Time between relogins
* (4000 only) */
@@ -35307,10 +36282,11 @@ diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_def.h linux-3.1.4/drivers/scsi/q
* retried */
uint16_t port;
-diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c
---- linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c 2011-11-16 18:39:07.000000000 -0500
-@@ -680,7 +680,7 @@ static struct ddb_entry * qla4xxx_alloc_
+diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
+index 42ed5db..0262f9e 100644
+--- a/drivers/scsi/qla4xxx/ql4_init.c
++++ b/drivers/scsi/qla4xxx/ql4_init.c
+@@ -680,7 +680,7 @@ static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
ddb_entry->fw_ddb_index = fw_ddb_index;
atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
atomic_set(&ddb_entry->relogin_timer, 0);
@@ -35319,7 +36295,7 @@ diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c linux-3.1.4/drivers/scsi/
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
list_add_tail(&ddb_entry->list, &ha->ddb_list);
ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
-@@ -1433,7 +1433,7 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1433,7 +1433,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
if ((ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) &&
(atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE)) {
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
@@ -35328,10 +36304,11 @@ diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_init.c linux-3.1.4/drivers/scsi/
atomic_set(&ddb_entry->relogin_timer, 0);
clear_bit(DF_RELOGIN, &ddb_entry->flags);
iscsi_unblock_session(ddb_entry->sess);
-diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_os.c linux-3.1.4/drivers/scsi/qla4xxx/ql4_os.c
---- linux-3.1.4/drivers/scsi/qla4xxx/ql4_os.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/qla4xxx/ql4_os.c 2011-11-16 18:39:07.000000000 -0500
-@@ -811,13 +811,13 @@ static void qla4xxx_timer(struct scsi_ql
+diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
+index f2364ec..44c42b1 100644
+--- a/drivers/scsi/qla4xxx/ql4_os.c
++++ b/drivers/scsi/qla4xxx/ql4_os.c
+@@ -811,13 +811,13 @@ static void qla4xxx_timer(struct scsi_qla_host *ha)
ddb_entry->fw_ddb_device_state ==
DDB_DS_SESSION_FAILED) {
/* Reset retry relogin timer */
@@ -35347,10 +36324,11 @@ diff -urNp linux-3.1.4/drivers/scsi/qla4xxx/ql4_os.c linux-3.1.4/drivers/scsi/ql
relogin_retry_count))
);
start_dpc++;
-diff -urNp linux-3.1.4/drivers/scsi/scsi.c linux-3.1.4/drivers/scsi/scsi.c
---- linux-3.1.4/drivers/scsi/scsi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi.c 2011-11-16 18:39:07.000000000 -0500
-@@ -655,7 +655,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
+index 2aeb2e9..46e3925 100644
+--- a/drivers/scsi/scsi.c
++++ b/drivers/scsi/scsi.c
+@@ -655,7 +655,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
unsigned long timeout;
int rtn = 0;
@@ -35359,10 +36337,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi.c linux-3.1.4/drivers/scsi/scsi.c
/* check if the device is still usable */
if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
-diff -urNp linux-3.1.4/drivers/scsi/scsi_debug.c linux-3.1.4/drivers/scsi/scsi_debug.c
---- linux-3.1.4/drivers/scsi/scsi_debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_debug.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1493,6 +1493,8 @@ static int resp_mode_select(struct scsi_
+diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
+index 6888b2c..45befa1 100644
+--- a/drivers/scsi/scsi_debug.c
++++ b/drivers/scsi/scsi_debug.c
+@@ -1493,6 +1493,8 @@ static int resp_mode_select(struct scsi_cmnd * scp, int mselect6,
unsigned char arr[SDEBUG_MAX_MSELECT_SZ];
unsigned char *cmd = (unsigned char *)scp->cmnd;
@@ -35371,7 +36350,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_debug.c linux-3.1.4/drivers/scsi/scsi_d
if ((errsts = check_readiness(scp, 1, devip)))
return errsts;
memset(arr, 0, sizeof(arr));
-@@ -1590,6 +1592,8 @@ static int resp_log_sense(struct scsi_cm
+@@ -1590,6 +1592,8 @@ static int resp_log_sense(struct scsi_cmnd * scp,
unsigned char arr[SDEBUG_MAX_LSENSE_SZ];
unsigned char *cmd = (unsigned char *)scp->cmnd;
@@ -35380,10 +36359,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_debug.c linux-3.1.4/drivers/scsi/scsi_d
if ((errsts = check_readiness(scp, 1, devip)))
return errsts;
memset(arr, 0, sizeof(arr));
-diff -urNp linux-3.1.4/drivers/scsi/scsi_lib.c linux-3.1.4/drivers/scsi/scsi_lib.c
---- linux-3.1.4/drivers/scsi/scsi_lib.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_lib.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1413,7 +1413,7 @@ static void scsi_kill_request(struct req
+diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
+index b4d43ae..26edd69 100644
+--- a/drivers/scsi/scsi_lib.c
++++ b/drivers/scsi/scsi_lib.c
+@@ -1413,7 +1413,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
shost = sdev->host;
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
@@ -35392,7 +36372,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_lib.c linux-3.1.4/drivers/scsi/scsi_lib
/*
* SCSI request completion path will do scsi_device_unbusy(),
-@@ -1439,9 +1439,9 @@ static void scsi_softirq_done(struct req
+@@ -1439,9 +1439,9 @@ static void scsi_softirq_done(struct request *rq)
INIT_LIST_HEAD(&cmd->eh_entry);
@@ -35404,10 +36384,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_lib.c linux-3.1.4/drivers/scsi/scsi_lib
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
-diff -urNp linux-3.1.4/drivers/scsi/scsi_sysfs.c linux-3.1.4/drivers/scsi/scsi_sysfs.c
---- linux-3.1.4/drivers/scsi/scsi_sysfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_sysfs.c 2011-11-16 18:39:07.000000000 -0500
-@@ -622,7 +622,7 @@ show_iostat_##field(struct device *dev,
+diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
+index e0bd3f7..816b8a6 100644
+--- a/drivers/scsi/scsi_sysfs.c
++++ b/drivers/scsi/scsi_sysfs.c
+@@ -622,7 +622,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
struct scsi_device *sdev = to_scsi_device(dev); \
@@ -35416,10 +36397,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_sysfs.c linux-3.1.4/drivers/scsi/scsi_s
return snprintf(buf, 20, "0x%llx\n", count); \
} \
static DEVICE_ATTR(field, S_IRUGO, show_iostat_##field, NULL)
-diff -urNp linux-3.1.4/drivers/scsi/scsi_tgt_lib.c linux-3.1.4/drivers/scsi/scsi_tgt_lib.c
---- linux-3.1.4/drivers/scsi/scsi_tgt_lib.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_tgt_lib.c 2011-11-16 18:39:07.000000000 -0500
-@@ -362,7 +362,7 @@ static int scsi_map_user_pages(struct sc
+diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
+index 84a1fdf..693b0d6 100644
+--- a/drivers/scsi/scsi_tgt_lib.c
++++ b/drivers/scsi/scsi_tgt_lib.c
+@@ -362,7 +362,7 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
int err;
dprintk("%lx %u\n", uaddr, len);
@@ -35428,10 +36410,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_tgt_lib.c linux-3.1.4/drivers/scsi/scsi
if (err) {
/*
* TODO: need to fixup sg_tablesize, max_segment_size,
-diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_fc.c linux-3.1.4/drivers/scsi/scsi_transport_fc.c
---- linux-3.1.4/drivers/scsi/scsi_transport_fc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_transport_fc.c 2011-11-16 18:39:07.000000000 -0500
-@@ -484,7 +484,7 @@ static DECLARE_TRANSPORT_CLASS(fc_vport_
+diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
+index 1b21491..1b7f60e 100644
+--- a/drivers/scsi/scsi_transport_fc.c
++++ b/drivers/scsi/scsi_transport_fc.c
+@@ -484,7 +484,7 @@ static DECLARE_TRANSPORT_CLASS(fc_vport_class,
* Netlink Infrastructure
*/
@@ -35449,7 +36432,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_fc.c linux-3.1.4/drivers/scsi
}
EXPORT_SYMBOL(fc_get_event_number);
-@@ -645,7 +645,7 @@ static __init int fc_transport_init(void
+@@ -645,7 +645,7 @@ static __init int fc_transport_init(void)
{
int error;
@@ -35458,7 +36441,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_fc.c linux-3.1.4/drivers/scsi
error = transport_class_register(&fc_host_class);
if (error)
-@@ -835,7 +835,7 @@ static int fc_str_to_dev_loss(const char
+@@ -835,7 +835,7 @@ static int fc_str_to_dev_loss(const char *buf, unsigned long *val)
char *cp;
*val = simple_strtoul(buf, &cp, 0);
@@ -35467,9 +36450,10 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_fc.c linux-3.1.4/drivers/scsi
return -EINVAL;
/*
* Check for overflow; dev_loss_tmo is u32
-diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c
---- linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
+index 3fd16d7..ba0871f 100644
+--- a/drivers/scsi/scsi_transport_iscsi.c
++++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -83,7 +83,7 @@ struct iscsi_internal {
struct device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1];
};
@@ -35479,7 +36463,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c linux-3.1.4/drivers/s
static struct workqueue_struct *iscsi_eh_timer_workq;
/*
-@@ -761,7 +761,7 @@ int iscsi_add_session(struct iscsi_cls_s
+@@ -761,7 +761,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
int err;
ihost = shost->shost_data;
@@ -35488,7 +36472,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c linux-3.1.4/drivers/s
if (id == ISCSI_MAX_TARGET) {
for (id = 0; id < ISCSI_MAX_TARGET; id++) {
-@@ -2200,7 +2200,7 @@ static __init int iscsi_transport_init(v
+@@ -2200,7 +2200,7 @@ static __init int iscsi_transport_init(void)
printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
ISCSI_TRANSPORT_VERSION);
@@ -35497,9 +36481,10 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_iscsi.c linux-3.1.4/drivers/s
err = class_register(&iscsi_transport_class);
if (err)
-diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_srp.c linux-3.1.4/drivers/scsi/scsi_transport_srp.c
---- linux-3.1.4/drivers/scsi/scsi_transport_srp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/scsi_transport_srp.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
+index 21a045e..ec89e03 100644
+--- a/drivers/scsi/scsi_transport_srp.c
++++ b/drivers/scsi/scsi_transport_srp.c
@@ -33,7 +33,7 @@
#include "scsi_transport_srp_internal.h"
@@ -35509,7 +36494,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_srp.c linux-3.1.4/drivers/scs
};
#define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data)
-@@ -62,7 +62,7 @@ static int srp_host_setup(struct transpo
+@@ -62,7 +62,7 @@ static int srp_host_setup(struct transport_container *tc, struct device *dev,
struct Scsi_Host *shost = dev_to_shost(dev);
struct srp_host_attrs *srp_host = to_srp_host_attrs(shost);
@@ -35518,7 +36503,7 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_srp.c linux-3.1.4/drivers/scs
return 0;
}
-@@ -211,7 +211,7 @@ struct srp_rport *srp_rport_add(struct S
+@@ -211,7 +211,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
memcpy(rport->port_id, ids->port_id, sizeof(rport->port_id));
rport->roles = ids->roles;
@@ -35527,10 +36512,11 @@ diff -urNp linux-3.1.4/drivers/scsi/scsi_transport_srp.c linux-3.1.4/drivers/scs
dev_set_name(&rport->dev, "port-%d:%d", shost->host_no, id);
transport_setup_device(&rport->dev);
-diff -urNp linux-3.1.4/drivers/scsi/sg.c linux-3.1.4/drivers/scsi/sg.c
---- linux-3.1.4/drivers/scsi/sg.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/sg.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1075,7 +1075,7 @@ sg_ioctl(struct file *filp, unsigned int
+diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
+index 909ed9e..1ae290a 100644
+--- a/drivers/scsi/sg.c
++++ b/drivers/scsi/sg.c
+@@ -1075,7 +1075,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
sdp->disk->disk_name,
MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
NULL,
@@ -35557,10 +36543,11 @@ diff -urNp linux-3.1.4/drivers/scsi/sg.c linux-3.1.4/drivers/scsi/sg.c
sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
if (!sg_proc_sgp)
-diff -urNp linux-3.1.4/drivers/scsi/sym53c8xx_2/sym_glue.c linux-3.1.4/drivers/scsi/sym53c8xx_2/sym_glue.c
---- linux-3.1.4/drivers/scsi/sym53c8xx_2/sym_glue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/sym53c8xx_2/sym_glue.c 2011-11-16 18:40:22.000000000 -0500
-@@ -1756,6 +1756,8 @@ static int __devinit sym2_probe(struct p
+diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
+index b4543f5..e1b34b8 100644
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
+@@ -1756,6 +1756,8 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
int do_iounmap = 0;
int do_disable_device = 1;
@@ -35569,10 +36556,11 @@ diff -urNp linux-3.1.4/drivers/scsi/sym53c8xx_2/sym_glue.c linux-3.1.4/drivers/s
memset(&sym_dev, 0, sizeof(sym_dev));
memset(&nvram, 0, sizeof(nvram));
sym_dev.pdev = pdev;
-diff -urNp linux-3.1.4/drivers/scsi/vmw_pvscsi.c linux-3.1.4/drivers/scsi/vmw_pvscsi.c
---- linux-3.1.4/drivers/scsi/vmw_pvscsi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/scsi/vmw_pvscsi.c 2011-11-16 18:40:22.000000000 -0500
-@@ -447,6 +447,8 @@ static void pvscsi_setup_all_rings(const
+diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
+index a18996d..fe993cb 100644
+--- a/drivers/scsi/vmw_pvscsi.c
++++ b/drivers/scsi/vmw_pvscsi.c
+@@ -447,6 +447,8 @@ static void pvscsi_setup_all_rings(const struct pvscsi_adapter *adapter)
dma_addr_t base;
unsigned i;
@@ -35581,22 +36569,11 @@ diff -urNp linux-3.1.4/drivers/scsi/vmw_pvscsi.c linux-3.1.4/drivers/scsi/vmw_pv
cmd.ringsStatePPN = adapter->ringStatePA >> PAGE_SHIFT;
cmd.reqRingNumPages = adapter->req_pages;
cmd.cmpRingNumPages = adapter->cmp_pages;
-diff -urNp linux-3.1.4/drivers/spi/spi.c linux-3.1.4/drivers/spi/spi.c
---- linux-3.1.4/drivers/spi/spi.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/spi/spi.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1023,7 +1023,7 @@ int spi_bus_unlock(struct spi_master *ma
- EXPORT_SYMBOL_GPL(spi_bus_unlock);
-
- /* portable code must never pass more than 32 bytes */
--#define SPI_BUFSIZ max(32,SMP_CACHE_BYTES)
-+#define SPI_BUFSIZ max(32UL,SMP_CACHE_BYTES)
-
- static u8 *buf;
-
-diff -urNp linux-3.1.4/drivers/spi/spi-dw-pci.c linux-3.1.4/drivers/spi/spi-dw-pci.c
---- linux-3.1.4/drivers/spi/spi-dw-pci.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/spi/spi-dw-pci.c 2011-11-16 18:39:07.000000000 -0500
-@@ -148,7 +148,7 @@ static int spi_resume(struct pci_dev *pd
+diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
+index c5f37f0..898d202 100644
+--- a/drivers/spi/spi-dw-pci.c
++++ b/drivers/spi/spi-dw-pci.c
+@@ -148,7 +148,7 @@ static int spi_resume(struct pci_dev *pdev)
#define spi_resume NULL
#endif
@@ -35605,10 +36582,24 @@ diff -urNp linux-3.1.4/drivers/spi/spi-dw-pci.c linux-3.1.4/drivers/spi/spi-dw-p
/* Intel MID platform SPI controller 0 */
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0800) },
{},
-diff -urNp linux-3.1.4/drivers/staging/ath6kl/os/linux/ar6000_drv.c linux-3.1.4/drivers/staging/ath6kl/os/linux/ar6000_drv.c
---- linux-3.1.4/drivers/staging/ath6kl/os/linux/ar6000_drv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/ath6kl/os/linux/ar6000_drv.c 2011-11-16 18:39:07.000000000 -0500
-@@ -362,7 +362,7 @@ static struct ar_cookie s_ar_cookie_mem[
+diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
+index 4d1b9f5..8408fe3 100644
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -1023,7 +1023,7 @@ int spi_bus_unlock(struct spi_master *master)
+ EXPORT_SYMBOL_GPL(spi_bus_unlock);
+
+ /* portable code must never pass more than 32 bytes */
+-#define SPI_BUFSIZ max(32,SMP_CACHE_BYTES)
++#define SPI_BUFSIZ max(32UL,SMP_CACHE_BYTES)
+
+ static u8 *buf;
+
+diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+index 32ee39a..3004c3d 100644
+--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
++++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+@@ -362,7 +362,7 @@ static struct ar_cookie s_ar_cookie_mem[MAX_COOKIE_NUM];
(((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0))
@@ -35617,10 +36608,11 @@ diff -urNp linux-3.1.4/drivers/staging/ath6kl/os/linux/ar6000_drv.c linux-3.1.4/
.ndo_init = NULL,
.ndo_open = ar6000_open,
.ndo_stop = ar6000_close,
-diff -urNp linux-3.1.4/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h linux-3.1.4/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h
---- linux-3.1.4/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h 2011-11-16 18:39:07.000000000 -0500
-@@ -30,7 +30,7 @@ typedef bool (*ar6k_pal_recv_pkt_t)(void
+diff --git a/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h b/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h
+index 39e0873..0925710 100644
+--- a/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h
++++ b/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h
+@@ -30,7 +30,7 @@ typedef bool (*ar6k_pal_recv_pkt_t)(void *pHciPalInfo, void *skb);
typedef struct ar6k_pal_config_s
{
ar6k_pal_recv_pkt_t fpar6k_pal_recv_pkt;
@@ -35629,10 +36621,11 @@ diff -urNp linux-3.1.4/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h linux-
void register_pal_cb(ar6k_pal_config_t *palConfig_p);
#endif /* _AR6K_PAL_H_ */
-diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
---- linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-11-16 18:39:07.000000000 -0500
-@@ -451,14 +451,14 @@ static void brcmf_op_if(struct brcmf_if
+diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+index 05dada9..96171c6 100644
+--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
++++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+@@ -451,14 +451,14 @@ static void brcmf_op_if(struct brcmf_if *ifp)
free_netdev(ifp->net);
}
/* Allocate etherdev, including space for private structure */
@@ -35649,7 +36642,7 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-3.1.
err = brcmf_net_attach(&drvr_priv->pub, ifp->idx);
if (err != 0) {
BRCMF_ERROR(("%s: brcmf_net_attach failed, "
-@@ -1279,7 +1279,7 @@ struct brcmf_pub *brcmf_attach(struct br
+@@ -1279,7 +1279,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
BRCMF_TRACE(("%s: Enter\n", __func__));
/* Allocate etherdev, including space for private structure */
@@ -35658,7 +36651,7 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-3.1.
if (!net) {
BRCMF_ERROR(("%s: OOM - alloc_etherdev\n", __func__));
goto fail;
-@@ -1295,7 +1295,7 @@ struct brcmf_pub *brcmf_attach(struct br
+@@ -1295,7 +1295,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
/*
* Save the brcmf_info into the priv
*/
@@ -35667,7 +36660,7 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-3.1.
/* Set network interface name if it was provided as module parameter */
if (iface_name[0]) {
-@@ -1352,7 +1352,7 @@ struct brcmf_pub *brcmf_attach(struct br
+@@ -1352,7 +1352,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
/*
* Save the brcmf_info into the priv
*/
@@ -35676,9 +36669,10 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-3.1.
#if defined(CONFIG_PM_SLEEP)
atomic_set(&brcmf_mmc_suspend, false);
-diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/sdio_host.h linux-3.1.4/drivers/staging/brcm80211/brcmfmac/sdio_host.h
---- linux-3.1.4/drivers/staging/brcm80211/brcmfmac/sdio_host.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/brcm80211/brcmfmac/sdio_host.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/brcm80211/brcmfmac/sdio_host.h b/drivers/staging/brcm80211/brcmfmac/sdio_host.h
+index d345472..cedb19e 100644
+--- a/drivers/staging/brcm80211/brcmfmac/sdio_host.h
++++ b/drivers/staging/brcm80211/brcmfmac/sdio_host.h
@@ -263,7 +263,7 @@ struct brcmf_sdioh_driver {
u16 func, uint bustype, u32 regsva, void *param);
/* detach from device */
@@ -35688,9 +36682,10 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmfmac/sdio_host.h linux-3.1.
struct sdioh_info;
-diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h linux-3.1.4/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
---- linux-3.1.4/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
+index a01b01c..b3f721c 100644
+--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
++++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
@@ -591,7 +591,7 @@ struct phy_func_ptr {
initfn_t carrsuppr;
rxsigpwrfn_t rxsigpwr;
@@ -35700,10 +36695,11 @@ diff -urNp linux-3.1.4/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h linux-3.
struct brcms_phy {
struct brcms_phy_pub pubpi_ro;
-diff -urNp linux-3.1.4/drivers/staging/et131x/et1310_tx.c linux-3.1.4/drivers/staging/et131x/et1310_tx.c
---- linux-3.1.4/drivers/staging/et131x/et1310_tx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/et131x/et1310_tx.c 2011-11-16 18:39:07.000000000 -0500
-@@ -635,11 +635,11 @@ inline void et131x_free_send_packet(stru
+diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c
+index 8fb3051..a8b6c67 100644
+--- a/drivers/staging/et131x/et1310_tx.c
++++ b/drivers/staging/et131x/et1310_tx.c
+@@ -635,11 +635,11 @@ inline void et131x_free_send_packet(struct et131x_adapter *etdev,
struct net_device_stats *stats = &etdev->net_stats;
if (tcb->flags & fMP_DEST_BROAD)
@@ -35718,9 +36714,10 @@ diff -urNp linux-3.1.4/drivers/staging/et131x/et1310_tx.c linux-3.1.4/drivers/st
if (tcb->skb) {
stats->tx_bytes += tcb->skb->len;
-diff -urNp linux-3.1.4/drivers/staging/et131x/et131x_adapter.h linux-3.1.4/drivers/staging/et131x/et131x_adapter.h
---- linux-3.1.4/drivers/staging/et131x/et131x_adapter.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/et131x/et131x_adapter.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
+index 408c50b..fd65e9f 100644
+--- a/drivers/staging/et131x/et131x_adapter.h
++++ b/drivers/staging/et131x/et131x_adapter.h
@@ -106,11 +106,11 @@ struct ce_stats {
* operations
*/
@@ -35736,10 +36733,11 @@ diff -urNp linux-3.1.4/drivers/staging/et131x/et131x_adapter.h linux-3.1.4/drive
u32 norcvbuf; /* # Rx packets discarded */
u32 noxmtbuf; /* # Tx packets discarded */
-diff -urNp linux-3.1.4/drivers/staging/hv/channel.c linux-3.1.4/drivers/staging/hv/channel.c
---- linux-3.1.4/drivers/staging/hv/channel.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/channel.c 2011-11-16 18:39:07.000000000 -0500
-@@ -447,8 +447,8 @@ int vmbus_establish_gpadl(struct vmbus_c
+diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c
+index 455f47a..86205ff 100644
+--- a/drivers/staging/hv/channel.c
++++ b/drivers/staging/hv/channel.c
+@@ -447,8 +447,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
int ret = 0;
int t;
@@ -35750,10 +36748,11 @@ diff -urNp linux-3.1.4/drivers/staging/hv/channel.c linux-3.1.4/drivers/staging/
ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
if (ret)
-diff -urNp linux-3.1.4/drivers/staging/hv/hv.c linux-3.1.4/drivers/staging/hv/hv.c
---- linux-3.1.4/drivers/staging/hv/hv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/hv.c 2011-11-16 18:39:07.000000000 -0500
-@@ -132,7 +132,7 @@ static u64 do_hypercall(u64 control, voi
+diff --git a/drivers/staging/hv/hv.c b/drivers/staging/hv/hv.c
+index 824f816..a800af7 100644
+--- a/drivers/staging/hv/hv.c
++++ b/drivers/staging/hv/hv.c
+@@ -132,7 +132,7 @@ static u64 do_hypercall(u64 control, void *input, void *output)
u64 output_address = (output) ? virt_to_phys(output) : 0;
u32 output_address_hi = output_address >> 32;
u32 output_address_lo = output_address & 0xFFFFFFFF;
@@ -35762,10 +36761,11 @@ diff -urNp linux-3.1.4/drivers/staging/hv/hv.c linux-3.1.4/drivers/staging/hv/hv
__asm__ __volatile__ ("call *%8" : "=d"(hv_status_hi),
"=a"(hv_status_lo) : "d" (control_hi),
-diff -urNp linux-3.1.4/drivers/staging/hv/hv_mouse.c linux-3.1.4/drivers/staging/hv/hv_mouse.c
---- linux-3.1.4/drivers/staging/hv/hv_mouse.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/hv_mouse.c 2011-11-16 18:39:07.000000000 -0500
-@@ -878,8 +878,10 @@ static void reportdesc_callback(struct h
+diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
+index d957fc2..43cedd9 100644
+--- a/drivers/staging/hv/hv_mouse.c
++++ b/drivers/staging/hv/hv_mouse.c
+@@ -878,8 +878,10 @@ static void reportdesc_callback(struct hv_device *dev, void *packet, u32 len)
if (hid_dev) {
DPRINT_INFO(INPUTVSC_DRV, "hid_device created");
@@ -35778,9 +36778,10 @@ diff -urNp linux-3.1.4/drivers/staging/hv/hv_mouse.c linux-3.1.4/drivers/staging
hid_dev->bus = BUS_VIRTUAL;
hid_dev->vendor = input_device_ctx->device_info.vendor;
-diff -urNp linux-3.1.4/drivers/staging/hv/hyperv_vmbus.h linux-3.1.4/drivers/staging/hv/hyperv_vmbus.h
---- linux-3.1.4/drivers/staging/hv/hyperv_vmbus.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/hyperv_vmbus.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/hv/hyperv_vmbus.h b/drivers/staging/hv/hyperv_vmbus.h
+index 349ad80..3f75719 100644
+--- a/drivers/staging/hv/hyperv_vmbus.h
++++ b/drivers/staging/hv/hyperv_vmbus.h
@@ -559,7 +559,7 @@ enum vmbus_connect_state {
struct vmbus_connection {
enum vmbus_connect_state conn_state;
@@ -35790,9 +36791,10 @@ diff -urNp linux-3.1.4/drivers/staging/hv/hyperv_vmbus.h linux-3.1.4/drivers/sta
/*
* Represents channel interrupts. Each bit position represents a
-diff -urNp linux-3.1.4/drivers/staging/hv/rndis_filter.c linux-3.1.4/drivers/staging/hv/rndis_filter.c
---- linux-3.1.4/drivers/staging/hv/rndis_filter.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/rndis_filter.c 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c
+index dbb5201..d6047c6 100644
+--- a/drivers/staging/hv/rndis_filter.c
++++ b/drivers/staging/hv/rndis_filter.c
@@ -43,7 +43,7 @@ struct rndis_device {
enum rndis_device_state state;
@@ -35802,7 +36804,7 @@ diff -urNp linux-3.1.4/drivers/staging/hv/rndis_filter.c linux-3.1.4/drivers/sta
spinlock_t request_lock;
struct list_head req_list;
-@@ -117,7 +117,7 @@ static struct rndis_request *get_rndis_r
+@@ -117,7 +117,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev,
* template
*/
set = &rndis_msg->msg.set_req;
@@ -35811,7 +36813,7 @@ diff -urNp linux-3.1.4/drivers/staging/hv/rndis_filter.c linux-3.1.4/drivers/sta
/* Add to the request list */
spin_lock_irqsave(&dev->request_lock, flags);
-@@ -622,7 +622,7 @@ static void rndis_filter_halt_device(str
+@@ -622,7 +622,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
/* Setup the rndis set */
halt = &request->request_msg.msg.halt_req;
@@ -35820,10 +36822,11 @@ diff -urNp linux-3.1.4/drivers/staging/hv/rndis_filter.c linux-3.1.4/drivers/sta
/* Ignore return since this msg is optional. */
rndis_filter_send_request(dev, request);
-diff -urNp linux-3.1.4/drivers/staging/hv/vmbus_drv.c linux-3.1.4/drivers/staging/hv/vmbus_drv.c
---- linux-3.1.4/drivers/staging/hv/vmbus_drv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/hv/vmbus_drv.c 2011-11-16 18:39:07.000000000 -0500
-@@ -660,11 +660,11 @@ int vmbus_child_device_register(struct h
+diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
+index 1c949f5..7a8b104 100644
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -660,11 +660,11 @@ int vmbus_child_device_register(struct hv_device *child_device_obj)
{
int ret = 0;
@@ -35837,9 +36840,10 @@ diff -urNp linux-3.1.4/drivers/staging/hv/vmbus_drv.c linux-3.1.4/drivers/stagin
/* The new device belongs to this bus */
child_device_obj->device.bus = &hv_bus; /* device->dev.bus; */
-diff -urNp linux-3.1.4/drivers/staging/iio/ring_generic.h linux-3.1.4/drivers/staging/iio/ring_generic.h
---- linux-3.1.4/drivers/staging/iio/ring_generic.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/iio/ring_generic.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h
+index 3f26f71..fb5c787 100644
+--- a/drivers/staging/iio/ring_generic.h
++++ b/drivers/staging/iio/ring_generic.h
@@ -62,7 +62,7 @@ struct iio_ring_access_funcs {
int (*is_enabled)(struct iio_ring_buffer *ring);
@@ -35849,10 +36853,11 @@ diff -urNp linux-3.1.4/drivers/staging/iio/ring_generic.h linux-3.1.4/drivers/st
struct iio_ring_setup_ops {
int (*preenable)(struct iio_dev *);
-diff -urNp linux-3.1.4/drivers/staging/mei/interface.c linux-3.1.4/drivers/staging/mei/interface.c
---- linux-3.1.4/drivers/staging/mei/interface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/mei/interface.c 2011-11-17 18:39:18.000000000 -0500
-@@ -332,7 +332,7 @@ int mei_send_flow_control(struct mei_dev
+diff --git a/drivers/staging/mei/interface.c b/drivers/staging/mei/interface.c
+index cfec92d..a65dacf 100644
+--- a/drivers/staging/mei/interface.c
++++ b/drivers/staging/mei/interface.c
+@@ -332,7 +332,7 @@ int mei_send_flow_control(struct mei_device *dev, struct mei_cl *cl)
mei_hdr->reserved = 0;
mei_flow_control = (struct hbm_flow_control *) &dev->wr_msg_buf[1];
@@ -35861,7 +36866,7 @@ diff -urNp linux-3.1.4/drivers/staging/mei/interface.c linux-3.1.4/drivers/stagi
mei_flow_control->host_addr = cl->host_client_id;
mei_flow_control->me_addr = cl->me_client_id;
mei_flow_control->cmd.cmd = MEI_FLOW_CONTROL_CMD;
-@@ -396,7 +396,7 @@ int mei_disconnect(struct mei_device *de
+@@ -396,7 +396,7 @@ int mei_disconnect(struct mei_device *dev, struct mei_cl *cl)
mei_cli_disconnect =
(struct hbm_client_disconnect_request *) &dev->wr_msg_buf[1];
@@ -35870,29 +36875,11 @@ diff -urNp linux-3.1.4/drivers/staging/mei/interface.c linux-3.1.4/drivers/stagi
mei_cli_disconnect->host_addr = cl->host_client_id;
mei_cli_disconnect->me_addr = cl->me_client_id;
mei_cli_disconnect->cmd.cmd = CLIENT_DISCONNECT_REQ_CMD;
-diff -urNp linux-3.1.4/drivers/staging/octeon/ethernet.c linux-3.1.4/drivers/staging/octeon/ethernet.c
---- linux-3.1.4/drivers/staging/octeon/ethernet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/octeon/ethernet.c 2011-11-16 18:39:07.000000000 -0500
-@@ -258,11 +258,11 @@ static struct net_device_stats *cvm_oct_
- * since the RX tasklet also increments it.
- */
- #ifdef CONFIG_64BIT
-- atomic64_add(rx_status.dropped_packets,
-- (atomic64_t *)&priv->stats.rx_dropped);
-+ atomic64_add_unchecked(rx_status.dropped_packets,
-+ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
- #else
-- atomic_add(rx_status.dropped_packets,
-- (atomic_t *)&priv->stats.rx_dropped);
-+ atomic_add_unchecked(rx_status.dropped_packets,
-+ (atomic_unchecked_t *)&priv->stats.rx_dropped);
- #endif
- }
-
-diff -urNp linux-3.1.4/drivers/staging/octeon/ethernet-rx.c linux-3.1.4/drivers/staging/octeon/ethernet-rx.c
---- linux-3.1.4/drivers/staging/octeon/ethernet-rx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/octeon/ethernet-rx.c 2011-11-16 18:39:07.000000000 -0500
-@@ -420,11 +420,11 @@ static int cvm_oct_napi_poll(struct napi
+diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
+index 8b307b4..a97ac91 100644
+--- a/drivers/staging/octeon/ethernet-rx.c
++++ b/drivers/staging/octeon/ethernet-rx.c
+@@ -420,11 +420,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
/* Increment RX stats for virtual ports */
if (work->ipprt >= CVMX_PIP_NUM_INPUT_PORTS) {
#ifdef CONFIG_64BIT
@@ -35908,7 +36895,7 @@ diff -urNp linux-3.1.4/drivers/staging/octeon/ethernet-rx.c linux-3.1.4/drivers/
#endif
}
netif_receive_skb(skb);
-@@ -436,9 +436,9 @@ static int cvm_oct_napi_poll(struct napi
+@@ -436,9 +436,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
dev->name);
*/
#ifdef CONFIG_64BIT
@@ -35920,10 +36907,31 @@ diff -urNp linux-3.1.4/drivers/staging/octeon/ethernet-rx.c linux-3.1.4/drivers/
#endif
dev_kfree_skb_irq(skb);
}
-diff -urNp linux-3.1.4/drivers/staging/pohmelfs/inode.c linux-3.1.4/drivers/staging/pohmelfs/inode.c
---- linux-3.1.4/drivers/staging/pohmelfs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/pohmelfs/inode.c 2011-11-16 18:39:07.000000000 -0500
-@@ -1861,7 +1861,7 @@ static int pohmelfs_fill_super(struct su
+diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
+index a8f780e..aef1098 100644
+--- a/drivers/staging/octeon/ethernet.c
++++ b/drivers/staging/octeon/ethernet.c
+@@ -258,11 +258,11 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
+ * since the RX tasklet also increments it.
+ */
+ #ifdef CONFIG_64BIT
+- atomic64_add(rx_status.dropped_packets,
+- (atomic64_t *)&priv->stats.rx_dropped);
++ atomic64_add_unchecked(rx_status.dropped_packets,
++ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
+ #else
+- atomic_add(rx_status.dropped_packets,
+- (atomic_t *)&priv->stats.rx_dropped);
++ atomic_add_unchecked(rx_status.dropped_packets,
++ (atomic_unchecked_t *)&priv->stats.rx_dropped);
+ #endif
+ }
+
+diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
+index f3c6060..56bf826 100644
+--- a/drivers/staging/pohmelfs/inode.c
++++ b/drivers/staging/pohmelfs/inode.c
+@@ -1861,7 +1861,7 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
mutex_init(&psb->mcache_lock);
psb->mcache_root = RB_ROOT;
psb->mcache_timeout = msecs_to_jiffies(5000);
@@ -35932,7 +36940,7 @@ diff -urNp linux-3.1.4/drivers/staging/pohmelfs/inode.c linux-3.1.4/drivers/stag
psb->trans_max_pages = 100;
-@@ -1876,7 +1876,7 @@ static int pohmelfs_fill_super(struct su
+@@ -1876,7 +1876,7 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
INIT_LIST_HEAD(&psb->crypto_ready_list);
INIT_LIST_HEAD(&psb->crypto_active_list);
@@ -35941,10 +36949,11 @@ diff -urNp linux-3.1.4/drivers/staging/pohmelfs/inode.c linux-3.1.4/drivers/stag
atomic_long_set(&psb->total_inodes, 0);
mutex_init(&psb->state_lock);
-diff -urNp linux-3.1.4/drivers/staging/pohmelfs/mcache.c linux-3.1.4/drivers/staging/pohmelfs/mcache.c
---- linux-3.1.4/drivers/staging/pohmelfs/mcache.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/pohmelfs/mcache.c 2011-11-16 18:39:07.000000000 -0500
-@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_
+diff --git a/drivers/staging/pohmelfs/mcache.c b/drivers/staging/pohmelfs/mcache.c
+index e22665c..a2a9390 100644
+--- a/drivers/staging/pohmelfs/mcache.c
++++ b/drivers/staging/pohmelfs/mcache.c
+@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_alloc(struct pohmelfs_sb *psb, u64 start
m->data = data;
m->start = start;
m->size = size;
@@ -35953,9 +36962,10 @@ diff -urNp linux-3.1.4/drivers/staging/pohmelfs/mcache.c linux-3.1.4/drivers/sta
mutex_lock(&psb->mcache_lock);
err = pohmelfs_mcache_insert(psb, m);
-diff -urNp linux-3.1.4/drivers/staging/pohmelfs/netfs.h linux-3.1.4/drivers/staging/pohmelfs/netfs.h
---- linux-3.1.4/drivers/staging/pohmelfs/netfs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/pohmelfs/netfs.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/pohmelfs/netfs.h b/drivers/staging/pohmelfs/netfs.h
+index 985b6b7..7699e05 100644
+--- a/drivers/staging/pohmelfs/netfs.h
++++ b/drivers/staging/pohmelfs/netfs.h
@@ -571,14 +571,14 @@ struct pohmelfs_config;
struct pohmelfs_sb {
struct rb_root mcache_root;
@@ -35973,10 +36983,11 @@ diff -urNp linux-3.1.4/drivers/staging/pohmelfs/netfs.h linux-3.1.4/drivers/stag
unsigned int crypto_attached_size;
unsigned int crypto_align_size;
-diff -urNp linux-3.1.4/drivers/staging/pohmelfs/trans.c linux-3.1.4/drivers/staging/pohmelfs/trans.c
---- linux-3.1.4/drivers/staging/pohmelfs/trans.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/pohmelfs/trans.c 2011-11-16 18:39:07.000000000 -0500
-@@ -492,7 +492,7 @@ int netfs_trans_finish(struct netfs_tran
+diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c
+index 36a2535..0591bf4 100644
+--- a/drivers/staging/pohmelfs/trans.c
++++ b/drivers/staging/pohmelfs/trans.c
+@@ -492,7 +492,7 @@ int netfs_trans_finish(struct netfs_trans *t, struct pohmelfs_sb *psb)
int err;
struct netfs_cmd *cmd = t->iovec.iov_base;
@@ -35985,9 +36996,10 @@ diff -urNp linux-3.1.4/drivers/staging/pohmelfs/trans.c linux-3.1.4/drivers/stag
cmd->size = t->iovec.iov_len - sizeof(struct netfs_cmd) +
t->attached_size + t->attached_pages * sizeof(struct netfs_cmd);
-diff -urNp linux-3.1.4/drivers/staging/rtl8712/rtl871x_io.h linux-3.1.4/drivers/staging/rtl8712/rtl871x_io.h
---- linux-3.1.4/drivers/staging/rtl8712/rtl871x_io.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/rtl8712/rtl871x_io.h 2011-11-16 18:39:07.000000000 -0500
+diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
+index b70cb2b..4db41a7 100644
+--- a/drivers/staging/rtl8712/rtl871x_io.h
++++ b/drivers/staging/rtl8712/rtl871x_io.h
@@ -83,7 +83,7 @@ struct _io_ops {
u8 *pmem);
u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
@@ -35997,10 +37009,11 @@ diff -urNp linux-3.1.4/drivers/staging/rtl8712/rtl871x_io.h linux-3.1.4/drivers/
struct io_req {
struct list_head list;
-diff -urNp linux-3.1.4/drivers/staging/sbe-2t3e3/netdev.c linux-3.1.4/drivers/staging/sbe-2t3e3/netdev.c
---- linux-3.1.4/drivers/staging/sbe-2t3e3/netdev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/sbe-2t3e3/netdev.c 2011-11-16 18:39:08.000000000 -0500
-@@ -51,7 +51,7 @@ int t3e3_ioctl(struct net_device *dev, s
+diff --git a/drivers/staging/sbe-2t3e3/netdev.c b/drivers/staging/sbe-2t3e3/netdev.c
+index c7b5e8b..783d6cb 100644
+--- a/drivers/staging/sbe-2t3e3/netdev.c
++++ b/drivers/staging/sbe-2t3e3/netdev.c
+@@ -51,7 +51,7 @@ int t3e3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
t3e3_if_config(sc, cmd_2t3e3, (char *)&param, &resp, &rlen);
if (rlen)
@@ -36009,9 +37022,10 @@ diff -urNp linux-3.1.4/drivers/staging/sbe-2t3e3/netdev.c linux-3.1.4/drivers/st
return -EFAULT;
return 0;
-diff -urNp linux-3.1.4/drivers/staging/usbip/usbip_common.h linux-3.1.4/drivers/staging/usbip/usbip_common.h
---- linux-3.1.4/drivers/staging/usbip/usbip_common.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/usbip/usbip_common.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h
+index be21617..0954e45 100644
+--- a/drivers/staging/usbip/usbip_common.h
++++ b/drivers/staging/usbip/usbip_common.h
@@ -289,7 +289,7 @@ struct usbip_device {
void (*shutdown)(struct usbip_device *);
void (*reset)(struct usbip_device *);
@@ -36021,9 +37035,10 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/usbip_common.h linux-3.1.4/drivers/
};
#if 0
-diff -urNp linux-3.1.4/drivers/staging/usbip/vhci.h linux-3.1.4/drivers/staging/usbip/vhci.h
---- linux-3.1.4/drivers/staging/usbip/vhci.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/usbip/vhci.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/staging/usbip/vhci.h b/drivers/staging/usbip/vhci.h
+index 71a586e..4d8a91a 100644
+--- a/drivers/staging/usbip/vhci.h
++++ b/drivers/staging/usbip/vhci.h
@@ -85,7 +85,7 @@ struct vhci_hcd {
unsigned resuming:1;
unsigned long re_timeout;
@@ -36033,9 +37048,10 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/vhci.h linux-3.1.4/drivers/staging/
/*
* NOTE:
-diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_hcd.c linux-3.1.4/drivers/staging/usbip/vhci_hcd.c
---- linux-3.1.4/drivers/staging/usbip/vhci_hcd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/usbip/vhci_hcd.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
+index 2ee97e2..0420b86 100644
+--- a/drivers/staging/usbip/vhci_hcd.c
++++ b/drivers/staging/usbip/vhci_hcd.c
@@ -527,7 +527,7 @@ static void vhci_tx_urb(struct urb *urb)
return;
}
@@ -36045,7 +37061,7 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_hcd.c linux-3.1.4/drivers/stag
if (priv->seqnum == 0xffff)
dev_info(&urb->dev->dev, "seqnum max\n");
-@@ -779,7 +779,7 @@ static int vhci_urb_dequeue(struct usb_h
+@@ -779,7 +779,7 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
return -ENOMEM;
}
@@ -36054,7 +37070,7 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_hcd.c linux-3.1.4/drivers/stag
if (unlink->seqnum == 0xffff)
pr_info("seqnum max\n");
-@@ -969,7 +969,7 @@ static int vhci_start(struct usb_hcd *hc
+@@ -969,7 +969,7 @@ static int vhci_start(struct usb_hcd *hcd)
vdev->rhport = rhport;
}
@@ -36063,10 +37079,11 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_hcd.c linux-3.1.4/drivers/stag
spin_lock_init(&vhci->lock);
hcd->power_budget = 0; /* no limit */
-diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_rx.c linux-3.1.4/drivers/staging/usbip/vhci_rx.c
---- linux-3.1.4/drivers/staging/usbip/vhci_rx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/usbip/vhci_rx.c 2011-11-16 18:39:08.000000000 -0500
-@@ -76,7 +76,7 @@ static void vhci_recv_ret_submit(struct
+diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c
+index 09c44ab..6692d83 100644
+--- a/drivers/staging/usbip/vhci_rx.c
++++ b/drivers/staging/usbip/vhci_rx.c
+@@ -76,7 +76,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
if (!urb) {
pr_err("cannot find a urb of seqnum %u\n", pdu->base.seqnum);
pr_info("max seqnum %d\n",
@@ -36075,10 +37092,11 @@ diff -urNp linux-3.1.4/drivers/staging/usbip/vhci_rx.c linux-3.1.4/drivers/stagi
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
return;
}
-diff -urNp linux-3.1.4/drivers/staging/vt6655/hostap.c linux-3.1.4/drivers/staging/vt6655/hostap.c
---- linux-3.1.4/drivers/staging/vt6655/hostap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/vt6655/hostap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -79,14 +79,13 @@ static int msglevel
+diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
+index 7735027..30eed13 100644
+--- a/drivers/staging/vt6655/hostap.c
++++ b/drivers/staging/vt6655/hostap.c
+@@ -79,14 +79,13 @@ static int msglevel =MSG_LEVEL_INFO;
*
*/
@@ -36095,7 +37113,7 @@ diff -urNp linux-3.1.4/drivers/staging/vt6655/hostap.c linux-3.1.4/drivers/stagi
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
-@@ -98,6 +97,8 @@ static int hostap_enable_hostapd(PSDevic
+@@ -98,6 +97,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
*apdev_priv = *pDevice;
memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
@@ -36104,10 +37122,11 @@ diff -urNp linux-3.1.4/drivers/staging/vt6655/hostap.c linux-3.1.4/drivers/stagi
pDevice->apdev->netdev_ops = &apdev_netdev_ops;
pDevice->apdev->type = ARPHRD_IEEE80211;
-diff -urNp linux-3.1.4/drivers/staging/vt6656/hostap.c linux-3.1.4/drivers/staging/vt6656/hostap.c
---- linux-3.1.4/drivers/staging/vt6656/hostap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/vt6656/hostap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -80,14 +80,13 @@ static int msglevel
+diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
+index 51b5adf..098e320 100644
+--- a/drivers/staging/vt6656/hostap.c
++++ b/drivers/staging/vt6656/hostap.c
+@@ -80,14 +80,13 @@ static int msglevel =MSG_LEVEL_INFO;
*
*/
@@ -36124,7 +37143,7 @@ diff -urNp linux-3.1.4/drivers/staging/vt6656/hostap.c linux-3.1.4/drivers/stagi
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
-@@ -99,6 +98,8 @@ static int hostap_enable_hostapd(PSDevic
+@@ -99,6 +98,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
*apdev_priv = *pDevice;
memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
@@ -36133,10 +37152,11 @@ diff -urNp linux-3.1.4/drivers/staging/vt6656/hostap.c linux-3.1.4/drivers/stagi
pDevice->apdev->netdev_ops = &apdev_netdev_ops;
pDevice->apdev->type = ARPHRD_IEEE80211;
-diff -urNp linux-3.1.4/drivers/staging/wlan-ng/hfa384x_usb.c linux-3.1.4/drivers/staging/wlan-ng/hfa384x_usb.c
---- linux-3.1.4/drivers/staging/wlan-ng/hfa384x_usb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/wlan-ng/hfa384x_usb.c 2011-11-16 18:39:08.000000000 -0500
-@@ -204,7 +204,7 @@ static void unlocked_usbctlx_complete(hf
+diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
+index 7843dfd..3db105f 100644
+--- a/drivers/staging/wlan-ng/hfa384x_usb.c
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c
+@@ -204,7 +204,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
struct usbctlx_completor {
int (*complete) (struct usbctlx_completor *);
@@ -36145,9 +37165,10 @@ diff -urNp linux-3.1.4/drivers/staging/wlan-ng/hfa384x_usb.c linux-3.1.4/drivers
static int
hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
-diff -urNp linux-3.1.4/drivers/staging/zcache/tmem.c linux-3.1.4/drivers/staging/zcache/tmem.c
---- linux-3.1.4/drivers/staging/zcache/tmem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/zcache/tmem.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/staging/zcache/tmem.c b/drivers/staging/zcache/tmem.c
+index 1ca66ea..76f1343 100644
+--- a/drivers/staging/zcache/tmem.c
++++ b/drivers/staging/zcache/tmem.c
@@ -39,7 +39,7 @@
* A tmem host implementation must use this function to register callbacks
* for memory allocation.
@@ -36157,7 +37178,7 @@ diff -urNp linux-3.1.4/drivers/staging/zcache/tmem.c linux-3.1.4/drivers/staging
static void tmem_objnode_tree_init(void);
-@@ -53,7 +53,7 @@ void tmem_register_hostops(struct tmem_h
+@@ -53,7 +53,7 @@ void tmem_register_hostops(struct tmem_hostops *m)
* A tmem host implementation must use this function to register
* callbacks for a page-accessible memory (PAM) implementation
*/
@@ -36166,9 +37187,10 @@ diff -urNp linux-3.1.4/drivers/staging/zcache/tmem.c linux-3.1.4/drivers/staging
void tmem_register_pamops(struct tmem_pamops *m)
{
-diff -urNp linux-3.1.4/drivers/staging/zcache/tmem.h linux-3.1.4/drivers/staging/zcache/tmem.h
---- linux-3.1.4/drivers/staging/zcache/tmem.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/staging/zcache/tmem.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/staging/zcache/tmem.h b/drivers/staging/zcache/tmem.h
+index ed147c4..94fc3c6 100644
+--- a/drivers/staging/zcache/tmem.h
++++ b/drivers/staging/zcache/tmem.h
@@ -180,6 +180,7 @@ struct tmem_pamops {
void (*new_obj)(struct tmem_obj *);
int (*replace_in_obj)(void *, struct tmem_obj *);
@@ -36185,10 +37207,11 @@ diff -urNp linux-3.1.4/drivers/staging/zcache/tmem.h linux-3.1.4/drivers/staging
extern void tmem_register_hostops(struct tmem_hostops *m);
/* core tmem accessor functions */
-diff -urNp linux-3.1.4/drivers/target/iscsi/iscsi_target.c linux-3.1.4/drivers/target/iscsi/iscsi_target.c
---- linux-3.1.4/drivers/target/iscsi/iscsi_target.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/iscsi/iscsi_target.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1368,7 +1368,7 @@ static int iscsit_handle_data_out(struct
+diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
+index 26a5d8b..74434f8 100644
+--- a/drivers/target/iscsi/iscsi_target.c
++++ b/drivers/target/iscsi/iscsi_target.c
+@@ -1368,7 +1368,7 @@ static int iscsit_handle_data_out(struct iscsi_conn *conn, unsigned char *buf)
* outstanding_r2ts reaches zero, go ahead and send the delayed
* TASK_ABORTED status.
*/
@@ -36197,10 +37220,11 @@ diff -urNp linux-3.1.4/drivers/target/iscsi/iscsi_target.c linux-3.1.4/drivers/t
if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
if (--cmd->outstanding_r2ts < 1) {
iscsit_stop_dataout_timer(cmd);
-diff -urNp linux-3.1.4/drivers/target/target_core_alua.c linux-3.1.4/drivers/target/target_core_alua.c
---- linux-3.1.4/drivers/target/target_core_alua.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_alua.c 2011-11-16 18:40:29.000000000 -0500
-@@ -723,6 +723,8 @@ static int core_alua_update_tpg_primary_
+diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
+index 8badcb4..94c9ac6 100644
+--- a/drivers/target/target_core_alua.c
++++ b/drivers/target/target_core_alua.c
+@@ -723,6 +723,8 @@ static int core_alua_update_tpg_primary_metadata(
char path[ALUA_METADATA_PATH_LEN];
int len;
@@ -36209,7 +37233,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_alua.c linux-3.1.4/drivers/tar
memset(path, 0, ALUA_METADATA_PATH_LEN);
len = snprintf(md_buf, tg_pt_gp->tg_pt_gp_md_buf_len,
-@@ -986,6 +988,8 @@ static int core_alua_update_tpg_secondar
+@@ -986,6 +988,8 @@ static int core_alua_update_tpg_secondary_metadata(
char path[ALUA_METADATA_PATH_LEN], wwn[ALUA_SECONDARY_METADATA_WWN_LEN];
int len;
@@ -36218,10 +37242,11 @@ diff -urNp linux-3.1.4/drivers/target/target_core_alua.c linux-3.1.4/drivers/tar
memset(path, 0, ALUA_METADATA_PATH_LEN);
memset(wwn, 0, ALUA_SECONDARY_METADATA_WWN_LEN);
-diff -urNp linux-3.1.4/drivers/target/target_core_cdb.c linux-3.1.4/drivers/target/target_core_cdb.c
---- linux-3.1.4/drivers/target/target_core_cdb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_cdb.c 2011-11-16 18:40:29.000000000 -0500
-@@ -933,6 +933,8 @@ target_emulate_modesense(struct se_cmd *
+diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c
+index f04d4ef..7de212b 100644
+--- a/drivers/target/target_core_cdb.c
++++ b/drivers/target/target_core_cdb.c
+@@ -933,6 +933,8 @@ target_emulate_modesense(struct se_cmd *cmd, int ten)
int length = 0;
unsigned char buf[SE_MODE_PAGE_BUF];
@@ -36230,10 +37255,11 @@ diff -urNp linux-3.1.4/drivers/target/target_core_cdb.c linux-3.1.4/drivers/targ
memset(buf, 0, SE_MODE_PAGE_BUF);
switch (cdb[2] & 0x3f) {
-diff -urNp linux-3.1.4/drivers/target/target_core_configfs.c linux-3.1.4/drivers/target/target_core_configfs.c
---- linux-3.1.4/drivers/target/target_core_configfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_configfs.c 2011-11-16 19:04:37.000000000 -0500
-@@ -1267,6 +1267,8 @@ static ssize_t target_core_dev_pr_show_a
+diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
+index b2575d8..b6b28fd 100644
+--- a/drivers/target/target_core_configfs.c
++++ b/drivers/target/target_core_configfs.c
+@@ -1267,6 +1267,8 @@ static ssize_t target_core_dev_pr_show_attr_res_pr_registered_i_pts(
ssize_t len = 0;
int reg_count = 0, prf_isid;
@@ -36242,10 +37268,11 @@ diff -urNp linux-3.1.4/drivers/target/target_core_configfs.c linux-3.1.4/drivers
if (!su_dev->se_dev_ptr)
return -ENODEV;
-diff -urNp linux-3.1.4/drivers/target/target_core_pr.c linux-3.1.4/drivers/target/target_core_pr.c
---- linux-3.1.4/drivers/target/target_core_pr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_pr.c 2011-11-16 18:40:29.000000000 -0500
-@@ -918,6 +918,8 @@ static int __core_scsi3_check_aptpl_regi
+diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
+index 7fd3a16..bc2fb3e 100644
+--- a/drivers/target/target_core_pr.c
++++ b/drivers/target/target_core_pr.c
+@@ -918,6 +918,8 @@ static int __core_scsi3_check_aptpl_registration(
unsigned char t_port[PR_APTPL_MAX_TPORT_LEN];
u16 tpgt;
@@ -36254,7 +37281,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_pr.c linux-3.1.4/drivers/targe
memset(i_port, 0, PR_APTPL_MAX_IPORT_LEN);
memset(t_port, 0, PR_APTPL_MAX_TPORT_LEN);
/*
-@@ -1867,6 +1869,8 @@ static int __core_scsi3_update_aptpl_buf
+@@ -1867,6 +1869,8 @@ static int __core_scsi3_update_aptpl_buf(
ssize_t len = 0;
int reg_count = 0;
@@ -36263,7 +37290,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_pr.c linux-3.1.4/drivers/targe
memset(buf, 0, pr_aptpl_buf_len);
/*
* Called to clear metadata once APTPL has been deactivated.
-@@ -1989,6 +1993,8 @@ static int __core_scsi3_write_aptpl_to_f
+@@ -1989,6 +1993,8 @@ static int __core_scsi3_write_aptpl_to_file(
char path[512];
int ret;
@@ -36272,9 +37299,10 @@ diff -urNp linux-3.1.4/drivers/target/target_core_pr.c linux-3.1.4/drivers/targe
memset(iov, 0, sizeof(struct iovec));
memset(path, 0, 512);
-diff -urNp linux-3.1.4/drivers/target/target_core_tmr.c linux-3.1.4/drivers/target/target_core_tmr.c
---- linux-3.1.4/drivers/target/target_core_tmr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_tmr.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
+index 5c1b8c5..0cb7d0e 100644
+--- a/drivers/target/target_core_tmr.c
++++ b/drivers/target/target_core_tmr.c
@@ -255,7 +255,7 @@ static void core_tmr_drain_task_list(
cmd->se_tfo->get_task_tag(cmd), cmd->pr_res_key,
cmd->t_task_list_num,
@@ -36302,10 +37330,11 @@ diff -urNp linux-3.1.4/drivers/target/target_core_tmr.c linux-3.1.4/drivers/targ
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count);
-diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/drivers/target/target_core_transport.c
---- linux-3.1.4/drivers/target/target_core_transport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/target/target_core_transport.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1445,7 +1445,7 @@ struct se_device *transport_add_device_t
+diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
+index 013c100..8fd2e57 100644
+--- a/drivers/target/target_core_transport.c
++++ b/drivers/target/target_core_transport.c
+@@ -1445,7 +1445,7 @@ struct se_device *transport_add_device_to_core_hba(
dev->queue_depth = dev_limits->queue_depth;
atomic_set(&dev->depth_left, dev->queue_depth);
@@ -36314,7 +37343,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
se_dev_set_default_attribs(dev, dev_limits);
-@@ -1633,7 +1633,7 @@ static int transport_check_alloc_task_at
+@@ -1633,7 +1633,7 @@ static int transport_check_alloc_task_attr(struct se_cmd *cmd)
* Used to determine when ORDERED commands should go from
* Dormant to Active status.
*/
@@ -36323,7 +37352,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
smp_mb__after_atomic_inc();
pr_debug("Allocated se_ordered_id: %u for Task Attr: 0x%02x on %s\n",
cmd->se_ordered_id, cmd->sam_task_attr,
-@@ -1960,7 +1960,7 @@ static void transport_generic_request_fa
+@@ -1960,7 +1960,7 @@ static void transport_generic_request_failure(
" t_transport_active: %d t_transport_stop: %d"
" t_transport_sent: %d\n", cmd->t_task_list_num,
atomic_read(&cmd->t_task_cdbs_left),
@@ -36344,7 +37373,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
cmd->t_task_list_num)
atomic_set(&cmd->transport_sent, 1);
-@@ -4665,7 +4665,7 @@ static void transport_generic_wait_for_t
+@@ -4665,7 +4665,7 @@ static void transport_generic_wait_for_tasks(
atomic_set(&cmd->transport_lun_stop, 0);
}
if (!atomic_read(&cmd->t_transport_active) ||
@@ -36353,7 +37382,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
goto remove;
atomic_set(&cmd->t_transport_stop, 1);
-@@ -4900,7 +4900,7 @@ int transport_check_aborted_status(struc
+@@ -4900,7 +4900,7 @@ int transport_check_aborted_status(struct se_cmd *cmd, int send_status)
{
int ret = 0;
@@ -36362,7 +37391,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
if (!send_status ||
(cmd->se_cmd_flags & SCF_SENT_DELAYED_TAS))
return 1;
-@@ -4937,7 +4937,7 @@ void transport_send_task_abort(struct se
+@@ -4937,7 +4937,7 @@ void transport_send_task_abort(struct se_cmd *cmd)
*/
if (cmd->data_direction == DMA_TO_DEVICE) {
if (cmd->se_tfo->write_pending_status(cmd) != 0) {
@@ -36371,7 +37400,7 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
smp_mb__after_atomic_inc();
cmd->scsi_status = SAM_STAT_TASK_ABORTED;
transport_new_cmd_failure(cmd);
-@@ -5051,7 +5051,7 @@ static void transport_processing_shutdow
+@@ -5051,7 +5051,7 @@ static void transport_processing_shutdown(struct se_device *dev)
cmd->se_tfo->get_task_tag(cmd),
cmd->t_task_list_num,
atomic_read(&cmd->t_task_cdbs_left),
@@ -36380,9 +37409,10 @@ diff -urNp linux-3.1.4/drivers/target/target_core_transport.c linux-3.1.4/driver
atomic_read(&cmd->t_transport_active),
atomic_read(&cmd->t_transport_stop),
atomic_read(&cmd->t_transport_sent));
-diff -urNp linux-3.1.4/drivers/telephony/ixj.c linux-3.1.4/drivers/telephony/ixj.c
---- linux-3.1.4/drivers/telephony/ixj.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/telephony/ixj.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
+index d5f923b..9c78228 100644
+--- a/drivers/telephony/ixj.c
++++ b/drivers/telephony/ixj.c
@@ -4976,6 +4976,8 @@ static int ixj_daa_cid_read(IXJ *j)
bool mContinue;
char *pIn, *pOut;
@@ -36392,9 +37422,10 @@ diff -urNp linux-3.1.4/drivers/telephony/ixj.c linux-3.1.4/drivers/telephony/ixj
if (!SCI_Prepare(j))
return 0;
-diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
---- linux-3.1.4/drivers/tty/hvc/hvcs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/hvc/hvcs.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
+index 4c8b665..1d931eb 100644
+--- a/drivers/tty/hvc/hvcs.c
++++ b/drivers/tty/hvc/hvcs.c
@@ -83,6 +83,7 @@
#include <asm/hvcserver.h>
#include <asm/uaccess.h>
@@ -36412,7 +37443,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
/*
* Used to tell the driver kernel_thread what operations need to take
-@@ -422,7 +423,7 @@ static ssize_t hvcs_vterm_state_store(st
+@@ -422,7 +423,7 @@ static ssize_t hvcs_vterm_state_store(struct device *dev, struct device_attribut
spin_lock_irqsave(&hvcsd->lock, flags);
@@ -36421,7 +37452,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
spin_unlock_irqrestore(&hvcsd->lock, flags);
printk(KERN_INFO "HVCS: vterm state unchanged. "
"The hvcs device node is still in use.\n");
-@@ -1145,7 +1146,7 @@ static int hvcs_open(struct tty_struct *
+@@ -1145,7 +1146,7 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp)
if ((retval = hvcs_partner_connect(hvcsd)))
goto error_release;
@@ -36439,7 +37470,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
hvcsd->todo_mask |= HVCS_SCHED_READ;
spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1223,7 +1224,7 @@ static void hvcs_close(struct tty_struct
+@@ -1223,7 +1224,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
hvcsd = tty->driver_data;
spin_lock_irqsave(&hvcsd->lock, flags);
@@ -36448,7 +37479,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
vio_disable_interrupts(hvcsd->vdev);
-@@ -1249,10 +1250,10 @@ static void hvcs_close(struct tty_struct
+@@ -1249,10 +1250,10 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
free_irq(irq, hvcsd);
kref_put(&hvcsd->kref, destroy_hvcs_struct);
return;
@@ -36461,7 +37492,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
}
spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1268,7 +1269,7 @@ static void hvcs_hangup(struct tty_struc
+@@ -1268,7 +1269,7 @@ static void hvcs_hangup(struct tty_struct * tty)
spin_lock_irqsave(&hvcsd->lock, flags);
/* Preserve this so that we know how many kref refs to put */
@@ -36470,7 +37501,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
/*
* Don't kref put inside the spinlock because the destruction
-@@ -1283,7 +1284,7 @@ static void hvcs_hangup(struct tty_struc
+@@ -1283,7 +1284,7 @@ static void hvcs_hangup(struct tty_struct * tty)
hvcsd->tty->driver_data = NULL;
hvcsd->tty = NULL;
@@ -36479,7 +37510,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
/* This will drop any buffered data on the floor which is OK in a hangup
* scenario. */
-@@ -1354,7 +1355,7 @@ static int hvcs_write(struct tty_struct
+@@ -1354,7 +1355,7 @@ static int hvcs_write(struct tty_struct *tty,
* the middle of a write operation? This is a crummy place to do this
* but we want to keep it all in the spinlock.
*/
@@ -36488,7 +37519,7 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
spin_unlock_irqrestore(&hvcsd->lock, flags);
return -ENODEV;
}
-@@ -1428,7 +1429,7 @@ static int hvcs_write_room(struct tty_st
+@@ -1428,7 +1429,7 @@ static int hvcs_write_room(struct tty_struct *tty)
{
struct hvcs_struct *hvcsd = tty->driver_data;
@@ -36497,9 +37528,10 @@ diff -urNp linux-3.1.4/drivers/tty/hvc/hvcs.c linux-3.1.4/drivers/tty/hvc/hvcs.c
return 0;
return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
-diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwireless/tty.c
---- linux-3.1.4/drivers/tty/ipwireless/tty.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/ipwireless/tty.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
+index ef92869..f4ebd88 100644
+--- a/drivers/tty/ipwireless/tty.c
++++ b/drivers/tty/ipwireless/tty.c
@@ -29,6 +29,7 @@
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
@@ -36517,7 +37549,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
unsigned int control_lines;
struct mutex ipw_tty_mutex;
int tx_bytes_queued;
-@@ -127,10 +128,10 @@ static int ipw_open(struct tty_struct *l
+@@ -127,10 +128,10 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
mutex_unlock(&tty->ipw_tty_mutex);
return -ENODEV;
}
@@ -36530,7 +37562,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
tty->linux_tty = linux_tty;
linux_tty->driver_data = tty;
-@@ -146,9 +147,7 @@ static int ipw_open(struct tty_struct *l
+@@ -146,9 +147,7 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)
static void do_ipw_close(struct ipw_tty *tty)
{
@@ -36541,7 +37573,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
struct tty_struct *linux_tty = tty->linux_tty;
if (linux_tty != NULL) {
-@@ -169,7 +168,7 @@ static void ipw_hangup(struct tty_struct
+@@ -169,7 +168,7 @@ static void ipw_hangup(struct tty_struct *linux_tty)
return;
mutex_lock(&tty->ipw_tty_mutex);
@@ -36550,7 +37582,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
-@@ -198,7 +197,7 @@ void ipwireless_tty_received(struct ipw_
+@@ -198,7 +197,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
return;
}
@@ -36559,7 +37591,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
-@@ -240,7 +239,7 @@ static int ipw_write(struct tty_struct *
+@@ -240,7 +239,7 @@ static int ipw_write(struct tty_struct *linux_tty,
return -ENODEV;
mutex_lock(&tty->ipw_tty_mutex);
@@ -36568,7 +37600,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
mutex_unlock(&tty->ipw_tty_mutex);
return -EINVAL;
}
-@@ -280,7 +279,7 @@ static int ipw_write_room(struct tty_str
+@@ -280,7 +279,7 @@ static int ipw_write_room(struct tty_struct *linux_tty)
if (!tty)
return -ENODEV;
@@ -36577,7 +37609,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
return -EINVAL;
room = IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;
-@@ -322,7 +321,7 @@ static int ipw_chars_in_buffer(struct tt
+@@ -322,7 +321,7 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty)
if (!tty)
return 0;
@@ -36586,7 +37618,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
return 0;
return tty->tx_bytes_queued;
-@@ -403,7 +402,7 @@ static int ipw_tiocmget(struct tty_struc
+@@ -403,7 +402,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty)
if (!tty)
return -ENODEV;
@@ -36595,7 +37627,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
return -EINVAL;
return get_control_lines(tty);
-@@ -419,7 +418,7 @@ ipw_tiocmset(struct tty_struct *linux_tt
+@@ -419,7 +418,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,
if (!tty)
return -ENODEV;
@@ -36604,7 +37636,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
return -EINVAL;
return set_control_lines(tty, set, clear);
-@@ -433,7 +432,7 @@ static int ipw_ioctl(struct tty_struct *
+@@ -433,7 +432,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty,
if (!tty)
return -ENODEV;
@@ -36613,7 +37645,7 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
return -EINVAL;
/* FIXME: Exactly how is the tty object locked here .. */
-@@ -582,7 +581,7 @@ void ipwireless_tty_free(struct ipw_tty
+@@ -582,7 +581,7 @@ void ipwireless_tty_free(struct ipw_tty *tty)
against a parallel ioctl etc */
mutex_lock(&ttyj->ipw_tty_mutex);
}
@@ -36622,10 +37654,11 @@ diff -urNp linux-3.1.4/drivers/tty/ipwireless/tty.c linux-3.1.4/drivers/tty/ipwi
do_ipw_close(ttyj);
ipwireless_disassociate_network_ttys(network,
ttyj->channel_idx);
-diff -urNp linux-3.1.4/drivers/tty/n_gsm.c linux-3.1.4/drivers/tty/n_gsm.c
---- linux-3.1.4/drivers/tty/n_gsm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/n_gsm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1625,7 +1625,7 @@ static struct gsm_dlci *gsm_dlci_alloc(s
+diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
+index 8a50e4e..7d9ca3d 100644
+--- a/drivers/tty/n_gsm.c
++++ b/drivers/tty/n_gsm.c
+@@ -1625,7 +1625,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
kref_init(&dlci->ref);
mutex_init(&dlci->mutex);
dlci->fifo = &dlci->_fifo;
@@ -36634,10 +37667,11 @@ diff -urNp linux-3.1.4/drivers/tty/n_gsm.c linux-3.1.4/drivers/tty/n_gsm.c
kfree(dlci);
return NULL;
}
-diff -urNp linux-3.1.4/drivers/tty/n_tty.c linux-3.1.4/drivers/tty/n_tty.c
---- linux-3.1.4/drivers/tty/n_tty.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/n_tty.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2123,6 +2123,7 @@ void n_tty_inherit_ops(struct tty_ldisc_
+diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
+index 39d6ab6..eb97f41 100644
+--- a/drivers/tty/n_tty.c
++++ b/drivers/tty/n_tty.c
+@@ -2123,6 +2123,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = tty_ldisc_N_TTY;
ops->owner = NULL;
@@ -36646,9 +37680,10 @@ diff -urNp linux-3.1.4/drivers/tty/n_tty.c linux-3.1.4/drivers/tty/n_tty.c
+ ops->flags = 0;
}
EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
-diff -urNp linux-3.1.4/drivers/tty/pty.c linux-3.1.4/drivers/tty/pty.c
---- linux-3.1.4/drivers/tty/pty.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/pty.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
+index e18604b..a7d5a11 100644
+--- a/drivers/tty/pty.c
++++ b/drivers/tty/pty.c
@@ -773,8 +773,10 @@ static void __init unix98_pty_init(void)
register_sysctl_table(pty_root_table);
@@ -36661,10 +37696,11 @@ diff -urNp linux-3.1.4/drivers/tty/pty.c linux-3.1.4/drivers/tty/pty.c
cdev_init(&ptmx_cdev, &ptmx_fops);
if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
-diff -urNp linux-3.1.4/drivers/tty/rocket.c linux-3.1.4/drivers/tty/rocket.c
---- linux-3.1.4/drivers/tty/rocket.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/rocket.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1277,6 +1277,8 @@ static int get_ports(struct r_port *info
+diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
+index 6a1241c..d04ab0d 100644
+--- a/drivers/tty/rocket.c
++++ b/drivers/tty/rocket.c
+@@ -1277,6 +1277,8 @@ static int get_ports(struct r_port *info, struct rocket_ports __user *retports)
struct rocket_ports tmp;
int board;
@@ -36673,9 +37709,10 @@ diff -urNp linux-3.1.4/drivers/tty/rocket.c linux-3.1.4/drivers/tty/rocket.c
if (!retports)
return -EFAULT;
memset(&tmp, 0, sizeof (tmp));
-diff -urNp linux-3.1.4/drivers/tty/serial/kgdboc.c linux-3.1.4/drivers/tty/serial/kgdboc.c
---- linux-3.1.4/drivers/tty/serial/kgdboc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/serial/kgdboc.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
+index 87e7e6c..89744e0 100644
+--- a/drivers/tty/serial/kgdboc.c
++++ b/drivers/tty/serial/kgdboc.c
@@ -23,8 +23,9 @@
#define MAX_CONFIG_LEN 40
@@ -36749,7 +37786,7 @@ diff -urNp linux-3.1.4/drivers/tty/serial/kgdboc.c linux-3.1.4/drivers/tty/seria
return 0;
return configure_kgdboc();
-@@ -261,7 +268,7 @@ static int param_set_kgdboc_var(const ch
+@@ -261,7 +268,7 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
if (config[len - 1] == '\n')
config[len - 1] = '\0';
@@ -36774,10 +37811,11 @@ diff -urNp linux-3.1.4/drivers/tty/serial/kgdboc.c linux-3.1.4/drivers/tty/seria
#ifdef CONFIG_KGDB_SERIAL_CONSOLE
/* This is only available if kgdboc is a built in for early debugging */
static int __init kgdboc_early_init(char *opt)
-diff -urNp linux-3.1.4/drivers/tty/serial/mfd.c linux-3.1.4/drivers/tty/serial/mfd.c
---- linux-3.1.4/drivers/tty/serial/mfd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/serial/mfd.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1423,7 +1423,7 @@ static void serial_hsu_remove(struct pci
+diff --git a/drivers/tty/serial/mfd.c b/drivers/tty/serial/mfd.c
+index cab52f4..29fc6aa 100644
+--- a/drivers/tty/serial/mfd.c
++++ b/drivers/tty/serial/mfd.c
+@@ -1423,7 +1423,7 @@ static void serial_hsu_remove(struct pci_dev *pdev)
}
/* First 3 are UART ports, and the 4th is the DMA */
@@ -36786,10 +37824,11 @@ diff -urNp linux-3.1.4/drivers/tty/serial/mfd.c linux-3.1.4/drivers/tty/serial/m
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081B) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081C) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081D) },
-diff -urNp linux-3.1.4/drivers/tty/serial/mrst_max3110.c linux-3.1.4/drivers/tty/serial/mrst_max3110.c
---- linux-3.1.4/drivers/tty/serial/mrst_max3110.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/serial/mrst_max3110.c 2011-11-16 18:40:29.000000000 -0500
-@@ -393,6 +393,8 @@ static void max3110_con_receive(struct u
+diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c
+index 23bc743..d425c07 100644
+--- a/drivers/tty/serial/mrst_max3110.c
++++ b/drivers/tty/serial/mrst_max3110.c
+@@ -393,6 +393,8 @@ static void max3110_con_receive(struct uart_max3110 *max)
int loop = 1, num, total = 0;
u8 recv_buf[512], *pbuf;
@@ -36798,9 +37837,10 @@ diff -urNp linux-3.1.4/drivers/tty/serial/mrst_max3110.c linux-3.1.4/drivers/tty
pbuf = recv_buf;
do {
num = max3110_read_multi(max, pbuf);
-diff -urNp linux-3.1.4/drivers/tty/tty_io.c linux-3.1.4/drivers/tty/tty_io.c
---- linux-3.1.4/drivers/tty/tty_io.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/tty_io.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
+index 1a890e2..1d8139c 100644
+--- a/drivers/tty/tty_io.c
++++ b/drivers/tty/tty_io.c
@@ -3238,7 +3238,7 @@ EXPORT_SYMBOL_GPL(get_current_tty);
void tty_default_fops(struct file_operations *fops)
@@ -36810,10 +37850,11 @@ diff -urNp linux-3.1.4/drivers/tty/tty_io.c linux-3.1.4/drivers/tty/tty_io.c
}
/*
-diff -urNp linux-3.1.4/drivers/tty/tty_ldisc.c linux-3.1.4/drivers/tty/tty_ldisc.c
---- linux-3.1.4/drivers/tty/tty_ldisc.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/drivers/tty/tty_ldisc.c 2011-11-26 20:00:43.000000000 -0500
-@@ -75,7 +75,7 @@ static void put_ldisc(struct tty_ldisc *
+diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
+index a76c808..ecbc743 100644
+--- a/drivers/tty/tty_ldisc.c
++++ b/drivers/tty/tty_ldisc.c
+@@ -75,7 +75,7 @@ static void put_ldisc(struct tty_ldisc *ld)
if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
struct tty_ldisc_ops *ldo = ld->ops;
@@ -36822,7 +37863,7 @@ diff -urNp linux-3.1.4/drivers/tty/tty_ldisc.c linux-3.1.4/drivers/tty/tty_ldisc
module_put(ldo->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
-@@ -110,7 +110,7 @@ int tty_register_ldisc(int disc, struct
+@@ -110,7 +110,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
spin_lock_irqsave(&tty_ldisc_lock, flags);
tty_ldiscs[disc] = new_ldisc;
new_ldisc->num = disc;
@@ -36840,7 +37881,7 @@ diff -urNp linux-3.1.4/drivers/tty/tty_ldisc.c linux-3.1.4/drivers/tty/tty_ldisc
ret = -EBUSY;
else
tty_ldiscs[disc] = NULL;
-@@ -159,7 +159,7 @@ static struct tty_ldisc_ops *get_ldops(i
+@@ -159,7 +159,7 @@ static struct tty_ldisc_ops *get_ldops(int disc)
if (ldops) {
ret = ERR_PTR(-EAGAIN);
if (try_module_get(ldops->owner)) {
@@ -36849,7 +37890,7 @@ diff -urNp linux-3.1.4/drivers/tty/tty_ldisc.c linux-3.1.4/drivers/tty/tty_ldisc
ret = ldops;
}
}
-@@ -172,7 +172,7 @@ static void put_ldops(struct tty_ldisc_o
+@@ -172,7 +172,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
unsigned long flags;
spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -36858,10 +37899,11 @@ diff -urNp linux-3.1.4/drivers/tty/tty_ldisc.c linux-3.1.4/drivers/tty/tty_ldisc
module_put(ldops->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
}
-diff -urNp linux-3.1.4/drivers/tty/vt/keyboard.c linux-3.1.4/drivers/tty/vt/keyboard.c
---- linux-3.1.4/drivers/tty/vt/keyboard.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/vt/keyboard.c 2011-11-16 18:40:29.000000000 -0500
-@@ -656,6 +656,16 @@ static void k_spec(struct vc_data *vc, u
+diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
+index 3761ccf..2c613b3 100644
+--- a/drivers/tty/vt/keyboard.c
++++ b/drivers/tty/vt/keyboard.c
+@@ -656,6 +656,16 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
kbd->kbdmode == VC_OFF) &&
value != KVAL(K_SAK))
return; /* SAK is allowed even in raw mode */
@@ -36878,10 +37920,11 @@ diff -urNp linux-3.1.4/drivers/tty/vt/keyboard.c linux-3.1.4/drivers/tty/vt/keyb
fn_handler[value](vc);
}
-diff -urNp linux-3.1.4/drivers/tty/vt/vt.c linux-3.1.4/drivers/tty/vt/vt.c
---- linux-3.1.4/drivers/tty/vt/vt.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/vt/vt.c 2011-11-16 18:39:08.000000000 -0500
-@@ -259,7 +259,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
+index b3915b7..e716839 100644
+--- a/drivers/tty/vt/vt.c
++++ b/drivers/tty/vt/vt.c
+@@ -259,7 +259,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier);
static void notify_write(struct vc_data *vc, unsigned int unicode)
{
@@ -36890,10 +37933,11 @@ diff -urNp linux-3.1.4/drivers/tty/vt/vt.c linux-3.1.4/drivers/tty/vt/vt.c
atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, &param);
}
-diff -urNp linux-3.1.4/drivers/tty/vt/vt_ioctl.c linux-3.1.4/drivers/tty/vt/vt_ioctl.c
---- linux-3.1.4/drivers/tty/vt/vt_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/tty/vt/vt_ioctl.c 2011-11-16 18:40:29.000000000 -0500
-@@ -207,9 +207,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __
+diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
+index 5e096f4..0da1363 100644
+--- a/drivers/tty/vt/vt_ioctl.c
++++ b/drivers/tty/vt/vt_ioctl.c
+@@ -207,9 +207,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
return -EFAULT;
@@ -36903,7 +37947,7 @@ diff -urNp linux-3.1.4/drivers/tty/vt/vt_ioctl.c linux-3.1.4/drivers/tty/vt/vt_i
switch (cmd) {
case KDGKBENT:
key_map = key_maps[s];
-@@ -221,6 +218,9 @@ do_kdsk_ioctl(int cmd, struct kbentry __
+@@ -221,6 +218,9 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
val = (i ? K_HOLE : K_NOSUCHMAP);
return put_user(val, &user_kbe->kb_value);
case KDSKBENT:
@@ -36913,7 +37957,7 @@ diff -urNp linux-3.1.4/drivers/tty/vt/vt_ioctl.c linux-3.1.4/drivers/tty/vt/vt_i
if (!perm)
return -EPERM;
if (!i && v == K_NOSUCHMAP) {
-@@ -322,9 +322,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
+@@ -322,9 +322,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
int i, j, k;
int ret;
@@ -36923,7 +37967,7 @@ diff -urNp linux-3.1.4/drivers/tty/vt/vt_ioctl.c linux-3.1.4/drivers/tty/vt/vt_i
kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
if (!kbs) {
ret = -ENOMEM;
-@@ -358,6 +355,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
+@@ -358,6 +355,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
kfree(kbs);
return ((p && *p) ? -EOVERFLOW : 0);
case KDSKBSENT:
@@ -36933,9 +37977,10 @@ diff -urNp linux-3.1.4/drivers/tty/vt/vt_ioctl.c linux-3.1.4/drivers/tty/vt/vt_i
if (!perm) {
ret = -EPERM;
goto reterr;
-diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
---- linux-3.1.4/drivers/uio/uio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/uio/uio.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
+index d2efe82..9440ab6 100644
+--- a/drivers/uio/uio.c
++++ b/drivers/uio/uio.c
@@ -25,6 +25,7 @@
#include <linux/kobject.h>
#include <linux/cdev.h>
@@ -36957,7 +38002,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
struct uio_info *info;
struct kobject *map_dir;
struct kobject *portio_dir;
-@@ -242,7 +243,7 @@ static ssize_t show_event(struct device
+@@ -242,7 +243,7 @@ static ssize_t show_event(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct uio_device *idev = dev_get_drvdata(dev);
@@ -36966,7 +38011,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
}
static struct device_attribute uio_class_attributes[] = {
-@@ -408,7 +409,7 @@ void uio_event_notify(struct uio_info *i
+@@ -408,7 +409,7 @@ void uio_event_notify(struct uio_info *info)
{
struct uio_device *idev = info->uio_dev;
@@ -36975,7 +38020,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
wake_up_interruptible(&idev->wait);
kill_fasync(&idev->async_queue, SIGIO, POLL_IN);
}
-@@ -461,7 +462,7 @@ static int uio_open(struct inode *inode,
+@@ -461,7 +462,7 @@ static int uio_open(struct inode *inode, struct file *filep)
}
listener->dev = idev;
@@ -36984,7 +38029,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
filep->private_data = listener;
if (idev->info->open) {
-@@ -512,7 +513,7 @@ static unsigned int uio_poll(struct file
+@@ -512,7 +513,7 @@ static unsigned int uio_poll(struct file *filep, poll_table *wait)
return -EIO;
poll_wait(filep, &idev->wait, wait);
@@ -36993,7 +38038,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
return POLLIN | POLLRDNORM;
return 0;
}
-@@ -537,7 +538,7 @@ static ssize_t uio_read(struct file *fil
+@@ -537,7 +538,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
do {
set_current_state(TASK_INTERRUPTIBLE);
@@ -37002,7 +38047,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
if (event_count != listener->event_count) {
if (copy_to_user(buf, &event_count, count))
retval = -EFAULT;
-@@ -606,13 +607,13 @@ static int uio_find_mem_index(struct vm_
+@@ -606,13 +607,13 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
static void uio_vma_open(struct vm_area_struct *vma)
{
struct uio_device *idev = vma->vm_private_data;
@@ -37018,7 +38063,7 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
}
static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-@@ -823,7 +824,7 @@ int __uio_register_device(struct module
+@@ -823,7 +824,7 @@ int __uio_register_device(struct module *owner,
idev->owner = owner;
idev->info = info;
init_waitqueue_head(&idev->wait);
@@ -37027,10 +38072,11 @@ diff -urNp linux-3.1.4/drivers/uio/uio.c linux-3.1.4/drivers/uio/uio.c
ret = uio_get_minor(idev);
if (ret)
-diff -urNp linux-3.1.4/drivers/usb/atm/cxacru.c linux-3.1.4/drivers/usb/atm/cxacru.c
---- linux-3.1.4/drivers/usb/atm/cxacru.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/atm/cxacru.c 2011-11-16 18:39:08.000000000 -0500
-@@ -473,7 +473,7 @@ static ssize_t cxacru_sysfs_store_adsl_c
+diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
+index a845f8b..4f54072 100644
+--- a/drivers/usb/atm/cxacru.c
++++ b/drivers/usb/atm/cxacru.c
+@@ -473,7 +473,7 @@ static ssize_t cxacru_sysfs_store_adsl_config(struct device *dev,
ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
if (ret < 2)
return -EINVAL;
@@ -37039,10 +38085,11 @@ diff -urNp linux-3.1.4/drivers/usb/atm/cxacru.c linux-3.1.4/drivers/usb/atm/cxac
return -EINVAL;
pos += tmp;
-diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usbatm.c
---- linux-3.1.4/drivers/usb/atm/usbatm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/atm/usbatm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(stru
+diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
+index d3448ca..d2864ca 100644
+--- a/drivers/usb/atm/usbatm.c
++++ b/drivers/usb/atm/usbatm.c
+@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (printk_ratelimit())
atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n",
__func__, vpi, vci);
@@ -37051,7 +38098,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
return;
}
-@@ -361,7 +361,7 @@ static void usbatm_extract_one_cell(stru
+@@ -361,7 +361,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (length > ATM_MAX_AAL5_PDU) {
atm_rldbg(instance, "%s: bogus length %u (vcc: 0x%p)!\n",
__func__, length, vcc);
@@ -37060,7 +38107,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
goto out;
}
-@@ -370,14 +370,14 @@ static void usbatm_extract_one_cell(stru
+@@ -370,14 +370,14 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (sarb->len < pdu_length) {
atm_rldbg(instance, "%s: bogus pdu_length %u (sarb->len: %u, vcc: 0x%p)!\n",
__func__, pdu_length, sarb->len, vcc);
@@ -37077,7 +38124,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
goto out;
}
-@@ -387,7 +387,7 @@ static void usbatm_extract_one_cell(stru
+@@ -387,7 +387,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
if (printk_ratelimit())
atm_err(instance, "%s: no memory for skb (length: %u)!\n",
__func__, length);
@@ -37086,7 +38133,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
goto out;
}
-@@ -412,7 +412,7 @@ static void usbatm_extract_one_cell(stru
+@@ -412,7 +412,7 @@ static void usbatm_extract_one_cell(struct usbatm_data *instance, unsigned char
vcc->push(vcc, skb);
@@ -37095,7 +38142,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
out:
skb_trim(sarb, 0);
}
-@@ -615,7 +615,7 @@ static void usbatm_tx_process(unsigned l
+@@ -615,7 +615,7 @@ static void usbatm_tx_process(unsigned long data)
struct atm_vcc *vcc = UDSL_SKB(skb)->atm.vcc;
usbatm_pop(vcc, skb);
@@ -37104,7 +38151,7 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
skb = skb_dequeue(&instance->sndqueue);
}
-@@ -773,11 +773,11 @@ static int usbatm_atm_proc_read(struct a
+@@ -773,11 +773,11 @@ static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *pag
if (!left--)
return sprintf(page,
"AAL5: tx %d ( %d err ), rx %d ( %d err, %d drop )\n",
@@ -37121,9 +38168,10 @@ diff -urNp linux-3.1.4/drivers/usb/atm/usbatm.c linux-3.1.4/drivers/usb/atm/usba
if (!left--) {
if (instance->disconnected)
-diff -urNp linux-3.1.4/drivers/usb/core/devices.c linux-3.1.4/drivers/usb/core/devices.c
---- linux-3.1.4/drivers/usb/core/devices.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/core/devices.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
+index 0149c09..f108812 100644
+--- a/drivers/usb/core/devices.c
++++ b/drivers/usb/core/devices.c
@@ -126,7 +126,7 @@ static const char format_endpt[] =
* time it gets called.
*/
@@ -37133,7 +38181,7 @@ diff -urNp linux-3.1.4/drivers/usb/core/devices.c linux-3.1.4/drivers/usb/core/d
wait_queue_head_t wait;
} device_event = {
.count = ATOMIC_INIT(1),
-@@ -164,7 +164,7 @@ static const struct class_info clas_info
+@@ -164,7 +164,7 @@ static const struct class_info clas_info[] = {
void usbfs_conn_disc_event(void)
{
@@ -37142,7 +38190,7 @@ diff -urNp linux-3.1.4/drivers/usb/core/devices.c linux-3.1.4/drivers/usb/core/d
wake_up(&device_event.wait);
}
-@@ -648,7 +648,7 @@ static unsigned int usb_device_poll(stru
+@@ -648,7 +648,7 @@ static unsigned int usb_device_poll(struct file *file,
poll_wait(file, &device_event.wait, wait);
@@ -37151,10 +38199,11 @@ diff -urNp linux-3.1.4/drivers/usb/core/devices.c linux-3.1.4/drivers/usb/core/d
if (file->f_version != event_count) {
file->f_version = event_count;
return POLLIN | POLLRDNORM;
-diff -urNp linux-3.1.4/drivers/usb/core/message.c linux-3.1.4/drivers/usb/core/message.c
---- linux-3.1.4/drivers/usb/core/message.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/core/message.c 2011-11-16 18:39:08.000000000 -0500
-@@ -869,8 +869,8 @@ char *usb_cache_string(struct usb_device
+diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
+index 0b5ec23..0da3d76 100644
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -869,8 +869,8 @@ char *usb_cache_string(struct usb_device *udev, int index)
buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
if (buf) {
len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
@@ -37165,10 +38214,11 @@ diff -urNp linux-3.1.4/drivers/usb/core/message.c linux-3.1.4/drivers/usb/core/m
if (!smallbuf)
return buf;
memcpy(smallbuf, buf, len);
-diff -urNp linux-3.1.4/drivers/usb/early/ehci-dbgp.c linux-3.1.4/drivers/usb/early/ehci-dbgp.c
---- linux-3.1.4/drivers/usb/early/ehci-dbgp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/early/ehci-dbgp.c 2011-11-16 18:39:08.000000000 -0500
-@@ -97,7 +97,8 @@ static inline u32 dbgp_len_update(u32 x,
+diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c
+index 1fc8f12..20647c1 100644
+--- a/drivers/usb/early/ehci-dbgp.c
++++ b/drivers/usb/early/ehci-dbgp.c
+@@ -97,7 +97,8 @@ static inline u32 dbgp_len_update(u32 x, u32 len)
#ifdef CONFIG_KGDB
static struct kgdb_io kgdbdbgp_io_ops;
@@ -37178,7 +38228,7 @@ diff -urNp linux-3.1.4/drivers/usb/early/ehci-dbgp.c linux-3.1.4/drivers/usb/ear
#else
#define dbgp_kgdb_mode (0)
#endif
-@@ -1035,6 +1036,13 @@ static struct kgdb_io kgdbdbgp_io_ops =
+@@ -1035,6 +1036,13 @@ static struct kgdb_io kgdbdbgp_io_ops = {
.write_char = kgdbdbgp_write_char,
};
@@ -37192,7 +38242,7 @@ diff -urNp linux-3.1.4/drivers/usb/early/ehci-dbgp.c linux-3.1.4/drivers/usb/ear
static int kgdbdbgp_wait_time;
static int __init kgdbdbgp_parse_config(char *str)
-@@ -1050,8 +1058,10 @@ static int __init kgdbdbgp_parse_config(
+@@ -1050,8 +1058,10 @@ static int __init kgdbdbgp_parse_config(char *str)
ptr++;
kgdbdbgp_wait_time = simple_strtoul(ptr, &ptr, 10);
}
@@ -37205,10 +38255,11 @@ diff -urNp linux-3.1.4/drivers/usb/early/ehci-dbgp.c linux-3.1.4/drivers/usb/ear
return 0;
}
-diff -urNp linux-3.1.4/drivers/usb/host/xhci-mem.c linux-3.1.4/drivers/usb/host/xhci-mem.c
---- linux-3.1.4/drivers/usb/host/xhci-mem.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/drivers/usb/host/xhci-mem.c 2011-11-26 20:00:43.000000000 -0500
-@@ -1685,6 +1685,8 @@ static int xhci_check_trb_in_td_math(str
+diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
+index d718033..6075579 100644
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -1685,6 +1685,8 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags)
unsigned int num_tests;
int i, ret;
@@ -37217,9 +38268,10 @@ diff -urNp linux-3.1.4/drivers/usb/host/xhci-mem.c linux-3.1.4/drivers/usb/host/
num_tests = ARRAY_SIZE(simple_test_vector);
for (i = 0; i < num_tests; i++) {
ret = xhci_test_trb_in_td(xhci,
-diff -urNp linux-3.1.4/drivers/usb/wusbcore/wa-hc.h linux-3.1.4/drivers/usb/wusbcore/wa-hc.h
---- linux-3.1.4/drivers/usb/wusbcore/wa-hc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/wusbcore/wa-hc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/usb/wusbcore/wa-hc.h b/drivers/usb/wusbcore/wa-hc.h
+index d6bea3e..60b250e 100644
+--- a/drivers/usb/wusbcore/wa-hc.h
++++ b/drivers/usb/wusbcore/wa-hc.h
@@ -192,7 +192,7 @@ struct wahc {
struct list_head xfer_delayed_list;
spinlock_t xfer_list_lock;
@@ -37229,7 +38281,7 @@ diff -urNp linux-3.1.4/drivers/usb/wusbcore/wa-hc.h linux-3.1.4/drivers/usb/wusb
};
-@@ -246,7 +246,7 @@ static inline void wa_init(struct wahc *
+@@ -246,7 +246,7 @@ static inline void wa_init(struct wahc *wa)
INIT_LIST_HEAD(&wa->xfer_delayed_list);
spin_lock_init(&wa->xfer_list_lock);
INIT_WORK(&wa->xfer_work, wa_urb_enqueue_run);
@@ -37238,9 +38290,10 @@ diff -urNp linux-3.1.4/drivers/usb/wusbcore/wa-hc.h linux-3.1.4/drivers/usb/wusb
}
/**
-diff -urNp linux-3.1.4/drivers/usb/wusbcore/wa-xfer.c linux-3.1.4/drivers/usb/wusbcore/wa-xfer.c
---- linux-3.1.4/drivers/usb/wusbcore/wa-xfer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/usb/wusbcore/wa-xfer.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
+index 4193345..49ae93d 100644
+--- a/drivers/usb/wusbcore/wa-xfer.c
++++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -295,7 +295,7 @@ out:
*/
static void wa_xfer_id_init(struct wa_xfer *xfer)
@@ -37250,10 +38303,11 @@ diff -urNp linux-3.1.4/drivers/usb/wusbcore/wa-xfer.c linux-3.1.4/drivers/usb/wu
}
/*
-diff -urNp linux-3.1.4/drivers/vhost/vhost.c linux-3.1.4/drivers/vhost/vhost.c
---- linux-3.1.4/drivers/vhost/vhost.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/vhost/vhost.c 2011-11-16 18:39:08.000000000 -0500
-@@ -629,7 +629,7 @@ static long vhost_set_memory(struct vhos
+diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
+index c14c42b..f955cc2 100644
+--- a/drivers/vhost/vhost.c
++++ b/drivers/vhost/vhost.c
+@@ -629,7 +629,7 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
return 0;
}
@@ -37262,9 +38316,10 @@ diff -urNp linux-3.1.4/drivers/vhost/vhost.c linux-3.1.4/drivers/vhost/vhost.c
{
struct file *eventfp, *filep = NULL,
*pollstart = NULL, *pollstop = NULL;
-diff -urNp linux-3.1.4/drivers/video/aty/aty128fb.c linux-3.1.4/drivers/video/aty/aty128fb.c
---- linux-3.1.4/drivers/video/aty/aty128fb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/aty/aty128fb.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
+index b0b2ac3..89a4399 100644
+--- a/drivers/video/aty/aty128fb.c
++++ b/drivers/video/aty/aty128fb.c
@@ -148,7 +148,7 @@ enum {
};
@@ -37274,10 +38329,11 @@ diff -urNp linux-3.1.4/drivers/video/aty/aty128fb.c linux-3.1.4/drivers/video/at
"AGP",
"PCI",
"PRO AGP",
-diff -urNp linux-3.1.4/drivers/video/fbcmap.c linux-3.1.4/drivers/video/fbcmap.c
---- linux-3.1.4/drivers/video/fbcmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/fbcmap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -285,8 +285,7 @@ int fb_set_user_cmap(struct fb_cmap_user
+diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
+index 5c3960d..15cf8fc 100644
+--- a/drivers/video/fbcmap.c
++++ b/drivers/video/fbcmap.c
+@@ -285,8 +285,7 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
rc = -ENODEV;
goto out;
}
@@ -37287,10 +38343,11 @@ diff -urNp linux-3.1.4/drivers/video/fbcmap.c linux-3.1.4/drivers/video/fbcmap.c
rc = -EINVAL;
goto out1;
}
-diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
---- linux-3.1.4/drivers/video/fbmem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/fbmem.c 2011-11-16 18:40:29.000000000 -0500
-@@ -428,7 +428,7 @@ static void fb_do_show_logo(struct fb_in
+diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
+index ad93629..ca6a218 100644
+--- a/drivers/video/fbmem.c
++++ b/drivers/video/fbmem.c
+@@ -428,7 +428,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dx += image->width + 8;
}
} else if (rotate == FB_ROTATE_UD) {
@@ -37299,7 +38356,7 @@ diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8;
}
-@@ -440,7 +440,7 @@ static void fb_do_show_logo(struct fb_in
+@@ -440,7 +440,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
image->dy += image->height + 8;
}
} else if (rotate == FB_ROTATE_CCW) {
@@ -37308,7 +38365,7 @@ diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8;
}
-@@ -939,6 +939,8 @@ fb_set_var(struct fb_info *info, struct
+@@ -939,6 +939,8 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
int flags = info->flags;
int ret = 0;
@@ -37317,7 +38374,7 @@ diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
-@@ -1064,6 +1066,8 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1064,6 +1066,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
void __user *argp = (void __user *)arg;
long ret = 0;
@@ -37326,7 +38383,7 @@ diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
switch (cmd) {
case FBIOGET_VSCREENINFO:
if (!lock_fb_info(info))
-@@ -1143,7 +1147,7 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1143,7 +1147,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return -EFAULT;
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
@@ -37335,9 +38392,10 @@ diff -urNp linux-3.1.4/drivers/video/fbmem.c linux-3.1.4/drivers/video/fbmem.c
return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
-diff -urNp linux-3.1.4/drivers/video/geode/gx1fb_core.c linux-3.1.4/drivers/video/geode/gx1fb_core.c
---- linux-3.1.4/drivers/video/geode/gx1fb_core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/geode/gx1fb_core.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
+index 5a5d092..265c5ed 100644
+--- a/drivers/video/geode/gx1fb_core.c
++++ b/drivers/video/geode/gx1fb_core.c
@@ -29,7 +29,7 @@ static int crt_option = 1;
static char panel_option[32] = "";
@@ -37347,9 +38405,10 @@ diff -urNp linux-3.1.4/drivers/video/geode/gx1fb_core.c linux-3.1.4/drivers/vide
/* 640x480-60 VESA */
{ NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
-diff -urNp linux-3.1.4/drivers/video/gxt4500.c linux-3.1.4/drivers/video/gxt4500.c
---- linux-3.1.4/drivers/video/gxt4500.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/gxt4500.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
+index 896e53d..4d87d0b 100644
+--- a/drivers/video/gxt4500.c
++++ b/drivers/video/gxt4500.c
@@ -156,7 +156,7 @@ struct gxt4500_par {
static char *mode_option;
@@ -37359,7 +38418,7 @@ diff -urNp linux-3.1.4/drivers/video/gxt4500.c linux-3.1.4/drivers/video/gxt4500
.refresh = 60,
.xres = 1280,
.yres = 1024,
-@@ -581,7 +581,7 @@ static int gxt4500_blank(int blank, stru
+@@ -581,7 +581,7 @@ static int gxt4500_blank(int blank, struct fb_info *info)
return 0;
}
@@ -37368,10 +38427,11 @@ diff -urNp linux-3.1.4/drivers/video/gxt4500.c linux-3.1.4/drivers/video/gxt4500
.id = "IBM GXT4500P",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR,
-diff -urNp linux-3.1.4/drivers/video/i810/i810_accel.c linux-3.1.4/drivers/video/i810/i810_accel.c
---- linux-3.1.4/drivers/video/i810/i810_accel.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/i810/i810_accel.c 2011-11-16 18:39:08.000000000 -0500
-@@ -73,6 +73,7 @@ static inline int wait_for_space(struct
+diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
+index 7672d2e..b56437f 100644
+--- a/drivers/video/i810/i810_accel.c
++++ b/drivers/video/i810/i810_accel.c
+@@ -73,6 +73,7 @@ static inline int wait_for_space(struct fb_info *info, u32 space)
}
}
printk("ringbuffer lockup!!!\n");
@@ -37379,10 +38439,11 @@ diff -urNp linux-3.1.4/drivers/video/i810/i810_accel.c linux-3.1.4/drivers/video
i810_report_error(mmio);
par->dev_flags |= LOCKUP;
info->pixmap.scan_align = 1;
-diff -urNp linux-3.1.4/drivers/video/i810/i810_main.c linux-3.1.4/drivers/video/i810/i810_main.c
---- linux-3.1.4/drivers/video/i810/i810_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/i810/i810_main.c 2011-11-16 18:39:08.000000000 -0500
-@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_
+diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
+index 318f6fb..9a389c1 100644
+--- a/drivers/video/i810/i810_main.c
++++ b/drivers/video/i810/i810_main.c
+@@ -97,7 +97,7 @@ static int i810fb_blank (int blank_mode, struct fb_info *info);
static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par);
/* PCI */
@@ -37391,9 +38452,10 @@ diff -urNp linux-3.1.4/drivers/video/i810/i810_main.c linux-3.1.4/drivers/video/
"Intel(R) 810 Framebuffer Device" ,
"Intel(R) 810-DC100 Framebuffer Device" ,
"Intel(R) 810E Framebuffer Device" ,
-diff -urNp linux-3.1.4/drivers/video/jz4740_fb.c linux-3.1.4/drivers/video/jz4740_fb.c
---- linux-3.1.4/drivers/video/jz4740_fb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/jz4740_fb.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c
+index de36693..3c63fc2 100644
+--- a/drivers/video/jz4740_fb.c
++++ b/drivers/video/jz4740_fb.c
@@ -136,7 +136,7 @@ struct jzfb {
uint32_t pseudo_palette[16];
};
@@ -37403,9 +38465,10 @@ diff -urNp linux-3.1.4/drivers/video/jz4740_fb.c linux-3.1.4/drivers/video/jz474
.id = "JZ4740 FB",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
-diff -urNp linux-3.1.4/drivers/video/logo/logo_linux_clut224.ppm linux-3.1.4/drivers/video/logo/logo_linux_clut224.ppm
---- linux-3.1.4/drivers/video/logo/logo_linux_clut224.ppm 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/logo/logo_linux_clut224.ppm 2011-11-16 18:40:29.000000000 -0500
+diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm
+index 3c14e43..eafa544 100644
+--- a/drivers/video/logo/logo_linux_clut224.ppm
++++ b/drivers/video/logo/logo_linux_clut224.ppm
@@ -1,1604 +1,1123 @@
P3
-# Standard 224-color Linux logo
@@ -40131,10 +41194,11 @@ diff -urNp linux-3.1.4/drivers/video/logo/logo_linux_clut224.ppm linux-3.1.4/dri
+4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+4 4 4 4 4 4
-diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
---- linux-3.1.4/drivers/video/udlfb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/udlfb.c 2011-11-16 18:39:08.000000000 -0500
-@@ -585,11 +585,11 @@ int dlfb_handle_damage(struct dlfb_data
+diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
+index 087fc99..f85ed76 100644
+--- a/drivers/video/udlfb.c
++++ b/drivers/video/udlfb.c
+@@ -585,11 +585,11 @@ int dlfb_handle_damage(struct dlfb_data *dev, int x, int y,
dlfb_urb_completion(urb);
error:
@@ -40150,7 +41214,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
>> 10)), /* Kcycles */
&dev->cpu_kcycles_used);
-@@ -710,11 +710,11 @@ static void dlfb_dpy_deferred_io(struct
+@@ -710,11 +710,11 @@ static void dlfb_dpy_deferred_io(struct fb_info *info,
dlfb_urb_completion(urb);
error:
@@ -40166,7 +41230,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
>> 10)), /* Kcycles */
&dev->cpu_kcycles_used);
}
-@@ -1306,7 +1306,7 @@ static ssize_t metrics_bytes_rendered_sh
+@@ -1306,7 +1306,7 @@ static ssize_t metrics_bytes_rendered_show(struct device *fbdev,
struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dev = fb_info->par;
return snprintf(buf, PAGE_SIZE, "%u\n",
@@ -40175,7 +41239,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
}
static ssize_t metrics_bytes_identical_show(struct device *fbdev,
-@@ -1314,7 +1314,7 @@ static ssize_t metrics_bytes_identical_s
+@@ -1314,7 +1314,7 @@ static ssize_t metrics_bytes_identical_show(struct device *fbdev,
struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dev = fb_info->par;
return snprintf(buf, PAGE_SIZE, "%u\n",
@@ -40184,7 +41248,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
}
static ssize_t metrics_bytes_sent_show(struct device *fbdev,
-@@ -1322,7 +1322,7 @@ static ssize_t metrics_bytes_sent_show(s
+@@ -1322,7 +1322,7 @@ static ssize_t metrics_bytes_sent_show(struct device *fbdev,
struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dev = fb_info->par;
return snprintf(buf, PAGE_SIZE, "%u\n",
@@ -40193,7 +41257,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
}
static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev,
-@@ -1330,7 +1330,7 @@ static ssize_t metrics_cpu_kcycles_used_
+@@ -1330,7 +1330,7 @@ static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev,
struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dev = fb_info->par;
return snprintf(buf, PAGE_SIZE, "%u\n",
@@ -40202,7 +41266,7 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
}
static ssize_t edid_show(
-@@ -1387,10 +1387,10 @@ static ssize_t metrics_reset_store(struc
+@@ -1387,10 +1387,10 @@ static ssize_t metrics_reset_store(struct device *fbdev,
struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dev = fb_info->par;
@@ -40217,9 +41281,10 @@ diff -urNp linux-3.1.4/drivers/video/udlfb.c linux-3.1.4/drivers/video/udlfb.c
return count;
}
-diff -urNp linux-3.1.4/drivers/video/uvesafb.c linux-3.1.4/drivers/video/uvesafb.c
---- linux-3.1.4/drivers/video/uvesafb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/uvesafb.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
+index 7f8472c..9842e87 100644
+--- a/drivers/video/uvesafb.c
++++ b/drivers/video/uvesafb.c
@@ -19,6 +19,7 @@
#include <linux/io.h>
#include <linux/mutex.h>
@@ -40237,7 +41302,7 @@ diff -urNp linux-3.1.4/drivers/video/uvesafb.c linux-3.1.4/drivers/video/uvesafb
}
/*
-@@ -569,10 +570,32 @@ static int __devinit uvesafb_vbe_getpmi(
+@@ -569,10 +570,32 @@ static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
par->pmi_setpal = par->ypan = 0;
} else {
@@ -40282,7 +41347,7 @@ diff -urNp linux-3.1.4/drivers/video/uvesafb.c linux-3.1.4/drivers/video/uvesafb
framebuffer_release(info);
return err;
}
-@@ -1847,6 +1875,12 @@ static int uvesafb_remove(struct platfor
+@@ -1847,6 +1875,12 @@ static int uvesafb_remove(struct platform_device *dev)
kfree(par->vbe_state_orig);
if (par->vbe_state_saved)
kfree(par->vbe_state_saved);
@@ -40295,9 +41360,10 @@ diff -urNp linux-3.1.4/drivers/video/uvesafb.c linux-3.1.4/drivers/video/uvesafb
}
framebuffer_release(info);
-diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
---- linux-3.1.4/drivers/video/vesafb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/vesafb.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
+index 501b340..86bd4cf 100644
+--- a/drivers/video/vesafb.c
++++ b/drivers/video/vesafb.c
@@ -9,6 +9,7 @@
*/
@@ -40306,7 +41372,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
-@@ -52,8 +53,8 @@ static int vram_remap __initdata; /*
+@@ -52,8 +53,8 @@ static int vram_remap __initdata; /* Set amount of memory to be used */
static int vram_total __initdata; /* Set total amount of memory */
static int pmi_setpal __read_mostly = 1; /* pmi for palette changes ??? */
static int ypan __read_mostly; /* 0..nothing, 1..ypan, 2..ywrap */
@@ -40317,7 +41383,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
static int depth __read_mostly;
static int vga_compat __read_mostly;
/* --------------------------------------------------------------------- */
-@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct pl
+@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct platform_device *dev)
unsigned int size_vmode;
unsigned int size_remap;
unsigned int size_total;
@@ -40325,7 +41391,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
return -ENODEV;
-@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct pl
+@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct platform_device *dev)
size_remap = size_total;
vesafb_fix.smem_len = size_remap;
@@ -40336,7 +41402,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
printk(KERN_WARNING
"vesafb: cannot reserve video memory at 0x%lx\n",
-@@ -307,9 +305,21 @@ static int __init vesafb_probe(struct pl
+@@ -307,9 +305,21 @@ static int __init vesafb_probe(struct platform_device *dev)
printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages);
@@ -40360,7 +41426,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
}
if (screen_info.vesapm_seg < 0xc000)
-@@ -317,9 +327,25 @@ static int __init vesafb_probe(struct pl
+@@ -317,9 +327,25 @@ static int __init vesafb_probe(struct platform_device *dev)
if (ypan || pmi_setpal) {
unsigned short *pmi_base;
@@ -40388,7 +41454,7 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal);
if (pmi_base[3]) {
printk(KERN_INFO "vesafb: pmi: ports = ");
-@@ -488,6 +514,11 @@ static int __init vesafb_probe(struct pl
+@@ -488,6 +514,11 @@ static int __init vesafb_probe(struct platform_device *dev)
info->node, info->fix.id);
return 0;
err:
@@ -40400,9 +41466,10 @@ diff -urNp linux-3.1.4/drivers/video/vesafb.c linux-3.1.4/drivers/video/vesafb.c
if (info->screen_base)
iounmap(info->screen_base);
framebuffer_release(info);
-diff -urNp linux-3.1.4/drivers/video/via/via_clock.h linux-3.1.4/drivers/video/via/via_clock.h
---- linux-3.1.4/drivers/video/via/via_clock.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/video/via/via_clock.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/video/via/via_clock.h b/drivers/video/via/via_clock.h
+index 88714ae..16c2e11 100644
+--- a/drivers/video/via/via_clock.h
++++ b/drivers/video/via/via_clock.h
@@ -56,7 +56,7 @@ struct via_clock {
void (*set_engine_pll_state)(u8 state);
@@ -40412,10 +41479,11 @@ diff -urNp linux-3.1.4/drivers/video/via/via_clock.h linux-3.1.4/drivers/video/v
static inline u32 get_pll_internal_frequency(u32 ref_freq,
-diff -urNp linux-3.1.4/drivers/virtio/virtio_balloon.c linux-3.1.4/drivers/virtio/virtio_balloon.c
---- linux-3.1.4/drivers/virtio/virtio_balloon.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/virtio/virtio_balloon.c 2011-11-16 18:40:29.000000000 -0500
-@@ -174,6 +174,8 @@ static void update_balloon_stats(struct
+diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
+index e058ace..2424d93 100644
+--- a/drivers/virtio/virtio_balloon.c
++++ b/drivers/virtio/virtio_balloon.c
+@@ -174,6 +174,8 @@ static void update_balloon_stats(struct virtio_balloon *vb)
struct sysinfo i;
int idx = 0;
@@ -40424,9 +41492,10 @@ diff -urNp linux-3.1.4/drivers/virtio/virtio_balloon.c linux-3.1.4/drivers/virti
all_vm_events(events);
si_meminfo(&i);
-diff -urNp linux-3.1.4/drivers/xen/xen-pciback/conf_space.h linux-3.1.4/drivers/xen/xen-pciback/conf_space.h
---- linux-3.1.4/drivers/xen/xen-pciback/conf_space.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/drivers/xen/xen-pciback/conf_space.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/drivers/xen/xen-pciback/conf_space.h b/drivers/xen/xen-pciback/conf_space.h
+index e56c934..fc22f4b 100644
+--- a/drivers/xen/xen-pciback/conf_space.h
++++ b/drivers/xen/xen-pciback/conf_space.h
@@ -44,15 +44,15 @@ struct config_field {
struct {
conf_dword_write write;
@@ -40446,10 +41515,11 @@ diff -urNp linux-3.1.4/drivers/xen/xen-pciback/conf_space.h linux-3.1.4/drivers/
} u;
struct list_head list;
};
-diff -urNp linux-3.1.4/fs/9p/vfs_inode.c linux-3.1.4/fs/9p/vfs_inode.c
---- linux-3.1.4/fs/9p/vfs_inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/9p/vfs_inode.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1288,7 +1288,7 @@ static void *v9fs_vfs_follow_link(struct
+diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
+index e3c03db..93b0172 100644
+--- a/fs/9p/vfs_inode.c
++++ b/fs/9p/vfs_inode.c
+@@ -1288,7 +1288,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
void
v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
@@ -40458,10 +41528,24 @@ diff -urNp linux-3.1.4/fs/9p/vfs_inode.c linux-3.1.4/fs/9p/vfs_inode.c
P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
IS_ERR(s) ? "<error>" : s);
-diff -urNp linux-3.1.4/fs/aio.c linux-3.1.4/fs/aio.c
---- linux-3.1.4/fs/aio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/aio.c 2011-11-16 18:40:29.000000000 -0500
-@@ -119,7 +119,7 @@ static int aio_setup_ring(struct kioctx
+diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
+index 79e2ca7..5828ad1 100644
+--- a/fs/Kconfig.binfmt
++++ b/fs/Kconfig.binfmt
+@@ -86,7 +86,7 @@ config HAVE_AOUT
+
+ config BINFMT_AOUT
+ tristate "Kernel support for a.out and ECOFF binaries"
+- depends on HAVE_AOUT
++ depends on HAVE_AOUT && BROKEN
+ ---help---
+ A.out (Assembler.OUTput) is a set of formats for libraries and
+ executables used in the earliest versions of UNIX. Linux used
+diff --git a/fs/aio.c b/fs/aio.c
+index e29ec48..f083e5e 100644
+--- a/fs/aio.c
++++ b/fs/aio.c
+@@ -119,7 +119,7 @@ static int aio_setup_ring(struct kioctx *ctx)
size += sizeof(struct io_event) * nr_events;
nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT;
@@ -40470,7 +41554,7 @@ diff -urNp linux-3.1.4/fs/aio.c linux-3.1.4/fs/aio.c
return -EINVAL;
nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-@@ -1088,6 +1088,8 @@ static int read_events(struct kioctx *ct
+@@ -1088,6 +1088,8 @@ static int read_events(struct kioctx *ctx,
struct aio_timeout to;
int retry = 0;
@@ -40479,7 +41563,7 @@ diff -urNp linux-3.1.4/fs/aio.c linux-3.1.4/fs/aio.c
/* needed to zero any padding within an entry (there shouldn't be
* any, but C is fun!
*/
-@@ -1381,22 +1383,27 @@ static ssize_t aio_fsync(struct kiocb *i
+@@ -1381,22 +1383,27 @@ static ssize_t aio_fsync(struct kiocb *iocb)
static ssize_t aio_setup_vectored_rw(int type, struct kiocb *kiocb, bool compat)
{
ssize_t ret;
@@ -40509,10 +41593,11 @@ diff -urNp linux-3.1.4/fs/aio.c linux-3.1.4/fs/aio.c
kiocb->ki_nr_segs = kiocb->ki_nbytes;
kiocb->ki_cur_seg = 0;
/* ki_nbytes/left now reflect bytes instead of segs */
-diff -urNp linux-3.1.4/fs/attr.c linux-3.1.4/fs/attr.c
---- linux-3.1.4/fs/attr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/attr.c 2011-11-16 18:40:29.000000000 -0500
-@@ -98,6 +98,7 @@ int inode_newsize_ok(const struct inode
+diff --git a/fs/attr.c b/fs/attr.c
+index 538e279..046cc6d 100644
+--- a/fs/attr.c
++++ b/fs/attr.c
+@@ -98,6 +98,7 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset)
unsigned long limit;
limit = rlimit(RLIMIT_FSIZE);
@@ -40520,10 +41605,11 @@ diff -urNp linux-3.1.4/fs/attr.c linux-3.1.4/fs/attr.c
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
-diff -urNp linux-3.1.4/fs/autofs4/waitq.c linux-3.1.4/fs/autofs4/waitq.c
---- linux-3.1.4/fs/autofs4/waitq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/autofs4/waitq.c 2011-11-16 18:39:08.000000000 -0500
-@@ -60,7 +60,7 @@ static int autofs4_write(struct file *fi
+diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
+index e1fbdee..cd5ea56 100644
+--- a/fs/autofs4/waitq.c
++++ b/fs/autofs4/waitq.c
+@@ -60,7 +60,7 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)
{
unsigned long sigpipe, flags;
mm_segment_t fs;
@@ -40532,10 +41618,11 @@ diff -urNp linux-3.1.4/fs/autofs4/waitq.c linux-3.1.4/fs/autofs4/waitq.c
ssize_t wr = 0;
/** WARNING: this is not safe for writing more than PIPE_BUF bytes! **/
-diff -urNp linux-3.1.4/fs/befs/linuxvfs.c linux-3.1.4/fs/befs/linuxvfs.c
---- linux-3.1.4/fs/befs/linuxvfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/befs/linuxvfs.c 2011-11-16 18:39:08.000000000 -0500
-@@ -503,7 +503,7 @@ static void befs_put_link(struct dentry
+diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
+index 720d885..012e7f0 100644
+--- a/fs/befs/linuxvfs.c
++++ b/fs/befs/linuxvfs.c
+@@ -503,7 +503,7 @@ static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
@@ -40544,9 +41631,10 @@ diff -urNp linux-3.1.4/fs/befs/linuxvfs.c linux-3.1.4/fs/befs/linuxvfs.c
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
---- linux-3.1.4/fs/binfmt_aout.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/binfmt_aout.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
+index a6395bd..a5b24c4 100644
+--- a/fs/binfmt_aout.c
++++ b/fs/binfmt_aout.c
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/fs.h>
@@ -40555,7 +41643,7 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
-@@ -86,6 +87,8 @@ static int aout_core_dump(struct coredum
+@@ -86,6 +87,8 @@ static int aout_core_dump(struct coredump_params *cprm)
#endif
# define START_STACK(u) ((void __user *)u.start_stack)
@@ -40564,7 +41652,7 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
-@@ -97,10 +100,12 @@ static int aout_core_dump(struct coredum
+@@ -97,10 +100,12 @@ static int aout_core_dump(struct coredump_params *cprm)
/* If the size of the dump file exceeds the rlimit, then see what would happen
if we wrote the stack, but not the data area. */
@@ -40577,7 +41665,7 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
if ((dump.u_ssize + 1) * PAGE_SIZE > cprm->limit)
dump.u_ssize = 0;
-@@ -234,6 +239,8 @@ static int load_aout_binary(struct linux
+@@ -234,6 +239,8 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
rlim = rlimit(RLIMIT_DATA);
if (rlim >= RLIM_INFINITY)
rlim = ~0;
@@ -40586,7 +41674,7 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
if (ex.a_data + ex.a_bss > rlim)
return -ENOMEM;
-@@ -262,6 +269,27 @@ static int load_aout_binary(struct linux
+@@ -262,6 +269,27 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
install_exec_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
@@ -40614,7 +41702,7 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
if (N_MAGIC(ex) == OMAGIC) {
unsigned long text_addr, map_size;
loff_t pos;
-@@ -334,7 +362,7 @@ static int load_aout_binary(struct linux
+@@ -334,7 +362,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
down_write(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
@@ -40623,10 +41711,11 @@ diff -urNp linux-3.1.4/fs/binfmt_aout.c linux-3.1.4/fs/binfmt_aout.c
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up_write(&current->mm->mmap_sem);
-diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
---- linux-3.1.4/fs/binfmt_elf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/binfmt_elf.c 2011-11-16 18:40:29.000000000 -0500
-@@ -51,6 +51,10 @@ static int elf_core_dump(struct coredump
+diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
+index 21ac5ee..171b1d0 100644
+--- a/fs/binfmt_elf.c
++++ b/fs/binfmt_elf.c
+@@ -51,6 +51,10 @@ static int elf_core_dump(struct coredump_params *cprm);
#define elf_core_dump NULL
#endif
@@ -40637,7 +41726,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
#if ELF_EXEC_PAGESIZE > PAGE_SIZE
#define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
#else
-@@ -70,6 +74,11 @@ static struct linux_binfmt elf_format =
+@@ -70,6 +74,11 @@ static struct linux_binfmt elf_format = {
.load_binary = load_elf_binary,
.load_shlib = load_elf_library,
.core_dump = elf_core_dump,
@@ -40649,7 +41738,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
.min_coredump = ELF_EXEC_PAGESIZE,
};
-@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format =
+@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format = {
static int set_brk(unsigned long start, unsigned long end)
{
@@ -40658,7 +41747,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
start = ELF_PAGEALIGN(start);
end = ELF_PAGEALIGN(end);
if (end > start) {
-@@ -87,7 +98,7 @@ static int set_brk(unsigned long start,
+@@ -87,7 +98,7 @@ static int set_brk(unsigned long start, unsigned long end)
if (BAD_ADDR(addr))
return addr;
}
@@ -40667,7 +41756,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
return 0;
}
-@@ -148,12 +159,15 @@ create_elf_tables(struct linux_binprm *b
+@@ -148,12 +159,15 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
elf_addr_t __user *u_rand_bytes;
const char *k_platform = ELF_PLATFORM;
const char *k_base_platform = ELF_BASE_PLATFORM;
@@ -40684,7 +41773,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
/*
* In some cases (e.g. Hyper-Threading), we want to avoid L1
-@@ -195,8 +209,12 @@ create_elf_tables(struct linux_binprm *b
+@@ -195,8 +209,12 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
* Generate 16 random bytes for userspace PRNG seeding.
*/
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
@@ -40699,7 +41788,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
return -EFAULT;
-@@ -308,9 +326,11 @@ create_elf_tables(struct linux_binprm *b
+@@ -308,9 +326,11 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
return -EFAULT;
current->mm->env_end = p;
@@ -40712,7 +41801,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
return -EFAULT;
return 0;
}
-@@ -381,10 +401,10 @@ static unsigned long load_elf_interp(str
+@@ -381,10 +401,10 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
{
struct elf_phdr *elf_phdata;
struct elf_phdr *eppnt;
@@ -40725,7 +41814,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
unsigned long total_size;
int retval, i, size;
-@@ -430,6 +450,11 @@ static unsigned long load_elf_interp(str
+@@ -430,6 +450,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
goto out_close;
}
@@ -40737,7 +41826,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
eppnt = elf_phdata;
for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
if (eppnt->p_type == PT_LOAD) {
-@@ -473,8 +498,8 @@ static unsigned long load_elf_interp(str
+@@ -473,8 +498,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
k = load_addr + eppnt->p_vaddr;
if (BAD_ADDR(k) ||
eppnt->p_filesz > eppnt->p_memsz ||
@@ -40942,7 +42031,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -544,6 +756,11 @@ static unsigned long randomize_stack_top
+@@ -544,6 +756,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
{
unsigned int random_variable = 0;
@@ -40954,7 +42043,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
random_variable = get_random_int() & STACK_RND_MASK;
-@@ -562,7 +779,7 @@ static int load_elf_binary(struct linux_
+@@ -562,7 +779,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
@@ -40963,7 +42052,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retval, i;
-@@ -572,11 +789,11 @@ static int load_elf_binary(struct linux_
+@@ -572,11 +789,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
unsigned long start_code, end_code, start_data, end_data;
unsigned long reloc_func_desc __maybe_unused = 0;
int executable_stack = EXSTACK_DEFAULT;
@@ -40976,7 +42065,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -713,11 +930,81 @@ static int load_elf_binary(struct linux_
+@@ -713,11 +930,81 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
/* OK, This is the point of no return */
current->flags &= ~PF_FORKNOEXEC;
@@ -41059,7 +42148,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
-@@ -808,6 +1095,20 @@ static int load_elf_binary(struct linux_
+@@ -808,6 +1095,20 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
#else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#endif
@@ -41080,7 +42169,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
}
error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-@@ -840,9 +1141,9 @@ static int load_elf_binary(struct linux_
+@@ -840,9 +1141,9 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
@@ -41093,7 +42182,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
/* set_brk can never work. Avoid overflows. */
send_sig(SIGKILL, current, 0);
retval = -EINVAL;
-@@ -870,6 +1171,11 @@ static int load_elf_binary(struct linux_
+@@ -870,6 +1171,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
start_data += load_bias;
end_data += load_bias;
@@ -41105,7 +42194,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
/* Calling set_brk effectively mmaps the pages that we need
* for the bss and break sections. We must do this before
* mapping in the interpreter, to make sure it doesn't wind
-@@ -881,9 +1187,11 @@ static int load_elf_binary(struct linux_
+@@ -881,9 +1187,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
goto out_free_dentry;
}
if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -41129,7 +42218,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
-@@ -1132,7 +1440,7 @@ static unsigned long vma_dump_size(struc
+@@ -1132,7 +1440,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
if (vma->vm_file == NULL)
return 0;
@@ -41138,7 +42227,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
goto whole;
/*
-@@ -1354,9 +1662,9 @@ static void fill_auxv_note(struct memelf
+@@ -1354,9 +1662,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
{
elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
int i = 0;
@@ -41150,7 +42239,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
}
-@@ -1862,14 +2170,14 @@ static void fill_extnum_info(struct elfh
+@@ -1862,14 +2170,14 @@ static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum,
}
static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma,
@@ -41167,7 +42256,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
return size;
}
-@@ -1963,7 +2271,7 @@ static int elf_core_dump(struct coredump
+@@ -1963,7 +2271,7 @@ static int elf_core_dump(struct coredump_params *cprm)
dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
@@ -41176,7 +42265,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
offset += elf_core_extra_data_size();
e_shoff = offset;
-@@ -1977,10 +2285,12 @@ static int elf_core_dump(struct coredump
+@@ -1977,10 +2285,12 @@ static int elf_core_dump(struct coredump_params *cprm)
offset = dataoff;
size += sizeof(*elf);
@@ -41189,7 +42278,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
if (size > cprm->limit
|| !dump_write(cprm->file, phdr4note, sizeof(*phdr4note)))
goto end_coredump;
-@@ -1994,7 +2304,7 @@ static int elf_core_dump(struct coredump
+@@ -1994,7 +2304,7 @@ static int elf_core_dump(struct coredump_params *cprm)
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
@@ -41198,7 +42287,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
phdr.p_memsz = vma->vm_end - vma->vm_start;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -2005,6 +2315,7 @@ static int elf_core_dump(struct coredump
+@@ -2005,6 +2315,7 @@ static int elf_core_dump(struct coredump_params *cprm)
phdr.p_align = ELF_EXEC_PAGESIZE;
size += sizeof(phdr);
@@ -41206,7 +42295,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
if (size > cprm->limit
|| !dump_write(cprm->file, &phdr, sizeof(phdr)))
goto end_coredump;
-@@ -2029,7 +2340,7 @@ static int elf_core_dump(struct coredump
+@@ -2029,7 +2340,7 @@ static int elf_core_dump(struct coredump_params *cprm)
unsigned long addr;
unsigned long end;
@@ -41215,7 +42304,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
struct page *page;
-@@ -2038,6 +2349,7 @@ static int elf_core_dump(struct coredump
+@@ -2038,6 +2349,7 @@ static int elf_core_dump(struct coredump_params *cprm)
page = get_dump_page(addr);
if (page) {
void *kaddr = kmap(page);
@@ -41223,7 +42312,7 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
stop = ((size += PAGE_SIZE) > cprm->limit) ||
!dump_write(cprm->file, kaddr,
PAGE_SIZE);
-@@ -2055,6 +2367,7 @@ static int elf_core_dump(struct coredump
+@@ -2055,6 +2367,7 @@ static int elf_core_dump(struct coredump_params *cprm)
if (e_phnum == PN_XNUM) {
size += sizeof(*shdr4extnum);
@@ -41329,10 +42418,11 @@ diff -urNp linux-3.1.4/fs/binfmt_elf.c linux-3.1.4/fs/binfmt_elf.c
static int __init init_elf_binfmt(void)
{
return register_binfmt(&elf_format);
-diff -urNp linux-3.1.4/fs/binfmt_flat.c linux-3.1.4/fs/binfmt_flat.c
---- linux-3.1.4/fs/binfmt_flat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/binfmt_flat.c 2011-11-16 18:39:08.000000000 -0500
-@@ -567,7 +567,9 @@ static int load_flat_file(struct linux_b
+diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
+index 1bffbe0..c8c283e 100644
+--- a/fs/binfmt_flat.c
++++ b/fs/binfmt_flat.c
+@@ -567,7 +567,9 @@ static int load_flat_file(struct linux_binprm * bprm,
realdatastart = (unsigned long) -ENOMEM;
printk("Unable to allocate RAM for process data, errno %d\n",
(int)-realdatastart);
@@ -41342,7 +42432,7 @@ diff -urNp linux-3.1.4/fs/binfmt_flat.c linux-3.1.4/fs/binfmt_flat.c
ret = realdatastart;
goto err;
}
-@@ -591,8 +593,10 @@ static int load_flat_file(struct linux_b
+@@ -591,8 +593,10 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if (IS_ERR_VALUE(result)) {
printk("Unable to read data+bss, errno %d\n", (int)-result);
@@ -41353,7 +42443,7 @@ diff -urNp linux-3.1.4/fs/binfmt_flat.c linux-3.1.4/fs/binfmt_flat.c
ret = result;
goto err;
}
-@@ -661,8 +665,10 @@ static int load_flat_file(struct linux_b
+@@ -661,8 +665,10 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if (IS_ERR_VALUE(result)) {
printk("Unable to read code+data+bss, errno %d\n",(int)-result);
@@ -41364,10 +42454,11 @@ diff -urNp linux-3.1.4/fs/binfmt_flat.c linux-3.1.4/fs/binfmt_flat.c
ret = result;
goto err;
}
-diff -urNp linux-3.1.4/fs/bio.c linux-3.1.4/fs/bio.c
---- linux-3.1.4/fs/bio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/bio.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1233,7 +1233,7 @@ static void bio_copy_kern_endio(struct b
+diff --git a/fs/bio.c b/fs/bio.c
+index 9bfade8..782f3b9 100644
+--- a/fs/bio.c
++++ b/fs/bio.c
+@@ -1233,7 +1233,7 @@ static void bio_copy_kern_endio(struct bio *bio, int err)
const int read = bio_data_dir(bio) == READ;
struct bio_map_data *bmd = bio->bi_private;
int i;
@@ -41376,10 +42467,11 @@ diff -urNp linux-3.1.4/fs/bio.c linux-3.1.4/fs/bio.c
__bio_for_each_segment(bvec, bio, i, 0) {
char *addr = page_address(bvec->bv_page);
-diff -urNp linux-3.1.4/fs/block_dev.c linux-3.1.4/fs/block_dev.c
---- linux-3.1.4/fs/block_dev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/block_dev.c 2011-11-16 18:39:08.000000000 -0500
-@@ -681,7 +681,7 @@ static bool bd_may_claim(struct block_de
+diff --git a/fs/block_dev.c b/fs/block_dev.c
+index 1c44b8d..e2507b4 100644
+--- a/fs/block_dev.c
++++ b/fs/block_dev.c
+@@ -681,7 +681,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
else if (bdev->bd_contains == bdev)
return true; /* is a whole device which isn't held */
@@ -41388,10 +42480,11 @@ diff -urNp linux-3.1.4/fs/block_dev.c linux-3.1.4/fs/block_dev.c
return true; /* is a partition of a device that is being partitioned */
else if (whole->bd_holder != NULL)
return false; /* is a partition of a held device */
-diff -urNp linux-3.1.4/fs/btrfs/ctree.c linux-3.1.4/fs/btrfs/ctree.c
---- linux-3.1.4/fs/btrfs/ctree.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/btrfs/ctree.c 2011-11-16 18:39:08.000000000 -0500
-@@ -488,9 +488,12 @@ static noinline int __btrfs_cow_block(st
+diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
+index 011cab3..9ace713 100644
+--- a/fs/btrfs/ctree.c
++++ b/fs/btrfs/ctree.c
+@@ -488,9 +488,12 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
free_extent_buffer(buf);
add_root_to_dirty_list(root);
} else {
@@ -41407,9 +42500,10 @@ diff -urNp linux-3.1.4/fs/btrfs/ctree.c linux-3.1.4/fs/btrfs/ctree.c
parent_start = 0;
WARN_ON(trans->transid != btrfs_header_generation(parent));
-diff -urNp linux-3.1.4/fs/btrfs/inode.c linux-3.1.4/fs/btrfs/inode.c
---- linux-3.1.4/fs/btrfs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/btrfs/inode.c 2011-11-17 18:12:11.000000000 -0500
+diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
+index b2d004a..6bb543d 100644
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
@@ -6922,7 +6922,7 @@ fail:
return -ENOMEM;
}
@@ -41419,7 +42513,7 @@ diff -urNp linux-3.1.4/fs/btrfs/inode.c linux-3.1.4/fs/btrfs/inode.c
struct dentry *dentry, struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
-@@ -6934,6 +6934,14 @@ static int btrfs_getattr(struct vfsmount
+@@ -6934,6 +6934,14 @@ static int btrfs_getattr(struct vfsmount *mnt,
return 0;
}
@@ -41434,10 +42528,11 @@ diff -urNp linux-3.1.4/fs/btrfs/inode.c linux-3.1.4/fs/btrfs/inode.c
/*
* If a file is moved, it will inherit the cow and compression flags of the new
* directory.
-diff -urNp linux-3.1.4/fs/btrfs/ioctl.c linux-3.1.4/fs/btrfs/ioctl.c
---- linux-3.1.4/fs/btrfs/ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/btrfs/ioctl.c 2011-11-16 18:40:29.000000000 -0500
-@@ -2704,9 +2704,12 @@ long btrfs_ioctl_space_info(struct btrfs
+diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
+index dae5dfe..6aa01b1 100644
+--- a/fs/btrfs/ioctl.c
++++ b/fs/btrfs/ioctl.c
+@@ -2704,9 +2704,12 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
for (i = 0; i < num_types; i++) {
struct btrfs_space_info *tmp;
@@ -41450,7 +42545,7 @@ diff -urNp linux-3.1.4/fs/btrfs/ioctl.c linux-3.1.4/fs/btrfs/ioctl.c
info = NULL;
rcu_read_lock();
list_for_each_entry_rcu(tmp, &root->fs_info->space_info,
-@@ -2728,15 +2731,12 @@ long btrfs_ioctl_space_info(struct btrfs
+@@ -2728,15 +2731,12 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
memcpy(dest, &space, sizeof(space));
dest++;
space_args.total_spaces++;
@@ -41467,10 +42562,11 @@ diff -urNp linux-3.1.4/fs/btrfs/ioctl.c linux-3.1.4/fs/btrfs/ioctl.c
(arg + sizeof(struct btrfs_ioctl_space_args));
if (copy_to_user(user_dest, dest_orig, alloc_size))
-diff -urNp linux-3.1.4/fs/btrfs/relocation.c linux-3.1.4/fs/btrfs/relocation.c
---- linux-3.1.4/fs/btrfs/relocation.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/btrfs/relocation.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1242,7 +1242,7 @@ static int __update_reloc_root(struct bt
+diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
+index 59bb176..be9977d 100644
+--- a/fs/btrfs/relocation.c
++++ b/fs/btrfs/relocation.c
+@@ -1242,7 +1242,7 @@ static int __update_reloc_root(struct btrfs_root *root, int del)
}
spin_unlock(&rc->reloc_root_tree.lock);
@@ -41479,10 +42575,11 @@ diff -urNp linux-3.1.4/fs/btrfs/relocation.c linux-3.1.4/fs/btrfs/relocation.c
if (!del) {
spin_lock(&rc->reloc_root_tree.lock);
-diff -urNp linux-3.1.4/fs/cachefiles/bind.c linux-3.1.4/fs/cachefiles/bind.c
---- linux-3.1.4/fs/cachefiles/bind.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/bind.c 2011-11-16 18:39:08.000000000 -0500
-@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachef
+diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c
+index 622f469..e8d2d55 100644
+--- a/fs/cachefiles/bind.c
++++ b/fs/cachefiles/bind.c
+@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
args);
/* start by checking things over */
@@ -41498,10 +42595,11 @@ diff -urNp linux-3.1.4/fs/cachefiles/bind.c linux-3.1.4/fs/cachefiles/bind.c
cache->bcull_percent < cache->brun_percent &&
cache->brun_percent < 100);
-diff -urNp linux-3.1.4/fs/cachefiles/daemon.c linux-3.1.4/fs/cachefiles/daemon.c
---- linux-3.1.4/fs/cachefiles/daemon.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/daemon.c 2011-11-16 18:39:08.000000000 -0500
-@@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(st
+diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
+index 0a1467b..6a53245 100644
+--- a/fs/cachefiles/daemon.c
++++ b/fs/cachefiles/daemon.c
+@@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(struct file *file, char __user *_buffer,
if (n > buflen)
return -EMSGSIZE;
@@ -41510,7 +42608,7 @@ diff -urNp linux-3.1.4/fs/cachefiles/daemon.c linux-3.1.4/fs/cachefiles/daemon.c
return -EFAULT;
return n;
-@@ -222,7 +222,7 @@ static ssize_t cachefiles_daemon_write(s
+@@ -222,7 +222,7 @@ static ssize_t cachefiles_daemon_write(struct file *file,
if (test_bit(CACHEFILES_DEAD, &cache->flags))
return -EIO;
@@ -41519,7 +42617,7 @@ diff -urNp linux-3.1.4/fs/cachefiles/daemon.c linux-3.1.4/fs/cachefiles/daemon.c
return -EOPNOTSUPP;
/* drag the command string into the kernel so we can parse it */
-@@ -386,7 +386,7 @@ static int cachefiles_daemon_fstop(struc
+@@ -386,7 +386,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -41528,7 +42626,7 @@ diff -urNp linux-3.1.4/fs/cachefiles/daemon.c linux-3.1.4/fs/cachefiles/daemon.c
return cachefiles_daemon_range_error(cache, args);
cache->fstop_percent = fstop;
-@@ -458,7 +458,7 @@ static int cachefiles_daemon_bstop(struc
+@@ -458,7 +458,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -41537,9 +42635,10 @@ diff -urNp linux-3.1.4/fs/cachefiles/daemon.c linux-3.1.4/fs/cachefiles/daemon.c
return cachefiles_daemon_range_error(cache, args);
cache->bstop_percent = bstop;
-diff -urNp linux-3.1.4/fs/cachefiles/internal.h linux-3.1.4/fs/cachefiles/internal.h
---- linux-3.1.4/fs/cachefiles/internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/internal.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h
+index bd6bc1b..b627b53 100644
+--- a/fs/cachefiles/internal.h
++++ b/fs/cachefiles/internal.h
@@ -57,7 +57,7 @@ struct cachefiles_cache {
wait_queue_head_t daemon_pollwq; /* poll waitqueue for daemon */
struct rb_root active_nodes; /* active nodes (can't be culled) */
@@ -41549,7 +42648,7 @@ diff -urNp linux-3.1.4/fs/cachefiles/internal.h linux-3.1.4/fs/cachefiles/intern
unsigned frun_percent; /* when to stop culling (% files) */
unsigned fcull_percent; /* when to start culling (% files) */
unsigned fstop_percent; /* when to stop allocating (% files) */
-@@ -169,19 +169,19 @@ extern int cachefiles_check_in_use(struc
+@@ -169,19 +169,19 @@ extern int cachefiles_check_in_use(struct cachefiles_cache *cache,
* proc.c
*/
#ifdef CONFIG_CACHEFILES_HISTOGRAM
@@ -41574,9 +42673,10 @@ diff -urNp linux-3.1.4/fs/cachefiles/internal.h linux-3.1.4/fs/cachefiles/intern
}
#else
-diff -urNp linux-3.1.4/fs/cachefiles/namei.c linux-3.1.4/fs/cachefiles/namei.c
---- linux-3.1.4/fs/cachefiles/namei.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/namei.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
+index a0358c2..d6137f2 100644
+--- a/fs/cachefiles/namei.c
++++ b/fs/cachefiles/namei.c
@@ -318,7 +318,7 @@ try_again:
/* first step is to make up a grave dentry in the graveyard */
sprintf(nbuffer, "%08x%08x",
@@ -41586,9 +42686,10 @@ diff -urNp linux-3.1.4/fs/cachefiles/namei.c linux-3.1.4/fs/cachefiles/namei.c
/* do the multiway lock magic */
trap = lock_rename(cache->graveyard, dir);
-diff -urNp linux-3.1.4/fs/cachefiles/proc.c linux-3.1.4/fs/cachefiles/proc.c
---- linux-3.1.4/fs/cachefiles/proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/proc.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cachefiles/proc.c b/fs/cachefiles/proc.c
+index eccd339..4c1d995 100644
+--- a/fs/cachefiles/proc.c
++++ b/fs/cachefiles/proc.c
@@ -14,9 +14,9 @@
#include <linux/seq_file.h>
#include "internal.h"
@@ -41602,7 +42703,7 @@ diff -urNp linux-3.1.4/fs/cachefiles/proc.c linux-3.1.4/fs/cachefiles/proc.c
/*
* display the latency histogram
-@@ -35,9 +35,9 @@ static int cachefiles_histogram_show(str
+@@ -35,9 +35,9 @@ static int cachefiles_histogram_show(struct seq_file *m, void *v)
return 0;
default:
index = (unsigned long) v - 3;
@@ -41615,10 +42716,11 @@ diff -urNp linux-3.1.4/fs/cachefiles/proc.c linux-3.1.4/fs/cachefiles/proc.c
if (x == 0 && y == 0 && z == 0)
return 0;
-diff -urNp linux-3.1.4/fs/cachefiles/rdwr.c linux-3.1.4/fs/cachefiles/rdwr.c
---- linux-3.1.4/fs/cachefiles/rdwr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cachefiles/rdwr.c 2011-11-16 18:39:08.000000000 -0500
-@@ -945,7 +945,7 @@ int cachefiles_write_page(struct fscache
+diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
+index 0e3c092..818480e 100644
+--- a/fs/cachefiles/rdwr.c
++++ b/fs/cachefiles/rdwr.c
+@@ -945,7 +945,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = file->f_op->write(
@@ -41627,10 +42729,11 @@ diff -urNp linux-3.1.4/fs/cachefiles/rdwr.c linux-3.1.4/fs/cachefiles/rdwr.c
set_fs(old_fs);
kunmap(page);
if (ret != len)
-diff -urNp linux-3.1.4/fs/ceph/dir.c linux-3.1.4/fs/ceph/dir.c
---- linux-3.1.4/fs/ceph/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ceph/dir.c 2011-11-16 18:39:08.000000000 -0500
-@@ -244,7 +244,7 @@ static int ceph_readdir(struct file *fil
+diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
+index 382abc9..bd89646 100644
+--- a/fs/ceph/dir.c
++++ b/fs/ceph/dir.c
+@@ -244,7 +244,7 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
struct ceph_mds_client *mdsc = fsc->mdsc;
unsigned frag = fpos_frag(filp->f_pos);
@@ -41639,10 +42742,11 @@ diff -urNp linux-3.1.4/fs/ceph/dir.c linux-3.1.4/fs/ceph/dir.c
int err;
u32 ftype;
struct ceph_mds_reply_info_parsed *rinfo;
-diff -urNp linux-3.1.4/fs/cifs/cifs_debug.c linux-3.1.4/fs/cifs/cifs_debug.c
---- linux-3.1.4/fs/cifs/cifs_debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cifs/cifs_debug.c 2011-11-16 18:39:08.000000000 -0500
-@@ -265,8 +265,8 @@ static ssize_t cifs_stats_proc_write(str
+diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
+index 6d40656..bc1f825 100644
+--- a/fs/cifs/cifs_debug.c
++++ b/fs/cifs/cifs_debug.c
+@@ -265,8 +265,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
if (c == '1' || c == 'y' || c == 'Y' || c == '0') {
#ifdef CONFIG_CIFS_STATS2
@@ -41653,7 +42757,7 @@ diff -urNp linux-3.1.4/fs/cifs/cifs_debug.c linux-3.1.4/fs/cifs/cifs_debug.c
#endif /* CONFIG_CIFS_STATS2 */
spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp1, &cifs_tcp_ses_list) {
-@@ -279,25 +279,25 @@ static ssize_t cifs_stats_proc_write(str
+@@ -279,25 +279,25 @@ static ssize_t cifs_stats_proc_write(struct file *file,
tcon = list_entry(tmp3,
struct cifs_tcon,
tcon_list);
@@ -41698,7 +42802,7 @@ diff -urNp linux-3.1.4/fs/cifs/cifs_debug.c linux-3.1.4/fs/cifs/cifs_debug.c
}
}
}
-@@ -327,8 +327,8 @@ static int cifs_stats_proc_show(struct s
+@@ -327,8 +327,8 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
smBufAllocCount.counter, cifs_min_small);
#ifdef CONFIG_CIFS_STATS2
seq_printf(m, "Total Large %d Small %d Allocations\n",
@@ -41709,7 +42813,7 @@ diff -urNp linux-3.1.4/fs/cifs/cifs_debug.c linux-3.1.4/fs/cifs/cifs_debug.c
#endif /* CONFIG_CIFS_STATS2 */
seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&midCount));
-@@ -357,41 +357,41 @@ static int cifs_stats_proc_show(struct s
+@@ -357,41 +357,41 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
if (tcon->need_reconnect)
seq_puts(m, "\tDISCONNECTED ");
seq_printf(m, "\nSMBs: %d Oplock Breaks: %d",
@@ -41771,9 +42875,10 @@ diff -urNp linux-3.1.4/fs/cifs/cifs_debug.c linux-3.1.4/fs/cifs/cifs_debug.c
}
}
}
-diff -urNp linux-3.1.4/fs/cifs/cifsfs.c linux-3.1.4/fs/cifs/cifsfs.c
---- linux-3.1.4/fs/cifs/cifsfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cifs/cifsfs.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
+index 54b8f1e..f6a4c00 100644
+--- a/fs/cifs/cifsfs.c
++++ b/fs/cifs/cifsfs.c
@@ -981,7 +981,7 @@ cifs_init_request_bufs(void)
cifs_req_cachep = kmem_cache_create("cifs_request",
CIFSMaxBufSize +
@@ -41803,9 +42908,10 @@ diff -urNp linux-3.1.4/fs/cifs/cifsfs.c linux-3.1.4/fs/cifs/cifsfs.c
#endif /* CONFIG_CIFS_STATS2 */
atomic_set(&midCount, 0);
-diff -urNp linux-3.1.4/fs/cifs/cifsglob.h linux-3.1.4/fs/cifs/cifsglob.h
---- linux-3.1.4/fs/cifs/cifsglob.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cifs/cifsglob.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
+index 95dad9d..fe7af1a 100644
+--- a/fs/cifs/cifsglob.h
++++ b/fs/cifs/cifsglob.h
@@ -381,28 +381,28 @@ struct cifs_tcon {
__u16 Flags; /* optional support bits */
enum statusEnum tidStatus;
@@ -41857,7 +42963,7 @@ diff -urNp linux-3.1.4/fs/cifs/cifsglob.h linux-3.1.4/fs/cifs/cifsglob.h
#ifdef CONFIG_CIFS_STATS2
unsigned long long time_writes;
unsigned long long time_reads;
-@@ -613,7 +613,7 @@ convert_delimiter(char *path, char delim
+@@ -613,7 +613,7 @@ convert_delimiter(char *path, char delim)
}
#ifdef CONFIG_CIFS_STATS
@@ -41866,7 +42972,7 @@ diff -urNp linux-3.1.4/fs/cifs/cifsglob.h linux-3.1.4/fs/cifs/cifsglob.h
static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
unsigned int bytes)
-@@ -953,8 +953,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnect
+@@ -953,8 +953,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
/* Various Debug counters */
GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
#ifdef CONFIG_CIFS_STATS2
@@ -41877,9 +42983,10 @@ diff -urNp linux-3.1.4/fs/cifs/cifsglob.h linux-3.1.4/fs/cifs/cifsglob.h
#endif
GLOBAL_EXTERN atomic_t smBufAllocCount;
GLOBAL_EXTERN atomic_t midCount;
-diff -urNp linux-3.1.4/fs/cifs/link.c linux-3.1.4/fs/cifs/link.c
---- linux-3.1.4/fs/cifs/link.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cifs/link.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cifs/link.c b/fs/cifs/link.c
+index db3f18c..1f5955e 100644
+--- a/fs/cifs/link.c
++++ b/fs/cifs/link.c
@@ -593,7 +593,7 @@ symlink_exit:
void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
@@ -41889,9 +42996,10 @@ diff -urNp linux-3.1.4/fs/cifs/link.c linux-3.1.4/fs/cifs/link.c
if (!IS_ERR(p))
kfree(p);
}
-diff -urNp linux-3.1.4/fs/cifs/misc.c linux-3.1.4/fs/cifs/misc.c
---- linux-3.1.4/fs/cifs/misc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/cifs/misc.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
+index 7c16933..c8212b5 100644
+--- a/fs/cifs/misc.c
++++ b/fs/cifs/misc.c
@@ -156,7 +156,7 @@ cifs_buf_get(void)
memset(ret_buf, 0, sizeof(struct smb_hdr) + 3);
atomic_inc(&bufAllocCount);
@@ -41910,9 +43018,10 @@ diff -urNp linux-3.1.4/fs/cifs/misc.c linux-3.1.4/fs/cifs/misc.c
#endif /* CONFIG_CIFS_STATS2 */
}
-diff -urNp linux-3.1.4/fs/coda/cache.c linux-3.1.4/fs/coda/cache.c
---- linux-3.1.4/fs/coda/cache.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/coda/cache.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/coda/cache.c b/fs/coda/cache.c
+index 6901578..d402eb5 100644
+--- a/fs/coda/cache.c
++++ b/fs/coda/cache.c
@@ -24,7 +24,7 @@
#include "coda_linux.h"
#include "coda_cache.h"
@@ -41922,7 +43031,7 @@ diff -urNp linux-3.1.4/fs/coda/cache.c linux-3.1.4/fs/coda/cache.c
/* replace or extend an acl cache hit */
void coda_cache_enter(struct inode *inode, int mask)
-@@ -32,7 +32,7 @@ void coda_cache_enter(struct inode *inod
+@@ -32,7 +32,7 @@ void coda_cache_enter(struct inode *inode, int mask)
struct coda_inode_info *cii = ITOC(inode);
spin_lock(&cii->c_lock);
@@ -41931,7 +43040,7 @@ diff -urNp linux-3.1.4/fs/coda/cache.c linux-3.1.4/fs/coda/cache.c
if (cii->c_uid != current_fsuid()) {
cii->c_uid = current_fsuid();
cii->c_cached_perm = mask;
-@@ -46,14 +46,14 @@ void coda_cache_clear_inode(struct inode
+@@ -46,14 +46,14 @@ void coda_cache_clear_inode(struct inode *inode)
{
struct coda_inode_info *cii = ITOC(inode);
spin_lock(&cii->c_lock);
@@ -41948,7 +43057,7 @@ diff -urNp linux-3.1.4/fs/coda/cache.c linux-3.1.4/fs/coda/cache.c
}
-@@ -66,7 +66,7 @@ int coda_cache_check(struct inode *inode
+@@ -66,7 +66,7 @@ int coda_cache_check(struct inode *inode, int mask)
spin_lock(&cii->c_lock);
hit = (mask & cii->c_cached_perm) == mask &&
cii->c_uid == current_fsuid() &&
@@ -41957,27 +43066,11 @@ diff -urNp linux-3.1.4/fs/coda/cache.c linux-3.1.4/fs/coda/cache.c
spin_unlock(&cii->c_lock);
return hit;
-diff -urNp linux-3.1.4/fs/compat_binfmt_elf.c linux-3.1.4/fs/compat_binfmt_elf.c
---- linux-3.1.4/fs/compat_binfmt_elf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/compat_binfmt_elf.c 2011-11-16 18:39:08.000000000 -0500
-@@ -30,11 +30,13 @@
- #undef elf_phdr
- #undef elf_shdr
- #undef elf_note
-+#undef elf_dyn
- #undef elf_addr_t
- #define elfhdr elf32_hdr
- #define elf_phdr elf32_phdr
- #define elf_shdr elf32_shdr
- #define elf_note elf32_note
-+#define elf_dyn Elf32_Dyn
- #define elf_addr_t Elf32_Addr
-
- /*
-diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
---- linux-3.1.4/fs/compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/compat.c 2011-11-16 18:40:29.000000000 -0500
-@@ -133,8 +133,8 @@ asmlinkage long compat_sys_utimes(const
+diff --git a/fs/compat.c b/fs/compat.c
+index 58b1da4..afcd9b8 100644
+--- a/fs/compat.c
++++ b/fs/compat.c
+@@ -133,8 +133,8 @@ asmlinkage long compat_sys_utimes(const char __user *filename, struct compat_tim
static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
{
compat_ino_t ino = stat->ino;
@@ -41988,7 +43081,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
int err;
SET_UID(uid, stat->uid);
-@@ -508,7 +508,7 @@ compat_sys_io_setup(unsigned nr_reqs, u3
+@@ -508,7 +508,7 @@ compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p)
set_fs(KERNEL_DS);
/* The __user pointer cast is valid because of the set_fs() */
@@ -41997,7 +43090,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
set_fs(oldfs);
/* truncating is ok because it's a user address */
if (!ret)
-@@ -566,7 +566,7 @@ ssize_t compat_rw_copy_check_uvector(int
+@@ -566,7 +566,7 @@ ssize_t compat_rw_copy_check_uvector(int type,
goto out;
ret = -EINVAL;
@@ -42014,7 +43107,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
int result;
};
-@@ -865,6 +866,10 @@ static int compat_fillonedir(void *__buf
+@@ -865,6 +866,10 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen,
buf->result = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -42025,7 +43118,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
buf->result++;
dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, dirent,
-@@ -897,6 +902,7 @@ asmlinkage long compat_sys_old_readdir(u
+@@ -897,6 +902,7 @@ asmlinkage long compat_sys_old_readdir(unsigned int fd,
buf.result = 0;
buf.dirent = dirent;
@@ -42041,7 +43134,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
int count;
int error;
};
-@@ -938,6 +945,10 @@ static int compat_filldir(void *__buf, c
+@@ -938,6 +945,10 @@ static int compat_filldir(void *__buf, const char *name, int namlen,
buf->error = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -42052,7 +43145,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -985,6 +996,7 @@ asmlinkage long compat_sys_getdents(unsi
+@@ -985,6 +996,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -42068,7 +43161,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
int count;
int error;
};
-@@ -1022,6 +1035,10 @@ static int compat_filldir64(void * __buf
+@@ -1022,6 +1035,10 @@ static int compat_filldir64(void * __buf, const char * name, int namlen, loff_t
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
@@ -42079,7 +43172,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
dirent = buf->previous;
if (dirent) {
-@@ -1073,13 +1090,14 @@ asmlinkage long compat_sys_getdents64(un
+@@ -1073,13 +1090,14 @@ asmlinkage long compat_sys_getdents64(unsigned int fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -42095,7 +43188,7 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
if (__put_user_unaligned(d_off, &lastdirent->d_off))
error = -EFAULT;
else
-@@ -1446,6 +1464,8 @@ int compat_core_sys_select(int n, compat
+@@ -1446,6 +1464,8 @@ int compat_core_sys_select(int n, compat_ulong_t __user *inp,
struct fdtable *fdt;
long stack_fds[SELECT_STACK_ALLOC/sizeof(long)];
@@ -42104,10 +43197,29 @@ diff -urNp linux-3.1.4/fs/compat.c linux-3.1.4/fs/compat.c
if (n < 0)
goto out_nofds;
-diff -urNp linux-3.1.4/fs/compat_ioctl.c linux-3.1.4/fs/compat_ioctl.c
---- linux-3.1.4/fs/compat_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/compat_ioctl.c 2011-11-16 18:39:08.000000000 -0500
-@@ -210,6 +210,8 @@ static int do_video_set_spu_palette(unsi
+diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
+index 112e45a..b59845b 100644
+--- a/fs/compat_binfmt_elf.c
++++ b/fs/compat_binfmt_elf.c
+@@ -30,11 +30,13 @@
+ #undef elf_phdr
+ #undef elf_shdr
+ #undef elf_note
++#undef elf_dyn
+ #undef elf_addr_t
+ #define elfhdr elf32_hdr
+ #define elf_phdr elf32_phdr
+ #define elf_shdr elf32_shdr
+ #define elf_note elf32_note
++#define elf_dyn Elf32_Dyn
+ #define elf_addr_t Elf32_Addr
+
+ /*
+diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
+index 51352de..93292ff 100644
+--- a/fs/compat_ioctl.c
++++ b/fs/compat_ioctl.c
+@@ -210,6 +210,8 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
err = get_user(palp, &up->palette);
err |= get_user(length, &up->length);
@@ -42116,7 +43228,7 @@ diff -urNp linux-3.1.4/fs/compat_ioctl.c linux-3.1.4/fs/compat_ioctl.c
up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
err = put_user(compat_ptr(palp), &up_native->palette);
-@@ -621,7 +623,7 @@ static int serial_struct_ioctl(unsigned
+@@ -621,7 +623,7 @@ static int serial_struct_ioctl(unsigned fd, unsigned cmd,
return -EFAULT;
if (__get_user(udata, &ss32->iomem_base))
return -EFAULT;
@@ -42125,7 +43237,7 @@ diff -urNp linux-3.1.4/fs/compat_ioctl.c linux-3.1.4/fs/compat_ioctl.c
if (__get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
__get_user(ss.port_high, &ss32->port_high))
return -EFAULT;
-@@ -796,7 +798,7 @@ static int compat_ioctl_preallocate(stru
+@@ -796,7 +798,7 @@ static int compat_ioctl_preallocate(struct file *file,
copy_in_user(&p->l_len, &p32->l_len, sizeof(s64)) ||
copy_in_user(&p->l_sysid, &p32->l_sysid, sizeof(s32)) ||
copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) ||
@@ -42134,7 +43246,7 @@ diff -urNp linux-3.1.4/fs/compat_ioctl.c linux-3.1.4/fs/compat_ioctl.c
return -EFAULT;
return ioctl_preallocate(file, p);
-@@ -1644,8 +1646,8 @@ asmlinkage long compat_sys_ioctl(unsigne
+@@ -1644,8 +1646,8 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
static int __init init_sys32_ioctl_cmp(const void *p, const void *q)
{
unsigned int a, b;
@@ -42145,10 +43257,11 @@ diff -urNp linux-3.1.4/fs/compat_ioctl.c linux-3.1.4/fs/compat_ioctl.c
if (a > b)
return 1;
if (a < b)
-diff -urNp linux-3.1.4/fs/configfs/dir.c linux-3.1.4/fs/configfs/dir.c
---- linux-3.1.4/fs/configfs/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/configfs/dir.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1575,7 +1575,8 @@ static int configfs_readdir(struct file
+diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
+index 9a37a9b..35792b6 100644
+--- a/fs/configfs/dir.c
++++ b/fs/configfs/dir.c
+@@ -1575,7 +1575,8 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
}
for (p=q->next; p!= &parent_sd->s_children; p=p->next) {
struct configfs_dirent *next;
@@ -42158,7 +43271,7 @@ diff -urNp linux-3.1.4/fs/configfs/dir.c linux-3.1.4/fs/configfs/dir.c
int len;
struct inode *inode = NULL;
-@@ -1585,7 +1586,12 @@ static int configfs_readdir(struct file
+@@ -1585,7 +1586,12 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir
continue;
name = configfs_get_name(next);
@@ -42172,10 +43285,11 @@ diff -urNp linux-3.1.4/fs/configfs/dir.c linux-3.1.4/fs/configfs/dir.c
/*
* We'll have a dentry and an inode for
-diff -urNp linux-3.1.4/fs/dcache.c linux-3.1.4/fs/dcache.c
---- linux-3.1.4/fs/dcache.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/dcache.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2998,7 +2998,7 @@ void __init vfs_caches_init(unsigned lon
+diff --git a/fs/dcache.c b/fs/dcache.c
+index a88948b..1e32160 100644
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -2998,7 +2998,7 @@ void __init vfs_caches_init(unsigned long mempages)
mempages -= reserve;
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
@@ -42184,10 +43298,11 @@ diff -urNp linux-3.1.4/fs/dcache.c linux-3.1.4/fs/dcache.c
dcache_init();
inode_init();
-diff -urNp linux-3.1.4/fs/ecryptfs/inode.c linux-3.1.4/fs/ecryptfs/inode.c
---- linux-3.1.4/fs/ecryptfs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ecryptfs/inode.c 2011-11-16 18:39:08.000000000 -0500
-@@ -681,7 +681,7 @@ static int ecryptfs_readlink_lower(struc
+diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
+index 11f8582..7b633bd 100644
+--- a/fs/ecryptfs/inode.c
++++ b/fs/ecryptfs/inode.c
+@@ -681,7 +681,7 @@ static int ecryptfs_readlink_lower(struct dentry *dentry, char **buf,
old_fs = get_fs();
set_fs(get_ds());
rc = lower_dentry->d_inode->i_op->readlink(lower_dentry,
@@ -42196,7 +43311,7 @@ diff -urNp linux-3.1.4/fs/ecryptfs/inode.c linux-3.1.4/fs/ecryptfs/inode.c
lower_bufsiz);
set_fs(old_fs);
if (rc < 0)
-@@ -727,7 +727,7 @@ static void *ecryptfs_follow_link(struct
+@@ -727,7 +727,7 @@ static void *ecryptfs_follow_link(struct dentry *dentry, struct nameidata *nd)
}
old_fs = get_fs();
set_fs(get_ds());
@@ -42214,9 +43329,10 @@ diff -urNp linux-3.1.4/fs/ecryptfs/inode.c linux-3.1.4/fs/ecryptfs/inode.c
if (!IS_ERR(buf)) {
/* Free the char* */
kfree(buf);
-diff -urNp linux-3.1.4/fs/ecryptfs/miscdev.c linux-3.1.4/fs/ecryptfs/miscdev.c
---- linux-3.1.4/fs/ecryptfs/miscdev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ecryptfs/miscdev.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
+index 940a82e..63af89e 100644
+--- a/fs/ecryptfs/miscdev.c
++++ b/fs/ecryptfs/miscdev.c
@@ -328,7 +328,7 @@ check_list:
goto out_unlock_msg_ctx;
i = 5;
@@ -42226,10 +43342,11 @@ diff -urNp linux-3.1.4/fs/ecryptfs/miscdev.c linux-3.1.4/fs/ecryptfs/miscdev.c
goto out_unlock_msg_ctx;
i += packet_length_size;
if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
-diff -urNp linux-3.1.4/fs/ecryptfs/read_write.c linux-3.1.4/fs/ecryptfs/read_write.c
---- linux-3.1.4/fs/ecryptfs/read_write.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ecryptfs/read_write.c 2011-11-16 18:39:08.000000000 -0500
-@@ -48,7 +48,7 @@ int ecryptfs_write_lower(struct inode *e
+diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
+index 3745f7c..89cc7a3 100644
+--- a/fs/ecryptfs/read_write.c
++++ b/fs/ecryptfs/read_write.c
+@@ -48,7 +48,7 @@ int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
return -EIO;
fs_save = get_fs();
set_fs(get_ds());
@@ -42238,7 +43355,7 @@ diff -urNp linux-3.1.4/fs/ecryptfs/read_write.c linux-3.1.4/fs/ecryptfs/read_wri
set_fs(fs_save);
mark_inode_dirty_sync(ecryptfs_inode);
return rc;
-@@ -235,7 +235,7 @@ int ecryptfs_read_lower(char *data, loff
+@@ -235,7 +235,7 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
return -EIO;
fs_save = get_fs();
set_fs(get_ds());
@@ -42247,9 +43364,10 @@ diff -urNp linux-3.1.4/fs/ecryptfs/read_write.c linux-3.1.4/fs/ecryptfs/read_wri
set_fs(fs_save);
return rc;
}
-diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
---- linux-3.1.4/fs/exec.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/exec.c 2011-11-17 18:40:47.000000000 -0500
+diff --git a/fs/exec.c b/fs/exec.c
+index 25dcbe5..4ffaa78 100644
+--- a/fs/exec.c
++++ b/fs/exec.c
@@ -55,12 +55,24 @@
#include <linux/pipe_fs_i.h>
#include <linux/oom.h>
@@ -42284,7 +43402,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/* The maximal length of core_pattern is also specified in sysctl.c */
-@@ -188,18 +200,10 @@ static struct page *get_arg_page(struct
+@@ -188,18 +200,10 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
int write)
{
struct page *page;
@@ -42306,7 +43424,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
return NULL;
if (write) {
-@@ -274,6 +278,11 @@ static int __bprm_mm_init(struct linux_b
+@@ -274,6 +278,11 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
vma->vm_end = STACK_TOP_MAX;
vma->vm_start = vma->vm_end - PAGE_SIZE;
vma->vm_flags = VM_STACK_FLAGS | VM_STACK_INCOMPLETE_SETUP;
@@ -42318,7 +43436,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
INIT_LIST_HEAD(&vma->anon_vma_chain);
-@@ -288,6 +297,12 @@ static int __bprm_mm_init(struct linux_b
+@@ -288,6 +297,12 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
mm->stack_vm = mm->total_vm = 1;
up_write(&mm->mmap_sem);
bprm->p = vma->vm_end - sizeof(void *);
@@ -42352,7 +43470,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
{
const char __user *native;
-@@ -417,14 +420,14 @@ static const char __user *get_user_arg_p
+@@ -417,14 +420,14 @@ static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
compat_uptr_t compat;
if (get_user(compat, argv.ptr.compat + nr))
@@ -42369,7 +43487,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
return native;
}
-@@ -443,7 +446,7 @@ static int count(struct user_arg_ptr arg
+@@ -443,7 +446,7 @@ static int count(struct user_arg_ptr argv, int max)
if (!p)
break;
@@ -42378,7 +43496,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
return -EFAULT;
if (i++ >= max)
-@@ -477,7 +480,7 @@ static int copy_strings(int argc, struct
+@@ -477,7 +480,7 @@ static int copy_strings(int argc, struct user_arg_ptr argv,
ret = -EFAULT;
str = get_user_arg_ptr(argv, argc);
@@ -42387,7 +43505,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
goto out;
len = strnlen_user(str, MAX_ARG_STRLEN);
-@@ -559,7 +562,7 @@ int copy_strings_kernel(int argc, const
+@@ -559,7 +562,7 @@ int copy_strings_kernel(int argc, const char *const *__argv,
int r;
mm_segment_t oldfs = get_fs();
struct user_arg_ptr argv = {
@@ -42396,7 +43514,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
};
set_fs(KERNEL_DS);
-@@ -594,7 +597,8 @@ static int shift_arg_pages(struct vm_are
+@@ -594,7 +597,8 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
unsigned long new_end = old_end - shift;
struct mmu_gather tlb;
@@ -42406,7 +43524,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/*
* ensure there are no vmas between where we want to go
-@@ -603,6 +607,10 @@ static int shift_arg_pages(struct vm_are
+@@ -603,6 +607,10 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
if (vma != find_vma(mm, new_start))
return -EFAULT;
@@ -42417,7 +43535,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/*
* cover the whole range: [new_start, old_end)
*/
-@@ -683,10 +691,6 @@ int setup_arg_pages(struct linux_binprm
+@@ -683,10 +691,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
stack_top = arch_align_stack(stack_top);
stack_top = PAGE_ALIGN(stack_top);
@@ -42428,7 +43546,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
stack_shift = vma->vm_end - stack_top;
bprm->p -= stack_shift;
-@@ -698,8 +702,28 @@ int setup_arg_pages(struct linux_binprm
+@@ -698,8 +702,28 @@ int setup_arg_pages(struct linux_binprm *bprm,
bprm->exec -= stack_shift;
down_write(&mm->mmap_sem);
@@ -42457,7 +43575,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/*
* Adjust stack execute permissions; explicitly enable for
* EXSTACK_ENABLE_X, disable for EXSTACK_DISABLE_X and leave alone
-@@ -718,13 +742,6 @@ int setup_arg_pages(struct linux_binprm
+@@ -718,13 +742,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
goto out_unlock;
BUG_ON(prev != vma);
@@ -42471,7 +43589,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/* mprotect_fixup is overkill to remove the temporary stack flags */
vma->vm_flags &= ~VM_STACK_INCOMPLETE_SETUP;
-@@ -805,7 +822,7 @@ int kernel_read(struct file *file, loff_
+@@ -805,7 +822,7 @@ int kernel_read(struct file *file, loff_t offset,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -42480,7 +43598,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
set_fs(old_fs);
return result;
}
-@@ -1251,7 +1268,7 @@ int check_unsafe_exec(struct linux_binpr
+@@ -1251,7 +1268,7 @@ int check_unsafe_exec(struct linux_binprm *bprm)
}
rcu_read_unlock();
@@ -42489,7 +43607,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
bprm->unsafe |= LSM_UNSAFE_SHARE;
} else {
res = -EAGAIN;
-@@ -1454,6 +1471,11 @@ static int do_execve_common(const char *
+@@ -1454,6 +1471,11 @@ static int do_execve_common(const char *filename,
struct user_arg_ptr envp,
struct pt_regs *regs)
{
@@ -42501,7 +43619,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
-@@ -1461,6 +1483,8 @@ static int do_execve_common(const char *
+@@ -1461,6 +1483,8 @@ static int do_execve_common(const char *filename,
int retval;
const struct cred *cred = current_cred();
@@ -42510,7 +43628,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/*
* We move the actual failure in case of RLIMIT_NPROC excess from
* set*uid() to execve() because too many poorly written programs
-@@ -1507,6 +1531,16 @@ static int do_execve_common(const char *
+@@ -1507,6 +1531,16 @@ static int do_execve_common(const char *filename,
bprm->filename = filename;
bprm->interp = filename;
@@ -42527,7 +43645,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
retval = bprm_mm_init(bprm);
if (retval)
goto out_file;
-@@ -1536,9 +1570,40 @@ static int do_execve_common(const char *
+@@ -1536,9 +1570,40 @@ static int do_execve_common(const char *filename,
if (retval < 0)
goto out;
@@ -42569,7 +43687,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
/* execve succeeded */
current->fs->in_exec = 0;
-@@ -1549,6 +1614,14 @@ static int do_execve_common(const char *
+@@ -1549,6 +1614,14 @@ static int do_execve_common(const char *filename,
put_files_struct(displaced);
return retval;
@@ -42584,7 +43702,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
out:
if (bprm->mm) {
acct_arg_size(bprm, 0);
-@@ -1622,7 +1695,7 @@ static int expand_corename(struct core_n
+@@ -1622,7 +1695,7 @@ static int expand_corename(struct core_name *cn)
{
char *old_corename = cn->corename;
@@ -42593,7 +43711,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
cn->corename = krealloc(old_corename, cn->size, GFP_KERNEL);
if (!cn->corename) {
-@@ -1719,7 +1792,7 @@ static int format_corename(struct core_n
+@@ -1719,7 +1792,7 @@ static int format_corename(struct core_name *cn, long signr)
int pid_in_pattern = 0;
int err = 0;
@@ -42821,7 +43939,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
static int zap_process(struct task_struct *start, int exit_code)
{
struct task_struct *t;
-@@ -2027,17 +2312,17 @@ static void wait_for_dump_helpers(struct
+@@ -2027,17 +2312,17 @@ static void wait_for_dump_helpers(struct file *file)
pipe = file->f_path.dentry->d_inode->i_pipe;
pipe_lock(pipe);
@@ -42844,7 +43962,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
pipe_unlock(pipe);
}
-@@ -2098,7 +2383,7 @@ void do_coredump(long signr, int exit_co
+@@ -2098,7 +2383,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
int retval = 0;
int flag = 0;
int ispipe;
@@ -42853,7 +43971,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
struct coredump_params cprm = {
.signr = signr,
.regs = regs,
-@@ -2113,6 +2398,9 @@ void do_coredump(long signr, int exit_co
+@@ -2113,6 +2398,9 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
audit_core_dumps(signr);
@@ -42863,7 +43981,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
binfmt = mm->binfmt;
if (!binfmt || !binfmt->core_dump)
goto fail;
-@@ -2180,7 +2468,7 @@ void do_coredump(long signr, int exit_co
+@@ -2180,7 +2468,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
}
cprm.limit = RLIM_INFINITY;
@@ -42872,7 +43990,7 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
if (core_pipe_limit && (core_pipe_limit < dump_count)) {
printk(KERN_WARNING "Pid %d(%s) over core_pipe_limit\n",
task_tgid_vnr(current), current->comm);
-@@ -2207,6 +2495,8 @@ void do_coredump(long signr, int exit_co
+@@ -2207,6 +2495,8 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
} else {
struct inode *inode;
@@ -42899,10 +44017,11 @@ diff -urNp linux-3.1.4/fs/exec.c linux-3.1.4/fs/exec.c
}
EXPORT_SYMBOL(dump_write);
-diff -urNp linux-3.1.4/fs/ext2/balloc.c linux-3.1.4/fs/ext2/balloc.c
---- linux-3.1.4/fs/ext2/balloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext2/balloc.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct e
+diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
+index 8f44cef..cb07120 100644
+--- a/fs/ext2/balloc.c
++++ b/fs/ext2/balloc.c
+@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct ext2_sb_info *sbi)
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -42911,10 +44030,11 @@ diff -urNp linux-3.1.4/fs/ext2/balloc.c linux-3.1.4/fs/ext2/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-3.1.4/fs/ext3/balloc.c linux-3.1.4/fs/ext3/balloc.c
---- linux-3.1.4/fs/ext3/balloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext3/balloc.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1446,7 +1446,7 @@ static int ext3_has_free_blocks(struct e
+diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
+index 6386d76..0a266b1 100644
+--- a/fs/ext3/balloc.c
++++ b/fs/ext3/balloc.c
+@@ -1446,7 +1446,7 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -42923,10 +44043,11 @@ diff -urNp linux-3.1.4/fs/ext3/balloc.c linux-3.1.4/fs/ext3/balloc.c
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-3.1.4/fs/ext4/balloc.c linux-3.1.4/fs/ext4/balloc.c
---- linux-3.1.4/fs/ext4/balloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext4/balloc.c 2011-11-16 18:40:29.000000000 -0500
-@@ -394,8 +394,8 @@ static int ext4_has_free_blocks(struct e
+diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
+index f8224ad..fbef97c 100644
+--- a/fs/ext4/balloc.c
++++ b/fs/ext4/balloc.c
+@@ -394,8 +394,8 @@ static int ext4_has_free_blocks(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved blocks available? */
if (sbi->s_resuid == current_fsuid() ||
((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
@@ -42937,9 +44058,10 @@ diff -urNp linux-3.1.4/fs/ext4/balloc.c linux-3.1.4/fs/ext4/balloc.c
if (free_blocks >= (nblocks + dirty_blocks))
return 1;
-diff -urNp linux-3.1.4/fs/ext4/ext4.h linux-3.1.4/fs/ext4/ext4.h
---- linux-3.1.4/fs/ext4/ext4.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext4/ext4.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
+index 5c38120..2291d18 100644
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
@@ -1180,19 +1180,19 @@ struct ext4_sb_info {
unsigned long s_mb_last_start;
@@ -42970,10 +44092,11 @@ diff -urNp linux-3.1.4/fs/ext4/ext4.h linux-3.1.4/fs/ext4/ext4.h
atomic_t s_lock_busy;
/* locality groups */
-diff -urNp linux-3.1.4/fs/ext4/file.c linux-3.1.4/fs/ext4/file.c
---- linux-3.1.4/fs/ext4/file.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext4/file.c 2011-11-16 18:40:29.000000000 -0500
-@@ -181,8 +181,8 @@ static int ext4_file_open(struct inode *
+diff --git a/fs/ext4/file.c b/fs/ext4/file.c
+index e4095e9..1c006c5 100644
+--- a/fs/ext4/file.c
++++ b/fs/ext4/file.c
+@@ -181,8 +181,8 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
path.dentry = mnt->mnt_root;
cp = d_path(&path, buf, sizeof(buf));
if (!IS_ERR(cp)) {
@@ -42984,9 +44107,10 @@ diff -urNp linux-3.1.4/fs/ext4/file.c linux-3.1.4/fs/ext4/file.c
ext4_mark_super_dirty(sb);
}
}
-diff -urNp linux-3.1.4/fs/ext4/ioctl.c linux-3.1.4/fs/ext4/ioctl.c
---- linux-3.1.4/fs/ext4/ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext4/ioctl.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
+index f18bfe3..43759b1 100644
+--- a/fs/ext4/ioctl.c
++++ b/fs/ext4/ioctl.c
@@ -348,7 +348,7 @@ mext_out:
if (!blk_queue_discard(q))
return -EOPNOTSUPP;
@@ -43005,10 +44129,11 @@ diff -urNp linux-3.1.4/fs/ext4/ioctl.c linux-3.1.4/fs/ext4/ioctl.c
sizeof(range)))
return -EFAULT;
-diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
---- linux-3.1.4/fs/ext4/mballoc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ext4/mballoc.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1795,7 +1795,7 @@ void ext4_mb_simple_scan_group(struct ex
+diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
+index 17a5a57..b6be3c5 100644
+--- a/fs/ext4/mballoc.c
++++ b/fs/ext4/mballoc.c
+@@ -1795,7 +1795,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
BUG_ON(ac->ac_b_ex.fe_len != ac->ac_g_ex.fe_len);
if (EXT4_SB(sb)->s_mb_stats)
@@ -43026,7 +44151,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
goto repeat;
}
}
-@@ -2132,6 +2132,8 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2132,6 +2132,8 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
ext4_grpblk_t counters[16];
} sg;
@@ -43035,7 +44160,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
group--;
if (group == 0)
seq_printf(seq, "#%-5s: %-5s %-5s %-5s "
-@@ -2573,25 +2575,25 @@ int ext4_mb_release(struct super_block *
+@@ -2573,25 +2575,25 @@ int ext4_mb_release(struct super_block *sb)
if (sbi->s_mb_stats) {
ext4_msg(sb, KERN_INFO,
"mballoc: %u blocks %u reqs (%u success)",
@@ -43071,7 +44196,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
}
free_percpu(sbi->s_locality_groups);
-@@ -3070,16 +3072,16 @@ static void ext4_mb_collect_stats(struct
+@@ -3070,16 +3072,16 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) {
@@ -43094,7 +44219,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
}
if (ac->ac_op == EXT4_MB_HISTORY_ALLOC)
-@@ -3477,7 +3479,7 @@ ext4_mb_new_inode_pa(struct ext4_allocat
+@@ -3477,7 +3479,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
trace_ext4_mb_new_inode_pa(ac, pa);
ext4_mb_use_inode_pa(ac, pa);
@@ -43103,7 +44228,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
ei = EXT4_I(ac->ac_inode);
grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
-@@ -3537,7 +3539,7 @@ ext4_mb_new_group_pa(struct ext4_allocat
+@@ -3537,7 +3539,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac)
trace_ext4_mb_new_group_pa(ac, pa);
ext4_mb_use_group_pa(ac, pa);
@@ -43112,7 +44237,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
grp = ext4_get_group_info(sb, ac->ac_b_ex.fe_group);
lg = ac->ac_lg;
-@@ -3625,7 +3627,7 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3625,7 +3627,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
* from the bitmap and continue.
*/
}
@@ -43121,7 +44246,7 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
return err;
}
-@@ -3643,7 +3645,7 @@ ext4_mb_release_group_pa(struct ext4_bud
+@@ -3643,7 +3645,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
@@ -43130,10 +44255,11 @@ diff -urNp linux-3.1.4/fs/ext4/mballoc.c linux-3.1.4/fs/ext4/mballoc.c
trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len);
return 0;
-diff -urNp linux-3.1.4/fs/fcntl.c linux-3.1.4/fs/fcntl.c
---- linux-3.1.4/fs/fcntl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fcntl.c 2011-11-16 23:40:25.000000000 -0500
-@@ -224,6 +224,11 @@ int __f_setown(struct file *filp, struct
+diff --git a/fs/fcntl.c b/fs/fcntl.c
+index 22764c7..86372c9 100644
+--- a/fs/fcntl.c
++++ b/fs/fcntl.c
+@@ -224,6 +224,11 @@ int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
if (err)
return err;
@@ -43154,7 +44280,7 @@ diff -urNp linux-3.1.4/fs/fcntl.c linux-3.1.4/fs/fcntl.c
struct f_owner_ex owner;
struct pid *pid;
int type;
-@@ -306,7 +311,7 @@ static int f_setown_ex(struct file *filp
+@@ -306,7 +311,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg)
static int f_getown_ex(struct file *filp, unsigned long arg)
{
@@ -43163,7 +44289,7 @@ diff -urNp linux-3.1.4/fs/fcntl.c linux-3.1.4/fs/fcntl.c
struct f_owner_ex owner;
int ret = 0;
-@@ -348,6 +353,7 @@ static long do_fcntl(int fd, unsigned in
+@@ -348,6 +353,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
switch (cmd) {
case F_DUPFD:
case F_DUPFD_CLOEXEC:
@@ -43171,10 +44297,11 @@ diff -urNp linux-3.1.4/fs/fcntl.c linux-3.1.4/fs/fcntl.c
if (arg >= rlimit(RLIMIT_NOFILE))
break;
err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0);
-diff -urNp linux-3.1.4/fs/fifo.c linux-3.1.4/fs/fifo.c
---- linux-3.1.4/fs/fifo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fifo.c 2011-11-16 18:39:08.000000000 -0500
-@@ -58,10 +58,10 @@ static int fifo_open(struct inode *inode
+diff --git a/fs/fifo.c b/fs/fifo.c
+index b1a524d..4ee270e 100644
+--- a/fs/fifo.c
++++ b/fs/fifo.c
+@@ -58,10 +58,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
*/
filp->f_op = &read_pipefifo_fops;
pipe->r_counter++;
@@ -43187,7 +44314,7 @@ diff -urNp linux-3.1.4/fs/fifo.c linux-3.1.4/fs/fifo.c
if ((filp->f_flags & O_NONBLOCK)) {
/* suppress POLLHUP until we have
* seen a writer */
-@@ -81,15 +81,15 @@ static int fifo_open(struct inode *inode
+@@ -81,15 +81,15 @@ static int fifo_open(struct inode *inode, struct file *filp)
* errno=ENXIO when there is no process reading the FIFO.
*/
ret = -ENXIO;
@@ -43206,7 +44333,7 @@ diff -urNp linux-3.1.4/fs/fifo.c linux-3.1.4/fs/fifo.c
wait_for_partner(inode, &pipe->r_counter);
if (signal_pending(current))
goto err_wr;
-@@ -105,11 +105,11 @@ static int fifo_open(struct inode *inode
+@@ -105,11 +105,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
*/
filp->f_op = &rdwr_pipefifo_fops;
@@ -43221,7 +44348,7 @@ diff -urNp linux-3.1.4/fs/fifo.c linux-3.1.4/fs/fifo.c
wake_up_partner(inode);
break;
-@@ -123,19 +123,19 @@ static int fifo_open(struct inode *inode
+@@ -123,19 +123,19 @@ static int fifo_open(struct inode *inode, struct file *filp)
return 0;
err_rd:
@@ -43244,9 +44371,10 @@ diff -urNp linux-3.1.4/fs/fifo.c linux-3.1.4/fs/fifo.c
free_pipe_info(inode);
err_nocleanup:
-diff -urNp linux-3.1.4/fs/file.c linux-3.1.4/fs/file.c
---- linux-3.1.4/fs/file.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/file.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/file.c b/fs/file.c
+index 4c6992d..104cdea 100644
+--- a/fs/file.c
++++ b/fs/file.c
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -43255,7 +44383,7 @@ diff -urNp linux-3.1.4/fs/file.c linux-3.1.4/fs/file.c
#include <linux/fdtable.h>
#include <linux/bitops.h>
#include <linux/interrupt.h>
-@@ -254,6 +255,7 @@ int expand_files(struct files_struct *fi
+@@ -254,6 +255,7 @@ int expand_files(struct files_struct *files, int nr)
* N.B. For clone tasks sharing a files structure, this test
* will limit the total number of files that can be opened.
*/
@@ -43263,10 +44391,11 @@ diff -urNp linux-3.1.4/fs/file.c linux-3.1.4/fs/file.c
if (nr >= rlimit(RLIMIT_NOFILE))
return -EMFILE;
-diff -urNp linux-3.1.4/fs/filesystems.c linux-3.1.4/fs/filesystems.c
---- linux-3.1.4/fs/filesystems.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/filesystems.c 2011-11-16 18:40:29.000000000 -0500
-@@ -274,7 +274,12 @@ struct file_system_type *get_fs_type(con
+diff --git a/fs/filesystems.c b/fs/filesystems.c
+index 0845f84..7b4ebef 100644
+--- a/fs/filesystems.c
++++ b/fs/filesystems.c
+@@ -274,7 +274,12 @@ struct file_system_type *get_fs_type(const char *name)
int len = dot ? dot - name : strlen(name);
fs = __get_fs_type(name, len);
@@ -43279,10 +44408,104 @@ diff -urNp linux-3.1.4/fs/filesystems.c linux-3.1.4/fs/filesystems.c
fs = __get_fs_type(name, len);
if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
-diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
---- linux-3.1.4/fs/fscache/cookie.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/cookie.c 2011-11-16 18:39:08.000000000 -0500
-@@ -68,11 +68,11 @@ struct fscache_cookie *__fscache_acquire
+diff --git a/fs/fs_struct.c b/fs/fs_struct.c
+index 78b519c..212c0d0 100644
+--- a/fs/fs_struct.c
++++ b/fs/fs_struct.c
+@@ -4,6 +4,7 @@
+ #include <linux/path.h>
+ #include <linux/slab.h>
+ #include <linux/fs_struct.h>
++#include <linux/grsecurity.h>
+ #include "internal.h"
+
+ static inline void path_get_longterm(struct path *path)
+@@ -31,6 +32,7 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
+ old_root = fs->root;
+ fs->root = *path;
+ path_get_longterm(path);
++ gr_set_chroot_entries(current, path);
+ write_seqcount_end(&fs->seq);
+ spin_unlock(&fs->lock);
+ if (old_root.dentry)
+@@ -74,6 +76,7 @@ void chroot_fs_refs(struct path *old_root, struct path *new_root)
+ && fs->root.mnt == old_root->mnt) {
+ path_get_longterm(new_root);
+ fs->root = *new_root;
++ gr_set_chroot_entries(p, new_root);
+ count++;
+ }
+ if (fs->pwd.dentry == old_root->dentry
+@@ -109,7 +112,8 @@ void exit_fs(struct task_struct *tsk)
+ spin_lock(&fs->lock);
+ write_seqcount_begin(&fs->seq);
+ tsk->fs = NULL;
+- kill = !--fs->users;
++ gr_clear_chroot_entries(tsk);
++ kill = !atomic_dec_return(&fs->users);
+ write_seqcount_end(&fs->seq);
+ spin_unlock(&fs->lock);
+ task_unlock(tsk);
+@@ -123,7 +127,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
+ struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
+ /* We don't need to lock fs - think why ;-) */
+ if (fs) {
+- fs->users = 1;
++ atomic_set(&fs->users, 1);
+ fs->in_exec = 0;
+ spin_lock_init(&fs->lock);
+ seqcount_init(&fs->seq);
+@@ -132,6 +136,9 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
+ spin_lock(&old->lock);
+ fs->root = old->root;
+ path_get_longterm(&fs->root);
++ /* instead of calling gr_set_chroot_entries here,
++ we call it from every caller of this function
++ */
+ fs->pwd = old->pwd;
+ path_get_longterm(&fs->pwd);
+ spin_unlock(&old->lock);
+@@ -150,8 +157,9 @@ int unshare_fs_struct(void)
+
+ task_lock(current);
+ spin_lock(&fs->lock);
+- kill = !--fs->users;
++ kill = !atomic_dec_return(&fs->users);
+ current->fs = new_fs;
++ gr_set_chroot_entries(current, &new_fs->root);
+ spin_unlock(&fs->lock);
+ task_unlock(current);
+
+@@ -170,7 +178,7 @@ EXPORT_SYMBOL(current_umask);
+
+ /* to be mentioned only in INIT_TASK */
+ struct fs_struct init_fs = {
+- .users = 1,
++ .users = ATOMIC_INIT(1),
+ .lock = __SPIN_LOCK_UNLOCKED(init_fs.lock),
+ .seq = SEQCNT_ZERO,
+ .umask = 0022,
+@@ -186,12 +194,13 @@ void daemonize_fs_struct(void)
+ task_lock(current);
+
+ spin_lock(&init_fs.lock);
+- init_fs.users++;
++ atomic_inc(&init_fs.users);
+ spin_unlock(&init_fs.lock);
+
+ spin_lock(&fs->lock);
+ current->fs = &init_fs;
+- kill = !--fs->users;
++ gr_set_chroot_entries(current, &current->fs->root);
++ kill = !atomic_dec_return(&fs->users);
+ spin_unlock(&fs->lock);
+
+ task_unlock(current);
+diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
+index 9905350..02eaec4 100644
+--- a/fs/fscache/cookie.c
++++ b/fs/fscache/cookie.c
+@@ -68,11 +68,11 @@ struct fscache_cookie *__fscache_acquire_cookie(
parent ? (char *) parent->def->name : "<no-parent>",
def->name, netfs_data);
@@ -43296,7 +44519,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" [no parent]");
return NULL;
}
-@@ -87,7 +87,7 @@ struct fscache_cookie *__fscache_acquire
+@@ -87,7 +87,7 @@ struct fscache_cookie *__fscache_acquire_cookie(
/* allocate and initialise a cookie */
cookie = kmem_cache_alloc(fscache_cookie_jar, GFP_KERNEL);
if (!cookie) {
@@ -43305,7 +44528,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" [ENOMEM]");
return NULL;
}
-@@ -109,13 +109,13 @@ struct fscache_cookie *__fscache_acquire
+@@ -109,13 +109,13 @@ struct fscache_cookie *__fscache_acquire_cookie(
switch (cookie->def->type) {
case FSCACHE_COOKIE_TYPE_INDEX:
@@ -43322,7 +44545,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
break;
}
-@@ -126,13 +126,13 @@ struct fscache_cookie *__fscache_acquire
+@@ -126,13 +126,13 @@ struct fscache_cookie *__fscache_acquire_cookie(
if (fscache_acquire_non_index_cookie(cookie) < 0) {
atomic_dec(&parent->n_children);
__fscache_cookie_put(cookie);
@@ -43338,7 +44561,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" = %p", cookie);
return cookie;
}
-@@ -168,7 +168,7 @@ static int fscache_acquire_non_index_coo
+@@ -168,7 +168,7 @@ static int fscache_acquire_non_index_cookie(struct fscache_cookie *cookie)
cache = fscache_select_cache_for_object(cookie->parent);
if (!cache) {
up_read(&fscache_addremove_sem);
@@ -43347,7 +44570,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" = -ENOMEDIUM [no cache]");
return -ENOMEDIUM;
}
-@@ -256,12 +256,12 @@ static int fscache_alloc_object(struct f
+@@ -256,12 +256,12 @@ static int fscache_alloc_object(struct fscache_cache *cache,
object = cache->ops->alloc_object(cache, cookie);
fscache_stat_d(&fscache_n_cop_alloc_object);
if (IS_ERR(object)) {
@@ -43362,7 +44585,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
object->debug_id = atomic_inc_return(&fscache_object_debug_id);
-@@ -377,10 +377,10 @@ void __fscache_update_cookie(struct fsca
+@@ -377,10 +377,10 @@ void __fscache_update_cookie(struct fscache_cookie *cookie)
struct fscache_object *object;
struct hlist_node *_p;
@@ -43375,7 +44598,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" [no cookie]");
return;
}
-@@ -414,12 +414,12 @@ void __fscache_relinquish_cookie(struct
+@@ -414,12 +414,12 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
struct fscache_object *object;
unsigned long event;
@@ -43391,7 +44614,7 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
_leave(" [no cookie]");
return;
}
-@@ -435,7 +435,7 @@ void __fscache_relinquish_cookie(struct
+@@ -435,7 +435,7 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire)
/* wait for the cookie to finish being instantiated (or to fail) */
if (test_bit(FSCACHE_COOKIE_CREATING, &cookie->flags)) {
@@ -43400,9 +44623,10 @@ diff -urNp linux-3.1.4/fs/fscache/cookie.c linux-3.1.4/fs/fscache/cookie.c
wait_on_bit(&cookie->flags, FSCACHE_COOKIE_CREATING,
fscache_wait_bit, TASK_UNINTERRUPTIBLE);
}
-diff -urNp linux-3.1.4/fs/fscache/internal.h linux-3.1.4/fs/fscache/internal.h
---- linux-3.1.4/fs/fscache/internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/internal.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
+index f6aad48..88dcf26 100644
+--- a/fs/fscache/internal.h
++++ b/fs/fscache/internal.h
@@ -144,94 +144,94 @@ extern void fscache_proc_cleanup(void);
extern atomic_t fscache_n_ops_processed[FSCACHE_MAX_THREADS];
extern atomic_t fscache_n_objs_processed[FSCACHE_MAX_THREADS];
@@ -43586,7 +44810,7 @@ diff -urNp linux-3.1.4/fs/fscache/internal.h linux-3.1.4/fs/fscache/internal.h
extern atomic_t fscache_n_cop_alloc_object;
extern atomic_t fscache_n_cop_lookup_object;
-@@ -255,6 +255,11 @@ static inline void fscache_stat(atomic_t
+@@ -255,6 +255,11 @@ static inline void fscache_stat(atomic_t *stat)
atomic_inc(stat);
}
@@ -43598,7 +44822,7 @@ diff -urNp linux-3.1.4/fs/fscache/internal.h linux-3.1.4/fs/fscache/internal.h
static inline void fscache_stat_d(atomic_t *stat)
{
atomic_dec(stat);
-@@ -267,6 +272,7 @@ extern const struct file_operations fsca
+@@ -267,6 +272,7 @@ extern const struct file_operations fscache_stats_fops;
#define __fscache_stat(stat) (NULL)
#define fscache_stat(stat) do {} while (0)
@@ -43606,10 +44830,11 @@ diff -urNp linux-3.1.4/fs/fscache/internal.h linux-3.1.4/fs/fscache/internal.h
#define fscache_stat_d(stat) do {} while (0)
#endif
-diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
---- linux-3.1.4/fs/fscache/object.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/object.c 2011-11-16 18:39:08.000000000 -0500
-@@ -128,7 +128,7 @@ static void fscache_object_state_machine
+diff --git a/fs/fscache/object.c b/fs/fscache/object.c
+index b6b897c..0ffff9c 100644
+--- a/fs/fscache/object.c
++++ b/fs/fscache/object.c
+@@ -128,7 +128,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
/* update the object metadata on disk */
case FSCACHE_OBJECT_UPDATING:
clear_bit(FSCACHE_OBJECT_EV_UPDATE, &object->events);
@@ -43618,7 +44843,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
fscache_stat(&fscache_n_cop_update_object);
object->cache->ops->update_object(object);
fscache_stat_d(&fscache_n_cop_update_object);
-@@ -217,7 +217,7 @@ static void fscache_object_state_machine
+@@ -217,7 +217,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
spin_lock(&object->lock);
object->state = FSCACHE_OBJECT_DEAD;
spin_unlock(&object->lock);
@@ -43627,7 +44852,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
goto terminal_transit;
/* handle the parent cache of this object being withdrawn from
-@@ -232,7 +232,7 @@ static void fscache_object_state_machine
+@@ -232,7 +232,7 @@ static void fscache_object_state_machine(struct fscache_object *object)
spin_lock(&object->lock);
object->state = FSCACHE_OBJECT_DEAD;
spin_unlock(&object->lock);
@@ -43636,7 +44861,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
goto terminal_transit;
/* complain about the object being woken up once it is
-@@ -461,7 +461,7 @@ static void fscache_lookup_object(struct
+@@ -461,7 +461,7 @@ static void fscache_lookup_object(struct fscache_object *object)
parent->cookie->def->name, cookie->def->name,
object->cache->tag->name);
@@ -43645,7 +44870,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
fscache_stat(&fscache_n_cop_lookup_object);
ret = object->cache->ops->lookup_object(object);
fscache_stat_d(&fscache_n_cop_lookup_object);
-@@ -472,7 +472,7 @@ static void fscache_lookup_object(struct
+@@ -472,7 +472,7 @@ static void fscache_lookup_object(struct fscache_object *object)
if (ret == -ETIMEDOUT) {
/* probably stuck behind another object, so move this one to
* the back of the queue */
@@ -43654,7 +44879,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
set_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
}
-@@ -495,7 +495,7 @@ void fscache_object_lookup_negative(stru
+@@ -495,7 +495,7 @@ void fscache_object_lookup_negative(struct fscache_object *object)
spin_lock(&object->lock);
if (object->state == FSCACHE_OBJECT_LOOKING_UP) {
@@ -43663,7 +44888,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
/* transit here to allow write requests to begin stacking up
* and read requests to begin returning ENODATA */
-@@ -541,7 +541,7 @@ void fscache_obtained_object(struct fsca
+@@ -541,7 +541,7 @@ void fscache_obtained_object(struct fscache_object *object)
* result, in which case there may be data available */
spin_lock(&object->lock);
if (object->state == FSCACHE_OBJECT_LOOKING_UP) {
@@ -43672,7 +44897,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
clear_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags);
-@@ -555,7 +555,7 @@ void fscache_obtained_object(struct fsca
+@@ -555,7 +555,7 @@ void fscache_obtained_object(struct fscache_object *object)
set_bit(FSCACHE_OBJECT_EV_REQUEUE, &object->events);
} else {
ASSERTCMP(object->state, ==, FSCACHE_OBJECT_CREATING);
@@ -43681,7 +44906,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
object->state = FSCACHE_OBJECT_AVAILABLE;
spin_unlock(&object->lock);
-@@ -602,7 +602,7 @@ static void fscache_object_available(str
+@@ -602,7 +602,7 @@ static void fscache_object_available(struct fscache_object *object)
fscache_enqueue_dependents(object);
fscache_hist(fscache_obj_instantiate_histogram, object->lookup_jif);
@@ -43690,7 +44915,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
_leave("");
}
-@@ -861,7 +861,7 @@ enum fscache_checkaux fscache_check_aux(
+@@ -861,7 +861,7 @@ enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
enum fscache_checkaux result;
if (!object->cookie->def->check_aux) {
@@ -43699,7 +44924,7 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
return FSCACHE_CHECKAUX_OKAY;
}
-@@ -870,17 +870,17 @@ enum fscache_checkaux fscache_check_aux(
+@@ -870,17 +870,17 @@ enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
switch (result) {
/* entry okay as is */
case FSCACHE_CHECKAUX_OKAY:
@@ -43720,9 +44945,10 @@ diff -urNp linux-3.1.4/fs/fscache/object.c linux-3.1.4/fs/fscache/object.c
break;
default:
-diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
---- linux-3.1.4/fs/fscache/operation.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/operation.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
+index 30afdfa..2256596 100644
+--- a/fs/fscache/operation.c
++++ b/fs/fscache/operation.c
@@ -17,7 +17,7 @@
#include <linux/slab.h>
#include "internal.h"
@@ -43732,7 +44958,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
EXPORT_SYMBOL(fscache_op_debug_id);
/**
-@@ -38,7 +38,7 @@ void fscache_enqueue_operation(struct fs
+@@ -38,7 +38,7 @@ void fscache_enqueue_operation(struct fscache_operation *op)
ASSERTCMP(op->object->state, >=, FSCACHE_OBJECT_AVAILABLE);
ASSERTCMP(atomic_read(&op->usage), >, 0);
@@ -43741,7 +44967,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
switch (op->flags & FSCACHE_OP_TYPE) {
case FSCACHE_OP_ASYNC:
_debug("queue async");
-@@ -69,7 +69,7 @@ static void fscache_run_op(struct fscach
+@@ -69,7 +69,7 @@ static void fscache_run_op(struct fscache_object *object,
wake_up_bit(&op->flags, FSCACHE_OP_WAITING);
if (op->processor)
fscache_enqueue_operation(op);
@@ -43750,7 +44976,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
}
/*
-@@ -98,11 +98,11 @@ int fscache_submit_exclusive_op(struct f
+@@ -98,11 +98,11 @@ int fscache_submit_exclusive_op(struct fscache_object *object,
if (object->n_ops > 1) {
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -43764,7 +44990,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
fscache_start_operations(object);
} else {
ASSERTCMP(object->n_in_progress, ==, 0);
-@@ -118,7 +118,7 @@ int fscache_submit_exclusive_op(struct f
+@@ -118,7 +118,7 @@ int fscache_submit_exclusive_op(struct fscache_object *object,
object->n_exclusive++; /* reads and writes must wait */
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -43773,7 +44999,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
ret = 0;
} else {
/* not allowed to submit ops in any other state */
-@@ -203,11 +203,11 @@ int fscache_submit_op(struct fscache_obj
+@@ -203,11 +203,11 @@ int fscache_submit_op(struct fscache_object *object,
if (object->n_exclusive > 0) {
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -43787,7 +45013,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
fscache_start_operations(object);
} else {
ASSERTCMP(object->n_exclusive, ==, 0);
-@@ -219,12 +219,12 @@ int fscache_submit_op(struct fscache_obj
+@@ -219,12 +219,12 @@ int fscache_submit_op(struct fscache_object *object,
object->n_ops++;
atomic_inc(&op->usage);
list_add_tail(&op->pend_link, &object->pending_ops);
@@ -43802,7 +45028,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
ret = -ENOBUFS;
} else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) {
fscache_report_unexpected_submission(object, op, ostate);
-@@ -294,7 +294,7 @@ int fscache_cancel_op(struct fscache_ope
+@@ -294,7 +294,7 @@ int fscache_cancel_op(struct fscache_operation *op)
ret = -EBUSY;
if (!list_empty(&op->pend_link)) {
@@ -43811,7 +45037,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
list_del_init(&op->pend_link);
object->n_ops--;
if (test_bit(FSCACHE_OP_EXCLUSIVE, &op->flags))
-@@ -331,7 +331,7 @@ void fscache_put_operation(struct fscach
+@@ -331,7 +331,7 @@ void fscache_put_operation(struct fscache_operation *op)
if (test_and_set_bit(FSCACHE_OP_DEAD, &op->flags))
BUG();
@@ -43820,7 +45046,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
if (op->release) {
op->release(op);
-@@ -348,7 +348,7 @@ void fscache_put_operation(struct fscach
+@@ -348,7 +348,7 @@ void fscache_put_operation(struct fscache_operation *op)
* lock, and defer it otherwise */
if (!spin_trylock(&object->lock)) {
_debug("defer put");
@@ -43829,7 +45055,7 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
cache = object->cache;
spin_lock(&cache->op_gc_list_lock);
-@@ -410,7 +410,7 @@ void fscache_operation_gc(struct work_st
+@@ -410,7 +410,7 @@ void fscache_operation_gc(struct work_struct *work)
_debug("GC DEFERRED REL OBJ%x OP%x",
object->debug_id, op->debug_id);
@@ -43838,10 +45064,11 @@ diff -urNp linux-3.1.4/fs/fscache/operation.c linux-3.1.4/fs/fscache/operation.c
ASSERTCMP(atomic_read(&op->usage), ==, 0);
-diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
---- linux-3.1.4/fs/fscache/page.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/page.c 2011-11-16 18:39:08.000000000 -0500
-@@ -60,7 +60,7 @@ bool __fscache_maybe_release_page(struct
+diff --git a/fs/fscache/page.c b/fs/fscache/page.c
+index 3f7a59b..cf196cc 100644
+--- a/fs/fscache/page.c
++++ b/fs/fscache/page.c
+@@ -60,7 +60,7 @@ bool __fscache_maybe_release_page(struct fscache_cookie *cookie,
val = radix_tree_lookup(&cookie->stores, page->index);
if (!val) {
rcu_read_unlock();
@@ -43850,7 +45077,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
__fscache_uncache_page(cookie, page);
return true;
}
-@@ -90,11 +90,11 @@ bool __fscache_maybe_release_page(struct
+@@ -90,11 +90,11 @@ bool __fscache_maybe_release_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->stores_lock);
if (xpage) {
@@ -43874,7 +45101,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
return false;
}
EXPORT_SYMBOL(__fscache_maybe_release_page);
-@@ -131,7 +131,7 @@ static void fscache_end_page_write(struc
+@@ -131,7 +131,7 @@ static void fscache_end_page_write(struct fscache_object *object,
FSCACHE_COOKIE_STORING_TAG);
if (!radix_tree_tag_get(&cookie->stores, page->index,
FSCACHE_COOKIE_PENDING_TAG)) {
@@ -43883,7 +45110,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
xpage = radix_tree_delete(&cookie->stores, page->index);
}
spin_unlock(&cookie->stores_lock);
-@@ -152,7 +152,7 @@ static void fscache_attr_changed_op(stru
+@@ -152,7 +152,7 @@ static void fscache_attr_changed_op(struct fscache_operation *op)
_enter("{OBJ%x OP%x}", object->debug_id, op->debug_id);
@@ -43892,7 +45119,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
if (fscache_object_is_active(object)) {
fscache_stat(&fscache_n_cop_attr_changed);
-@@ -177,11 +177,11 @@ int __fscache_attr_changed(struct fscach
+@@ -177,11 +177,11 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
@@ -43906,7 +45133,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ENOMEM");
return -ENOMEM;
}
-@@ -199,7 +199,7 @@ int __fscache_attr_changed(struct fscach
+@@ -199,7 +199,7 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
if (fscache_submit_exclusive_op(object, op) < 0)
goto nobufs;
spin_unlock(&cookie->lock);
@@ -43915,7 +45142,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
fscache_put_operation(op);
_leave(" = 0");
return 0;
-@@ -207,7 +207,7 @@ int __fscache_attr_changed(struct fscach
+@@ -207,7 +207,7 @@ int __fscache_attr_changed(struct fscache_cookie *cookie)
nobufs:
spin_unlock(&cookie->lock);
kfree(op);
@@ -43924,7 +45151,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = %d", -ENOBUFS);
return -ENOBUFS;
}
-@@ -243,7 +243,7 @@ static struct fscache_retrieval *fscache
+@@ -243,7 +243,7 @@ static struct fscache_retrieval *fscache_alloc_retrieval(
/* allocate a retrieval operation and attempt to submit it */
op = kzalloc(sizeof(*op), GFP_NOIO);
if (!op) {
@@ -43933,7 +45160,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
return NULL;
}
-@@ -271,13 +271,13 @@ static int fscache_wait_for_deferred_loo
+@@ -271,13 +271,13 @@ static int fscache_wait_for_deferred_lookup(struct fscache_cookie *cookie)
return 0;
}
@@ -43949,7 +45176,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ERESTARTSYS");
return -ERESTARTSYS;
}
-@@ -295,8 +295,8 @@ static int fscache_wait_for_deferred_loo
+@@ -295,8 +295,8 @@ static int fscache_wait_for_deferred_lookup(struct fscache_cookie *cookie)
*/
static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
struct fscache_retrieval *op,
@@ -43960,7 +45187,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
{
int ret;
-@@ -304,7 +304,7 @@ static int fscache_wait_for_retrieval_ac
+@@ -304,7 +304,7 @@ static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
goto check_if_dead;
_debug(">>> WT");
@@ -43969,7 +45196,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
if (wait_on_bit(&op->op.flags, FSCACHE_OP_WAITING,
fscache_wait_bit_interruptible,
TASK_INTERRUPTIBLE) < 0) {
-@@ -321,7 +321,7 @@ static int fscache_wait_for_retrieval_ac
+@@ -321,7 +321,7 @@ static int fscache_wait_for_retrieval_activation(struct fscache_object *object,
check_if_dead:
if (unlikely(fscache_object_is_dead(object))) {
@@ -43978,7 +45205,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
return -ENOBUFS;
}
return 0;
-@@ -348,7 +348,7 @@ int __fscache_read_or_alloc_page(struct
+@@ -348,7 +348,7 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
_enter("%p,%p,,,", cookie, page);
@@ -43987,7 +45214,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -381,7 +381,7 @@ int __fscache_read_or_alloc_page(struct
+@@ -381,7 +381,7 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -43996,7 +45223,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
/* pin the netfs read context in case we need to do the actual netfs
* read because we've encountered a cache read failure */
-@@ -411,15 +411,15 @@ int __fscache_read_or_alloc_page(struct
+@@ -411,15 +411,15 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie,
error:
if (ret == -ENOMEM)
@@ -44026,7 +45253,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -467,7 +467,7 @@ int __fscache_read_or_alloc_pages(struct
+@@ -467,7 +467,7 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
_enter("%p,,%d,,,", cookie, *nr_pages);
@@ -44035,7 +45262,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -497,7 +497,7 @@ int __fscache_read_or_alloc_pages(struct
+@@ -497,7 +497,7 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -44044,7 +45271,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
/* pin the netfs read context in case we need to do the actual netfs
* read because we've encountered a cache read failure */
-@@ -527,15 +527,15 @@ int __fscache_read_or_alloc_pages(struct
+@@ -527,15 +527,15 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie,
error:
if (ret == -ENOMEM)
@@ -44074,7 +45301,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -569,7 +569,7 @@ int __fscache_alloc_page(struct fscache_
+@@ -569,7 +569,7 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
_enter("%p,%p,,,", cookie, page);
@@ -44083,7 +45310,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
if (hlist_empty(&cookie->backing_objects))
goto nobufs;
-@@ -595,7 +595,7 @@ int __fscache_alloc_page(struct fscache_
+@@ -595,7 +595,7 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
goto nobufs_unlock;
spin_unlock(&cookie->lock);
@@ -44092,7 +45319,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
ret = fscache_wait_for_retrieval_activation(
object, op,
-@@ -611,11 +611,11 @@ int __fscache_alloc_page(struct fscache_
+@@ -611,11 +611,11 @@ int __fscache_alloc_page(struct fscache_cookie *cookie,
error:
if (ret == -ERESTARTSYS)
@@ -44116,7 +45343,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ENOBUFS");
return -ENOBUFS;
}
-@@ -666,7 +666,7 @@ static void fscache_write_op(struct fsca
+@@ -666,7 +666,7 @@ static void fscache_write_op(struct fscache_operation *_op)
spin_lock(&cookie->stores_lock);
@@ -44125,7 +45352,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
/* find a page to store */
page = NULL;
-@@ -677,7 +677,7 @@ static void fscache_write_op(struct fsca
+@@ -677,7 +677,7 @@ static void fscache_write_op(struct fscache_operation *_op)
page = results[0];
_debug("gang %d [%lx]", n, page->index);
if (page->index > op->store_limit) {
@@ -44134,7 +45361,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
goto superseded;
}
-@@ -689,7 +689,7 @@ static void fscache_write_op(struct fsca
+@@ -689,7 +689,7 @@ static void fscache_write_op(struct fscache_operation *_op)
spin_unlock(&cookie->stores_lock);
spin_unlock(&object->lock);
@@ -44143,7 +45370,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
fscache_stat(&fscache_n_cop_write_page);
ret = object->cache->ops->write_page(op, page);
fscache_stat_d(&fscache_n_cop_write_page);
-@@ -757,7 +757,7 @@ int __fscache_write_page(struct fscache_
+@@ -757,7 +757,7 @@ int __fscache_write_page(struct fscache_cookie *cookie,
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ASSERT(PageFsCache(page));
@@ -44152,7 +45379,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
op = kzalloc(sizeof(*op), GFP_NOIO);
if (!op)
-@@ -808,7 +808,7 @@ int __fscache_write_page(struct fscache_
+@@ -808,7 +808,7 @@ int __fscache_write_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->stores_lock);
spin_unlock(&object->lock);
@@ -44161,7 +45388,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
op->store_limit = object->store_limit;
if (fscache_submit_op(object, &op->op) < 0)
-@@ -816,8 +816,8 @@ int __fscache_write_page(struct fscache_
+@@ -816,8 +816,8 @@ int __fscache_write_page(struct fscache_cookie *cookie,
spin_unlock(&cookie->lock);
radix_tree_preload_end();
@@ -44172,7 +45399,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
/* the work queue now carries its own ref on the object */
fscache_put_operation(&op->op);
-@@ -825,14 +825,14 @@ int __fscache_write_page(struct fscache_
+@@ -825,14 +825,14 @@ int __fscache_write_page(struct fscache_cookie *cookie,
return 0;
already_queued:
@@ -44206,7 +45433,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
_leave(" = -ENOMEM");
return -ENOMEM;
}
-@@ -876,7 +876,7 @@ void __fscache_uncache_page(struct fscac
+@@ -876,7 +876,7 @@ void __fscache_uncache_page(struct fscache_cookie *cookie, struct page *page)
ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ASSERTCMP(page, !=, NULL);
@@ -44215,7 +45442,7 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
/* cache withdrawal may beat us to it */
if (!PageFsCache(page))
-@@ -929,7 +929,7 @@ void fscache_mark_pages_cached(struct fs
+@@ -929,7 +929,7 @@ void fscache_mark_pages_cached(struct fscache_retrieval *op,
unsigned long loop;
#ifdef CONFIG_FSCACHE_STATS
@@ -44224,9 +45451,10 @@ diff -urNp linux-3.1.4/fs/fscache/page.c linux-3.1.4/fs/fscache/page.c
#endif
for (loop = 0; loop < pagevec->nr; loop++) {
-diff -urNp linux-3.1.4/fs/fscache/stats.c linux-3.1.4/fs/fscache/stats.c
---- linux-3.1.4/fs/fscache/stats.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fscache/stats.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
+index 4765190..2a067f2 100644
+--- a/fs/fscache/stats.c
++++ b/fs/fscache/stats.c
@@ -18,95 +18,95 @@
/*
* operation counters
@@ -44412,7 +45640,7 @@ diff -urNp linux-3.1.4/fs/fscache/stats.c linux-3.1.4/fs/fscache/stats.c
atomic_t fscache_n_cop_alloc_object;
atomic_t fscache_n_cop_lookup_object;
-@@ -133,113 +133,113 @@ static int fscache_stats_show(struct seq
+@@ -133,113 +133,113 @@ static int fscache_stats_show(struct seq_file *m, void *v)
seq_puts(m, "FS-Cache statistics\n");
seq_printf(m, "Cookies: idx=%u dat=%u spc=%u\n",
@@ -44602,101 +45830,10 @@ diff -urNp linux-3.1.4/fs/fscache/stats.c linux-3.1.4/fs/fscache/stats.c
seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n",
atomic_read(&fscache_n_cop_alloc_object),
-diff -urNp linux-3.1.4/fs/fs_struct.c linux-3.1.4/fs/fs_struct.c
---- linux-3.1.4/fs/fs_struct.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fs_struct.c 2011-11-16 18:40:29.000000000 -0500
-@@ -4,6 +4,7 @@
- #include <linux/path.h>
- #include <linux/slab.h>
- #include <linux/fs_struct.h>
-+#include <linux/grsecurity.h>
- #include "internal.h"
-
- static inline void path_get_longterm(struct path *path)
-@@ -31,6 +32,7 @@ void set_fs_root(struct fs_struct *fs, s
- old_root = fs->root;
- fs->root = *path;
- path_get_longterm(path);
-+ gr_set_chroot_entries(current, path);
- write_seqcount_end(&fs->seq);
- spin_unlock(&fs->lock);
- if (old_root.dentry)
-@@ -74,6 +76,7 @@ void chroot_fs_refs(struct path *old_roo
- && fs->root.mnt == old_root->mnt) {
- path_get_longterm(new_root);
- fs->root = *new_root;
-+ gr_set_chroot_entries(p, new_root);
- count++;
- }
- if (fs->pwd.dentry == old_root->dentry
-@@ -109,7 +112,8 @@ void exit_fs(struct task_struct *tsk)
- spin_lock(&fs->lock);
- write_seqcount_begin(&fs->seq);
- tsk->fs = NULL;
-- kill = !--fs->users;
-+ gr_clear_chroot_entries(tsk);
-+ kill = !atomic_dec_return(&fs->users);
- write_seqcount_end(&fs->seq);
- spin_unlock(&fs->lock);
- task_unlock(tsk);
-@@ -123,7 +127,7 @@ struct fs_struct *copy_fs_struct(struct
- struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
- /* We don't need to lock fs - think why ;-) */
- if (fs) {
-- fs->users = 1;
-+ atomic_set(&fs->users, 1);
- fs->in_exec = 0;
- spin_lock_init(&fs->lock);
- seqcount_init(&fs->seq);
-@@ -132,6 +136,9 @@ struct fs_struct *copy_fs_struct(struct
- spin_lock(&old->lock);
- fs->root = old->root;
- path_get_longterm(&fs->root);
-+ /* instead of calling gr_set_chroot_entries here,
-+ we call it from every caller of this function
-+ */
- fs->pwd = old->pwd;
- path_get_longterm(&fs->pwd);
- spin_unlock(&old->lock);
-@@ -150,8 +157,9 @@ int unshare_fs_struct(void)
-
- task_lock(current);
- spin_lock(&fs->lock);
-- kill = !--fs->users;
-+ kill = !atomic_dec_return(&fs->users);
- current->fs = new_fs;
-+ gr_set_chroot_entries(current, &new_fs->root);
- spin_unlock(&fs->lock);
- task_unlock(current);
-
-@@ -170,7 +178,7 @@ EXPORT_SYMBOL(current_umask);
-
- /* to be mentioned only in INIT_TASK */
- struct fs_struct init_fs = {
-- .users = 1,
-+ .users = ATOMIC_INIT(1),
- .lock = __SPIN_LOCK_UNLOCKED(init_fs.lock),
- .seq = SEQCNT_ZERO,
- .umask = 0022,
-@@ -186,12 +194,13 @@ void daemonize_fs_struct(void)
- task_lock(current);
-
- spin_lock(&init_fs.lock);
-- init_fs.users++;
-+ atomic_inc(&init_fs.users);
- spin_unlock(&init_fs.lock);
-
- spin_lock(&fs->lock);
- current->fs = &init_fs;
-- kill = !--fs->users;
-+ gr_set_chroot_entries(current, &current->fs->root);
-+ kill = !atomic_dec_return(&fs->users);
- spin_unlock(&fs->lock);
-
- task_unlock(current);
-diff -urNp linux-3.1.4/fs/fuse/cuse.c linux-3.1.4/fs/fuse/cuse.c
---- linux-3.1.4/fs/fuse/cuse.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fuse/cuse.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
+index b6cca47..ec782c3 100644
+--- a/fs/fuse/cuse.c
++++ b/fs/fuse/cuse.c
@@ -586,10 +586,12 @@ static int __init cuse_init(void)
INIT_LIST_HEAD(&cuse_conntbl[i]);
@@ -44714,10 +45851,11 @@ diff -urNp linux-3.1.4/fs/fuse/cuse.c linux-3.1.4/fs/fuse/cuse.c
cuse_class = class_create(THIS_MODULE, "cuse");
if (IS_ERR(cuse_class))
-diff -urNp linux-3.1.4/fs/fuse/dev.c linux-3.1.4/fs/fuse/dev.c
---- linux-3.1.4/fs/fuse/dev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fuse/dev.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1242,7 +1242,7 @@ static ssize_t fuse_dev_splice_read(stru
+diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
+index 5cb8614..6865b11 100644
+--- a/fs/fuse/dev.c
++++ b/fs/fuse/dev.c
+@@ -1242,7 +1242,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
ret = 0;
pipe_lock(pipe);
@@ -44726,10 +45864,11 @@ diff -urNp linux-3.1.4/fs/fuse/dev.c linux-3.1.4/fs/fuse/dev.c
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-diff -urNp linux-3.1.4/fs/fuse/dir.c linux-3.1.4/fs/fuse/dir.c
---- linux-3.1.4/fs/fuse/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/fuse/dir.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1147,7 +1147,7 @@ static char *read_link(struct dentry *de
+diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
+index 9f63e49..d8a64c0 100644
+--- a/fs/fuse/dir.c
++++ b/fs/fuse/dir.c
+@@ -1147,7 +1147,7 @@ static char *read_link(struct dentry *dentry)
return link;
}
@@ -44738,9 +45877,10 @@ diff -urNp linux-3.1.4/fs/fuse/dir.c linux-3.1.4/fs/fuse/dir.c
{
if (!IS_ERR(link))
free_page((unsigned long) link);
-diff -urNp linux-3.1.4/fs/gfs2/inode.c linux-3.1.4/fs/gfs2/inode.c
---- linux-3.1.4/fs/gfs2/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/gfs2/inode.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
+index 900cf98..3896726 100644
+--- a/fs/gfs2/inode.c
++++ b/fs/gfs2/inode.c
@@ -1517,7 +1517,7 @@ out:
static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
@@ -44750,10 +45890,11 @@ diff -urNp linux-3.1.4/fs/gfs2/inode.c linux-3.1.4/fs/gfs2/inode.c
if (!IS_ERR(s))
kfree(s);
}
-diff -urNp linux-3.1.4/fs/hfs/btree.c linux-3.1.4/fs/hfs/btree.c
---- linux-3.1.4/fs/hfs/btree.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfs/btree.c 2011-11-18 18:48:11.000000000 -0500
-@@ -46,11 +46,27 @@ struct hfs_btree *hfs_btree_open(struct
+diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
+index 3ebc437..eb23952 100644
+--- a/fs/hfs/btree.c
++++ b/fs/hfs/btree.c
+@@ -46,11 +46,27 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
case HFS_EXT_CNID:
hfs_inode_read_fork(tree->inode, mdb->drXTExtRec, mdb->drXTFlSize,
mdb->drXTFlSize, be32_to_cpu(mdb->drXTClpSiz));
@@ -44781,7 +45922,7 @@ diff -urNp linux-3.1.4/fs/hfs/btree.c linux-3.1.4/fs/hfs/btree.c
tree->inode->i_mapping->a_ops = &hfs_btree_aops;
break;
default:
-@@ -59,11 +75,6 @@ struct hfs_btree *hfs_btree_open(struct
+@@ -59,11 +75,6 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
}
unlock_new_inode(tree->inode);
@@ -44793,10 +45934,11 @@ diff -urNp linux-3.1.4/fs/hfs/btree.c linux-3.1.4/fs/hfs/btree.c
mapping = tree->inode->i_mapping;
page = read_mapping_page(mapping, 0, NULL);
if (IS_ERR(page))
-diff -urNp linux-3.1.4/fs/hfsplus/catalog.c linux-3.1.4/fs/hfsplus/catalog.c
---- linux-3.1.4/fs/hfsplus/catalog.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfsplus/catalog.c 2011-11-16 19:23:09.000000000 -0500
-@@ -179,6 +179,8 @@ int hfsplus_find_cat(struct super_block
+diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
+index 4dfbfec..947c9c2 100644
+--- a/fs/hfsplus/catalog.c
++++ b/fs/hfsplus/catalog.c
+@@ -179,6 +179,8 @@ int hfsplus_find_cat(struct super_block *sb, u32 cnid,
int err;
u16 type;
@@ -44805,7 +45947,7 @@ diff -urNp linux-3.1.4/fs/hfsplus/catalog.c linux-3.1.4/fs/hfsplus/catalog.c
hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL);
err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry));
if (err)
-@@ -210,6 +212,8 @@ int hfsplus_create_cat(u32 cnid, struct
+@@ -210,6 +212,8 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir,
int entry_size;
int err;
@@ -44823,10 +45965,11 @@ diff -urNp linux-3.1.4/fs/hfsplus/catalog.c linux-3.1.4/fs/hfsplus/catalog.c
dprint(DBG_CAT_MOD, "rename_cat: %u - %lu,%s - %lu,%s\n",
cnid, src_dir->i_ino, src_name->name,
dst_dir->i_ino, dst_name->name);
-diff -urNp linux-3.1.4/fs/hfsplus/dir.c linux-3.1.4/fs/hfsplus/dir.c
---- linux-3.1.4/fs/hfsplus/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfsplus/dir.c 2011-11-16 18:40:29.000000000 -0500
-@@ -131,6 +131,8 @@ static int hfsplus_readdir(struct file *
+diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
+index 25b2443..09a3341 100644
+--- a/fs/hfsplus/dir.c
++++ b/fs/hfsplus/dir.c
+@@ -131,6 +131,8 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct hfsplus_readdir_data *rd;
u16 type;
@@ -44835,10 +45978,11 @@ diff -urNp linux-3.1.4/fs/hfsplus/dir.c linux-3.1.4/fs/hfsplus/dir.c
if (filp->f_pos >= inode->i_size)
return 0;
-diff -urNp linux-3.1.4/fs/hfsplus/inode.c linux-3.1.4/fs/hfsplus/inode.c
---- linux-3.1.4/fs/hfsplus/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfsplus/inode.c 2011-11-16 18:40:29.000000000 -0500
-@@ -501,6 +501,8 @@ int hfsplus_cat_read_inode(struct inode
+diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
+index 4cc1e3a..ad0f70b 100644
+--- a/fs/hfsplus/inode.c
++++ b/fs/hfsplus/inode.c
+@@ -501,6 +501,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
int res = 0;
u16 type;
@@ -44847,7 +45991,7 @@ diff -urNp linux-3.1.4/fs/hfsplus/inode.c linux-3.1.4/fs/hfsplus/inode.c
type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset);
HFSPLUS_I(inode)->linkid = 0;
-@@ -564,6 +566,8 @@ int hfsplus_cat_write_inode(struct inode
+@@ -564,6 +566,8 @@ int hfsplus_cat_write_inode(struct inode *inode)
struct hfs_find_data fd;
hfsplus_cat_entry entry;
@@ -44856,10 +46000,11 @@ diff -urNp linux-3.1.4/fs/hfsplus/inode.c linux-3.1.4/fs/hfsplus/inode.c
if (HFSPLUS_IS_RSRC(inode))
main_inode = HFSPLUS_I(inode)->rsrc_inode;
-diff -urNp linux-3.1.4/fs/hfsplus/ioctl.c linux-3.1.4/fs/hfsplus/ioctl.c
---- linux-3.1.4/fs/hfsplus/ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfsplus/ioctl.c 2011-11-16 18:40:29.000000000 -0500
-@@ -122,6 +122,8 @@ int hfsplus_setxattr(struct dentry *dent
+diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
+index fbaa669..c548cd0 100644
+--- a/fs/hfsplus/ioctl.c
++++ b/fs/hfsplus/ioctl.c
+@@ -122,6 +122,8 @@ int hfsplus_setxattr(struct dentry *dentry, const char *name,
struct hfsplus_cat_file *file;
int res;
@@ -44868,7 +46013,7 @@ diff -urNp linux-3.1.4/fs/hfsplus/ioctl.c linux-3.1.4/fs/hfsplus/ioctl.c
if (!S_ISREG(inode->i_mode) || HFSPLUS_IS_RSRC(inode))
return -EOPNOTSUPP;
-@@ -166,6 +168,8 @@ ssize_t hfsplus_getxattr(struct dentry *
+@@ -166,6 +168,8 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
struct hfsplus_cat_file *file;
ssize_t res = 0;
@@ -44877,10 +46022,11 @@ diff -urNp linux-3.1.4/fs/hfsplus/ioctl.c linux-3.1.4/fs/hfsplus/ioctl.c
if (!S_ISREG(inode->i_mode) || HFSPLUS_IS_RSRC(inode))
return -EOPNOTSUPP;
-diff -urNp linux-3.1.4/fs/hfsplus/super.c linux-3.1.4/fs/hfsplus/super.c
---- linux-3.1.4/fs/hfsplus/super.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hfsplus/super.c 2011-11-16 19:23:30.000000000 -0500
-@@ -347,6 +347,8 @@ static int hfsplus_fill_super(struct sup
+diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
+index d24a9b6..dd9b3dd 100644
+--- a/fs/hfsplus/super.c
++++ b/fs/hfsplus/super.c
+@@ -347,6 +347,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
u64 last_fs_block, last_fs_page;
int err;
@@ -44889,10 +46035,11 @@ diff -urNp linux-3.1.4/fs/hfsplus/super.c linux-3.1.4/fs/hfsplus/super.c
err = -EINVAL;
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
-diff -urNp linux-3.1.4/fs/hugetlbfs/inode.c linux-3.1.4/fs/hugetlbfs/inode.c
---- linux-3.1.4/fs/hugetlbfs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/hugetlbfs/inode.c 2011-11-16 18:40:29.000000000 -0500
-@@ -915,7 +915,7 @@ static struct file_system_type hugetlbfs
+diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
+index ec88953..cb5e98e 100644
+--- a/fs/hugetlbfs/inode.c
++++ b/fs/hugetlbfs/inode.c
+@@ -915,7 +915,7 @@ static struct file_system_type hugetlbfs_fs_type = {
.kill_sb = kill_litter_super,
};
@@ -44901,9 +46048,10 @@ diff -urNp linux-3.1.4/fs/hugetlbfs/inode.c linux-3.1.4/fs/hugetlbfs/inode.c
static int can_do_hugetlb_shm(void)
{
-diff -urNp linux-3.1.4/fs/inode.c linux-3.1.4/fs/inode.c
---- linux-3.1.4/fs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/inode.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/inode.c b/fs/inode.c
+index ec79246..054c36a 100644
+--- a/fs/inode.c
++++ b/fs/inode.c
@@ -787,8 +787,8 @@ unsigned int get_next_ino(void)
#ifdef CONFIG_SMP
@@ -44915,10 +46063,11 @@ diff -urNp linux-3.1.4/fs/inode.c linux-3.1.4/fs/inode.c
res = next - LAST_INO_BATCH;
}
-diff -urNp linux-3.1.4/fs/jbd/checkpoint.c linux-3.1.4/fs/jbd/checkpoint.c
---- linux-3.1.4/fs/jbd/checkpoint.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jbd/checkpoint.c 2011-11-16 18:40:29.000000000 -0500
-@@ -358,6 +358,8 @@ int log_do_checkpoint(journal_t *journal
+diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
+index f94fc48..3bb8d30 100644
+--- a/fs/jbd/checkpoint.c
++++ b/fs/jbd/checkpoint.c
+@@ -358,6 +358,8 @@ int log_do_checkpoint(journal_t *journal)
tid_t this_tid;
int result;
@@ -44927,10 +46076,11 @@ diff -urNp linux-3.1.4/fs/jbd/checkpoint.c linux-3.1.4/fs/jbd/checkpoint.c
jbd_debug(1, "Start checkpoint\n");
/*
-diff -urNp linux-3.1.4/fs/jffs2/compr_rtime.c linux-3.1.4/fs/jffs2/compr_rtime.c
---- linux-3.1.4/fs/jffs2/compr_rtime.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jffs2/compr_rtime.c 2011-11-16 18:40:29.000000000 -0500
-@@ -37,6 +37,8 @@ static int jffs2_rtime_compress(unsigned
+diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c
+index 16a5047..88ff6ca 100644
+--- a/fs/jffs2/compr_rtime.c
++++ b/fs/jffs2/compr_rtime.c
+@@ -37,6 +37,8 @@ static int jffs2_rtime_compress(unsigned char *data_in,
int outpos = 0;
int pos=0;
@@ -44939,7 +46089,7 @@ diff -urNp linux-3.1.4/fs/jffs2/compr_rtime.c linux-3.1.4/fs/jffs2/compr_rtime.c
memset(positions,0,sizeof(positions));
while (pos < (*sourcelen) && outpos <= (*dstlen)-2) {
-@@ -78,6 +80,8 @@ static int jffs2_rtime_decompress(unsign
+@@ -78,6 +80,8 @@ static int jffs2_rtime_decompress(unsigned char *data_in,
int outpos = 0;
int pos=0;
@@ -44948,10 +46098,11 @@ diff -urNp linux-3.1.4/fs/jffs2/compr_rtime.c linux-3.1.4/fs/jffs2/compr_rtime.c
memset(positions,0,sizeof(positions));
while (outpos<destlen) {
-diff -urNp linux-3.1.4/fs/jffs2/compr_rubin.c linux-3.1.4/fs/jffs2/compr_rubin.c
---- linux-3.1.4/fs/jffs2/compr_rubin.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jffs2/compr_rubin.c 2011-11-16 18:40:29.000000000 -0500
-@@ -314,6 +314,8 @@ static int jffs2_dynrubin_compress(unsig
+diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
+index 9e7cec8..4713089 100644
+--- a/fs/jffs2/compr_rubin.c
++++ b/fs/jffs2/compr_rubin.c
+@@ -314,6 +314,8 @@ static int jffs2_dynrubin_compress(unsigned char *data_in,
int ret;
uint32_t mysrclen, mydstlen;
@@ -44960,10 +46111,11 @@ diff -urNp linux-3.1.4/fs/jffs2/compr_rubin.c linux-3.1.4/fs/jffs2/compr_rubin.c
mysrclen = *sourcelen;
mydstlen = *dstlen - 8;
-diff -urNp linux-3.1.4/fs/jffs2/erase.c linux-3.1.4/fs/jffs2/erase.c
---- linux-3.1.4/fs/jffs2/erase.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jffs2/erase.c 2011-11-16 18:39:08.000000000 -0500
-@@ -439,7 +439,8 @@ static void jffs2_mark_erased_block(stru
+diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
+index e513f19..2ab1351 100644
+--- a/fs/jffs2/erase.c
++++ b/fs/jffs2/erase.c
+@@ -439,7 +439,8 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -44973,10 +46125,11 @@ diff -urNp linux-3.1.4/fs/jffs2/erase.c linux-3.1.4/fs/jffs2/erase.c
};
jffs2_prealloc_raw_node_refs(c, jeb, 1);
-diff -urNp linux-3.1.4/fs/jffs2/wbuf.c linux-3.1.4/fs/jffs2/wbuf.c
---- linux-3.1.4/fs/jffs2/wbuf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jffs2/wbuf.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o
+diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
+index 4515bea..178f2d6 100644
+--- a/fs/jffs2/wbuf.c
++++ b/fs/jffs2/wbuf.c
+@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node oob_cleanmarker =
{
.magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = constant_cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -44986,10 +46139,11 @@ diff -urNp linux-3.1.4/fs/jffs2/wbuf.c linux-3.1.4/fs/jffs2/wbuf.c
};
/*
-diff -urNp linux-3.1.4/fs/jffs2/xattr.c linux-3.1.4/fs/jffs2/xattr.c
---- linux-3.1.4/fs/jffs2/xattr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jffs2/xattr.c 2011-11-16 18:40:29.000000000 -0500
-@@ -773,6 +773,8 @@ void jffs2_build_xattr_subsystem(struct
+diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
+index 3e93cdd..c8a80e1 100644
+--- a/fs/jffs2/xattr.c
++++ b/fs/jffs2/xattr.c
+@@ -773,6 +773,8 @@ void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
@@ -44998,9 +46152,10 @@ diff -urNp linux-3.1.4/fs/jffs2/xattr.c linux-3.1.4/fs/jffs2/xattr.c
/* Phase.1 : Merge same xref */
for (i=0; i < XREF_TMPHASH_SIZE; i++)
xref_tmphash[i] = NULL;
-diff -urNp linux-3.1.4/fs/jfs/super.c linux-3.1.4/fs/jfs/super.c
---- linux-3.1.4/fs/jfs/super.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/jfs/super.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/jfs/super.c b/fs/jfs/super.c
+index 06c8a67..589dbbd 100644
+--- a/fs/jfs/super.c
++++ b/fs/jfs/super.c
@@ -803,7 +803,7 @@ static int __init init_jfs_fs(void)
jfs_inode_cachep =
@@ -45010,22 +46165,11 @@ diff -urNp linux-3.1.4/fs/jfs/super.c linux-3.1.4/fs/jfs/super.c
init_once);
if (jfs_inode_cachep == NULL)
return -ENOMEM;
-diff -urNp linux-3.1.4/fs/Kconfig.binfmt linux-3.1.4/fs/Kconfig.binfmt
---- linux-3.1.4/fs/Kconfig.binfmt 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/Kconfig.binfmt 2011-11-16 18:39:08.000000000 -0500
-@@ -86,7 +86,7 @@ config HAVE_AOUT
-
- config BINFMT_AOUT
- tristate "Kernel support for a.out and ECOFF binaries"
-- depends on HAVE_AOUT
-+ depends on HAVE_AOUT && BROKEN
- ---help---
- A.out (Assembler.OUTput) is a set of formats for libraries and
- executables used in the earliest versions of UNIX. Linux used
-diff -urNp linux-3.1.4/fs/libfs.c linux-3.1.4/fs/libfs.c
---- linux-3.1.4/fs/libfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/libfs.c 2011-11-16 18:39:08.000000000 -0500
-@@ -165,6 +165,9 @@ int dcache_readdir(struct file * filp, v
+diff --git a/fs/libfs.c b/fs/libfs.c
+index c18e9a1..0b04e2c 100644
+--- a/fs/libfs.c
++++ b/fs/libfs.c
+@@ -165,6 +165,9 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
for (p=q->next; p != &dentry->d_subdirs; p=p->next) {
struct dentry *next;
@@ -45035,7 +46179,7 @@ diff -urNp linux-3.1.4/fs/libfs.c linux-3.1.4/fs/libfs.c
next = list_entry(p, struct dentry, d_u.d_child);
spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED);
if (!simple_positive(next)) {
-@@ -174,7 +177,12 @@ int dcache_readdir(struct file * filp, v
+@@ -174,7 +177,12 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
spin_unlock(&next->d_lock);
spin_unlock(&dentry->d_lock);
@@ -45049,10 +46193,11 @@ diff -urNp linux-3.1.4/fs/libfs.c linux-3.1.4/fs/libfs.c
next->d_name.len, filp->f_pos,
next->d_inode->i_ino,
dt_type(next->d_inode)) < 0)
-diff -urNp linux-3.1.4/fs/lockd/clntproc.c linux-3.1.4/fs/lockd/clntproc.c
---- linux-3.1.4/fs/lockd/clntproc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/lockd/clntproc.c 2011-11-16 18:40:29.000000000 -0500
-@@ -36,11 +36,11 @@ static const struct rpc_call_ops nlmclnt
+diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
+index 8392cb8..ae8ed40 100644
+--- a/fs/lockd/clntproc.c
++++ b/fs/lockd/clntproc.c
+@@ -36,11 +36,11 @@ static const struct rpc_call_ops nlmclnt_cancel_ops;
/*
* Cookie counter for NLM requests
*/
@@ -45066,7 +46211,7 @@ diff -urNp linux-3.1.4/fs/lockd/clntproc.c linux-3.1.4/fs/lockd/clntproc.c
memcpy(c->data, &cookie, 4);
c->len=4;
-@@ -621,6 +621,8 @@ nlmclnt_reclaim(struct nlm_host *host, s
+@@ -621,6 +621,8 @@ nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl)
struct nlm_rqst reqst, *req;
int status;
@@ -45075,10 +46220,11 @@ diff -urNp linux-3.1.4/fs/lockd/clntproc.c linux-3.1.4/fs/lockd/clntproc.c
req = &reqst;
memset(req, 0, sizeof(*req));
locks_init_lock(&req->a_args.lock.fl);
-diff -urNp linux-3.1.4/fs/locks.c linux-3.1.4/fs/locks.c
---- linux-3.1.4/fs/locks.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/locks.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2022,16 +2022,16 @@ void locks_remove_flock(struct file *fil
+diff --git a/fs/locks.c b/fs/locks.c
+index 703f545..150a552 100644
+--- a/fs/locks.c
++++ b/fs/locks.c
+@@ -2022,16 +2022,16 @@ void locks_remove_flock(struct file *filp)
return;
if (filp->f_op && filp->f_op->flock) {
@@ -45099,10 +46245,11 @@ diff -urNp linux-3.1.4/fs/locks.c linux-3.1.4/fs/locks.c
}
lock_flocks();
-diff -urNp linux-3.1.4/fs/logfs/super.c linux-3.1.4/fs/logfs/super.c
---- linux-3.1.4/fs/logfs/super.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/logfs/super.c 2011-11-16 18:40:29.000000000 -0500
-@@ -266,6 +266,8 @@ static int logfs_recover_sb(struct super
+diff --git a/fs/logfs/super.c b/fs/logfs/super.c
+index ce03a18..ac8c14f 100644
+--- a/fs/logfs/super.c
++++ b/fs/logfs/super.c
+@@ -266,6 +266,8 @@ static int logfs_recover_sb(struct super_block *sb)
struct logfs_disk_super _ds1, *ds1 = &_ds1;
int err, valid0, valid1;
@@ -45111,17 +46258,148 @@ diff -urNp linux-3.1.4/fs/logfs/super.c linux-3.1.4/fs/logfs/super.c
/* read first superblock */
err = wbuf_read(sb, super->s_sb_ofs[0], sizeof(*ds0), ds0);
if (err)
-diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
---- linux-3.1.4/fs/namei.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/namei.c 2011-11-17 00:36:54.000000000 -0500
-@@ -283,14 +283,22 @@ int generic_permission(struct inode *ino
+diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c
+index 3f32bcb..7c82c29 100644
+--- a/fs/minix/bitmap.c
++++ b/fs/minix/bitmap.c
+@@ -20,10 +20,11 @@ static const int nibblemap[] = { 4,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0 };
+
+ static DEFINE_SPINLOCK(bitmap_lock);
+
+-static unsigned long count_free(struct buffer_head *map[], unsigned numblocks, __u32 numbits)
++static unsigned long count_free(struct buffer_head *map[], unsigned blocksize, __u32 numbits)
+ {
+ unsigned i, j, sum = 0;
+ struct buffer_head *bh;
++ unsigned numblocks = minix_blocks_needed(numbits, blocksize);
+
+ for (i=0; i<numblocks-1; i++) {
+ if (!(bh=map[i]))
+@@ -105,10 +106,12 @@ int minix_new_block(struct inode * inode)
+ return 0;
+ }
+
+-unsigned long minix_count_free_blocks(struct minix_sb_info *sbi)
++unsigned long minix_count_free_blocks(struct super_block *sb)
+ {
+- return (count_free(sbi->s_zmap, sbi->s_zmap_blocks,
+- sbi->s_nzones - sbi->s_firstdatazone + 1)
++ struct minix_sb_info *sbi = minix_sb(sb);
++ u32 bits = sbi->s_nzones - (sbi->s_firstdatazone + 1);
++
++ return (count_free(sbi->s_zmap, sb->s_blocksize, bits)
+ << sbi->s_log_zone_size);
+ }
+
+@@ -273,7 +276,10 @@ struct inode *minix_new_inode(const struct inode *dir, int mode, int *error)
+ return inode;
+ }
+-unsigned long minix_count_free_inodes(struct minix_sb_info *sbi)
++unsigned long minix_count_free_inodes(struct super_block *sb)
+ {
+- return count_free(sbi->s_imap, sbi->s_imap_blocks, sbi->s_ninodes + 1);
++ struct minix_sb_info *sbi = minix_sb(sb);
++ u32 bits = sbi->s_ninodes + 1;
++
++ return count_free(sbi->s_imap, sb->s_blocksize, bits);
+ }
+diff --git a/fs/minix/inode.c b/fs/minix/inode.c
+index e7d23e2..1ed1351 100644
+--- a/fs/minix/inode.c
++++ b/fs/minix/inode.c
+@@ -279,6 +279,27 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
+ else if (sbi->s_mount_state & MINIX_ERROR_FS)
+ printk("MINIX-fs: mounting file system with errors, "
+ "running fsck is recommended\n");
++
++ /* Apparently minix can create filesystems that allocate more blocks for
++ * the bitmaps than needed. We simply ignore that, but verify it didn't
++ * create one with not enough blocks and bail out if so.
++ */
++ block = minix_blocks_needed(sbi->s_ninodes, s->s_blocksize);
++ if (sbi->s_imap_blocks < block) {
++ printk("MINIX-fs: file system does not have enough "
++ "imap blocks allocated. Refusing to mount\n");
++ goto out_iput;
++ }
++
++ block = minix_blocks_needed(
++ (sbi->s_nzones - (sbi->s_firstdatazone + 1)),
++ s->s_blocksize);
++ if (sbi->s_zmap_blocks < block) {
++ printk("MINIX-fs: file system does not have enough "
++ "zmap blocks allocated. Refusing to mount.\n");
++ goto out_iput;
++ }
++
+ return 0;
+
+ out_iput:
+@@ -339,10 +360,10 @@ static int minix_statfs(struct dentry *dentry, struct kstatfs *buf)
+ buf->f_type = sb->s_magic;
+ buf->f_bsize = sb->s_blocksize;
+ buf->f_blocks = (sbi->s_nzones - sbi->s_firstdatazone) << sbi->s_log_zone_size;
+- buf->f_bfree = minix_count_free_blocks(sbi);
++ buf->f_bfree = minix_count_free_blocks(sb);
+ buf->f_bavail = buf->f_bfree;
+ buf->f_files = sbi->s_ninodes;
+- buf->f_ffree = minix_count_free_inodes(sbi);
++ buf->f_ffree = minix_count_free_inodes(sb);
+ buf->f_namelen = sbi->s_namelen;
+ buf->f_fsid.val[0] = (u32)id;
+ buf->f_fsid.val[1] = (u32)(id >> 32);
+diff --git a/fs/minix/minix.h b/fs/minix/minix.h
+index 341e212..6415fe0 100644
+--- a/fs/minix/minix.h
++++ b/fs/minix/minix.h
+@@ -48,10 +48,10 @@ extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, stru
+ extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **);
+ extern struct inode * minix_new_inode(const struct inode *, int, int *);
+ extern void minix_free_inode(struct inode * inode);
+-extern unsigned long minix_count_free_inodes(struct minix_sb_info *sbi);
++extern unsigned long minix_count_free_inodes(struct super_block *sb);
+ extern int minix_new_block(struct inode * inode);
+ extern void minix_free_block(struct inode *inode, unsigned long block);
+-extern unsigned long minix_count_free_blocks(struct minix_sb_info *sbi);
++extern unsigned long minix_count_free_blocks(struct super_block *sb);
+ extern int minix_getattr(struct vfsmount *, struct dentry *, struct kstat *);
+ extern int minix_prepare_chunk(struct page *page, loff_t pos, unsigned len);
+
+@@ -88,6 +88,11 @@ static inline struct minix_inode_info *minix_i(struct inode *inode)
+ return list_entry(inode, struct minix_inode_info, vfs_inode);
+ }
+
++static inline unsigned minix_blocks_needed(unsigned bits, unsigned blocksize)
++{
++ return DIV_ROUND_UP(bits, blocksize * 8);
++}
++
+ #if defined(CONFIG_MINIX_FS_NATIVE_ENDIAN) && \
+ defined(CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED)
+
+diff --git a/fs/namei.c b/fs/namei.c
+index 3d15072..c1ddf9c 100644
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -281,16 +281,32 @@ int generic_permission(struct inode *inode, int mask)
+ if (ret != -EACCES)
+ return ret;
+
++#ifdef CONFIG_GRKERNSEC
++ /* we'll block if we have to log due to a denied capability use */
++ if (mask & MAY_NOT_BLOCK)
++ return -ECHILD;
++#endif
++
if (S_ISDIR(inode->i_mode)) {
/* DACs are overridable for directories */
- if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE))
- return 0;
if (!(mask & MAY_WRITE))
- if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
+- if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
++ if (ns_capable_nolog(inode_userns(inode), CAP_DAC_OVERRIDE) ||
++ ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
return 0;
+ if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE))
+ return 0;
@@ -45132,14 +46410,15 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
+ */
+ mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
+ if (mask == MAY_READ)
-+ if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
++ if (ns_capable_nolog(inode_userns(inode), CAP_DAC_OVERRIDE) ||
++ ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
+ return 0;
+
+ /*
* Read/write DACs are always overridable.
* Executable DACs are overridable when there is
* at least one exec bit set.
-@@ -299,14 +307,6 @@ int generic_permission(struct inode *ino
+@@ -299,14 +315,6 @@ int generic_permission(struct inode *inode, int mask)
if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE))
return 0;
@@ -45154,7 +46433,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
return -EACCES;
}
-@@ -653,11 +653,19 @@ follow_link(struct path *link, struct na
+@@ -653,11 +661,19 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
return error;
}
@@ -45175,30 +46454,45 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = 0;
if (s)
error = __vfs_follow_link(nd, s);
-@@ -1622,6 +1630,12 @@ static int path_lookupat(int dfd, const
+@@ -1622,6 +1638,21 @@ static int path_lookupat(int dfd, const char *name,
if (!err)
err = complete_walk(nd);
-+ if (!(nd->flags & LOOKUP_PARENT) && !gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
-+ if (!err)
-+ path_put(&nd->path);
-+ err = -ENOENT;
++ if (!(nd->flags & LOOKUP_PARENT)) {
++#ifdef CONFIG_GRKERNSEC
++ if (flags & LOOKUP_RCU) {
++ if (!err)
++ path_put(&nd->path);
++ err = -ECHILD;
++ } else
++#endif
++ if (!gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
++ if (!err)
++ path_put(&nd->path);
++ err = -ENOENT;
++ }
+ }
+
if (!err && nd->flags & LOOKUP_DIRECTORY) {
if (!nd->inode->i_op->lookup) {
path_put(&nd->path);
-@@ -1649,6 +1663,9 @@ static int do_path_lookup(int dfd, const
+@@ -1649,6 +1680,15 @@ static int do_path_lookup(int dfd, const char *name,
retval = path_lookupat(dfd, name, flags | LOOKUP_REVAL, nd);
if (likely(!retval)) {
-+ if (*name != '/' && nd->path.dentry && nd->inode && !gr_chroot_fchdir(nd->path.dentry, nd->path.mnt))
-+ return -ENOENT;
++ if (*name != '/' && nd->path.dentry && nd->inode) {
++#ifdef CONFIG_GRKERNSEC
++ if (flags & LOOKUP_RCU)
++ return -ECHILD;
++#endif
++ if (!gr_chroot_fchdir(nd->path.dentry, nd->path.mnt))
++ return -ENOENT;
++ }
+
if (unlikely(!audit_dummy_context())) {
if (nd->path.dentry && nd->inode)
audit_inode(name, nd->path.dentry);
-@@ -2049,7 +2066,27 @@ static int may_open(struct path *path, i
+@@ -2049,7 +2089,27 @@ static int may_open(struct path *path, int acc_mode, int flag)
/*
* Ensure there are no outstanding leases on the file.
*/
@@ -45227,10 +46521,16 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
}
static int handle_truncate(struct file *filp)
-@@ -2110,6 +2147,10 @@ static struct file *do_last(struct namei
+@@ -2110,6 +2170,16 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
error = complete_walk(nd);
if (error)
return ERR_PTR(error);
++#ifdef CONFIG_GRKERNSEC
++ if (nd->flags & LOOKUP_RCU) {
++ error = -ECHILD;
++ goto exit;
++ }
++#endif
+ if (!gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
+ error = -ENOENT;
+ goto exit;
@@ -45238,10 +46538,16 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
audit_inode(pathname, nd->path.dentry);
if (open_flag & O_CREAT) {
error = -EISDIR;
-@@ -2120,6 +2161,10 @@ static struct file *do_last(struct namei
+@@ -2120,6 +2190,16 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
error = complete_walk(nd);
if (error)
return ERR_PTR(error);
++#ifdef CONFIG_GRKERNSEC
++ if (nd->flags & LOOKUP_RCU) {
++ error = -ECHILD;
++ goto exit;
++ }
++#endif
+ if (!gr_acl_handle_hidden_file(dir, nd->path.mnt)) {
+ error = -ENOENT;
+ goto exit;
@@ -45249,19 +46555,24 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
audit_inode(pathname, dir);
goto ok;
}
-@@ -2142,6 +2187,11 @@ static struct file *do_last(struct namei
+@@ -2141,6 +2221,16 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
+ error = complete_walk(nd);
if (error)
return ERR_PTR(-ECHILD);
-
++#ifdef CONFIG_GRKERNSEC
++ if (nd->flags & LOOKUP_RCU) {
++ error = -ECHILD;
++ goto exit;
++ }
++#endif
+ if (!gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
+ error = -ENOENT;
+ goto exit;
+ }
-+
+
error = -ENOTDIR;
if (nd->flags & LOOKUP_DIRECTORY) {
- if (!nd->inode->i_op->lookup)
-@@ -2181,6 +2231,12 @@ static struct file *do_last(struct namei
+@@ -2181,6 +2271,12 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
/* Negative dentry, just create the file */
if (!dentry->d_inode) {
int mode = op->mode;
@@ -45274,7 +46585,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
if (!IS_POSIXACL(dir->d_inode))
mode &= ~current_umask();
/*
-@@ -2204,6 +2260,8 @@ static struct file *do_last(struct namei
+@@ -2204,6 +2300,8 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
error = vfs_create(dir->d_inode, dentry, mode, nd);
if (error)
goto exit_mutex_unlock;
@@ -45283,7 +46594,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
mutex_unlock(&dir->d_inode->i_mutex);
dput(nd->path.dentry);
nd->path.dentry = dentry;
-@@ -2213,6 +2271,19 @@ static struct file *do_last(struct namei
+@@ -2213,6 +2311,19 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
/*
* It already exists.
*/
@@ -45303,7 +46614,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
mutex_unlock(&dir->d_inode->i_mutex);
audit_inode(pathname, path->dentry);
-@@ -2425,6 +2496,11 @@ struct dentry *kern_path_create(int dfd,
+@@ -2425,6 +2536,11 @@ struct dentry *kern_path_create(int dfd, const char *pathname, struct path *path
*path = nd.path;
return dentry;
eexist:
@@ -45315,7 +46626,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
dput(dentry);
dentry = ERR_PTR(-EEXIST);
fail:
-@@ -2447,6 +2523,20 @@ struct dentry *user_path_create(int dfd,
+@@ -2447,6 +2563,20 @@ struct dentry *user_path_create(int dfd, const char __user *pathname, struct pat
}
EXPORT_SYMBOL(user_path_create);
@@ -45336,7 +46647,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
{
int error = may_create(dir, dentry);
-@@ -2514,6 +2604,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2514,6 +2644,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode,
error = mnt_want_write(path.mnt);
if (error)
goto out_dput;
@@ -45354,7 +46665,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = security_path_mknod(&path, dentry, mode, dev);
if (error)
goto out_drop_write;
-@@ -2531,6 +2632,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2531,6 +2672,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode,
}
out_drop_write:
mnt_drop_write(path.mnt);
@@ -45364,7 +46675,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
out_dput:
dput(dentry);
mutex_unlock(&path.dentry->d_inode->i_mutex);
-@@ -2580,12 +2684,21 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2580,12 +2724,21 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode)
error = mnt_want_write(path.mnt);
if (error)
goto out_dput;
@@ -45386,7 +46697,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
out_dput:
dput(dentry);
mutex_unlock(&path.dentry->d_inode->i_mutex);
-@@ -2665,6 +2778,8 @@ static long do_rmdir(int dfd, const char
+@@ -2665,6 +2818,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
char * name;
struct dentry *dentry;
struct nameidata nd;
@@ -45395,7 +46706,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2693,6 +2808,15 @@ static long do_rmdir(int dfd, const char
+@@ -2693,6 +2848,15 @@ static long do_rmdir(int dfd, const char __user *pathname)
error = -ENOENT;
goto exit3;
}
@@ -45411,7 +46722,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit3;
-@@ -2700,6 +2824,8 @@ static long do_rmdir(int dfd, const char
+@@ -2700,6 +2864,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
if (error)
goto exit4;
error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
@@ -45420,7 +46731,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
exit4:
mnt_drop_write(nd.path.mnt);
exit3:
-@@ -2762,6 +2888,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2762,6 +2928,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
@@ -45429,7 +46740,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2784,6 +2912,16 @@ static long do_unlinkat(int dfd, const c
+@@ -2784,6 +2952,16 @@ static long do_unlinkat(int dfd, const char __user *pathname)
if (!inode)
goto slashes;
ihold(inode);
@@ -45446,7 +46757,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit2;
-@@ -2791,6 +2929,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2791,6 +2969,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
if (error)
goto exit3;
error = vfs_unlink(nd.path.dentry->d_inode, dentry);
@@ -45455,7 +46766,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
exit3:
mnt_drop_write(nd.path.mnt);
exit2:
-@@ -2866,10 +3006,18 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -2866,10 +3046,18 @@ SYSCALL_DEFINE3(symlinkat, const char __user *, oldname,
error = mnt_want_write(path.mnt);
if (error)
goto out_dput;
@@ -45474,15 +46785,15 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
out_drop_write:
mnt_drop_write(path.mnt);
out_dput:
-@@ -2941,6 +3089,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2941,6 +3129,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
{
struct dentry *new_dentry;
struct path old_path, new_path;
-+ char *to;
++ char *to = NULL;
int how = 0;
int error;
-@@ -2964,7 +3113,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2964,7 +3153,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
if (error)
return error;
@@ -45491,7 +46802,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
goto out;
-@@ -2975,13 +3124,30 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -2975,13 +3164,30 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
error = mnt_want_write(new_path.mnt);
if (error)
goto out_dput;
@@ -45522,7 +46833,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
dput(new_dentry);
mutex_unlock(&new_path.dentry->d_inode->i_mutex);
path_put(&new_path);
-@@ -3153,6 +3319,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -3153,6 +3359,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
char *to;
int error;
@@ -45531,7 +46842,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = user_path_parent(olddfd, oldname, &oldnd, &from);
if (error)
goto exit;
-@@ -3209,6 +3377,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -3209,6 +3417,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
if (new_dentry == trap)
goto exit5;
@@ -45544,7 +46855,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
error = mnt_want_write(oldnd.path.mnt);
if (error)
goto exit5;
-@@ -3218,6 +3392,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -3218,6 +3432,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
goto exit6;
error = vfs_rename(old_dir->d_inode, old_dentry,
new_dir->d_inode, new_dentry);
@@ -45554,7 +46865,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
exit6:
mnt_drop_write(oldnd.path.mnt);
exit5:
-@@ -3243,6 +3420,8 @@ SYSCALL_DEFINE2(rename, const char __use
+@@ -3243,6 +3460,8 @@ SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newna
int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link)
{
@@ -45563,7 +46874,7 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
int len;
len = PTR_ERR(link);
-@@ -3252,7 +3431,14 @@ int vfs_readlink(struct dentry *dentry,
+@@ -3252,7 +3471,14 @@ int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const c
len = strlen(link);
if (len > (unsigned) buflen)
len = buflen;
@@ -45579,10 +46890,11 @@ diff -urNp linux-3.1.4/fs/namei.c linux-3.1.4/fs/namei.c
len = -EFAULT;
out:
return len;
-diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
---- linux-3.1.4/fs/namespace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/namespace.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1329,6 +1329,9 @@ static int do_umount(struct vfsmount *mn
+diff --git a/fs/namespace.c b/fs/namespace.c
+index e5e1c7d..019609e 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1329,6 +1329,9 @@ static int do_umount(struct vfsmount *mnt, int flags)
if (!(sb->s_flags & MS_RDONLY))
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
up_write(&sb->s_umount);
@@ -45592,7 +46904,7 @@ diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
return retval;
}
-@@ -1348,6 +1351,9 @@ static int do_umount(struct vfsmount *mn
+@@ -1348,6 +1351,9 @@ static int do_umount(struct vfsmount *mnt, int flags)
br_write_unlock(vfsmount_lock);
up_write(&namespace_sem);
release_mounts(&umount_list);
@@ -45602,7 +46914,7 @@ diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
return retval;
}
-@@ -2339,6 +2345,16 @@ long do_mount(char *dev_name, char *dir_
+@@ -2339,6 +2345,16 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
MS_STRICTATIME);
@@ -45619,7 +46931,7 @@ diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
-@@ -2353,6 +2369,9 @@ long do_mount(char *dev_name, char *dir_
+@@ -2353,6 +2369,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
dev_name, data_page);
dput_out:
path_put(&path);
@@ -45629,7 +46941,7 @@ diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
return retval;
}
-@@ -2576,6 +2595,11 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -2576,6 +2595,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
if (error)
goto out2;
@@ -45641,10 +46953,11 @@ diff -urNp linux-3.1.4/fs/namespace.c linux-3.1.4/fs/namespace.c
get_fs_root(current->fs, &root);
error = lock_mount(&old);
if (error)
-diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
---- linux-3.1.4/fs/ncpfs/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ncpfs/dir.c 2011-11-16 18:40:29.000000000 -0500
-@@ -299,6 +299,8 @@ ncp_lookup_validate(struct dentry *dentr
+diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
+index 9c51f62..503b252 100644
+--- a/fs/ncpfs/dir.c
++++ b/fs/ncpfs/dir.c
+@@ -299,6 +299,8 @@ ncp_lookup_validate(struct dentry *dentry, struct nameidata *nd)
int res, val = 0, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -45653,7 +46966,7 @@ diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
if (dentry == dentry->d_sb->s_root)
return 1;
-@@ -844,6 +846,8 @@ static struct dentry *ncp_lookup(struct
+@@ -844,6 +846,8 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, struc
int error, res, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -45662,7 +46975,7 @@ diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
error = -EIO;
if (!ncp_conn_valid(server))
goto finished;
-@@ -931,6 +935,8 @@ int ncp_create_new(struct inode *dir, st
+@@ -931,6 +935,8 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, int mode,
PPRINTK("ncp_create_new: creating %s/%s, mode=%x\n",
dentry->d_parent->d_name.name, dentry->d_name.name, mode);
@@ -45671,7 +46984,7 @@ diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
ncp_age_dentry(server, dentry);
len = sizeof(__name);
error = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-@@ -992,6 +998,8 @@ static int ncp_mkdir(struct inode *dir,
+@@ -992,6 +998,8 @@ static int ncp_mkdir(struct inode *dir, struct dentry *dentry, int mode)
int error, len;
__u8 __name[NCP_MAXPATHLEN + 1];
@@ -45680,7 +46993,7 @@ diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
DPRINTK("ncp_mkdir: making %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
-@@ -1140,6 +1148,8 @@ static int ncp_rename(struct inode *old_
+@@ -1140,6 +1148,8 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
int old_len, new_len;
__u8 __old_name[NCP_MAXPATHLEN + 1], __new_name[NCP_MAXPATHLEN + 1];
@@ -45689,10 +47002,11 @@ diff -urNp linux-3.1.4/fs/ncpfs/dir.c linux-3.1.4/fs/ncpfs/dir.c
DPRINTK("ncp_rename: %s/%s to %s/%s\n",
old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
new_dentry->d_parent->d_name.name, new_dentry->d_name.name);
-diff -urNp linux-3.1.4/fs/ncpfs/inode.c linux-3.1.4/fs/ncpfs/inode.c
---- linux-3.1.4/fs/ncpfs/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ncpfs/inode.c 2011-11-16 18:40:29.000000000 -0500
-@@ -461,6 +461,8 @@ static int ncp_fill_super(struct super_b
+diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
+index 202f370..9d4565e 100644
+--- a/fs/ncpfs/inode.c
++++ b/fs/ncpfs/inode.c
+@@ -461,6 +461,8 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
#endif
struct ncp_entry_info finfo;
@@ -45701,10 +47015,11 @@ diff -urNp linux-3.1.4/fs/ncpfs/inode.c linux-3.1.4/fs/ncpfs/inode.c
memset(&data, 0, sizeof(data));
server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
if (!server)
-diff -urNp linux-3.1.4/fs/nfs/blocklayout/blocklayout.c linux-3.1.4/fs/nfs/blocklayout/blocklayout.c
---- linux-3.1.4/fs/nfs/blocklayout/blocklayout.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/nfs/blocklayout/blocklayout.c 2011-11-16 18:39:08.000000000 -0500
-@@ -90,7 +90,7 @@ static int is_writable(struct pnfs_block
+diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
+index 281ae95..dd895b9 100644
+--- a/fs/nfs/blocklayout/blocklayout.c
++++ b/fs/nfs/blocklayout/blocklayout.c
+@@ -90,7 +90,7 @@ static int is_writable(struct pnfs_block_extent *be, sector_t isect)
*/
struct parallel_io {
struct kref refcnt;
@@ -45713,10 +47028,11 @@ diff -urNp linux-3.1.4/fs/nfs/blocklayout/blocklayout.c linux-3.1.4/fs/nfs/block
void (*pnfs_callback) (void *data);
void *data;
};
-diff -urNp linux-3.1.4/fs/nfs/inode.c linux-3.1.4/fs/nfs/inode.c
---- linux-3.1.4/fs/nfs/inode.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/fs/nfs/inode.c 2011-11-26 20:00:43.000000000 -0500
-@@ -150,7 +150,7 @@ static void nfs_zap_caches_locked(struct
+diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
+index 679d2f5..ef1ffec 100644
+--- a/fs/nfs/inode.c
++++ b/fs/nfs/inode.c
+@@ -150,7 +150,7 @@ static void nfs_zap_caches_locked(struct inode *inode)
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
nfsi->attrtimeo_timestamp = jiffies;
@@ -45725,7 +47041,7 @@ diff -urNp linux-3.1.4/fs/nfs/inode.c linux-3.1.4/fs/nfs/inode.c
if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
else
-@@ -1002,16 +1002,16 @@ static int nfs_size_need_update(const st
+@@ -1002,16 +1002,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
}
@@ -45745,10 +47061,11 @@ diff -urNp linux-3.1.4/fs/nfs/inode.c linux-3.1.4/fs/nfs/inode.c
}
void nfs_fattr_init(struct nfs_fattr *fattr)
-diff -urNp linux-3.1.4/fs/nfsd/nfs4state.c linux-3.1.4/fs/nfsd/nfs4state.c
---- linux-3.1.4/fs/nfsd/nfs4state.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/nfsd/nfs4state.c 2011-11-16 18:40:29.000000000 -0500
-@@ -3999,6 +3999,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
+diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
+index 6f8bcc7..8f823c5 100644
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -3999,6 +3999,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
unsigned int strhashval;
int err;
@@ -45757,10 +47074,11 @@ diff -urNp linux-3.1.4/fs/nfsd/nfs4state.c linux-3.1.4/fs/nfsd/nfs4state.c
dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n",
(long long) lock->lk_offset,
(long long) lock->lk_length);
-diff -urNp linux-3.1.4/fs/nfsd/nfs4xdr.c linux-3.1.4/fs/nfsd/nfs4xdr.c
---- linux-3.1.4/fs/nfsd/nfs4xdr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/nfsd/nfs4xdr.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1875,6 +1875,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
+diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
+index f810996..cec8977 100644
+--- a/fs/nfsd/nfs4xdr.c
++++ b/fs/nfsd/nfs4xdr.c
+@@ -1875,6 +1875,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
.dentry = dentry,
};
@@ -45769,10 +47087,11 @@ diff -urNp linux-3.1.4/fs/nfsd/nfs4xdr.c linux-3.1.4/fs/nfsd/nfs4xdr.c
BUG_ON(bmval1 & NFSD_WRITEONLY_ATTRS_WORD1);
BUG_ON(bmval0 & ~nfsd_suppattrs0(minorversion));
BUG_ON(bmval1 & ~nfsd_suppattrs1(minorversion));
-diff -urNp linux-3.1.4/fs/nfsd/vfs.c linux-3.1.4/fs/nfsd/vfs.c
---- linux-3.1.4/fs/nfsd/vfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/nfsd/vfs.c 2011-11-16 18:39:08.000000000 -0500
-@@ -896,7 +896,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
+index acf88ae..4fd6245 100644
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -896,7 +896,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
} else {
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -45781,7 +47100,7 @@ diff -urNp linux-3.1.4/fs/nfsd/vfs.c linux-3.1.4/fs/nfsd/vfs.c
set_fs(oldfs);
}
-@@ -1000,7 +1000,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1000,7 +1000,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -45790,7 +47109,7 @@ diff -urNp linux-3.1.4/fs/nfsd/vfs.c linux-3.1.4/fs/nfsd/vfs.c
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
-@@ -1535,7 +1535,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
+@@ -1535,7 +1535,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
*/
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -45799,10 +47118,11 @@ diff -urNp linux-3.1.4/fs/nfsd/vfs.c linux-3.1.4/fs/nfsd/vfs.c
set_fs(oldfs);
if (host_err < 0)
-diff -urNp linux-3.1.4/fs/notify/fanotify/fanotify_user.c linux-3.1.4/fs/notify/fanotify/fanotify_user.c
---- linux-3.1.4/fs/notify/fanotify/fanotify_user.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/notify/fanotify/fanotify_user.c 2011-11-16 18:39:08.000000000 -0500
-@@ -276,7 +276,8 @@ static ssize_t copy_event_to_user(struct
+diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
+index 9fde1c0..14e8827 100644
+--- a/fs/notify/fanotify/fanotify_user.c
++++ b/fs/notify/fanotify/fanotify_user.c
+@@ -276,7 +276,8 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,
goto out_close_fd;
ret = -EFAULT;
@@ -45812,10 +47132,11 @@ diff -urNp linux-3.1.4/fs/notify/fanotify/fanotify_user.c linux-3.1.4/fs/notify/
fanotify_event_metadata.event_len))
goto out_kill_access_response;
-diff -urNp linux-3.1.4/fs/notify/notification.c linux-3.1.4/fs/notify/notification.c
---- linux-3.1.4/fs/notify/notification.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/notify/notification.c 2011-11-16 18:39:08.000000000 -0500
-@@ -57,7 +57,7 @@ static struct kmem_cache *fsnotify_event
+diff --git a/fs/notify/notification.c b/fs/notify/notification.c
+index ee18815..7aa5d01 100644
+--- a/fs/notify/notification.c
++++ b/fs/notify/notification.c
+@@ -57,7 +57,7 @@ static struct kmem_cache *fsnotify_event_holder_cachep;
* get set to 0 so it will never get 'freed'
*/
static struct fsnotify_event *q_overflow_event;
@@ -45824,7 +47145,7 @@ diff -urNp linux-3.1.4/fs/notify/notification.c linux-3.1.4/fs/notify/notificati
/**
* fsnotify_get_cookie - return a unique cookie for use in synchronizing events.
-@@ -65,7 +65,7 @@ static atomic_t fsnotify_sync_cookie = A
+@@ -65,7 +65,7 @@ static atomic_t fsnotify_sync_cookie = ATOMIC_INIT(0);
*/
u32 fsnotify_get_cookie(void)
{
@@ -45833,9 +47154,10 @@ diff -urNp linux-3.1.4/fs/notify/notification.c linux-3.1.4/fs/notify/notificati
}
EXPORT_SYMBOL_GPL(fsnotify_get_cookie);
-diff -urNp linux-3.1.4/fs/ntfs/dir.c linux-3.1.4/fs/ntfs/dir.c
---- linux-3.1.4/fs/ntfs/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ntfs/dir.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
+index 99e3610..02c1068 100644
+--- a/fs/ntfs/dir.c
++++ b/fs/ntfs/dir.c
@@ -1329,7 +1329,7 @@ find_next_index_buffer:
ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
~(s64)(ndir->itype.index.block_size - 1)));
@@ -45845,10 +47167,11 @@ diff -urNp linux-3.1.4/fs/ntfs/dir.c linux-3.1.4/fs/ntfs/dir.c
ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
"inode 0x%lx or driver bug.", vdir->i_ino);
goto err_out;
-diff -urNp linux-3.1.4/fs/ntfs/file.c linux-3.1.4/fs/ntfs/file.c
---- linux-3.1.4/fs/ntfs/file.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ntfs/file.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2229,6 +2229,6 @@ const struct inode_operations ntfs_file_
+diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
+index c587e2d..3641eaa 100644
+--- a/fs/ntfs/file.c
++++ b/fs/ntfs/file.c
+@@ -2229,6 +2229,6 @@ const struct inode_operations ntfs_file_inode_ops = {
#endif /* NTFS_RW */
};
@@ -45857,10 +47180,11 @@ diff -urNp linux-3.1.4/fs/ntfs/file.c linux-3.1.4/fs/ntfs/file.c
-const struct inode_operations ntfs_empty_inode_ops = {};
+const struct inode_operations ntfs_empty_inode_ops __read_only;
-diff -urNp linux-3.1.4/fs/ocfs2/localalloc.c linux-3.1.4/fs/ocfs2/localalloc.c
---- linux-3.1.4/fs/ocfs2/localalloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/localalloc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1283,7 +1283,7 @@ static int ocfs2_local_alloc_slide_windo
+diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
+index 210c352..a174f83 100644
+--- a/fs/ocfs2/localalloc.c
++++ b/fs/ocfs2/localalloc.c
+@@ -1283,7 +1283,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
goto bail;
}
@@ -45869,10 +47193,11 @@ diff -urNp linux-3.1.4/fs/ocfs2/localalloc.c linux-3.1.4/fs/ocfs2/localalloc.c
bail:
if (handle)
-diff -urNp linux-3.1.4/fs/ocfs2/namei.c linux-3.1.4/fs/ocfs2/namei.c
---- linux-3.1.4/fs/ocfs2/namei.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/namei.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1063,6 +1063,8 @@ static int ocfs2_rename(struct inode *ol
+diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
+index 53aa41e..d7df9f1 100644
+--- a/fs/ocfs2/namei.c
++++ b/fs/ocfs2/namei.c
+@@ -1063,6 +1063,8 @@ static int ocfs2_rename(struct inode *old_dir,
struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
struct ocfs2_dir_lookup_result target_insert = { NULL, };
@@ -45881,9 +47206,10 @@ diff -urNp linux-3.1.4/fs/ocfs2/namei.c linux-3.1.4/fs/ocfs2/namei.c
/* At some point it might be nice to break this function up a
* bit. */
-diff -urNp linux-3.1.4/fs/ocfs2/ocfs2.h linux-3.1.4/fs/ocfs2/ocfs2.h
---- linux-3.1.4/fs/ocfs2/ocfs2.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/ocfs2.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
+index 4092858..51c70ff 100644
+--- a/fs/ocfs2/ocfs2.h
++++ b/fs/ocfs2/ocfs2.h
@@ -235,11 +235,11 @@ enum ocfs2_vol_state
struct ocfs2_alloc_stats
@@ -45901,10 +47227,11 @@ diff -urNp linux-3.1.4/fs/ocfs2/ocfs2.h linux-3.1.4/fs/ocfs2/ocfs2.h
};
enum ocfs2_local_alloc_state
-diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
---- linux-3.1.4/fs/ocfs2/suballoc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/suballoc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -872,7 +872,7 @@ static int ocfs2_reserve_suballoc_bits(s
+diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
+index ba5d97e..c77db25 100644
+--- a/fs/ocfs2/suballoc.c
++++ b/fs/ocfs2/suballoc.c
+@@ -872,7 +872,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
mlog_errno(status);
goto bail;
}
@@ -45913,7 +47240,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
/* You should never ask for this much metadata */
BUG_ON(bits_wanted >
-@@ -2008,7 +2008,7 @@ int ocfs2_claim_metadata(handle_t *handl
+@@ -2008,7 +2008,7 @@ int ocfs2_claim_metadata(handle_t *handle,
mlog_errno(status);
goto bail;
}
@@ -45922,7 +47249,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
*suballoc_loc = res.sr_bg_blkno;
*suballoc_bit_start = res.sr_bit_offset;
-@@ -2172,7 +2172,7 @@ int ocfs2_claim_new_inode_at_loc(handle_
+@@ -2172,7 +2172,7 @@ int ocfs2_claim_new_inode_at_loc(handle_t *handle,
trace_ocfs2_claim_new_inode_at_loc((unsigned long long)di_blkno,
res->sr_bits);
@@ -45931,7 +47258,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
BUG_ON(res->sr_bits != 1);
-@@ -2214,7 +2214,7 @@ int ocfs2_claim_new_inode(handle_t *hand
+@@ -2214,7 +2214,7 @@ int ocfs2_claim_new_inode(handle_t *handle,
mlog_errno(status);
goto bail;
}
@@ -45940,7 +47267,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
BUG_ON(res.sr_bits != 1);
-@@ -2318,7 +2318,7 @@ int __ocfs2_claim_clusters(handle_t *han
+@@ -2318,7 +2318,7 @@ int __ocfs2_claim_clusters(handle_t *handle,
cluster_start,
num_clusters);
if (!status)
@@ -45949,7 +47276,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
} else {
if (min_clusters > (osb->bitmap_cpg - 1)) {
/* The only paths asking for contiguousness
-@@ -2344,7 +2344,7 @@ int __ocfs2_claim_clusters(handle_t *han
+@@ -2344,7 +2344,7 @@ int __ocfs2_claim_clusters(handle_t *handle,
ocfs2_desc_bitmap_to_cluster_off(ac->ac_inode,
res.sr_bg_blkno,
res.sr_bit_offset);
@@ -45958,10 +47285,11 @@ diff -urNp linux-3.1.4/fs/ocfs2/suballoc.c linux-3.1.4/fs/ocfs2/suballoc.c
*num_clusters = res.sr_bits;
}
}
-diff -urNp linux-3.1.4/fs/ocfs2/super.c linux-3.1.4/fs/ocfs2/super.c
---- linux-3.1.4/fs/ocfs2/super.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/super.c 2011-11-16 18:39:08.000000000 -0500
-@@ -300,11 +300,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
+diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
+index 56f6102..1433c29 100644
+--- a/fs/ocfs2/super.c
++++ b/fs/ocfs2/super.c
+@@ -300,11 +300,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
"%10s => GlobalAllocs: %d LocalAllocs: %d "
"SubAllocs: %d LAWinMoves: %d SAExtends: %d\n",
"Stats",
@@ -45978,7 +47306,7 @@ diff -urNp linux-3.1.4/fs/ocfs2/super.c linux-3.1.4/fs/ocfs2/super.c
out += snprintf(buf + out, len - out,
"%10s => State: %u Descriptor: %llu Size: %u bits "
-@@ -2112,11 +2112,11 @@ static int ocfs2_initialize_super(struct
+@@ -2112,11 +2112,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
spin_lock_init(&osb->osb_xattr_lock);
ocfs2_init_steal_slots(osb);
@@ -45995,9 +47323,10 @@ diff -urNp linux-3.1.4/fs/ocfs2/super.c linux-3.1.4/fs/ocfs2/super.c
/* Copy the blockcheck stats from the superblock probe */
osb->osb_ecc_stats = *stats;
-diff -urNp linux-3.1.4/fs/ocfs2/symlink.c linux-3.1.4/fs/ocfs2/symlink.c
---- linux-3.1.4/fs/ocfs2/symlink.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/ocfs2/symlink.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c
+index 5d22872..523db20 100644
+--- a/fs/ocfs2/symlink.c
++++ b/fs/ocfs2/symlink.c
@@ -142,7 +142,7 @@ bail:
static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
@@ -46007,10 +47336,11 @@ diff -urNp linux-3.1.4/fs/ocfs2/symlink.c linux-3.1.4/fs/ocfs2/symlink.c
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
---- linux-3.1.4/fs/open.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/open.c 2011-11-17 19:07:55.000000000 -0500
-@@ -112,6 +112,10 @@ static long do_sys_truncate(const char _
+diff --git a/fs/open.c b/fs/open.c
+index f711921..28d5958 100644
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -112,6 +112,10 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
error = locks_verify_truncate(inode, NULL, length);
if (!error)
error = security_path_truncate(&path);
@@ -46021,7 +47351,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
if (!error)
error = do_truncate(path.dentry, length, 0, NULL);
-@@ -358,6 +362,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con
+@@ -358,6 +362,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
if (__mnt_is_readonly(path.mnt))
res = -EROFS;
@@ -46031,7 +47361,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
out_path_release:
path_put(&path);
out:
-@@ -384,6 +391,8 @@ SYSCALL_DEFINE1(chdir, const char __user
+@@ -384,6 +391,8 @@ SYSCALL_DEFINE1(chdir, const char __user *, filename)
if (error)
goto dput_and_out;
@@ -46040,7 +47370,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
set_fs_pwd(current->fs, &path);
dput_and_out:
-@@ -410,6 +419,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd
+@@ -410,6 +419,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
goto out_putf;
error = inode_permission(inode, MAY_EXEC | MAY_CHDIR);
@@ -46054,7 +47384,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
if (!error)
set_fs_pwd(current->fs, &file->f_path);
out_putf:
-@@ -438,7 +454,13 @@ SYSCALL_DEFINE1(chroot, const char __use
+@@ -438,7 +454,13 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
if (error)
goto dput_and_out;
@@ -46068,7 +47398,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
error = 0;
dput_and_out:
path_put(&path);
-@@ -456,6 +478,16 @@ static int chmod_common(struct path *pat
+@@ -456,6 +478,16 @@ static int chmod_common(struct path *path, umode_t mode)
if (error)
return error;
mutex_lock(&inode->i_mutex);
@@ -46085,7 +47415,7 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
error = security_path_chmod(path->dentry, path->mnt, mode);
if (error)
goto out_unlock;
-@@ -506,6 +538,9 @@ static int chown_common(struct path *pat
+@@ -506,6 +538,9 @@ static int chown_common(struct path *path, uid_t user, gid_t group)
int error;
struct iattr newattrs;
@@ -46095,10 +47425,11 @@ diff -urNp linux-3.1.4/fs/open.c linux-3.1.4/fs/open.c
newattrs.ia_valid = ATTR_CTIME;
if (user != (uid_t) -1) {
newattrs.ia_valid |= ATTR_UID;
-diff -urNp linux-3.1.4/fs/partitions/ldm.c linux-3.1.4/fs/partitions/ldm.c
---- linux-3.1.4/fs/partitions/ldm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/partitions/ldm.c 2011-11-17 19:08:15.000000000 -0500
-@@ -1322,7 +1322,7 @@ static bool ldm_frag_add (const u8 *data
+diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c
+index af9fdf0..75b15c3 100644
+--- a/fs/partitions/ldm.c
++++ b/fs/partitions/ldm.c
+@@ -1322,7 +1322,7 @@ static bool ldm_frag_add (const u8 *data, int size, struct list_head *frags)
goto found;
}
@@ -46107,9 +47438,10 @@ diff -urNp linux-3.1.4/fs/partitions/ldm.c linux-3.1.4/fs/partitions/ldm.c
if (!f) {
ldm_crit ("Out of memory.");
return false;
-diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
---- linux-3.1.4/fs/pipe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/pipe.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/pipe.c b/fs/pipe.c
+index 0e0be1d..f62a72d 100644
+--- a/fs/pipe.c
++++ b/fs/pipe.c
@@ -420,9 +420,9 @@ redo:
}
if (bufs) /* More to do? */
@@ -46122,7 +47454,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
/* syscall merging: Usually we must not sleep
* if O_NONBLOCK is set, or if we got some data.
* But if a writer sleeps in kernel space, then
-@@ -481,7 +481,7 @@ pipe_write(struct kiocb *iocb, const str
+@@ -481,7 +481,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
mutex_lock(&inode->i_mutex);
pipe = inode->i_pipe;
@@ -46152,7 +47484,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
}
out:
mutex_unlock(&inode->i_mutex);
-@@ -685,7 +685,7 @@ pipe_poll(struct file *filp, poll_table
+@@ -685,7 +685,7 @@ pipe_poll(struct file *filp, poll_table *wait)
mask = 0;
if (filp->f_mode & FMODE_READ) {
mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
@@ -46161,7 +47493,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
mask |= POLLHUP;
}
-@@ -695,7 +695,7 @@ pipe_poll(struct file *filp, poll_table
+@@ -695,7 +695,7 @@ pipe_poll(struct file *filp, poll_table *wait)
* Most Unices do not set POLLERR for FIFOs but on Linux they
* behave exactly like pipes for poll().
*/
@@ -46170,7 +47502,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
mask |= POLLERR;
}
-@@ -709,10 +709,10 @@ pipe_release(struct inode *inode, int de
+@@ -709,10 +709,10 @@ pipe_release(struct inode *inode, int decr, int decw)
mutex_lock(&inode->i_mutex);
pipe = inode->i_pipe;
@@ -46184,7 +47516,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
free_pipe_info(inode);
} else {
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP);
-@@ -802,7 +802,7 @@ pipe_read_open(struct inode *inode, stru
+@@ -802,7 +802,7 @@ pipe_read_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
@@ -46193,7 +47525,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
}
mutex_unlock(&inode->i_mutex);
-@@ -819,7 +819,7 @@ pipe_write_open(struct inode *inode, str
+@@ -819,7 +819,7 @@ pipe_write_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
@@ -46202,7 +47534,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
}
mutex_unlock(&inode->i_mutex);
-@@ -837,9 +837,9 @@ pipe_rdwr_open(struct inode *inode, stru
+@@ -837,9 +837,9 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
if (inode->i_pipe) {
ret = 0;
if (filp->f_mode & FMODE_READ)
@@ -46223,7 +47555,7 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
/*
* pipefs_dname() is called from d_path().
-@@ -961,7 +961,8 @@ static struct inode * get_pipe_inode(voi
+@@ -961,7 +961,8 @@ static struct inode * get_pipe_inode(void)
goto fail_iput;
inode->i_pipe = pipe;
@@ -46233,9 +47565,41 @@ diff -urNp linux-3.1.4/fs/pipe.c linux-3.1.4/fs/pipe.c
inode->i_fop = &rdwr_pipefifo_fops;
/*
-diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
---- linux-3.1.4/fs/proc/array.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/array.c 2011-11-17 18:42:02.000000000 -0500
+diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
+index 15af622..0e9f4467 100644
+--- a/fs/proc/Kconfig
++++ b/fs/proc/Kconfig
+@@ -30,12 +30,12 @@ config PROC_FS
+
+ config PROC_KCORE
+ bool "/proc/kcore support" if !ARM
+- depends on PROC_FS && MMU
++ depends on PROC_FS && MMU && !GRKERNSEC_PROC_ADD
+
+ config PROC_VMCORE
+ bool "/proc/vmcore support"
+- depends on PROC_FS && CRASH_DUMP
+- default y
++ depends on PROC_FS && CRASH_DUMP && !GRKERNSEC
++ default n
+ help
+ Exports the dump image of crashed kernel in ELF format.
+
+@@ -59,8 +59,8 @@ config PROC_SYSCTL
+ limited in memory.
+
+ config PROC_PAGE_MONITOR
+- default y
+- depends on PROC_FS && MMU
++ default n
++ depends on PROC_FS && MMU && !GRKERNSEC
+ bool "Enable /proc page monitoring" if EXPERT
+ help
+ Various /proc files exist to monitor process memory utilization:
+diff --git a/fs/proc/array.c b/fs/proc/array.c
+index 3a1dafd..c7fed72 100644
+--- a/fs/proc/array.c
++++ b/fs/proc/array.c
@@ -60,6 +60,7 @@
#include <linux/tty.h>
#include <linux/string.h>
@@ -46244,7 +47608,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
#include <linux/proc_fs.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
-@@ -337,6 +338,21 @@ static void task_cpus_allowed(struct seq
+@@ -337,6 +338,21 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
seq_putc(m, '\n');
}
@@ -46266,7 +47630,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task)
{
-@@ -354,9 +370,24 @@ int proc_pid_status(struct seq_file *m,
+@@ -354,9 +370,24 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
task_cpus_allowed(m, task);
cpuset_task_status_allowed(m, task);
task_context_switch_counts(m, task);
@@ -46291,7 +47655,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task, int whole)
{
-@@ -378,6 +409,8 @@ static int do_task_stat(struct seq_file
+@@ -378,6 +409,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
char tcomm[sizeof(task->comm)];
unsigned long flags;
@@ -46300,7 +47664,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
state = *get_task_state(task);
vsize = eip = esp = 0;
permitted = ptrace_may_access(task, PTRACE_MODE_READ);
-@@ -449,6 +482,19 @@ static int do_task_stat(struct seq_file
+@@ -449,6 +482,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
gtime = task->gtime;
}
@@ -46320,7 +47684,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
priority = task_prio(task);
-@@ -489,9 +535,15 @@ static int do_task_stat(struct seq_file
+@@ -489,9 +535,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
vsize,
mm ? get_mm_rss(mm) : 0,
rsslim,
@@ -46336,7 +47700,7 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
esp,
eip,
/* The signal information here is obsolete.
-@@ -544,3 +596,18 @@ int proc_pid_statm(struct seq_file *m, s
+@@ -544,3 +596,18 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
return 0;
}
@@ -46355,9 +47719,10 @@ diff -urNp linux-3.1.4/fs/proc/array.c linux-3.1.4/fs/proc/array.c
+ return sprintf(buffer, "%pI4\n", &curr_ip);
+}
+#endif
-diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
---- linux-3.1.4/fs/proc/base.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/base.c 2011-11-17 18:43:19.000000000 -0500
+diff --git a/fs/proc/base.c b/fs/proc/base.c
+index 5eb0206..7e0dc06 100644
+--- a/fs/proc/base.c
++++ b/fs/proc/base.c
@@ -107,6 +107,22 @@ struct pid_entry {
union proc_op op;
};
@@ -46381,7 +47746,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
#define NOD(NAME, MODE, IOP, FOP, OP) { \
.name = (NAME), \
.len = sizeof(NAME) - 1, \
-@@ -209,6 +225,9 @@ static struct mm_struct *__check_mem_per
+@@ -209,6 +225,9 @@ static struct mm_struct *__check_mem_permission(struct task_struct *task)
if (task == current)
return mm;
@@ -46391,7 +47756,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
/*
* If current is actively ptrace'ing, and would also be
* permitted to freshly attach with ptrace now, permit it.
-@@ -282,6 +301,9 @@ static int proc_pid_cmdline(struct task_
+@@ -282,6 +301,9 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
if (!mm->arg_end)
goto out_mm; /* Shh! No looking before we're done */
@@ -46430,7 +47795,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
do {
nwords += 2;
} while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
-@@ -328,7 +366,7 @@ static int proc_pid_auxv(struct task_str
+@@ -328,7 +366,7 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
}
@@ -46439,7 +47804,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
/*
* Provides a wchan file via kallsyms in a proper one-value-per-file format.
* Returns the resolved symbol. If that fails, simply return the address.
-@@ -367,7 +405,7 @@ static void unlock_trace(struct task_str
+@@ -367,7 +405,7 @@ static void unlock_trace(struct task_struct *task)
mutex_unlock(&task->signal->cred_guard_mutex);
}
@@ -46448,7 +47813,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
#define MAX_STACK_TRACE_DEPTH 64
-@@ -558,7 +596,7 @@ static int proc_pid_limits(struct task_s
+@@ -558,7 +596,7 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)
return count;
}
@@ -46457,7 +47822,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
static int proc_pid_syscall(struct task_struct *task, char *buffer)
{
long nr;
-@@ -587,7 +625,7 @@ static int proc_pid_syscall(struct task_
+@@ -587,7 +625,7 @@ static int proc_pid_syscall(struct task_struct *task, char *buffer)
/************************************************************************/
/* permission checks */
@@ -46466,7 +47831,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
{
struct task_struct *task;
int allowed = 0;
-@@ -597,7 +635,10 @@ static int proc_fd_access_allowed(struct
+@@ -597,7 +635,10 @@ static int proc_fd_access_allowed(struct inode *inode)
*/
task = get_proc_task(inode);
if (task) {
@@ -46478,7 +47843,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
put_task_struct(task);
}
return allowed;
-@@ -978,6 +1019,9 @@ static ssize_t environ_read(struct file
+@@ -978,6 +1019,9 @@ static ssize_t environ_read(struct file *file, char __user *buf,
if (!task)
goto out_no_task;
@@ -46488,7 +47853,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
ret = -ENOMEM;
page = (char *)__get_free_page(GFP_TEMPORARY);
if (!page)
-@@ -1613,7 +1657,7 @@ static void *proc_pid_follow_link(struct
+@@ -1613,7 +1657,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
path_put(&nd->path);
/* Are we allowed to snoop on the tasks file descriptors? */
@@ -46497,7 +47862,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
goto out;
error = PROC_I(inode)->op.proc_get_link(inode, &nd->path);
-@@ -1652,8 +1696,18 @@ static int proc_pid_readlink(struct dent
+@@ -1652,8 +1696,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
struct path path;
/* Are we allowed to snoop on the tasks file descriptors? */
@@ -46518,7 +47883,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
error = PROC_I(inode)->op.proc_get_link(inode, &path);
if (error)
-@@ -1718,7 +1772,11 @@ struct inode *proc_pid_make_inode(struct
+@@ -1718,7 +1772,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
rcu_read_lock();
cred = __task_cred(task);
inode->i_uid = cred->euid;
@@ -46530,7 +47895,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
rcu_read_unlock();
}
security_task_to_inode(task, inode);
-@@ -1736,6 +1794,9 @@ int pid_getattr(struct vfsmount *mnt, st
+@@ -1736,6 +1794,9 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
struct inode *inode = dentry->d_inode;
struct task_struct *task;
const struct cred *cred;
@@ -46540,7 +47905,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
generic_fillattr(inode, stat);
-@@ -1743,13 +1804,41 @@ int pid_getattr(struct vfsmount *mnt, st
+@@ -1743,13 +1804,41 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
stat->uid = 0;
stat->gid = 0;
task = pid_task(proc_pid(inode), PIDTYPE_PID);
@@ -46583,7 +47948,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
}
rcu_read_unlock();
return 0;
-@@ -1786,11 +1875,20 @@ int pid_revalidate(struct dentry *dentry
+@@ -1786,11 +1875,20 @@ int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
if (task) {
if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -46604,7 +47969,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
rcu_read_unlock();
} else {
inode->i_uid = 0;
-@@ -1908,7 +2006,8 @@ static int proc_fd_info(struct inode *in
+@@ -1908,7 +2006,8 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
int fd = proc_fd(inode);
if (task) {
@@ -46614,7 +47979,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
put_task_struct(task);
}
if (files) {
-@@ -2176,11 +2275,21 @@ static const struct file_operations proc
+@@ -2176,11 +2275,21 @@ static const struct file_operations proc_fd_operations = {
*/
static int proc_fd_permission(struct inode *inode, int mask)
{
@@ -46638,7 +48003,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
return rv;
}
-@@ -2290,6 +2399,9 @@ static struct dentry *proc_pident_lookup
+@@ -2290,6 +2399,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
if (!task)
goto out_no_task;
@@ -46648,7 +48013,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
/*
* Yes, it does not scale. And it should not. Don't add
* new entries into /proc/<tgid>/ without very good reasons.
-@@ -2334,6 +2446,9 @@ static int proc_pident_readdir(struct fi
+@@ -2334,6 +2446,9 @@ static int proc_pident_readdir(struct file *filp,
if (!task)
goto out_no_task;
@@ -46658,7 +48023,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
ret = 0;
i = filp->f_pos;
switch (i) {
-@@ -2604,7 +2719,7 @@ static void *proc_self_follow_link(struc
+@@ -2604,7 +2719,7 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd,
void *cookie)
{
@@ -46667,7 +48032,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
if (!IS_ERR(s))
__putname(s);
}
-@@ -2802,7 +2917,7 @@ static const struct pid_entry tgid_base_
+@@ -2802,7 +2917,7 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -46676,7 +48041,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
INF("syscall", S_IRUGO, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2827,10 +2942,10 @@ static const struct pid_entry tgid_base_
+@@ -2827,10 +2942,10 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -46689,7 +48054,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
ONE("stack", S_IRUGO, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-@@ -2864,6 +2979,9 @@ static const struct pid_entry tgid_base_
+@@ -2864,6 +2979,9 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_HARDWALL
INF("hardwall", S_IRUGO, proc_pid_hardwall),
#endif
@@ -46699,7 +48064,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
};
static int proc_tgid_base_readdir(struct file * filp,
-@@ -2989,7 +3107,14 @@ static struct dentry *proc_pid_instantia
+@@ -2989,7 +3107,14 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
if (!inode)
goto out;
@@ -46714,7 +48079,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -3031,7 +3156,14 @@ struct dentry *proc_pid_lookup(struct in
+@@ -3031,7 +3156,14 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
if (!task)
goto out;
@@ -46729,7 +48094,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
put_task_struct(task);
out:
return result;
-@@ -3096,6 +3228,11 @@ int proc_pid_readdir(struct file * filp,
+@@ -3096,6 +3228,11 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
unsigned int nr;
struct task_struct *reaper;
@@ -46741,7 +48106,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
struct tgid_iter iter;
struct pid_namespace *ns;
-@@ -3119,8 +3256,27 @@ int proc_pid_readdir(struct file * filp,
+@@ -3119,8 +3256,27 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
for (iter = next_tgid(ns, iter);
iter.task;
iter.tgid += 1, iter = next_tgid(ns, iter)) {
@@ -46770,7 +48135,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
put_task_struct(iter.task);
goto out;
}
-@@ -3148,7 +3304,7 @@ static const struct pid_entry tid_base_s
+@@ -3148,7 +3304,7 @@ static const struct pid_entry tid_base_stuff[] = {
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -46779,7 +48144,7 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
INF("syscall", S_IRUGO, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -3172,10 +3328,10 @@ static const struct pid_entry tid_base_s
+@@ -3172,10 +3328,10 @@ static const struct pid_entry tid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -46792,10 +48157,11 @@ diff -urNp linux-3.1.4/fs/proc/base.c linux-3.1.4/fs/proc/base.c
ONE("stack", S_IRUGO, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-diff -urNp linux-3.1.4/fs/proc/cmdline.c linux-3.1.4/fs/proc/cmdline.c
---- linux-3.1.4/fs/proc/cmdline.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/cmdline.c 2011-11-16 18:40:29.000000000 -0500
-@@ -23,7 +23,11 @@ static const struct file_operations cmdl
+diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
+index 82676e3..5f8518a 100644
+--- a/fs/proc/cmdline.c
++++ b/fs/proc/cmdline.c
+@@ -23,7 +23,11 @@ static const struct file_operations cmdline_proc_fops = {
static int __init proc_cmdline_init(void)
{
@@ -46807,10 +48173,11 @@ diff -urNp linux-3.1.4/fs/proc/cmdline.c linux-3.1.4/fs/proc/cmdline.c
return 0;
}
module_init(proc_cmdline_init);
-diff -urNp linux-3.1.4/fs/proc/devices.c linux-3.1.4/fs/proc/devices.c
---- linux-3.1.4/fs/proc/devices.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/devices.c 2011-11-16 18:40:29.000000000 -0500
-@@ -64,7 +64,11 @@ static const struct file_operations proc
+diff --git a/fs/proc/devices.c b/fs/proc/devices.c
+index b143471..bb105e5 100644
+--- a/fs/proc/devices.c
++++ b/fs/proc/devices.c
+@@ -64,7 +64,11 @@ static const struct file_operations proc_devinfo_operations = {
static int __init proc_devices_init(void)
{
@@ -46822,9 +48189,10 @@ diff -urNp linux-3.1.4/fs/proc/devices.c linux-3.1.4/fs/proc/devices.c
return 0;
}
module_init(proc_devices_init);
-diff -urNp linux-3.1.4/fs/proc/inode.c linux-3.1.4/fs/proc/inode.c
---- linux-3.1.4/fs/proc/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/inode.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/proc/inode.c b/fs/proc/inode.c
+index 7ed72d6..d5f061a 100644
+--- a/fs/proc/inode.c
++++ b/fs/proc/inode.c
@@ -18,12 +18,18 @@
#include <linux/module.h>
#include <linux/sysctl.h>
@@ -46844,7 +48212,7 @@ diff -urNp linux-3.1.4/fs/proc/inode.c linux-3.1.4/fs/proc/inode.c
static void proc_evict_inode(struct inode *inode)
{
struct proc_dir_entry *de;
-@@ -49,6 +55,13 @@ static void proc_evict_inode(struct inod
+@@ -49,6 +55,13 @@ static void proc_evict_inode(struct inode *inode)
ns_ops = PROC_I(inode)->ns_ops;
if (ns_ops && ns_ops->put)
ns_ops->put(PROC_I(inode)->ns);
@@ -46858,7 +48226,7 @@ diff -urNp linux-3.1.4/fs/proc/inode.c linux-3.1.4/fs/proc/inode.c
}
static struct kmem_cache * proc_inode_cachep;
-@@ -440,7 +453,11 @@ struct inode *proc_get_inode(struct supe
+@@ -440,7 +453,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
if (de->mode) {
inode->i_mode = de->mode;
inode->i_uid = de->uid;
@@ -46870,10 +48238,11 @@ diff -urNp linux-3.1.4/fs/proc/inode.c linux-3.1.4/fs/proc/inode.c
}
if (de->size)
inode->i_size = de->size;
-diff -urNp linux-3.1.4/fs/proc/internal.h linux-3.1.4/fs/proc/internal.h
---- linux-3.1.4/fs/proc/internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/internal.h 2011-11-16 18:40:29.000000000 -0500
-@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi
+diff --git a/fs/proc/internal.h b/fs/proc/internal.h
+index 7838e5c..ff92cbc 100644
+--- a/fs/proc/internal.h
++++ b/fs/proc/internal.h
+@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
@@ -46883,40 +48252,11 @@ diff -urNp linux-3.1.4/fs/proc/internal.h linux-3.1.4/fs/proc/internal.h
extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
extern const struct file_operations proc_maps_operations;
-diff -urNp linux-3.1.4/fs/proc/Kconfig linux-3.1.4/fs/proc/Kconfig
---- linux-3.1.4/fs/proc/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/Kconfig 2011-11-16 18:40:29.000000000 -0500
-@@ -30,12 +30,12 @@ config PROC_FS
-
- config PROC_KCORE
- bool "/proc/kcore support" if !ARM
-- depends on PROC_FS && MMU
-+ depends on PROC_FS && MMU && !GRKERNSEC_PROC_ADD
-
- config PROC_VMCORE
- bool "/proc/vmcore support"
-- depends on PROC_FS && CRASH_DUMP
-- default y
-+ depends on PROC_FS && CRASH_DUMP && !GRKERNSEC
-+ default n
- help
- Exports the dump image of crashed kernel in ELF format.
-
-@@ -59,8 +59,8 @@ config PROC_SYSCTL
- limited in memory.
-
- config PROC_PAGE_MONITOR
-- default y
-- depends on PROC_FS && MMU
-+ default n
-+ depends on PROC_FS && MMU && !GRKERNSEC
- bool "Enable /proc page monitoring" if EXPERT
- help
- Various /proc files exist to monitor process memory utilization:
-diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
---- linux-3.1.4/fs/proc/kcore.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/kcore.c 2011-11-16 18:40:29.000000000 -0500
-@@ -321,6 +321,8 @@ static void elf_kcore_store_hdr(char *bu
+diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
+index d245cb2..7e645bd 100644
+--- a/fs/proc/kcore.c
++++ b/fs/proc/kcore.c
+@@ -321,6 +321,8 @@ static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
off_t offset = 0;
struct kcore_list *m;
@@ -46925,7 +48265,7 @@ diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
/* setup ELF header */
elf = (struct elfhdr *) bufp;
bufp += sizeof(struct elfhdr);
-@@ -478,9 +480,10 @@ read_kcore(struct file *file, char __use
+@@ -478,9 +480,10 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
* the addresses in the elf_phdr on our list.
*/
start = kc_offset_to_vaddr(*fpos - elf_buflen);
@@ -46938,14 +48278,12 @@ diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
while (buflen) {
struct kcore_list *m;
-@@ -509,20 +512,23 @@ read_kcore(struct file *file, char __use
+@@ -509,20 +512,23 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
kfree(elf_buf);
} else {
if (kern_addr_valid(start)) {
- unsigned long n;
-+ char *elf_buf;
-+ mm_segment_t oldfs;
-
+-
- n = copy_to_user(buffer, (char *)start, tsz);
- /*
- * We cannot distingush between fault on source
@@ -46956,6 +48294,9 @@ diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
- if (n) {
- if (clear_user(buffer + tsz - n,
- n))
++ char *elf_buf;
++ mm_segment_t oldfs;
++
+ elf_buf = kmalloc(tsz, GFP_KERNEL);
+ if (!elf_buf)
+ return -ENOMEM;
@@ -46973,7 +48314,7 @@ diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
} else {
if (clear_user(buffer, tsz))
return -EFAULT;
-@@ -542,6 +548,9 @@ read_kcore(struct file *file, char __use
+@@ -542,6 +548,9 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
static int open_kcore(struct inode *inode, struct file *filp)
{
@@ -46983,10 +48324,11 @@ diff -urNp linux-3.1.4/fs/proc/kcore.c linux-3.1.4/fs/proc/kcore.c
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if (kcore_need_update)
-diff -urNp linux-3.1.4/fs/proc/meminfo.c linux-3.1.4/fs/proc/meminfo.c
---- linux-3.1.4/fs/proc/meminfo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/meminfo.c 2011-11-16 18:40:29.000000000 -0500
-@@ -29,6 +29,8 @@ static int meminfo_proc_show(struct seq_
+diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
+index 5861741..32c53bc 100644
+--- a/fs/proc/meminfo.c
++++ b/fs/proc/meminfo.c
+@@ -29,6 +29,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
unsigned long pages[NR_LRU_LISTS];
int lru;
@@ -46995,7 +48337,7 @@ diff -urNp linux-3.1.4/fs/proc/meminfo.c linux-3.1.4/fs/proc/meminfo.c
/*
* display in kilobytes.
*/
-@@ -157,7 +159,7 @@ static int meminfo_proc_show(struct seq_
+@@ -157,7 +159,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
vmi.used >> 10,
vmi.largest_chunk >> 10
#ifdef CONFIG_MEMORY_FAILURE
@@ -47004,10 +48346,11 @@ diff -urNp linux-3.1.4/fs/proc/meminfo.c linux-3.1.4/fs/proc/meminfo.c
#endif
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
,K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
-diff -urNp linux-3.1.4/fs/proc/nommu.c linux-3.1.4/fs/proc/nommu.c
---- linux-3.1.4/fs/proc/nommu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/nommu.c 2011-11-16 18:39:08.000000000 -0500
-@@ -66,7 +66,7 @@ static int nommu_region_show(struct seq_
+diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
+index b1822dd..df622cb 100644
+--- a/fs/proc/nommu.c
++++ b/fs/proc/nommu.c
+@@ -66,7 +66,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
if (len < 1)
len = 1;
seq_printf(m, "%*c", len, ' ');
@@ -47016,10 +48359,11 @@ diff -urNp linux-3.1.4/fs/proc/nommu.c linux-3.1.4/fs/proc/nommu.c
}
seq_putc(m, '\n');
-diff -urNp linux-3.1.4/fs/proc/proc_net.c linux-3.1.4/fs/proc/proc_net.c
---- linux-3.1.4/fs/proc/proc_net.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/proc_net.c 2011-11-16 18:40:29.000000000 -0500
-@@ -105,6 +105,17 @@ static struct net *get_proc_task_net(str
+diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
+index f738024..876984a 100644
+--- a/fs/proc/proc_net.c
++++ b/fs/proc/proc_net.c
+@@ -105,6 +105,17 @@ static struct net *get_proc_task_net(struct inode *dir)
struct task_struct *task;
struct nsproxy *ns;
struct net *net = NULL;
@@ -47037,9 +48381,10 @@ diff -urNp linux-3.1.4/fs/proc/proc_net.c linux-3.1.4/fs/proc/proc_net.c
rcu_read_lock();
task = pid_task(proc_pid(dir), PIDTYPE_PID);
-diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
---- linux-3.1.4/fs/proc/proc_sysctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/proc_sysctl.c 2011-11-18 18:45:33.000000000 -0500
+diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
+index 1a77dbe..56ec911 100644
+--- a/fs/proc/proc_sysctl.c
++++ b/fs/proc/proc_sysctl.c
@@ -8,11 +8,13 @@
#include <linux/namei.h>
#include "internal.h"
@@ -47056,7 +48401,7 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
static struct inode *proc_sys_make_inode(struct super_block *sb,
struct ctl_table_header *head, struct ctl_table *table)
-@@ -121,8 +123,14 @@ static struct dentry *proc_sys_lookup(st
+@@ -121,8 +123,14 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
err = NULL;
d_set_d_op(dentry, &proc_sys_dentry_operations);
@@ -47071,7 +48416,7 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
out:
sysctl_head_finish(head);
return err;
-@@ -202,6 +210,9 @@ static int proc_sys_fill_cache(struct fi
+@@ -202,6 +210,9 @@ static int proc_sys_fill_cache(struct file *filp, void *dirent,
return -ENOMEM;
} else {
d_set_d_op(child, &proc_sys_dentry_operations);
@@ -47081,7 +48426,7 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
d_add(child, inode);
}
} else {
-@@ -230,6 +241,9 @@ static int scan(struct ctl_table_header
+@@ -230,6 +241,9 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
if (*pos < file->f_pos)
continue;
@@ -47091,7 +48436,7 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
res = proc_sys_fill_cache(file, dirent, filldir, head, table);
if (res)
return res;
-@@ -355,6 +369,9 @@ static int proc_sys_getattr(struct vfsmo
+@@ -355,6 +369,9 @@ static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
if (IS_ERR(head))
return PTR_ERR(head);
@@ -47101,7 +48446,7 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
generic_fillattr(inode, stat);
if (table)
stat->mode = (stat->mode & S_IFMT) | table->mode;
-@@ -370,17 +387,18 @@ static const struct file_operations proc
+@@ -370,17 +387,18 @@ static const struct file_operations proc_sys_file_operations = {
};
static const struct file_operations proc_sys_dir_file_operations = {
@@ -47122,9 +48467,10 @@ diff -urNp linux-3.1.4/fs/proc/proc_sysctl.c linux-3.1.4/fs/proc/proc_sysctl.c
.lookup = proc_sys_lookup,
.permission = proc_sys_permission,
.setattr = proc_sys_setattr,
-diff -urNp linux-3.1.4/fs/proc/root.c linux-3.1.4/fs/proc/root.c
---- linux-3.1.4/fs/proc/root.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/root.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/proc/root.c b/fs/proc/root.c
+index 9a8a2b7..3018df6 100644
+--- a/fs/proc/root.c
++++ b/fs/proc/root.c
@@ -123,7 +123,15 @@ void __init proc_root_init(void)
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
@@ -47141,10 +48487,11 @@ diff -urNp linux-3.1.4/fs/proc/root.c linux-3.1.4/fs/proc/root.c
proc_sys_init();
}
-diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
---- linux-3.1.4/fs/proc/task_mmu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/task_mmu.c 2011-11-16 18:40:29.000000000 -0500
-@@ -51,8 +51,13 @@ void task_mem(struct seq_file *m, struct
+diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
+index c7d4ee6..41c5564 100644
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -51,8 +51,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
"VmExe:\t%8lu kB\n"
"VmLib:\t%8lu kB\n"
"VmPTE:\t%8lu kB\n"
@@ -47160,7 +48507,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
(total_vm - mm->reserved_vm) << (PAGE_SHIFT-10),
mm->locked_vm << (PAGE_SHIFT-10),
hiwater_rss << (PAGE_SHIFT-10),
-@@ -60,7 +65,13 @@ void task_mem(struct seq_file *m, struct
+@@ -60,7 +65,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
data << (PAGE_SHIFT-10),
mm->stack_vm << (PAGE_SHIFT-10), text, lib,
(PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10,
@@ -47175,7 +48522,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
}
unsigned long task_vsize(struct mm_struct *mm)
-@@ -207,6 +218,12 @@ static int do_maps_open(struct inode *in
+@@ -207,6 +218,12 @@ static int do_maps_open(struct inode *inode, struct file *file,
return ret;
}
@@ -47188,7 +48535,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
{
struct mm_struct *mm = vma->vm_mm;
-@@ -225,13 +242,13 @@ static void show_map_vma(struct seq_file
+@@ -225,13 +242,13 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
}
@@ -47207,7 +48554,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
start,
-@@ -240,7 +257,11 @@ static void show_map_vma(struct seq_file
+@@ -240,7 +257,11 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
flags & VM_WRITE ? 'w' : '-',
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? 's' : 'p',
@@ -47219,7 +48566,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
MAJOR(dev), MINOR(dev), ino, &len);
/*
-@@ -249,7 +270,7 @@ static void show_map_vma(struct seq_file
+@@ -249,7 +270,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
*/
if (file) {
pad_len_spaces(m, len);
@@ -47228,7 +48575,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
} else {
const char *name = arch_vma_name(vma);
if (!name) {
-@@ -257,8 +278,9 @@ static void show_map_vma(struct seq_file
+@@ -257,8 +278,9 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
if (vma->vm_start <= mm->brk &&
vma->vm_end >= mm->start_brk) {
name = "[heap]";
@@ -47240,7 +48587,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
name = "[stack]";
}
} else {
-@@ -433,11 +455,16 @@ static int show_smap(struct seq_file *m,
+@@ -433,11 +455,16 @@ static int show_smap(struct seq_file *m, void *v)
};
memset(&mss, 0, sizeof mss);
@@ -47262,7 +48609,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
show_map_vma(m, vma);
seq_printf(m,
-@@ -455,7 +482,11 @@ static int show_smap(struct seq_file *m,
+@@ -455,7 +482,11 @@ static int show_smap(struct seq_file *m, void *v)
"KernelPageSize: %8lu kB\n"
"MMUPageSize: %8lu kB\n"
"Locked: %8lu kB\n",
@@ -47274,7 +48621,7 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
mss.resident >> 10,
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
mss.shared_clean >> 10,
-@@ -1031,7 +1062,7 @@ static int show_numa_map(struct seq_file
+@@ -1031,7 +1062,7 @@ static int show_numa_map(struct seq_file *m, void *v)
if (file) {
seq_printf(m, " file=");
@@ -47283,10 +48630,11 @@ diff -urNp linux-3.1.4/fs/proc/task_mmu.c linux-3.1.4/fs/proc/task_mmu.c
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
seq_printf(m, " heap");
} else if (vma->vm_start <= mm->start_stack &&
-diff -urNp linux-3.1.4/fs/proc/task_nommu.c linux-3.1.4/fs/proc/task_nommu.c
---- linux-3.1.4/fs/proc/task_nommu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/proc/task_nommu.c 2011-11-16 18:39:08.000000000 -0500
-@@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct
+diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
+index 980de54..2a4db5f 100644
+--- a/fs/proc/task_nommu.c
++++ b/fs/proc/task_nommu.c
+@@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
else
bytes += kobjsize(mm);
@@ -47295,7 +48643,7 @@ diff -urNp linux-3.1.4/fs/proc/task_nommu.c linux-3.1.4/fs/proc/task_nommu.c
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
-@@ -166,7 +166,7 @@ static int nommu_vma_show(struct seq_fil
+@@ -166,7 +166,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
if (file) {
pad_len_spaces(m, len);
@@ -47304,10 +48652,11 @@ diff -urNp linux-3.1.4/fs/proc/task_nommu.c linux-3.1.4/fs/proc/task_nommu.c
} else if (mm) {
if (vma->vm_start <= mm->start_stack &&
vma->vm_end >= mm->start_stack) {
-diff -urNp linux-3.1.4/fs/quota/netlink.c linux-3.1.4/fs/quota/netlink.c
---- linux-3.1.4/fs/quota/netlink.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/quota/netlink.c 2011-11-16 18:39:08.000000000 -0500
-@@ -33,7 +33,7 @@ static struct genl_family quota_genl_fam
+diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c
+index d67908b..d13f6a6 100644
+--- a/fs/quota/netlink.c
++++ b/fs/quota/netlink.c
+@@ -33,7 +33,7 @@ static struct genl_family quota_genl_family = {
void quota_send_warning(short type, unsigned int id, dev_t dev,
const char warntype)
{
@@ -47316,7 +48665,7 @@ diff -urNp linux-3.1.4/fs/quota/netlink.c linux-3.1.4/fs/quota/netlink.c
struct sk_buff *skb;
void *msg_head;
int ret;
-@@ -49,7 +49,7 @@ void quota_send_warning(short type, unsi
+@@ -49,7 +49,7 @@ void quota_send_warning(short type, unsigned int id, dev_t dev,
"VFS: Not enough memory to send quota warning.\n");
return;
}
@@ -47325,9 +48674,10 @@ diff -urNp linux-3.1.4/fs/quota/netlink.c linux-3.1.4/fs/quota/netlink.c
&quota_genl_family, 0, QUOTA_NL_C_WARNING);
if (!msg_head) {
printk(KERN_ERR
-diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
---- linux-3.1.4/fs/readdir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/readdir.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/readdir.c b/fs/readdir.c
+index 356f715..c918d38 100644
+--- a/fs/readdir.c
++++ b/fs/readdir.c
@@ -17,6 +17,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
@@ -47344,7 +48694,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
int result;
};
-@@ -84,6 +86,10 @@ static int fillonedir(void * __buf, cons
+@@ -84,6 +86,10 @@ static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
buf->result = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -47355,7 +48705,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
buf->result++;
dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, dirent,
-@@ -116,6 +122,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned in
+@@ -116,6 +122,7 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
buf.result = 0;
buf.dirent = dirent;
@@ -47371,7 +48721,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
int count;
int error;
};
-@@ -163,6 +171,10 @@ static int filldir(void * __buf, const c
+@@ -163,6 +171,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
buf->error = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -47382,7 +48732,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -210,6 +222,7 @@ SYSCALL_DEFINE3(getdents, unsigned int,
+@@ -210,6 +222,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd,
buf.previous = NULL;
buf.count = count;
buf.error = 0;
@@ -47398,7 +48748,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
int count;
int error;
};
-@@ -244,6 +258,10 @@ static int filldir64(void * __buf, const
+@@ -244,6 +258,10 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
@@ -47409,7 +48759,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -291,6 +309,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int
+@@ -291,6 +309,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd,
buf.current_dir = dirent;
buf.previous = NULL;
@@ -47417,7 +48767,7 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
buf.count = count;
buf.error = 0;
-@@ -299,7 +318,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int
+@@ -299,7 +318,7 @@ SYSCALL_DEFINE3(getdents64, unsigned int, fd,
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
@@ -47426,10 +48776,11 @@ diff -urNp linux-3.1.4/fs/readdir.c linux-3.1.4/fs/readdir.c
if (__put_user(d_off, &lastdirent->d_off))
error = -EFAULT;
else
-diff -urNp linux-3.1.4/fs/reiserfs/dir.c linux-3.1.4/fs/reiserfs/dir.c
---- linux-3.1.4/fs/reiserfs/dir.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/dir.c 2011-11-16 18:40:29.000000000 -0500
-@@ -75,6 +75,8 @@ int reiserfs_readdir_dentry(struct dentr
+diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
+index 133e935..349ef18 100644
+--- a/fs/reiserfs/dir.c
++++ b/fs/reiserfs/dir.c
+@@ -75,6 +75,8 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,
struct reiserfs_dir_entry de;
int ret = 0;
@@ -47438,10 +48789,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/dir.c linux-3.1.4/fs/reiserfs/dir.c
reiserfs_write_lock(inode->i_sb);
reiserfs_check_lock_depth(inode->i_sb, "readdir");
-diff -urNp linux-3.1.4/fs/reiserfs/do_balan.c linux-3.1.4/fs/reiserfs/do_balan.c
---- linux-3.1.4/fs/reiserfs/do_balan.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/do_balan.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2051,7 +2051,7 @@ void do_balance(struct tree_balance *tb,
+diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
+index 60c0804..d814f98 100644
+--- a/fs/reiserfs/do_balan.c
++++ b/fs/reiserfs/do_balan.c
+@@ -2051,7 +2051,7 @@ void do_balance(struct tree_balance *tb, /* tree_balance structure */
return;
}
@@ -47450,10 +48802,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/do_balan.c linux-3.1.4/fs/reiserfs/do_balan.c
do_balance_starts(tb);
/* balance leaf returns 0 except if combining L R and S into
-diff -urNp linux-3.1.4/fs/reiserfs/journal.c linux-3.1.4/fs/reiserfs/journal.c
---- linux-3.1.4/fs/reiserfs/journal.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/journal.c 2011-11-16 18:40:29.000000000 -0500
-@@ -2289,6 +2289,8 @@ static struct buffer_head *reiserfs_brea
+diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
+index a159ba5..0396a76 100644
+--- a/fs/reiserfs/journal.c
++++ b/fs/reiserfs/journal.c
+@@ -2289,6 +2289,8 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev,
struct buffer_head *bh;
int i, j;
@@ -47462,10 +48815,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/journal.c linux-3.1.4/fs/reiserfs/journal.c
bh = __getblk(dev, block, bufsize);
if (buffer_uptodate(bh))
return (bh);
-diff -urNp linux-3.1.4/fs/reiserfs/namei.c linux-3.1.4/fs/reiserfs/namei.c
---- linux-3.1.4/fs/reiserfs/namei.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/namei.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1225,6 +1225,8 @@ static int reiserfs_rename(struct inode
+diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
+index ef39232..0fa91ba 100644
+--- a/fs/reiserfs/namei.c
++++ b/fs/reiserfs/namei.c
+@@ -1225,6 +1225,8 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
unsigned long savelink = 1;
struct timespec ctime;
@@ -47474,10 +48828,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/namei.c linux-3.1.4/fs/reiserfs/namei.c
/* three balancings: (1) old name removal, (2) new name insertion
and (3) maybe "save" link insertion
stat data updates: (1) old directory,
-diff -urNp linux-3.1.4/fs/reiserfs/procfs.c linux-3.1.4/fs/reiserfs/procfs.c
---- linux-3.1.4/fs/reiserfs/procfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/procfs.c 2011-11-16 18:40:29.000000000 -0500
-@@ -113,7 +113,7 @@ static int show_super(struct seq_file *m
+diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
+index 7a99811..2c9286f 100644
+--- a/fs/reiserfs/procfs.c
++++ b/fs/reiserfs/procfs.c
+@@ -113,7 +113,7 @@ static int show_super(struct seq_file *m, struct super_block *sb)
"SMALL_TAILS " : "NO_TAILS ",
replay_only(sb) ? "REPLAY_ONLY " : "",
convert_reiserfs(sb) ? "CONV " : "",
@@ -47486,7 +48841,7 @@ diff -urNp linux-3.1.4/fs/reiserfs/procfs.c linux-3.1.4/fs/reiserfs/procfs.c
SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes),
SF(s_do_balance), SF(s_unneeded_left_neighbor),
SF(s_good_search_by_key_reada), SF(s_bmaps),
-@@ -299,6 +299,8 @@ static int show_journal(struct seq_file
+@@ -299,6 +299,8 @@ static int show_journal(struct seq_file *m, struct super_block *sb)
struct journal_params *jp = &rs->s_v1.s_journal;
char b[BDEVNAME_SIZE];
@@ -47495,10 +48850,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/procfs.c linux-3.1.4/fs/reiserfs/procfs.c
seq_printf(m, /* on-disk fields */
"jp_journal_1st_block: \t%i\n"
"jp_journal_dev: \t%s[%x]\n"
-diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
---- linux-3.1.4/fs/reiserfs/stree.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/stree.c 2011-11-16 18:40:29.000000000 -0500
-@@ -1196,6 +1196,8 @@ int reiserfs_delete_item(struct reiserfs
+diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
+index 313d39d..3a5811b 100644
+--- a/fs/reiserfs/stree.c
++++ b/fs/reiserfs/stree.c
+@@ -1196,6 +1196,8 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
int iter = 0;
#endif
@@ -47507,7 +48863,7 @@ diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
BUG_ON(!th->t_trans_id);
init_tb_struct(th, &s_del_balance, sb, path,
-@@ -1333,6 +1335,8 @@ void reiserfs_delete_solid_item(struct r
+@@ -1333,6 +1335,8 @@ void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th,
int retval;
int quota_cut_bytes = 0;
@@ -47516,7 +48872,7 @@ diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
BUG_ON(!th->t_trans_id);
le_key2cpu_key(&cpu_key, key);
-@@ -1562,6 +1566,8 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1562,6 +1566,8 @@ int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th,
int quota_cut_bytes;
loff_t tail_pos = 0;
@@ -47525,7 +48881,7 @@ diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
BUG_ON(!th->t_trans_id);
init_tb_struct(th, &s_cut_balance, inode->i_sb, path,
-@@ -1957,6 +1963,8 @@ int reiserfs_paste_into_item(struct reis
+@@ -1957,6 +1963,8 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct tree
int retval;
int fs_gen;
@@ -47534,7 +48890,7 @@ diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
BUG_ON(!th->t_trans_id);
fs_gen = get_generation(inode->i_sb);
-@@ -2045,6 +2053,8 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2045,6 +2053,8 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
int fs_gen = 0;
int quota_bytes = 0;
@@ -47543,10 +48899,11 @@ diff -urNp linux-3.1.4/fs/reiserfs/stree.c linux-3.1.4/fs/reiserfs/stree.c
BUG_ON(!th->t_trans_id);
if (inode) { /* Do we count quotas for item? */
-diff -urNp linux-3.1.4/fs/reiserfs/super.c linux-3.1.4/fs/reiserfs/super.c
---- linux-3.1.4/fs/reiserfs/super.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/reiserfs/super.c 2011-11-16 18:40:29.000000000 -0500
-@@ -927,6 +927,8 @@ static int reiserfs_parse_options(struct
+diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
+index 14363b9..dd95a04 100644
+--- a/fs/reiserfs/super.c
++++ b/fs/reiserfs/super.c
+@@ -927,6 +927,8 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
{.option_name = NULL}
};
@@ -47555,9 +48912,10 @@ diff -urNp linux-3.1.4/fs/reiserfs/super.c linux-3.1.4/fs/reiserfs/super.c
*blocks = 0;
if (!options || !*options)
/* use default configuration: create tails, journaling on, no
-diff -urNp linux-3.1.4/fs/select.c linux-3.1.4/fs/select.c
---- linux-3.1.4/fs/select.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/select.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/select.c b/fs/select.c
+index d33418f..f8e06bc 100644
+--- a/fs/select.c
++++ b/fs/select.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/slab.h>
@@ -47566,7 +48924,7 @@ diff -urNp linux-3.1.4/fs/select.c linux-3.1.4/fs/select.c
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
#include <linux/fdtable.h>
-@@ -403,6 +404,8 @@ int do_select(int n, fd_set_bits *fds, s
+@@ -403,6 +404,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
int retval, i, timed_out = 0;
unsigned long slack = 0;
@@ -47575,7 +48933,7 @@ diff -urNp linux-3.1.4/fs/select.c linux-3.1.4/fs/select.c
rcu_read_lock();
retval = max_select_fd(n, fds);
rcu_read_unlock();
-@@ -528,6 +531,8 @@ int core_sys_select(int n, fd_set __user
+@@ -528,6 +531,8 @@ int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
/* Allocate small arguments on the stack to save memory and be faster */
long stack_fds[SELECT_STACK_ALLOC/sizeof(long)];
@@ -47584,7 +48942,7 @@ diff -urNp linux-3.1.4/fs/select.c linux-3.1.4/fs/select.c
ret = -EINVAL;
if (n < 0)
goto out_nofds;
-@@ -837,6 +842,9 @@ int do_sys_poll(struct pollfd __user *uf
+@@ -837,6 +842,9 @@ int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds,
struct poll_list *walk = head;
unsigned long todo = nfds;
@@ -47594,10 +48952,11 @@ diff -urNp linux-3.1.4/fs/select.c linux-3.1.4/fs/select.c
if (nfds > rlimit(RLIMIT_NOFILE))
return -EINVAL;
-diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
---- linux-3.1.4/fs/seq_file.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/seq_file.c 2011-11-16 18:39:08.000000000 -0500
-@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m,
+diff --git a/fs/seq_file.c b/fs/seq_file.c
+index 05d6b0e..ee96362 100644
+--- a/fs/seq_file.c
++++ b/fs/seq_file.c
+@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m, loff_t offset)
return 0;
}
if (!m->buf) {
@@ -47607,7 +48966,7 @@ diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
if (!m->buf)
return -ENOMEM;
}
-@@ -116,7 +117,8 @@ static int traverse(struct seq_file *m,
+@@ -116,7 +117,8 @@ static int traverse(struct seq_file *m, loff_t offset)
Eoverflow:
m->op->stop(m, p);
kfree(m->buf);
@@ -47617,7 +48976,7 @@ diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
return !m->buf ? -ENOMEM : -EAGAIN;
}
-@@ -169,7 +171,8 @@ ssize_t seq_read(struct file *file, char
+@@ -169,7 +171,8 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
m->version = file->f_version;
/* grab buffer if we didn't have one */
if (!m->buf) {
@@ -47627,7 +48986,7 @@ diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
if (!m->buf)
goto Enomem;
}
-@@ -210,7 +213,8 @@ ssize_t seq_read(struct file *file, char
+@@ -210,7 +213,8 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
goto Fill;
m->op->stop(m, p);
kfree(m->buf);
@@ -47637,7 +48996,7 @@ diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
if (!m->buf)
goto Enomem;
m->count = 0;
-@@ -549,7 +553,7 @@ static void single_stop(struct seq_file
+@@ -549,7 +553,7 @@ static void single_stop(struct seq_file *p, void *v)
int single_open(struct file *file, int (*show)(struct seq_file *, void *),
void *data)
{
@@ -47646,10 +49005,11 @@ diff -urNp linux-3.1.4/fs/seq_file.c linux-3.1.4/fs/seq_file.c
int res = -ENOMEM;
if (op) {
-diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
---- linux-3.1.4/fs/splice.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/splice.c 2011-11-16 18:40:29.000000000 -0500
-@@ -194,7 +194,7 @@ ssize_t splice_to_pipe(struct pipe_inode
+diff --git a/fs/splice.c b/fs/splice.c
+index fa2defa..9a697a5 100644
+--- a/fs/splice.c
++++ b/fs/splice.c
+@@ -194,7 +194,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
pipe_lock(pipe);
for (;;) {
@@ -47658,7 +49018,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -248,9 +248,9 @@ ssize_t splice_to_pipe(struct pipe_inode
+@@ -248,9 +248,9 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
do_wakeup = 0;
}
@@ -47670,7 +49030,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
}
pipe_unlock(pipe);
-@@ -320,6 +320,8 @@ __generic_file_splice_read(struct file *
+@@ -320,6 +320,8 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
.spd_release = spd_release_page,
};
@@ -47679,7 +49039,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
if (splice_grow_spd(pipe, &spd))
return -ENOMEM;
-@@ -560,7 +562,7 @@ static ssize_t kernel_readv(struct file
+@@ -560,7 +562,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -47688,7 +49048,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
set_fs(old_fs);
return res;
-@@ -575,7 +577,7 @@ static ssize_t kernel_write(struct file
+@@ -575,7 +577,7 @@ static ssize_t kernel_write(struct file *file, const char *buf, size_t count,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -47697,7 +49057,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
set_fs(old_fs);
return res;
-@@ -603,6 +605,8 @@ ssize_t default_file_splice_read(struct
+@@ -603,6 +605,8 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
.spd_release = spd_release_page,
};
@@ -47706,7 +49066,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
if (splice_grow_spd(pipe, &spd))
return -ENOMEM;
-@@ -626,7 +630,7 @@ ssize_t default_file_splice_read(struct
+@@ -626,7 +630,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
goto err;
this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
@@ -47728,7 +49088,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
return 0;
if (sd->flags & SPLICE_F_NONBLOCK)
-@@ -1182,7 +1186,7 @@ ssize_t splice_direct_to_actor(struct fi
+@@ -1182,7 +1186,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
* out of the pipe right after the splice_to_pipe(). So set
* PIPE_READERS appropriately.
*/
@@ -47737,7 +49097,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
current->splice_pipe = pipe;
}
-@@ -1619,6 +1623,8 @@ static long vmsplice_to_pipe(struct file
+@@ -1619,6 +1623,8 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov,
};
long ret;
@@ -47746,7 +49106,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
pipe = get_pipe_info(file);
if (!pipe)
return -EBADF;
-@@ -1734,9 +1740,9 @@ static int ipipe_prep(struct pipe_inode_
+@@ -1734,9 +1740,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -47758,7 +49118,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
if (flags & SPLICE_F_NONBLOCK) {
ret = -EAGAIN;
break;
-@@ -1768,7 +1774,7 @@ static int opipe_prep(struct pipe_inode_
+@@ -1768,7 +1774,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
pipe_lock(pipe);
while (pipe->nrbufs >= pipe->buffers) {
@@ -47767,7 +49127,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
break;
-@@ -1781,9 +1787,9 @@ static int opipe_prep(struct pipe_inode_
+@@ -1781,9 +1787,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -47796,7 +49156,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
break;
/*
-@@ -1923,7 +1929,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1923,7 +1929,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
pipe_double_lock(ipipe, opipe);
do {
@@ -47805,7 +49165,7 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -1968,7 +1974,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1968,7 +1974,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
* return EAGAIN if we have the potential of some data in the
* future, otherwise just return 0
*/
@@ -47814,10 +49174,11 @@ diff -urNp linux-3.1.4/fs/splice.c linux-3.1.4/fs/splice.c
ret = -EAGAIN;
pipe_unlock(ipipe);
-diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
---- linux-3.1.4/fs/sysfs/file.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/sysfs/file.c 2011-11-16 18:39:08.000000000 -0500
-@@ -37,7 +37,7 @@ static DEFINE_SPINLOCK(sysfs_open_dirent
+diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
+index 1ad8c93..6633545 100644
+--- a/fs/sysfs/file.c
++++ b/fs/sysfs/file.c
+@@ -37,7 +37,7 @@ static DEFINE_SPINLOCK(sysfs_open_dirent_lock);
struct sysfs_open_dirent {
atomic_t refcnt;
@@ -47826,7 +49187,7 @@ diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
wait_queue_head_t poll;
struct list_head buffers; /* goes through sysfs_buffer.list */
};
-@@ -81,7 +81,7 @@ static int fill_read_buffer(struct dentr
+@@ -81,7 +81,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
if (!sysfs_get_active(attr_sd))
return -ENODEV;
@@ -47835,7 +49196,7 @@ diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page);
sysfs_put_active(attr_sd);
-@@ -287,7 +287,7 @@ static int sysfs_get_open_dirent(struct
+@@ -287,7 +287,7 @@ static int sysfs_get_open_dirent(struct sysfs_dirent *sd,
return -ENOMEM;
atomic_set(&new_od->refcnt, 0);
@@ -47844,7 +49205,7 @@ diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
init_waitqueue_head(&new_od->poll);
INIT_LIST_HEAD(&new_od->buffers);
goto retry;
-@@ -432,7 +432,7 @@ static unsigned int sysfs_poll(struct fi
+@@ -432,7 +432,7 @@ static unsigned int sysfs_poll(struct file *filp, poll_table *wait)
sysfs_put_active(attr_sd);
@@ -47853,7 +49214,7 @@ diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
goto trigger;
return DEFAULT_POLLMASK;
-@@ -451,7 +451,7 @@ void sysfs_notify_dirent(struct sysfs_di
+@@ -451,7 +451,7 @@ void sysfs_notify_dirent(struct sysfs_dirent *sd)
od = sd->s_attr.open;
if (od) {
@@ -47862,9 +49223,10 @@ diff -urNp linux-3.1.4/fs/sysfs/file.c linux-3.1.4/fs/sysfs/file.c
wake_up_interruptible(&od->poll);
}
-diff -urNp linux-3.1.4/fs/sysfs/mount.c linux-3.1.4/fs/sysfs/mount.c
---- linux-3.1.4/fs/sysfs/mount.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/sysfs/mount.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
+index e34f0d9..740ea7b 100644
+--- a/fs/sysfs/mount.c
++++ b/fs/sysfs/mount.c
@@ -36,7 +36,11 @@ struct sysfs_dirent sysfs_root = {
.s_name = "",
.s_count = ATOMIC_INIT(1),
@@ -47877,10 +49239,11 @@ diff -urNp linux-3.1.4/fs/sysfs/mount.c linux-3.1.4/fs/sysfs/mount.c
.s_ino = 1,
};
-diff -urNp linux-3.1.4/fs/sysfs/symlink.c linux-3.1.4/fs/sysfs/symlink.c
---- linux-3.1.4/fs/sysfs/symlink.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/sysfs/symlink.c 2011-11-16 18:39:08.000000000 -0500
-@@ -286,7 +286,7 @@ static void *sysfs_follow_link(struct de
+diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
+index a7ac78f..02158e1 100644
+--- a/fs/sysfs/symlink.c
++++ b/fs/sysfs/symlink.c
+@@ -286,7 +286,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
{
@@ -47889,10 +49252,11 @@ diff -urNp linux-3.1.4/fs/sysfs/symlink.c linux-3.1.4/fs/sysfs/symlink.c
if (!IS_ERR(page))
free_page((unsigned long)page);
}
-diff -urNp linux-3.1.4/fs/udf/inode.c linux-3.1.4/fs/udf/inode.c
---- linux-3.1.4/fs/udf/inode.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/udf/inode.c 2011-11-16 18:40:29.000000000 -0500
-@@ -560,6 +560,8 @@ static struct buffer_head *inode_getblk(
+diff --git a/fs/udf/inode.c b/fs/udf/inode.c
+index 1d1358e..408bedb 100644
+--- a/fs/udf/inode.c
++++ b/fs/udf/inode.c
+@@ -560,6 +560,8 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
int goal = 0, pgoal = iinfo->i_location.logicalBlockNum;
int lastblock = 0;
@@ -47901,10 +49265,11 @@ diff -urNp linux-3.1.4/fs/udf/inode.c linux-3.1.4/fs/udf/inode.c
prev_epos.offset = udf_file_entry_alloc_offset(inode);
prev_epos.block = iinfo->i_location;
prev_epos.bh = NULL;
-diff -urNp linux-3.1.4/fs/udf/misc.c linux-3.1.4/fs/udf/misc.c
---- linux-3.1.4/fs/udf/misc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/udf/misc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -286,7 +286,7 @@ void udf_new_tag(char *data, uint16_t id
+diff --git a/fs/udf/misc.c b/fs/udf/misc.c
+index 9215700..bf1f68e 100644
+--- a/fs/udf/misc.c
++++ b/fs/udf/misc.c
+@@ -286,7 +286,7 @@ void udf_new_tag(char *data, uint16_t ident, uint16_t version, uint16_t snum,
u8 udf_tag_checksum(const struct tag *t)
{
@@ -47913,9 +49278,10 @@ diff -urNp linux-3.1.4/fs/udf/misc.c linux-3.1.4/fs/udf/misc.c
u8 checksum = 0;
int i;
for (i = 0; i < sizeof(struct tag); ++i)
-diff -urNp linux-3.1.4/fs/utimes.c linux-3.1.4/fs/utimes.c
---- linux-3.1.4/fs/utimes.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/utimes.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/utimes.c b/fs/utimes.c
+index ba653f3..06ea4b1 100644
+--- a/fs/utimes.c
++++ b/fs/utimes.c
@@ -1,6 +1,7 @@
#include <linux/compiler.h>
#include <linux/file.h>
@@ -47924,7 +49290,7 @@ diff -urNp linux-3.1.4/fs/utimes.c linux-3.1.4/fs/utimes.c
#include <linux/linkage.h>
#include <linux/mount.h>
#include <linux/namei.h>
-@@ -101,6 +102,12 @@ static int utimes_common(struct path *pa
+@@ -101,6 +102,12 @@ static int utimes_common(struct path *path, struct timespec *times)
goto mnt_drop_write_and_out;
}
}
@@ -47937,23 +49303,10 @@ diff -urNp linux-3.1.4/fs/utimes.c linux-3.1.4/fs/utimes.c
mutex_lock(&inode->i_mutex);
error = notify_change(path->dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-diff -urNp linux-3.1.4/fs/xattr_acl.c linux-3.1.4/fs/xattr_acl.c
---- linux-3.1.4/fs/xattr_acl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xattr_acl.c 2011-11-16 18:39:08.000000000 -0500
-@@ -17,8 +17,8 @@
- struct posix_acl *
- posix_acl_from_xattr(const void *value, size_t size)
- {
-- posix_acl_xattr_header *header = (posix_acl_xattr_header *)value;
-- posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
-+ const posix_acl_xattr_header *header = (const posix_acl_xattr_header *)value;
-+ const posix_acl_xattr_entry *entry = (const posix_acl_xattr_entry *)(header+1), *end;
- int count;
- struct posix_acl *acl;
- struct posix_acl_entry *acl_e;
-diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
---- linux-3.1.4/fs/xattr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xattr.c 2011-11-16 18:40:29.000000000 -0500
+diff --git a/fs/xattr.c b/fs/xattr.c
+index f060663..def7007 100644
+--- a/fs/xattr.c
++++ b/fs/xattr.c
@@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
* Extended attribute SET operations
*/
@@ -47963,7 +49316,7 @@ diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
size_t size, int flags)
{
int error;
-@@ -278,7 +278,13 @@ setxattr(struct dentry *d, const char __
+@@ -278,7 +278,13 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
return PTR_ERR(kvalue);
}
@@ -47978,7 +49331,7 @@ diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
kfree(kvalue);
return error;
}
-@@ -295,7 +301,7 @@ SYSCALL_DEFINE5(setxattr, const char __u
+@@ -295,7 +301,7 @@ SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -47987,7 +49340,7 @@ diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -314,7 +320,7 @@ SYSCALL_DEFINE5(lsetxattr, const char __
+@@ -314,7 +320,7 @@ SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname,
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -47996,7 +49349,7 @@ diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -325,17 +331,15 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, cons
+@@ -325,17 +331,15 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
const void __user *,value, size_t, size, int, flags)
{
struct file *f;
@@ -48016,9 +49369,25 @@ diff -urNp linux-3.1.4/fs/xattr.c linux-3.1.4/fs/xattr.c
mnt_drop_write(f->f_path.mnt);
}
fput(f);
-diff -urNp linux-3.1.4/fs/xfs/xfs_bmap.c linux-3.1.4/fs/xfs/xfs_bmap.c
---- linux-3.1.4/fs/xfs/xfs_bmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xfs/xfs_bmap.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/xattr_acl.c b/fs/xattr_acl.c
+index 8d5a506..7f62712 100644
+--- a/fs/xattr_acl.c
++++ b/fs/xattr_acl.c
+@@ -17,8 +17,8 @@
+ struct posix_acl *
+ posix_acl_from_xattr(const void *value, size_t size)
+ {
+- posix_acl_xattr_header *header = (posix_acl_xattr_header *)value;
+- posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
++ const posix_acl_xattr_header *header = (const posix_acl_xattr_header *)value;
++ const posix_acl_xattr_entry *entry = (const posix_acl_xattr_entry *)(header+1), *end;
+ int count;
+ struct posix_acl *acl;
+ struct posix_acl_entry *acl_e;
+diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
+index 452a291..91a95f3b 100644
+--- a/fs/xfs/xfs_bmap.c
++++ b/fs/xfs/xfs_bmap.c
@@ -250,7 +250,7 @@ xfs_bmap_validate_ret(
int nmap,
int ret_nmap);
@@ -48028,9 +49397,10 @@ diff -urNp linux-3.1.4/fs/xfs/xfs_bmap.c linux-3.1.4/fs/xfs/xfs_bmap.c
#endif /* DEBUG */
STATIC int
-diff -urNp linux-3.1.4/fs/xfs/xfs_dir2_sf.c linux-3.1.4/fs/xfs/xfs_dir2_sf.c
---- linux-3.1.4/fs/xfs/xfs_dir2_sf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xfs/xfs_dir2_sf.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c
+index 79d05e8..e3e5861 100644
+--- a/fs/xfs/xfs_dir2_sf.c
++++ b/fs/xfs/xfs_dir2_sf.c
@@ -852,7 +852,15 @@ xfs_dir2_sf_getdents(
}
@@ -48048,9 +49418,10 @@ diff -urNp linux-3.1.4/fs/xfs/xfs_dir2_sf.c linux-3.1.4/fs/xfs/xfs_dir2_sf.c
off & 0x7fffffff, ino, DT_UNKNOWN)) {
*offset = off & 0x7fffffff;
return 0;
-diff -urNp linux-3.1.4/fs/xfs/xfs_ioctl.c linux-3.1.4/fs/xfs/xfs_ioctl.c
---- linux-3.1.4/fs/xfs/xfs_ioctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xfs/xfs_ioctl.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
+index f7ce7de..e1a5db0 100644
+--- a/fs/xfs/xfs_ioctl.c
++++ b/fs/xfs/xfs_ioctl.c
@@ -128,7 +128,7 @@ xfs_find_handle(
}
@@ -48060,9 +49431,10 @@ diff -urNp linux-3.1.4/fs/xfs/xfs_ioctl.c linux-3.1.4/fs/xfs/xfs_ioctl.c
copy_to_user(hreq->ohandlen, &hsize, sizeof(__s32)))
goto out_put;
-diff -urNp linux-3.1.4/fs/xfs/xfs_iops.c linux-3.1.4/fs/xfs/xfs_iops.c
---- linux-3.1.4/fs/xfs/xfs_iops.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xfs/xfs_iops.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
+index 673704f..74315c5 100644
+--- a/fs/xfs/xfs_iops.c
++++ b/fs/xfs/xfs_iops.c
@@ -446,7 +446,7 @@ xfs_vn_put_link(
struct nameidata *nd,
void *p)
@@ -48072,9 +49444,10 @@ diff -urNp linux-3.1.4/fs/xfs/xfs_iops.c linux-3.1.4/fs/xfs/xfs_iops.c
if (!IS_ERR(s))
kfree(s);
-diff -urNp linux-3.1.4/fs/xfs/xfs_vnodeops.c linux-3.1.4/fs/xfs/xfs_vnodeops.c
---- linux-3.1.4/fs/xfs/xfs_vnodeops.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/fs/xfs/xfs_vnodeops.c 2011-11-18 18:54:56.000000000 -0500
+diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
+index 51fc429..a728e71 100644
+--- a/fs/xfs/xfs_vnodeops.c
++++ b/fs/xfs/xfs_vnodeops.c
@@ -123,13 +123,17 @@ xfs_readlink(
xfs_ilock(ip, XFS_ILOCK_SHARED);
@@ -48096,118 +49469,1096 @@ diff -urNp linux-3.1.4/fs/xfs/xfs_vnodeops.c linux-3.1.4/fs/xfs/xfs_vnodeops.c
if (ip->i_df.if_flags & XFS_IFINLINE) {
memcpy(link, ip->i_df.if_u1.if_data, pathlen);
link[pathlen] = '\0';
-diff -urNp linux-3.1.4/grsecurity/gracl_alloc.c linux-3.1.4/grsecurity/gracl_alloc.c
---- linux-3.1.4/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_alloc.c 2011-11-16 18:40:31.000000000 -0500
-@@ -0,0 +1,105 @@
-+#include <linux/kernel.h>
-+#include <linux/mm.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
-+#include <linux/gracl.h>
-+#include <linux/grsecurity.h>
+diff --git a/grsecurity/Kconfig b/grsecurity/Kconfig
+new file mode 100644
+index 0000000..9629731
+--- /dev/null
++++ b/grsecurity/Kconfig
+@@ -0,0 +1,1037 @@
++#
++# grecurity configuration
++#
+
-+static unsigned long alloc_stack_next = 1;
-+static unsigned long alloc_stack_size = 1;
-+static void **alloc_stack;
++menu "Grsecurity"
+
-+static __inline__ int
-+alloc_pop(void)
-+{
-+ if (alloc_stack_next == 1)
-+ return 0;
++config GRKERNSEC
++ bool "Grsecurity"
++ select CRYPTO
++ select CRYPTO_SHA256
++ help
++ If you say Y here, you will be able to configure many features
++ that will enhance the security of your system. It is highly
++ recommended that you say Y here and read through the help
++ for each option so that you fully understand the features and
++ can evaluate their usefulness for your machine.
+
-+ kfree(alloc_stack[alloc_stack_next - 2]);
++choice
++ prompt "Security Level"
++ depends on GRKERNSEC
++ default GRKERNSEC_CUSTOM
+
-+ alloc_stack_next--;
++config GRKERNSEC_LOW
++ bool "Low"
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_CHDIR
+
-+ return 1;
-+}
++ help
++ If you choose this option, several of the grsecurity options will
++ be enabled that will give you greater protection against a number
++ of attacks, while assuring that none of your software will have any
++ conflicts with the additional security measures. If you run a lot
++ of unusual software, or you are having problems with the higher
++ security levels, you should say Y here. With this option, the
++ following features are enabled:
+
-+static __inline__ int
-+alloc_push(void *buf)
-+{
-+ if (alloc_stack_next >= alloc_stack_size)
-+ return 1;
++ - Linking restrictions
++ - FIFO restrictions
++ - Restricted dmesg
++ - Enforced chdir("/") on chroot
++ - Runtime module disabling
+
-+ alloc_stack[alloc_stack_next - 1] = buf;
++config GRKERNSEC_MEDIUM
++ bool "Medium"
++ select PAX
++ select PAX_EI_PAX
++ select PAX_PT_PAX_FLAGS
++ select PAX_HAVE_ACL_FLAGS
++ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_SYSCTL
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_FORKFAIL
++ select GRKERNSEC_TIME
++ select GRKERNSEC_SIGNAL
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_UNIX
++ select GRKERNSEC_CHROOT_MOUNT
++ select GRKERNSEC_CHROOT_PIVOT
++ select GRKERNSEC_CHROOT_DOUBLE
++ select GRKERNSEC_CHROOT_CHDIR
++ select GRKERNSEC_CHROOT_MKNOD
++ select GRKERNSEC_PROC
++ select GRKERNSEC_PROC_USERGROUP
++ select PAX_RANDUSTACK
++ select PAX_ASLR
++ select PAX_RANDMMAP
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
+
-+ alloc_stack_next++;
++ help
++ If you say Y here, several features in addition to those included
++ in the low additional security level will be enabled. These
++ features provide even more security to your system, though in rare
++ cases they may be incompatible with very old or poorly written
++ software. If you enable this option, make sure that your auth
++ service (identd) is running as gid 1001. With this option,
++ the following features (in addition to those provided in the
++ low additional security level) will be enabled:
+
-+ return 0;
-+}
++ - Failed fork logging
++ - Time change logging
++ - Signal logging
++ - Deny mounts in chroot
++ - Deny double chrooting
++ - Deny sysctl writes in chroot
++ - Deny mknod in chroot
++ - Deny access to abstract AF_UNIX sockets out of chroot
++ - Deny pivot_root in chroot
++ - Denied reads/writes of /dev/kmem, /dev/mem, and /dev/port
++ - /proc restrictions with special GID set to 10 (usually wheel)
++ - Address Space Layout Randomization (ASLR)
++ - Prevent exploitation of most refcount overflows
++ - Bounds checking of copying between the kernel and userland
+
-+void *
-+acl_alloc(unsigned long len)
-+{
-+ void *ret = NULL;
++config GRKERNSEC_HIGH
++ bool "High"
++ select GRKERNSEC_LINK
++ select GRKERNSEC_FIFO
++ select GRKERNSEC_DMESG
++ select GRKERNSEC_FORKFAIL
++ select GRKERNSEC_TIME
++ select GRKERNSEC_SIGNAL
++ select GRKERNSEC_CHROOT
++ select GRKERNSEC_CHROOT_SHMAT
++ select GRKERNSEC_CHROOT_UNIX
++ select GRKERNSEC_CHROOT_MOUNT
++ select GRKERNSEC_CHROOT_FCHDIR
++ select GRKERNSEC_CHROOT_PIVOT
++ select GRKERNSEC_CHROOT_DOUBLE
++ select GRKERNSEC_CHROOT_CHDIR
++ select GRKERNSEC_CHROOT_MKNOD
++ select GRKERNSEC_CHROOT_CAPS
++ select GRKERNSEC_CHROOT_SYSCTL
++ select GRKERNSEC_CHROOT_FINDTASK
++ select GRKERNSEC_SYSFS_RESTRICT
++ select GRKERNSEC_PROC
++ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
++ select GRKERNSEC_HIDESYM
++ select GRKERNSEC_BRUTE
++ select GRKERNSEC_PROC_USERGROUP
++ select GRKERNSEC_KMEM
++ select GRKERNSEC_RESLOG
++ select GRKERNSEC_RANDNET
++ select GRKERNSEC_PROC_ADD
++ select GRKERNSEC_CHROOT_CHMOD
++ select GRKERNSEC_CHROOT_NICE
++ select GRKERNSEC_AUDIT_MOUNT
++ select GRKERNSEC_MODHARDEN if (MODULES)
++ select GRKERNSEC_HARDEN_PTRACE
++ select GRKERNSEC_VM86 if (X86_32)
++ select GRKERNSEC_KERN_LOCKOUT if (X86 || ARM || PPC || SPARC)
++ select PAX
++ select PAX_RANDUSTACK
++ select PAX_ASLR
++ select PAX_RANDMMAP
++ select PAX_NOEXEC
++ select PAX_MPROTECT
++ select PAX_EI_PAX
++ select PAX_PT_PAX_FLAGS
++ select PAX_HAVE_ACL_FLAGS
++ select PAX_KERNEXEC if ((PPC || X86) && (!X86_32 || X86_WP_WORKS_OK) && !XEN)
++ select PAX_MEMORY_UDEREF if (X86 && !XEN)
++ select PAX_RANDKSTACK if (X86_TSC && X86)
++ select PAX_SEGMEXEC if (X86_32)
++ select PAX_PAGEEXEC
++ select PAX_EMUPLT if (ALPHA || PARISC || SPARC)
++ select PAX_EMUTRAMP if (PARISC)
++ select PAX_EMUSIGRT if (PARISC)
++ select PAX_ETEXECRELOCS if (ALPHA || IA64 || PARISC)
++ select PAX_ELFRELOCS if (PAX_ETEXECRELOCS || (IA64 || PPC || X86))
++ select PAX_REFCOUNT if (X86 || SPARC64)
++ select PAX_USERCOPY if ((X86 || PPC || SPARC || ARM) && (SLAB || SLUB || SLOB))
++ help
++ If you say Y here, many of the features of grsecurity will be
++ enabled, which will protect you against many kinds of attacks
++ against your system. The heightened security comes at a cost
++ of an increased chance of incompatibilities with rare software
++ on your machine. Since this security level enables PaX, you should
++ view <http://pax.grsecurity.net> and read about the PaX
++ project. While you are there, download chpax and run it on
++ binaries that cause problems with PaX. Also remember that
++ since the /proc restrictions are enabled, you must run your
++ identd as gid 1001. This security level enables the following
++ features in addition to those listed in the low and medium
++ security levels:
+
-+ if (!len || len > PAGE_SIZE)
-+ goto out;
++ - Additional /proc restrictions
++ - Chmod restrictions in chroot
++ - No signals, ptrace, or viewing of processes outside of chroot
++ - Capability restrictions in chroot
++ - Deny fchdir out of chroot
++ - Priority restrictions in chroot
++ - Segmentation-based implementation of PaX
++ - Mprotect restrictions
++ - Removal of addresses from /proc/<pid>/[smaps|maps|stat]
++ - Kernel stack randomization
++ - Mount/unmount/remount logging
++ - Kernel symbol hiding
++ - Hardening of module auto-loading
++ - Ptrace restrictions
++ - Restricted vm86 mode
++ - Restricted sysfs/debugfs
++ - Active kernel exploit response
+
-+ ret = kmalloc(len, GFP_KERNEL);
++config GRKERNSEC_CUSTOM
++ bool "Custom"
++ help
++ If you say Y here, you will be able to configure every grsecurity
++ option, which allows you to enable many more features that aren't
++ covered in the basic security levels. These additional features
++ include TPE, socket restrictions, and the sysctl system for
++ grsecurity. It is advised that you read through the help for
++ each option to determine its usefulness in your situation.
+
-+ if (ret) {
-+ if (alloc_push(ret)) {
-+ kfree(ret);
-+ ret = NULL;
-+ }
-+ }
++endchoice
+
-+out:
-+ return ret;
-+}
++menu "Address Space Protection"
++depends on GRKERNSEC
+
-+void *
-+acl_alloc_num(unsigned long num, unsigned long len)
-+{
-+ if (!len || (num > (PAGE_SIZE / len)))
-+ return NULL;
++config GRKERNSEC_KMEM
++ bool "Deny reading/writing to /dev/kmem, /dev/mem, and /dev/port"
++ select STRICT_DEVMEM if (X86 || ARM || TILE || S390)
++ help
++ If you say Y here, /dev/kmem and /dev/mem won't be allowed to
++ be written to or read from to modify or leak the contents of the running
++ kernel. /dev/port will also not be allowed to be opened. If you have module
++ support disabled, enabling this will close up four ways that are
++ currently used to insert malicious code into the running kernel.
++ Even with all these features enabled, we still highly recommend that
++ you use the RBAC system, as it is still possible for an attacker to
++ modify the running kernel through privileged I/O granted by ioperm/iopl.
++ If you are not using XFree86, you may be able to stop this additional
++ case by enabling the 'Disable privileged I/O' option. Though nothing
++ legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
++ but only to video memory, which is the only writing we allow in this
++ case. If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
++ not be allowed to mprotect it with PROT_WRITE later.
++ It is highly recommended that you say Y here if you meet all the
++ conditions above.
+
-+ return acl_alloc(num * len);
-+}
++config GRKERNSEC_VM86
++ bool "Restrict VM86 mode"
++ depends on X86_32
+
-+void
-+acl_free_all(void)
-+{
-+ if (gr_acl_is_enabled() || !alloc_stack)
-+ return;
++ help
++ If you say Y here, only processes with CAP_SYS_RAWIO will be able to
++ make use of a special execution mode on 32bit x86 processors called
++ Virtual 8086 (VM86) mode. XFree86 may need vm86 mode for certain
++ video cards and will still work with this option enabled. The purpose
++ of the option is to prevent exploitation of emulation errors in
++ virtualization of vm86 mode like the one discovered in VMWare in 2009.
++ Nearly all users should be able to enable this option.
+
-+ while (alloc_pop()) ;
++config GRKERNSEC_IO
++ bool "Disable privileged I/O"
++ depends on X86
++ select RTC_CLASS
++ select RTC_INTF_DEV
++ select RTC_DRV_CMOS
+
-+ if (alloc_stack) {
-+ if ((alloc_stack_size * sizeof (void *)) <= PAGE_SIZE)
-+ kfree(alloc_stack);
-+ else
-+ vfree(alloc_stack);
-+ }
++ help
++ If you say Y here, all ioperm and iopl calls will return an error.
++ Ioperm and iopl can be used to modify the running kernel.
++ Unfortunately, some programs need this access to operate properly,
++ the most notable of which are XFree86 and hwclock. hwclock can be
++ remedied by having RTC support in the kernel, so real-time
++ clock support is enabled if this option is enabled, to ensure
++ that hwclock operates correctly. XFree86 still will not
++ operate correctly with this option enabled, so DO NOT CHOOSE Y
++ IF YOU USE XFree86. If you use XFree86 and you still want to
++ protect your kernel against modification, use the RBAC system.
+
-+ alloc_stack = NULL;
-+ alloc_stack_size = 1;
-+ alloc_stack_next = 1;
++config GRKERNSEC_PROC_MEMMAP
++ bool "Remove addresses from /proc/<pid>/[smaps|maps|stat]"
++ default y if (PAX_NOEXEC || PAX_ASLR)
++ depends on PAX_NOEXEC || PAX_ASLR
++ help
++ If you say Y here, the /proc/<pid>/maps and /proc/<pid>/stat files will
++ give no information about the addresses of its mappings if
++ PaX features that rely on random addresses are enabled on the task.
++ If you use PaX it is greatly recommended that you say Y here as it
++ closes up a hole that makes the full ASLR useless for suid
++ binaries.
+
-+ return;
-+}
++config GRKERNSEC_BRUTE
++ bool "Deter exploit bruteforcing"
++ help
++ If you say Y here, attempts to bruteforce exploits against forking
++ daemons such as apache or sshd, as well as against suid/sgid binaries
++ will be deterred. When a child of a forking daemon is killed by PaX
++ or crashes due to an illegal instruction or other suspicious signal,
++ the parent process will be delayed 30 seconds upon every subsequent
++ fork until the administrator is able to assess the situation and
++ restart the daemon.
++ In the suid/sgid case, the attempt is logged, the user has all their
++ processes terminated, and they are prevented from executing any further
++ processes for 15 minutes.
++ It is recommended that you also enable signal logging in the auditing
++ section so that logs are generated when a process triggers a suspicious
++ signal.
++ If the sysctl option is enabled, a sysctl option with name
++ "deter_bruteforce" is created.
+
-+int
-+acl_alloc_stack_init(unsigned long size)
-+{
-+ if ((size * sizeof (void *)) <= PAGE_SIZE)
-+ alloc_stack =
-+ (void **) kmalloc(size * sizeof (void *), GFP_KERNEL);
-+ else
-+ alloc_stack = (void **) vmalloc(size * sizeof (void *));
+
-+ alloc_stack_size = size;
++config GRKERNSEC_MODHARDEN
++ bool "Harden module auto-loading"
++ depends on MODULES
++ help
++ If you say Y here, module auto-loading in response to use of some
++ feature implemented by an unloaded module will be restricted to
++ root users. Enabling this option helps defend against attacks
++ by unprivileged users who abuse the auto-loading behavior to
++ cause a vulnerable module to load that is then exploited.
+
-+ if (!alloc_stack)
-+ return 0;
-+ else
-+ return 1;
-+}
-diff -urNp linux-3.1.4/grsecurity/gracl.c linux-3.1.4/grsecurity/gracl.c
---- linux-3.1.4/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl.c 2011-11-16 19:31:00.000000000 -0500
++ If this option prevents a legitimate use of auto-loading for a
++ non-root user, the administrator can execute modprobe manually
++ with the exact name of the module mentioned in the alert log.
++ Alternatively, the administrator can add the module to the list
++ of modules loaded at boot by modifying init scripts.
++
++ Modification of init scripts will most likely be needed on
++ Ubuntu servers with encrypted home directory support enabled,
++ as the first non-root user logging in will cause the ecb(aes),
++ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded.
++
++config GRKERNSEC_HIDESYM
++ bool "Hide kernel symbols"
++ help
++ If you say Y here, getting information on loaded modules, and
++ displaying all kernel symbols through a syscall will be restricted
++ to users with CAP_SYS_MODULE. For software compatibility reasons,
++ /proc/kallsyms will be restricted to the root user. The RBAC
++ system can hide that entry even from root.
++
++ This option also prevents leaking of kernel addresses through
++ several /proc entries.
++
++ Note that this option is only effective provided the following
++ conditions are met:
++ 1) The kernel using grsecurity is not precompiled by some distribution
++ 2) You have also enabled GRKERNSEC_DMESG
++ 3) You are using the RBAC system and hiding other files such as your
++ kernel image and System.map. Alternatively, enabling this option
++ causes the permissions on /boot, /lib/modules, and the kernel
++ source directory to change at compile time to prevent
++ reading by non-root users.
++ If the above conditions are met, this option will aid in providing a
++ useful protection against local kernel exploitation of overflows
++ and arbitrary read/write vulnerabilities.
++
++config GRKERNSEC_KERN_LOCKOUT
++ bool "Active kernel exploit response"
++ depends on X86 || ARM || PPC || SPARC
++ help
++ If you say Y here, when a PaX alert is triggered due to suspicious
++ activity in the kernel (from KERNEXEC/UDEREF/USERCOPY)
++ or an OOPs occurs due to bad memory accesses, instead of just
++ terminating the offending process (and potentially allowing
++ a subsequent exploit from the same user), we will take one of two
++ actions:
++ If the user was root, we will panic the system
++ If the user was non-root, we will log the attempt, terminate
++ all processes owned by the user, then prevent them from creating
++ any new processes until the system is restarted
++ This deters repeated kernel exploitation/bruteforcing attempts
++ and is useful for later forensics.
++
++endmenu
++menu "Role Based Access Control Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_RBAC_DEBUG
++ bool
++
++config GRKERNSEC_NO_RBAC
++ bool "Disable RBAC system"
++ help
++ If you say Y here, the /dev/grsec device will be removed from the kernel,
++ preventing the RBAC system from being enabled. You should only say Y
++ here if you have no intention of using the RBAC system, so as to prevent
++ an attacker with root access from misusing the RBAC system to hide files
++ and processes when loadable module support and /dev/[k]mem have been
++ locked down.
++
++config GRKERNSEC_ACL_HIDEKERN
++ bool "Hide kernel processes"
++ help
++ If you say Y here, all kernel threads will be hidden to all
++ processes but those whose subject has the "view hidden processes"
++ flag.
++
++config GRKERNSEC_ACL_MAXTRIES
++ int "Maximum tries before password lockout"
++ default 3
++ help
++ This option enforces the maximum number of times a user can attempt
++ to authorize themselves with the grsecurity RBAC system before being
++ denied the ability to attempt authorization again for a specified time.
++ The lower the number, the harder it will be to brute-force a password.
++
++config GRKERNSEC_ACL_TIMEOUT
++ int "Time to wait after max password tries, in seconds"
++ default 30
++ help
++ This option specifies the time the user must wait after attempting to
++ authorize to the RBAC system with the maximum number of invalid
++ passwords. The higher the number, the harder it will be to brute-force
++ a password.
++
++endmenu
++menu "Filesystem Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_PROC
++ bool "Proc restrictions"
++ help
++ If you say Y here, the permissions of the /proc filesystem
++ will be altered to enhance system security and privacy. You MUST
++ choose either a user only restriction or a user and group restriction.
++ Depending upon the option you choose, you can either restrict users to
++ see only the processes they themselves run, or choose a group that can
++ view all processes and files normally restricted to root if you choose
++ the "restrict to user only" option. NOTE: If you're running identd as
++ a non-root user, you will have to run it as the group you specify here.
++
++config GRKERNSEC_PROC_USER
++ bool "Restrict /proc to user only"
++ depends on GRKERNSEC_PROC
++ help
++ If you say Y here, non-root users will only be able to view their own
++ processes, and restricts them from viewing network-related information,
++ and viewing kernel symbol and module information.
++
++config GRKERNSEC_PROC_USERGROUP
++ bool "Allow special group"
++ depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
++ help
++ If you say Y here, you will be able to select a group that will be
++ able to view all processes and network-related information. If you've
++ enabled GRKERNSEC_HIDESYM, kernel and symbol information may still
++ remain hidden. This option is useful if you want to run identd as
++ a non-root user.
++
++config GRKERNSEC_PROC_GID
++ int "GID for special group"
++ depends on GRKERNSEC_PROC_USERGROUP
++ default 1001
++
++config GRKERNSEC_PROC_ADD
++ bool "Additional restrictions"
++ depends on GRKERNSEC_PROC_USER || GRKERNSEC_PROC_USERGROUP
++ help
++ If you say Y here, additional restrictions will be placed on
++ /proc that keep normal users from viewing device information and
++ slabinfo information that could be useful for exploits.
++
++config GRKERNSEC_LINK
++ bool "Linking restrictions"
++ help
++ If you say Y here, /tmp race exploits will be prevented, since users
++ will no longer be able to follow symlinks owned by other users in
++ world-writable +t directories (e.g. /tmp), unless the owner of the
++ symlink is the owner of the directory. users will also not be
++ able to hardlink to files they do not own. If the sysctl option is
++ enabled, a sysctl option with name "linking_restrictions" is created.
++
++config GRKERNSEC_FIFO
++ bool "FIFO restrictions"
++ help
++ If you say Y here, users will not be able to write to FIFOs they don't
++ own in world-writable +t directories (e.g. /tmp), unless the owner of
++ the FIFO is the same owner of the directory it's held in. If the sysctl
++ option is enabled, a sysctl option with name "fifo_restrictions" is
++ created.
++
++config GRKERNSEC_SYSFS_RESTRICT
++ bool "Sysfs/debugfs restriction"
++ depends on SYSFS
++ help
++ If you say Y here, sysfs (the pseudo-filesystem mounted at /sys) and
++ any filesystem normally mounted under it (e.g. debugfs) will only
++ be accessible by root. These filesystems generally provide access
++ to hardware and debug information that isn't appropriate for unprivileged
++ users of the system. Sysfs and debugfs have also become a large source
++ of new vulnerabilities, ranging from infoleaks to local compromise.
++ There has been very little oversight with an eye toward security involved
++ in adding new exporters of information to these filesystems, so their
++ use is discouraged.
++ This option is equivalent to a chmod 0700 of the mount paths.
++
++config GRKERNSEC_ROFS
++ bool "Runtime read-only mount protection"
++ help
++ If you say Y here, a sysctl option with name "romount_protect" will
++ be created. By setting this option to 1 at runtime, filesystems
++ will be protected in the following ways:
++ * No new writable mounts will be allowed
++ * Existing read-only mounts won't be able to be remounted read/write
++ * Write operations will be denied on all block devices
++ This option acts independently of grsec_lock: once it is set to 1,
++ it cannot be turned off. Therefore, please be mindful of the resulting
++ behavior if this option is enabled in an init script on a read-only
++ filesystem. This feature is mainly intended for secure embedded systems.
++
++config GRKERNSEC_CHROOT
++ bool "Chroot jail restrictions"
++ help
++ If you say Y here, you will be able to choose several options that will
++ make breaking out of a chrooted jail much more difficult. If you
++ encounter no software incompatibilities with the following options, it
++ is recommended that you enable each one.
++
++config GRKERNSEC_CHROOT_MOUNT
++ bool "Deny mounts"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ mount or remount filesystems. If the sysctl option is enabled, a
++ sysctl option with name "chroot_deny_mount" is created.
++
++config GRKERNSEC_CHROOT_DOUBLE
++ bool "Deny double-chroots"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to chroot
++ again outside the chroot. This is a widely used method of breaking
++ out of a chroot jail and should not be allowed. If the sysctl
++ option is enabled, a sysctl option with name
++ "chroot_deny_chroot" is created.
++
++config GRKERNSEC_CHROOT_PIVOT
++ bool "Deny pivot_root in chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to use
++ a function called pivot_root() that was introduced in Linux 2.3.41. It
++ works similar to chroot in that it changes the root filesystem. This
++ function could be misused in a chrooted process to attempt to break out
++ of the chroot, and therefore should not be allowed. If the sysctl
++ option is enabled, a sysctl option with name "chroot_deny_pivot" is
++ created.
++
++config GRKERNSEC_CHROOT_CHDIR
++ bool "Enforce chdir(\"/\") on all chroots"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, the current working directory of all newly-chrooted
++ applications will be set to the the root directory of the chroot.
++ The man page on chroot(2) states:
++ Note that this call does not change the current working
++ directory, so that `.' can be outside the tree rooted at
++ `/'. In particular, the super-user can escape from a
++ `chroot jail' by doing `mkdir foo; chroot foo; cd ..'.
++
++ It is recommended that you say Y here, since it's not known to break
++ any software. If the sysctl option is enabled, a sysctl option with
++ name "chroot_enforce_chdir" is created.
++
++config GRKERNSEC_CHROOT_CHMOD
++ bool "Deny (f)chmod +s"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to chmod
++ or fchmod files to make them have suid or sgid bits. This protects
++ against another published method of breaking a chroot. If the sysctl
++ option is enabled, a sysctl option with name "chroot_deny_chmod" is
++ created.
++
++config GRKERNSEC_CHROOT_FCHDIR
++ bool "Deny fchdir out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, a well-known method of breaking chroots by fchdir'ing
++ to a file descriptor of the chrooting process that points to a directory
++ outside the filesystem will be stopped. If the sysctl option
++ is enabled, a sysctl option with name "chroot_deny_fchdir" is created.
++
++config GRKERNSEC_CHROOT_MKNOD
++ bool "Deny mknod"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be allowed to
++ mknod. The problem with using mknod inside a chroot is that it
++ would allow an attacker to create a device entry that is the same
++ as one on the physical root of your system, which could range from
++ anything from the console device to a device for your harddrive (which
++ they could then use to wipe the drive or steal data). It is recommended
++ that you say Y here, unless you run into software incompatibilities.
++ If the sysctl option is enabled, a sysctl option with name
++ "chroot_deny_mknod" is created.
++
++config GRKERNSEC_CHROOT_SHMAT
++ bool "Deny shmat() out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to attach
++ to shared memory segments that were created outside of the chroot jail.
++ It is recommended that you say Y here. If the sysctl option is enabled,
++ a sysctl option with name "chroot_deny_shmat" is created.
++
++config GRKERNSEC_CHROOT_UNIX
++ bool "Deny access to abstract AF_UNIX sockets out of chroot"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ connect to abstract (meaning not belonging to a filesystem) Unix
++ domain sockets that were bound outside of a chroot. It is recommended
++ that you say Y here. If the sysctl option is enabled, a sysctl option
++ with name "chroot_deny_unix" is created.
++
++config GRKERNSEC_CHROOT_FINDTASK
++ bool "Protect outside processes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to
++ kill, send signals with fcntl, ptrace, capget, getpgid, setpgid,
++ getsid, or view any process outside of the chroot. If the sysctl
++ option is enabled, a sysctl option with name "chroot_findtask" is
++ created.
++
++config GRKERNSEC_CHROOT_NICE
++ bool "Restrict priority changes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, processes inside a chroot will not be able to raise
++ the priority of processes in the chroot, or alter the priority of
++ processes outside the chroot. This provides more security than simply
++ removing CAP_SYS_NICE from the process' capability set. If the
++ sysctl option is enabled, a sysctl option with name "chroot_restrict_nice"
++ is created.
++
++config GRKERNSEC_CHROOT_SYSCTL
++ bool "Deny sysctl writes"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, an attacker in a chroot will not be able to
++ write to sysctl entries, either by sysctl(2) or through a /proc
++ interface. It is strongly recommended that you say Y here. If the
++ sysctl option is enabled, a sysctl option with name
++ "chroot_deny_sysctl" is created.
++
++config GRKERNSEC_CHROOT_CAPS
++ bool "Capability restrictions"
++ depends on GRKERNSEC_CHROOT
++ help
++ If you say Y here, the capabilities on all processes within a
++ chroot jail will be lowered to stop module insertion, raw i/o,
++ system and net admin tasks, rebooting the system, modifying immutable
++ files, modifying IPC owned by another, and changing the system time.
++ This is left an option because it can break some apps. Disable this
++ if your chrooted apps are having problems performing those kinds of
++ tasks. If the sysctl option is enabled, a sysctl option with
++ name "chroot_caps" is created.
++
++endmenu
++menu "Kernel Auditing"
++depends on GRKERNSEC
++
++config GRKERNSEC_AUDIT_GROUP
++ bool "Single group for auditing"
++ help
++ If you say Y here, the exec, chdir, and (un)mount logging features
++ will only operate on a group you specify. This option is recommended
++ if you only want to watch certain users instead of having a large
++ amount of logs from the entire system. If the sysctl option is enabled,
++ a sysctl option with name "audit_group" is created.
++
++config GRKERNSEC_AUDIT_GID
++ int "GID for auditing"
++ depends on GRKERNSEC_AUDIT_GROUP
++ default 1007
++
++config GRKERNSEC_EXECLOG
++ bool "Exec logging"
++ help
++ If you say Y here, all execve() calls will be logged (since the
++ other exec*() calls are frontends to execve(), all execution
++ will be logged). Useful for shell-servers that like to keep track
++ of their users. If the sysctl option is enabled, a sysctl option with
++ name "exec_logging" is created.
++ WARNING: This option when enabled will produce a LOT of logs, especially
++ on an active system.
++
++config GRKERNSEC_RESLOG
++ bool "Resource logging"
++ help
++ If you say Y here, all attempts to overstep resource limits will
++ be logged with the resource name, the requested size, and the current
++ limit. It is highly recommended that you say Y here. If the sysctl
++ option is enabled, a sysctl option with name "resource_logging" is
++ created. If the RBAC system is enabled, the sysctl value is ignored.
++
++config GRKERNSEC_CHROOT_EXECLOG
++ bool "Log execs within chroot"
++ help
++ If you say Y here, all executions inside a chroot jail will be logged
++ to syslog. This can cause a large amount of logs if certain
++ applications (eg. djb's daemontools) are installed on the system, and
++ is therefore left as an option. If the sysctl option is enabled, a
++ sysctl option with name "chroot_execlog" is created.
++
++config GRKERNSEC_AUDIT_PTRACE
++ bool "Ptrace logging"
++ help
++ If you say Y here, all attempts to attach to a process via ptrace
++ will be logged. If the sysctl option is enabled, a sysctl option
++ with name "audit_ptrace" is created.
++
++config GRKERNSEC_AUDIT_CHDIR
++ bool "Chdir logging"
++ help
++ If you say Y here, all chdir() calls will be logged. If the sysctl
++ option is enabled, a sysctl option with name "audit_chdir" is created.
++
++config GRKERNSEC_AUDIT_MOUNT
++ bool "(Un)Mount logging"
++ help
++ If you say Y here, all mounts and unmounts will be logged. If the
++ sysctl option is enabled, a sysctl option with name "audit_mount" is
++ created.
++
++config GRKERNSEC_SIGNAL
++ bool "Signal logging"
++ help
++ If you say Y here, certain important signals will be logged, such as
++ SIGSEGV, which will as a result inform you of when a error in a program
++ occurred, which in some cases could mean a possible exploit attempt.
++ If the sysctl option is enabled, a sysctl option with name
++ "signal_logging" is created.
++
++config GRKERNSEC_FORKFAIL
++ bool "Fork failure logging"
++ help
++ If you say Y here, all failed fork() attempts will be logged.
++ This could suggest a fork bomb, or someone attempting to overstep
++ their process limit. If the sysctl option is enabled, a sysctl option
++ with name "forkfail_logging" is created.
++
++config GRKERNSEC_TIME
++ bool "Time change logging"
++ help
++ If you say Y here, any changes of the system clock will be logged.
++ If the sysctl option is enabled, a sysctl option with name
++ "timechange_logging" is created.
++
++config GRKERNSEC_PROC_IPADDR
++ bool "/proc/<pid>/ipaddr support"
++ help
++ If you say Y here, a new entry will be added to each /proc/<pid>
++ directory that contains the IP address of the person using the task.
++ The IP is carried across local TCP and AF_UNIX stream sockets.
++ This information can be useful for IDS/IPSes to perform remote response
++ to a local attack. The entry is readable by only the owner of the
++ process (and root if he has CAP_DAC_OVERRIDE, which can be removed via
++ the RBAC system), and thus does not create privacy concerns.
++
++config GRKERNSEC_RWXMAP_LOG
++ bool 'Denied RWX mmap/mprotect logging'
++ depends on PAX_MPROTECT && !PAX_EMUPLT && !PAX_EMUSIGRT
++ help
++ If you say Y here, calls to mmap() and mprotect() with explicit
++ usage of PROT_WRITE and PROT_EXEC together will be logged when
++ denied by the PAX_MPROTECT feature. If the sysctl option is
++ enabled, a sysctl option with name "rwxmap_logging" is created.
++
++config GRKERNSEC_AUDIT_TEXTREL
++ bool 'ELF text relocations logging (READ HELP)'
++ depends on PAX_MPROTECT
++ help
++ If you say Y here, text relocations will be logged with the filename
++ of the offending library or binary. The purpose of the feature is
++ to help Linux distribution developers get rid of libraries and
++ binaries that need text relocations which hinder the future progress
++ of PaX. Only Linux distribution developers should say Y here, and
++ never on a production machine, as this option creates an information
++ leak that could aid an attacker in defeating the randomization of
++ a single memory region. If the sysctl option is enabled, a sysctl
++ option with name "audit_textrel" is created.
++
++endmenu
++
++menu "Executable Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_DMESG
++ bool "Dmesg(8) restriction"
++ help
++ If you say Y here, non-root users will not be able to use dmesg(8)
++ to view up to the last 4kb of messages in the kernel's log buffer.
++ The kernel's log buffer often contains kernel addresses and other
++ identifying information useful to an attacker in fingerprinting a
++ system for a targeted exploit.
++ If the sysctl option is enabled, a sysctl option with name "dmesg" is
++ created.
++
++config GRKERNSEC_HARDEN_PTRACE
++ bool "Deter ptrace-based process snooping"
++ help
++ If you say Y here, TTY sniffers and other malicious monitoring
++ programs implemented through ptrace will be defeated. If you
++ have been using the RBAC system, this option has already been
++ enabled for several years for all users, with the ability to make
++ fine-grained exceptions.
++
++ This option only affects the ability of non-root users to ptrace
++ processes that are not a descendent of the ptracing process.
++ This means that strace ./binary and gdb ./binary will still work,
++ but attaching to arbitrary processes will not. If the sysctl
++ option is enabled, a sysctl option with name "harden_ptrace" is
++ created.
++
++config GRKERNSEC_TPE
++ bool "Trusted Path Execution (TPE)"
++ help
++ If you say Y here, you will be able to choose a gid to add to the
++ supplementary groups of users you want to mark as "untrusted."
++ These users will not be able to execute any files that are not in
++ root-owned directories writable only by root. If the sysctl option
++ is enabled, a sysctl option with name "tpe" is created.
++
++config GRKERNSEC_TPE_ALL
++ bool "Partially restrict all non-root users"
++ depends on GRKERNSEC_TPE
++ help
++ If you say Y here, all non-root users will be covered under
++ a weaker TPE restriction. This is separate from, and in addition to,
++ the main TPE options that you have selected elsewhere. Thus, if a
++ "trusted" GID is chosen, this restriction applies to even that GID.
++ Under this restriction, all non-root users will only be allowed to
++ execute files in directories they own that are not group or
++ world-writable, or in directories owned by root and writable only by
++ root. If the sysctl option is enabled, a sysctl option with name
++ "tpe_restrict_all" is created.
++
++config GRKERNSEC_TPE_INVERT
++ bool "Invert GID option"
++ depends on GRKERNSEC_TPE
++ help
++ If you say Y here, the group you specify in the TPE configuration will
++ decide what group TPE restrictions will be *disabled* for. This
++ option is useful if you want TPE restrictions to be applied to most
++ users on the system. If the sysctl option is enabled, a sysctl option
++ with name "tpe_invert" is created. Unlike other sysctl options, this
++ entry will default to on for backward-compatibility.
++
++config GRKERNSEC_TPE_GID
++ int "GID for untrusted users"
++ depends on GRKERNSEC_TPE && !GRKERNSEC_TPE_INVERT
++ default 1005
++ help
++ Setting this GID determines what group TPE restrictions will be
++ *enabled* for. If the sysctl option is enabled, a sysctl option
++ with name "tpe_gid" is created.
++
++config GRKERNSEC_TPE_GID
++ int "GID for trusted users"
++ depends on GRKERNSEC_TPE && GRKERNSEC_TPE_INVERT
++ default 1005
++ help
++ Setting this GID determines what group TPE restrictions will be
++ *disabled* for. If the sysctl option is enabled, a sysctl option
++ with name "tpe_gid" is created.
++
++endmenu
++menu "Network Protections"
++depends on GRKERNSEC
++
++config GRKERNSEC_RANDNET
++ bool "Larger entropy pools"
++ help
++ If you say Y here, the entropy pools used for many features of Linux
++ and grsecurity will be doubled in size. Since several grsecurity
++ features use additional randomness, it is recommended that you say Y
++ here. Saying Y here has a similar effect as modifying
++ /proc/sys/kernel/random/poolsize.
++
++config GRKERNSEC_BLACKHOLE
++ bool "TCP/UDP blackhole and LAST_ACK DoS prevention"
++ depends on NET
++ help
++ If you say Y here, neither TCP resets nor ICMP
++ destination-unreachable packets will be sent in response to packets
++ sent to ports for which no associated listening process exists.
++ This feature supports both IPV4 and IPV6 and exempts the
++ loopback interface from blackholing. Enabling this feature
++ makes a host more resilient to DoS attacks and reduces network
++ visibility against scanners.
++
++ The blackhole feature as-implemented is equivalent to the FreeBSD
++ blackhole feature, as it prevents RST responses to all packets, not
++ just SYNs. Under most application behavior this causes no
++ problems, but applications (like haproxy) may not close certain
++ connections in a way that cleanly terminates them on the remote
++ end, leaving the remote host in LAST_ACK state. Because of this
++ side-effect and to prevent intentional LAST_ACK DoSes, this
++ feature also adds automatic mitigation against such attacks.
++ The mitigation drastically reduces the amount of time a socket
++ can spend in LAST_ACK state. If you're using haproxy and not
++ all servers it connects to have this option enabled, consider
++ disabling this feature on the haproxy host.
++
++ If the sysctl option is enabled, two sysctl options with names
++ "ip_blackhole" and "lastack_retries" will be created.
++ While "ip_blackhole" takes the standard zero/non-zero on/off
++ toggle, "lastack_retries" uses the same kinds of values as
++ "tcp_retries1" and "tcp_retries2". The default value of 4
++ prevents a socket from lasting more than 45 seconds in LAST_ACK
++ state.
++
++config GRKERNSEC_SOCKET
++ bool "Socket restrictions"
++ depends on NET
++ help
++ If you say Y here, you will be able to choose from several options.
++ If you assign a GID on your system and add it to the supplementary
++ groups of users you want to restrict socket access to, this patch
++ will perform up to three things, based on the option(s) you choose.
++
++config GRKERNSEC_SOCKET_ALL
++ bool "Deny any sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to connect to other hosts from your machine or run server
++ applications from your machine. If the sysctl option is enabled, a
++ sysctl option with name "socket_all" is created.
++
++config GRKERNSEC_SOCKET_ALL_GID
++ int "GID to deny all sockets for"
++ depends on GRKERNSEC_SOCKET_ALL
++ default 1004
++ help
++ Here you can choose the GID to disable socket access for. Remember to
++ add the users you want socket access disabled for to the GID
++ specified here. If the sysctl option is enabled, a sysctl option
++ with name "socket_all_gid" is created.
++
++config GRKERNSEC_SOCKET_CLIENT
++ bool "Deny client sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to connect to other hosts from your machine, but will be
++ able to run servers. If this option is enabled, all users in the group
++ you specify will have to use passive mode when initiating ftp transfers
++ from the shell on your machine. If the sysctl option is enabled, a
++ sysctl option with name "socket_client" is created.
++
++config GRKERNSEC_SOCKET_CLIENT_GID
++ int "GID to deny client sockets for"
++ depends on GRKERNSEC_SOCKET_CLIENT
++ default 1003
++ help
++ Here you can choose the GID to disable client socket access for.
++ Remember to add the users you want client socket access disabled for to
++ the GID specified here. If the sysctl option is enabled, a sysctl
++ option with name "socket_client_gid" is created.
++
++config GRKERNSEC_SOCKET_SERVER
++ bool "Deny server sockets to group"
++ depends on GRKERNSEC_SOCKET
++ help
++ If you say Y here, you will be able to choose a GID of whose users will
++ be unable to run server applications from your machine. If the sysctl
++ option is enabled, a sysctl option with name "socket_server" is created.
++
++config GRKERNSEC_SOCKET_SERVER_GID
++ int "GID to deny server sockets for"
++ depends on GRKERNSEC_SOCKET_SERVER
++ default 1002
++ help
++ Here you can choose the GID to disable server socket access for.
++ Remember to add the users you want server socket access disabled for to
++ the GID specified here. If the sysctl option is enabled, a sysctl
++ option with name "socket_server_gid" is created.
++
++endmenu
++menu "Sysctl support"
++depends on GRKERNSEC && SYSCTL
++
++config GRKERNSEC_SYSCTL
++ bool "Sysctl support"
++ help
++ If you say Y here, you will be able to change the options that
++ grsecurity runs with at bootup, without having to recompile your
++ kernel. You can echo values to files in /proc/sys/kernel/grsecurity
++ to enable (1) or disable (0) various features. All the sysctl entries
++ are mutable until the "grsec_lock" entry is set to a non-zero value.
++ All features enabled in the kernel configuration are disabled at boot
++ if you do not say Y to the "Turn on features by default" option.
++ All options should be set at startup, and the grsec_lock entry should
++ be set to a non-zero value after all the options are set.
++ *THIS IS EXTREMELY IMPORTANT*
++
++config GRKERNSEC_SYSCTL_DISTRO
++ bool "Extra sysctl support for distro makers (READ HELP)"
++ depends on GRKERNSEC_SYSCTL && GRKERNSEC_IO
++ help
++ If you say Y here, additional sysctl options will be created
++ for features that affect processes running as root. Therefore,
++ it is critical when using this option that the grsec_lock entry be
++ enabled after boot. Only distros with prebuilt kernel packages
++ with this option enabled that can ensure grsec_lock is enabled
++ after boot should use this option.
++ *Failure to set grsec_lock after boot makes all grsec features
++ this option covers useless*
++
++ Currently this option creates the following sysctl entries:
++ "Disable Privileged I/O": "disable_priv_io"
++
++config GRKERNSEC_SYSCTL_ON
++ bool "Turn on features by default"
++ depends on GRKERNSEC_SYSCTL
++ help
++ If you say Y here, instead of having all features enabled in the
++ kernel configuration disabled at boot time, the features will be
++ enabled at boot time. It is recommended you say Y here unless
++ there is some reason you would want all sysctl-tunable features to
++ be disabled by default. As mentioned elsewhere, it is important
++ to enable the grsec_lock entry once you have finished modifying
++ the sysctl entries.
++
++endmenu
++menu "Logging Options"
++depends on GRKERNSEC
++
++config GRKERNSEC_FLOODTIME
++ int "Seconds in between log messages (minimum)"
++ default 10
++ help
++ This option allows you to enforce the number of seconds between
++ grsecurity log messages. The default should be suitable for most
++ people, however, if you choose to change it, choose a value small enough
++ to allow informative logs to be produced, but large enough to
++ prevent flooding.
++
++config GRKERNSEC_FLOODBURST
++ int "Number of messages in a burst (maximum)"
++ default 6
++ help
++ This option allows you to choose the maximum number of messages allowed
++ within the flood time interval you chose in a separate option. The
++ default should be suitable for most people, however if you find that
++ many of your logs are being interpreted as flooding, you may want to
++ raise this value.
++
++endmenu
++
++endmenu
+diff --git a/grsecurity/Makefile b/grsecurity/Makefile
+new file mode 100644
+index 0000000..be9ae3a
+--- /dev/null
++++ b/grsecurity/Makefile
+@@ -0,0 +1,36 @@
++# grsecurity's ACL system was originally written in 2001 by Michael Dalton
++# during 2001-2009 it has been completely redesigned by Brad Spengler
++# into an RBAC system
++#
++# All code in this directory and various hooks inserted throughout the kernel
++# are copyright Brad Spengler - Open Source Security, Inc., and released
++# under the GPL v2 or higher
++
++obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
++ grsec_mount.o grsec_sig.o grsec_sysctl.o \
++ grsec_time.o grsec_tpe.o grsec_link.o grsec_pax.o grsec_ptrace.o
++
++obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_segv.o \
++ gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
++ gracl_learn.o grsec_log.o
++obj-$(CONFIG_GRKERNSEC_RESLOG) += gracl_res.o
++
++ifdef CONFIG_NET
++obj-y += grsec_sock.o
++obj-$(CONFIG_GRKERNSEC) += gracl_ip.o
++endif
++
++ifndef CONFIG_GRKERNSEC
++obj-y += grsec_disabled.o
++endif
++
++ifdef CONFIG_GRKERNSEC_HIDESYM
++extra-y := grsec_hidesym.o
++$(obj)/grsec_hidesym.o:
++ @-chmod -f 500 /boot
++ @-chmod -f 500 /lib/modules
++ @-chmod -f 500 /lib64/modules
++ @-chmod -f 500 /lib32/modules
++ @-chmod -f 700 .
++ @echo ' grsec: protected kernel image paths'
++endif
+diff --git a/grsecurity/gracl.c b/grsecurity/gracl.c
+new file mode 100644
+index 0000000..09258e0
+--- /dev/null
++++ b/grsecurity/gracl.c
@@ -0,0 +1,4156 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -52365,9 +54716,122 @@ diff -urNp linux-3.1.4/grsecurity/gracl.c linux-3.1.4/grsecurity/gracl.c
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
+
-diff -urNp linux-3.1.4/grsecurity/gracl_cap.c linux-3.1.4/grsecurity/gracl_cap.c
---- linux-3.1.4/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_cap.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_alloc.c b/grsecurity/gracl_alloc.c
+new file mode 100644
+index 0000000..34fefda
+--- /dev/null
++++ b/grsecurity/gracl_alloc.c
+@@ -0,0 +1,105 @@
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/gracl.h>
++#include <linux/grsecurity.h>
++
++static unsigned long alloc_stack_next = 1;
++static unsigned long alloc_stack_size = 1;
++static void **alloc_stack;
++
++static __inline__ int
++alloc_pop(void)
++{
++ if (alloc_stack_next == 1)
++ return 0;
++
++ kfree(alloc_stack[alloc_stack_next - 2]);
++
++ alloc_stack_next--;
++
++ return 1;
++}
++
++static __inline__ int
++alloc_push(void *buf)
++{
++ if (alloc_stack_next >= alloc_stack_size)
++ return 1;
++
++ alloc_stack[alloc_stack_next - 1] = buf;
++
++ alloc_stack_next++;
++
++ return 0;
++}
++
++void *
++acl_alloc(unsigned long len)
++{
++ void *ret = NULL;
++
++ if (!len || len > PAGE_SIZE)
++ goto out;
++
++ ret = kmalloc(len, GFP_KERNEL);
++
++ if (ret) {
++ if (alloc_push(ret)) {
++ kfree(ret);
++ ret = NULL;
++ }
++ }
++
++out:
++ return ret;
++}
++
++void *
++acl_alloc_num(unsigned long num, unsigned long len)
++{
++ if (!len || (num > (PAGE_SIZE / len)))
++ return NULL;
++
++ return acl_alloc(num * len);
++}
++
++void
++acl_free_all(void)
++{
++ if (gr_acl_is_enabled() || !alloc_stack)
++ return;
++
++ while (alloc_pop()) ;
++
++ if (alloc_stack) {
++ if ((alloc_stack_size * sizeof (void *)) <= PAGE_SIZE)
++ kfree(alloc_stack);
++ else
++ vfree(alloc_stack);
++ }
++
++ alloc_stack = NULL;
++ alloc_stack_size = 1;
++ alloc_stack_next = 1;
++
++ return;
++}
++
++int
++acl_alloc_stack_init(unsigned long size)
++{
++ if ((size * sizeof (void *)) <= PAGE_SIZE)
++ alloc_stack =
++ (void **) kmalloc(size * sizeof (void *), GFP_KERNEL);
++ else
++ alloc_stack = (void **) vmalloc(size * sizeof (void *));
++
++ alloc_stack_size = size;
++
++ if (!alloc_stack)
++ return 0;
++ else
++ return 1;
++}
+diff --git a/grsecurity/gracl_cap.c b/grsecurity/gracl_cap.c
+new file mode 100644
+index 0000000..955ddfb
+--- /dev/null
++++ b/grsecurity/gracl_cap.c
@@ -0,0 +1,101 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -52470,9 +54934,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_cap.c linux-3.1.4/grsecurity/gracl_cap.c
+ return 0;
+}
+
-diff -urNp linux-3.1.4/grsecurity/gracl_fs.c linux-3.1.4/grsecurity/gracl_fs.c
---- linux-3.1.4/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_fs.c 2011-11-17 00:25:32.000000000 -0500
+diff --git a/grsecurity/gracl_fs.c b/grsecurity/gracl_fs.c
+new file mode 100644
+index 0000000..4eda5c3
+--- /dev/null
++++ b/grsecurity/gracl_fs.c
@@ -0,0 +1,433 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -52907,9 +55373,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_fs.c linux-3.1.4/grsecurity/gracl_fs.c
+
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/gracl_ip.c linux-3.1.4/grsecurity/gracl_ip.c
---- linux-3.1.4/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_ip.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_ip.c b/grsecurity/gracl_ip.c
+new file mode 100644
+index 0000000..17050ca
+--- /dev/null
++++ b/grsecurity/gracl_ip.c
@@ -0,0 +1,381 @@
+#include <linux/kernel.h>
+#include <asm/uaccess.h>
@@ -53292,9 +55760,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_ip.c linux-3.1.4/grsecurity/gracl_ip.c
+
+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
+}
-diff -urNp linux-3.1.4/grsecurity/gracl_learn.c linux-3.1.4/grsecurity/gracl_learn.c
---- linux-3.1.4/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_learn.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_learn.c b/grsecurity/gracl_learn.c
+new file mode 100644
+index 0000000..25f54ef
+--- /dev/null
++++ b/grsecurity/gracl_learn.c
@@ -0,0 +1,207 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -53503,9 +55973,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_learn.c linux-3.1.4/grsecurity/gracl_lea
+ .release = close_learn,
+ .poll = poll_learn,
+};
-diff -urNp linux-3.1.4/grsecurity/gracl_res.c linux-3.1.4/grsecurity/gracl_res.c
---- linux-3.1.4/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_res.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_res.c b/grsecurity/gracl_res.c
+new file mode 100644
+index 0000000..39645c9
+--- /dev/null
++++ b/grsecurity/gracl_res.c
@@ -0,0 +1,68 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -53575,9 +56047,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_res.c linux-3.1.4/grsecurity/gracl_res.c
+ rcu_read_unlock();
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/gracl_segv.c linux-3.1.4/grsecurity/gracl_segv.c
---- linux-3.1.4/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_segv.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_segv.c b/grsecurity/gracl_segv.c
+new file mode 100644
+index 0000000..5556be3
+--- /dev/null
++++ b/grsecurity/gracl_segv.c
@@ -0,0 +1,299 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -53878,9 +56352,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_segv.c linux-3.1.4/grsecurity/gracl_segv
+
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/gracl_shm.c linux-3.1.4/grsecurity/gracl_shm.c
---- linux-3.1.4/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/gracl_shm.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/gracl_shm.c b/grsecurity/gracl_shm.c
+new file mode 100644
+index 0000000..9d83a69
+--- /dev/null
++++ b/grsecurity/gracl_shm.c
@@ -0,0 +1,40 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
@@ -53922,9 +56398,11 @@ diff -urNp linux-3.1.4/grsecurity/gracl_shm.c linux-3.1.4/grsecurity/gracl_shm.c
+
+ return 1;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_chdir.c linux-3.1.4/grsecurity/grsec_chdir.c
---- linux-3.1.4/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_chdir.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_chdir.c b/grsecurity/grsec_chdir.c
+new file mode 100644
+index 0000000..bc0be01
+--- /dev/null
++++ b/grsecurity/grsec_chdir.c
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -53945,9 +56423,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_chdir.c linux-3.1.4/grsecurity/grsec_chd
+#endif
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_chroot.c linux-3.1.4/grsecurity/grsec_chroot.c
---- linux-3.1.4/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_chroot.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_chroot.c b/grsecurity/grsec_chroot.c
+new file mode 100644
+index 0000000..a2dc675
+--- /dev/null
++++ b/grsecurity/grsec_chroot.c
@@ -0,0 +1,351 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -54300,9 +56780,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_chroot.c linux-3.1.4/grsecurity/grsec_ch
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_disabled.c linux-3.1.4/grsecurity/grsec_disabled.c
---- linux-3.1.4/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_disabled.c 2011-11-17 00:16:25.000000000 -0500
+diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c
+new file mode 100644
+index 0000000..d81a586
+--- /dev/null
++++ b/grsecurity/grsec_disabled.c
@@ -0,0 +1,439 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -54743,9 +57225,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_disabled.c linux-3.1.4/grsecurity/grsec_
+EXPORT_SYMBOL(gr_check_user_change);
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
-diff -urNp linux-3.1.4/grsecurity/grsec_exec.c linux-3.1.4/grsecurity/grsec_exec.c
---- linux-3.1.4/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_exec.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_exec.c b/grsecurity/grsec_exec.c
+new file mode 100644
+index 0000000..2b05ada
+--- /dev/null
++++ b/grsecurity/grsec_exec.c
@@ -0,0 +1,146 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -54893,9 +57377,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_exec.c linux-3.1.4/grsecurity/grsec_exec
+
+EXPORT_SYMBOL(gr_is_capable);
+EXPORT_SYMBOL(gr_is_capable_nolog);
-diff -urNp linux-3.1.4/grsecurity/grsec_fifo.c linux-3.1.4/grsecurity/grsec_fifo.c
---- linux-3.1.4/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_fifo.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_fifo.c b/grsecurity/grsec_fifo.c
+new file mode 100644
+index 0000000..d3ee748
+--- /dev/null
++++ b/grsecurity/grsec_fifo.c
@@ -0,0 +1,24 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -54921,9 +57407,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_fifo.c linux-3.1.4/grsecurity/grsec_fifo
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_fork.c linux-3.1.4/grsecurity/grsec_fork.c
---- linux-3.1.4/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_fork.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_fork.c b/grsecurity/grsec_fork.c
+new file mode 100644
+index 0000000..8ca18bf
+--- /dev/null
++++ b/grsecurity/grsec_fork.c
@@ -0,0 +1,23 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -54948,9 +57436,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_fork.c linux-3.1.4/grsecurity/grsec_fork
+#endif
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_init.c linux-3.1.4/grsecurity/grsec_init.c
---- linux-3.1.4/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_init.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_init.c b/grsecurity/grsec_init.c
+new file mode 100644
+index 0000000..356ef00
+--- /dev/null
++++ b/grsecurity/grsec_init.c
@@ -0,0 +1,269 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55221,9 +57711,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_init.c linux-3.1.4/grsecurity/grsec_init
+
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_link.c linux-3.1.4/grsecurity/grsec_link.c
---- linux-3.1.4/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_link.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_link.c b/grsecurity/grsec_link.c
+new file mode 100644
+index 0000000..3efe141
+--- /dev/null
++++ b/grsecurity/grsec_link.c
@@ -0,0 +1,43 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55268,9 +57760,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_link.c linux-3.1.4/grsecurity/grsec_link
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_log.c linux-3.1.4/grsecurity/grsec_log.c
---- linux-3.1.4/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_log.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_log.c b/grsecurity/grsec_log.c
+new file mode 100644
+index 0000000..a45d2e9
+--- /dev/null
++++ b/grsecurity/grsec_log.c
@@ -0,0 +1,322 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55594,9 +58088,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_log.c linux-3.1.4/grsecurity/grsec_log.c
+ gr_log_end(audit, 1);
+ END_LOCKS(audit);
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_mem.c linux-3.1.4/grsecurity/grsec_mem.c
---- linux-3.1.4/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_mem.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_mem.c b/grsecurity/grsec_mem.c
+new file mode 100644
+index 0000000..6c0416b
+--- /dev/null
++++ b/grsecurity/grsec_mem.c
@@ -0,0 +1,33 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55631,9 +58127,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_mem.c linux-3.1.4/grsecurity/grsec_mem.c
+ gr_log_noargs(GR_DONT_AUDIT, GR_VM86_MSG);
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_mount.c linux-3.1.4/grsecurity/grsec_mount.c
---- linux-3.1.4/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_mount.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_mount.c b/grsecurity/grsec_mount.c
+new file mode 100644
+index 0000000..2131422
+--- /dev/null
++++ b/grsecurity/grsec_mount.c
@@ -0,0 +1,62 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55697,9 +58195,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_mount.c linux-3.1.4/grsecurity/grsec_mou
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_pax.c linux-3.1.4/grsecurity/grsec_pax.c
---- linux-3.1.4/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_pax.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_pax.c b/grsecurity/grsec_pax.c
+new file mode 100644
+index 0000000..a3b12a0
+--- /dev/null
++++ b/grsecurity/grsec_pax.c
@@ -0,0 +1,36 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55737,9 +58237,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_pax.c linux-3.1.4/grsecurity/grsec_pax.c
+#endif
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_ptrace.c linux-3.1.4/grsecurity/grsec_ptrace.c
---- linux-3.1.4/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_ptrace.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_ptrace.c b/grsecurity/grsec_ptrace.c
+new file mode 100644
+index 0000000..472c1d6
+--- /dev/null
++++ b/grsecurity/grsec_ptrace.c
@@ -0,0 +1,14 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55755,9 +58257,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_ptrace.c linux-3.1.4/grsecurity/grsec_pt
+#endif
+ return;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_sig.c linux-3.1.4/grsecurity/grsec_sig.c
---- linux-3.1.4/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_sig.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_sig.c b/grsecurity/grsec_sig.c
+new file mode 100644
+index 0000000..cf090b3
+--- /dev/null
++++ b/grsecurity/grsec_sig.c
@@ -0,0 +1,206 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -55965,9 +58469,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_sig.c linux-3.1.4/grsecurity/grsec_sig.c
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_sock.c linux-3.1.4/grsecurity/grsec_sock.c
---- linux-3.1.4/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_sock.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_sock.c b/grsecurity/grsec_sock.c
+new file mode 100644
+index 0000000..4030d57
+--- /dev/null
++++ b/grsecurity/grsec_sock.c
@@ -0,0 +1,244 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -56213,9 +58719,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_sock.c linux-3.1.4/grsecurity/grsec_sock
+#endif
+ return 0;
+}
-diff -urNp linux-3.1.4/grsecurity/grsec_sysctl.c linux-3.1.4/grsecurity/grsec_sysctl.c
---- linux-3.1.4/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_sysctl.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_sysctl.c b/grsecurity/grsec_sysctl.c
+new file mode 100644
+index 0000000..174668f
+--- /dev/null
++++ b/grsecurity/grsec_sysctl.c
@@ -0,0 +1,433 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -56650,9 +59158,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_sysctl.c linux-3.1.4/grsecurity/grsec_sy
+ { }
+};
+#endif
-diff -urNp linux-3.1.4/grsecurity/grsec_time.c linux-3.1.4/grsecurity/grsec_time.c
---- linux-3.1.4/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_time.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_time.c b/grsecurity/grsec_time.c
+new file mode 100644
+index 0000000..0dc13c3
+--- /dev/null
++++ b/grsecurity/grsec_time.c
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -56670,9 +59180,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_time.c linux-3.1.4/grsecurity/grsec_time
+}
+
+EXPORT_SYMBOL(gr_log_timechange);
-diff -urNp linux-3.1.4/grsecurity/grsec_tpe.c linux-3.1.4/grsecurity/grsec_tpe.c
---- linux-3.1.4/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsec_tpe.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsec_tpe.c b/grsecurity/grsec_tpe.c
+new file mode 100644
+index 0000000..4a78774
+--- /dev/null
++++ b/grsecurity/grsec_tpe.c
@@ -0,0 +1,39 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
@@ -56713,9 +59225,11 @@ diff -urNp linux-3.1.4/grsecurity/grsec_tpe.c linux-3.1.4/grsecurity/grsec_tpe.c
+#endif
+ return 1;
+}
-diff -urNp linux-3.1.4/grsecurity/grsum.c linux-3.1.4/grsecurity/grsum.c
---- linux-3.1.4/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/grsum.c 2011-11-16 18:40:31.000000000 -0500
+diff --git a/grsecurity/grsum.c b/grsecurity/grsum.c
+new file mode 100644
+index 0000000..9f7b1ac
+--- /dev/null
++++ b/grsecurity/grsum.c
@@ -0,0 +1,61 @@
+#include <linux/err.h>
+#include <linux/kernel.h>
@@ -56778,1090 +59292,10 @@ diff -urNp linux-3.1.4/grsecurity/grsum.c linux-3.1.4/grsecurity/grsum.c
+
+ return retval;
+}
-diff -urNp linux-3.1.4/grsecurity/Kconfig linux-3.1.4/grsecurity/Kconfig
---- linux-3.1.4/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/Kconfig 2011-11-16 18:40:31.000000000 -0500
-@@ -0,0 +1,1037 @@
-+#
-+# grecurity configuration
-+#
-+
-+menu "Grsecurity"
-+
-+config GRKERNSEC
-+ bool "Grsecurity"
-+ select CRYPTO
-+ select CRYPTO_SHA256
-+ help
-+ If you say Y here, you will be able to configure many features
-+ that will enhance the security of your system. It is highly
-+ recommended that you say Y here and read through the help
-+ for each option so that you fully understand the features and
-+ can evaluate their usefulness for your machine.
-+
-+choice
-+ prompt "Security Level"
-+ depends on GRKERNSEC
-+ default GRKERNSEC_CUSTOM
-+
-+config GRKERNSEC_LOW
-+ bool "Low"
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_CHDIR
-+
-+ help
-+ If you choose this option, several of the grsecurity options will
-+ be enabled that will give you greater protection against a number
-+ of attacks, while assuring that none of your software will have any
-+ conflicts with the additional security measures. If you run a lot
-+ of unusual software, or you are having problems with the higher
-+ security levels, you should say Y here. With this option, the
-+ following features are enabled:
-+
-+ - Linking restrictions
-+ - FIFO restrictions
-+ - Restricted dmesg
-+ - Enforced chdir("/") on chroot
-+ - Runtime module disabling
-+
-+config GRKERNSEC_MEDIUM
-+ bool "Medium"
-+ select PAX
-+ select PAX_EI_PAX
-+ select PAX_PT_PAX_FLAGS
-+ select PAX_HAVE_ACL_FLAGS
-+ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_SYSCTL
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_FORKFAIL
-+ select GRKERNSEC_TIME
-+ select GRKERNSEC_SIGNAL
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_UNIX
-+ select GRKERNSEC_CHROOT_MOUNT
-+ select GRKERNSEC_CHROOT_PIVOT
-+ select GRKERNSEC_CHROOT_DOUBLE
-+ select GRKERNSEC_CHROOT_CHDIR
-+ select GRKERNSEC_CHROOT_MKNOD
-+ select GRKERNSEC_PROC
-+ select GRKERNSEC_PROC_USERGROUP
-+ select PAX_RANDUSTACK
-+ select PAX_ASLR
-+ select PAX_RANDMMAP
-+ select PAX_REFCOUNT if (X86 || SPARC64)
-+ select PAX_USERCOPY if ((X86 || SPARC || PPC || ARM) && (SLAB || SLUB || SLOB))
-+
-+ help
-+ If you say Y here, several features in addition to those included
-+ in the low additional security level will be enabled. These
-+ features provide even more security to your system, though in rare
-+ cases they may be incompatible with very old or poorly written
-+ software. If you enable this option, make sure that your auth
-+ service (identd) is running as gid 1001. With this option,
-+ the following features (in addition to those provided in the
-+ low additional security level) will be enabled:
-+
-+ - Failed fork logging
-+ - Time change logging
-+ - Signal logging
-+ - Deny mounts in chroot
-+ - Deny double chrooting
-+ - Deny sysctl writes in chroot
-+ - Deny mknod in chroot
-+ - Deny access to abstract AF_UNIX sockets out of chroot
-+ - Deny pivot_root in chroot
-+ - Denied reads/writes of /dev/kmem, /dev/mem, and /dev/port
-+ - /proc restrictions with special GID set to 10 (usually wheel)
-+ - Address Space Layout Randomization (ASLR)
-+ - Prevent exploitation of most refcount overflows
-+ - Bounds checking of copying between the kernel and userland
-+
-+config GRKERNSEC_HIGH
-+ bool "High"
-+ select GRKERNSEC_LINK
-+ select GRKERNSEC_FIFO
-+ select GRKERNSEC_DMESG
-+ select GRKERNSEC_FORKFAIL
-+ select GRKERNSEC_TIME
-+ select GRKERNSEC_SIGNAL
-+ select GRKERNSEC_CHROOT
-+ select GRKERNSEC_CHROOT_SHMAT
-+ select GRKERNSEC_CHROOT_UNIX
-+ select GRKERNSEC_CHROOT_MOUNT
-+ select GRKERNSEC_CHROOT_FCHDIR
-+ select GRKERNSEC_CHROOT_PIVOT
-+ select GRKERNSEC_CHROOT_DOUBLE
-+ select GRKERNSEC_CHROOT_CHDIR
-+ select GRKERNSEC_CHROOT_MKNOD
-+ select GRKERNSEC_CHROOT_CAPS
-+ select GRKERNSEC_CHROOT_SYSCTL
-+ select GRKERNSEC_CHROOT_FINDTASK
-+ select GRKERNSEC_SYSFS_RESTRICT
-+ select GRKERNSEC_PROC
-+ select GRKERNSEC_PROC_MEMMAP if (PAX_NOEXEC || PAX_ASLR)
-+ select GRKERNSEC_HIDESYM
-+ select GRKERNSEC_BRUTE
-+ select GRKERNSEC_PROC_USERGROUP
-+ select GRKERNSEC_KMEM
-+ select GRKERNSEC_RESLOG
-+ select GRKERNSEC_RANDNET
-+ select GRKERNSEC_PROC_ADD
-+ select GRKERNSEC_CHROOT_CHMOD
-+ select GRKERNSEC_CHROOT_NICE
-+ select GRKERNSEC_AUDIT_MOUNT
-+ select GRKERNSEC_MODHARDEN if (MODULES)
-+ select GRKERNSEC_HARDEN_PTRACE
-+ select GRKERNSEC_VM86 if (X86_32)
-+ select GRKERNSEC_KERN_LOCKOUT if (X86 || ARM || PPC || SPARC)
-+ select PAX
-+ select PAX_RANDUSTACK
-+ select PAX_ASLR
-+ select PAX_RANDMMAP
-+ select PAX_NOEXEC
-+ select PAX_MPROTECT
-+ select PAX_EI_PAX
-+ select PAX_PT_PAX_FLAGS
-+ select PAX_HAVE_ACL_FLAGS
-+ select PAX_KERNEXEC if ((PPC || X86) && (!X86_32 || X86_WP_WORKS_OK) && !XEN)
-+ select PAX_MEMORY_UDEREF if (X86 && !XEN)
-+ select PAX_RANDKSTACK if (X86_TSC && X86)
-+ select PAX_SEGMEXEC if (X86_32)
-+ select PAX_PAGEEXEC
-+ select PAX_EMUPLT if (ALPHA || PARISC || SPARC)
-+ select PAX_EMUTRAMP if (PARISC)
-+ select PAX_EMUSIGRT if (PARISC)
-+ select PAX_ETEXECRELOCS if (ALPHA || IA64 || PARISC)
-+ select PAX_ELFRELOCS if (PAX_ETEXECRELOCS || (IA64 || PPC || X86))
-+ select PAX_REFCOUNT if (X86 || SPARC64)
-+ select PAX_USERCOPY if ((X86 || PPC || SPARC || ARM) && (SLAB || SLUB || SLOB))
-+ help
-+ If you say Y here, many of the features of grsecurity will be
-+ enabled, which will protect you against many kinds of attacks
-+ against your system. The heightened security comes at a cost
-+ of an increased chance of incompatibilities with rare software
-+ on your machine. Since this security level enables PaX, you should
-+ view <http://pax.grsecurity.net> and read about the PaX
-+ project. While you are there, download chpax and run it on
-+ binaries that cause problems with PaX. Also remember that
-+ since the /proc restrictions are enabled, you must run your
-+ identd as gid 1001. This security level enables the following
-+ features in addition to those listed in the low and medium
-+ security levels:
-+
-+ - Additional /proc restrictions
-+ - Chmod restrictions in chroot
-+ - No signals, ptrace, or viewing of processes outside of chroot
-+ - Capability restrictions in chroot
-+ - Deny fchdir out of chroot
-+ - Priority restrictions in chroot
-+ - Segmentation-based implementation of PaX
-+ - Mprotect restrictions
-+ - Removal of addresses from /proc/<pid>/[smaps|maps|stat]
-+ - Kernel stack randomization
-+ - Mount/unmount/remount logging
-+ - Kernel symbol hiding
-+ - Hardening of module auto-loading
-+ - Ptrace restrictions
-+ - Restricted vm86 mode
-+ - Restricted sysfs/debugfs
-+ - Active kernel exploit response
-+
-+config GRKERNSEC_CUSTOM
-+ bool "Custom"
-+ help
-+ If you say Y here, you will be able to configure every grsecurity
-+ option, which allows you to enable many more features that aren't
-+ covered in the basic security levels. These additional features
-+ include TPE, socket restrictions, and the sysctl system for
-+ grsecurity. It is advised that you read through the help for
-+ each option to determine its usefulness in your situation.
-+
-+endchoice
-+
-+menu "Address Space Protection"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_KMEM
-+ bool "Deny reading/writing to /dev/kmem, /dev/mem, and /dev/port"
-+ select STRICT_DEVMEM if (X86 || ARM || TILE || S390)
-+ help
-+ If you say Y here, /dev/kmem and /dev/mem won't be allowed to
-+ be written to or read from to modify or leak the contents of the running
-+ kernel. /dev/port will also not be allowed to be opened. If you have module
-+ support disabled, enabling this will close up four ways that are
-+ currently used to insert malicious code into the running kernel.
-+ Even with all these features enabled, we still highly recommend that
-+ you use the RBAC system, as it is still possible for an attacker to
-+ modify the running kernel through privileged I/O granted by ioperm/iopl.
-+ If you are not using XFree86, you may be able to stop this additional
-+ case by enabling the 'Disable privileged I/O' option. Though nothing
-+ legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
-+ but only to video memory, which is the only writing we allow in this
-+ case. If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
-+ not be allowed to mprotect it with PROT_WRITE later.
-+ It is highly recommended that you say Y here if you meet all the
-+ conditions above.
-+
-+config GRKERNSEC_VM86
-+ bool "Restrict VM86 mode"
-+ depends on X86_32
-+
-+ help
-+ If you say Y here, only processes with CAP_SYS_RAWIO will be able to
-+ make use of a special execution mode on 32bit x86 processors called
-+ Virtual 8086 (VM86) mode. XFree86 may need vm86 mode for certain
-+ video cards and will still work with this option enabled. The purpose
-+ of the option is to prevent exploitation of emulation errors in
-+ virtualization of vm86 mode like the one discovered in VMWare in 2009.
-+ Nearly all users should be able to enable this option.
-+
-+config GRKERNSEC_IO
-+ bool "Disable privileged I/O"
-+ depends on X86
-+ select RTC_CLASS
-+ select RTC_INTF_DEV
-+ select RTC_DRV_CMOS
-+
-+ help
-+ If you say Y here, all ioperm and iopl calls will return an error.
-+ Ioperm and iopl can be used to modify the running kernel.
-+ Unfortunately, some programs need this access to operate properly,
-+ the most notable of which are XFree86 and hwclock. hwclock can be
-+ remedied by having RTC support in the kernel, so real-time
-+ clock support is enabled if this option is enabled, to ensure
-+ that hwclock operates correctly. XFree86 still will not
-+ operate correctly with this option enabled, so DO NOT CHOOSE Y
-+ IF YOU USE XFree86. If you use XFree86 and you still want to
-+ protect your kernel against modification, use the RBAC system.
-+
-+config GRKERNSEC_PROC_MEMMAP
-+ bool "Remove addresses from /proc/<pid>/[smaps|maps|stat]"
-+ default y if (PAX_NOEXEC || PAX_ASLR)
-+ depends on PAX_NOEXEC || PAX_ASLR
-+ help
-+ If you say Y here, the /proc/<pid>/maps and /proc/<pid>/stat files will
-+ give no information about the addresses of its mappings if
-+ PaX features that rely on random addresses are enabled on the task.
-+ If you use PaX it is greatly recommended that you say Y here as it
-+ closes up a hole that makes the full ASLR useless for suid
-+ binaries.
-+
-+config GRKERNSEC_BRUTE
-+ bool "Deter exploit bruteforcing"
-+ help
-+ If you say Y here, attempts to bruteforce exploits against forking
-+ daemons such as apache or sshd, as well as against suid/sgid binaries
-+ will be deterred. When a child of a forking daemon is killed by PaX
-+ or crashes due to an illegal instruction or other suspicious signal,
-+ the parent process will be delayed 30 seconds upon every subsequent
-+ fork until the administrator is able to assess the situation and
-+ restart the daemon.
-+ In the suid/sgid case, the attempt is logged, the user has all their
-+ processes terminated, and they are prevented from executing any further
-+ processes for 15 minutes.
-+ It is recommended that you also enable signal logging in the auditing
-+ section so that logs are generated when a process triggers a suspicious
-+ signal.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "deter_bruteforce" is created.
-+
-+
-+config GRKERNSEC_MODHARDEN
-+ bool "Harden module auto-loading"
-+ depends on MODULES
-+ help
-+ If you say Y here, module auto-loading in response to use of some
-+ feature implemented by an unloaded module will be restricted to
-+ root users. Enabling this option helps defend against attacks
-+ by unprivileged users who abuse the auto-loading behavior to
-+ cause a vulnerable module to load that is then exploited.
-+
-+ If this option prevents a legitimate use of auto-loading for a
-+ non-root user, the administrator can execute modprobe manually
-+ with the exact name of the module mentioned in the alert log.
-+ Alternatively, the administrator can add the module to the list
-+ of modules loaded at boot by modifying init scripts.
-+
-+ Modification of init scripts will most likely be needed on
-+ Ubuntu servers with encrypted home directory support enabled,
-+ as the first non-root user logging in will cause the ecb(aes),
-+ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded.
-+
-+config GRKERNSEC_HIDESYM
-+ bool "Hide kernel symbols"
-+ help
-+ If you say Y here, getting information on loaded modules, and
-+ displaying all kernel symbols through a syscall will be restricted
-+ to users with CAP_SYS_MODULE. For software compatibility reasons,
-+ /proc/kallsyms will be restricted to the root user. The RBAC
-+ system can hide that entry even from root.
-+
-+ This option also prevents leaking of kernel addresses through
-+ several /proc entries.
-+
-+ Note that this option is only effective provided the following
-+ conditions are met:
-+ 1) The kernel using grsecurity is not precompiled by some distribution
-+ 2) You have also enabled GRKERNSEC_DMESG
-+ 3) You are using the RBAC system and hiding other files such as your
-+ kernel image and System.map. Alternatively, enabling this option
-+ causes the permissions on /boot, /lib/modules, and the kernel
-+ source directory to change at compile time to prevent
-+ reading by non-root users.
-+ If the above conditions are met, this option will aid in providing a
-+ useful protection against local kernel exploitation of overflows
-+ and arbitrary read/write vulnerabilities.
-+
-+config GRKERNSEC_KERN_LOCKOUT
-+ bool "Active kernel exploit response"
-+ depends on X86 || ARM || PPC || SPARC
-+ help
-+ If you say Y here, when a PaX alert is triggered due to suspicious
-+ activity in the kernel (from KERNEXEC/UDEREF/USERCOPY)
-+ or an OOPs occurs due to bad memory accesses, instead of just
-+ terminating the offending process (and potentially allowing
-+ a subsequent exploit from the same user), we will take one of two
-+ actions:
-+ If the user was root, we will panic the system
-+ If the user was non-root, we will log the attempt, terminate
-+ all processes owned by the user, then prevent them from creating
-+ any new processes until the system is restarted
-+ This deters repeated kernel exploitation/bruteforcing attempts
-+ and is useful for later forensics.
-+
-+endmenu
-+menu "Role Based Access Control Options"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_RBAC_DEBUG
-+ bool
-+
-+config GRKERNSEC_NO_RBAC
-+ bool "Disable RBAC system"
-+ help
-+ If you say Y here, the /dev/grsec device will be removed from the kernel,
-+ preventing the RBAC system from being enabled. You should only say Y
-+ here if you have no intention of using the RBAC system, so as to prevent
-+ an attacker with root access from misusing the RBAC system to hide files
-+ and processes when loadable module support and /dev/[k]mem have been
-+ locked down.
-+
-+config GRKERNSEC_ACL_HIDEKERN
-+ bool "Hide kernel processes"
-+ help
-+ If you say Y here, all kernel threads will be hidden to all
-+ processes but those whose subject has the "view hidden processes"
-+ flag.
-+
-+config GRKERNSEC_ACL_MAXTRIES
-+ int "Maximum tries before password lockout"
-+ default 3
-+ help
-+ This option enforces the maximum number of times a user can attempt
-+ to authorize themselves with the grsecurity RBAC system before being
-+ denied the ability to attempt authorization again for a specified time.
-+ The lower the number, the harder it will be to brute-force a password.
-+
-+config GRKERNSEC_ACL_TIMEOUT
-+ int "Time to wait after max password tries, in seconds"
-+ default 30
-+ help
-+ This option specifies the time the user must wait after attempting to
-+ authorize to the RBAC system with the maximum number of invalid
-+ passwords. The higher the number, the harder it will be to brute-force
-+ a password.
-+
-+endmenu
-+menu "Filesystem Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_PROC
-+ bool "Proc restrictions"
-+ help
-+ If you say Y here, the permissions of the /proc filesystem
-+ will be altered to enhance system security and privacy. You MUST
-+ choose either a user only restriction or a user and group restriction.
-+ Depending upon the option you choose, you can either restrict users to
-+ see only the processes they themselves run, or choose a group that can
-+ view all processes and files normally restricted to root if you choose
-+ the "restrict to user only" option. NOTE: If you're running identd as
-+ a non-root user, you will have to run it as the group you specify here.
-+
-+config GRKERNSEC_PROC_USER
-+ bool "Restrict /proc to user only"
-+ depends on GRKERNSEC_PROC
-+ help
-+ If you say Y here, non-root users will only be able to view their own
-+ processes, and restricts them from viewing network-related information,
-+ and viewing kernel symbol and module information.
-+
-+config GRKERNSEC_PROC_USERGROUP
-+ bool "Allow special group"
-+ depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
-+ help
-+ If you say Y here, you will be able to select a group that will be
-+ able to view all processes and network-related information. If you've
-+ enabled GRKERNSEC_HIDESYM, kernel and symbol information may still
-+ remain hidden. This option is useful if you want to run identd as
-+ a non-root user.
-+
-+config GRKERNSEC_PROC_GID
-+ int "GID for special group"
-+ depends on GRKERNSEC_PROC_USERGROUP
-+ default 1001
-+
-+config GRKERNSEC_PROC_ADD
-+ bool "Additional restrictions"
-+ depends on GRKERNSEC_PROC_USER || GRKERNSEC_PROC_USERGROUP
-+ help
-+ If you say Y here, additional restrictions will be placed on
-+ /proc that keep normal users from viewing device information and
-+ slabinfo information that could be useful for exploits.
-+
-+config GRKERNSEC_LINK
-+ bool "Linking restrictions"
-+ help
-+ If you say Y here, /tmp race exploits will be prevented, since users
-+ will no longer be able to follow symlinks owned by other users in
-+ world-writable +t directories (e.g. /tmp), unless the owner of the
-+ symlink is the owner of the directory. users will also not be
-+ able to hardlink to files they do not own. If the sysctl option is
-+ enabled, a sysctl option with name "linking_restrictions" is created.
-+
-+config GRKERNSEC_FIFO
-+ bool "FIFO restrictions"
-+ help
-+ If you say Y here, users will not be able to write to FIFOs they don't
-+ own in world-writable +t directories (e.g. /tmp), unless the owner of
-+ the FIFO is the same owner of the directory it's held in. If the sysctl
-+ option is enabled, a sysctl option with name "fifo_restrictions" is
-+ created.
-+
-+config GRKERNSEC_SYSFS_RESTRICT
-+ bool "Sysfs/debugfs restriction"
-+ depends on SYSFS
-+ help
-+ If you say Y here, sysfs (the pseudo-filesystem mounted at /sys) and
-+ any filesystem normally mounted under it (e.g. debugfs) will only
-+ be accessible by root. These filesystems generally provide access
-+ to hardware and debug information that isn't appropriate for unprivileged
-+ users of the system. Sysfs and debugfs have also become a large source
-+ of new vulnerabilities, ranging from infoleaks to local compromise.
-+ There has been very little oversight with an eye toward security involved
-+ in adding new exporters of information to these filesystems, so their
-+ use is discouraged.
-+ This option is equivalent to a chmod 0700 of the mount paths.
-+
-+config GRKERNSEC_ROFS
-+ bool "Runtime read-only mount protection"
-+ help
-+ If you say Y here, a sysctl option with name "romount_protect" will
-+ be created. By setting this option to 1 at runtime, filesystems
-+ will be protected in the following ways:
-+ * No new writable mounts will be allowed
-+ * Existing read-only mounts won't be able to be remounted read/write
-+ * Write operations will be denied on all block devices
-+ This option acts independently of grsec_lock: once it is set to 1,
-+ it cannot be turned off. Therefore, please be mindful of the resulting
-+ behavior if this option is enabled in an init script on a read-only
-+ filesystem. This feature is mainly intended for secure embedded systems.
-+
-+config GRKERNSEC_CHROOT
-+ bool "Chroot jail restrictions"
-+ help
-+ If you say Y here, you will be able to choose several options that will
-+ make breaking out of a chrooted jail much more difficult. If you
-+ encounter no software incompatibilities with the following options, it
-+ is recommended that you enable each one.
-+
-+config GRKERNSEC_CHROOT_MOUNT
-+ bool "Deny mounts"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ mount or remount filesystems. If the sysctl option is enabled, a
-+ sysctl option with name "chroot_deny_mount" is created.
-+
-+config GRKERNSEC_CHROOT_DOUBLE
-+ bool "Deny double-chroots"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to chroot
-+ again outside the chroot. This is a widely used method of breaking
-+ out of a chroot jail and should not be allowed. If the sysctl
-+ option is enabled, a sysctl option with name
-+ "chroot_deny_chroot" is created.
-+
-+config GRKERNSEC_CHROOT_PIVOT
-+ bool "Deny pivot_root in chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to use
-+ a function called pivot_root() that was introduced in Linux 2.3.41. It
-+ works similar to chroot in that it changes the root filesystem. This
-+ function could be misused in a chrooted process to attempt to break out
-+ of the chroot, and therefore should not be allowed. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_deny_pivot" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_CHDIR
-+ bool "Enforce chdir(\"/\") on all chroots"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, the current working directory of all newly-chrooted
-+ applications will be set to the the root directory of the chroot.
-+ The man page on chroot(2) states:
-+ Note that this call does not change the current working
-+ directory, so that `.' can be outside the tree rooted at
-+ `/'. In particular, the super-user can escape from a
-+ `chroot jail' by doing `mkdir foo; chroot foo; cd ..'.
-+
-+ It is recommended that you say Y here, since it's not known to break
-+ any software. If the sysctl option is enabled, a sysctl option with
-+ name "chroot_enforce_chdir" is created.
-+
-+config GRKERNSEC_CHROOT_CHMOD
-+ bool "Deny (f)chmod +s"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to chmod
-+ or fchmod files to make them have suid or sgid bits. This protects
-+ against another published method of breaking a chroot. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_deny_chmod" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_FCHDIR
-+ bool "Deny fchdir out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, a well-known method of breaking chroots by fchdir'ing
-+ to a file descriptor of the chrooting process that points to a directory
-+ outside the filesystem will be stopped. If the sysctl option
-+ is enabled, a sysctl option with name "chroot_deny_fchdir" is created.
-+
-+config GRKERNSEC_CHROOT_MKNOD
-+ bool "Deny mknod"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be allowed to
-+ mknod. The problem with using mknod inside a chroot is that it
-+ would allow an attacker to create a device entry that is the same
-+ as one on the physical root of your system, which could range from
-+ anything from the console device to a device for your harddrive (which
-+ they could then use to wipe the drive or steal data). It is recommended
-+ that you say Y here, unless you run into software incompatibilities.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "chroot_deny_mknod" is created.
-+
-+config GRKERNSEC_CHROOT_SHMAT
-+ bool "Deny shmat() out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to attach
-+ to shared memory segments that were created outside of the chroot jail.
-+ It is recommended that you say Y here. If the sysctl option is enabled,
-+ a sysctl option with name "chroot_deny_shmat" is created.
-+
-+config GRKERNSEC_CHROOT_UNIX
-+ bool "Deny access to abstract AF_UNIX sockets out of chroot"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ connect to abstract (meaning not belonging to a filesystem) Unix
-+ domain sockets that were bound outside of a chroot. It is recommended
-+ that you say Y here. If the sysctl option is enabled, a sysctl option
-+ with name "chroot_deny_unix" is created.
-+
-+config GRKERNSEC_CHROOT_FINDTASK
-+ bool "Protect outside processes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to
-+ kill, send signals with fcntl, ptrace, capget, getpgid, setpgid,
-+ getsid, or view any process outside of the chroot. If the sysctl
-+ option is enabled, a sysctl option with name "chroot_findtask" is
-+ created.
-+
-+config GRKERNSEC_CHROOT_NICE
-+ bool "Restrict priority changes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, processes inside a chroot will not be able to raise
-+ the priority of processes in the chroot, or alter the priority of
-+ processes outside the chroot. This provides more security than simply
-+ removing CAP_SYS_NICE from the process' capability set. If the
-+ sysctl option is enabled, a sysctl option with name "chroot_restrict_nice"
-+ is created.
-+
-+config GRKERNSEC_CHROOT_SYSCTL
-+ bool "Deny sysctl writes"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, an attacker in a chroot will not be able to
-+ write to sysctl entries, either by sysctl(2) or through a /proc
-+ interface. It is strongly recommended that you say Y here. If the
-+ sysctl option is enabled, a sysctl option with name
-+ "chroot_deny_sysctl" is created.
-+
-+config GRKERNSEC_CHROOT_CAPS
-+ bool "Capability restrictions"
-+ depends on GRKERNSEC_CHROOT
-+ help
-+ If you say Y here, the capabilities on all processes within a
-+ chroot jail will be lowered to stop module insertion, raw i/o,
-+ system and net admin tasks, rebooting the system, modifying immutable
-+ files, modifying IPC owned by another, and changing the system time.
-+ This is left an option because it can break some apps. Disable this
-+ if your chrooted apps are having problems performing those kinds of
-+ tasks. If the sysctl option is enabled, a sysctl option with
-+ name "chroot_caps" is created.
-+
-+endmenu
-+menu "Kernel Auditing"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_AUDIT_GROUP
-+ bool "Single group for auditing"
-+ help
-+ If you say Y here, the exec, chdir, and (un)mount logging features
-+ will only operate on a group you specify. This option is recommended
-+ if you only want to watch certain users instead of having a large
-+ amount of logs from the entire system. If the sysctl option is enabled,
-+ a sysctl option with name "audit_group" is created.
-+
-+config GRKERNSEC_AUDIT_GID
-+ int "GID for auditing"
-+ depends on GRKERNSEC_AUDIT_GROUP
-+ default 1007
-+
-+config GRKERNSEC_EXECLOG
-+ bool "Exec logging"
-+ help
-+ If you say Y here, all execve() calls will be logged (since the
-+ other exec*() calls are frontends to execve(), all execution
-+ will be logged). Useful for shell-servers that like to keep track
-+ of their users. If the sysctl option is enabled, a sysctl option with
-+ name "exec_logging" is created.
-+ WARNING: This option when enabled will produce a LOT of logs, especially
-+ on an active system.
-+
-+config GRKERNSEC_RESLOG
-+ bool "Resource logging"
-+ help
-+ If you say Y here, all attempts to overstep resource limits will
-+ be logged with the resource name, the requested size, and the current
-+ limit. It is highly recommended that you say Y here. If the sysctl
-+ option is enabled, a sysctl option with name "resource_logging" is
-+ created. If the RBAC system is enabled, the sysctl value is ignored.
-+
-+config GRKERNSEC_CHROOT_EXECLOG
-+ bool "Log execs within chroot"
-+ help
-+ If you say Y here, all executions inside a chroot jail will be logged
-+ to syslog. This can cause a large amount of logs if certain
-+ applications (eg. djb's daemontools) are installed on the system, and
-+ is therefore left as an option. If the sysctl option is enabled, a
-+ sysctl option with name "chroot_execlog" is created.
-+
-+config GRKERNSEC_AUDIT_PTRACE
-+ bool "Ptrace logging"
-+ help
-+ If you say Y here, all attempts to attach to a process via ptrace
-+ will be logged. If the sysctl option is enabled, a sysctl option
-+ with name "audit_ptrace" is created.
-+
-+config GRKERNSEC_AUDIT_CHDIR
-+ bool "Chdir logging"
-+ help
-+ If you say Y here, all chdir() calls will be logged. If the sysctl
-+ option is enabled, a sysctl option with name "audit_chdir" is created.
-+
-+config GRKERNSEC_AUDIT_MOUNT
-+ bool "(Un)Mount logging"
-+ help
-+ If you say Y here, all mounts and unmounts will be logged. If the
-+ sysctl option is enabled, a sysctl option with name "audit_mount" is
-+ created.
-+
-+config GRKERNSEC_SIGNAL
-+ bool "Signal logging"
-+ help
-+ If you say Y here, certain important signals will be logged, such as
-+ SIGSEGV, which will as a result inform you of when a error in a program
-+ occurred, which in some cases could mean a possible exploit attempt.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "signal_logging" is created.
-+
-+config GRKERNSEC_FORKFAIL
-+ bool "Fork failure logging"
-+ help
-+ If you say Y here, all failed fork() attempts will be logged.
-+ This could suggest a fork bomb, or someone attempting to overstep
-+ their process limit. If the sysctl option is enabled, a sysctl option
-+ with name "forkfail_logging" is created.
-+
-+config GRKERNSEC_TIME
-+ bool "Time change logging"
-+ help
-+ If you say Y here, any changes of the system clock will be logged.
-+ If the sysctl option is enabled, a sysctl option with name
-+ "timechange_logging" is created.
-+
-+config GRKERNSEC_PROC_IPADDR
-+ bool "/proc/<pid>/ipaddr support"
-+ help
-+ If you say Y here, a new entry will be added to each /proc/<pid>
-+ directory that contains the IP address of the person using the task.
-+ The IP is carried across local TCP and AF_UNIX stream sockets.
-+ This information can be useful for IDS/IPSes to perform remote response
-+ to a local attack. The entry is readable by only the owner of the
-+ process (and root if he has CAP_DAC_OVERRIDE, which can be removed via
-+ the RBAC system), and thus does not create privacy concerns.
-+
-+config GRKERNSEC_RWXMAP_LOG
-+ bool 'Denied RWX mmap/mprotect logging'
-+ depends on PAX_MPROTECT && !PAX_EMUPLT && !PAX_EMUSIGRT
-+ help
-+ If you say Y here, calls to mmap() and mprotect() with explicit
-+ usage of PROT_WRITE and PROT_EXEC together will be logged when
-+ denied by the PAX_MPROTECT feature. If the sysctl option is
-+ enabled, a sysctl option with name "rwxmap_logging" is created.
-+
-+config GRKERNSEC_AUDIT_TEXTREL
-+ bool 'ELF text relocations logging (READ HELP)'
-+ depends on PAX_MPROTECT
-+ help
-+ If you say Y here, text relocations will be logged with the filename
-+ of the offending library or binary. The purpose of the feature is
-+ to help Linux distribution developers get rid of libraries and
-+ binaries that need text relocations which hinder the future progress
-+ of PaX. Only Linux distribution developers should say Y here, and
-+ never on a production machine, as this option creates an information
-+ leak that could aid an attacker in defeating the randomization of
-+ a single memory region. If the sysctl option is enabled, a sysctl
-+ option with name "audit_textrel" is created.
-+
-+endmenu
-+
-+menu "Executable Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_DMESG
-+ bool "Dmesg(8) restriction"
-+ help
-+ If you say Y here, non-root users will not be able to use dmesg(8)
-+ to view up to the last 4kb of messages in the kernel's log buffer.
-+ The kernel's log buffer often contains kernel addresses and other
-+ identifying information useful to an attacker in fingerprinting a
-+ system for a targeted exploit.
-+ If the sysctl option is enabled, a sysctl option with name "dmesg" is
-+ created.
-+
-+config GRKERNSEC_HARDEN_PTRACE
-+ bool "Deter ptrace-based process snooping"
-+ help
-+ If you say Y here, TTY sniffers and other malicious monitoring
-+ programs implemented through ptrace will be defeated. If you
-+ have been using the RBAC system, this option has already been
-+ enabled for several years for all users, with the ability to make
-+ fine-grained exceptions.
-+
-+ This option only affects the ability of non-root users to ptrace
-+ processes that are not a descendent of the ptracing process.
-+ This means that strace ./binary and gdb ./binary will still work,
-+ but attaching to arbitrary processes will not. If the sysctl
-+ option is enabled, a sysctl option with name "harden_ptrace" is
-+ created.
-+
-+config GRKERNSEC_TPE
-+ bool "Trusted Path Execution (TPE)"
-+ help
-+ If you say Y here, you will be able to choose a gid to add to the
-+ supplementary groups of users you want to mark as "untrusted."
-+ These users will not be able to execute any files that are not in
-+ root-owned directories writable only by root. If the sysctl option
-+ is enabled, a sysctl option with name "tpe" is created.
-+
-+config GRKERNSEC_TPE_ALL
-+ bool "Partially restrict all non-root users"
-+ depends on GRKERNSEC_TPE
-+ help
-+ If you say Y here, all non-root users will be covered under
-+ a weaker TPE restriction. This is separate from, and in addition to,
-+ the main TPE options that you have selected elsewhere. Thus, if a
-+ "trusted" GID is chosen, this restriction applies to even that GID.
-+ Under this restriction, all non-root users will only be allowed to
-+ execute files in directories they own that are not group or
-+ world-writable, or in directories owned by root and writable only by
-+ root. If the sysctl option is enabled, a sysctl option with name
-+ "tpe_restrict_all" is created.
-+
-+config GRKERNSEC_TPE_INVERT
-+ bool "Invert GID option"
-+ depends on GRKERNSEC_TPE
-+ help
-+ If you say Y here, the group you specify in the TPE configuration will
-+ decide what group TPE restrictions will be *disabled* for. This
-+ option is useful if you want TPE restrictions to be applied to most
-+ users on the system. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_invert" is created. Unlike other sysctl options, this
-+ entry will default to on for backward-compatibility.
-+
-+config GRKERNSEC_TPE_GID
-+ int "GID for untrusted users"
-+ depends on GRKERNSEC_TPE && !GRKERNSEC_TPE_INVERT
-+ default 1005
-+ help
-+ Setting this GID determines what group TPE restrictions will be
-+ *enabled* for. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_gid" is created.
-+
-+config GRKERNSEC_TPE_GID
-+ int "GID for trusted users"
-+ depends on GRKERNSEC_TPE && GRKERNSEC_TPE_INVERT
-+ default 1005
-+ help
-+ Setting this GID determines what group TPE restrictions will be
-+ *disabled* for. If the sysctl option is enabled, a sysctl option
-+ with name "tpe_gid" is created.
-+
-+endmenu
-+menu "Network Protections"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_RANDNET
-+ bool "Larger entropy pools"
-+ help
-+ If you say Y here, the entropy pools used for many features of Linux
-+ and grsecurity will be doubled in size. Since several grsecurity
-+ features use additional randomness, it is recommended that you say Y
-+ here. Saying Y here has a similar effect as modifying
-+ /proc/sys/kernel/random/poolsize.
-+
-+config GRKERNSEC_BLACKHOLE
-+ bool "TCP/UDP blackhole and LAST_ACK DoS prevention"
-+ depends on NET
-+ help
-+ If you say Y here, neither TCP resets nor ICMP
-+ destination-unreachable packets will be sent in response to packets
-+ sent to ports for which no associated listening process exists.
-+ This feature supports both IPV4 and IPV6 and exempts the
-+ loopback interface from blackholing. Enabling this feature
-+ makes a host more resilient to DoS attacks and reduces network
-+ visibility against scanners.
-+
-+ The blackhole feature as-implemented is equivalent to the FreeBSD
-+ blackhole feature, as it prevents RST responses to all packets, not
-+ just SYNs. Under most application behavior this causes no
-+ problems, but applications (like haproxy) may not close certain
-+ connections in a way that cleanly terminates them on the remote
-+ end, leaving the remote host in LAST_ACK state. Because of this
-+ side-effect and to prevent intentional LAST_ACK DoSes, this
-+ feature also adds automatic mitigation against such attacks.
-+ The mitigation drastically reduces the amount of time a socket
-+ can spend in LAST_ACK state. If you're using haproxy and not
-+ all servers it connects to have this option enabled, consider
-+ disabling this feature on the haproxy host.
-+
-+ If the sysctl option is enabled, two sysctl options with names
-+ "ip_blackhole" and "lastack_retries" will be created.
-+ While "ip_blackhole" takes the standard zero/non-zero on/off
-+ toggle, "lastack_retries" uses the same kinds of values as
-+ "tcp_retries1" and "tcp_retries2". The default value of 4
-+ prevents a socket from lasting more than 45 seconds in LAST_ACK
-+ state.
-+
-+config GRKERNSEC_SOCKET
-+ bool "Socket restrictions"
-+ depends on NET
-+ help
-+ If you say Y here, you will be able to choose from several options.
-+ If you assign a GID on your system and add it to the supplementary
-+ groups of users you want to restrict socket access to, this patch
-+ will perform up to three things, based on the option(s) you choose.
-+
-+config GRKERNSEC_SOCKET_ALL
-+ bool "Deny any sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to connect to other hosts from your machine or run server
-+ applications from your machine. If the sysctl option is enabled, a
-+ sysctl option with name "socket_all" is created.
-+
-+config GRKERNSEC_SOCKET_ALL_GID
-+ int "GID to deny all sockets for"
-+ depends on GRKERNSEC_SOCKET_ALL
-+ default 1004
-+ help
-+ Here you can choose the GID to disable socket access for. Remember to
-+ add the users you want socket access disabled for to the GID
-+ specified here. If the sysctl option is enabled, a sysctl option
-+ with name "socket_all_gid" is created.
-+
-+config GRKERNSEC_SOCKET_CLIENT
-+ bool "Deny client sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to connect to other hosts from your machine, but will be
-+ able to run servers. If this option is enabled, all users in the group
-+ you specify will have to use passive mode when initiating ftp transfers
-+ from the shell on your machine. If the sysctl option is enabled, a
-+ sysctl option with name "socket_client" is created.
-+
-+config GRKERNSEC_SOCKET_CLIENT_GID
-+ int "GID to deny client sockets for"
-+ depends on GRKERNSEC_SOCKET_CLIENT
-+ default 1003
-+ help
-+ Here you can choose the GID to disable client socket access for.
-+ Remember to add the users you want client socket access disabled for to
-+ the GID specified here. If the sysctl option is enabled, a sysctl
-+ option with name "socket_client_gid" is created.
-+
-+config GRKERNSEC_SOCKET_SERVER
-+ bool "Deny server sockets to group"
-+ depends on GRKERNSEC_SOCKET
-+ help
-+ If you say Y here, you will be able to choose a GID of whose users will
-+ be unable to run server applications from your machine. If the sysctl
-+ option is enabled, a sysctl option with name "socket_server" is created.
-+
-+config GRKERNSEC_SOCKET_SERVER_GID
-+ int "GID to deny server sockets for"
-+ depends on GRKERNSEC_SOCKET_SERVER
-+ default 1002
-+ help
-+ Here you can choose the GID to disable server socket access for.
-+ Remember to add the users you want server socket access disabled for to
-+ the GID specified here. If the sysctl option is enabled, a sysctl
-+ option with name "socket_server_gid" is created.
-+
-+endmenu
-+menu "Sysctl support"
-+depends on GRKERNSEC && SYSCTL
-+
-+config GRKERNSEC_SYSCTL
-+ bool "Sysctl support"
-+ help
-+ If you say Y here, you will be able to change the options that
-+ grsecurity runs with at bootup, without having to recompile your
-+ kernel. You can echo values to files in /proc/sys/kernel/grsecurity
-+ to enable (1) or disable (0) various features. All the sysctl entries
-+ are mutable until the "grsec_lock" entry is set to a non-zero value.
-+ All features enabled in the kernel configuration are disabled at boot
-+ if you do not say Y to the "Turn on features by default" option.
-+ All options should be set at startup, and the grsec_lock entry should
-+ be set to a non-zero value after all the options are set.
-+ *THIS IS EXTREMELY IMPORTANT*
-+
-+config GRKERNSEC_SYSCTL_DISTRO
-+ bool "Extra sysctl support for distro makers (READ HELP)"
-+ depends on GRKERNSEC_SYSCTL && GRKERNSEC_IO
-+ help
-+ If you say Y here, additional sysctl options will be created
-+ for features that affect processes running as root. Therefore,
-+ it is critical when using this option that the grsec_lock entry be
-+ enabled after boot. Only distros with prebuilt kernel packages
-+ with this option enabled that can ensure grsec_lock is enabled
-+ after boot should use this option.
-+ *Failure to set grsec_lock after boot makes all grsec features
-+ this option covers useless*
-+
-+ Currently this option creates the following sysctl entries:
-+ "Disable Privileged I/O": "disable_priv_io"
-+
-+config GRKERNSEC_SYSCTL_ON
-+ bool "Turn on features by default"
-+ depends on GRKERNSEC_SYSCTL
-+ help
-+ If you say Y here, instead of having all features enabled in the
-+ kernel configuration disabled at boot time, the features will be
-+ enabled at boot time. It is recommended you say Y here unless
-+ there is some reason you would want all sysctl-tunable features to
-+ be disabled by default. As mentioned elsewhere, it is important
-+ to enable the grsec_lock entry once you have finished modifying
-+ the sysctl entries.
-+
-+endmenu
-+menu "Logging Options"
-+depends on GRKERNSEC
-+
-+config GRKERNSEC_FLOODTIME
-+ int "Seconds in between log messages (minimum)"
-+ default 10
-+ help
-+ This option allows you to enforce the number of seconds between
-+ grsecurity log messages. The default should be suitable for most
-+ people, however, if you choose to change it, choose a value small enough
-+ to allow informative logs to be produced, but large enough to
-+ prevent flooding.
-+
-+config GRKERNSEC_FLOODBURST
-+ int "Number of messages in a burst (maximum)"
-+ default 6
-+ help
-+ This option allows you to choose the maximum number of messages allowed
-+ within the flood time interval you chose in a separate option. The
-+ default should be suitable for most people, however if you find that
-+ many of your logs are being interpreted as flooding, you may want to
-+ raise this value.
-+
-+endmenu
-+
-+endmenu
-diff -urNp linux-3.1.4/grsecurity/Makefile linux-3.1.4/grsecurity/Makefile
---- linux-3.1.4/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/grsecurity/Makefile 2011-11-16 18:40:31.000000000 -0500
-@@ -0,0 +1,36 @@
-+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
-+# during 2001-2009 it has been completely redesigned by Brad Spengler
-+# into an RBAC system
-+#
-+# All code in this directory and various hooks inserted throughout the kernel
-+# are copyright Brad Spengler - Open Source Security, Inc., and released
-+# under the GPL v2 or higher
-+
-+obj-y = grsec_chdir.o grsec_chroot.o grsec_exec.o grsec_fifo.o grsec_fork.o \
-+ grsec_mount.o grsec_sig.o grsec_sysctl.o \
-+ grsec_time.o grsec_tpe.o grsec_link.o grsec_pax.o grsec_ptrace.o
-+
-+obj-$(CONFIG_GRKERNSEC) += grsec_init.o grsum.o gracl.o gracl_segv.o \
-+ gracl_cap.o gracl_alloc.o gracl_shm.o grsec_mem.o gracl_fs.o \
-+ gracl_learn.o grsec_log.o
-+obj-$(CONFIG_GRKERNSEC_RESLOG) += gracl_res.o
-+
-+ifdef CONFIG_NET
-+obj-y += grsec_sock.o
-+obj-$(CONFIG_GRKERNSEC) += gracl_ip.o
-+endif
-+
-+ifndef CONFIG_GRKERNSEC
-+obj-y += grsec_disabled.o
-+endif
-+
-+ifdef CONFIG_GRKERNSEC_HIDESYM
-+extra-y := grsec_hidesym.o
-+$(obj)/grsec_hidesym.o:
-+ @-chmod -f 500 /boot
-+ @-chmod -f 500 /lib/modules
-+ @-chmod -f 500 /lib64/modules
-+ @-chmod -f 500 /lib32/modules
-+ @-chmod -f 700 .
-+ @echo ' grsec: protected kernel image paths'
-+endif
-diff -urNp linux-3.1.4/include/acpi/acpi_bus.h linux-3.1.4/include/acpi/acpi_bus.h
---- linux-3.1.4/include/acpi/acpi_bus.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/acpi/acpi_bus.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
+index 6cd5b64..f620d2d 100644
+--- a/include/acpi/acpi_bus.h
++++ b/include/acpi/acpi_bus.h
@@ -107,7 +107,7 @@ struct acpi_device_ops {
acpi_op_bind bind;
acpi_op_unbind unbind;
@@ -57871,9 +59305,10 @@ diff -urNp linux-3.1.4/include/acpi/acpi_bus.h linux-3.1.4/include/acpi/acpi_bus
#define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */
-diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm-generic/atomic-long.h
---- linux-3.1.4/include/asm-generic/atomic-long.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/atomic-long.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
+index b7babf0..71e4e74 100644
+--- a/include/asm-generic/atomic-long.h
++++ b/include/asm-generic/atomic-long.h
@@ -22,6 +22,12 @@
typedef atomic64_t atomic_long_t;
@@ -57887,7 +59322,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
#define ATOMIC_LONG_INIT(i) ATOMIC64_INIT(i)
static inline long atomic_long_read(atomic_long_t *l)
-@@ -31,6 +37,15 @@ static inline long atomic_long_read(atom
+@@ -31,6 +37,15 @@ static inline long atomic_long_read(atomic_long_t *l)
return (long)atomic64_read(v);
}
@@ -57903,7 +59338,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_set(atomic_long_t *l, long i)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -38,6 +53,15 @@ static inline void atomic_long_set(atomi
+@@ -38,6 +53,15 @@ static inline void atomic_long_set(atomic_long_t *l, long i)
atomic64_set(v, i);
}
@@ -57919,7 +59354,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_inc(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -45,6 +69,15 @@ static inline void atomic_long_inc(atomi
+@@ -45,6 +69,15 @@ static inline void atomic_long_inc(atomic_long_t *l)
atomic64_inc(v);
}
@@ -57935,7 +59370,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_dec(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -52,6 +85,15 @@ static inline void atomic_long_dec(atomi
+@@ -52,6 +85,15 @@ static inline void atomic_long_dec(atomic_long_t *l)
atomic64_dec(v);
}
@@ -57951,7 +59386,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_add(long i, atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -59,6 +101,15 @@ static inline void atomic_long_add(long
+@@ -59,6 +101,15 @@ static inline void atomic_long_add(long i, atomic_long_t *l)
atomic64_add(i, v);
}
@@ -57967,7 +59402,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_sub(long i, atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -66,6 +117,15 @@ static inline void atomic_long_sub(long
+@@ -66,6 +117,15 @@ static inline void atomic_long_sub(long i, atomic_long_t *l)
atomic64_sub(i, v);
}
@@ -57983,7 +59418,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -115,6 +175,15 @@ static inline long atomic_long_inc_retur
+@@ -115,6 +175,15 @@ static inline long atomic_long_inc_return(atomic_long_t *l)
return (long)atomic64_inc_return(v);
}
@@ -57999,7 +59434,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline long atomic_long_dec_return(atomic_long_t *l)
{
atomic64_t *v = (atomic64_t *)l;
-@@ -140,6 +209,12 @@ static inline long atomic_long_add_unles
+@@ -140,6 +209,12 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
typedef atomic_t atomic_long_t;
@@ -58012,7 +59447,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
#define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i)
static inline long atomic_long_read(atomic_long_t *l)
{
-@@ -148,6 +223,15 @@ static inline long atomic_long_read(atom
+@@ -148,6 +223,15 @@ static inline long atomic_long_read(atomic_long_t *l)
return (long)atomic_read(v);
}
@@ -58028,7 +59463,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_set(atomic_long_t *l, long i)
{
atomic_t *v = (atomic_t *)l;
-@@ -155,6 +239,15 @@ static inline void atomic_long_set(atomi
+@@ -155,6 +239,15 @@ static inline void atomic_long_set(atomic_long_t *l, long i)
atomic_set(v, i);
}
@@ -58044,7 +59479,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_inc(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -162,6 +255,15 @@ static inline void atomic_long_inc(atomi
+@@ -162,6 +255,15 @@ static inline void atomic_long_inc(atomic_long_t *l)
atomic_inc(v);
}
@@ -58060,7 +59495,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_dec(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -169,6 +271,15 @@ static inline void atomic_long_dec(atomi
+@@ -169,6 +271,15 @@ static inline void atomic_long_dec(atomic_long_t *l)
atomic_dec(v);
}
@@ -58076,7 +59511,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_add(long i, atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -176,6 +287,15 @@ static inline void atomic_long_add(long
+@@ -176,6 +287,15 @@ static inline void atomic_long_add(long i, atomic_long_t *l)
atomic_add(i, v);
}
@@ -58092,7 +59527,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline void atomic_long_sub(long i, atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -183,6 +303,15 @@ static inline void atomic_long_sub(long
+@@ -183,6 +303,15 @@ static inline void atomic_long_sub(long i, atomic_long_t *l)
atomic_sub(i, v);
}
@@ -58108,7 +59543,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -232,6 +361,15 @@ static inline long atomic_long_inc_retur
+@@ -232,6 +361,15 @@ static inline long atomic_long_inc_return(atomic_long_t *l)
return (long)atomic_inc_return(v);
}
@@ -58124,7 +59559,7 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
static inline long atomic_long_dec_return(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;
-@@ -255,4 +393,49 @@ static inline long atomic_long_add_unles
+@@ -255,4 +393,49 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
#endif /* BITS_PER_LONG == 64 */
@@ -58174,9 +59609,10 @@ diff -urNp linux-3.1.4/include/asm-generic/atomic-long.h linux-3.1.4/include/asm
+#endif
+
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */
-diff -urNp linux-3.1.4/include/asm-generic/cache.h linux-3.1.4/include/asm-generic/cache.h
---- linux-3.1.4/include/asm-generic/cache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/cache.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/cache.h b/include/asm-generic/cache.h
+index 1bfcfe5..e04c5c9 100644
+--- a/include/asm-generic/cache.h
++++ b/include/asm-generic/cache.h
@@ -6,7 +6,7 @@
* cache lines need to provide their own cache.h.
*/
@@ -58187,9 +59623,10 @@ diff -urNp linux-3.1.4/include/asm-generic/cache.h linux-3.1.4/include/asm-gener
+#define L1_CACHE_BYTES (1UL << L1_CACHE_SHIFT)
#endif /* __ASM_GENERIC_CACHE_H */
-diff -urNp linux-3.1.4/include/asm-generic/int-l64.h linux-3.1.4/include/asm-generic/int-l64.h
---- linux-3.1.4/include/asm-generic/int-l64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/int-l64.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h
+index 1ca3efc..e3dc852 100644
+--- a/include/asm-generic/int-l64.h
++++ b/include/asm-generic/int-l64.h
@@ -46,6 +46,8 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
@@ -58199,9 +59636,10 @@ diff -urNp linux-3.1.4/include/asm-generic/int-l64.h linux-3.1.4/include/asm-gen
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-3.1.4/include/asm-generic/int-ll64.h linux-3.1.4/include/asm-generic/int-ll64.h
---- linux-3.1.4/include/asm-generic/int-ll64.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/int-ll64.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
+index f394147..b6152b9 100644
+--- a/include/asm-generic/int-ll64.h
++++ b/include/asm-generic/int-ll64.h
@@ -51,6 +51,8 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
@@ -58211,9 +59649,10 @@ diff -urNp linux-3.1.4/include/asm-generic/int-ll64.h linux-3.1.4/include/asm-ge
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-3.1.4/include/asm-generic/kmap_types.h linux-3.1.4/include/asm-generic/kmap_types.h
---- linux-3.1.4/include/asm-generic/kmap_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/kmap_types.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h
+index 0232ccb..13d9165 100644
+--- a/include/asm-generic/kmap_types.h
++++ b/include/asm-generic/kmap_types.h
@@ -29,10 +29,11 @@ KMAP_D(16) KM_IRQ_PTE,
KMAP_D(17) KM_NMI,
KMAP_D(18) KM_NMI_PTE,
@@ -58227,27 +59666,10 @@ diff -urNp linux-3.1.4/include/asm-generic/kmap_types.h linux-3.1.4/include/asm-
};
#undef KMAP_D
-diff -urNp linux-3.1.4/include/asm-generic/pgtable.h linux-3.1.4/include/asm-generic/pgtable.h
---- linux-3.1.4/include/asm-generic/pgtable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/pgtable.h 2011-11-16 18:39:08.000000000 -0500
-@@ -443,6 +443,14 @@ static inline int pmd_write(pmd_t pmd)
- #endif /* __HAVE_ARCH_PMD_WRITE */
- #endif
-
-+#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
-+static inline unsigned long pax_open_kernel(void) { return 0; }
-+#endif
-+
-+#ifndef __HAVE_ARCH_PAX_CLOSE_KERNEL
-+static inline unsigned long pax_close_kernel(void) { return 0; }
-+#endif
-+
- #endif /* !__ASSEMBLY__ */
-
- #endif /* _ASM_GENERIC_PGTABLE_H */
-diff -urNp linux-3.1.4/include/asm-generic/pgtable-nopmd.h linux-3.1.4/include/asm-generic/pgtable-nopmd.h
---- linux-3.1.4/include/asm-generic/pgtable-nopmd.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/pgtable-nopmd.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
+index 725612b..9cc513a 100644
+--- a/include/asm-generic/pgtable-nopmd.h
++++ b/include/asm-generic/pgtable-nopmd.h
@@ -1,14 +1,19 @@
#ifndef _PGTABLE_NOPMD_H
#define _PGTABLE_NOPMD_H
@@ -58284,9 +59706,10 @@ diff -urNp linux-3.1.4/include/asm-generic/pgtable-nopmd.h linux-3.1.4/include/a
/*
* The "pud_xxx()" functions here are trivial for a folded two-level
* setup: the pmd is never bad, and a pmd always exists (as it's folded
-diff -urNp linux-3.1.4/include/asm-generic/pgtable-nopud.h linux-3.1.4/include/asm-generic/pgtable-nopud.h
---- linux-3.1.4/include/asm-generic/pgtable-nopud.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/pgtable-nopud.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
+index 810431d..ccc3638 100644
+--- a/include/asm-generic/pgtable-nopud.h
++++ b/include/asm-generic/pgtable-nopud.h
@@ -1,10 +1,15 @@
#ifndef _PGTABLE_NOPUD_H
#define _PGTABLE_NOPUD_H
@@ -58317,9 +59740,29 @@ diff -urNp linux-3.1.4/include/asm-generic/pgtable-nopud.h linux-3.1.4/include/a
/*
* The "pgd_xxx()" functions here are trivial for a folded two-level
* setup: the pud is never bad, and a pud always exists (as it's folded
-diff -urNp linux-3.1.4/include/asm-generic/vmlinux.lds.h linux-3.1.4/include/asm-generic/vmlinux.lds.h
---- linux-3.1.4/include/asm-generic/vmlinux.lds.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/asm-generic/vmlinux.lds.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
+index 76bff2b..c7a14e2 100644
+--- a/include/asm-generic/pgtable.h
++++ b/include/asm-generic/pgtable.h
+@@ -443,6 +443,14 @@ static inline int pmd_write(pmd_t pmd)
+ #endif /* __HAVE_ARCH_PMD_WRITE */
+ #endif
+
++#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
++static inline unsigned long pax_open_kernel(void) { return 0; }
++#endif
++
++#ifndef __HAVE_ARCH_PAX_CLOSE_KERNEL
++static inline unsigned long pax_close_kernel(void) { return 0; }
++#endif
++
+ #endif /* !__ASSEMBLY__ */
+
+ #endif /* _ASM_GENERIC_PGTABLE_H */
+diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
+index db22d13..1f2e3e1 100644
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
@@ -217,6 +217,7 @@
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
@@ -58351,30 +59794,10 @@ diff -urNp linux-3.1.4/include/asm-generic/vmlinux.lds.h linux-3.1.4/include/asm
/**
* PERCPU_SECTION - define output section for percpu area, simple version
-diff -urNp linux-3.1.4/include/drm/drm_crtc_helper.h linux-3.1.4/include/drm/drm_crtc_helper.h
---- linux-3.1.4/include/drm/drm_crtc_helper.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/drm/drm_crtc_helper.h 2011-11-16 18:39:08.000000000 -0500
-@@ -74,7 +74,7 @@ struct drm_crtc_helper_funcs {
-
- /* disable crtc when not in use - more explicit than dpms off */
- void (*disable)(struct drm_crtc *crtc);
--};
-+} __no_const;
-
- struct drm_encoder_helper_funcs {
- void (*dpms)(struct drm_encoder *encoder, int mode);
-@@ -95,7 +95,7 @@ struct drm_encoder_helper_funcs {
- struct drm_connector *connector);
- /* disable encoder when not in use - more explicit than dpms off */
- void (*disable)(struct drm_encoder *encoder);
--};
-+} __no_const;
-
- struct drm_connector_helper_funcs {
- int (*get_modes)(struct drm_connector *connector);
-diff -urNp linux-3.1.4/include/drm/drmP.h linux-3.1.4/include/drm/drmP.h
---- linux-3.1.4/include/drm/drmP.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/drm/drmP.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/drm/drmP.h b/include/drm/drmP.h
+index 9b7c2bb..76b7d1e 100644
+--- a/include/drm/drmP.h
++++ b/include/drm/drmP.h
@@ -73,6 +73,7 @@
#include <linux/workqueue.h>
#include <linux/poll.h>
@@ -58401,9 +59824,45 @@ diff -urNp linux-3.1.4/include/drm/drmP.h linux-3.1.4/include/drm/drmP.h
/*@} */
struct list_head filelist;
-diff -urNp linux-3.1.4/include/drm/ttm/ttm_memory.h linux-3.1.4/include/drm/ttm/ttm_memory.h
---- linux-3.1.4/include/drm/ttm/ttm_memory.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/drm/ttm/ttm_memory.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
+index 73b0712..0b7ef2f 100644
+--- a/include/drm/drm_crtc_helper.h
++++ b/include/drm/drm_crtc_helper.h
+@@ -74,7 +74,7 @@ struct drm_crtc_helper_funcs {
+
+ /* disable crtc when not in use - more explicit than dpms off */
+ void (*disable)(struct drm_crtc *crtc);
+-};
++} __no_const;
+
+ struct drm_encoder_helper_funcs {
+ void (*dpms)(struct drm_encoder *encoder, int mode);
+@@ -95,7 +95,7 @@ struct drm_encoder_helper_funcs {
+ struct drm_connector *connector);
+ /* disable encoder when not in use - more explicit than dpms off */
+ void (*disable)(struct drm_encoder *encoder);
+-};
++} __no_const;
+
+ struct drm_connector_helper_funcs {
+ int (*get_modes)(struct drm_connector *connector);
+diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
+index c4961ea..53dfa109 100644
+--- a/include/drm/drm_mode.h
++++ b/include/drm/drm_mode.h
+@@ -233,6 +233,8 @@ struct drm_mode_fb_cmd {
+ #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
+ #define DRM_MODE_FB_DIRTY_FLAGS 0x03
+
++#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256
++
+ /*
+ * Mark a region of a framebuffer as dirty.
+ *
+diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
+index 26c1f78..6722682 100644
+--- a/include/drm/ttm/ttm_memory.h
++++ b/include/drm/ttm/ttm_memory.h
@@ -47,7 +47,7 @@
struct ttm_mem_shrink {
@@ -58413,9 +59872,10 @@ diff -urNp linux-3.1.4/include/drm/ttm/ttm_memory.h linux-3.1.4/include/drm/ttm/
/**
* struct ttm_mem_global - Global memory accounting structure.
-diff -urNp linux-3.1.4/include/linux/a.out.h linux-3.1.4/include/linux/a.out.h
---- linux-3.1.4/include/linux/a.out.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/a.out.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/a.out.h b/include/linux/a.out.h
+index e86dfca..40cc55f 100644
+--- a/include/linux/a.out.h
++++ b/include/linux/a.out.h
@@ -39,6 +39,14 @@ enum machine_type {
M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
};
@@ -58431,9 +59891,10 @@ diff -urNp linux-3.1.4/include/linux/a.out.h linux-3.1.4/include/linux/a.out.h
#if !defined (N_MAGIC)
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
#endif
-diff -urNp linux-3.1.4/include/linux/atmdev.h linux-3.1.4/include/linux/atmdev.h
---- linux-3.1.4/include/linux/atmdev.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/atmdev.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
+index 49a83ca..df96b54 100644
+--- a/include/linux/atmdev.h
++++ b/include/linux/atmdev.h
@@ -237,7 +237,7 @@ struct compat_atm_iobuf {
#endif
@@ -58443,9 +59904,10 @@ diff -urNp linux-3.1.4/include/linux/atmdev.h linux-3.1.4/include/linux/atmdev.h
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-3.1.4/include/linux/binfmts.h linux-3.1.4/include/linux/binfmts.h
---- linux-3.1.4/include/linux/binfmts.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/binfmts.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
+index fd88a39..f4d0bad 100644
+--- a/include/linux/binfmts.h
++++ b/include/linux/binfmts.h
@@ -88,6 +88,7 @@ struct linux_binfmt {
int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
int (*load_shlib)(struct file *);
@@ -58454,9 +59916,10 @@ diff -urNp linux-3.1.4/include/linux/binfmts.h linux-3.1.4/include/linux/binfmts
unsigned long min_coredump; /* minimal dump size */
};
-diff -urNp linux-3.1.4/include/linux/blkdev.h linux-3.1.4/include/linux/blkdev.h
---- linux-3.1.4/include/linux/blkdev.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/blkdev.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index 7fbaa91..5e6a460 100644
+--- a/include/linux/blkdev.h
++++ b/include/linux/blkdev.h
@@ -1321,7 +1321,7 @@ struct block_device_operations {
/* this callback is with swap_lock and sometimes page table lock held */
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
@@ -58466,9 +59929,10 @@ diff -urNp linux-3.1.4/include/linux/blkdev.h linux-3.1.4/include/linux/blkdev.h
extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
unsigned long);
-diff -urNp linux-3.1.4/include/linux/blktrace_api.h linux-3.1.4/include/linux/blktrace_api.h
---- linux-3.1.4/include/linux/blktrace_api.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/blktrace_api.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
+index 8e9e4bc..88bd457 100644
+--- a/include/linux/blktrace_api.h
++++ b/include/linux/blktrace_api.h
@@ -162,7 +162,7 @@ struct blk_trace {
struct dentry *dir;
struct dentry *dropped_file;
@@ -58478,9 +59942,10 @@ diff -urNp linux-3.1.4/include/linux/blktrace_api.h linux-3.1.4/include/linux/bl
};
extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
-diff -urNp linux-3.1.4/include/linux/byteorder/little_endian.h linux-3.1.4/include/linux/byteorder/little_endian.h
---- linux-3.1.4/include/linux/byteorder/little_endian.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/byteorder/little_endian.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h
+index 83195fb..0b0f77d 100644
+--- a/include/linux/byteorder/little_endian.h
++++ b/include/linux/byteorder/little_endian.h
@@ -42,51 +42,51 @@
static inline __le64 __cpu_to_le64p(const __u64 *p)
@@ -58545,9 +60010,10 @@ diff -urNp linux-3.1.4/include/linux/byteorder/little_endian.h linux-3.1.4/inclu
}
#define __cpu_to_le64s(x) do { (void)(x); } while (0)
#define __le64_to_cpus(x) do { (void)(x); } while (0)
-diff -urNp linux-3.1.4/include/linux/cache.h linux-3.1.4/include/linux/cache.h
---- linux-3.1.4/include/linux/cache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/cache.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/cache.h b/include/linux/cache.h
+index 4c57065..4307975 100644
+--- a/include/linux/cache.h
++++ b/include/linux/cache.h
@@ -16,6 +16,10 @@
#define __read_mostly
#endif
@@ -58559,9 +60025,10 @@ diff -urNp linux-3.1.4/include/linux/cache.h linux-3.1.4/include/linux/cache.h
#ifndef ____cacheline_aligned
#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
-diff -urNp linux-3.1.4/include/linux/capability.h linux-3.1.4/include/linux/capability.h
---- linux-3.1.4/include/linux/capability.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/capability.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/capability.h b/include/linux/capability.h
+index c421123..e343179 100644
+--- a/include/linux/capability.h
++++ b/include/linux/capability.h
@@ -547,6 +547,9 @@ extern bool capable(int cap);
extern bool ns_capable(struct user_namespace *ns, int cap);
extern bool task_ns_capable(struct task_struct *t, int cap);
@@ -58572,9 +60039,10 @@ diff -urNp linux-3.1.4/include/linux/capability.h linux-3.1.4/include/linux/capa
/* audit system wants to get cap info from files as well */
extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
-diff -urNp linux-3.1.4/include/linux/cleancache.h linux-3.1.4/include/linux/cleancache.h
---- linux-3.1.4/include/linux/cleancache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/cleancache.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h
+index 04ffb2e..6799180 100644
+--- a/include/linux/cleancache.h
++++ b/include/linux/cleancache.h
@@ -31,7 +31,7 @@ struct cleancache_ops {
void (*flush_page)(int, struct cleancache_filekey, pgoff_t);
void (*flush_inode)(int, struct cleancache_filekey);
@@ -58584,9 +60052,10 @@ diff -urNp linux-3.1.4/include/linux/cleancache.h linux-3.1.4/include/linux/clea
extern struct cleancache_ops
cleancache_register_ops(struct cleancache_ops *ops);
-diff -urNp linux-3.1.4/include/linux/compiler-gcc4.h linux-3.1.4/include/linux/compiler-gcc4.h
---- linux-3.1.4/include/linux/compiler-gcc4.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/compiler-gcc4.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
+index dfadc96..c0e70c1 100644
+--- a/include/linux/compiler-gcc4.h
++++ b/include/linux/compiler-gcc4.h
@@ -31,6 +31,12 @@
@@ -58612,9 +60081,10 @@ diff -urNp linux-3.1.4/include/linux/compiler-gcc4.h linux-3.1.4/include/linux/c
#endif
#if __GNUC_MINOR__ > 0
-diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compiler.h
---- linux-3.1.4/include/linux/compiler.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/compiler.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/compiler.h b/include/linux/compiler.h
+index 320d6c9..8573a1c 100644
+--- a/include/linux/compiler.h
++++ b/include/linux/compiler.h
@@ -5,31 +5,62 @@
#ifdef __CHECKER__
@@ -58678,7 +60148,7 @@ diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compil
# define __chk_user_ptr(x) (void)0
# define __chk_io_ptr(x) (void)0
# define __builtin_warning(x, y...) (1)
-@@ -39,7 +70,9 @@ extern void __chk_io_ptr(const volatile
+@@ -39,7 +70,9 @@ extern void __chk_io_ptr(const volatile void __iomem *);
# define __release(x) (void)0
# define __cond_lock(x,c) (c)
# define __percpu
@@ -58688,7 +60158,7 @@ diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compil
#endif
#ifdef __KERNEL__
-@@ -264,6 +297,14 @@ void ftrace_likely_update(struct ftrace_
+@@ -264,6 +297,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
# define __attribute_const__ /* unimplemented */
#endif
@@ -58703,7 +60173,7 @@ diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compil
/*
* Tell gcc if a function is cold. The compiler will assume any path
* directly leading to the call is unlikely.
-@@ -273,6 +314,22 @@ void ftrace_likely_update(struct ftrace_
+@@ -273,6 +314,22 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
#define __cold
#endif
@@ -58726,7 +60196,7 @@ diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compil
/* Simple shorthand for a section definition */
#ifndef __section
# define __section(S) __attribute__ ((__section__(#S)))
-@@ -306,6 +363,7 @@ void ftrace_likely_update(struct ftrace_
+@@ -306,6 +363,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
* use is to mediate communication between process-level code and irq/NMI
* handlers, all running on the same CPU.
*/
@@ -58735,10 +60205,11 @@ diff -urNp linux-3.1.4/include/linux/compiler.h linux-3.1.4/include/linux/compil
+#define ACCESS_ONCE_RW(x) (*(volatile typeof(x) *)&(x))
#endif /* __LINUX_COMPILER_H */
-diff -urNp linux-3.1.4/include/linux/cpuset.h linux-3.1.4/include/linux/cpuset.h
---- linux-3.1.4/include/linux/cpuset.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/cpuset.h 2011-11-16 18:39:08.000000000 -0500
-@@ -118,7 +118,7 @@ static inline void put_mems_allowed(void
+diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
+index e9eaec5..bfeb9bb 100644
+--- a/include/linux/cpuset.h
++++ b/include/linux/cpuset.h
+@@ -118,7 +118,7 @@ static inline void put_mems_allowed(void)
* nodemask.
*/
smp_mb();
@@ -58747,9 +60218,10 @@ diff -urNp linux-3.1.4/include/linux/cpuset.h linux-3.1.4/include/linux/cpuset.h
}
static inline void set_mems_allowed(nodemask_t nodemask)
-diff -urNp linux-3.1.4/include/linux/crypto.h linux-3.1.4/include/linux/crypto.h
---- linux-3.1.4/include/linux/crypto.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/crypto.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/crypto.h b/include/linux/crypto.h
+index e5e468e..f079672 100644
+--- a/include/linux/crypto.h
++++ b/include/linux/crypto.h
@@ -361,7 +361,7 @@ struct cipher_tfm {
const u8 *key, unsigned int keylen);
void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
@@ -58775,9 +60247,10 @@ diff -urNp linux-3.1.4/include/linux/crypto.h linux-3.1.4/include/linux/crypto.h
#define crt_ablkcipher crt_u.ablkcipher
#define crt_aead crt_u.aead
-diff -urNp linux-3.1.4/include/linux/decompress/mm.h linux-3.1.4/include/linux/decompress/mm.h
---- linux-3.1.4/include/linux/decompress/mm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/decompress/mm.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
+index 7925bf0..d5143d2 100644
+--- a/include/linux/decompress/mm.h
++++ b/include/linux/decompress/mm.h
@@ -77,7 +77,7 @@ static void free(void *where)
* warnings when not needed (indeed large_malloc / large_free are not
* needed by inflate */
@@ -58787,9 +60260,10 @@ diff -urNp linux-3.1.4/include/linux/decompress/mm.h linux-3.1.4/include/linux/d
#define free(a) kfree(a)
#define large_malloc(a) vmalloc(a)
-diff -urNp linux-3.1.4/include/linux/dma-mapping.h linux-3.1.4/include/linux/dma-mapping.h
---- linux-3.1.4/include/linux/dma-mapping.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/dma-mapping.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
+index 347fdc3..cd01657 100644
+--- a/include/linux/dma-mapping.h
++++ b/include/linux/dma-mapping.h
@@ -42,7 +42,7 @@ struct dma_map_ops {
int (*dma_supported)(struct device *dev, u64 mask);
int (*set_dma_mask)(struct device *dev, u64 mask);
@@ -58799,9 +60273,10 @@ diff -urNp linux-3.1.4/include/linux/dma-mapping.h linux-3.1.4/include/linux/dma
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
-diff -urNp linux-3.1.4/include/linux/efi.h linux-3.1.4/include/linux/efi.h
---- linux-3.1.4/include/linux/efi.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/efi.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/efi.h b/include/linux/efi.h
+index 2362a0b..cfaf8fcc 100644
+--- a/include/linux/efi.h
++++ b/include/linux/efi.h
@@ -446,7 +446,7 @@ struct efivar_operations {
efi_get_variable_t *get_variable;
efi_get_next_variable_t *get_next_variable;
@@ -58811,9 +60286,10 @@ diff -urNp linux-3.1.4/include/linux/efi.h linux-3.1.4/include/linux/efi.h
struct efivars {
/*
-diff -urNp linux-3.1.4/include/linux/elf.h linux-3.1.4/include/linux/elf.h
---- linux-3.1.4/include/linux/elf.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/elf.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/elf.h b/include/linux/elf.h
+index 110821c..cb14c08 100644
+--- a/include/linux/elf.h
++++ b/include/linux/elf.h
@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword;
#define PT_GNU_EH_FRAME 0x6474e550
@@ -58886,10 +60362,11 @@ diff -urNp linux-3.1.4/include/linux/elf.h linux-3.1.4/include/linux/elf.h
#endif
-diff -urNp linux-3.1.4/include/linux/filter.h linux-3.1.4/include/linux/filter.h
---- linux-3.1.4/include/linux/filter.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/filter.h 2011-11-20 19:21:53.000000000 -0500
-@@ -134,6 +134,7 @@ struct sock_fprog { /* Required for SO_A
+diff --git a/include/linux/filter.h b/include/linux/filter.h
+index 741956f..f02f482 100644
+--- a/include/linux/filter.h
++++ b/include/linux/filter.h
+@@ -134,6 +134,7 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
struct sk_buff;
struct sock;
@@ -58907,9 +60384,10 @@ diff -urNp linux-3.1.4/include/linux/filter.h linux-3.1.4/include/linux/filter.h
struct rcu_head rcu;
struct sock_filter insns[0];
};
-diff -urNp linux-3.1.4/include/linux/firewire.h linux-3.1.4/include/linux/firewire.h
---- linux-3.1.4/include/linux/firewire.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/firewire.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/firewire.h b/include/linux/firewire.h
+index 84ccf8e..2e9b14c 100644
+--- a/include/linux/firewire.h
++++ b/include/linux/firewire.h
@@ -428,7 +428,7 @@ struct fw_iso_context {
union {
fw_iso_callback_t sc;
@@ -58919,9 +60397,37 @@ diff -urNp linux-3.1.4/include/linux/firewire.h linux-3.1.4/include/linux/firewi
void *callback_data;
};
-diff -urNp linux-3.1.4/include/linux/fscache-cache.h linux-3.1.4/include/linux/fscache-cache.h
---- linux-3.1.4/include/linux/fscache-cache.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/fscache-cache.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/fs.h b/include/linux/fs.h
+index 277f497..9be66a4 100644
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -1588,7 +1588,8 @@ struct file_operations {
+ int (*setlease)(struct file *, long, struct file_lock **);
+ long (*fallocate)(struct file *file, int mode, loff_t offset,
+ loff_t len);
+-};
++} __do_const;
++typedef struct file_operations __no_const file_operations_no_const;
+
+ struct inode_operations {
+ struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
+diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
+index 003dc0f..3c4ea97 100644
+--- a/include/linux/fs_struct.h
++++ b/include/linux/fs_struct.h
+@@ -6,7 +6,7 @@
+ #include <linux/seqlock.h>
+
+ struct fs_struct {
+- int users;
++ atomic_t users;
+ spinlock_t lock;
+ seqcount_t seq;
+ int umask;
+diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h
+index af095b5..cf1220c 100644
+--- a/include/linux/fscache-cache.h
++++ b/include/linux/fscache-cache.h
@@ -102,7 +102,7 @@ struct fscache_operation {
fscache_operation_release_t release;
};
@@ -58931,7 +60437,7 @@ diff -urNp linux-3.1.4/include/linux/fscache-cache.h linux-3.1.4/include/linux/f
extern void fscache_op_work_func(struct work_struct *work);
extern void fscache_enqueue_operation(struct fscache_operation *);
-@@ -122,7 +122,7 @@ static inline void fscache_operation_ini
+@@ -122,7 +122,7 @@ static inline void fscache_operation_init(struct fscache_operation *op,
{
INIT_WORK(&op->work, fscache_op_work_func);
atomic_set(&op->usage, 1);
@@ -58940,23 +60446,11 @@ diff -urNp linux-3.1.4/include/linux/fscache-cache.h linux-3.1.4/include/linux/f
op->processor = processor;
op->release = release;
INIT_LIST_HEAD(&op->pend_link);
-diff -urNp linux-3.1.4/include/linux/fs.h linux-3.1.4/include/linux/fs.h
---- linux-3.1.4/include/linux/fs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/fs.h 2011-11-16 23:39:39.000000000 -0500
-@@ -1588,7 +1588,8 @@ struct file_operations {
- int (*setlease)(struct file *, long, struct file_lock **);
- long (*fallocate)(struct file *file, int mode, loff_t offset,
- loff_t len);
--};
-+} __do_const;
-+typedef struct file_operations __no_const file_operations_no_const;
-
- struct inode_operations {
- struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
-diff -urNp linux-3.1.4/include/linux/fsnotify.h linux-3.1.4/include/linux/fsnotify.h
---- linux-3.1.4/include/linux/fsnotify.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/fsnotify.h 2011-11-16 18:39:08.000000000 -0500
-@@ -314,7 +314,7 @@ static inline void fsnotify_change(struc
+diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
+index 2a53f10..0187fdf 100644
+--- a/include/linux/fsnotify.h
++++ b/include/linux/fsnotify.h
+@@ -314,7 +314,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid)
*/
static inline const unsigned char *fsnotify_oldname_init(const unsigned char *name)
{
@@ -58965,21 +60459,10 @@ diff -urNp linux-3.1.4/include/linux/fsnotify.h linux-3.1.4/include/linux/fsnoti
}
/*
-diff -urNp linux-3.1.4/include/linux/fs_struct.h linux-3.1.4/include/linux/fs_struct.h
---- linux-3.1.4/include/linux/fs_struct.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/fs_struct.h 2011-11-16 18:39:08.000000000 -0500
-@@ -6,7 +6,7 @@
- #include <linux/seqlock.h>
-
- struct fs_struct {
-- int users;
-+ atomic_t users;
- spinlock_t lock;
- seqcount_t seq;
- int umask;
-diff -urNp linux-3.1.4/include/linux/ftrace_event.h linux-3.1.4/include/linux/ftrace_event.h
---- linux-3.1.4/include/linux/ftrace_event.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/ftrace_event.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
+index 96efa67..1261547 100644
+--- a/include/linux/ftrace_event.h
++++ b/include/linux/ftrace_event.h
@@ -97,7 +97,7 @@ struct trace_event_functions {
trace_print_func raw;
trace_print_func hex;
@@ -58989,7 +60472,7 @@ diff -urNp linux-3.1.4/include/linux/ftrace_event.h linux-3.1.4/include/linux/ft
struct trace_event {
struct hlist_node node;
-@@ -252,7 +252,7 @@ extern int trace_define_field(struct ftr
+@@ -252,7 +252,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type,
extern int trace_add_event_call(struct ftrace_event_call *call);
extern void trace_remove_event_call(struct ftrace_event_call *call);
@@ -58998,9 +60481,10 @@ diff -urNp linux-3.1.4/include/linux/ftrace_event.h linux-3.1.4/include/linux/ft
int trace_set_clr_event(const char *system, const char *event, int set);
-diff -urNp linux-3.1.4/include/linux/genhd.h linux-3.1.4/include/linux/genhd.h
---- linux-3.1.4/include/linux/genhd.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/genhd.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/genhd.h b/include/linux/genhd.h
+index 02fa469..a15f279 100644
+--- a/include/linux/genhd.h
++++ b/include/linux/genhd.h
@@ -184,7 +184,7 @@ struct gendisk {
struct kobject *slave_dir;
@@ -59010,9 +60494,11 @@ diff -urNp linux-3.1.4/include/linux/genhd.h linux-3.1.4/include/linux/genhd.h
struct disk_events *ev;
#ifdef CONFIG_BLK_DEV_INTEGRITY
struct blk_integrity *integrity;
-diff -urNp linux-3.1.4/include/linux/gracl.h linux-3.1.4/include/linux/gracl.h
---- linux-3.1.4/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/gracl.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/gracl.h b/include/linux/gracl.h
+new file mode 100644
+index 0000000..0dc3943
+--- /dev/null
++++ b/include/linux/gracl.h
@@ -0,0 +1,317 @@
+#ifndef GR_ACL_H
+#define GR_ACL_H
@@ -59331,9 +60817,11 @@ diff -urNp linux-3.1.4/include/linux/gracl.h linux-3.1.4/include/linux/gracl.h
+
+#endif
+
-diff -urNp linux-3.1.4/include/linux/gralloc.h linux-3.1.4/include/linux/gralloc.h
---- linux-3.1.4/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/gralloc.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/gralloc.h b/include/linux/gralloc.h
+new file mode 100644
+index 0000000..323ecf2
+--- /dev/null
++++ b/include/linux/gralloc.h
@@ -0,0 +1,9 @@
+#ifndef __GRALLOC_H
+#define __GRALLOC_H
@@ -59344,9 +60832,11 @@ diff -urNp linux-3.1.4/include/linux/gralloc.h linux-3.1.4/include/linux/gralloc
+void *acl_alloc_num(unsigned long num, unsigned long len);
+
+#endif
-diff -urNp linux-3.1.4/include/linux/grdefs.h linux-3.1.4/include/linux/grdefs.h
---- linux-3.1.4/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/grdefs.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/grdefs.h b/include/linux/grdefs.h
+new file mode 100644
+index 0000000..b30e9bc
+--- /dev/null
++++ b/include/linux/grdefs.h
@@ -0,0 +1,140 @@
+#ifndef GRDEFS_H
+#define GRDEFS_H
@@ -59488,9 +60978,11 @@ diff -urNp linux-3.1.4/include/linux/grdefs.h linux-3.1.4/include/linux/grdefs.h
+};
+
+#endif
-diff -urNp linux-3.1.4/include/linux/grinternal.h linux-3.1.4/include/linux/grinternal.h
---- linux-3.1.4/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/grinternal.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/grinternal.h b/include/linux/grinternal.h
+new file mode 100644
+index 0000000..60cda84
+--- /dev/null
++++ b/include/linux/grinternal.h
@@ -0,0 +1,220 @@
+#ifndef __GRINTERNAL_H
+#define __GRINTERNAL_H
@@ -59712,9 +61204,11 @@ diff -urNp linux-3.1.4/include/linux/grinternal.h linux-3.1.4/include/linux/grin
+#endif
+
+#endif
-diff -urNp linux-3.1.4/include/linux/grmsg.h linux-3.1.4/include/linux/grmsg.h
---- linux-3.1.4/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/grmsg.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/grmsg.h b/include/linux/grmsg.h
+new file mode 100644
+index 0000000..9d5fd4a
+--- /dev/null
++++ b/include/linux/grmsg.h
@@ -0,0 +1,108 @@
+#define DEFAULTSECMSG "%.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u, parent %.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u"
+#define GR_ACL_PROCACCT_MSG "%.256s[%.16s:%d] IP:%pI4 TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u run time:[%ud %uh %um %us] cpu time:[%ud %uh %um %us] %s with exit code %ld, parent %.256s[%.16s:%d] IP:%pI4 TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u"
@@ -59824,9 +61318,11 @@ diff -urNp linux-3.1.4/include/linux/grmsg.h linux-3.1.4/include/linux/grmsg.h
+#define GR_VM86_MSG "denied use of vm86 by "
+#define GR_PTRACE_AUDIT_MSG "process %.950s(%.16s:%d) attached to via ptrace by "
+#define GR_INIT_TRANSFER_MSG "persistent special role transferred privilege to init by "
-diff -urNp linux-3.1.4/include/linux/grsecurity.h linux-3.1.4/include/linux/grsecurity.h
---- linux-3.1.4/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/grsecurity.h 2011-11-17 00:16:10.000000000 -0500
+diff --git a/include/linux/grsecurity.h b/include/linux/grsecurity.h
+new file mode 100644
+index 0000000..bd25f72
+--- /dev/null
++++ b/include/linux/grsecurity.h
@@ -0,0 +1,228 @@
+#ifndef GR_SECURITY_H
+#define GR_SECURITY_H
@@ -60056,9 +61552,11 @@ diff -urNp linux-3.1.4/include/linux/grsecurity.h linux-3.1.4/include/linux/grse
+#endif
+
+#endif
-diff -urNp linux-3.1.4/include/linux/grsock.h linux-3.1.4/include/linux/grsock.h
---- linux-3.1.4/include/linux/grsock.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/grsock.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/grsock.h b/include/linux/grsock.h
+new file mode 100644
+index 0000000..e7ffaaf
+--- /dev/null
++++ b/include/linux/grsock.h
@@ -0,0 +1,19 @@
+#ifndef __GRSOCK_H
+#define __GRSOCK_H
@@ -60079,9 +61577,10 @@ diff -urNp linux-3.1.4/include/linux/grsock.h linux-3.1.4/include/linux/grsock.h
+ const int protocol);
+
+#endif
-diff -urNp linux-3.1.4/include/linux/hid.h linux-3.1.4/include/linux/hid.h
---- linux-3.1.4/include/linux/hid.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/hid.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/hid.h b/include/linux/hid.h
+index 9cf8e7a..5ec94d0 100644
+--- a/include/linux/hid.h
++++ b/include/linux/hid.h
@@ -676,7 +676,7 @@ struct hid_ll_driver {
unsigned int code, int value);
@@ -60091,10 +61590,11 @@ diff -urNp linux-3.1.4/include/linux/hid.h linux-3.1.4/include/linux/hid.h
#define PM_HINT_FULLON 1<<5
#define PM_HINT_NORMAL 1<<1
-diff -urNp linux-3.1.4/include/linux/highmem.h linux-3.1.4/include/linux/highmem.h
---- linux-3.1.4/include/linux/highmem.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/highmem.h 2011-11-16 18:39:08.000000000 -0500
-@@ -185,6 +185,18 @@ static inline void clear_highpage(struct
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index 3a93f73..b19d0b3 100644
+--- a/include/linux/highmem.h
++++ b/include/linux/highmem.h
+@@ -185,6 +185,18 @@ static inline void clear_highpage(struct page *page)
kunmap_atomic(kaddr, KM_USER0);
}
@@ -60113,9 +61613,10 @@ diff -urNp linux-3.1.4/include/linux/highmem.h linux-3.1.4/include/linux/highmem
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
-diff -urNp linux-3.1.4/include/linux/i2c.h linux-3.1.4/include/linux/i2c.h
---- linux-3.1.4/include/linux/i2c.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/i2c.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/i2c.h b/include/linux/i2c.h
+index a6c652e..1f5878f 100644
+--- a/include/linux/i2c.h
++++ b/include/linux/i2c.h
@@ -346,6 +346,7 @@ struct i2c_algorithm {
/* To determine what the adapter supports */
u32 (*functionality) (struct i2c_adapter *);
@@ -60124,9 +61625,10 @@ diff -urNp linux-3.1.4/include/linux/i2c.h linux-3.1.4/include/linux/i2c.h
/*
* i2c_adapter is the structure used to identify a physical i2c bus along
-diff -urNp linux-3.1.4/include/linux/i2o.h linux-3.1.4/include/linux/i2o.h
---- linux-3.1.4/include/linux/i2o.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/i2o.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/i2o.h b/include/linux/i2o.h
+index a6deef4..c56a7f2 100644
+--- a/include/linux/i2o.h
++++ b/include/linux/i2o.h
@@ -564,7 +564,7 @@ struct i2o_controller {
struct i2o_device *exec; /* Executive */
#if BITS_PER_LONG == 64
@@ -60136,10 +61638,11 @@ diff -urNp linux-3.1.4/include/linux/i2o.h linux-3.1.4/include/linux/i2o.h
struct list_head context_list; /* list of context id's
and pointers */
#endif
-diff -urNp linux-3.1.4/include/linux/init.h linux-3.1.4/include/linux/init.h
---- linux-3.1.4/include/linux/init.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/init.h 2011-11-16 18:39:08.000000000 -0500
-@@ -293,13 +293,13 @@ void __init parse_early_options(char *cm
+diff --git a/include/linux/init.h b/include/linux/init.h
+index 9146f39..885354d 100644
+--- a/include/linux/init.h
++++ b/include/linux/init.h
+@@ -293,13 +293,13 @@ void __init parse_early_options(char *cmdline);
/* Each module must use one module_init(). */
#define module_init(initfn) \
@@ -60155,9 +61658,10 @@ diff -urNp linux-3.1.4/include/linux/init.h linux-3.1.4/include/linux/init.h
{ return exitfn; } \
void cleanup_module(void) __attribute__((alias(#exitfn)));
-diff -urNp linux-3.1.4/include/linux/init_task.h linux-3.1.4/include/linux/init_task.h
---- linux-3.1.4/include/linux/init_task.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/init_task.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/init_task.h b/include/linux/init_task.h
+index d14e058..4162929 100644
+--- a/include/linux/init_task.h
++++ b/include/linux/init_task.h
@@ -126,6 +126,12 @@ extern struct cred init_cred;
# define INIT_PERF_EVENTS(tsk)
#endif
@@ -60179,9 +61683,10 @@ diff -urNp linux-3.1.4/include/linux/init_task.h linux-3.1.4/include/linux/init_
.fs = &init_fs, \
.files = &init_files, \
.signal = &init_signals, \
-diff -urNp linux-3.1.4/include/linux/intel-iommu.h linux-3.1.4/include/linux/intel-iommu.h
---- linux-3.1.4/include/linux/intel-iommu.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/intel-iommu.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
+index 9310c69..6ebb244 100644
+--- a/include/linux/intel-iommu.h
++++ b/include/linux/intel-iommu.h
@@ -296,7 +296,7 @@ struct iommu_flush {
u8 fm, u64 type);
void (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr,
@@ -60191,9 +61696,10 @@ diff -urNp linux-3.1.4/include/linux/intel-iommu.h linux-3.1.4/include/linux/int
enum {
SR_DMAR_FECTL_REG,
-diff -urNp linux-3.1.4/include/linux/interrupt.h linux-3.1.4/include/linux/interrupt.h
---- linux-3.1.4/include/linux/interrupt.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/interrupt.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index f51a81b..adfcb44 100644
+--- a/include/linux/interrupt.h
++++ b/include/linux/interrupt.h
@@ -425,7 +425,7 @@ enum
/* map softirq index to softirq name. update 'softirq_to_name' in
* kernel/softirq.c when adding a new softirq.
@@ -60203,7 +61709,7 @@ diff -urNp linux-3.1.4/include/linux/interrupt.h linux-3.1.4/include/linux/inter
/* softirq mask and active fields moved to irq_cpustat_t in
* asm/hardirq.h to get better cache usage. KAO
-@@ -433,12 +433,12 @@ extern char *softirq_to_name[NR_SOFTIRQS
+@@ -433,12 +433,12 @@ extern char *softirq_to_name[NR_SOFTIRQS];
struct softirq_action
{
@@ -60218,9 +61724,10 @@ diff -urNp linux-3.1.4/include/linux/interrupt.h linux-3.1.4/include/linux/inter
extern void softirq_init(void);
static inline void __raise_softirq_irqoff(unsigned int nr)
{
-diff -urNp linux-3.1.4/include/linux/kallsyms.h linux-3.1.4/include/linux/kallsyms.h
---- linux-3.1.4/include/linux/kallsyms.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/kallsyms.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
+index 0df513b..fe901a2 100644
+--- a/include/linux/kallsyms.h
++++ b/include/linux/kallsyms.h
@@ -15,7 +15,8 @@
struct module;
@@ -60231,7 +61738,7 @@ diff -urNp linux-3.1.4/include/linux/kallsyms.h linux-3.1.4/include/linux/kallsy
/* Lookup the address for a symbol. Returns 0 if not found. */
unsigned long kallsyms_lookup_name(const char *name);
-@@ -99,6 +100,16 @@ static inline int lookup_symbol_attrs(un
+@@ -99,6 +100,16 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
/* Stupid that this does nothing, but I didn't create this mess. */
#define __print_symbol(fmt, addr)
#endif /*CONFIG_KALLSYMS*/
@@ -60248,9 +61755,10 @@ diff -urNp linux-3.1.4/include/linux/kallsyms.h linux-3.1.4/include/linux/kallsy
/* This macro allows us to keep printk typechecking */
static void __check_printsym_format(const char *fmt, ...)
-diff -urNp linux-3.1.4/include/linux/kgdb.h linux-3.1.4/include/linux/kgdb.h
---- linux-3.1.4/include/linux/kgdb.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/kgdb.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
+index fa39183..40160be 100644
+--- a/include/linux/kgdb.h
++++ b/include/linux/kgdb.h
@@ -53,7 +53,7 @@ extern int kgdb_connected;
extern int kgdb_io_module_registered;
@@ -60278,10 +61786,11 @@ diff -urNp linux-3.1.4/include/linux/kgdb.h linux-3.1.4/include/linux/kgdb.h
extern struct kgdb_arch arch_kgdb_ops;
-diff -urNp linux-3.1.4/include/linux/kmod.h linux-3.1.4/include/linux/kmod.h
---- linux-3.1.4/include/linux/kmod.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/kmod.h 2011-11-16 18:40:31.000000000 -0500
-@@ -34,6 +34,8 @@ extern char modprobe_path[]; /* for sysc
+diff --git a/include/linux/kmod.h b/include/linux/kmod.h
+index 0da38cf..d23f05f 100644
+--- a/include/linux/kmod.h
++++ b/include/linux/kmod.h
+@@ -34,6 +34,8 @@ extern char modprobe_path[]; /* for sysctl */
* usually useless though. */
extern int __request_module(bool wait, const char *name, ...) \
__attribute__((format(printf, 2, 3)));
@@ -60290,10 +61799,11 @@ diff -urNp linux-3.1.4/include/linux/kmod.h linux-3.1.4/include/linux/kmod.h
#define request_module(mod...) __request_module(true, mod)
#define request_module_nowait(mod...) __request_module(false, mod)
#define try_then_request_module(x, mod...) \
-diff -urNp linux-3.1.4/include/linux/kvm_host.h linux-3.1.4/include/linux/kvm_host.h
---- linux-3.1.4/include/linux/kvm_host.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/kvm_host.h 2011-11-16 18:39:08.000000000 -0500
-@@ -308,7 +308,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
+diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
+index eabb21a..3f030f4 100644
+--- a/include/linux/kvm_host.h
++++ b/include/linux/kvm_host.h
+@@ -308,7 +308,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
void vcpu_load(struct kvm_vcpu *vcpu);
void vcpu_put(struct kvm_vcpu *vcpu);
@@ -60302,7 +61812,7 @@ diff -urNp linux-3.1.4/include/linux/kvm_host.h linux-3.1.4/include/linux/kvm_ho
struct module *module);
void kvm_exit(void);
-@@ -454,7 +454,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
+@@ -454,7 +454,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
struct kvm_guest_debug *dbg);
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
@@ -60311,9 +61821,10 @@ diff -urNp linux-3.1.4/include/linux/kvm_host.h linux-3.1.4/include/linux/kvm_ho
void kvm_arch_exit(void);
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
-diff -urNp linux-3.1.4/include/linux/libata.h linux-3.1.4/include/linux/libata.h
---- linux-3.1.4/include/linux/libata.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/libata.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/libata.h b/include/linux/libata.h
+index efd6f98..5f5fd37 100644
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
@@ -909,7 +909,7 @@ struct ata_port_operations {
* fields must be pointers.
*/
@@ -60323,9 +61834,10 @@ diff -urNp linux-3.1.4/include/linux/libata.h linux-3.1.4/include/linux/libata.h
struct ata_port_info {
unsigned long flags;
-diff -urNp linux-3.1.4/include/linux/mca.h linux-3.1.4/include/linux/mca.h
---- linux-3.1.4/include/linux/mca.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mca.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/mca.h b/include/linux/mca.h
+index 3797270..7765ede 100644
+--- a/include/linux/mca.h
++++ b/include/linux/mca.h
@@ -80,7 +80,7 @@ struct mca_bus_accessor_functions {
int region);
void * (*mca_transform_memory)(struct mca_device *,
@@ -60335,9 +61847,10 @@ diff -urNp linux-3.1.4/include/linux/mca.h linux-3.1.4/include/linux/mca.h
struct mca_bus {
u64 default_dma_mask;
-diff -urNp linux-3.1.4/include/linux/memory.h linux-3.1.4/include/linux/memory.h
---- linux-3.1.4/include/linux/memory.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/memory.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/memory.h b/include/linux/memory.h
+index 935699b..11042cc 100644
+--- a/include/linux/memory.h
++++ b/include/linux/memory.h
@@ -144,7 +144,7 @@ struct memory_accessor {
size_t count);
ssize_t (*write)(struct memory_accessor *, const char *buf,
@@ -60347,9 +61860,10 @@ diff -urNp linux-3.1.4/include/linux/memory.h linux-3.1.4/include/linux/memory.h
/*
* Kernel text modification mutex, used for code patching. Users of this lock
-diff -urNp linux-3.1.4/include/linux/mfd/abx500.h linux-3.1.4/include/linux/mfd/abx500.h
---- linux-3.1.4/include/linux/mfd/abx500.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mfd/abx500.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
+index 896b5e4..1159ad0 100644
+--- a/include/linux/mfd/abx500.h
++++ b/include/linux/mfd/abx500.h
@@ -234,6 +234,7 @@ struct abx500_ops {
int (*event_registers_startup_state_get) (struct device *, u8 *);
int (*startup_irq_enabled) (struct device *, unsigned int);
@@ -60358,10 +61872,11 @@ diff -urNp linux-3.1.4/include/linux/mfd/abx500.h linux-3.1.4/include/linux/mfd/
int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
void abx500_remove_ops(struct device *dev);
-diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
---- linux-3.1.4/include/linux/mm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mm.h 2011-11-16 18:39:08.000000000 -0500
-@@ -114,7 +114,14 @@ extern unsigned int kobjsize(const void
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index fedc5f0..7cedb6d 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -114,7 +114,14 @@ extern unsigned int kobjsize(const void *objp);
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
@@ -60411,7 +61926,7 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
extern unsigned long move_page_tables(struct vm_area_struct *vma,
unsigned long old_addr, struct vm_area_struct *new_vma,
unsigned long new_addr, unsigned long len);
-@@ -1133,6 +1112,15 @@ static inline void sync_mm_rss(struct ta
+@@ -1133,6 +1112,15 @@ static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
}
#endif
@@ -60435,7 +61950,7 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
extern unsigned long do_brk(unsigned long, unsigned long);
-@@ -1474,6 +1463,10 @@ extern struct vm_area_struct * find_vma(
+@@ -1474,6 +1463,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
@@ -60446,7 +61961,7 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-@@ -1490,15 +1483,6 @@ static inline unsigned long vma_pages(st
+@@ -1490,15 +1483,6 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
}
@@ -60462,7 +61977,7 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t);
-@@ -1612,7 +1596,7 @@ extern int unpoison_memory(unsigned long
+@@ -1612,7 +1596,7 @@ extern int unpoison_memory(unsigned long pfn);
extern int sysctl_memory_failure_early_kill;
extern int sysctl_memory_failure_recovery;
extern void shake_page(struct page *p, int access);
@@ -60471,7 +61986,7 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
extern int soft_offline_page(struct page *page, int flags);
extern void dump_page(struct page *page);
-@@ -1626,5 +1610,11 @@ extern void copy_user_huge_page(struct p
+@@ -1626,5 +1610,11 @@ extern void copy_user_huge_page(struct page *dst, struct page *src,
unsigned int pages_per_huge_page);
#endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
@@ -60483,9 +61998,10 @@ diff -urNp linux-3.1.4/include/linux/mm.h linux-3.1.4/include/linux/mm.h
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
-diff -urNp linux-3.1.4/include/linux/mm_types.h linux-3.1.4/include/linux/mm_types.h
---- linux-3.1.4/include/linux/mm_types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mm_types.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
+index 10a2f62..c8fa287 100644
+--- a/include/linux/mm_types.h
++++ b/include/linux/mm_types.h
@@ -230,6 +230,8 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
@@ -60520,10 +62036,11 @@ diff -urNp linux-3.1.4/include/linux/mm_types.h linux-3.1.4/include/linux/mm_typ
};
static inline void mm_init_cpumask(struct mm_struct *mm)
-diff -urNp linux-3.1.4/include/linux/mmu_notifier.h linux-3.1.4/include/linux/mmu_notifier.h
---- linux-3.1.4/include/linux/mmu_notifier.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mmu_notifier.h 2011-11-16 18:39:08.000000000 -0500
-@@ -255,12 +255,12 @@ static inline void mmu_notifier_mm_destr
+diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
+index 1d1b1e1..2a13c78 100644
+--- a/include/linux/mmu_notifier.h
++++ b/include/linux/mmu_notifier.h
+@@ -255,12 +255,12 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
*/
#define ptep_clear_flush_notify(__vma, __address, __ptep) \
({ \
@@ -60539,9 +62056,10 @@ diff -urNp linux-3.1.4/include/linux/mmu_notifier.h linux-3.1.4/include/linux/mm
})
#define pmdp_clear_flush_notify(__vma, __address, __pmdp) \
-diff -urNp linux-3.1.4/include/linux/mmzone.h linux-3.1.4/include/linux/mmzone.h
---- linux-3.1.4/include/linux/mmzone.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mmzone.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
+index be1ac8d..26868ce 100644
+--- a/include/linux/mmzone.h
++++ b/include/linux/mmzone.h
@@ -356,7 +356,7 @@ struct zone {
unsigned long flags; /* zone flags, see below */
@@ -60551,9 +62069,10 @@ diff -urNp linux-3.1.4/include/linux/mmzone.h linux-3.1.4/include/linux/mmzone.h
/*
* The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
-diff -urNp linux-3.1.4/include/linux/mod_devicetable.h linux-3.1.4/include/linux/mod_devicetable.h
---- linux-3.1.4/include/linux/mod_devicetable.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/mod_devicetable.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
+index ae28e93..1ac2233 100644
+--- a/include/linux/mod_devicetable.h
++++ b/include/linux/mod_devicetable.h
@@ -12,7 +12,7 @@
typedef unsigned long kernel_ulong_t;
#endif
@@ -60572,9 +62091,10 @@ diff -urNp linux-3.1.4/include/linux/mod_devicetable.h linux-3.1.4/include/linux
struct hid_device_id {
__u16 bus;
-diff -urNp linux-3.1.4/include/linux/module.h linux-3.1.4/include/linux/module.h
---- linux-3.1.4/include/linux/module.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/module.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/module.h b/include/linux/module.h
+index 1c30087..fc2a442 100644
+--- a/include/linux/module.h
++++ b/include/linux/module.h
@@ -16,6 +16,7 @@
#include <linux/kobject.h>
#include <linux/moduleparam.h>
@@ -60618,7 +62138,7 @@ diff -urNp linux-3.1.4/include/linux/module.h linux-3.1.4/include/linux/module.h
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
unsigned int num_ftrace_callsites;
-@@ -445,16 +447,46 @@ bool is_module_address(unsigned long add
+@@ -445,16 +447,46 @@ bool is_module_address(unsigned long addr);
bool is_module_percpu_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
@@ -60669,10 +62189,11 @@ diff -urNp linux-3.1.4/include/linux/module.h linux-3.1.4/include/linux/module.h
}
/* Search for module by name: must hold module_mutex. */
-diff -urNp linux-3.1.4/include/linux/moduleloader.h linux-3.1.4/include/linux/moduleloader.h
---- linux-3.1.4/include/linux/moduleloader.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/moduleloader.h 2011-11-16 18:39:08.000000000 -0500
-@@ -25,9 +25,21 @@ unsigned int arch_mod_section_prepend(st
+diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
+index b2be02e..6a9fdb1 100644
+--- a/include/linux/moduleloader.h
++++ b/include/linux/moduleloader.h
+@@ -25,9 +25,21 @@ unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section);
sections. Returns NULL on failure. */
void *module_alloc(unsigned long size);
@@ -60694,10 +62215,11 @@ diff -urNp linux-3.1.4/include/linux/moduleloader.h linux-3.1.4/include/linux/mo
/* Apply the given relocation to the (simplified) ELF. Return -error
or 0. */
int apply_relocate(Elf_Shdr *sechdrs,
-diff -urNp linux-3.1.4/include/linux/moduleparam.h linux-3.1.4/include/linux/moduleparam.h
---- linux-3.1.4/include/linux/moduleparam.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/moduleparam.h 2011-11-16 18:39:08.000000000 -0500
-@@ -255,7 +255,7 @@ static inline void __kernel_param_unlock
+diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
+index ddaae98..3c70938 100644
+--- a/include/linux/moduleparam.h
++++ b/include/linux/moduleparam.h
+@@ -255,7 +255,7 @@ static inline void __kernel_param_unlock(void)
* @len is usually just sizeof(string).
*/
#define module_param_string(name, string, len, perm) \
@@ -60706,7 +62228,7 @@ diff -urNp linux-3.1.4/include/linux/moduleparam.h linux-3.1.4/include/linux/mod
= { len, string }; \
__module_param_call(MODULE_PARAM_PREFIX, name, \
&param_ops_string, \
-@@ -370,7 +370,7 @@ extern int param_get_invbool(char *buffe
+@@ -370,7 +370,7 @@ extern int param_get_invbool(char *buffer, const struct kernel_param *kp);
* module_param_named() for why this might be necessary.
*/
#define module_param_array_named(name, array, type, nump, perm) \
@@ -60715,9 +62237,10 @@ diff -urNp linux-3.1.4/include/linux/moduleparam.h linux-3.1.4/include/linux/mod
= { .max = ARRAY_SIZE(array), .num = nump, \
.ops = &param_ops_##type, \
.elemsize = sizeof(array[0]), .elem = array }; \
-diff -urNp linux-3.1.4/include/linux/namei.h linux-3.1.4/include/linux/namei.h
---- linux-3.1.4/include/linux/namei.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/namei.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/namei.h b/include/linux/namei.h
+index ffc0213..2c1f2cb 100644
+--- a/include/linux/namei.h
++++ b/include/linux/namei.h
@@ -24,7 +24,7 @@ struct nameidata {
unsigned seq;
int last_type;
@@ -60742,9 +62265,10 @@ diff -urNp linux-3.1.4/include/linux/namei.h linux-3.1.4/include/linux/namei.h
{
return nd->saved_names[nd->depth];
}
-diff -urNp linux-3.1.4/include/linux/netdevice.h linux-3.1.4/include/linux/netdevice.h
---- linux-3.1.4/include/linux/netdevice.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/netdevice.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index ddee79b..67af106 100644
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
@@ -944,6 +944,7 @@ struct net_device_ops {
int (*ndo_set_features)(struct net_device *dev,
u32 features);
@@ -60753,9 +62277,11 @@ diff -urNp linux-3.1.4/include/linux/netdevice.h linux-3.1.4/include/linux/netde
/*
* The DEVICE structure.
-diff -urNp linux-3.1.4/include/linux/netfilter/xt_gradm.h linux-3.1.4/include/linux/netfilter/xt_gradm.h
---- linux-3.1.4/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/include/linux/netfilter/xt_gradm.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/netfilter/xt_gradm.h b/include/linux/netfilter/xt_gradm.h
+new file mode 100644
+index 0000000..33f4af8
+--- /dev/null
++++ b/include/linux/netfilter/xt_gradm.h
@@ -0,0 +1,9 @@
+#ifndef _LINUX_NETFILTER_XT_GRADM_H
+#define _LINUX_NETFILTER_XT_GRADM_H 1
@@ -60766,9 +62292,10 @@ diff -urNp linux-3.1.4/include/linux/netfilter/xt_gradm.h linux-3.1.4/include/li
+};
+
+#endif
-diff -urNp linux-3.1.4/include/linux/of_pdt.h linux-3.1.4/include/linux/of_pdt.h
---- linux-3.1.4/include/linux/of_pdt.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/of_pdt.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/of_pdt.h b/include/linux/of_pdt.h
+index c65a18a..0c05f3a 100644
+--- a/include/linux/of_pdt.h
++++ b/include/linux/of_pdt.h
@@ -32,7 +32,7 @@ struct of_pdt_ops {
/* return 0 on success; fill in 'len' with number of bytes in path */
@@ -60778,10 +62305,11 @@ diff -urNp linux-3.1.4/include/linux/of_pdt.h linux-3.1.4/include/linux/of_pdt.h
extern void *prom_early_alloc(unsigned long size);
-diff -urNp linux-3.1.4/include/linux/oprofile.h linux-3.1.4/include/linux/oprofile.h
---- linux-3.1.4/include/linux/oprofile.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/oprofile.h 2011-11-16 18:39:08.000000000 -0500
-@@ -139,9 +139,9 @@ int oprofilefs_create_ulong(struct super
+diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
+index 49c8727..34d2ae1 100644
+--- a/include/linux/oprofile.h
++++ b/include/linux/oprofile.h
+@@ -139,9 +139,9 @@ int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root,
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
char const * name, ulong * val);
@@ -60793,9 +62321,10 @@ diff -urNp linux-3.1.4/include/linux/oprofile.h linux-3.1.4/include/linux/oprofi
/** create a directory */
struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
-diff -urNp linux-3.1.4/include/linux/padata.h linux-3.1.4/include/linux/padata.h
---- linux-3.1.4/include/linux/padata.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/padata.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/padata.h b/include/linux/padata.h
+index 4633b2f..988bc08 100644
+--- a/include/linux/padata.h
++++ b/include/linux/padata.h
@@ -129,7 +129,7 @@ struct parallel_data {
struct padata_instance *pinst;
struct padata_parallel_queue __percpu *pqueue;
@@ -60805,9 +62334,10 @@ diff -urNp linux-3.1.4/include/linux/padata.h linux-3.1.4/include/linux/padata.h
atomic_t reorder_objects;
atomic_t refcnt;
unsigned int max_seq_nr;
-diff -urNp linux-3.1.4/include/linux/perf_event.h linux-3.1.4/include/linux/perf_event.h
---- linux-3.1.4/include/linux/perf_event.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/perf_event.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
+index c816075..cd28c4d 100644
+--- a/include/linux/perf_event.h
++++ b/include/linux/perf_event.h
@@ -745,8 +745,8 @@ struct perf_event {
enum perf_event_active_state state;
@@ -60830,9 +62360,10 @@ diff -urNp linux-3.1.4/include/linux/perf_event.h linux-3.1.4/include/linux/perf
/*
* Protect attach/detach and child_list:
-diff -urNp linux-3.1.4/include/linux/pipe_fs_i.h linux-3.1.4/include/linux/pipe_fs_i.h
---- linux-3.1.4/include/linux/pipe_fs_i.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/pipe_fs_i.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
+index 77257c9..51d473a 100644
+--- a/include/linux/pipe_fs_i.h
++++ b/include/linux/pipe_fs_i.h
@@ -46,9 +46,9 @@ struct pipe_buffer {
struct pipe_inode_info {
wait_queue_head_t wait;
@@ -60846,10 +62377,11 @@ diff -urNp linux-3.1.4/include/linux/pipe_fs_i.h linux-3.1.4/include/linux/pipe_
unsigned int r_counter;
unsigned int w_counter;
struct page *tmp_page;
-diff -urNp linux-3.1.4/include/linux/pm_runtime.h linux-3.1.4/include/linux/pm_runtime.h
---- linux-3.1.4/include/linux/pm_runtime.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/pm_runtime.h 2011-11-16 18:39:08.000000000 -0500
-@@ -99,7 +99,7 @@ static inline bool pm_runtime_callbacks_
+diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
+index daac05d..c6802ce 100644
+--- a/include/linux/pm_runtime.h
++++ b/include/linux/pm_runtime.h
+@@ -99,7 +99,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
static inline void pm_runtime_mark_last_busy(struct device *dev)
{
@@ -60858,9 +62390,10 @@ diff -urNp linux-3.1.4/include/linux/pm_runtime.h linux-3.1.4/include/linux/pm_r
}
#else /* !CONFIG_PM_RUNTIME */
-diff -urNp linux-3.1.4/include/linux/poison.h linux-3.1.4/include/linux/poison.h
---- linux-3.1.4/include/linux/poison.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/poison.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/poison.h b/include/linux/poison.h
+index 79159de..f1233a9 100644
+--- a/include/linux/poison.h
++++ b/include/linux/poison.h
@@ -19,8 +19,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
@@ -60872,9 +62405,10 @@ diff -urNp linux-3.1.4/include/linux/poison.h linux-3.1.4/include/linux/poison.h
/********** include/linux/timer.h **********/
/*
-diff -urNp linux-3.1.4/include/linux/preempt.h linux-3.1.4/include/linux/preempt.h
---- linux-3.1.4/include/linux/preempt.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/preempt.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 58969b2..ead129b 100644
+--- a/include/linux/preempt.h
++++ b/include/linux/preempt.h
@@ -123,7 +123,7 @@ struct preempt_ops {
void (*sched_in)(struct preempt_notifier *notifier, int cpu);
void (*sched_out)(struct preempt_notifier *notifier,
@@ -60884,10 +62418,11 @@ diff -urNp linux-3.1.4/include/linux/preempt.h linux-3.1.4/include/linux/preempt
/**
* preempt_notifier - key for installing preemption notifiers
-diff -urNp linux-3.1.4/include/linux/proc_fs.h linux-3.1.4/include/linux/proc_fs.h
---- linux-3.1.4/include/linux/proc_fs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/proc_fs.h 2011-11-16 18:40:31.000000000 -0500
-@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *pro
+diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
+index 643b96c..ef55a9c 100644
+--- a/include/linux/proc_fs.h
++++ b/include/linux/proc_fs.h
+@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode,
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
@@ -60916,10 +62451,11 @@ diff -urNp linux-3.1.4/include/linux/proc_fs.h linux-3.1.4/include/linux/proc_fs
struct ctl_table_header;
struct ctl_table;
-diff -urNp linux-3.1.4/include/linux/ptrace.h linux-3.1.4/include/linux/ptrace.h
---- linux-3.1.4/include/linux/ptrace.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/ptrace.h 2011-11-16 18:40:31.000000000 -0500
-@@ -129,10 +129,10 @@ extern void __ptrace_unlink(struct task_
+diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
+index 800f113..af90cc8 100644
+--- a/include/linux/ptrace.h
++++ b/include/linux/ptrace.h
+@@ -129,10 +129,10 @@ extern void __ptrace_unlink(struct task_struct *child);
extern void exit_ptrace(struct task_struct *tracer);
#define PTRACE_MODE_READ 1
#define PTRACE_MODE_ATTACH 2
@@ -60932,9 +62468,10 @@ diff -urNp linux-3.1.4/include/linux/ptrace.h linux-3.1.4/include/linux/ptrace.h
static inline int ptrace_reparented(struct task_struct *child)
{
-diff -urNp linux-3.1.4/include/linux/random.h linux-3.1.4/include/linux/random.h
---- linux-3.1.4/include/linux/random.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/random.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/random.h b/include/linux/random.h
+index d13059f..2eaafaa 100644
+--- a/include/linux/random.h
++++ b/include/linux/random.h
@@ -69,12 +69,17 @@ void srandom32(u32 seed);
u32 prandom32(struct rnd_state *);
@@ -60954,10 +62491,11 @@ diff -urNp linux-3.1.4/include/linux/random.h linux-3.1.4/include/linux/random.h
}
/**
-diff -urNp linux-3.1.4/include/linux/reboot.h linux-3.1.4/include/linux/reboot.h
---- linux-3.1.4/include/linux/reboot.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/reboot.h 2011-11-16 18:39:08.000000000 -0500
-@@ -52,9 +52,9 @@ extern int unregister_reboot_notifier(st
+diff --git a/include/linux/reboot.h b/include/linux/reboot.h
+index e0879a7..a12f962 100644
+--- a/include/linux/reboot.h
++++ b/include/linux/reboot.h
+@@ -52,9 +52,9 @@ extern int unregister_reboot_notifier(struct notifier_block *);
* Architecture-specific implementations of sys_reboot commands.
*/
@@ -60970,7 +62508,7 @@ diff -urNp linux-3.1.4/include/linux/reboot.h linux-3.1.4/include/linux/reboot.h
extern void machine_shutdown(void);
struct pt_regs;
-@@ -65,9 +65,9 @@ extern void machine_crash_shutdown(struc
+@@ -65,9 +65,9 @@ extern void machine_crash_shutdown(struct pt_regs *);
*/
extern void kernel_restart_prepare(char *cmd);
@@ -60992,10 +62530,11 @@ diff -urNp linux-3.1.4/include/linux/reboot.h linux-3.1.4/include/linux/reboot.h
#include <asm/emergency-restart.h>
#endif
-diff -urNp linux-3.1.4/include/linux/reiserfs_fs.h linux-3.1.4/include/linux/reiserfs_fs.h
---- linux-3.1.4/include/linux/reiserfs_fs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/reiserfs_fs.h 2011-11-16 18:39:08.000000000 -0500
-@@ -1406,7 +1406,7 @@ static inline loff_t max_reiserfs_offset
+diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
+index 96d465f..b084e05 100644
+--- a/include/linux/reiserfs_fs.h
++++ b/include/linux/reiserfs_fs.h
+@@ -1406,7 +1406,7 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
#define REISERFS_USER_MEM 1 /* reiserfs user memory mode */
#define fs_generation(s) (REISERFS_SB(s)->s_generation_counter)
@@ -61004,9 +62543,10 @@ diff -urNp linux-3.1.4/include/linux/reiserfs_fs.h linux-3.1.4/include/linux/rei
#define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
#define __fs_changed(gen,s) (gen != get_generation (s))
#define fs_changed(gen,s) \
-diff -urNp linux-3.1.4/include/linux/reiserfs_fs_sb.h linux-3.1.4/include/linux/reiserfs_fs_sb.h
---- linux-3.1.4/include/linux/reiserfs_fs_sb.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/reiserfs_fs_sb.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
+index 52c83b6..18ed7eb 100644
+--- a/include/linux/reiserfs_fs_sb.h
++++ b/include/linux/reiserfs_fs_sb.h
@@ -386,7 +386,7 @@ struct reiserfs_sb_info {
/* Comment? -Hans */
wait_queue_head_t s_wait;
@@ -61016,9 +62556,10 @@ diff -urNp linux-3.1.4/include/linux/reiserfs_fs_sb.h linux-3.1.4/include/linux/
// tree gets re-balanced
unsigned long s_properties; /* File system properties. Currently holds
on-disk FS format */
-diff -urNp linux-3.1.4/include/linux/relay.h linux-3.1.4/include/linux/relay.h
---- linux-3.1.4/include/linux/relay.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/relay.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/relay.h b/include/linux/relay.h
+index 14a86bc..17d0700 100644
+--- a/include/linux/relay.h
++++ b/include/linux/relay.h
@@ -159,7 +159,7 @@ struct rchan_callbacks
* The callback should return 0 if successful, negative if not.
*/
@@ -61028,9 +62569,10 @@ diff -urNp linux-3.1.4/include/linux/relay.h linux-3.1.4/include/linux/relay.h
/*
* CONFIG_RELAY kernel API, kernel/relay.c
-diff -urNp linux-3.1.4/include/linux/rfkill.h linux-3.1.4/include/linux/rfkill.h
---- linux-3.1.4/include/linux/rfkill.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/rfkill.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
+index c6c6084..5bf1212 100644
+--- a/include/linux/rfkill.h
++++ b/include/linux/rfkill.h
@@ -147,6 +147,7 @@ struct rfkill_ops {
void (*query)(struct rfkill *rfkill, void *data);
int (*set_block)(void *data, bool blocked);
@@ -61039,10 +62581,11 @@ diff -urNp linux-3.1.4/include/linux/rfkill.h linux-3.1.4/include/linux/rfkill.h
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
/**
-diff -urNp linux-3.1.4/include/linux/rmap.h linux-3.1.4/include/linux/rmap.h
---- linux-3.1.4/include/linux/rmap.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/rmap.h 2011-11-16 18:39:08.000000000 -0500
-@@ -119,8 +119,8 @@ static inline void anon_vma_unlock(struc
+diff --git a/include/linux/rmap.h b/include/linux/rmap.h
+index 2148b12..519b820 100644
+--- a/include/linux/rmap.h
++++ b/include/linux/rmap.h
+@@ -119,8 +119,8 @@ static inline void anon_vma_unlock(struct anon_vma *anon_vma)
void anon_vma_init(void); /* create anon_vma_cachep */
int anon_vma_prepare(struct vm_area_struct *);
void unlink_anon_vmas(struct vm_area_struct *);
@@ -61053,9 +62596,10 @@ diff -urNp linux-3.1.4/include/linux/rmap.h linux-3.1.4/include/linux/rmap.h
void __anon_vma_link(struct vm_area_struct *);
static inline void anon_vma_merge(struct vm_area_struct *vma,
-diff -urNp linux-3.1.4/include/linux/sched.h linux-3.1.4/include/linux/sched.h
---- linux-3.1.4/include/linux/sched.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sched.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 41d0237..5a64056 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
@@ -100,6 +100,7 @@ struct bio_list;
struct fs_struct;
struct perf_event_context;
@@ -61260,7 +62804,7 @@ diff -urNp linux-3.1.4/include/linux/sched.h linux-3.1.4/include/linux/sched.h
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);
-@@ -2243,7 +2338,7 @@ extern void __cleanup_sighand(struct sig
+@@ -2243,7 +2338,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
extern void exit_itimers(struct signal_struct *);
extern void flush_itimer_signals(void);
@@ -61269,7 +62813,7 @@ diff -urNp linux-3.1.4/include/linux/sched.h linux-3.1.4/include/linux/sched.h
extern void daemonize(const char *, ...);
extern int allow_signal(int);
-@@ -2408,13 +2503,17 @@ static inline unsigned long *end_of_stac
+@@ -2408,13 +2503,17 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
#endif
@@ -61289,9 +62833,10 @@ diff -urNp linux-3.1.4/include/linux/sched.h linux-3.1.4/include/linux/sched.h
extern void thread_info_cache_init(void);
#ifdef CONFIG_DEBUG_STACK_USAGE
-diff -urNp linux-3.1.4/include/linux/screen_info.h linux-3.1.4/include/linux/screen_info.h
---- linux-3.1.4/include/linux/screen_info.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/screen_info.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
+index 899fbb4..1cb4138 100644
+--- a/include/linux/screen_info.h
++++ b/include/linux/screen_info.h
@@ -43,7 +43,8 @@ struct screen_info {
__u16 pages; /* 0x32 */
__u16 vesa_attributes; /* 0x34 */
@@ -61302,9 +62847,10 @@ diff -urNp linux-3.1.4/include/linux/screen_info.h linux-3.1.4/include/linux/scr
} __attribute__((packed));
#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */
-diff -urNp linux-3.1.4/include/linux/security.h linux-3.1.4/include/linux/security.h
---- linux-3.1.4/include/linux/security.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/security.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/security.h b/include/linux/security.h
+index ebd2a53..2d949ae 100644
+--- a/include/linux/security.h
++++ b/include/linux/security.h
@@ -36,6 +36,7 @@
#include <linux/key.h>
#include <linux/xfrm.h>
@@ -61313,9 +62859,10 @@ diff -urNp linux-3.1.4/include/linux/security.h linux-3.1.4/include/linux/securi
#include <net/flow.h>
/* Maximum number of letters for an LSM name string */
-diff -urNp linux-3.1.4/include/linux/seq_file.h linux-3.1.4/include/linux/seq_file.h
---- linux-3.1.4/include/linux/seq_file.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/seq_file.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
+index be720cd..a0e1b94 100644
+--- a/include/linux/seq_file.h
++++ b/include/linux/seq_file.h
@@ -33,6 +33,7 @@ struct seq_operations {
void * (*next) (struct seq_file *m, void *v, loff_t *pos);
int (*show) (struct seq_file *m, void *v);
@@ -61324,10 +62871,11 @@ diff -urNp linux-3.1.4/include/linux/seq_file.h linux-3.1.4/include/linux/seq_fi
#define SEQ_SKIP 1
-diff -urNp linux-3.1.4/include/linux/shm.h linux-3.1.4/include/linux/shm.h
---- linux-3.1.4/include/linux/shm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/shm.h 2011-11-16 18:59:58.000000000 -0500
-@@ -98,6 +98,10 @@ struct shmid_kernel /* private to the ke
+diff --git a/include/linux/shm.h b/include/linux/shm.h
+index 92808b8..c28cac4 100644
+--- a/include/linux/shm.h
++++ b/include/linux/shm.h
+@@ -98,6 +98,10 @@ struct shmid_kernel /* private to the kernel */
/* The task created the shm object. NULL if the task is dead. */
struct task_struct *shm_creator;
@@ -61338,10 +62886,11 @@ diff -urNp linux-3.1.4/include/linux/shm.h linux-3.1.4/include/linux/shm.h
};
/* shm_mode upper byte flags */
-diff -urNp linux-3.1.4/include/linux/skbuff.h linux-3.1.4/include/linux/skbuff.h
---- linux-3.1.4/include/linux/skbuff.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/skbuff.h 2011-11-16 18:39:08.000000000 -0500
-@@ -610,7 +610,7 @@ static inline struct skb_shared_hwtstamp
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
+index 0f96646..cfb757a 100644
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
+@@ -610,7 +610,7 @@ static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb)
*/
static inline int skb_queue_empty(const struct sk_buff_head *list)
{
@@ -61350,7 +62899,7 @@ diff -urNp linux-3.1.4/include/linux/skbuff.h linux-3.1.4/include/linux/skbuff.h
}
/**
-@@ -623,7 +623,7 @@ static inline int skb_queue_empty(const
+@@ -623,7 +623,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list)
static inline bool skb_queue_is_last(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
@@ -61359,7 +62908,7 @@ diff -urNp linux-3.1.4/include/linux/skbuff.h linux-3.1.4/include/linux/skbuff.h
}
/**
-@@ -636,7 +636,7 @@ static inline bool skb_queue_is_last(con
+@@ -636,7 +636,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
static inline bool skb_queue_is_first(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
@@ -61368,7 +62917,7 @@ diff -urNp linux-3.1.4/include/linux/skbuff.h linux-3.1.4/include/linux/skbuff.h
}
/**
-@@ -1458,7 +1458,7 @@ static inline int pskb_network_may_pull(
+@@ -1458,7 +1458,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
@@ -61377,27 +62926,10 @@ diff -urNp linux-3.1.4/include/linux/skbuff.h linux-3.1.4/include/linux/skbuff.h
#endif
extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
-diff -urNp linux-3.1.4/include/linux/slab_def.h linux-3.1.4/include/linux/slab_def.h
---- linux-3.1.4/include/linux/slab_def.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/slab_def.h 2011-11-16 18:39:08.000000000 -0500
-@@ -68,10 +68,10 @@ struct kmem_cache {
- unsigned long node_allocs;
- unsigned long node_frees;
- unsigned long node_overflow;
-- atomic_t allochit;
-- atomic_t allocmiss;
-- atomic_t freehit;
-- atomic_t freemiss;
-+ atomic_unchecked_t allochit;
-+ atomic_unchecked_t allocmiss;
-+ atomic_unchecked_t freehit;
-+ atomic_unchecked_t freemiss;
-
- /*
- * If debugging is enabled, then the allocator can add additional
-diff -urNp linux-3.1.4/include/linux/slab.h linux-3.1.4/include/linux/slab.h
---- linux-3.1.4/include/linux/slab.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/slab.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/slab.h b/include/linux/slab.h
+index 573c809..e84c132 100644
+--- a/include/linux/slab.h
++++ b/include/linux/slab.h
@@ -11,12 +11,20 @@
#include <linux/gfp.h>
@@ -61436,7 +62968,7 @@ diff -urNp linux-3.1.4/include/linux/slab.h linux-3.1.4/include/linux/slab.h
/*
* struct kmem_cache related prototypes
-@@ -161,6 +172,7 @@ void * __must_check krealloc(const void
+@@ -161,6 +172,7 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
void kfree(const void *);
void kzfree(const void *);
size_t ksize(const void *);
@@ -61444,7 +62976,7 @@ diff -urNp linux-3.1.4/include/linux/slab.h linux-3.1.4/include/linux/slab.h
/*
* Allocator specific definitions. These are mainly used to establish optimized
-@@ -353,4 +365,59 @@ static inline void *kzalloc_node(size_t
+@@ -353,4 +365,59 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
void __init kmem_cache_init_late(void);
@@ -61504,9 +63036,29 @@ diff -urNp linux-3.1.4/include/linux/slab.h linux-3.1.4/include/linux/slab.h
+})
+
#endif /* _LINUX_SLAB_H */
-diff -urNp linux-3.1.4/include/linux/slub_def.h linux-3.1.4/include/linux/slub_def.h
---- linux-3.1.4/include/linux/slub_def.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/slub_def.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
+index d00e0ba..1b3bf7b 100644
+--- a/include/linux/slab_def.h
++++ b/include/linux/slab_def.h
+@@ -68,10 +68,10 @@ struct kmem_cache {
+ unsigned long node_allocs;
+ unsigned long node_frees;
+ unsigned long node_overflow;
+- atomic_t allochit;
+- atomic_t allocmiss;
+- atomic_t freehit;
+- atomic_t freemiss;
++ atomic_unchecked_t allochit;
++ atomic_unchecked_t allocmiss;
++ atomic_unchecked_t freehit;
++ atomic_unchecked_t freemiss;
+
+ /*
+ * If debugging is enabled, then the allocator can add additional
+diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
+index f58d641..c56bf9c 100644
+--- a/include/linux/slub_def.h
++++ b/include/linux/slub_def.h
@@ -85,7 +85,7 @@ struct kmem_cache {
struct kmem_cache_order_objects max;
struct kmem_cache_order_objects min;
@@ -61516,7 +63068,7 @@ diff -urNp linux-3.1.4/include/linux/slub_def.h linux-3.1.4/include/linux/slub_d
void (*ctor)(void *);
int inuse; /* Offset to metadata */
int align; /* Alignment */
-@@ -211,7 +211,7 @@ static __always_inline struct kmem_cache
+@@ -211,7 +211,7 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size)
}
void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
@@ -61525,9 +63077,10 @@ diff -urNp linux-3.1.4/include/linux/slub_def.h linux-3.1.4/include/linux/slub_d
static __always_inline void *
kmalloc_order(size_t size, gfp_t flags, unsigned int order)
-diff -urNp linux-3.1.4/include/linux/sonet.h linux-3.1.4/include/linux/sonet.h
---- linux-3.1.4/include/linux/sonet.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sonet.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/sonet.h b/include/linux/sonet.h
+index de8832d..0147b46 100644
+--- a/include/linux/sonet.h
++++ b/include/linux/sonet.h
@@ -61,7 +61,7 @@ struct sonet_stats {
#include <linux/atomic.h>
@@ -61537,10 +63090,11 @@ diff -urNp linux-3.1.4/include/linux/sonet.h linux-3.1.4/include/linux/sonet.h
__SONET_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-3.1.4/include/linux/sunrpc/clnt.h linux-3.1.4/include/linux/sunrpc/clnt.h
---- linux-3.1.4/include/linux/sunrpc/clnt.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sunrpc/clnt.h 2011-11-16 18:39:08.000000000 -0500
-@@ -169,9 +169,9 @@ static inline unsigned short rpc_get_por
+diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
+index db7bcaf..1aca77e 100644
+--- a/include/linux/sunrpc/clnt.h
++++ b/include/linux/sunrpc/clnt.h
+@@ -169,9 +169,9 @@ static inline unsigned short rpc_get_port(const struct sockaddr *sap)
{
switch (sap->sa_family) {
case AF_INET:
@@ -61552,7 +63106,7 @@ diff -urNp linux-3.1.4/include/linux/sunrpc/clnt.h linux-3.1.4/include/linux/sun
}
return 0;
}
-@@ -204,7 +204,7 @@ static inline bool __rpc_cmp_addr4(const
+@@ -204,7 +204,7 @@ static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1,
static inline bool __rpc_copy_addr4(struct sockaddr *dst,
const struct sockaddr *src)
{
@@ -61561,7 +63115,7 @@ diff -urNp linux-3.1.4/include/linux/sunrpc/clnt.h linux-3.1.4/include/linux/sun
struct sockaddr_in *dsin = (struct sockaddr_in *) dst;
dsin->sin_family = ssin->sin_family;
-@@ -301,7 +301,7 @@ static inline u32 rpc_get_scope_id(const
+@@ -301,7 +301,7 @@ static inline u32 rpc_get_scope_id(const struct sockaddr *sa)
if (sa->sa_family != AF_INET6)
return 0;
@@ -61570,9 +63124,10 @@ diff -urNp linux-3.1.4/include/linux/sunrpc/clnt.h linux-3.1.4/include/linux/sun
}
#endif /* __KERNEL__ */
-diff -urNp linux-3.1.4/include/linux/sunrpc/sched.h linux-3.1.4/include/linux/sunrpc/sched.h
---- linux-3.1.4/include/linux/sunrpc/sched.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sunrpc/sched.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
+index e775689..9e206d9 100644
+--- a/include/linux/sunrpc/sched.h
++++ b/include/linux/sunrpc/sched.h
@@ -105,6 +105,7 @@ struct rpc_call_ops {
void (*rpc_call_done)(struct rpc_task *, void *);
void (*rpc_release)(void *);
@@ -61581,9 +63136,10 @@ diff -urNp linux-3.1.4/include/linux/sunrpc/sched.h linux-3.1.4/include/linux/su
struct rpc_task_setup {
struct rpc_task *task;
-diff -urNp linux-3.1.4/include/linux/sunrpc/svc_rdma.h linux-3.1.4/include/linux/sunrpc/svc_rdma.h
---- linux-3.1.4/include/linux/sunrpc/svc_rdma.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sunrpc/svc_rdma.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
+index c14fe86..393245e 100644
+--- a/include/linux/sunrpc/svc_rdma.h
++++ b/include/linux/sunrpc/svc_rdma.h
@@ -53,15 +53,15 @@ extern unsigned int svcrdma_ord;
extern unsigned int svcrdma_max_requests;
extern unsigned int svcrdma_max_req_size;
@@ -61609,9 +63165,10 @@ diff -urNp linux-3.1.4/include/linux/sunrpc/svc_rdma.h linux-3.1.4/include/linux
#define RPCRDMA_VERSION 1
-diff -urNp linux-3.1.4/include/linux/sysctl.h linux-3.1.4/include/linux/sysctl.h
---- linux-3.1.4/include/linux/sysctl.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/sysctl.h 2011-11-16 18:40:31.000000000 -0500
+diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
+index 11684d9..0d245eb 100644
+--- a/include/linux/sysctl.h
++++ b/include/linux/sysctl.h
@@ -155,7 +155,11 @@ enum
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
};
@@ -61625,7 +63182,7 @@ diff -urNp linux-3.1.4/include/linux/sysctl.h linux-3.1.4/include/linux/sysctl.h
/* CTL_VM names: */
enum
-@@ -967,6 +971,8 @@ typedef int proc_handler (struct ctl_tab
+@@ -967,6 +971,8 @@ typedef int proc_handler (struct ctl_table *ctl, int write,
extern int proc_dostring(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
@@ -61634,9 +63191,10 @@ diff -urNp linux-3.1.4/include/linux/sysctl.h linux-3.1.4/include/linux/sysctl.h
extern int proc_dointvec(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
extern int proc_dointvec_minmax(struct ctl_table *, int,
-diff -urNp linux-3.1.4/include/linux/tty_ldisc.h linux-3.1.4/include/linux/tty_ldisc.h
---- linux-3.1.4/include/linux/tty_ldisc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/tty_ldisc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
+index ff7dc08..893e1bd 100644
+--- a/include/linux/tty_ldisc.h
++++ b/include/linux/tty_ldisc.h
@@ -148,7 +148,7 @@ struct tty_ldisc_ops {
struct module *owner;
@@ -61646,9 +63204,10 @@ diff -urNp linux-3.1.4/include/linux/tty_ldisc.h linux-3.1.4/include/linux/tty_l
};
struct tty_ldisc {
-diff -urNp linux-3.1.4/include/linux/types.h linux-3.1.4/include/linux/types.h
---- linux-3.1.4/include/linux/types.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/types.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/types.h b/include/linux/types.h
+index 176da8c..e45e473 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
@@ -213,10 +213,26 @@ typedef struct {
int counter;
} atomic_t;
@@ -61676,10 +63235,11 @@ diff -urNp linux-3.1.4/include/linux/types.h linux-3.1.4/include/linux/types.h
#endif
struct list_head {
-diff -urNp linux-3.1.4/include/linux/uaccess.h linux-3.1.4/include/linux/uaccess.h
---- linux-3.1.4/include/linux/uaccess.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/uaccess.h 2011-11-16 18:39:08.000000000 -0500
-@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_
+diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
+index 5ca0951..ab496a5 100644
+--- a/include/linux/uaccess.h
++++ b/include/linux/uaccess.h
+@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_user_nocache(void *to,
long ret; \
mm_segment_t old_fs = get_fs(); \
\
@@ -61694,9 +63254,10 @@ diff -urNp linux-3.1.4/include/linux/uaccess.h linux-3.1.4/include/linux/uaccess
ret; \
})
-diff -urNp linux-3.1.4/include/linux/unaligned/access_ok.h linux-3.1.4/include/linux/unaligned/access_ok.h
---- linux-3.1.4/include/linux/unaligned/access_ok.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/unaligned/access_ok.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/linux/unaligned/access_ok.h b/include/linux/unaligned/access_ok.h
+index 99c1b4d..bb94261 100644
+--- a/include/linux/unaligned/access_ok.h
++++ b/include/linux/unaligned/access_ok.h
@@ -6,32 +6,32 @@
static inline u16 get_unaligned_le16(const void *p)
@@ -61736,9 +63297,10 @@ diff -urNp linux-3.1.4/include/linux/unaligned/access_ok.h linux-3.1.4/include/l
}
static inline void put_unaligned_le16(u16 val, void *p)
-diff -urNp linux-3.1.4/include/linux/vermagic.h linux-3.1.4/include/linux/vermagic.h
---- linux-3.1.4/include/linux/vermagic.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/vermagic.h 2011-11-16 18:54:54.000000000 -0500
+diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
+index cf97b5b..40ebc87 100644
+--- a/include/linux/vermagic.h
++++ b/include/linux/vermagic.h
@@ -26,9 +26,35 @@
#define MODULE_ARCH_VERMAGIC ""
#endif
@@ -61776,10 +63338,11 @@ diff -urNp linux-3.1.4/include/linux/vermagic.h linux-3.1.4/include/linux/vermag
+ MODULE_PAX_REFCOUNT MODULE_CONSTIFY_PLUGIN MODULE_STACKLEAK_PLUGIN \
+ MODULE_GRSEC
-diff -urNp linux-3.1.4/include/linux/vmalloc.h linux-3.1.4/include/linux/vmalloc.h
---- linux-3.1.4/include/linux/vmalloc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/vmalloc.h 2011-11-16 18:39:08.000000000 -0500
-@@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining
+diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
+index 687fb11..b342358 100644
+--- a/include/linux/vmalloc.h
++++ b/include/linux/vmalloc.h
+@@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */
#define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */
@@ -61791,7 +63354,7 @@ diff -urNp linux-3.1.4/include/linux/vmalloc.h linux-3.1.4/include/linux/vmalloc
/* bits [20..32] reserved for arch specific ioremap internals */
/*
-@@ -156,4 +161,103 @@ pcpu_free_vm_areas(struct vm_struct **vm
+@@ -156,4 +161,103 @@ pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms)
# endif
#endif
@@ -61895,10 +63458,11 @@ diff -urNp linux-3.1.4/include/linux/vmalloc.h linux-3.1.4/include/linux/vmalloc
+})
+
#endif /* _LINUX_VMALLOC_H */
-diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
---- linux-3.1.4/include/linux/vmstat.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/linux/vmstat.h 2011-11-16 18:39:08.000000000 -0500
-@@ -87,18 +87,18 @@ static inline void vm_events_fold_cpu(in
+diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
+index 65efb92..137adbb 100644
+--- a/include/linux/vmstat.h
++++ b/include/linux/vmstat.h
+@@ -87,18 +87,18 @@ static inline void vm_events_fold_cpu(int cpu)
/*
* Zone based page accounting with per cpu differentials.
*/
@@ -61921,7 +63485,7 @@ diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
#ifdef CONFIG_SMP
if (x < 0)
x = 0;
-@@ -109,7 +109,7 @@ static inline unsigned long global_page_
+@@ -109,7 +109,7 @@ static inline unsigned long global_page_state(enum zone_stat_item item)
static inline unsigned long zone_page_state(struct zone *zone,
enum zone_stat_item item)
{
@@ -61930,7 +63494,7 @@ diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
#ifdef CONFIG_SMP
if (x < 0)
x = 0;
-@@ -126,7 +126,7 @@ static inline unsigned long zone_page_st
+@@ -126,7 +126,7 @@ static inline unsigned long zone_page_state(struct zone *zone,
static inline unsigned long zone_page_state_snapshot(struct zone *zone,
enum zone_stat_item item)
{
@@ -61939,7 +63503,7 @@ diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
#ifdef CONFIG_SMP
int cpu;
-@@ -221,8 +221,8 @@ static inline void __mod_zone_page_state
+@@ -221,8 +221,8 @@ static inline void __mod_zone_page_state(struct zone *zone,
static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
@@ -61950,7 +63514,7 @@ diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
}
static inline void __inc_zone_page_state(struct page *page,
-@@ -233,8 +233,8 @@ static inline void __inc_zone_page_state
+@@ -233,8 +233,8 @@ static inline void __inc_zone_page_state(struct page *page,
static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
{
@@ -61961,9 +63525,10 @@ diff -urNp linux-3.1.4/include/linux/vmstat.h linux-3.1.4/include/linux/vmstat.h
}
static inline void __dec_zone_page_state(struct page *page,
-diff -urNp linux-3.1.4/include/media/saa7146_vv.h linux-3.1.4/include/media/saa7146_vv.h
---- linux-3.1.4/include/media/saa7146_vv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/media/saa7146_vv.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
+index 4aeff96..b378cdc 100644
+--- a/include/media/saa7146_vv.h
++++ b/include/media/saa7146_vv.h
@@ -163,7 +163,7 @@ struct saa7146_ext_vv
int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *);
@@ -61973,10 +63538,11 @@ diff -urNp linux-3.1.4/include/media/saa7146_vv.h linux-3.1.4/include/media/saa7
/* pointer to the saa7146 core ops */
const struct v4l2_ioctl_ops *core_ops;
-diff -urNp linux-3.1.4/include/media/v4l2-dev.h linux-3.1.4/include/media/v4l2-dev.h
---- linux-3.1.4/include/media/v4l2-dev.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/media/v4l2-dev.h 2011-11-16 18:39:08.000000000 -0500
-@@ -56,7 +56,7 @@ int v4l2_prio_check(struct v4l2_prio_sta
+diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
+index c7c40f1..4f01585 100644
+--- a/include/media/v4l2-dev.h
++++ b/include/media/v4l2-dev.h
+@@ -56,7 +56,7 @@ int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority local);
struct v4l2_file_operations {
@@ -61993,9 +63559,10 @@ diff -urNp linux-3.1.4/include/media/v4l2-dev.h linux-3.1.4/include/media/v4l2-d
/*
* Newer version of video_device, handled by videodev2.c
-diff -urNp linux-3.1.4/include/media/v4l2-ioctl.h linux-3.1.4/include/media/v4l2-ioctl.h
---- linux-3.1.4/include/media/v4l2-ioctl.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/media/v4l2-ioctl.h 2011-11-17 18:44:20.000000000 -0500
+diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
+index dd9f1e7..8c4dd86 100644
+--- a/include/media/v4l2-ioctl.h
++++ b/include/media/v4l2-ioctl.h
@@ -272,7 +272,7 @@ struct v4l2_ioctl_ops {
long (*vidioc_default) (struct file *file, void *fh,
bool valid_prio, int cmd, void *arg);
@@ -62005,9 +63572,10 @@ diff -urNp linux-3.1.4/include/media/v4l2-ioctl.h linux-3.1.4/include/media/v4l2
/* v4l debugging and diagnostics */
-diff -urNp linux-3.1.4/include/net/caif/caif_hsi.h linux-3.1.4/include/net/caif/caif_hsi.h
---- linux-3.1.4/include/net/caif/caif_hsi.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/caif/caif_hsi.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/caif/caif_hsi.h b/include/net/caif/caif_hsi.h
+index c5dedd8..a93b07b 100644
+--- a/include/net/caif/caif_hsi.h
++++ b/include/net/caif/caif_hsi.h
@@ -94,7 +94,7 @@ struct cfhsi_drv {
void (*rx_done_cb) (struct cfhsi_drv *drv);
void (*wake_up_cb) (struct cfhsi_drv *drv);
@@ -62017,9 +63585,10 @@ diff -urNp linux-3.1.4/include/net/caif/caif_hsi.h linux-3.1.4/include/net/caif/
/* Structure implemented by HSI device. */
struct cfhsi_dev {
-diff -urNp linux-3.1.4/include/net/caif/cfctrl.h linux-3.1.4/include/net/caif/cfctrl.h
---- linux-3.1.4/include/net/caif/cfctrl.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/caif/cfctrl.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/caif/cfctrl.h b/include/net/caif/cfctrl.h
+index 9e5425b..8136ffc 100644
+--- a/include/net/caif/cfctrl.h
++++ b/include/net/caif/cfctrl.h
@@ -52,7 +52,7 @@ struct cfctrl_rsp {
void (*radioset_rsp)(void);
void (*reject_rsp)(struct cflayer *layer, u8 linkid,
@@ -62040,10 +63609,11 @@ diff -urNp linux-3.1.4/include/net/caif/cfctrl.h linux-3.1.4/include/net/caif/cf
struct list_head list;
/* Protects from simultaneous access to first_req list */
spinlock_t info_list_lock;
-diff -urNp linux-3.1.4/include/net/flow.h linux-3.1.4/include/net/flow.h
---- linux-3.1.4/include/net/flow.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/flow.h 2011-11-16 18:39:08.000000000 -0500
-@@ -207,6 +207,6 @@ extern struct flow_cache_object *flow_ca
+diff --git a/include/net/flow.h b/include/net/flow.h
+index a094477..bc91db1 100644
+--- a/include/net/flow.h
++++ b/include/net/flow.h
+@@ -207,6 +207,6 @@ extern struct flow_cache_object *flow_cache_lookup(
u8 dir, flow_resolve_t resolver, void *ctx);
extern void flow_cache_flush(void);
@@ -62051,9 +63621,10 @@ diff -urNp linux-3.1.4/include/net/flow.h linux-3.1.4/include/net/flow.h
+extern atomic_unchecked_t flow_cache_genid;
#endif
-diff -urNp linux-3.1.4/include/net/inetpeer.h linux-3.1.4/include/net/inetpeer.h
---- linux-3.1.4/include/net/inetpeer.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/inetpeer.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
+index 78c83e6..db3518d 100644
+--- a/include/net/inetpeer.h
++++ b/include/net/inetpeer.h
@@ -47,8 +47,8 @@ struct inet_peer {
*/
union {
@@ -62065,7 +63636,7 @@ diff -urNp linux-3.1.4/include/net/inetpeer.h linux-3.1.4/include/net/inetpeer.h
__u32 tcp_ts;
__u32 tcp_ts_stamp;
};
-@@ -112,11 +112,11 @@ static inline int inet_getid(struct inet
+@@ -112,11 +112,11 @@ static inline int inet_getid(struct inet_peer *p, int more)
more++;
inet_peer_refcheck(p);
do {
@@ -62079,10 +63650,11 @@ diff -urNp linux-3.1.4/include/net/inetpeer.h linux-3.1.4/include/net/inetpeer.h
return new;
}
-diff -urNp linux-3.1.4/include/net/ip_fib.h linux-3.1.4/include/net/ip_fib.h
---- linux-3.1.4/include/net/ip_fib.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/ip_fib.h 2011-11-16 18:39:08.000000000 -0500
-@@ -146,7 +146,7 @@ extern __be32 fib_info_update_nh_saddr(s
+diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
+index 10422ef..662570f 100644
+--- a/include/net/ip_fib.h
++++ b/include/net/ip_fib.h
+@@ -146,7 +146,7 @@ extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
#define FIB_RES_SADDR(net, res) \
((FIB_RES_NH(res).nh_saddr_genid == \
@@ -62091,9 +63663,10 @@ diff -urNp linux-3.1.4/include/net/ip_fib.h linux-3.1.4/include/net/ip_fib.h
FIB_RES_NH(res).nh_saddr : \
fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))
#define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw)
-diff -urNp linux-3.1.4/include/net/ip_vs.h linux-3.1.4/include/net/ip_vs.h
---- linux-3.1.4/include/net/ip_vs.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/ip_vs.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
+index 8fa4430..05dd772 100644
+--- a/include/net/ip_vs.h
++++ b/include/net/ip_vs.h
@@ -509,7 +509,7 @@ struct ip_vs_conn {
struct ip_vs_conn *control; /* Master control connection */
atomic_t n_control; /* Number of controlled ones */
@@ -62112,9 +63685,10 @@ diff -urNp linux-3.1.4/include/net/ip_vs.h linux-3.1.4/include/net/ip_vs.h
atomic_t weight; /* server weight */
atomic_t refcnt; /* reference counter */
-diff -urNp linux-3.1.4/include/net/irda/ircomm_core.h linux-3.1.4/include/net/irda/ircomm_core.h
---- linux-3.1.4/include/net/irda/ircomm_core.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/irda/ircomm_core.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/irda/ircomm_core.h b/include/net/irda/ircomm_core.h
+index 69b610a..fe3962c 100644
+--- a/include/net/irda/ircomm_core.h
++++ b/include/net/irda/ircomm_core.h
@@ -51,7 +51,7 @@ typedef struct {
int (*connect_response)(struct ircomm_cb *, struct sk_buff *);
int (*disconnect_request)(struct ircomm_cb *, struct sk_buff *,
@@ -62124,9 +63698,10 @@ diff -urNp linux-3.1.4/include/net/irda/ircomm_core.h linux-3.1.4/include/net/ir
struct ircomm_cb {
irda_queue_t queue;
-diff -urNp linux-3.1.4/include/net/irda/ircomm_tty.h linux-3.1.4/include/net/irda/ircomm_tty.h
---- linux-3.1.4/include/net/irda/ircomm_tty.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/irda/ircomm_tty.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
+index 59ba38bc..d515662 100644
+--- a/include/net/irda/ircomm_tty.h
++++ b/include/net/irda/ircomm_tty.h
@@ -35,6 +35,7 @@
#include <linux/termios.h>
#include <linux/timer.h>
@@ -62146,9 +63721,10 @@ diff -urNp linux-3.1.4/include/net/irda/ircomm_tty.h linux-3.1.4/include/net/ird
/* Protect concurent access to :
* o self->open_count
-diff -urNp linux-3.1.4/include/net/iucv/af_iucv.h linux-3.1.4/include/net/iucv/af_iucv.h
---- linux-3.1.4/include/net/iucv/af_iucv.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/iucv/af_iucv.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
+index f82a1e8..82d81e8 100644
+--- a/include/net/iucv/af_iucv.h
++++ b/include/net/iucv/af_iucv.h
@@ -87,7 +87,7 @@ struct iucv_sock {
struct iucv_sock_list {
struct hlist_head head;
@@ -62158,9 +63734,10 @@ diff -urNp linux-3.1.4/include/net/iucv/af_iucv.h linux-3.1.4/include/net/iucv/a
};
unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
-diff -urNp linux-3.1.4/include/net/lapb.h linux-3.1.4/include/net/lapb.h
---- linux-3.1.4/include/net/lapb.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/lapb.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/lapb.h b/include/net/lapb.h
+index 96cb5dd..25e8d4f 100644
+--- a/include/net/lapb.h
++++ b/include/net/lapb.h
@@ -95,7 +95,7 @@ struct lapb_cb {
struct sk_buff_head write_queue;
struct sk_buff_head ack_queue;
@@ -62170,9 +63747,10 @@ diff -urNp linux-3.1.4/include/net/lapb.h linux-3.1.4/include/net/lapb.h
/* FRMR control information */
struct lapb_frame frmr_data;
-diff -urNp linux-3.1.4/include/net/neighbour.h linux-3.1.4/include/net/neighbour.h
---- linux-3.1.4/include/net/neighbour.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/neighbour.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/neighbour.h b/include/net/neighbour.h
+index 2720884..3aa5c25 100644
+--- a/include/net/neighbour.h
++++ b/include/net/neighbour.h
@@ -122,7 +122,7 @@ struct neigh_ops {
void (*error_report)(struct neighbour *, struct sk_buff *);
int (*output)(struct neighbour *, struct sk_buff *);
@@ -62182,10 +63760,11 @@ diff -urNp linux-3.1.4/include/net/neighbour.h linux-3.1.4/include/net/neighbour
struct pneigh_entry {
struct pneigh_entry *next;
-diff -urNp linux-3.1.4/include/net/netlink.h linux-3.1.4/include/net/netlink.h
---- linux-3.1.4/include/net/netlink.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/netlink.h 2011-11-16 18:39:08.000000000 -0500
-@@ -562,7 +562,7 @@ static inline void *nlmsg_get_pos(struct
+diff --git a/include/net/netlink.h b/include/net/netlink.h
+index 98c1854..d4add7b 100644
+--- a/include/net/netlink.h
++++ b/include/net/netlink.h
+@@ -562,7 +562,7 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb)
static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
{
if (mark)
@@ -62194,9 +63773,10 @@ diff -urNp linux-3.1.4/include/net/netlink.h linux-3.1.4/include/net/netlink.h
}
/**
-diff -urNp linux-3.1.4/include/net/netns/ipv4.h linux-3.1.4/include/net/netns/ipv4.h
---- linux-3.1.4/include/net/netns/ipv4.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/netns/ipv4.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
+index d786b4f..4c3dd41 100644
+--- a/include/net/netns/ipv4.h
++++ b/include/net/netns/ipv4.h
@@ -56,8 +56,8 @@ struct netns_ipv4 {
unsigned int sysctl_ping_group_range[2];
@@ -62208,9 +63788,10 @@ diff -urNp linux-3.1.4/include/net/netns/ipv4.h linux-3.1.4/include/net/netns/ip
#ifdef CONFIG_IP_MROUTE
#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
-diff -urNp linux-3.1.4/include/net/sctp/sctp.h linux-3.1.4/include/net/sctp/sctp.h
---- linux-3.1.4/include/net/sctp/sctp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/sctp/sctp.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
+index 6a72a58..e6a127d 100644
+--- a/include/net/sctp/sctp.h
++++ b/include/net/sctp/sctp.h
@@ -318,9 +318,9 @@ do { \
#else /* SCTP_DEBUG */
@@ -62224,9 +63805,10 @@ diff -urNp linux-3.1.4/include/net/sctp/sctp.h linux-3.1.4/include/net/sctp/sctp
#define SCTP_ENABLE_DEBUG
#define SCTP_DISABLE_DEBUG
#define SCTP_ASSERT(expr, str, func)
-diff -urNp linux-3.1.4/include/net/sock.h linux-3.1.4/include/net/sock.h
---- linux-3.1.4/include/net/sock.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/sock.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/sock.h b/include/net/sock.h
+index 8e4062f..77b041e 100644
+--- a/include/net/sock.h
++++ b/include/net/sock.h
@@ -278,7 +278,7 @@ struct sock {
#ifdef CONFIG_RPS
__u32 sk_rxhash;
@@ -62236,7 +63818,7 @@ diff -urNp linux-3.1.4/include/net/sock.h linux-3.1.4/include/net/sock.h
int sk_rcvbuf;
struct sk_filter __rcu *sk_filter;
-@@ -1391,7 +1391,7 @@ static inline void sk_nocaps_add(struct
+@@ -1391,7 +1391,7 @@ static inline void sk_nocaps_add(struct sock *sk, int flags)
}
static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
@@ -62245,9 +63827,10 @@ diff -urNp linux-3.1.4/include/net/sock.h linux-3.1.4/include/net/sock.h
int copy, int offset)
{
if (skb->ip_summed == CHECKSUM_NONE) {
-diff -urNp linux-3.1.4/include/net/tcp.h linux-3.1.4/include/net/tcp.h
---- linux-3.1.4/include/net/tcp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/tcp.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/tcp.h b/include/net/tcp.h
+index acc620a..f4d99c6 100644
+--- a/include/net/tcp.h
++++ b/include/net/tcp.h
@@ -1401,8 +1401,8 @@ enum tcp_seq_states {
struct tcp_seq_afinfo {
char *name;
@@ -62259,9 +63842,10 @@ diff -urNp linux-3.1.4/include/net/tcp.h linux-3.1.4/include/net/tcp.h
};
struct tcp_iter_state {
-diff -urNp linux-3.1.4/include/net/udp.h linux-3.1.4/include/net/udp.h
---- linux-3.1.4/include/net/udp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/udp.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/udp.h b/include/net/udp.h
+index 67ea6fc..e42aee8 100644
+--- a/include/net/udp.h
++++ b/include/net/udp.h
@@ -234,8 +234,8 @@ struct udp_seq_afinfo {
char *name;
sa_family_t family;
@@ -62273,9 +63857,10 @@ diff -urNp linux-3.1.4/include/net/udp.h linux-3.1.4/include/net/udp.h
};
struct udp_iter_state {
-diff -urNp linux-3.1.4/include/net/xfrm.h linux-3.1.4/include/net/xfrm.h
---- linux-3.1.4/include/net/xfrm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/net/xfrm.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/net/xfrm.h b/include/net/xfrm.h
+index b203e14..1df3991 100644
+--- a/include/net/xfrm.h
++++ b/include/net/xfrm.h
@@ -505,7 +505,7 @@ struct xfrm_policy {
struct timer_list timer;
@@ -62285,9 +63870,10 @@ diff -urNp linux-3.1.4/include/net/xfrm.h linux-3.1.4/include/net/xfrm.h
u32 priority;
u32 index;
struct xfrm_mark mark;
-diff -urNp linux-3.1.4/include/rdma/iw_cm.h linux-3.1.4/include/rdma/iw_cm.h
---- linux-3.1.4/include/rdma/iw_cm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/rdma/iw_cm.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
+index 2d0191c..a55797d 100644
+--- a/include/rdma/iw_cm.h
++++ b/include/rdma/iw_cm.h
@@ -120,7 +120,7 @@ struct iw_cm_verbs {
int backlog);
@@ -62297,9 +63883,10 @@ diff -urNp linux-3.1.4/include/rdma/iw_cm.h linux-3.1.4/include/rdma/iw_cm.h
/**
* iw_create_cm_id - Create an IW CM identifier.
-diff -urNp linux-3.1.4/include/scsi/libfc.h linux-3.1.4/include/scsi/libfc.h
---- linux-3.1.4/include/scsi/libfc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/scsi/libfc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
+index 7d96829..4ba78d3 100644
+--- a/include/scsi/libfc.h
++++ b/include/scsi/libfc.h
@@ -758,6 +758,7 @@ struct libfc_function_template {
*/
void (*disc_stop_final) (struct fc_lport *);
@@ -62317,9 +63904,10 @@ diff -urNp linux-3.1.4/include/scsi/libfc.h linux-3.1.4/include/scsi/libfc.h
u8 link_up;
u8 qfull;
enum fc_lport_state state;
-diff -urNp linux-3.1.4/include/scsi/scsi_device.h linux-3.1.4/include/scsi/scsi_device.h
---- linux-3.1.4/include/scsi/scsi_device.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/scsi/scsi_device.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
+index d371c3c..e228a8c 100644
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
@@ -161,9 +161,9 @@ struct scsi_device {
unsigned int max_device_blocked; /* what device_blocked counts down from */
#define SCSI_DEFAULT_DEVICE_BLOCKED 3
@@ -62333,9 +63921,10 @@ diff -urNp linux-3.1.4/include/scsi/scsi_device.h linux-3.1.4/include/scsi/scsi_
struct device sdev_gendev,
sdev_dev;
-diff -urNp linux-3.1.4/include/scsi/scsi_transport_fc.h linux-3.1.4/include/scsi/scsi_transport_fc.h
---- linux-3.1.4/include/scsi/scsi_transport_fc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/scsi/scsi_transport_fc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
+index 2a65167..91e01f8 100644
+--- a/include/scsi/scsi_transport_fc.h
++++ b/include/scsi/scsi_transport_fc.h
@@ -711,7 +711,7 @@ struct fc_function_template {
unsigned long show_host_system_hostname:1;
@@ -62345,9 +63934,10 @@ diff -urNp linux-3.1.4/include/scsi/scsi_transport_fc.h linux-3.1.4/include/scsi
/**
-diff -urNp linux-3.1.4/include/sound/ak4xxx-adda.h linux-3.1.4/include/sound/ak4xxx-adda.h
---- linux-3.1.4/include/sound/ak4xxx-adda.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/ak4xxx-adda.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
+index 030b87c..98a6954 100644
+--- a/include/sound/ak4xxx-adda.h
++++ b/include/sound/ak4xxx-adda.h
@@ -35,7 +35,7 @@ struct snd_ak4xxx_ops {
void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg,
unsigned char val);
@@ -62357,9 +63947,10 @@ diff -urNp linux-3.1.4/include/sound/ak4xxx-adda.h linux-3.1.4/include/sound/ak4
#define AK4XXX_IMAGE_SIZE (AK4XXX_MAX_CHIPS * 16) /* 64 bytes */
-diff -urNp linux-3.1.4/include/sound/hwdep.h linux-3.1.4/include/sound/hwdep.h
---- linux-3.1.4/include/sound/hwdep.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/hwdep.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
+index 8c05e47..2b5df97 100644
+--- a/include/sound/hwdep.h
++++ b/include/sound/hwdep.h
@@ -49,7 +49,7 @@ struct snd_hwdep_ops {
struct snd_hwdep_dsp_status *status);
int (*dsp_load)(struct snd_hwdep *hw,
@@ -62369,9 +63960,10 @@ diff -urNp linux-3.1.4/include/sound/hwdep.h linux-3.1.4/include/sound/hwdep.h
struct snd_hwdep {
struct snd_card *card;
-diff -urNp linux-3.1.4/include/sound/info.h linux-3.1.4/include/sound/info.h
---- linux-3.1.4/include/sound/info.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/info.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/info.h b/include/sound/info.h
+index 4e94cf1..76748b1 100644
+--- a/include/sound/info.h
++++ b/include/sound/info.h
@@ -44,7 +44,7 @@ struct snd_info_entry_text {
struct snd_info_buffer *buffer);
void (*write)(struct snd_info_entry *entry,
@@ -62381,9 +63973,10 @@ diff -urNp linux-3.1.4/include/sound/info.h linux-3.1.4/include/sound/info.h
struct snd_info_entry_ops {
int (*open)(struct snd_info_entry *entry,
-diff -urNp linux-3.1.4/include/sound/pcm.h linux-3.1.4/include/sound/pcm.h
---- linux-3.1.4/include/sound/pcm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/pcm.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/pcm.h b/include/sound/pcm.h
+index 57e71fa..a2c7534 100644
+--- a/include/sound/pcm.h
++++ b/include/sound/pcm.h
@@ -81,6 +81,7 @@ struct snd_pcm_ops {
int (*mmap)(struct snd_pcm_substream *substream, struct vm_area_struct *vma);
int (*ack)(struct snd_pcm_substream *substream);
@@ -62392,9 +63985,10 @@ diff -urNp linux-3.1.4/include/sound/pcm.h linux-3.1.4/include/sound/pcm.h
/*
*
-diff -urNp linux-3.1.4/include/sound/sb16_csp.h linux-3.1.4/include/sound/sb16_csp.h
---- linux-3.1.4/include/sound/sb16_csp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/sb16_csp.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h
+index af1b49e..a5d55a5 100644
+--- a/include/sound/sb16_csp.h
++++ b/include/sound/sb16_csp.h
@@ -146,7 +146,7 @@ struct snd_sb_csp_ops {
int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
int (*csp_stop) (struct snd_sb_csp * p);
@@ -62404,9 +63998,10 @@ diff -urNp linux-3.1.4/include/sound/sb16_csp.h linux-3.1.4/include/sound/sb16_c
/*
* CSP private data
-diff -urNp linux-3.1.4/include/sound/soc.h linux-3.1.4/include/sound/soc.h
---- linux-3.1.4/include/sound/soc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/soc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/soc.h b/include/sound/soc.h
+index aa19f5a..a5b8208 100644
+--- a/include/sound/soc.h
++++ b/include/sound/soc.h
@@ -676,7 +676,7 @@ struct snd_soc_platform_driver {
/* platform IO - used for platform DAPM */
unsigned int (*read)(struct snd_soc_platform *, unsigned int);
@@ -62416,9 +64011,10 @@ diff -urNp linux-3.1.4/include/sound/soc.h linux-3.1.4/include/sound/soc.h
struct snd_soc_platform {
const char *name;
-diff -urNp linux-3.1.4/include/sound/ymfpci.h linux-3.1.4/include/sound/ymfpci.h
---- linux-3.1.4/include/sound/ymfpci.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/sound/ymfpci.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
+index 444cd6b..3327cc5 100644
+--- a/include/sound/ymfpci.h
++++ b/include/sound/ymfpci.h
@@ -358,7 +358,7 @@ struct snd_ymfpci {
spinlock_t reg_lock;
spinlock_t voice_lock;
@@ -62428,9 +64024,10 @@ diff -urNp linux-3.1.4/include/sound/ymfpci.h linux-3.1.4/include/sound/ymfpci.h
struct snd_info_entry *proc_entry;
const struct firmware *dsp_microcode;
const struct firmware *controller_microcode;
-diff -urNp linux-3.1.4/include/target/target_core_base.h linux-3.1.4/include/target/target_core_base.h
---- linux-3.1.4/include/target/target_core_base.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/target/target_core_base.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
+index 2704065..e10f3ef 100644
+--- a/include/target/target_core_base.h
++++ b/include/target/target_core_base.h
@@ -356,7 +356,7 @@ struct t10_reservation_ops {
int (*t10_seq_non_holder)(struct se_cmd *, unsigned char *, u32);
int (*t10_pr_register)(struct se_cmd *);
@@ -62460,9 +64057,10 @@ diff -urNp linux-3.1.4/include/target/target_core_base.h linux-3.1.4/include/tar
atomic_t dev_tur_active;
atomic_t execute_tasks;
atomic_t dev_status_thr_count;
-diff -urNp linux-3.1.4/include/trace/events/irq.h linux-3.1.4/include/trace/events/irq.h
---- linux-3.1.4/include/trace/events/irq.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/trace/events/irq.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
+index 1c09820..7f5ec79 100644
+--- a/include/trace/events/irq.h
++++ b/include/trace/events/irq.h
@@ -36,7 +36,7 @@ struct softirq_action;
*/
TRACE_EVENT(irq_handler_entry,
@@ -62481,9 +64079,10 @@ diff -urNp linux-3.1.4/include/trace/events/irq.h linux-3.1.4/include/trace/even
TP_ARGS(irq, action, ret),
-diff -urNp linux-3.1.4/include/video/udlfb.h linux-3.1.4/include/video/udlfb.h
---- linux-3.1.4/include/video/udlfb.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/video/udlfb.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/video/udlfb.h b/include/video/udlfb.h
+index 69d485a..dd0bee7 100644
+--- a/include/video/udlfb.h
++++ b/include/video/udlfb.h
@@ -51,10 +51,10 @@ struct dlfb_data {
int base8;
u32 pseudo_palette[256];
@@ -62499,9 +64098,10 @@ diff -urNp linux-3.1.4/include/video/udlfb.h linux-3.1.4/include/video/udlfb.h
};
#define NR_USB_REQUEST_I2C_SUB_IO 0x02
-diff -urNp linux-3.1.4/include/video/uvesafb.h linux-3.1.4/include/video/uvesafb.h
---- linux-3.1.4/include/video/uvesafb.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/include/video/uvesafb.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/include/video/uvesafb.h b/include/video/uvesafb.h
+index 0993a22..32ba2fe 100644
+--- a/include/video/uvesafb.h
++++ b/include/video/uvesafb.h
@@ -177,6 +177,7 @@ struct uvesafb_par {
u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
u8 pmi_setpal; /* PMI for palette changes */
@@ -62510,10 +64110,24 @@ diff -urNp linux-3.1.4/include/video/uvesafb.h linux-3.1.4/include/video/uvesafb
void *pmi_start;
void *pmi_pal;
u8 *vbe_state_orig; /*
-diff -urNp linux-3.1.4/init/do_mounts.c linux-3.1.4/init/do_mounts.c
---- linux-3.1.4/init/do_mounts.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/do_mounts.c 2011-11-16 18:39:08.000000000 -0500
-@@ -287,11 +287,11 @@ static void __init get_fs_names(char *pa
+diff --git a/init/Kconfig b/init/Kconfig
+index d627783..693a9f3 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -1202,7 +1202,7 @@ config SLUB_DEBUG
+
+ config COMPAT_BRK
+ bool "Disable heap randomization"
+- default y
++ default n
+ help
+ Randomizing heap placement makes heap exploits harder, but it
+ also breaks ancient binaries (including anything libc5 based).
+diff --git a/init/do_mounts.c b/init/do_mounts.c
+index c0851a8..4f8977d 100644
+--- a/init/do_mounts.c
++++ b/init/do_mounts.c
+@@ -287,11 +287,11 @@ static void __init get_fs_names(char *page)
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
{
@@ -62527,7 +64141,7 @@ diff -urNp linux-3.1.4/init/do_mounts.c linux-3.1.4/init/do_mounts.c
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
printk(KERN_INFO
"VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
-@@ -383,18 +383,18 @@ void __init change_floppy(char *fmt, ...
+@@ -383,18 +383,18 @@ void __init change_floppy(char *fmt, ...)
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
@@ -62558,9 +64172,10 @@ diff -urNp linux-3.1.4/init/do_mounts.c linux-3.1.4/init/do_mounts.c
+ sys_mount((char __force_user *)".", (char __force_user *)"/", NULL, MS_MOVE, NULL);
+ sys_chroot((const char __force_user *)".");
}
-diff -urNp linux-3.1.4/init/do_mounts.h linux-3.1.4/init/do_mounts.h
---- linux-3.1.4/init/do_mounts.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/do_mounts.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/init/do_mounts.h b/init/do_mounts.h
+index f5b978a..69dbfe8 100644
+--- a/init/do_mounts.h
++++ b/init/do_mounts.h
@@ -15,15 +15,15 @@ extern int root_mountflags;
static inline int create_dev(char *name, dev_t dev)
@@ -62589,9 +64204,10 @@ diff -urNp linux-3.1.4/init/do_mounts.h linux-3.1.4/init/do_mounts.h
return 0;
if (!S_ISBLK(stat.st_mode))
return 0;
-diff -urNp linux-3.1.4/init/do_mounts_initrd.c linux-3.1.4/init/do_mounts_initrd.c
---- linux-3.1.4/init/do_mounts_initrd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/do_mounts_initrd.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
+index 3098a38..253064e 100644
+--- a/init/do_mounts_initrd.c
++++ b/init/do_mounts_initrd.c
@@ -44,13 +44,13 @@ static void __init handle_initrd(void)
create_dev("/dev/root.old", Root_RAM0);
/* mount initrd on rootfs' /root */
@@ -62666,9 +64282,10 @@ diff -urNp linux-3.1.4/init/do_mounts_initrd.c linux-3.1.4/init/do_mounts_initrd
+ sys_unlink((const char __force_user *)"/initrd.image");
return 0;
}
-diff -urNp linux-3.1.4/init/do_mounts_md.c linux-3.1.4/init/do_mounts_md.c
---- linux-3.1.4/init/do_mounts_md.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/do_mounts_md.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
+index 32c4799..c27ee74 100644
+--- a/init/do_mounts_md.c
++++ b/init/do_mounts_md.c
@@ -170,7 +170,7 @@ static void __init md_setup_drive(void)
partitioned ? "_d" : "", minor,
md_setup_args[ent].device_names);
@@ -62696,9 +64313,10 @@ diff -urNp linux-3.1.4/init/do_mounts_md.c linux-3.1.4/init/do_mounts_md.c
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
-diff -urNp linux-3.1.4/init/initramfs.c linux-3.1.4/init/initramfs.c
---- linux-3.1.4/init/initramfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/initramfs.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/init/initramfs.c b/init/initramfs.c
+index 2531811..040d4d4 100644
+--- a/init/initramfs.c
++++ b/init/initramfs.c
@@ -74,7 +74,7 @@ static void __init free_hash(void)
}
}
@@ -62726,7 +64344,7 @@ diff -urNp linux-3.1.4/init/initramfs.c linux-3.1.4/init/initramfs.c
}
return 0;
}
-@@ -280,11 +280,11 @@ static void __init clean_path(char *path
+@@ -280,11 +280,11 @@ static void __init clean_path(char *path, mode_t mode)
{
struct stat st;
@@ -62807,22 +64425,11 @@ diff -urNp linux-3.1.4/init/initramfs.c linux-3.1.4/init/initramfs.c
state = SkipIt;
next_state = Reset;
return 0;
-diff -urNp linux-3.1.4/init/Kconfig linux-3.1.4/init/Kconfig
---- linux-3.1.4/init/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/Kconfig 2011-11-16 18:39:08.000000000 -0500
-@@ -1202,7 +1202,7 @@ config SLUB_DEBUG
-
- config COMPAT_BRK
- bool "Disable heap randomization"
-- default y
-+ default n
- help
- Randomizing heap placement makes heap exploits harder, but it
- also breaks ancient binaries (including anything libc5 based).
-diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
---- linux-3.1.4/init/main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/init/main.c 2011-11-16 18:40:44.000000000 -0500
-@@ -96,6 +96,8 @@ static inline void mark_rodata_ro(void)
+diff --git a/init/main.c b/init/main.c
+index 03b408d..5777f59 100644
+--- a/init/main.c
++++ b/init/main.c
+@@ -96,6 +96,8 @@ static inline void mark_rodata_ro(void) { }
extern void tc_init(void);
#endif
@@ -62831,7 +64438,7 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
/*
* Debug helper: via this flag we know that we are in 'early bootup code'
* where only the boot processor is running with IRQ disabled. This means
-@@ -149,6 +151,49 @@ static int __init set_reset_devices(char
+@@ -149,6 +151,49 @@ static int __init set_reset_devices(char *str)
__setup("reset_devices", set_reset_devices);
@@ -62881,7 +64488,7 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
static const char *panic_later, *panic_param;
-@@ -678,6 +723,7 @@ int __init_or_module do_one_initcall(ini
+@@ -678,6 +723,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
{
int count = preempt_count();
int ret;
@@ -62889,7 +64496,7 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
if (initcall_debug)
ret = do_one_initcall_debug(fn);
-@@ -690,15 +736,15 @@ int __init_or_module do_one_initcall(ini
+@@ -690,15 +736,15 @@ int __init_or_module do_one_initcall(initcall_t fn)
sprintf(msgbuf, "error code %d ", ret);
if (preempt_count() != count) {
@@ -62909,7 +64516,7 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
}
return ret;
-@@ -817,7 +863,7 @@ static int __init kernel_init(void * unu
+@@ -817,7 +863,7 @@ static int __init kernel_init(void * unused)
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
@@ -62918,7 +64525,7 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
printk(KERN_WARNING "Warning: unable to open an initial console.\n");
(void) sys_dup(0);
-@@ -830,11 +876,13 @@ static int __init kernel_init(void * unu
+@@ -830,11 +876,13 @@ static int __init kernel_init(void * unused)
if (!ramdisk_execute_command)
ramdisk_execute_command = "/init";
@@ -62933,10 +64540,11 @@ diff -urNp linux-3.1.4/init/main.c linux-3.1.4/init/main.c
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
-diff -urNp linux-3.1.4/ipc/mqueue.c linux-3.1.4/ipc/mqueue.c
---- linux-3.1.4/ipc/mqueue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/ipc/mqueue.c 2011-11-16 18:40:44.000000000 -0500
-@@ -156,6 +156,7 @@ static struct inode *mqueue_get_inode(st
+diff --git a/ipc/mqueue.c b/ipc/mqueue.c
+index ed049ea..6442f7f 100644
+--- a/ipc/mqueue.c
++++ b/ipc/mqueue.c
+@@ -156,6 +156,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
mq_bytes = (mq_msg_tblsz +
(info->attr.mq_maxmsg * info->attr.mq_msgsize));
@@ -62944,10 +64552,11 @@ diff -urNp linux-3.1.4/ipc/mqueue.c linux-3.1.4/ipc/mqueue.c
spin_lock(&mq_lock);
if (u->mq_bytes + mq_bytes < u->mq_bytes ||
u->mq_bytes + mq_bytes > task_rlimit(p, RLIMIT_MSGQUEUE)) {
-diff -urNp linux-3.1.4/ipc/msg.c linux-3.1.4/ipc/msg.c
---- linux-3.1.4/ipc/msg.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/ipc/msg.c 2011-11-16 18:39:08.000000000 -0500
-@@ -309,18 +309,19 @@ static inline int msg_security(struct ke
+diff --git a/ipc/msg.c b/ipc/msg.c
+index 7385de2..a8180e0 100644
+--- a/ipc/msg.c
++++ b/ipc/msg.c
+@@ -309,18 +309,19 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
return security_msg_queue_associate(msq, msgflg);
}
@@ -62972,10 +64581,11 @@ diff -urNp linux-3.1.4/ipc/msg.c linux-3.1.4/ipc/msg.c
msg_params.key = key;
msg_params.flg = msgflg;
-diff -urNp linux-3.1.4/ipc/sem.c linux-3.1.4/ipc/sem.c
---- linux-3.1.4/ipc/sem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/ipc/sem.c 2011-11-16 18:40:44.000000000 -0500
-@@ -318,10 +318,15 @@ static inline int sem_more_checks(struct
+diff --git a/ipc/sem.c b/ipc/sem.c
+index c8e00f8..1135c4e 100644
+--- a/ipc/sem.c
++++ b/ipc/sem.c
+@@ -318,10 +318,15 @@ static inline int sem_more_checks(struct kern_ipc_perm *ipcp,
return 0;
}
@@ -62992,7 +64602,7 @@ diff -urNp linux-3.1.4/ipc/sem.c linux-3.1.4/ipc/sem.c
struct ipc_params sem_params;
ns = current->nsproxy->ipc_ns;
-@@ -329,10 +334,6 @@ SYSCALL_DEFINE3(semget, key_t, key, int,
+@@ -329,10 +334,6 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg)
if (nsems < 0 || nsems > ns->sc_semmsl)
return -EINVAL;
@@ -63003,7 +64613,7 @@ diff -urNp linux-3.1.4/ipc/sem.c linux-3.1.4/ipc/sem.c
sem_params.key = key;
sem_params.flg = semflg;
sem_params.u.nsems = nsems;
-@@ -848,6 +849,8 @@ static int semctl_main(struct ipc_namesp
+@@ -848,6 +849,8 @@ static int semctl_main(struct ipc_namespace *ns, int semid, int semnum,
int nsems;
struct list_head tasks;
@@ -63012,7 +64622,7 @@ diff -urNp linux-3.1.4/ipc/sem.c linux-3.1.4/ipc/sem.c
sma = sem_lock_check(ns, semid);
if (IS_ERR(sma))
return PTR_ERR(sma);
-@@ -1295,6 +1298,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid,
+@@ -1295,6 +1298,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
struct ipc_namespace *ns;
struct list_head tasks;
@@ -63021,10 +64631,11 @@ diff -urNp linux-3.1.4/ipc/sem.c linux-3.1.4/ipc/sem.c
ns = current->nsproxy->ipc_ns;
if (nsops < 1 || semid < 0)
-diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
---- linux-3.1.4/ipc/shm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/ipc/shm.c 2011-11-16 18:40:44.000000000 -0500
-@@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_name
+diff --git a/ipc/shm.c b/ipc/shm.c
+index 02ecf2c..c8f5627 100644
+--- a/ipc/shm.c
++++ b/ipc/shm.c
+@@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp);
static int sysvipc_shm_proc_show(struct seq_file *s, void *it);
#endif
@@ -63039,7 +64650,7 @@ diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
void shm_init_ns(struct ipc_namespace *ns)
{
ns->shm_ctlmax = SHMMAX;
-@@ -508,6 +516,14 @@ static int newseg(struct ipc_namespace *
+@@ -508,6 +516,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
shp->shm_lprid = 0;
shp->shm_atim = shp->shm_dtim = 0;
shp->shm_ctim = get_seconds();
@@ -63054,7 +64665,7 @@ diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
shp->shm_segsz = size;
shp->shm_nattch = 0;
shp->shm_file = file;
-@@ -559,18 +575,19 @@ static inline int shm_more_checks(struct
+@@ -559,18 +575,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
return 0;
}
@@ -63079,7 +64690,7 @@ diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
shm_params.key = key;
shm_params.flg = shmflg;
shm_params.u.size = size;
-@@ -870,8 +887,6 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int,
+@@ -870,8 +887,6 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
case SHM_LOCK:
case SHM_UNLOCK:
{
@@ -63088,7 +64699,7 @@ diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
lru_add_drain_all(); /* drain pagevecs to lru lists */
shp = shm_lock_check(ns, shmid);
-@@ -1004,9 +1019,21 @@ long do_shmat(int shmid, char __user *sh
+@@ -1004,9 +1019,21 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
if (err)
goto out_unlock;
@@ -63110,10 +64721,11 @@ diff -urNp linux-3.1.4/ipc/shm.c linux-3.1.4/ipc/shm.c
size = i_size_read(path.dentry->d_inode);
shm_unlock(shp);
-diff -urNp linux-3.1.4/kernel/acct.c linux-3.1.4/kernel/acct.c
---- linux-3.1.4/kernel/acct.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/acct.c 2011-11-16 18:39:08.000000000 -0500
-@@ -570,7 +570,7 @@ static void do_acct_process(struct bsd_a
+diff --git a/kernel/acct.c b/kernel/acct.c
+index fa7eb3d..7faf116 100644
+--- a/kernel/acct.c
++++ b/kernel/acct.c
+@@ -570,7 +570,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
*/
flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
@@ -63122,9 +64734,10 @@ diff -urNp linux-3.1.4/kernel/acct.c linux-3.1.4/kernel/acct.c
sizeof(acct_t), &file->f_pos);
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
-diff -urNp linux-3.1.4/kernel/audit.c linux-3.1.4/kernel/audit.c
---- linux-3.1.4/kernel/audit.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/audit.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/audit.c b/kernel/audit.c
+index 0a1355c..dca420f 100644
+--- a/kernel/audit.c
++++ b/kernel/audit.c
@@ -115,7 +115,7 @@ u32 audit_sig_sid = 0;
3) suppressed due to audit_rate_limit
4) suppressed due to audit_backlog_limit
@@ -63152,7 +64765,7 @@ diff -urNp linux-3.1.4/kernel/audit.c linux-3.1.4/kernel/audit.c
audit_rate_limit,
audit_backlog_limit);
audit_panic(message);
-@@ -689,7 +689,7 @@ static int audit_receive_msg(struct sk_b
+@@ -689,7 +689,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
status_set.pid = audit_pid;
status_set.rate_limit = audit_rate_limit;
status_set.backlog_limit = audit_backlog_limit;
@@ -63161,10 +64774,11 @@ diff -urNp linux-3.1.4/kernel/audit.c linux-3.1.4/kernel/audit.c
status_set.backlog = skb_queue_len(&audit_skb_queue);
audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_GET, 0, 0,
&status_set, sizeof(status_set));
-diff -urNp linux-3.1.4/kernel/auditsc.c linux-3.1.4/kernel/auditsc.c
---- linux-3.1.4/kernel/auditsc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/auditsc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2118,7 +2118,7 @@ int auditsc_get_stamp(struct audit_conte
+diff --git a/kernel/auditsc.c b/kernel/auditsc.c
+index ce4b054..8139ed7 100644
+--- a/kernel/auditsc.c
++++ b/kernel/auditsc.c
+@@ -2118,7 +2118,7 @@ int auditsc_get_stamp(struct audit_context *ctx,
}
/* global counter which is incremented every time something logs in */
@@ -63173,7 +64787,7 @@ diff -urNp linux-3.1.4/kernel/auditsc.c linux-3.1.4/kernel/auditsc.c
/**
* audit_set_loginuid - set a task's audit_context loginuid
-@@ -2131,7 +2131,7 @@ static atomic_t session_id = ATOMIC_INIT
+@@ -2131,7 +2131,7 @@ static atomic_t session_id = ATOMIC_INIT(0);
*/
int audit_set_loginuid(struct task_struct *task, uid_t loginuid)
{
@@ -63182,10 +64796,11 @@ diff -urNp linux-3.1.4/kernel/auditsc.c linux-3.1.4/kernel/auditsc.c
struct audit_context *context = task->audit_context;
if (context && context->in_syscall) {
-diff -urNp linux-3.1.4/kernel/capability.c linux-3.1.4/kernel/capability.c
---- linux-3.1.4/kernel/capability.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/capability.c 2011-11-16 18:40:44.000000000 -0500
-@@ -202,6 +202,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_
+diff --git a/kernel/capability.c b/kernel/capability.c
+index 283c529..36ac81e 100644
+--- a/kernel/capability.c
++++ b/kernel/capability.c
+@@ -202,6 +202,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr)
* before modification is attempted and the application
* fails.
*/
@@ -63195,7 +64810,7 @@ diff -urNp linux-3.1.4/kernel/capability.c linux-3.1.4/kernel/capability.c
if (copy_to_user(dataptr, kdata, tocopy
* sizeof(struct __user_cap_data_struct))) {
return -EFAULT;
-@@ -374,7 +377,7 @@ bool ns_capable(struct user_namespace *n
+@@ -374,7 +377,7 @@ bool ns_capable(struct user_namespace *ns, int cap)
BUG();
}
@@ -63204,7 +64819,7 @@ diff -urNp linux-3.1.4/kernel/capability.c linux-3.1.4/kernel/capability.c
current->flags |= PF_SUPERPRIV;
return true;
}
-@@ -382,6 +385,27 @@ bool ns_capable(struct user_namespace *n
+@@ -382,6 +385,27 @@ bool ns_capable(struct user_namespace *ns, int cap)
}
EXPORT_SYMBOL(ns_capable);
@@ -63232,7 +64847,7 @@ diff -urNp linux-3.1.4/kernel/capability.c linux-3.1.4/kernel/capability.c
/**
* task_ns_capable - Determine whether current task has a superior
* capability targeted at a specific task's user namespace.
-@@ -396,6 +420,12 @@ bool task_ns_capable(struct task_struct
+@@ -396,6 +420,12 @@ bool task_ns_capable(struct task_struct *t, int cap)
}
EXPORT_SYMBOL(task_ns_capable);
@@ -63245,9 +64860,10 @@ diff -urNp linux-3.1.4/kernel/capability.c linux-3.1.4/kernel/capability.c
/**
* nsown_capable - Check superior capability to one's own user_ns
* @cap: The capability in question
-diff -urNp linux-3.1.4/kernel/cgroup.c linux-3.1.4/kernel/cgroup.c
---- linux-3.1.4/kernel/cgroup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/cgroup.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/cgroup.c b/kernel/cgroup.c
+index 1d2b6ce..87bf267 100644
+--- a/kernel/cgroup.c
++++ b/kernel/cgroup.c
@@ -595,6 +595,8 @@ static struct css_set *find_css_set(
struct hlist_head *hhead;
struct cg_cgroup_link *link;
@@ -63257,9 +64873,10 @@ diff -urNp linux-3.1.4/kernel/cgroup.c linux-3.1.4/kernel/cgroup.c
/* First see if we already have a cgroup group that matches
* the desired set */
read_lock(&css_set_lock);
-diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
---- linux-3.1.4/kernel/compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/compat.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/compat.c b/kernel/compat.c
+index e2435ee..8e82199 100644
+--- a/kernel/compat.c
++++ b/kernel/compat.c
@@ -13,6 +13,7 @@
#include <linux/linkage.h>
@@ -63268,7 +64885,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/signal.h>
-@@ -167,7 +168,7 @@ static long compat_nanosleep_restart(str
+@@ -167,7 +168,7 @@ static long compat_nanosleep_restart(struct restart_block *restart)
mm_segment_t oldfs;
long ret;
@@ -63277,7 +64894,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = hrtimer_nanosleep_restart(restart);
-@@ -199,7 +200,7 @@ asmlinkage long compat_sys_nanosleep(str
+@@ -199,7 +200,7 @@ asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = hrtimer_nanosleep(&tu,
@@ -63286,7 +64903,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
HRTIMER_MODE_REL, CLOCK_MONOTONIC);
set_fs(oldfs);
-@@ -308,7 +309,7 @@ asmlinkage long compat_sys_sigpending(co
+@@ -308,7 +309,7 @@ asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set)
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -63295,7 +64912,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(old_fs);
if (ret == 0)
ret = put_user(s, set);
-@@ -331,8 +332,8 @@ asmlinkage long compat_sys_sigprocmask(i
+@@ -331,8 +332,8 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *set,
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_sigprocmask(how,
@@ -63306,7 +64923,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(old_fs);
if (ret == 0)
if (oset)
-@@ -369,7 +370,7 @@ asmlinkage long compat_sys_old_getrlimit
+@@ -369,7 +370,7 @@ asmlinkage long compat_sys_old_getrlimit(unsigned int resource,
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -63315,7 +64932,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(old_fs);
if (!ret) {
-@@ -441,7 +442,7 @@ asmlinkage long compat_sys_getrusage(int
+@@ -441,7 +442,7 @@ asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru)
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -63324,7 +64941,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(old_fs);
if (ret)
-@@ -468,8 +469,8 @@ compat_sys_wait4(compat_pid_t pid, compa
+@@ -468,8 +469,8 @@ compat_sys_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, int options,
set_fs (KERNEL_DS);
ret = sys_wait4(pid,
(stat_addr ?
@@ -63335,7 +64952,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs (old_fs);
if (ret > 0) {
-@@ -494,8 +495,8 @@ asmlinkage long compat_sys_waitid(int wh
+@@ -494,8 +495,8 @@ asmlinkage long compat_sys_waitid(int which, compat_pid_t pid,
memset(&info, 0, sizeof(info));
set_fs(KERNEL_DS);
@@ -63346,7 +64963,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(old_fs);
if ((ret < 0) || (info.si_signo == 0))
-@@ -625,8 +626,8 @@ long compat_sys_timer_settime(timer_t ti
+@@ -625,8 +626,8 @@ long compat_sys_timer_settime(timer_t timer_id, int flags,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_timer_settime(timer_id, flags,
@@ -63357,7 +64974,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
if (!err && old && put_compat_itimerspec(old, &oldts))
return -EFAULT;
-@@ -643,7 +644,7 @@ long compat_sys_timer_gettime(timer_t ti
+@@ -643,7 +644,7 @@ long compat_sys_timer_gettime(timer_t timer_id,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_timer_gettime(timer_id,
@@ -63366,7 +64983,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
if (!err && put_compat_itimerspec(setting, &ts))
return -EFAULT;
-@@ -662,7 +663,7 @@ long compat_sys_clock_settime(clockid_t
+@@ -662,7 +663,7 @@ long compat_sys_clock_settime(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_settime(which_clock,
@@ -63375,7 +64992,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
return err;
}
-@@ -677,7 +678,7 @@ long compat_sys_clock_gettime(clockid_t
+@@ -677,7 +678,7 @@ long compat_sys_clock_gettime(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_gettime(which_clock,
@@ -63384,7 +65001,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
if (!err && put_compat_timespec(&ts, tp))
return -EFAULT;
-@@ -697,7 +698,7 @@ long compat_sys_clock_adjtime(clockid_t
+@@ -697,7 +698,7 @@ long compat_sys_clock_adjtime(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -63393,7 +65010,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
err = compat_put_timex(utp, &txc);
-@@ -717,7 +718,7 @@ long compat_sys_clock_getres(clockid_t w
+@@ -717,7 +718,7 @@ long compat_sys_clock_getres(clockid_t which_clock,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_getres(which_clock,
@@ -63402,7 +65019,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
if (!err && tp && put_compat_timespec(&ts, tp))
return -EFAULT;
-@@ -729,9 +730,9 @@ static long compat_clock_nanosleep_resta
+@@ -729,9 +730,9 @@ static long compat_clock_nanosleep_restart(struct restart_block *restart)
long err;
mm_segment_t oldfs;
struct timespec tu;
@@ -63414,7 +65031,7 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
oldfs = get_fs();
set_fs(KERNEL_DS);
err = clock_nanosleep_restart(restart);
-@@ -763,8 +764,8 @@ long compat_sys_clock_nanosleep(clockid_
+@@ -763,8 +764,8 @@ long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_nanosleep(which_clock, flags,
@@ -63425,9 +65042,10 @@ diff -urNp linux-3.1.4/kernel/compat.c linux-3.1.4/kernel/compat.c
set_fs(oldfs);
if ((err == -ERESTART_RESTARTBLOCK) && rmtp &&
-diff -urNp linux-3.1.4/kernel/configs.c linux-3.1.4/kernel/configs.c
---- linux-3.1.4/kernel/configs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/configs.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/configs.c b/kernel/configs.c
+index 42e8fa0..9e7406b 100644
+--- a/kernel/configs.c
++++ b/kernel/configs.c
@@ -74,8 +74,19 @@ static int __init ikconfig_init(void)
struct proc_dir_entry *entry;
@@ -63448,10 +65066,11 @@ diff -urNp linux-3.1.4/kernel/configs.c linux-3.1.4/kernel/configs.c
if (!entry)
return -ENOMEM;
-diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
---- linux-3.1.4/kernel/cred.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/cred.c 2011-11-16 18:40:44.000000000 -0500
-@@ -158,6 +158,8 @@ static void put_cred_rcu(struct rcu_head
+diff --git a/kernel/cred.c b/kernel/cred.c
+index 8ef31f5..f63d997 100644
+--- a/kernel/cred.c
++++ b/kernel/cred.c
+@@ -158,6 +158,8 @@ static void put_cred_rcu(struct rcu_head *rcu)
*/
void __put_cred(struct cred *cred)
{
@@ -63469,7 +65088,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
kdebug("exit_creds(%u,%p,%p,{%d,%d})", tsk->pid, tsk->real_cred, tsk->cred,
atomic_read(&tsk->cred->usage),
read_cred_subscribers(tsk->cred));
-@@ -220,6 +224,8 @@ const struct cred *get_task_cred(struct
+@@ -220,6 +224,8 @@ const struct cred *get_task_cred(struct task_struct *task)
{
const struct cred *cred;
@@ -63505,7 +65124,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
#ifdef CONFIG_KEYS
tgcred = kmalloc(sizeof(*tgcred), GFP_KERNEL);
if (!tgcred)
-@@ -385,6 +397,8 @@ int copy_creds(struct task_struct *p, un
+@@ -385,6 +397,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
struct cred *new;
int ret;
@@ -63541,7 +65160,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
kdebug("abort_creds(%p{%d,%d})", new,
atomic_read(&new->usage),
read_cred_subscribers(new));
-@@ -572,6 +592,8 @@ const struct cred *override_creds(const
+@@ -572,6 +592,8 @@ const struct cred *override_creds(const struct cred *new)
{
const struct cred *old = current->cred;
@@ -63550,7 +65169,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
kdebug("override_creds(%p{%d,%d})", new,
atomic_read(&new->usage),
read_cred_subscribers(new));
-@@ -601,6 +623,8 @@ void revert_creds(const struct cred *old
+@@ -601,6 +623,8 @@ void revert_creds(const struct cred *old)
{
const struct cred *override = current->cred;
@@ -63559,7 +65178,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
kdebug("revert_creds(%p{%d,%d})", old,
atomic_read(&old->usage),
read_cred_subscribers(old));
-@@ -647,6 +671,8 @@ struct cred *prepare_kernel_cred(struct
+@@ -647,6 +671,8 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
const struct cred *old;
struct cred *new;
@@ -63577,7 +65196,7 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
return security_kernel_act_as(new, secid);
}
EXPORT_SYMBOL(set_security_override);
-@@ -720,6 +748,8 @@ int set_security_override_from_ctx(struc
+@@ -720,6 +748,8 @@ int set_security_override_from_ctx(struct cred *new, const char *secctx)
u32 secid;
int ret;
@@ -63586,10 +65205,11 @@ diff -urNp linux-3.1.4/kernel/cred.c linux-3.1.4/kernel/cred.c
ret = security_secctx_to_secid(secctx, strlen(secctx), &secid);
if (ret < 0)
return ret;
-diff -urNp linux-3.1.4/kernel/debug/debug_core.c linux-3.1.4/kernel/debug/debug_core.c
---- linux-3.1.4/kernel/debug/debug_core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/debug/debug_core.c 2011-11-16 18:39:08.000000000 -0500
-@@ -119,7 +119,7 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_loc
+diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
+index 0d7c087..01b8cef 100644
+--- a/kernel/debug/debug_core.c
++++ b/kernel/debug/debug_core.c
+@@ -119,7 +119,7 @@ static DEFINE_RAW_SPINLOCK(dbg_slave_lock);
*/
static atomic_t masters_in_kgdb;
static atomic_t slaves_in_kgdb;
@@ -63627,7 +65247,7 @@ diff -urNp linux-3.1.4/kernel/debug/debug_core.c linux-3.1.4/kernel/debug/debug_
if (kgdb_info[sstep_cpu].task)
kgdb_sstep_pid = kgdb_info[sstep_cpu].task->pid;
else
-@@ -834,18 +834,18 @@ static void kgdb_unregister_callbacks(vo
+@@ -834,18 +834,18 @@ static void kgdb_unregister_callbacks(void)
static void kgdb_tasklet_bpt(unsigned long ing)
{
kgdb_breakpoint();
@@ -63649,10 +65269,11 @@ diff -urNp linux-3.1.4/kernel/debug/debug_core.c linux-3.1.4/kernel/debug/debug_
tasklet_schedule(&kgdb_tasklet_breakpoint);
}
EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
-diff -urNp linux-3.1.4/kernel/debug/kdb/kdb_main.c linux-3.1.4/kernel/debug/kdb/kdb_main.c
---- linux-3.1.4/kernel/debug/kdb/kdb_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/debug/kdb/kdb_main.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1980,7 +1980,7 @@ static int kdb_lsmod(int argc, const cha
+diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
+index 63786e7..0780cac 100644
+--- a/kernel/debug/kdb/kdb_main.c
++++ b/kernel/debug/kdb/kdb_main.c
+@@ -1980,7 +1980,7 @@ static int kdb_lsmod(int argc, const char **argv)
list_for_each_entry(mod, kdb_modules, list) {
kdb_printf("%-20s%8u 0x%p ", mod->name,
@@ -63661,7 +65282,7 @@ diff -urNp linux-3.1.4/kernel/debug/kdb/kdb_main.c linux-3.1.4/kernel/debug/kdb/
#ifdef CONFIG_MODULE_UNLOAD
kdb_printf("%4d ", module_refcount(mod));
#endif
-@@ -1990,7 +1990,7 @@ static int kdb_lsmod(int argc, const cha
+@@ -1990,7 +1990,7 @@ static int kdb_lsmod(int argc, const char **argv)
kdb_printf(" (Loading)");
else
kdb_printf(" (Live)");
@@ -63670,10 +65291,11 @@ diff -urNp linux-3.1.4/kernel/debug/kdb/kdb_main.c linux-3.1.4/kernel/debug/kdb/
#ifdef CONFIG_MODULE_UNLOAD
{
-diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
---- linux-3.1.4/kernel/events/core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/events/core.c 2011-11-16 18:39:08.000000000 -0500
-@@ -172,7 +172,7 @@ int perf_proc_update_handler(struct ctl_
+diff --git a/kernel/events/core.c b/kernel/events/core.c
+index 0f85778..0d43716 100644
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -172,7 +172,7 @@ int perf_proc_update_handler(struct ctl_table *table, int write,
return 0;
}
@@ -63682,7 +65304,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
enum event_type_t event_type);
-@@ -2535,7 +2535,7 @@ static void __perf_event_read(void *info
+@@ -2535,7 +2535,7 @@ static void __perf_event_read(void *info)
static inline u64 perf_event_count(struct perf_event *event)
{
@@ -63691,7 +65313,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
}
static u64 perf_event_read(struct perf_event *event)
-@@ -3060,9 +3060,9 @@ u64 perf_event_read_value(struct perf_ev
+@@ -3060,9 +3060,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
mutex_lock(&event->child_mutex);
total += perf_event_read(event);
*enabled += event->total_time_enabled +
@@ -63703,7 +65325,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
list_for_each_entry(child, &event->child_list, child_list) {
total += perf_event_read(child);
-@@ -3448,10 +3448,10 @@ void perf_event_update_userpage(struct p
+@@ -3448,10 +3448,10 @@ void perf_event_update_userpage(struct perf_event *event)
userpg->offset -= local64_read(&event->hw.prev_count);
userpg->time_enabled = enabled +
@@ -63716,7 +65338,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
barrier();
++userpg->lock;
-@@ -3822,11 +3822,11 @@ static void perf_output_read_one(struct
+@@ -3822,11 +3822,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
values[n++] = perf_event_count(event);
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
values[n++] = enabled +
@@ -63730,7 +65352,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
}
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(event);
-@@ -4477,12 +4477,12 @@ static void perf_event_mmap_event(struct
+@@ -4477,12 +4477,12 @@ static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
* need to add enough zero bytes after the string to handle
* the 64bit alignment we do later.
*/
@@ -63745,7 +65367,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
if (IS_ERR(name)) {
name = strncpy(tmp, "//toolong", sizeof(tmp));
goto got_name;
-@@ -5833,7 +5833,7 @@ perf_event_alloc(struct perf_event_attr
+@@ -5833,7 +5833,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
event->parent = parent_event;
event->ns = get_pid_ns(current->nsproxy->pid_ns);
@@ -63754,7 +65376,7 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
event->state = PERF_EVENT_STATE_INACTIVE;
-@@ -6355,10 +6355,10 @@ static void sync_child_event(struct perf
+@@ -6355,10 +6355,10 @@ static void sync_child_event(struct perf_event *child_event,
/*
* Add back the child's count to the parent's count:
*/
@@ -63768,9 +65390,10 @@ diff -urNp linux-3.1.4/kernel/events/core.c linux-3.1.4/kernel/events/core.c
&parent_event->child_total_time_running);
/*
-diff -urNp linux-3.1.4/kernel/exit.c linux-3.1.4/kernel/exit.c
---- linux-3.1.4/kernel/exit.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/exit.c 2011-11-16 19:33:48.000000000 -0500
+diff --git a/kernel/exit.c b/kernel/exit.c
+index 2913b35..86c7364 100644
+--- a/kernel/exit.c
++++ b/kernel/exit.c
@@ -57,6 +57,10 @@
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
@@ -63782,7 +65405,7 @@ diff -urNp linux-3.1.4/kernel/exit.c linux-3.1.4/kernel/exit.c
static void exit_mm(struct task_struct * tsk);
static void __unhash_process(struct task_struct *p, bool group_dead)
-@@ -168,6 +172,10 @@ void release_task(struct task_struct * p
+@@ -168,6 +172,10 @@ void release_task(struct task_struct * p)
struct task_struct *leader;
int zap_leader;
repeat:
@@ -63870,10 +65493,11 @@ diff -urNp linux-3.1.4/kernel/exit.c linux-3.1.4/kernel/exit.c
exit_mm(tsk);
if (group_dead)
-diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
---- linux-3.1.4/kernel/fork.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/fork.c 2011-11-16 19:36:31.000000000 -0500
-@@ -285,7 +285,7 @@ static struct task_struct *dup_task_stru
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 8e6b6f4..9dccf00 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -285,7 +285,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
*stackend = STACK_END_MAGIC; /* for overflow detection */
#ifdef CONFIG_CC_STACKPROTECTOR
@@ -63962,7 +65586,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
down_write(&oldmm->mmap_sem);
flush_cache_dup_mm(oldmm);
-@@ -327,8 +391,8 @@ static int dup_mmap(struct mm_struct *mm
+@@ -327,8 +391,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
@@ -63973,7 +65597,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
mm->map_count = 0;
cpumask_clear(mm_cpumask(mm));
mm->mm_rb = RB_ROOT;
-@@ -344,8 +408,6 @@ static int dup_mmap(struct mm_struct *mm
+@@ -344,8 +408,6 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
prev = NULL;
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
@@ -63982,7 +65606,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
if (mpnt->vm_flags & VM_DONTCOPY) {
long pages = vma_pages(mpnt);
mm->total_vm -= pages;
-@@ -353,55 +415,13 @@ static int dup_mmap(struct mm_struct *mm
+@@ -353,55 +415,13 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
-pages);
continue;
}
@@ -64042,7 +65666,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
* Link in the new vma and copy the page table entries.
*/
*pprev = tmp;
-@@ -422,6 +442,31 @@ static int dup_mmap(struct mm_struct *mm
+@@ -422,6 +442,31 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
if (retval)
goto out;
}
@@ -64089,7 +65713,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
}
static inline int mm_alloc_pgd(struct mm_struct *mm)
-@@ -837,13 +874,14 @@ static int copy_fs(unsigned long clone_f
+@@ -837,13 +874,14 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
spin_unlock(&fs->lock);
return -EAGAIN;
}
@@ -64105,7 +65729,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
return 0;
}
-@@ -1105,6 +1143,9 @@ static struct task_struct *copy_process(
+@@ -1105,6 +1143,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
retval = -EAGAIN;
@@ -64115,7 +65739,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
if (atomic_read(&p->real_cred->user->processes) >=
task_rlimit(p, RLIMIT_NPROC)) {
if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
-@@ -1264,6 +1305,8 @@ static struct task_struct *copy_process(
+@@ -1264,6 +1305,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
if (clone_flags & CLONE_THREAD)
p->tgid = current->tgid;
@@ -64142,7 +65766,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
-@@ -1637,7 +1684,7 @@ static int unshare_fs(unsigned long unsh
+@@ -1637,7 +1684,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
return 0;
/* don't need lock here; in the worst case we'll do useless copy */
@@ -64151,7 +65775,7 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
return 0;
*new_fsp = copy_fs_struct(fs);
-@@ -1726,7 +1773,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
+@@ -1726,7 +1773,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
fs = current->fs;
spin_lock(&fs->lock);
current->fs = new_fs;
@@ -64161,9 +65785,10 @@ diff -urNp linux-3.1.4/kernel/fork.c linux-3.1.4/kernel/fork.c
new_fs = NULL;
else
new_fs = fs;
-diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
---- linux-3.1.4/kernel/futex.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/futex.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 11cbe05..9ff191b 100644
+--- a/kernel/futex.c
++++ b/kernel/futex.c
@@ -54,6 +54,7 @@
#include <linux/mount.h>
#include <linux/pagemap.h>
@@ -64172,7 +65797,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
#include <linux/signal.h>
#include <linux/module.h>
#include <linux/magic.h>
-@@ -238,6 +239,11 @@ get_futex_key(u32 __user *uaddr, int fsh
+@@ -238,6 +239,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
struct page *page, *page_head;
int err, ro = 0;
@@ -64184,7 +65809,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
/*
* The futex address must be "naturally" aligned.
*/
-@@ -1863,6 +1869,8 @@ static int futex_wait(u32 __user *uaddr,
+@@ -1863,6 +1869,8 @@ static int futex_wait(u32 __user *uaddr, unsigned int flags, u32 val,
struct futex_q q = futex_q_init;
int ret;
@@ -64193,7 +65818,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
if (!bitset)
return -EINVAL;
q.bitset = bitset;
-@@ -2259,6 +2267,8 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2259,6 +2267,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
struct futex_q q = futex_q_init;
int res, ret;
@@ -64202,7 +65827,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
if (!bitset)
return -EINVAL;
-@@ -2431,7 +2441,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2431,7 +2441,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pid,
{
struct robust_list_head __user *head;
unsigned long ret;
@@ -64212,7 +65837,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -2447,6 +2459,10 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2447,6 +2459,10 @@ SYSCALL_DEFINE3(get_robust_list, int, pid,
if (!p)
goto err_unlock;
ret = -EPERM;
@@ -64223,7 +65848,7 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
pcred = __task_cred(p);
/* If victim is in different user_ns, then uids are not
comparable, so we must have CAP_SYS_PTRACE */
-@@ -2461,6 +2477,7 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2461,6 +2477,7 @@ SYSCALL_DEFINE3(get_robust_list, int, pid,
!ns_capable(pcred->user->user_ns, CAP_SYS_PTRACE))
goto err_unlock;
ok:
@@ -64251,9 +65876,10 @@ diff -urNp linux-3.1.4/kernel/futex.c linux-3.1.4/kernel/futex.c
for (i = 0; i < ARRAY_SIZE(futex_queues); i++) {
plist_head_init(&futex_queues[i].chain);
-diff -urNp linux-3.1.4/kernel/futex_compat.c linux-3.1.4/kernel/futex_compat.c
---- linux-3.1.4/kernel/futex_compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/futex_compat.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
+index 5f9e689..03afa21 100644
+--- a/kernel/futex_compat.c
++++ b/kernel/futex_compat.c
@@ -10,6 +10,7 @@
#include <linux/compat.h>
#include <linux/nsproxy.h>
@@ -64262,7 +65888,7 @@ diff -urNp linux-3.1.4/kernel/futex_compat.c linux-3.1.4/kernel/futex_compat.c
#include <asm/uaccess.h>
-@@ -136,7 +137,10 @@ compat_sys_get_robust_list(int pid, comp
+@@ -136,7 +137,10 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
{
struct compat_robust_list_head __user *head;
unsigned long ret;
@@ -64274,7 +65900,7 @@ diff -urNp linux-3.1.4/kernel/futex_compat.c linux-3.1.4/kernel/futex_compat.c
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -152,6 +156,10 @@ compat_sys_get_robust_list(int pid, comp
+@@ -152,6 +156,10 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
if (!p)
goto err_unlock;
ret = -EPERM;
@@ -64285,7 +65911,7 @@ diff -urNp linux-3.1.4/kernel/futex_compat.c linux-3.1.4/kernel/futex_compat.c
pcred = __task_cred(p);
/* If victim is in different user_ns, then uids are not
comparable, so we must have CAP_SYS_PTRACE */
-@@ -166,6 +174,7 @@ compat_sys_get_robust_list(int pid, comp
+@@ -166,6 +174,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
!ns_capable(pcred->user->user_ns, CAP_SYS_PTRACE))
goto err_unlock;
ok:
@@ -64293,9 +65919,10 @@ diff -urNp linux-3.1.4/kernel/futex_compat.c linux-3.1.4/kernel/futex_compat.c
head = p->compat_robust_list;
rcu_read_unlock();
}
-diff -urNp linux-3.1.4/kernel/gcov/base.c linux-3.1.4/kernel/gcov/base.c
---- linux-3.1.4/kernel/gcov/base.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/gcov/base.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
+index 9b22d03..6295b62 100644
+--- a/kernel/gcov/base.c
++++ b/kernel/gcov/base.c
@@ -102,11 +102,6 @@ void gcov_enable_events(void)
}
@@ -64308,7 +65935,7 @@ diff -urNp linux-3.1.4/kernel/gcov/base.c linux-3.1.4/kernel/gcov/base.c
/* Update list and generate events when modules are unloaded. */
static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
void *data)
-@@ -121,7 +116,7 @@ static int gcov_module_notifier(struct n
+@@ -121,7 +116,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
prev = NULL;
/* Remove entries located in module from linked list. */
for (info = gcov_info_head; info; info = info->next) {
@@ -64317,9 +65944,10 @@ diff -urNp linux-3.1.4/kernel/gcov/base.c linux-3.1.4/kernel/gcov/base.c
if (prev)
prev->next = info->next;
else
-diff -urNp linux-3.1.4/kernel/hrtimer.c linux-3.1.4/kernel/hrtimer.c
---- linux-3.1.4/kernel/hrtimer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/hrtimer.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
+index a9205e3..1c6f5c0 100644
+--- a/kernel/hrtimer.c
++++ b/kernel/hrtimer.c
@@ -1391,7 +1391,7 @@ void hrtimer_peek_ahead_timers(void)
local_irq_restore(flags);
}
@@ -64329,10 +65957,11 @@ diff -urNp linux-3.1.4/kernel/hrtimer.c linux-3.1.4/kernel/hrtimer.c
{
hrtimer_peek_ahead_timers();
}
-diff -urNp linux-3.1.4/kernel/jump_label.c linux-3.1.4/kernel/jump_label.c
---- linux-3.1.4/kernel/jump_label.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/jump_label.c 2011-11-16 18:39:08.000000000 -0500
-@@ -55,7 +55,9 @@ jump_label_sort_entries(struct jump_entr
+diff --git a/kernel/jump_label.c b/kernel/jump_label.c
+index a8ce450..5519bce 100644
+--- a/kernel/jump_label.c
++++ b/kernel/jump_label.c
+@@ -55,7 +55,9 @@ jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
size = (((unsigned long)stop - (unsigned long)start)
/ sizeof(struct jump_entry));
@@ -64342,7 +65971,7 @@ diff -urNp linux-3.1.4/kernel/jump_label.c linux-3.1.4/kernel/jump_label.c
}
static void jump_label_update(struct jump_label_key *key, int enable);
-@@ -297,10 +299,12 @@ static void jump_label_invalidate_module
+@@ -297,10 +299,12 @@ static void jump_label_invalidate_module_init(struct module *mod)
struct jump_entry *iter_stop = iter_start + mod->num_jump_entries;
struct jump_entry *iter;
@@ -64355,9 +65984,10 @@ diff -urNp linux-3.1.4/kernel/jump_label.c linux-3.1.4/kernel/jump_label.c
}
static int
-diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
---- linux-3.1.4/kernel/kallsyms.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/kallsyms.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
+index 079f1d3..a407562 100644
+--- a/kernel/kallsyms.c
++++ b/kernel/kallsyms.c
@@ -11,6 +11,9 @@
* Changed the compression method from stem compression to "table lookup"
* compression (see scripts/kallsyms.c for a more complete description)
@@ -64368,7 +65998,7 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/init.h>
-@@ -53,12 +56,33 @@ extern const unsigned long kallsyms_mark
+@@ -53,12 +56,33 @@ extern const unsigned long kallsyms_markers[] __attribute__((weak));
static inline int is_kernel_inittext(unsigned long addr)
{
@@ -64402,7 +66032,7 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
static inline int is_kernel_text(unsigned long addr)
{
if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) ||
-@@ -69,13 +93,28 @@ static inline int is_kernel_text(unsigne
+@@ -69,13 +93,28 @@ static inline int is_kernel_text(unsigned long addr)
static inline int is_kernel(unsigned long addr)
{
@@ -64431,7 +66061,7 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
if (all_var)
return is_kernel(addr);
-@@ -454,7 +493,6 @@ static unsigned long get_ksymbol_core(st
+@@ -454,7 +493,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
{
@@ -64439,7 +66069,7 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
iter->nameoff = get_symbol_offset(new_pos);
iter->pos = new_pos;
}
-@@ -502,6 +540,11 @@ static int s_show(struct seq_file *m, vo
+@@ -502,6 +540,11 @@ static int s_show(struct seq_file *m, void *p)
{
struct kallsym_iter *iter = m->private;
@@ -64451,7 +66081,7 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
/* Some debugging symbols have no name. Ignore them. */
if (!iter->name[0])
return 0;
-@@ -540,7 +583,7 @@ static int kallsyms_open(struct inode *i
+@@ -540,7 +583,7 @@ static int kallsyms_open(struct inode *inode, struct file *file)
struct kallsym_iter *iter;
int ret;
@@ -64460,10 +66090,11 @@ diff -urNp linux-3.1.4/kernel/kallsyms.c linux-3.1.4/kernel/kallsyms.c
if (!iter)
return -ENOMEM;
reset_iter(iter, 0);
-diff -urNp linux-3.1.4/kernel/kexec.c linux-3.1.4/kernel/kexec.c
---- linux-3.1.4/kernel/kexec.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/kexec.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1033,7 +1033,8 @@ asmlinkage long compat_sys_kexec_load(un
+diff --git a/kernel/kexec.c b/kernel/kexec.c
+index 296fbc8..84cb857 100644
+--- a/kernel/kexec.c
++++ b/kernel/kexec.c
+@@ -1033,7 +1033,8 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry,
unsigned long flags)
{
struct compat_kexec_segment in;
@@ -64473,10 +66104,11 @@ diff -urNp linux-3.1.4/kernel/kexec.c linux-3.1.4/kernel/kexec.c
unsigned long i, result;
/* Don't allow clients that don't understand the native
-diff -urNp linux-3.1.4/kernel/kmod.c linux-3.1.4/kernel/kmod.c
---- linux-3.1.4/kernel/kmod.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/kmod.c 2011-11-16 18:40:44.000000000 -0500
-@@ -73,13 +73,12 @@ char modprobe_path[KMOD_PATH_LEN] = "/sb
+diff --git a/kernel/kmod.c b/kernel/kmod.c
+index a4bea97..7a1ae9a 100644
+--- a/kernel/kmod.c
++++ b/kernel/kmod.c
+@@ -73,13 +73,12 @@ char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe";
* If module auto-loading support is disabled then this function
* becomes a no-operation.
*/
@@ -64492,7 +66124,7 @@ diff -urNp linux-3.1.4/kernel/kmod.c linux-3.1.4/kernel/kmod.c
static char *envp[] = { "HOME=/",
"TERM=linux",
"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
-@@ -88,9 +87,7 @@ int __request_module(bool wait, const ch
+@@ -88,9 +87,7 @@ int __request_module(bool wait, const char *fmt, ...)
#define MAX_KMOD_CONCURRENT 50 /* Completely arbitrary value - KAO */
static int kmod_loop_msg;
@@ -64503,7 +66135,7 @@ diff -urNp linux-3.1.4/kernel/kmod.c linux-3.1.4/kernel/kmod.c
if (ret >= MODULE_NAME_LEN)
return -ENAMETOOLONG;
-@@ -98,6 +95,20 @@ int __request_module(bool wait, const ch
+@@ -98,6 +95,20 @@ int __request_module(bool wait, const char *fmt, ...)
if (ret)
return ret;
@@ -64524,7 +66156,7 @@ diff -urNp linux-3.1.4/kernel/kmod.c linux-3.1.4/kernel/kmod.c
/* If modprobe needs a service that is in a module, we get a recursive
* loop. Limit the number of running kmod threads to max_threads/2 or
* MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method
-@@ -133,6 +144,47 @@ int __request_module(bool wait, const ch
+@@ -133,6 +144,47 @@ int __request_module(bool wait, const char *fmt, ...)
atomic_dec(&kmod_concurrent);
return ret;
}
@@ -64581,10 +66213,11 @@ diff -urNp linux-3.1.4/kernel/kmod.c linux-3.1.4/kernel/kmod.c
/*
* If ret is 0, either ____call_usermodehelper failed and the
-diff -urNp linux-3.1.4/kernel/kprobes.c linux-3.1.4/kernel/kprobes.c
---- linux-3.1.4/kernel/kprobes.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/kprobes.c 2011-11-16 18:39:08.000000000 -0500
-@@ -185,7 +185,7 @@ static kprobe_opcode_t __kprobes *__get_
+diff --git a/kernel/kprobes.c b/kernel/kprobes.c
+index b30fd54..11821ec 100644
+--- a/kernel/kprobes.c
++++ b/kernel/kprobes.c
+@@ -185,7 +185,7 @@ static kprobe_opcode_t __kprobes *__get_insn_slot(struct kprobe_insn_cache *c)
* kernel image and loaded module images reside. This is required
* so x86_64 can correctly handle the %rip-relative fixups.
*/
@@ -64593,7 +66226,7 @@ diff -urNp linux-3.1.4/kernel/kprobes.c linux-3.1.4/kernel/kprobes.c
if (!kip->insns) {
kfree(kip);
return NULL;
-@@ -225,7 +225,7 @@ static int __kprobes collect_one_slot(st
+@@ -225,7 +225,7 @@ static int __kprobes collect_one_slot(struct kprobe_insn_page *kip, int idx)
*/
if (!list_is_singular(&kip->list)) {
list_del(&kip->list);
@@ -64611,7 +66244,7 @@ diff -urNp linux-3.1.4/kernel/kprobes.c linux-3.1.4/kernel/kprobes.c
const char *symbol_name;
void *addr;
struct kprobe_blackpoint *kb;
-@@ -2075,7 +2075,7 @@ static int __kprobes show_kprobe_addr(st
+@@ -2075,7 +2075,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
@@ -64620,9 +66253,10 @@ diff -urNp linux-3.1.4/kernel/kprobes.c linux-3.1.4/kernel/kprobes.c
head = &kprobe_table[i];
preempt_disable();
-diff -urNp linux-3.1.4/kernel/lockdep.c linux-3.1.4/kernel/lockdep.c
---- linux-3.1.4/kernel/lockdep.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/lockdep.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/lockdep.c b/kernel/lockdep.c
+index 91d67ce..ac259df 100644
+--- a/kernel/lockdep.c
++++ b/kernel/lockdep.c
@@ -583,6 +583,10 @@ static int static_obj(void *obj)
end = (unsigned long) &_end,
addr = (unsigned long) obj;
@@ -64634,7 +66268,7 @@ diff -urNp linux-3.1.4/kernel/lockdep.c linux-3.1.4/kernel/lockdep.c
/*
* static variable?
*/
-@@ -718,6 +722,7 @@ register_lock_class(struct lockdep_map *
+@@ -718,6 +722,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
if (!static_obj(lock->key)) {
debug_locks_off();
printk("INFO: trying to register non-static key.\n");
@@ -64642,7 +66276,7 @@ diff -urNp linux-3.1.4/kernel/lockdep.c linux-3.1.4/kernel/lockdep.c
printk("the code is fine but needs lockdep annotation.\n");
printk("turning off the locking correctness validator.\n");
dump_stack();
-@@ -2948,7 +2953,7 @@ static int __lock_acquire(struct lockdep
+@@ -2948,7 +2953,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
if (!class)
return 0;
}
@@ -64651,10 +66285,11 @@ diff -urNp linux-3.1.4/kernel/lockdep.c linux-3.1.4/kernel/lockdep.c
if (very_verbose(class)) {
printk("\nacquire class [%p] %s", class->key, class->name);
if (class->name_version > 1)
-diff -urNp linux-3.1.4/kernel/lockdep_proc.c linux-3.1.4/kernel/lockdep_proc.c
---- linux-3.1.4/kernel/lockdep_proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/lockdep_proc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, v
+diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
+index 71edd2f..e0542a5 100644
+--- a/kernel/lockdep_proc.c
++++ b/kernel/lockdep_proc.c
+@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, void *v)
static void print_name(struct seq_file *m, struct lock_class *class)
{
@@ -64663,9 +66298,10 @@ diff -urNp linux-3.1.4/kernel/lockdep_proc.c linux-3.1.4/kernel/lockdep_proc.c
const char *name = class->name;
if (!name) {
-diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
---- linux-3.1.4/kernel/module.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/module.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/kernel/module.c b/kernel/module.c
+index 04379f92..fba2faf 100644
+--- a/kernel/module.c
++++ b/kernel/module.c
@@ -58,6 +58,7 @@
#include <linux/jump_label.h>
#include <linux/pfn.h>
@@ -64674,7 +66310,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
#define CREATE_TRACE_POINTS
#include <trace/events/module.h>
-@@ -119,7 +120,8 @@ static BLOCKING_NOTIFIER_HEAD(module_not
+@@ -119,7 +120,8 @@ static BLOCKING_NOTIFIER_HEAD(module_notify_list);
/* Bounds of module allocation, for speeding __module_address.
* Protected by module_mutex. */
@@ -64684,7 +66320,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
int register_module_notifier(struct notifier_block * nb)
{
-@@ -284,7 +286,7 @@ bool each_symbol_section(bool (*fn)(cons
+@@ -284,7 +286,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
return true;
list_for_each_entry_rcu(mod, &modules, list) {
@@ -64693,7 +66329,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
NOT_GPL_ONLY, false },
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -306,7 +308,7 @@ bool each_symbol_section(bool (*fn)(cons
+@@ -306,7 +308,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
#endif
};
@@ -64702,7 +66338,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
return true;
}
return false;
-@@ -438,7 +440,7 @@ static inline void __percpu *mod_percpu(
+@@ -438,7 +440,7 @@ static inline void __percpu *mod_percpu(struct module *mod)
static int percpu_modalloc(struct module *mod,
unsigned long size, unsigned long align)
{
@@ -64720,7 +66356,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
static inline bool sect_empty(const Elf_Shdr *sect)
{
return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
-@@ -1649,21 +1651,21 @@ static void set_section_ro_nx(void *base
+@@ -1649,21 +1651,21 @@ static void set_section_ro_nx(void *base,
static void unset_module_core_ro_nx(struct module *mod)
{
@@ -64792,7 +66428,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
set_memory_ro);
}
}
-@@ -1748,16 +1750,19 @@ static void free_module(struct module *m
+@@ -1748,16 +1750,19 @@ static void free_module(struct module *mod)
/* This may be NULL, but that's OK */
unset_module_init_ro_nx(mod);
@@ -64815,7 +66451,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
#ifdef CONFIG_MPU
update_protections(current->mm);
-@@ -1826,10 +1831,31 @@ static int simplify_symbols(struct modul
+@@ -1826,10 +1831,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
unsigned int i;
int ret = 0;
const struct kernel_symbol *ksym;
@@ -64847,7 +66483,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
switch (sym[i].st_shndx) {
case SHN_COMMON:
/* We compiled with -fno-common. These are not
-@@ -1850,7 +1876,9 @@ static int simplify_symbols(struct modul
+@@ -1850,7 +1876,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
ksym = resolve_symbol_wait(mod, info, name);
/* Ok if resolved. */
if (ksym && !IS_ERR(ksym)) {
@@ -64857,7 +66493,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
break;
}
-@@ -1869,11 +1897,20 @@ static int simplify_symbols(struct modul
+@@ -1869,11 +1897,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
secbase = (unsigned long)mod_percpu(mod);
else
secbase = info->sechdrs[sym[i].st_shndx].sh_addr;
@@ -64878,7 +66514,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
return ret;
}
-@@ -1977,22 +2014,12 @@ static void layout_sections(struct modul
+@@ -1977,22 +2014,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
|| s->sh_entsize != ~0UL
|| strstarts(sname, ".init"))
continue;
@@ -64905,7 +66541,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
}
DEBUGP("Init section allocation order:\n");
-@@ -2006,23 +2033,13 @@ static void layout_sections(struct modul
+@@ -2006,23 +2033,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
|| s->sh_entsize != ~0UL
|| !strstarts(sname, ".init"))
continue;
@@ -64934,7 +66570,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
}
}
-@@ -2187,7 +2204,7 @@ static void layout_symtab(struct module
+@@ -2187,7 +2204,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
/* Put symbol section at end of init part of module. */
symsect->sh_flags |= SHF_ALLOC;
@@ -64943,7 +66579,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
info->index.sym) | INIT_OFFSET_MASK;
DEBUGP("\t%s\n", info->secstrings + symsect->sh_name);
-@@ -2204,19 +2221,19 @@ static void layout_symtab(struct module
+@@ -2204,19 +2221,19 @@ static void layout_symtab(struct module *mod, struct load_info *info)
}
/* Append room for core symbols at end of core part. */
@@ -64968,7 +66604,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
}
static void add_kallsyms(struct module *mod, const struct load_info *info)
-@@ -2232,11 +2249,13 @@ static void add_kallsyms(struct module *
+@@ -2232,11 +2249,13 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
/* Make sure we get permanent strtab: don't use info->strtab. */
mod->strtab = (void *)info->sechdrs[info->index.str].sh_addr;
@@ -64983,7 +66619,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
src = mod->symtab;
*dst = *src;
for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) {
-@@ -2249,10 +2268,12 @@ static void add_kallsyms(struct module *
+@@ -2249,10 +2268,12 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
}
mod->core_num_syms = ndst;
@@ -64997,7 +66633,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
}
#else
static inline void layout_symtab(struct module *mod, struct load_info *info)
-@@ -2286,17 +2307,33 @@ void * __weak module_alloc(unsigned long
+@@ -2286,17 +2307,33 @@ void * __weak module_alloc(unsigned long size)
return size == 0 ? NULL : vmalloc_exec(size);
}
@@ -65036,7 +66672,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
mutex_unlock(&module_mutex);
}
return ret;
-@@ -2474,8 +2511,14 @@ static struct module *setup_load_info(st
+@@ -2474,8 +2511,14 @@ static struct module *setup_load_info(struct load_info *info)
static int check_modinfo(struct module *mod, struct load_info *info)
{
const char *modmagic = get_modinfo(info, "vermagic");
@@ -65051,7 +66687,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* This is allowed: modprobe --force will invalidate it. */
if (!modmagic) {
err = try_to_force_load(mod, "bad vermagic");
-@@ -2495,7 +2538,7 @@ static int check_modinfo(struct module *
+@@ -2495,7 +2538,7 @@ static int check_modinfo(struct module *mod, struct load_info *info)
}
/* Set up license info based on the info section */
@@ -65060,7 +66696,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
return 0;
}
-@@ -2589,7 +2632,7 @@ static int move_module(struct module *mo
+@@ -2589,7 +2632,7 @@ static int move_module(struct module *mod, struct load_info *info)
void *ptr;
/* Do the allocs. */
@@ -65069,7 +66705,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/*
* The pointer to this block is stored in the module structure
* which is inside the block. Just mark it as not being a
-@@ -2599,23 +2642,50 @@ static int move_module(struct module *mo
+@@ -2599,23 +2642,50 @@ static int move_module(struct module *mod, struct load_info *info)
if (!ptr)
return -ENOMEM;
@@ -65128,7 +66764,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* Transfer each section which specifies SHF_ALLOC */
DEBUGP("final section addresses:\n");
-@@ -2626,16 +2696,45 @@ static int move_module(struct module *mo
+@@ -2626,16 +2696,45 @@ static int move_module(struct module *mod, struct load_info *info)
if (!(shdr->sh_flags & SHF_ALLOC))
continue;
@@ -65181,7 +66817,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
DEBUGP("\t0x%lx %s\n",
shdr->sh_addr, info->secstrings + shdr->sh_name);
}
-@@ -2686,12 +2785,12 @@ static void flush_module_icache(const st
+@@ -2686,12 +2785,12 @@ static void flush_module_icache(const struct module *mod)
* Do it before processing of module parameters, so the module
* can provide parameter accessor functions of its own.
*/
@@ -65200,7 +66836,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
set_fs(old_fs);
}
-@@ -2771,8 +2870,10 @@ static void module_deallocate(struct mod
+@@ -2771,8 +2870,10 @@ static void module_deallocate(struct module *mod, struct load_info *info)
{
kfree(info->strmap);
percpu_modfree(mod);
@@ -65213,7 +66849,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
}
int __weak module_finalize(const Elf_Ehdr *hdr,
-@@ -2836,9 +2937,38 @@ static struct module *load_module(void _
+@@ -2836,9 +2937,38 @@ static struct module *load_module(void __user *umod,
if (err)
goto free_unload;
@@ -65252,7 +66888,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* Fix up syms, so that st_value is a pointer to location. */
err = simplify_symbols(mod, &info);
if (err < 0)
-@@ -2854,13 +2984,6 @@ static struct module *load_module(void _
+@@ -2854,13 +2984,6 @@ static struct module *load_module(void __user *umod,
flush_module_icache(mod);
@@ -65266,7 +66902,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* Mark state as coming so strong_try_module_get() ignores us. */
mod->state = MODULE_STATE_COMING;
-@@ -2920,11 +3043,10 @@ static struct module *load_module(void _
+@@ -2920,11 +3043,10 @@ static struct module *load_module(void __user *umod,
unlock:
mutex_unlock(&module_mutex);
synchronize_sched();
@@ -65279,7 +66915,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
free_unload:
module_unload_free(mod);
free_module:
-@@ -2965,16 +3087,16 @@ SYSCALL_DEFINE3(init_module, void __user
+@@ -2965,16 +3087,16 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
MODULE_STATE_COMING, mod);
/* Set RO and NX regions for core */
@@ -65304,7 +66940,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
do_mod_ctors(mod);
/* Start the module */
-@@ -3020,11 +3142,12 @@ SYSCALL_DEFINE3(init_module, void __user
+@@ -3020,11 +3142,12 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
mod->strtab = mod->core_strtab;
#endif
unset_module_init_ro_nx(mod);
@@ -65322,7 +66958,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
mutex_unlock(&module_mutex);
return 0;
-@@ -3055,10 +3178,16 @@ static const char *get_ksymbol(struct mo
+@@ -3055,10 +3178,16 @@ static const char *get_ksymbol(struct module *mod,
unsigned long nextval;
/* At worse, next value is at end of module */
@@ -65342,7 +66978,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* Scan for closest preceding symbol, and next symbol. (ELF
starts real symbols at 1). */
-@@ -3304,7 +3433,7 @@ static int m_show(struct seq_file *m, vo
+@@ -3304,7 +3433,7 @@ static int m_show(struct seq_file *m, void *p)
char buf[8];
seq_printf(m, "%s %u",
@@ -65351,7 +66987,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
print_unload_info(m, mod);
/* Informative for users. */
-@@ -3313,7 +3442,7 @@ static int m_show(struct seq_file *m, vo
+@@ -3313,7 +3442,7 @@ static int m_show(struct seq_file *m, void *p)
mod->state == MODULE_STATE_COMING ? "Loading":
"Live");
/* Used by oprofile and other similar tools. */
@@ -65360,7 +66996,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
/* Taints info */
if (mod->taints)
-@@ -3349,7 +3478,17 @@ static const struct file_operations proc
+@@ -3349,7 +3478,17 @@ static const struct file_operations proc_modules_operations = {
static int __init proc_modules_init(void)
{
@@ -65378,7 +67014,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
return 0;
}
module_init(proc_modules_init);
-@@ -3408,12 +3547,12 @@ struct module *__module_address(unsigned
+@@ -3408,12 +3547,12 @@ struct module *__module_address(unsigned long addr)
{
struct module *mod;
@@ -65394,7 +67030,7 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
return mod;
return NULL;
}
-@@ -3447,11 +3586,20 @@ bool is_module_text_address(unsigned lon
+@@ -3447,11 +3586,20 @@ bool is_module_text_address(unsigned long addr)
*/
struct module *__module_text_address(unsigned long addr)
{
@@ -65418,41 +67054,11 @@ diff -urNp linux-3.1.4/kernel/module.c linux-3.1.4/kernel/module.c
mod = NULL;
}
return mod;
-diff -urNp linux-3.1.4/kernel/mutex.c linux-3.1.4/kernel/mutex.c
---- linux-3.1.4/kernel/mutex.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/mutex.c 2011-11-16 18:39:08.000000000 -0500
-@@ -198,7 +198,7 @@ __mutex_lock_common(struct mutex *lock,
- spin_lock_mutex(&lock->wait_lock, flags);
-
- debug_mutex_lock_common(lock, &waiter);
-- debug_mutex_add_waiter(lock, &waiter, task_thread_info(task));
-+ debug_mutex_add_waiter(lock, &waiter, task);
-
- /* add waiting tasks to the end of the waitqueue (FIFO): */
- list_add_tail(&waiter.list, &lock->wait_list);
-@@ -227,8 +227,7 @@ __mutex_lock_common(struct mutex *lock,
- * TASK_UNINTERRUPTIBLE case.)
- */
- if (unlikely(signal_pending_state(state, task))) {
-- mutex_remove_waiter(lock, &waiter,
-- task_thread_info(task));
-+ mutex_remove_waiter(lock, &waiter, task);
- mutex_release(&lock->dep_map, 1, ip);
- spin_unlock_mutex(&lock->wait_lock, flags);
-
-@@ -249,7 +248,7 @@ __mutex_lock_common(struct mutex *lock,
- done:
- lock_acquired(&lock->dep_map, ip);
- /* got the lock - rejoice! */
-- mutex_remove_waiter(lock, &waiter, current_thread_info());
-+ mutex_remove_waiter(lock, &waiter, task);
- mutex_set_owner(lock);
-
- /* set it to 0 if there are no waiters left: */
-diff -urNp linux-3.1.4/kernel/mutex-debug.c linux-3.1.4/kernel/mutex-debug.c
---- linux-3.1.4/kernel/mutex-debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/mutex-debug.c 2011-11-16 18:39:08.000000000 -0500
-@@ -49,21 +49,21 @@ void debug_mutex_free_waiter(struct mute
+diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c
+index 73da83a..fe46e99 100644
+--- a/kernel/mutex-debug.c
++++ b/kernel/mutex-debug.c
+@@ -49,21 +49,21 @@ void debug_mutex_free_waiter(struct mutex_waiter *waiter)
}
void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
@@ -65480,10 +67086,11 @@ diff -urNp linux-3.1.4/kernel/mutex-debug.c linux-3.1.4/kernel/mutex-debug.c
list_del_init(&waiter->list);
waiter->task = NULL;
-diff -urNp linux-3.1.4/kernel/mutex-debug.h linux-3.1.4/kernel/mutex-debug.h
---- linux-3.1.4/kernel/mutex-debug.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/mutex-debug.h 2011-11-16 18:39:08.000000000 -0500
-@@ -20,9 +20,9 @@ extern void debug_mutex_wake_waiter(stru
+diff --git a/kernel/mutex-debug.h b/kernel/mutex-debug.h
+index 0799fd3..d06ae3b 100644
+--- a/kernel/mutex-debug.h
++++ b/kernel/mutex-debug.h
+@@ -20,9 +20,9 @@ extern void debug_mutex_wake_waiter(struct mutex *lock,
extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);
extern void debug_mutex_add_waiter(struct mutex *lock,
struct mutex_waiter *waiter,
@@ -65495,10 +67102,43 @@ diff -urNp linux-3.1.4/kernel/mutex-debug.h linux-3.1.4/kernel/mutex-debug.h
extern void debug_mutex_unlock(struct mutex *lock);
extern void debug_mutex_init(struct mutex *lock, const char *name,
struct lock_class_key *key);
-diff -urNp linux-3.1.4/kernel/padata.c linux-3.1.4/kernel/padata.c
---- linux-3.1.4/kernel/padata.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/padata.c 2011-11-16 18:39:08.000000000 -0500
-@@ -132,10 +132,10 @@ int padata_do_parallel(struct padata_ins
+diff --git a/kernel/mutex.c b/kernel/mutex.c
+index d607ed5..58d0a52 100644
+--- a/kernel/mutex.c
++++ b/kernel/mutex.c
+@@ -198,7 +198,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ spin_lock_mutex(&lock->wait_lock, flags);
+
+ debug_mutex_lock_common(lock, &waiter);
+- debug_mutex_add_waiter(lock, &waiter, task_thread_info(task));
++ debug_mutex_add_waiter(lock, &waiter, task);
+
+ /* add waiting tasks to the end of the waitqueue (FIFO): */
+ list_add_tail(&waiter.list, &lock->wait_list);
+@@ -227,8 +227,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ * TASK_UNINTERRUPTIBLE case.)
+ */
+ if (unlikely(signal_pending_state(state, task))) {
+- mutex_remove_waiter(lock, &waiter,
+- task_thread_info(task));
++ mutex_remove_waiter(lock, &waiter, task);
+ mutex_release(&lock->dep_map, 1, ip);
+ spin_unlock_mutex(&lock->wait_lock, flags);
+
+@@ -249,7 +248,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+ done:
+ lock_acquired(&lock->dep_map, ip);
+ /* got the lock - rejoice! */
+- mutex_remove_waiter(lock, &waiter, current_thread_info());
++ mutex_remove_waiter(lock, &waiter, task);
+ mutex_set_owner(lock);
+
+ /* set it to 0 if there are no waiters left: */
+diff --git a/kernel/padata.c b/kernel/padata.c
+index b91941d..0871d60 100644
+--- a/kernel/padata.c
++++ b/kernel/padata.c
+@@ -132,10 +132,10 @@ int padata_do_parallel(struct padata_instance *pinst,
padata->pd = pd;
padata->cb_cpu = cb_cpu;
@@ -65512,7 +67152,7 @@ diff -urNp linux-3.1.4/kernel/padata.c linux-3.1.4/kernel/padata.c
target_cpu = padata_cpu_hash(padata);
queue = per_cpu_ptr(pd->pqueue, target_cpu);
-@@ -444,7 +444,7 @@ static struct parallel_data *padata_allo
+@@ -444,7 +444,7 @@ static struct parallel_data *padata_alloc_pd(struct padata_instance *pinst,
padata_init_pqueues(pd);
padata_init_squeues(pd);
setup_timer(&pd->timer, padata_reorder_timer, (unsigned long)pd);
@@ -65521,10 +67161,11 @@ diff -urNp linux-3.1.4/kernel/padata.c linux-3.1.4/kernel/padata.c
atomic_set(&pd->reorder_objects, 0);
atomic_set(&pd->refcnt, 0);
pd->pinst = pinst;
-diff -urNp linux-3.1.4/kernel/panic.c linux-3.1.4/kernel/panic.c
---- linux-3.1.4/kernel/panic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/panic.c 2011-11-16 18:40:44.000000000 -0500
-@@ -371,7 +371,7 @@ static void warn_slowpath_common(const c
+diff --git a/kernel/panic.c b/kernel/panic.c
+index d7bb697..9ef9f19 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -371,7 +371,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
const char *board;
printk(KERN_WARNING "------------[ cut here ]------------\n");
@@ -65543,9 +67184,10 @@ diff -urNp linux-3.1.4/kernel/panic.c linux-3.1.4/kernel/panic.c
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
-diff -urNp linux-3.1.4/kernel/pid.c linux-3.1.4/kernel/pid.c
---- linux-3.1.4/kernel/pid.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/pid.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/pid.c b/kernel/pid.c
+index e432057..a2b2ac5 100644
+--- a/kernel/pid.c
++++ b/kernel/pid.c
@@ -33,6 +33,7 @@
#include <linux/rculist.h>
#include <linux/bootmem.h>
@@ -65554,7 +67196,7 @@ diff -urNp linux-3.1.4/kernel/pid.c linux-3.1.4/kernel/pid.c
#include <linux/pid_namespace.h>
#include <linux/init_task.h>
#include <linux/syscalls.h>
-@@ -45,7 +46,7 @@ struct pid init_struct_pid = INIT_STRUCT
+@@ -45,7 +46,7 @@ struct pid init_struct_pid = INIT_STRUCT_PID;
int pid_max = PID_MAX_DEFAULT;
@@ -65580,7 +67222,7 @@ diff -urNp linux-3.1.4/kernel/pid.c linux-3.1.4/kernel/pid.c
}
struct task_struct *find_task_by_vpid(pid_t vnr)
-@@ -427,6 +435,12 @@ struct task_struct *find_task_by_vpid(pi
+@@ -427,6 +435,12 @@ struct task_struct *find_task_by_vpid(pid_t vnr)
return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
}
@@ -65593,9 +67235,10 @@ diff -urNp linux-3.1.4/kernel/pid.c linux-3.1.4/kernel/pid.c
struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
{
struct pid *pid;
-diff -urNp linux-3.1.4/kernel/posix-cpu-timers.c linux-3.1.4/kernel/posix-cpu-timers.c
---- linux-3.1.4/kernel/posix-cpu-timers.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/posix-cpu-timers.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
+index 640ded8..3dafb85 100644
+--- a/kernel/posix-cpu-timers.c
++++ b/kernel/posix-cpu-timers.c
@@ -6,6 +6,7 @@
#include <linux/posix-timers.h>
#include <linux/errno.h>
@@ -65621,9 +67264,10 @@ diff -urNp linux-3.1.4/kernel/posix-cpu-timers.c linux-3.1.4/kernel/posix-cpu-ti
.clock_getres = thread_cpu_clock_getres,
.clock_get = thread_cpu_clock_get,
.timer_create = thread_cpu_timer_create,
-diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
---- linux-3.1.4/kernel/posix-timers.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/posix-timers.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
+index 4556182..9335419 100644
+--- a/kernel/posix-timers.c
++++ b/kernel/posix-timers.c
@@ -43,6 +43,7 @@
#include <linux/idr.h>
#include <linux/posix-clock.h>
@@ -65641,7 +67285,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
/*
* These ones are defined below.
-@@ -227,7 +228,7 @@ static int posix_get_boottime(const cloc
+@@ -227,7 +228,7 @@ static int posix_get_boottime(const clockid_t which_clock, struct timespec *tp)
*/
static __init int init_posix_timers(void)
{
@@ -65650,7 +67294,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
.clock_getres = hrtimer_get_res,
.clock_get = posix_clock_realtime_get,
.clock_set = posix_clock_realtime_set,
-@@ -239,7 +240,7 @@ static __init int init_posix_timers(void
+@@ -239,7 +240,7 @@ static __init int init_posix_timers(void)
.timer_get = common_timer_get,
.timer_del = common_timer_del,
};
@@ -65659,7 +67303,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
.clock_getres = hrtimer_get_res,
.clock_get = posix_ktime_get_ts,
.nsleep = common_nsleep,
-@@ -249,19 +250,19 @@ static __init int init_posix_timers(void
+@@ -249,19 +250,19 @@ static __init int init_posix_timers(void)
.timer_get = common_timer_get,
.timer_del = common_timer_del,
};
@@ -65683,7 +67327,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
.clock_getres = hrtimer_get_res,
.clock_get = posix_get_boottime,
.nsleep = common_nsleep,
-@@ -272,6 +273,8 @@ static __init int init_posix_timers(void
+@@ -272,6 +273,8 @@ static __init int init_posix_timers(void)
.timer_del = common_timer_del,
};
@@ -65692,7 +67336,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
posix_timers_register_clock(CLOCK_REALTIME, &clock_realtime);
posix_timers_register_clock(CLOCK_MONOTONIC, &clock_monotonic);
posix_timers_register_clock(CLOCK_MONOTONIC_RAW, &clock_monotonic_raw);
-@@ -473,7 +476,7 @@ void posix_timers_register_clock(const c
+@@ -473,7 +476,7 @@ void posix_timers_register_clock(const clockid_t clock_id,
return;
}
@@ -65701,7 +67345,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
}
EXPORT_SYMBOL_GPL(posix_timers_register_clock);
-@@ -519,9 +522,9 @@ static struct k_clock *clockid_to_kclock
+@@ -519,9 +522,9 @@ static struct k_clock *clockid_to_kclock(const clockid_t id)
return (id & CLOCKFD_MASK) == CLOCKFD ?
&clock_posix_dynamic : &clock_posix_cpu;
@@ -65713,7 +67357,7 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
}
static int common_timer_create(struct k_itimer *new_timer)
-@@ -959,6 +962,13 @@ SYSCALL_DEFINE2(clock_settime, const clo
+@@ -959,6 +962,13 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
if (copy_from_user(&new_tp, tp, sizeof (*tp)))
return -EFAULT;
@@ -65727,10 +67371,11 @@ diff -urNp linux-3.1.4/kernel/posix-timers.c linux-3.1.4/kernel/posix-timers.c
return kc->clock_set(which_clock, &new_tp);
}
-diff -urNp linux-3.1.4/kernel/power/poweroff.c linux-3.1.4/kernel/power/poweroff.c
---- linux-3.1.4/kernel/power/poweroff.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/power/poweroff.c 2011-11-16 18:39:08.000000000 -0500
-@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof
+diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c
+index d523593..68197a4 100644
+--- a/kernel/power/poweroff.c
++++ b/kernel/power/poweroff.c
+@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_poweroff_op = {
.enable_mask = SYSRQ_ENABLE_BOOT,
};
@@ -65739,10 +67384,11 @@ diff -urNp linux-3.1.4/kernel/power/poweroff.c linux-3.1.4/kernel/power/poweroff
{
register_sysrq_key('o', &sysrq_poweroff_op);
return 0;
-diff -urNp linux-3.1.4/kernel/power/process.c linux-3.1.4/kernel/power/process.c
---- linux-3.1.4/kernel/power/process.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/power/process.c 2011-11-16 18:39:08.000000000 -0500
-@@ -41,6 +41,7 @@ static int try_to_freeze_tasks(bool sig_
+diff --git a/kernel/power/process.c b/kernel/power/process.c
+index 0cf3a27..5481be4 100644
+--- a/kernel/power/process.c
++++ b/kernel/power/process.c
+@@ -41,6 +41,7 @@ static int try_to_freeze_tasks(bool sig_only)
u64 elapsed_csecs64;
unsigned int elapsed_csecs;
bool wakeup = false;
@@ -65750,7 +67396,7 @@ diff -urNp linux-3.1.4/kernel/power/process.c linux-3.1.4/kernel/power/process.c
do_gettimeofday(&start);
-@@ -51,6 +52,8 @@ static int try_to_freeze_tasks(bool sig_
+@@ -51,6 +52,8 @@ static int try_to_freeze_tasks(bool sig_only)
while (true) {
todo = 0;
@@ -65759,7 +67405,7 @@ diff -urNp linux-3.1.4/kernel/power/process.c linux-3.1.4/kernel/power/process.c
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (frozen(p) || !freezable(p))
-@@ -71,9 +74,13 @@ static int try_to_freeze_tasks(bool sig_
+@@ -71,9 +74,13 @@ static int try_to_freeze_tasks(bool sig_only)
* try_to_stop() after schedule() in ptrace/signal
* stop sees TIF_FREEZE.
*/
@@ -65775,7 +67421,7 @@ diff -urNp linux-3.1.4/kernel/power/process.c linux-3.1.4/kernel/power/process.c
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
-@@ -82,7 +89,7 @@ static int try_to_freeze_tasks(bool sig_
+@@ -82,7 +89,7 @@ static int try_to_freeze_tasks(bool sig_only)
todo += wq_busy;
}
@@ -65784,10 +67430,11 @@ diff -urNp linux-3.1.4/kernel/power/process.c linux-3.1.4/kernel/power/process.c
break;
if (pm_wakeup_pending()) {
-diff -urNp linux-3.1.4/kernel/printk.c linux-3.1.4/kernel/printk.c
---- linux-3.1.4/kernel/printk.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/printk.c 2011-11-16 19:38:11.000000000 -0500
-@@ -313,6 +313,11 @@ static int check_syslog_permissions(int
+diff --git a/kernel/printk.c b/kernel/printk.c
+index 28a40d8..2411bec 100644
+--- a/kernel/printk.c
++++ b/kernel/printk.c
+@@ -313,6 +313,11 @@ static int check_syslog_permissions(int type, bool from_file)
if (from_file && type != SYSLOG_ACTION_OPEN)
return 0;
@@ -65799,9 +67446,10 @@ diff -urNp linux-3.1.4/kernel/printk.c linux-3.1.4/kernel/printk.c
if (syslog_action_restricted(type)) {
if (capable(CAP_SYSLOG))
return 0;
-diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
---- linux-3.1.4/kernel/profile.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/profile.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/profile.c b/kernel/profile.c
+index 961b389..c451353 100644
+--- a/kernel/profile.c
++++ b/kernel/profile.c
@@ -39,7 +39,7 @@ struct profile_hit {
/* Oprofile timer tick hook */
static int (*timer_hook)(struct pt_regs *) __read_mostly;
@@ -65820,7 +67468,7 @@ diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
hits[i].hits = hits[i].pc = 0;
}
}
-@@ -342,9 +342,9 @@ static void do_profile_hits(int type, vo
+@@ -342,9 +342,9 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
* Add the current hit(s) and flush the write-queue out
* to the global buffer:
*/
@@ -65832,7 +67480,7 @@ diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
hits[i].pc = hits[i].hits = 0;
}
out:
-@@ -419,7 +419,7 @@ static void do_profile_hits(int type, vo
+@@ -419,7 +419,7 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
{
unsigned long pc;
pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
@@ -65841,7 +67489,7 @@ diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
}
#endif /* !CONFIG_SMP */
-@@ -517,7 +517,7 @@ read_profile(struct file *file, char __u
+@@ -517,7 +517,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
return -EFAULT;
buf++; p++; count--; read++;
}
@@ -65850,7 +67498,7 @@ diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
if (copy_to_user(buf, (void *)pnt, count))
return -EFAULT;
read += count;
-@@ -548,7 +548,7 @@ static ssize_t write_profile(struct file
+@@ -548,7 +548,7 @@ static ssize_t write_profile(struct file *file, const char __user *buf,
}
#endif
profile_discard_flip_buffers();
@@ -65859,10 +67507,11 @@ diff -urNp linux-3.1.4/kernel/profile.c linux-3.1.4/kernel/profile.c
return count;
}
-diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
---- linux-3.1.4/kernel/ptrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/ptrace.c 2011-11-16 19:50:22.000000000 -0500
-@@ -161,7 +161,8 @@ int ptrace_check_attach(struct task_stru
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c
+index a70d2a5..cbd4b4f 100644
+--- a/kernel/ptrace.c
++++ b/kernel/ptrace.c
+@@ -161,7 +161,8 @@ int ptrace_check_attach(struct task_struct *child, bool ignore_state)
return ret;
}
@@ -65872,7 +67521,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
{
const struct cred *cred = current_cred(), *tcred;
-@@ -187,7 +188,8 @@ int __ptrace_may_access(struct task_stru
+@@ -187,7 +188,8 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
cred->gid == tcred->sgid &&
cred->gid == tcred->gid))
goto ok;
@@ -65893,7 +67542,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
return -EPERM;
return security_ptrace_access_check(task, mode);
-@@ -206,7 +210,16 @@ bool ptrace_may_access(struct task_struc
+@@ -206,7 +210,16 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
{
int err;
task_lock(task);
@@ -65911,7 +67560,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
task_unlock(task);
return !err;
}
-@@ -251,7 +264,7 @@ static int ptrace_attach(struct task_str
+@@ -251,7 +264,7 @@ static int ptrace_attach(struct task_struct *task, long request,
goto out;
task_lock(task);
@@ -65920,7 +67569,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
task_unlock(task);
if (retval)
goto unlock_creds;
-@@ -266,7 +279,7 @@ static int ptrace_attach(struct task_str
+@@ -266,7 +279,7 @@ static int ptrace_attach(struct task_struct *task, long request,
task->ptrace = PT_PTRACED;
if (seize)
task->ptrace |= PT_SEIZED;
@@ -65929,7 +67578,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
task->ptrace |= PT_PTRACE_CAP;
__ptrace_link(task, current);
-@@ -461,6 +474,8 @@ int ptrace_readdata(struct task_struct *
+@@ -461,6 +474,8 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
{
int copied = 0;
@@ -65938,7 +67587,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
while (len > 0) {
char buf[128];
int this_len, retval;
-@@ -472,7 +487,7 @@ int ptrace_readdata(struct task_struct *
+@@ -472,7 +487,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
break;
return -EIO;
}
@@ -65947,7 +67596,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
return -EFAULT;
copied += retval;
src += retval;
-@@ -486,6 +501,8 @@ int ptrace_writedata(struct task_struct
+@@ -486,6 +501,8 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
{
int copied = 0;
@@ -65956,7 +67605,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
while (len > 0) {
char buf[128];
int this_len, retval;
-@@ -669,10 +686,12 @@ int ptrace_request(struct task_struct *c
+@@ -669,10 +686,12 @@ int ptrace_request(struct task_struct *child, long request,
bool seized = child->ptrace & PT_SEIZED;
int ret = -EIO;
siginfo_t siginfo, *si;
@@ -65970,7 +67619,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
switch (request) {
case PTRACE_PEEKTEXT:
case PTRACE_PEEKDATA:
-@@ -871,14 +890,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l
+@@ -871,14 +890,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
goto out;
}
@@ -65993,7 +67642,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
goto out_put_task_struct;
}
-@@ -904,7 +930,7 @@ int generic_ptrace_peekdata(struct task_
+@@ -904,7 +930,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
if (copied != sizeof(tmp))
return -EIO;
@@ -66002,7 +67651,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
}
int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
-@@ -927,6 +953,8 @@ int compat_ptrace_request(struct task_st
+@@ -927,6 +953,8 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
siginfo_t siginfo;
int ret;
@@ -66011,7 +67660,7 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
switch (request) {
case PTRACE_PEEKTEXT:
case PTRACE_PEEKDATA:
-@@ -1014,14 +1042,21 @@ asmlinkage long compat_sys_ptrace(compat
+@@ -1014,14 +1042,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
goto out;
}
@@ -66034,10 +67683,11 @@ diff -urNp linux-3.1.4/kernel/ptrace.c linux-3.1.4/kernel/ptrace.c
goto out_put_task_struct;
}
-diff -urNp linux-3.1.4/kernel/rcutorture.c linux-3.1.4/kernel/rcutorture.c
---- linux-3.1.4/kernel/rcutorture.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rcutorture.c 2011-11-16 18:39:08.000000000 -0500
-@@ -138,12 +138,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_
+diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
+index 98f51b1..30b950c 100644
+--- a/kernel/rcutorture.c
++++ b/kernel/rcutorture.c
+@@ -138,12 +138,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_count) =
{ 0 };
static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], rcu_torture_batch) =
{ 0 };
@@ -66088,7 +67738,7 @@ diff -urNp linux-3.1.4/kernel/rcutorture.c linux-3.1.4/kernel/rcutorture.c
if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
rp->rtort_mbtest = 0;
rcu_torture_free(rp);
-@@ -407,7 +407,7 @@ static void rcu_sync_torture_deferred_fr
+@@ -407,7 +407,7 @@ static void rcu_sync_torture_deferred_free(struct rcu_torture *p)
i = rp->rtort_pipe_count;
if (i > RCU_TORTURE_PIPE_LEN)
i = RCU_TORTURE_PIPE_LEN;
@@ -66106,7 +67756,7 @@ diff -urNp linux-3.1.4/kernel/rcutorture.c linux-3.1.4/kernel/rcutorture.c
old_rp->rtort_pipe_count++;
cur_ops->deferred_free(old_rp);
}
-@@ -950,7 +950,7 @@ static void rcu_torture_timer(unsigned l
+@@ -950,7 +950,7 @@ static void rcu_torture_timer(unsigned long unused)
return;
}
if (p->rtort_mbtest == 0)
@@ -66197,9 +67847,10 @@ diff -urNp linux-3.1.4/kernel/rcutorture.c linux-3.1.4/kernel/rcutorture.c
for_each_possible_cpu(cpu) {
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
per_cpu(rcu_torture_count, cpu)[i] = 0;
-diff -urNp linux-3.1.4/kernel/rcutree.c linux-3.1.4/kernel/rcutree.c
---- linux-3.1.4/kernel/rcutree.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rcutree.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/rcutree.c b/kernel/rcutree.c
+index ba06207..85d8ba8 100644
+--- a/kernel/rcutree.c
++++ b/kernel/rcutree.c
@@ -356,9 +356,9 @@ void rcu_enter_nohz(void)
}
/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
@@ -66264,7 +67915,7 @@ diff -urNp linux-3.1.4/kernel/rcutree.c linux-3.1.4/kernel/rcutree.c
return 0;
}
-@@ -484,7 +484,7 @@ static int rcu_implicit_dynticks_qs(stru
+@@ -484,7 +484,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
unsigned long curr;
unsigned long snap;
@@ -66273,7 +67924,7 @@ diff -urNp linux-3.1.4/kernel/rcutree.c linux-3.1.4/kernel/rcutree.c
snap = (unsigned long)rdp->dynticks_snap;
/*
-@@ -1470,7 +1470,7 @@ __rcu_process_callbacks(struct rcu_state
+@@ -1470,7 +1470,7 @@ __rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
/*
* Do softirq processing for the current CPU.
*/
@@ -66282,9 +67933,10 @@ diff -urNp linux-3.1.4/kernel/rcutree.c linux-3.1.4/kernel/rcutree.c
{
__rcu_process_callbacks(&rcu_sched_state,
&__get_cpu_var(rcu_sched_data));
-diff -urNp linux-3.1.4/kernel/rcutree.h linux-3.1.4/kernel/rcutree.h
---- linux-3.1.4/kernel/rcutree.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rcutree.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/rcutree.h b/kernel/rcutree.h
+index 01b2ccd..4f5d80a 100644
+--- a/kernel/rcutree.h
++++ b/kernel/rcutree.h
@@ -86,7 +86,7 @@
struct rcu_dynticks {
int dynticks_nesting; /* Track irq/process nesting level. */
@@ -66294,9 +67946,10 @@ diff -urNp linux-3.1.4/kernel/rcutree.h linux-3.1.4/kernel/rcutree.h
};
/* RCU's kthread states for tracing. */
-diff -urNp linux-3.1.4/kernel/rcutree_plugin.h linux-3.1.4/kernel/rcutree_plugin.h
---- linux-3.1.4/kernel/rcutree_plugin.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rcutree_plugin.h 2011-12-02 17:38:47.000000000 -0500
+diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
+index 8aafbb8..2fca109 100644
+--- a/kernel/rcutree_plugin.h
++++ b/kernel/rcutree_plugin.h
@@ -822,7 +822,7 @@ void synchronize_rcu_expedited(void)
/* Clean up and exit. */
@@ -66306,7 +67959,7 @@ diff -urNp linux-3.1.4/kernel/rcutree_plugin.h linux-3.1.4/kernel/rcutree_plugin
unlock_mb_ret:
mutex_unlock(&sync_rcu_preempt_exp_mutex);
mb_ret:
-@@ -1774,8 +1774,8 @@ EXPORT_SYMBOL_GPL(synchronize_sched_expe
+@@ -1774,8 +1774,8 @@ EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
#else /* #ifndef CONFIG_SMP */
@@ -66368,10 +68021,11 @@ diff -urNp linux-3.1.4/kernel/rcutree_plugin.h linux-3.1.4/kernel/rcutree_plugin
thatcpu).dynticks);
smp_mb(); /* Order sampling of snap with end of grace period. */
if ((snap & 0x1) != 0) {
-diff -urNp linux-3.1.4/kernel/rcutree_trace.c linux-3.1.4/kernel/rcutree_trace.c
---- linux-3.1.4/kernel/rcutree_trace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rcutree_trace.c 2011-12-02 17:38:47.000000000 -0500
-@@ -74,7 +74,7 @@ static void print_one_rcu_data(struct se
+diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
+index 3b0c098..43ba2d8 100644
+--- a/kernel/rcutree_trace.c
++++ b/kernel/rcutree_trace.c
+@@ -74,7 +74,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
rdp->qs_pending);
#ifdef CONFIG_NO_HZ
seq_printf(m, " dt=%d/%d/%d df=%lu",
@@ -66380,7 +68034,7 @@ diff -urNp linux-3.1.4/kernel/rcutree_trace.c linux-3.1.4/kernel/rcutree_trace.c
rdp->dynticks->dynticks_nesting,
rdp->dynticks->dynticks_nmi_nesting,
rdp->dynticks_fqs);
-@@ -148,7 +148,7 @@ static void print_one_rcu_data_csv(struc
+@@ -148,7 +148,7 @@ static void print_one_rcu_data_csv(struct seq_file *m, struct rcu_data *rdp)
rdp->qs_pending);
#ifdef CONFIG_NO_HZ
seq_printf(m, ",%d,%d,%d,%lu",
@@ -66389,10 +68043,11 @@ diff -urNp linux-3.1.4/kernel/rcutree_trace.c linux-3.1.4/kernel/rcutree_trace.c
rdp->dynticks->dynticks_nesting,
rdp->dynticks->dynticks_nmi_nesting,
rdp->dynticks_fqs);
-diff -urNp linux-3.1.4/kernel/relay.c linux-3.1.4/kernel/relay.c
---- linux-3.1.4/kernel/relay.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/relay.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1236,6 +1236,8 @@ static ssize_t subbuf_splice_actor(struc
+diff --git a/kernel/relay.c b/kernel/relay.c
+index 859ea5a..096e2fe 100644
+--- a/kernel/relay.c
++++ b/kernel/relay.c
+@@ -1236,6 +1236,8 @@ static ssize_t subbuf_splice_actor(struct file *in,
};
ssize_t ret;
@@ -66401,10 +68056,11 @@ diff -urNp linux-3.1.4/kernel/relay.c linux-3.1.4/kernel/relay.c
if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
return 0;
if (splice_grow_spd(pipe, &spd))
-diff -urNp linux-3.1.4/kernel/resource.c linux-3.1.4/kernel/resource.c
---- linux-3.1.4/kernel/resource.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/resource.c 2011-11-16 18:40:44.000000000 -0500
-@@ -141,8 +141,18 @@ static const struct file_operations proc
+diff --git a/kernel/resource.c b/kernel/resource.c
+index c8dc249..f1e2359 100644
+--- a/kernel/resource.c
++++ b/kernel/resource.c
+@@ -141,8 +141,18 @@ static const struct file_operations proc_iomem_operations = {
static int __init ioresources_init(void)
{
@@ -66423,9 +68079,10 @@ diff -urNp linux-3.1.4/kernel/resource.c linux-3.1.4/kernel/resource.c
return 0;
}
__initcall(ioresources_init);
-diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester.c
---- linux-3.1.4/kernel/rtmutex-tester.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/rtmutex-tester.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
+index 5c9ccd3..a35e22b 100644
+--- a/kernel/rtmutex-tester.c
++++ b/kernel/rtmutex-tester.c
@@ -20,7 +20,7 @@
#define MAX_RT_TEST_MUTEXES 8
@@ -66435,7 +68092,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
struct test_thread_data {
int opcode;
-@@ -61,7 +61,7 @@ static int handle_op(struct test_thread_
+@@ -61,7 +61,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
case RTTEST_LOCKCONT:
td->mutexes[td->opdata] = 1;
@@ -66444,7 +68101,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
return 0;
case RTTEST_RESET:
-@@ -74,7 +74,7 @@ static int handle_op(struct test_thread_
+@@ -74,7 +74,7 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return 0;
case RTTEST_RESETEVENT:
@@ -66453,7 +68110,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
return 0;
default:
-@@ -91,9 +91,9 @@ static int handle_op(struct test_thread_
+@@ -91,9 +91,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return ret;
td->mutexes[id] = 1;
@@ -66465,7 +68122,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
td->mutexes[id] = 4;
return 0;
-@@ -104,9 +104,9 @@ static int handle_op(struct test_thread_
+@@ -104,9 +104,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
return ret;
td->mutexes[id] = 1;
@@ -66477,7 +68134,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
td->mutexes[id] = ret ? 0 : 4;
return ret ? -EINTR : 0;
-@@ -115,9 +115,9 @@ static int handle_op(struct test_thread_
+@@ -115,9 +115,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
if (id < 0 || id >= MAX_RT_TEST_MUTEXES || td->mutexes[id] != 4)
return ret;
@@ -66489,7 +68146,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
td->mutexes[id] = 0;
return 0;
-@@ -164,7 +164,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -164,7 +164,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
break;
td->mutexes[dat] = 2;
@@ -66498,7 +68155,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
break;
default:
-@@ -184,7 +184,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -184,7 +184,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
return;
td->mutexes[dat] = 3;
@@ -66507,7 +68164,7 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
break;
case RTTEST_LOCKNOWAIT:
-@@ -196,7 +196,7 @@ void schedule_rt_mutex_test(struct rt_mu
+@@ -196,7 +196,7 @@ void schedule_rt_mutex_test(struct rt_mutex *mutex)
return;
td->mutexes[dat] = 1;
@@ -66516,30 +68173,10 @@ diff -urNp linux-3.1.4/kernel/rtmutex-tester.c linux-3.1.4/kernel/rtmutex-tester
return;
default:
-diff -urNp linux-3.1.4/kernel/sched_autogroup.c linux-3.1.4/kernel/sched_autogroup.c
---- linux-3.1.4/kernel/sched_autogroup.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sched_autogroup.c 2011-11-16 18:39:08.000000000 -0500
-@@ -7,7 +7,7 @@
-
- unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
- static struct autogroup autogroup_default;
--static atomic_t autogroup_seq_nr;
-+static atomic_unchecked_t autogroup_seq_nr;
-
- static void __init autogroup_init(struct task_struct *init_task)
- {
-@@ -78,7 +78,7 @@ static inline struct autogroup *autogrou
-
- kref_init(&ag->kref);
- init_rwsem(&ag->lock);
-- ag->id = atomic_inc_return(&autogroup_seq_nr);
-+ ag->id = atomic_inc_return_unchecked(&autogroup_seq_nr);
- ag->tg = tg;
- #ifdef CONFIG_RT_GROUP_SCHED
- /*
-diff -urNp linux-3.1.4/kernel/sched.c linux-3.1.4/kernel/sched.c
---- linux-3.1.4/kernel/sched.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sched.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/sched.c b/kernel/sched.c
+index b50b0f0..1c6c591 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
@@ -4264,6 +4264,8 @@ static void __sched __schedule(void)
struct rq *rq;
int cpu;
@@ -66549,7 +68186,7 @@ diff -urNp linux-3.1.4/kernel/sched.c linux-3.1.4/kernel/sched.c
need_resched:
preempt_disable();
cpu = smp_processor_id();
-@@ -4950,6 +4952,8 @@ int can_nice(const struct task_struct *p
+@@ -4950,6 +4952,8 @@ int can_nice(const struct task_struct *p, const int nice)
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
@@ -66576,10 +68213,33 @@ diff -urNp linux-3.1.4/kernel/sched.c linux-3.1.4/kernel/sched.c
/* can't set/change the rt policy */
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
-diff -urNp linux-3.1.4/kernel/sched_fair.c linux-3.1.4/kernel/sched_fair.c
---- linux-3.1.4/kernel/sched_fair.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sched_fair.c 2011-11-16 18:39:08.000000000 -0500
-@@ -4062,7 +4062,7 @@ static void nohz_idle_balance(int this_c
+diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c
+index 429242f..d7cca82 100644
+--- a/kernel/sched_autogroup.c
++++ b/kernel/sched_autogroup.c
+@@ -7,7 +7,7 @@
+
+ unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
+ static struct autogroup autogroup_default;
+-static atomic_t autogroup_seq_nr;
++static atomic_unchecked_t autogroup_seq_nr;
+
+ static void __init autogroup_init(struct task_struct *init_task)
+ {
+@@ -78,7 +78,7 @@ static inline struct autogroup *autogroup_create(void)
+
+ kref_init(&ag->kref);
+ init_rwsem(&ag->lock);
+- ag->id = atomic_inc_return(&autogroup_seq_nr);
++ ag->id = atomic_inc_return_unchecked(&autogroup_seq_nr);
+ ag->tg = tg;
+ #ifdef CONFIG_RT_GROUP_SCHED
+ /*
+diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
+index bc8ee99..b6f6492 100644
+--- a/kernel/sched_fair.c
++++ b/kernel/sched_fair.c
+@@ -4062,7 +4062,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle) { }
* run_rebalance_domains is triggered when needed from the scheduler tick.
* Also triggered for nohz idle balancing (with nohz_balancing_kick set).
*/
@@ -66588,10 +68248,11 @@ diff -urNp linux-3.1.4/kernel/sched_fair.c linux-3.1.4/kernel/sched_fair.c
{
int this_cpu = smp_processor_id();
struct rq *this_rq = cpu_rq(this_cpu);
-diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
---- linux-3.1.4/kernel/signal.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/signal.c 2011-11-16 19:30:04.000000000 -0500
-@@ -45,12 +45,12 @@ static struct kmem_cache *sigqueue_cache
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 291c970..304bd03 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -45,12 +45,12 @@ static struct kmem_cache *sigqueue_cachep;
int print_fatal_signals __read_mostly;
@@ -66606,7 +68267,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
{
/* Is it explicitly or implicitly ignored? */
return handler == SIG_IGN ||
-@@ -60,7 +60,7 @@ static int sig_handler_ignored(void __us
+@@ -60,7 +60,7 @@ static int sig_handler_ignored(void __user *handler, int sig)
static int sig_task_ignored(struct task_struct *t, int sig,
int from_ancestor_ns)
{
@@ -66615,7 +68276,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
handler = sig_handler(t, sig);
-@@ -364,6 +364,9 @@ __sigqueue_alloc(int sig, struct task_st
+@@ -364,6 +364,9 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi
atomic_inc(&user->sigpending);
rcu_read_unlock();
@@ -66625,7 +68286,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
if (override_rlimit ||
atomic_read(&user->sigpending) <=
task_rlimit(t, RLIMIT_SIGPENDING)) {
-@@ -488,7 +491,7 @@ flush_signal_handlers(struct task_struct
+@@ -488,7 +491,7 @@ flush_signal_handlers(struct task_struct *t, int force_default)
int unhandled_signal(struct task_struct *tsk, int sig)
{
@@ -66634,7 +68295,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
if (is_global_init(tsk))
return 1;
if (handler != SIG_IGN && handler != SIG_DFL)
-@@ -815,6 +818,13 @@ static int check_kill_permission(int sig
+@@ -815,6 +818,13 @@ static int check_kill_permission(int sig, struct siginfo *info,
}
}
@@ -66648,7 +68309,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
return security_task_kill(t, info, sig, 0);
}
-@@ -1165,7 +1175,7 @@ __group_send_sig_info(int sig, struct si
+@@ -1165,7 +1175,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
return send_signal(sig, info, p, 1);
}
@@ -66657,7 +68318,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
{
return send_signal(sig, info, t, 0);
-@@ -1202,6 +1212,7 @@ force_sig_info(int sig, struct siginfo *
+@@ -1202,6 +1212,7 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
unsigned long int flags;
int ret, blocked, ignored;
struct k_sigaction *action;
@@ -66665,7 +68326,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
spin_lock_irqsave(&t->sighand->siglock, flags);
action = &t->sighand->action[sig-1];
-@@ -1216,9 +1227,18 @@ force_sig_info(int sig, struct siginfo *
+@@ -1216,9 +1227,18 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
}
if (action->sa.sa_handler == SIG_DFL)
t->signal->flags &= ~SIGNAL_UNKILLABLE;
@@ -66684,7 +68345,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
return ret;
}
-@@ -1285,8 +1305,11 @@ int group_send_sig_info(int sig, struct
+@@ -1285,8 +1305,11 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
ret = check_kill_permission(sig, info, p);
rcu_read_unlock();
@@ -66697,7 +68358,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
return ret;
}
-@@ -1909,6 +1932,8 @@ static void ptrace_do_notify(int signr,
+@@ -1909,6 +1932,8 @@ static void ptrace_do_notify(int signr, int exit_code, int why)
{
siginfo_t info;
@@ -66706,7 +68367,7 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
memset(&info, 0, sizeof info);
info.si_signo = signr;
info.si_code = exit_code;
-@@ -2748,7 +2773,15 @@ do_send_specific(pid_t tgid, pid_t pid,
+@@ -2748,7 +2773,15 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
int error = -ESRCH;
rcu_read_lock();
@@ -66723,10 +68384,11 @@ diff -urNp linux-3.1.4/kernel/signal.c linux-3.1.4/kernel/signal.c
if (p && (tgid <= 0 || task_tgid_vnr(p) == tgid)) {
error = check_kill_permission(sig, info, p);
/*
-diff -urNp linux-3.1.4/kernel/smp.c linux-3.1.4/kernel/smp.c
---- linux-3.1.4/kernel/smp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/smp.c 2011-11-16 18:39:08.000000000 -0500
-@@ -580,22 +580,22 @@ int smp_call_function(smp_call_func_t fu
+diff --git a/kernel/smp.c b/kernel/smp.c
+index fb67dfa..f819e2e 100644
+--- a/kernel/smp.c
++++ b/kernel/smp.c
+@@ -580,22 +580,22 @@ int smp_call_function(smp_call_func_t func, void *info, int wait)
}
EXPORT_SYMBOL(smp_call_function);
@@ -66753,10 +68415,11 @@ diff -urNp linux-3.1.4/kernel/smp.c linux-3.1.4/kernel/smp.c
{
raw_spin_unlock_irq(&call_function.lock);
}
-diff -urNp linux-3.1.4/kernel/softirq.c linux-3.1.4/kernel/softirq.c
---- linux-3.1.4/kernel/softirq.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/softirq.c 2011-11-16 18:39:08.000000000 -0500
-@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index fca82c3..1db9690 100644
+--- a/kernel/softirq.c
++++ b/kernel/softirq.c
+@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp
DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
@@ -66788,7 +68451,7 @@ diff -urNp linux-3.1.4/kernel/softirq.c linux-3.1.4/kernel/softirq.c
}
/*
-@@ -441,7 +443,7 @@ void __tasklet_hi_schedule_first(struct
+@@ -441,7 +443,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
EXPORT_SYMBOL(__tasklet_hi_schedule_first);
@@ -66797,7 +68460,7 @@ diff -urNp linux-3.1.4/kernel/softirq.c linux-3.1.4/kernel/softirq.c
{
struct tasklet_struct *list;
-@@ -476,7 +478,7 @@ static void tasklet_action(struct softir
+@@ -476,7 +478,7 @@ static void tasklet_action(struct softirq_action *a)
}
}
@@ -66806,10 +68469,11 @@ diff -urNp linux-3.1.4/kernel/softirq.c linux-3.1.4/kernel/softirq.c
{
struct tasklet_struct *list;
-diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
---- linux-3.1.4/kernel/sys.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sys.c 2011-11-16 18:40:44.000000000 -0500
-@@ -157,6 +157,12 @@ static int set_one_prio(struct task_stru
+diff --git a/kernel/sys.c b/kernel/sys.c
+index 1dbbe69..e96e1dd 100644
+--- a/kernel/sys.c
++++ b/kernel/sys.c
+@@ -157,6 +157,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
error = -EACCES;
goto out;
}
@@ -66822,7 +68486,7 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
no_nice = security_task_setnice(p, niceval);
if (no_nice) {
error = no_nice;
-@@ -571,6 +577,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
+@@ -571,6 +577,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid)
goto error;
}
@@ -66843,7 +68507,7 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
if (nsown_capable(CAP_SETGID))
new->gid = new->egid = new->sgid = new->fsgid = gid;
else if (gid == old->gid || gid == old->sgid)
-@@ -687,6 +700,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
+@@ -687,6 +700,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid)
goto error;
}
@@ -66866,7 +68530,7 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
if (nsown_capable(CAP_SETUID)) {
new->suid = new->uid = uid;
if (uid != old->uid) {
-@@ -785,6 +807,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
+@@ -785,6 +807,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
goto error;
}
@@ -66876,7 +68540,7 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
if (ruid != (uid_t) -1) {
new->uid = ruid;
if (ruid != old->uid) {
-@@ -849,6 +874,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
+@@ -849,6 +874,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
goto error;
}
@@ -66921,7 +68585,19 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
abort_creds(new);
return old_fsgid;
-@@ -1242,19 +1278,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_
+@@ -1188,7 +1224,10 @@ static int override_release(char __user *release, int len)
+ }
+ v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
+ snprintf(buf, len, "2.6.%u%s", v, rest);
+- ret = copy_to_user(release, buf, len);
++ if (len > sizeof(buf))
++ ret = -EFAULT;
++ else
++ ret = copy_to_user(release, buf, len);
+ }
+ return ret;
+ }
+@@ -1242,19 +1281,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
return -EFAULT;
down_read(&uts_sem);
@@ -66946,7 +68622,7 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
__OLD_UTS_LEN);
error |= __put_user(0, name->machine + __OLD_UTS_LEN);
up_read(&uts_sem);
-@@ -1717,7 +1753,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
+@@ -1717,7 +1756,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
error = get_dumpable(me->mm);
break;
case PR_SET_DUMPABLE:
@@ -66955,75 +68631,10 @@ diff -urNp linux-3.1.4/kernel/sys.c linux-3.1.4/kernel/sys.c
error = -EINVAL;
break;
}
-diff -urNp linux-3.1.4/kernel/sysctl_binary.c linux-3.1.4/kernel/sysctl_binary.c
---- linux-3.1.4/kernel/sysctl_binary.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sysctl_binary.c 2011-11-16 18:39:08.000000000 -0500
-@@ -989,7 +989,7 @@ static ssize_t bin_intvec(struct file *f
- int i;
-
- set_fs(KERNEL_DS);
-- result = vfs_read(file, buffer, BUFSZ - 1, &pos);
-+ result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out_kfree;
-@@ -1034,7 +1034,7 @@ static ssize_t bin_intvec(struct file *f
- }
-
- set_fs(KERNEL_DS);
-- result = vfs_write(file, buffer, str - buffer, &pos);
-+ result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out_kfree;
-@@ -1067,7 +1067,7 @@ static ssize_t bin_ulongvec(struct file
- int i;
-
- set_fs(KERNEL_DS);
-- result = vfs_read(file, buffer, BUFSZ - 1, &pos);
-+ result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out_kfree;
-@@ -1112,7 +1112,7 @@ static ssize_t bin_ulongvec(struct file
- }
-
- set_fs(KERNEL_DS);
-- result = vfs_write(file, buffer, str - buffer, &pos);
-+ result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out_kfree;
-@@ -1138,7 +1138,7 @@ static ssize_t bin_uuid(struct file *fil
- int i;
-
- set_fs(KERNEL_DS);
-- result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
-+ result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out;
-@@ -1185,7 +1185,7 @@ static ssize_t bin_dn_node_address(struc
- __le16 dnaddr;
-
- set_fs(KERNEL_DS);
-- result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
-+ result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out;
-@@ -1233,7 +1233,7 @@ static ssize_t bin_dn_node_address(struc
- le16_to_cpu(dnaddr) & 0x3ff);
-
- set_fs(KERNEL_DS);
-- result = vfs_write(file, buf, len, &pos);
-+ result = vfs_write(file, (const char __force_user *)buf, len, &pos);
- set_fs(old_fs);
- if (result < 0)
- goto out;
-diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
---- linux-3.1.4/kernel/sysctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sysctl.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/sysctl.c b/kernel/sysctl.c
+index 11d65b5..6957b37 100644
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
@@ -85,6 +85,13 @@
@@ -67038,7 +68649,7 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
/* External variables not in a header file. */
extern int sysctl_overcommit_memory;
-@@ -197,6 +204,7 @@ static int sysrq_sysctl_handler(ctl_tabl
+@@ -197,6 +204,7 @@ static int sysrq_sysctl_handler(ctl_table *table, int write,
}
#endif
@@ -67153,7 +68764,7 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
if (root->permissions)
mode = root->permissions(root, current->nsproxy, table);
-@@ -2113,6 +2173,16 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2113,6 +2173,16 @@ int proc_dostring(struct ctl_table *table, int write,
buffer, lenp, ppos);
}
@@ -67170,7 +68781,7 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
static size_t proc_skip_spaces(char **buf)
{
size_t ret;
-@@ -2218,6 +2288,8 @@ static int proc_put_long(void __user **b
+@@ -2218,6 +2288,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
len = strlen(tmp);
if (len > *size)
len = *size;
@@ -67179,7 +68790,7 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
if (copy_to_user(*buf, tmp, len))
return -EFAULT;
*size -= len;
-@@ -2534,8 +2606,11 @@ static int __do_proc_doulongvec_minmax(v
+@@ -2534,8 +2606,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
*i = val;
} else {
val = convdiv * (*i) / convmul;
@@ -67192,7 +68803,7 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
err = proc_put_long(&buffer, &left, val, false);
if (err)
break;
-@@ -2930,6 +3005,12 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2930,6 +3005,12 @@ int proc_dostring(struct ctl_table *table, int write,
return -ENOSYS;
}
@@ -67213,10 +68824,78 @@ diff -urNp linux-3.1.4/kernel/sysctl.c linux-3.1.4/kernel/sysctl.c
EXPORT_SYMBOL(proc_doulongvec_minmax);
EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
EXPORT_SYMBOL(register_sysctl_table);
-diff -urNp linux-3.1.4/kernel/sysctl_check.c linux-3.1.4/kernel/sysctl_check.c
---- linux-3.1.4/kernel/sysctl_check.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/sysctl_check.c 2011-11-16 18:40:44.000000000 -0500
-@@ -129,6 +129,7 @@ int sysctl_check_table(struct nsproxy *n
+diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
+index e8bffbe..2344401 100644
+--- a/kernel/sysctl_binary.c
++++ b/kernel/sysctl_binary.c
+@@ -989,7 +989,7 @@ static ssize_t bin_intvec(struct file *file,
+ int i;
+
+ set_fs(KERNEL_DS);
+- result = vfs_read(file, buffer, BUFSZ - 1, &pos);
++ result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out_kfree;
+@@ -1034,7 +1034,7 @@ static ssize_t bin_intvec(struct file *file,
+ }
+
+ set_fs(KERNEL_DS);
+- result = vfs_write(file, buffer, str - buffer, &pos);
++ result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out_kfree;
+@@ -1067,7 +1067,7 @@ static ssize_t bin_ulongvec(struct file *file,
+ int i;
+
+ set_fs(KERNEL_DS);
+- result = vfs_read(file, buffer, BUFSZ - 1, &pos);
++ result = vfs_read(file, (char __force_user *)buffer, BUFSZ - 1, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out_kfree;
+@@ -1112,7 +1112,7 @@ static ssize_t bin_ulongvec(struct file *file,
+ }
+
+ set_fs(KERNEL_DS);
+- result = vfs_write(file, buffer, str - buffer, &pos);
++ result = vfs_write(file, (const char __force_user *)buffer, str - buffer, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out_kfree;
+@@ -1138,7 +1138,7 @@ static ssize_t bin_uuid(struct file *file,
+ int i;
+
+ set_fs(KERNEL_DS);
+- result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
++ result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out;
+@@ -1185,7 +1185,7 @@ static ssize_t bin_dn_node_address(struct file *file,
+ __le16 dnaddr;
+
+ set_fs(KERNEL_DS);
+- result = vfs_read(file, buf, sizeof(buf) - 1, &pos);
++ result = vfs_read(file, (char __force_user *)buf, sizeof(buf) - 1, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out;
+@@ -1233,7 +1233,7 @@ static ssize_t bin_dn_node_address(struct file *file,
+ le16_to_cpu(dnaddr) & 0x3ff);
+
+ set_fs(KERNEL_DS);
+- result = vfs_write(file, buf, len, &pos);
++ result = vfs_write(file, (const char __force_user *)buf, len, &pos);
+ set_fs(old_fs);
+ if (result < 0)
+ goto out;
+diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
+index 362da65..ab8ef8c 100644
+--- a/kernel/sysctl_check.c
++++ b/kernel/sysctl_check.c
+@@ -129,6 +129,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
set_fail(&fail, table, "Directory with extra2");
} else {
if ((table->proc_handler == proc_dostring) ||
@@ -67224,9 +68903,10 @@ diff -urNp linux-3.1.4/kernel/sysctl_check.c linux-3.1.4/kernel/sysctl_check.c
(table->proc_handler == proc_dointvec) ||
(table->proc_handler == proc_dointvec_minmax) ||
(table->proc_handler == proc_dointvec_jiffies) ||
-diff -urNp linux-3.1.4/kernel/taskstats.c linux-3.1.4/kernel/taskstats.c
---- linux-3.1.4/kernel/taskstats.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/taskstats.c 2011-11-16 19:35:09.000000000 -0500
+diff --git a/kernel/taskstats.c b/kernel/taskstats.c
+index e660464..c8b9e67 100644
+--- a/kernel/taskstats.c
++++ b/kernel/taskstats.c
@@ -27,9 +27,12 @@
#include <linux/cgroup.h>
#include <linux/fs.h>
@@ -67250,9 +68930,26 @@ diff -urNp linux-3.1.4/kernel/taskstats.c linux-3.1.4/kernel/taskstats.c
if (info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK])
return cmd_attr_register_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
-diff -urNp linux-3.1.4/kernel/time/alarmtimer.c linux-3.1.4/kernel/time/alarmtimer.c
---- linux-3.1.4/kernel/time/alarmtimer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time/alarmtimer.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/time.c b/kernel/time.c
+index d776062..fa8d186 100644
+--- a/kernel/time.c
++++ b/kernel/time.c
+@@ -163,6 +163,11 @@ int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
+ return error;
+
+ if (tz) {
++ /* we log in do_settimeofday called below, so don't log twice
++ */
++ if (!tv)
++ gr_log_timechange();
++
+ /* SMP safe, global irq locking makes it work. */
+ sys_tz = *tz;
+ update_vsyscall_tz();
+diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
+index ea5e1a9..8b8df07 100644
+--- a/kernel/time/alarmtimer.c
++++ b/kernel/time/alarmtimer.c
@@ -693,7 +693,7 @@ static int __init alarmtimer_init(void)
{
int error = 0;
@@ -67262,10 +68959,11 @@ diff -urNp linux-3.1.4/kernel/time/alarmtimer.c linux-3.1.4/kernel/time/alarmtim
.clock_getres = alarm_clock_getres,
.clock_get = alarm_clock_get,
.timer_create = alarm_timer_create,
-diff -urNp linux-3.1.4/kernel/time/tick-broadcast.c linux-3.1.4/kernel/time/tick-broadcast.c
---- linux-3.1.4/kernel/time/tick-broadcast.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time/tick-broadcast.c 2011-11-16 18:39:08.000000000 -0500
-@@ -115,7 +115,7 @@ int tick_device_uses_broadcast(struct cl
+diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
+index c7218d1..5f4ecc6 100644
+--- a/kernel/time/tick-broadcast.c
++++ b/kernel/time/tick-broadcast.c
+@@ -115,7 +115,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
* then clear the broadcast bit.
*/
if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) {
@@ -67274,9 +68972,10 @@ diff -urNp linux-3.1.4/kernel/time/tick-broadcast.c linux-3.1.4/kernel/time/tick
cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_clear_oneshot(cpu);
-diff -urNp linux-3.1.4/kernel/time/timekeeping.c linux-3.1.4/kernel/time/timekeeping.c
---- linux-3.1.4/kernel/time/timekeeping.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time/timekeeping.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
+index 2b021b0e..b673a32 100644
+--- a/kernel/time/timekeeping.c
++++ b/kernel/time/timekeeping.c
@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/mm.h>
@@ -67285,7 +68984,7 @@ diff -urNp linux-3.1.4/kernel/time/timekeeping.c linux-3.1.4/kernel/time/timekee
#include <linux/syscore_ops.h>
#include <linux/clocksource.h>
#include <linux/jiffies.h>
-@@ -361,6 +362,8 @@ int do_settimeofday(const struct timespe
+@@ -361,6 +362,8 @@ int do_settimeofday(const struct timespec *tv)
if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
return -EINVAL;
@@ -67294,10 +68993,11 @@ diff -urNp linux-3.1.4/kernel/time/timekeeping.c linux-3.1.4/kernel/time/timekee
write_seqlock_irqsave(&xtime_lock, flags);
timekeeping_forward_now();
-diff -urNp linux-3.1.4/kernel/time/timer_list.c linux-3.1.4/kernel/time/timer_list.c
---- linux-3.1.4/kernel/time/timer_list.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time/timer_list.c 2011-11-16 18:40:44.000000000 -0500
-@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base,
+diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
+index 3258455..f35227d 100644
+--- a/kernel/time/timer_list.c
++++ b/kernel/time/timer_list.c
+@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
static void print_name_offset(struct seq_file *m, void *sym)
{
@@ -67326,7 +69026,7 @@ diff -urNp linux-3.1.4/kernel/time/timer_list.c linux-3.1.4/kernel/time/timer_li
SEQ_printf(m, " .index: %d\n",
base->index);
SEQ_printf(m, " .resolution: %Lu nsecs\n",
-@@ -293,7 +301,11 @@ static int __init init_timer_list_procfs
+@@ -293,7 +301,11 @@ static int __init init_timer_list_procfs(void)
{
struct proc_dir_entry *pe;
@@ -67338,9 +69038,10 @@ diff -urNp linux-3.1.4/kernel/time/timer_list.c linux-3.1.4/kernel/time/timer_li
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_stats.c
---- linux-3.1.4/kernel/time/timer_stats.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time/timer_stats.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
+index a5d0a3a..60c7948 100644
+--- a/kernel/time/timer_stats.c
++++ b/kernel/time/timer_stats.c
@@ -116,7 +116,7 @@ static ktime_t time_start, time_stop;
static unsigned long nr_entries;
static struct entry entries[MAX_ENTRIES];
@@ -67359,7 +69060,7 @@ diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_s
}
static struct entry *alloc_entry(void)
-@@ -261,7 +261,7 @@ void timer_stats_update_stats(void *time
+@@ -261,7 +261,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
if (likely(entry))
entry->count++;
else
@@ -67368,7 +69069,7 @@ diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_s
out_unlock:
raw_spin_unlock_irqrestore(lock, flags);
-@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *time
+@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
static void print_name_offset(struct seq_file *m, unsigned long addr)
{
@@ -67385,7 +69086,7 @@ diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_s
}
static int tstats_show(struct seq_file *m, void *v)
-@@ -300,9 +304,9 @@ static int tstats_show(struct seq_file *
+@@ -300,9 +304,9 @@ static int tstats_show(struct seq_file *m, void *v)
seq_puts(m, "Timer Stats Version: v0.2\n");
seq_printf(m, "Sample period: %ld.%03ld s\n", period.tv_sec, ms);
@@ -67397,7 +69098,7 @@ diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_s
for (i = 0; i < nr_entries; i++) {
entry = entries + i;
-@@ -417,7 +421,11 @@ static int __init init_tstats_procfs(voi
+@@ -417,7 +421,11 @@ static int __init init_tstats_procfs(void)
{
struct proc_dir_entry *pe;
@@ -67409,24 +69110,10 @@ diff -urNp linux-3.1.4/kernel/time/timer_stats.c linux-3.1.4/kernel/time/timer_s
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-3.1.4/kernel/time.c linux-3.1.4/kernel/time.c
---- linux-3.1.4/kernel/time.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/time.c 2011-11-16 18:40:44.000000000 -0500
-@@ -163,6 +163,11 @@ int do_sys_settimeofday(const struct tim
- return error;
-
- if (tz) {
-+ /* we log in do_settimeofday called below, so don't log twice
-+ */
-+ if (!tv)
-+ gr_log_timechange();
-+
- /* SMP safe, global irq locking makes it work. */
- sys_tz = *tz;
- update_vsyscall_tz();
-diff -urNp linux-3.1.4/kernel/timer.c linux-3.1.4/kernel/timer.c
---- linux-3.1.4/kernel/timer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/timer.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/timer.c b/kernel/timer.c
+index 8cff361..0fb5cd8 100644
+--- a/kernel/timer.c
++++ b/kernel/timer.c
@@ -1304,7 +1304,7 @@ void update_process_times(int user_tick)
/*
* This function runs timers and the timer-tq in bottom half context.
@@ -67436,10 +69123,11 @@ diff -urNp linux-3.1.4/kernel/timer.c linux-3.1.4/kernel/timer.c
{
struct tvec_base *base = __this_cpu_read(tvec_bases);
-diff -urNp linux-3.1.4/kernel/trace/blktrace.c linux-3.1.4/kernel/trace/blktrace.c
---- linux-3.1.4/kernel/trace/blktrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/blktrace.c 2011-11-16 18:39:08.000000000 -0500
-@@ -323,7 +323,7 @@ static ssize_t blk_dropped_read(struct f
+diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
+index 7c910a5..8b72104 100644
+--- a/kernel/trace/blktrace.c
++++ b/kernel/trace/blktrace.c
+@@ -323,7 +323,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
struct blk_trace *bt = filp->private_data;
char buf[16];
@@ -67448,7 +69136,7 @@ diff -urNp linux-3.1.4/kernel/trace/blktrace.c linux-3.1.4/kernel/trace/blktrace
return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
}
-@@ -388,7 +388,7 @@ static int blk_subbuf_start_callback(str
+@@ -388,7 +388,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
return 1;
bt = buf->chan->private_data;
@@ -67457,7 +69145,7 @@ diff -urNp linux-3.1.4/kernel/trace/blktrace.c linux-3.1.4/kernel/trace/blktrace
return 0;
}
-@@ -489,7 +489,7 @@ int do_blk_trace_setup(struct request_qu
+@@ -489,7 +489,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
bt->dir = dir;
bt->dev = dev;
@@ -67466,10 +69154,11 @@ diff -urNp linux-3.1.4/kernel/trace/blktrace.c linux-3.1.4/kernel/trace/blktrace
ret = -EIO;
bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
-diff -urNp linux-3.1.4/kernel/trace/ftrace.c linux-3.1.4/kernel/trace/ftrace.c
---- linux-3.1.4/kernel/trace/ftrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/ftrace.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1585,12 +1585,17 @@ ftrace_code_disable(struct module *mod,
+diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
+index c3e4575..cd9c767 100644
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -1585,12 +1585,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
if (unlikely(ftrace_disabled))
return 0;
@@ -67489,7 +69178,7 @@ diff -urNp linux-3.1.4/kernel/trace/ftrace.c linux-3.1.4/kernel/trace/ftrace.c
}
/*
-@@ -2607,7 +2612,7 @@ static void ftrace_free_entry_rcu(struct
+@@ -2607,7 +2612,7 @@ static void ftrace_free_entry_rcu(struct rcu_head *rhp)
int
register_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops,
@@ -67498,10 +69187,11 @@ diff -urNp linux-3.1.4/kernel/trace/ftrace.c linux-3.1.4/kernel/trace/ftrace.c
{
struct ftrace_func_probe *entry;
struct ftrace_page *pg;
-diff -urNp linux-3.1.4/kernel/trace/trace.c linux-3.1.4/kernel/trace/trace.c
---- linux-3.1.4/kernel/trace/trace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace.c 2011-11-16 18:40:44.000000000 -0500
-@@ -3451,6 +3451,8 @@ static ssize_t tracing_splice_read_pipe(
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index 17a2d44..85907e2 100644
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -3451,6 +3451,8 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
size_t rem;
unsigned int i;
@@ -67510,7 +69200,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace.c linux-3.1.4/kernel/trace/trace.c
if (splice_grow_spd(pipe, &spd))
return -ENOMEM;
-@@ -3926,6 +3928,8 @@ tracing_buffers_splice_read(struct file
+@@ -3926,6 +3928,8 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
int entries, size, i;
size_t ret;
@@ -67519,7 +69209,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace.c linux-3.1.4/kernel/trace/trace.c
if (splice_grow_spd(pipe, &spd))
return -ENOMEM;
-@@ -4093,10 +4097,9 @@ static const struct file_operations trac
+@@ -4093,10 +4097,9 @@ static const struct file_operations tracing_dyn_info_fops = {
};
#endif
@@ -67543,10 +69233,11 @@ diff -urNp linux-3.1.4/kernel/trace/trace.c linux-3.1.4/kernel/trace/trace.c
static int once;
struct dentry *d_tracer;
-diff -urNp linux-3.1.4/kernel/trace/trace_events.c linux-3.1.4/kernel/trace/trace_events.c
---- linux-3.1.4/kernel/trace/trace_events.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_events.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1300,10 +1300,6 @@ static LIST_HEAD(ftrace_module_file_list
+diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
+index 581876f..a91e569 100644
+--- a/kernel/trace/trace_events.c
++++ b/kernel/trace/trace_events.c
+@@ -1300,10 +1300,6 @@ static LIST_HEAD(ftrace_module_file_list);
struct ftrace_module_file_ops {
struct list_head list;
struct module *mod;
@@ -67557,7 +69248,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_events.c linux-3.1.4/kernel/trace/trac
};
static struct ftrace_module_file_ops *
-@@ -1324,17 +1320,12 @@ trace_create_file_ops(struct module *mod
+@@ -1324,17 +1320,12 @@ trace_create_file_ops(struct module *mod)
file_ops->mod = mod;
@@ -67581,7 +69272,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_events.c linux-3.1.4/kernel/trace/trac
list_add(&file_ops->list, &ftrace_module_file_list);
-@@ -1358,8 +1349,8 @@ static void trace_module_add_events(stru
+@@ -1358,8 +1349,8 @@ static void trace_module_add_events(struct module *mod)
for_each_event(call, start, end) {
__trace_add_event_call(*call, mod,
@@ -67592,10 +69283,11 @@ diff -urNp linux-3.1.4/kernel/trace/trace_events.c linux-3.1.4/kernel/trace/trac
}
}
-diff -urNp linux-3.1.4/kernel/trace/trace_kprobe.c linux-3.1.4/kernel/trace/trace_kprobe.c
---- linux-3.1.4/kernel/trace/trace_kprobe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_kprobe.c 2011-11-16 18:39:08.000000000 -0500
-@@ -217,7 +217,7 @@ static __kprobes void FETCH_FUNC_NAME(me
+diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
+index 00d527c..7c5b1a3 100644
+--- a/kernel/trace/trace_kprobe.c
++++ b/kernel/trace/trace_kprobe.c
+@@ -217,7 +217,7 @@ static __kprobes void FETCH_FUNC_NAME(memory, string)(struct pt_regs *regs,
long ret;
int maxlen = get_rloc_len(*(u32 *)dest);
u8 *dst = get_rloc_data(dest);
@@ -67604,7 +69296,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_kprobe.c linux-3.1.4/kernel/trace/trac
mm_segment_t old_fs = get_fs();
if (!maxlen)
return;
-@@ -229,7 +229,7 @@ static __kprobes void FETCH_FUNC_NAME(me
+@@ -229,7 +229,7 @@ static __kprobes void FETCH_FUNC_NAME(memory, string)(struct pt_regs *regs,
pagefault_disable();
do
ret = __copy_from_user_inatomic(dst++, src++, 1);
@@ -67613,7 +69305,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_kprobe.c linux-3.1.4/kernel/trace/trac
dst[-1] = '\0';
pagefault_enable();
set_fs(old_fs);
-@@ -238,7 +238,7 @@ static __kprobes void FETCH_FUNC_NAME(me
+@@ -238,7 +238,7 @@ static __kprobes void FETCH_FUNC_NAME(memory, string)(struct pt_regs *regs,
((u8 *)get_rloc_data(dest))[0] = '\0';
*(u32 *)dest = make_data_rloc(0, get_rloc_offs(*(u32 *)dest));
} else
@@ -67622,7 +69314,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_kprobe.c linux-3.1.4/kernel/trace/trac
get_rloc_offs(*(u32 *)dest));
}
/* Return the length of string -- including null terminal byte */
-@@ -252,7 +252,7 @@ static __kprobes void FETCH_FUNC_NAME(me
+@@ -252,7 +252,7 @@ static __kprobes void FETCH_FUNC_NAME(memory, string_size)(struct pt_regs *regs,
set_fs(KERNEL_DS);
pagefault_disable();
do {
@@ -67631,9 +69323,10 @@ diff -urNp linux-3.1.4/kernel/trace/trace_kprobe.c linux-3.1.4/kernel/trace/trac
len++;
} while (c && ret == 0 && len < MAX_STRING_SIZE);
pagefault_enable();
-diff -urNp linux-3.1.4/kernel/trace/trace_mmiotrace.c linux-3.1.4/kernel/trace/trace_mmiotrace.c
---- linux-3.1.4/kernel/trace/trace_mmiotrace.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_mmiotrace.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
+index fd3c8aa..5f324a6 100644
+--- a/kernel/trace/trace_mmiotrace.c
++++ b/kernel/trace/trace_mmiotrace.c
@@ -24,7 +24,7 @@ struct header_iter {
static struct trace_array *mmio_trace_array;
static bool overrun_detected;
@@ -67643,7 +69336,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_mmiotrace.c linux-3.1.4/kernel/trace/t
static void mmio_reset_data(struct trace_array *tr)
{
-@@ -127,7 +127,7 @@ static void mmio_close(struct trace_iter
+@@ -127,7 +127,7 @@ static void mmio_close(struct trace_iterator *iter)
static unsigned long count_overruns(struct trace_iterator *iter)
{
@@ -67652,7 +69345,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_mmiotrace.c linux-3.1.4/kernel/trace/t
unsigned long over = ring_buffer_overruns(iter->tr->buffer);
if (over > prev_overruns)
-@@ -317,7 +317,7 @@ static void __trace_mmiotrace_rw(struct
+@@ -317,7 +317,7 @@ static void __trace_mmiotrace_rw(struct trace_array *tr,
event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_RW,
sizeof(*entry), 0, pc);
if (!event) {
@@ -67661,7 +69354,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_mmiotrace.c linux-3.1.4/kernel/trace/t
return;
}
entry = ring_buffer_event_data(event);
-@@ -347,7 +347,7 @@ static void __trace_mmiotrace_map(struct
+@@ -347,7 +347,7 @@ static void __trace_mmiotrace_map(struct trace_array *tr,
event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_MAP,
sizeof(*entry), 0, pc);
if (!event) {
@@ -67670,10 +69363,11 @@ diff -urNp linux-3.1.4/kernel/trace/trace_mmiotrace.c linux-3.1.4/kernel/trace/t
return;
}
entry = ring_buffer_event_data(event);
-diff -urNp linux-3.1.4/kernel/trace/trace_output.c linux-3.1.4/kernel/trace/trace_output.c
---- linux-3.1.4/kernel/trace/trace_output.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_output.c 2011-11-16 18:39:08.000000000 -0500
-@@ -278,7 +278,7 @@ int trace_seq_path(struct trace_seq *s,
+diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
+index 5199930..26c73a0 100644
+--- a/kernel/trace/trace_output.c
++++ b/kernel/trace/trace_output.c
+@@ -278,7 +278,7 @@ int trace_seq_path(struct trace_seq *s, struct path *path)
p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len);
if (!IS_ERR(p)) {
@@ -67682,9 +69376,10 @@ diff -urNp linux-3.1.4/kernel/trace/trace_output.c linux-3.1.4/kernel/trace/trac
if (p) {
s->len = p - s->buffer;
return 1;
-diff -urNp linux-3.1.4/kernel/trace/trace_stack.c linux-3.1.4/kernel/trace/trace_stack.c
---- linux-3.1.4/kernel/trace/trace_stack.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_stack.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
+index 77575b3..6e623d1 100644
+--- a/kernel/trace/trace_stack.c
++++ b/kernel/trace/trace_stack.c
@@ -50,7 +50,7 @@ static inline void check_stack(void)
return;
@@ -67694,9 +69389,10 @@ diff -urNp linux-3.1.4/kernel/trace/trace_stack.c linux-3.1.4/kernel/trace/trace
return;
local_irq_save(flags);
-diff -urNp linux-3.1.4/kernel/trace/trace_workqueue.c linux-3.1.4/kernel/trace/trace_workqueue.c
---- linux-3.1.4/kernel/trace/trace_workqueue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/kernel/trace/trace_workqueue.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c
+index 209b379..7f76423 100644
+--- a/kernel/trace/trace_workqueue.c
++++ b/kernel/trace/trace_workqueue.c
@@ -22,7 +22,7 @@ struct cpu_workqueue_stats {
int cpu;
pid_t pid;
@@ -67715,7 +69411,7 @@ diff -urNp linux-3.1.4/kernel/trace/trace_workqueue.c linux-3.1.4/kernel/trace/t
goto found;
}
}
-@@ -210,7 +210,7 @@ static int workqueue_stat_show(struct se
+@@ -210,7 +210,7 @@ static int workqueue_stat_show(struct seq_file *s, void *p)
tsk = get_pid_task(pid, PIDTYPE_PID);
if (tsk) {
seq_printf(s, "%3d %6d %6u %s\n", cws->cpu,
@@ -67724,10 +69420,23 @@ diff -urNp linux-3.1.4/kernel/trace/trace_workqueue.c linux-3.1.4/kernel/trace/t
tsk->comm);
put_task_struct(tsk);
}
-diff -urNp linux-3.1.4/lib/bitmap.c linux-3.1.4/lib/bitmap.c
---- linux-3.1.4/lib/bitmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/bitmap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -419,7 +419,7 @@ int __bitmap_parse(const char *buf, unsi
+diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
+index c0cb9c4..f33aa89 100644
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -1091,6 +1091,7 @@ config LATENCYTOP
+ depends on DEBUG_KERNEL
+ depends on STACKTRACE_SUPPORT
+ depends on PROC_FS
++ depends on !GRKERNSEC_HIDESYM
+ select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE
+ select KALLSYMS
+ select KALLSYMS_ALL
+diff --git a/lib/bitmap.c b/lib/bitmap.c
+index 2f4412e..a557e27 100644
+--- a/lib/bitmap.c
++++ b/lib/bitmap.c
+@@ -419,7 +419,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen,
{
int c, old_c, totaldigits, ndigits, nchunks, nbits;
u32 chunk;
@@ -67736,7 +69445,7 @@ diff -urNp linux-3.1.4/lib/bitmap.c linux-3.1.4/lib/bitmap.c
bitmap_zero(maskp, nmaskbits);
-@@ -504,7 +504,7 @@ int bitmap_parse_user(const char __user
+@@ -504,7 +504,7 @@ int bitmap_parse_user(const char __user *ubuf,
{
if (!access_ok(VERIFY_READ, ubuf, ulen))
return -EFAULT;
@@ -67745,7 +69454,7 @@ diff -urNp linux-3.1.4/lib/bitmap.c linux-3.1.4/lib/bitmap.c
}
EXPORT_SYMBOL(bitmap_parse_user);
-@@ -594,7 +594,7 @@ static int __bitmap_parselist(const char
+@@ -594,7 +594,7 @@ static int __bitmap_parselist(const char *buf, unsigned int buflen,
{
unsigned a, b;
int c, old_c, totaldigits;
@@ -67754,7 +69463,7 @@ diff -urNp linux-3.1.4/lib/bitmap.c linux-3.1.4/lib/bitmap.c
int exp_digit, in_range;
totaldigits = c = 0;
-@@ -694,7 +694,7 @@ int bitmap_parselist_user(const char __u
+@@ -694,7 +694,7 @@ int bitmap_parselist_user(const char __user *ubuf,
{
if (!access_ok(VERIFY_READ, ubuf, ulen))
return -EFAULT;
@@ -67763,10 +69472,11 @@ diff -urNp linux-3.1.4/lib/bitmap.c linux-3.1.4/lib/bitmap.c
ulen, 1, maskp, nmaskbits);
}
EXPORT_SYMBOL(bitmap_parselist_user);
-diff -urNp linux-3.1.4/lib/bug.c linux-3.1.4/lib/bug.c
---- linux-3.1.4/lib/bug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/bug.c 2011-11-16 18:39:08.000000000 -0500
-@@ -133,6 +133,8 @@ enum bug_trap_type report_bug(unsigned l
+diff --git a/lib/bug.c b/lib/bug.c
+index 1955209..cbbb2ad 100644
+--- a/lib/bug.c
++++ b/lib/bug.c
+@@ -133,6 +133,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
return BUG_TRAP_TYPE_NONE;
bug = find_bug(bugaddr);
@@ -67775,10 +69485,11 @@ diff -urNp linux-3.1.4/lib/bug.c linux-3.1.4/lib/bug.c
file = NULL;
line = 0;
-diff -urNp linux-3.1.4/lib/debugobjects.c linux-3.1.4/lib/debugobjects.c
---- linux-3.1.4/lib/debugobjects.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/debugobjects.c 2011-11-16 18:39:08.000000000 -0500
-@@ -284,7 +284,7 @@ static void debug_object_is_on_stack(voi
+diff --git a/lib/debugobjects.c b/lib/debugobjects.c
+index a78b7c6..2c73084 100644
+--- a/lib/debugobjects.c
++++ b/lib/debugobjects.c
+@@ -284,7 +284,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
if (limit > 4)
return;
@@ -67787,9 +69498,10 @@ diff -urNp linux-3.1.4/lib/debugobjects.c linux-3.1.4/lib/debugobjects.c
if (is_on_stack == onstack)
return;
-diff -urNp linux-3.1.4/lib/devres.c linux-3.1.4/lib/devres.c
---- linux-3.1.4/lib/devres.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/devres.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/devres.c b/lib/devres.c
+index 7c0e953..f642b5c 100644
+--- a/lib/devres.c
++++ b/lib/devres.c
@@ -80,7 +80,7 @@ EXPORT_SYMBOL(devm_ioremap_nocache);
void devm_iounmap(struct device *dev, void __iomem *addr)
{
@@ -67799,7 +69511,7 @@ diff -urNp linux-3.1.4/lib/devres.c linux-3.1.4/lib/devres.c
iounmap(addr);
}
EXPORT_SYMBOL(devm_iounmap);
-@@ -141,7 +141,7 @@ void devm_ioport_unmap(struct device *de
+@@ -141,7 +141,7 @@ void devm_ioport_unmap(struct device *dev, void __iomem *addr)
{
ioport_unmap(addr);
WARN_ON(devres_destroy(dev, devm_ioport_map_release,
@@ -67808,9 +69520,10 @@ diff -urNp linux-3.1.4/lib/devres.c linux-3.1.4/lib/devres.c
}
EXPORT_SYMBOL(devm_ioport_unmap);
-diff -urNp linux-3.1.4/lib/dma-debug.c linux-3.1.4/lib/dma-debug.c
---- linux-3.1.4/lib/dma-debug.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/dma-debug.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/dma-debug.c b/lib/dma-debug.c
+index db07bfd..719b5ab 100644
+--- a/lib/dma-debug.c
++++ b/lib/dma-debug.c
@@ -870,7 +870,7 @@ out:
static void check_for_stack(struct device *dev, void *addr)
@@ -67820,9 +69533,10 @@ diff -urNp linux-3.1.4/lib/dma-debug.c linux-3.1.4/lib/dma-debug.c
err_printk(dev, NULL, "DMA-API: device driver maps memory from"
"stack [addr=%p]\n", addr);
}
-diff -urNp linux-3.1.4/lib/extable.c linux-3.1.4/lib/extable.c
---- linux-3.1.4/lib/extable.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/extable.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/extable.c b/lib/extable.c
+index 4cac81e..63e9b8f 100644
+--- a/lib/extable.c
++++ b/lib/extable.c
@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/sort.h>
@@ -67831,7 +69545,7 @@ diff -urNp linux-3.1.4/lib/extable.c linux-3.1.4/lib/extable.c
#ifndef ARCH_HAS_SORT_EXTABLE
/*
-@@ -36,8 +37,10 @@ static int cmp_ex(const void *a, const v
+@@ -36,8 +37,10 @@ static int cmp_ex(const void *a, const void *b)
void sort_extable(struct exception_table_entry *start,
struct exception_table_entry *finish)
{
@@ -67842,9 +69556,10 @@ diff -urNp linux-3.1.4/lib/extable.c linux-3.1.4/lib/extable.c
}
#ifdef CONFIG_MODULES
-diff -urNp linux-3.1.4/lib/inflate.c linux-3.1.4/lib/inflate.c
---- linux-3.1.4/lib/inflate.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/inflate.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/inflate.c b/lib/inflate.c
+index 013a761..c28f3fc 100644
+--- a/lib/inflate.c
++++ b/lib/inflate.c
@@ -269,7 +269,7 @@ static void free(void *where)
malloc_ptr = free_mem_ptr;
}
@@ -67854,20 +69569,10 @@ diff -urNp linux-3.1.4/lib/inflate.c linux-3.1.4/lib/inflate.c
#define free(a) kfree(a)
#endif
-diff -urNp linux-3.1.4/lib/Kconfig.debug linux-3.1.4/lib/Kconfig.debug
---- linux-3.1.4/lib/Kconfig.debug 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/Kconfig.debug 2011-11-16 18:40:44.000000000 -0500
-@@ -1091,6 +1091,7 @@ config LATENCYTOP
- depends on DEBUG_KERNEL
- depends on STACKTRACE_SUPPORT
- depends on PROC_FS
-+ depends on !GRKERNSEC_HIDESYM
- select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE
- select KALLSYMS
- select KALLSYMS_ALL
-diff -urNp linux-3.1.4/lib/kref.c linux-3.1.4/lib/kref.c
---- linux-3.1.4/lib/kref.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/kref.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/kref.c b/lib/kref.c
+index 3efb882..8492f4c 100644
+--- a/lib/kref.c
++++ b/lib/kref.c
@@ -52,7 +52,7 @@ void kref_get(struct kref *kref)
*/
int kref_put(struct kref *kref, void (*release)(struct kref *kref))
@@ -67877,9 +69582,10 @@ diff -urNp linux-3.1.4/lib/kref.c linux-3.1.4/lib/kref.c
WARN_ON(release == (void (*)(struct kref *))kfree);
if (atomic_dec_and_test(&kref->refcount)) {
-diff -urNp linux-3.1.4/lib/radix-tree.c linux-3.1.4/lib/radix-tree.c
---- linux-3.1.4/lib/radix-tree.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/radix-tree.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/lib/radix-tree.c b/lib/radix-tree.c
+index a2f9da5..3bcadb6 100644
+--- a/lib/radix-tree.c
++++ b/lib/radix-tree.c
@@ -80,7 +80,7 @@ struct radix_tree_preload {
int nr;
struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
@@ -67889,9 +69595,10 @@ diff -urNp linux-3.1.4/lib/radix-tree.c linux-3.1.4/lib/radix-tree.c
static inline void *ptr_to_indirect(void *ptr)
{
-diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
---- linux-3.1.4/lib/vsprintf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/lib/vsprintf.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/lib/vsprintf.c b/lib/vsprintf.c
+index d7222a9..2172edc 100644
+--- a/lib/vsprintf.c
++++ b/lib/vsprintf.c
@@ -16,6 +16,9 @@
* - scnprintf and vscnprintf
*/
@@ -67902,7 +69609,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
#include <stdarg.h>
#include <linux/module.h>
#include <linux/types.h>
-@@ -432,7 +435,7 @@ char *symbol_string(char *buf, char *end
+@@ -432,7 +435,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
char sym[KSYM_SYMBOL_LEN];
if (ext == 'B')
sprint_backtrace(sym, value);
@@ -67911,7 +69618,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
sprint_symbol(sym, value);
else
kallsyms_lookup(value, NULL, NULL, NULL, sym);
-@@ -796,7 +799,11 @@ char *uuid_string(char *buf, char *end,
+@@ -796,7 +799,11 @@ char *uuid_string(char *buf, char *end, const u8 *addr,
return string(buf, end, uuid, spec);
}
@@ -67932,7 +69639,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
* - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
* - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201]
* - 'M' For a 6-byte MAC address, it prints the address in the
-@@ -854,12 +863,12 @@ char *pointer(const char *fmt, char *buf
+@@ -854,12 +863,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
{
if (!ptr && *fmt != 'K') {
/*
@@ -67947,7 +69654,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
}
switch (*fmt) {
-@@ -869,6 +878,13 @@ char *pointer(const char *fmt, char *buf
+@@ -869,6 +878,13 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
/* Fallthrough */
case 'S':
case 's':
@@ -67961,7 +69668,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
case 'B':
return symbol_string(buf, end, ptr, spec, *fmt);
case 'R':
-@@ -1627,11 +1643,11 @@ int bstr_printf(char *buf, size_t size,
+@@ -1627,11 +1643,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
typeof(type) value; \
if (sizeof(type) == 8) { \
args = PTR_ALIGN(args, sizeof(u32)); \
@@ -67976,7 +69683,7 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
} \
args += sizeof(type); \
value; \
-@@ -1694,7 +1710,7 @@ int bstr_printf(char *buf, size_t size,
+@@ -1694,7 +1710,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
case FORMAT_TYPE_STR: {
const char *str_arg = args;
args += strlen(str_arg) + 1;
@@ -67985,192 +69692,36 @@ diff -urNp linux-3.1.4/lib/vsprintf.c linux-3.1.4/lib/vsprintf.c
break;
}
-diff -urNp linux-3.1.4/localversion-grsec linux-3.1.4/localversion-grsec
---- linux-3.1.4/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/localversion-grsec 2011-11-16 18:40:44.000000000 -0500
+diff --git a/localversion-grsec b/localversion-grsec
+new file mode 100644
+index 0000000..7cd6065
+--- /dev/null
++++ b/localversion-grsec
@@ -0,0 +1 @@
+-grsec
-diff -urNp linux-3.1.4/Makefile linux-3.1.4/Makefile
---- linux-3.1.4/Makefile 2011-11-29 18:06:31.000000000 -0500
-+++ linux-3.1.4/Makefile 2011-12-02 17:38:47.000000000 -0500
-@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
-
- HOSTCC = gcc
- HOSTCXX = g++
--HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCXXFLAGS = -O2
-+HOSTCFLAGS = -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks
-+HOSTCLFAGS += $(call cc-option, -Wno-empty-body)
-+HOSTCXXFLAGS = -O2 -Wall -W -fno-delete-null-pointer-checks
-
- # Decide whether to build built-in, modular, or both.
- # Normally, just do built-in.
-@@ -407,8 +408,8 @@ export RCS_TAR_IGNORE := --exclude SCCS
- # Rules shared between *config targets and build targets
-
- # Basic helpers built in scripts/
--PHONY += scripts_basic
--scripts_basic:
-+PHONY += scripts_basic gcc-plugins
-+scripts_basic: gcc-plugins
- $(Q)$(MAKE) $(build)=scripts/basic
- $(Q)rm -f .tmp_quiet_recordmcount
-
-@@ -564,6 +565,42 @@ else
- KBUILD_CFLAGS += -O2
- endif
-
-+ifndef DISABLE_PAX_PLUGINS
-+ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)
-+ifndef DISABLE_PAX_CONSTIFY_PLUGIN
-+CONSTIFY_PLUGIN := -fplugin=$(objtree)/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN
-+endif
-+ifdef CONFIG_PAX_MEMORY_STACKLEAK
-+STACKLEAK_PLUGIN := -fplugin=$(objtree)/tools/gcc/stackleak_plugin.so -DSTACKLEAK_PLUGIN
-+STACKLEAK_PLUGIN += -fplugin-arg-stackleak_plugin-track-lowest-sp=100
-+endif
-+ifdef CONFIG_KALLOCSTAT_PLUGIN
-+KALLOCSTAT_PLUGIN := -fplugin=$(objtree)/tools/gcc/kallocstat_plugin.so
-+endif
-+ifdef CONFIG_PAX_KERNEXEC_PLUGIN
-+KERNEXEC_PLUGIN := -fplugin=$(objtree)/tools/gcc/kernexec_plugin.so
-+KERNEXEC_PLUGIN += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD)
-+endif
-+ifdef CONFIG_CHECKER_PLUGIN
-+ifeq ($(call cc-ifversion, -ge, 0406, y), y)
-+CHECKER_PLUGIN := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
-+endif
-+endif
-+GCC_PLUGINS := $(CONSTIFY_PLUGIN) $(STACKLEAK_PLUGIN) $(KALLOCSTAT_PLUGIN) $(KERNEXEC_PLUGIN) $(CHECKER_PLUGIN)
-+export CONSTIFY_PLUGIN STACKLEAK_PLUGIN KERNEXEC_PLUGIN CHECKER_PLUGIN
-+gcc-plugins:
-+ $(Q)$(MAKE) $(build)=tools/gcc
-+else
-+gcc-plugins:
-+ifeq ($(call cc-ifversion, -ge, 0405, y), y)
-+ $(error Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.))
-+else
-+ $(Q)echo "warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least"
-+endif
-+ $(Q)echo "PAX_MEMORY_STACKLEAK and other features will be less secure"
-+endif
-+endif
-+
- include $(srctree)/arch/$(SRCARCH)/Makefile
-
- ifneq ($(CONFIG_FRAME_WARN),0)
-@@ -708,7 +745,7 @@ export mod_strip_cmd
-
-
- ifeq ($(KBUILD_EXTMOD),)
--core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
-+core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ grsecurity/
-
- vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
- $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -932,6 +969,7 @@ vmlinux.o: $(modpost-init) $(vmlinux-mai
-
- # The actual objects are generated when descending,
- # make sure no implicit rule kicks in
-+$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): KBUILD_CFLAGS += $(GCC_PLUGINS)
- $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
-
- # Handle descending into subdirectories listed in $(vmlinux-dirs)
-@@ -941,7 +979,7 @@ $(sort $(vmlinux-init) $(vmlinux-main))
- # Error messages still appears in the original language
-
- PHONY += $(vmlinux-dirs)
--$(vmlinux-dirs): prepare scripts
-+$(vmlinux-dirs): gcc-plugins prepare scripts
- $(Q)$(MAKE) $(build)=$@
-
- # Store (new) KERNELRELASE string in include/config/kernel.release
-@@ -986,6 +1024,7 @@ prepare0: archprepare FORCE
- $(Q)$(MAKE) $(build)=. missing-syscalls
-
- # All the preparing..
-+prepare: KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS),$(KBUILD_CFLAGS))
- prepare: prepare0
-
- # Generate some files
-@@ -1087,6 +1126,7 @@ all: modules
- # using awk while concatenating to the final file.
-
- PHONY += modules
-+modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
- 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.';
-@@ -1102,7 +1142,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modu
-
- # Target to prepare building external modules
- PHONY += modules_prepare
--modules_prepare: prepare scripts
-+modules_prepare: gcc-plugins prepare scripts
-
- # Target to install modules
- PHONY += modules_install
-@@ -1198,7 +1238,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 -size 0 \
-+ -o -name '.*.rej' -o -name '*.so' -o -size 0 \
- -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
- -type f -print | xargs rm -f
-
-@@ -1360,6 +1400,7 @@ PHONY += $(module-dirs) modules
- $(module-dirs): crmodverdir $(objtree)/Module.symvers
- $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
-
-+modules: KBUILD_CFLAGS += $(GCC_PLUGINS)
- modules: $(module-dirs)
- @$(kecho) ' Building modules, stage 2.';
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1486,17 +1527,19 @@ else
- target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
- endif
+diff --git a/mm/Kconfig b/mm/Kconfig
+index f2f1ca1..0645f06 100644
+--- a/mm/Kconfig
++++ b/mm/Kconfig
+@@ -238,10 +238,10 @@ config KSM
+ root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
--%.s: %.c prepare scripts FORCE
-+%.s: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.s: %.c gcc-plugins 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: %.c prepare scripts FORCE
-+%.o: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.o: %.c gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
- %.lst: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
--%.s: %.S prepare scripts FORCE
-+%.s: %.S gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
--%.o: %.S prepare scripts FORCE
-+%.o: %.S gcc-plugins prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
- %.symtypes: %.c prepare scripts FORCE
- $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-@@ -1506,11 +1549,13 @@ endif
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
--%/: prepare scripts FORCE
-+%/: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%/: gcc-plugins prepare scripts FORCE
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir)
--%.ko: prepare scripts FORCE
-+%.ko: KBUILD_CFLAGS += $(GCC_PLUGINS)
-+%.ko: gcc-plugins prepare scripts FORCE
- $(cmd_crmodverdir)
- $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
- $(build)=$(build-dir) $(@:.ko=.o)
-diff -urNp linux-3.1.4/mm/filemap.c linux-3.1.4/mm/filemap.c
---- linux-3.1.4/mm/filemap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/filemap.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1784,7 +1784,7 @@ int generic_file_mmap(struct file * file
+ config DEFAULT_MMAP_MIN_ADDR
+- int "Low address space to protect from user allocation"
++ int "Low address space to protect from user allocation"
+ depends on MMU
+- default 4096
+- help
++ default 65536
++ help
+ This is the portion of low virtual memory which should be protected
+ from userspace allocation. Keeping a user from writing to low pages
+ can help reduce the impact of kernel NULL pointer bugs.
+diff --git a/mm/filemap.c b/mm/filemap.c
+index 7771871..91bcdb4 100644
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -1784,7 +1784,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
struct address_space *mapping = file->f_mapping;
if (!mapping->a_ops->readpage)
@@ -68179,7 +69730,7 @@ diff -urNp linux-3.1.4/mm/filemap.c linux-3.1.4/mm/filemap.c
file_accessed(file);
vma->vm_ops = &generic_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
-@@ -2190,6 +2190,7 @@ inline int generic_write_checks(struct f
+@@ -2190,6 +2190,7 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i
*pos = i_size_read(inode);
if (limit != RLIM_INFINITY) {
@@ -68187,10 +69738,11 @@ diff -urNp linux-3.1.4/mm/filemap.c linux-3.1.4/mm/filemap.c
if (*pos >= limit) {
send_sig(SIGXFSZ, current, 0);
return -EFBIG;
-diff -urNp linux-3.1.4/mm/fremap.c linux-3.1.4/mm/fremap.c
---- linux-3.1.4/mm/fremap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/fremap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -156,6 +156,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
+diff --git a/mm/fremap.c b/mm/fremap.c
+index b8e0e2d..076e171 100644
+--- a/mm/fremap.c
++++ b/mm/fremap.c
+@@ -156,6 +156,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
retry:
vma = find_vma(mm, start);
@@ -68202,9 +69754,10 @@ diff -urNp linux-3.1.4/mm/fremap.c linux-3.1.4/mm/fremap.c
/*
* Make sure the vma is shared, that it supports prefaulting,
* and that the remapped range is valid and fully within
-diff -urNp linux-3.1.4/mm/highmem.c linux-3.1.4/mm/highmem.c
---- linux-3.1.4/mm/highmem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/highmem.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/mm/highmem.c b/mm/highmem.c
+index 5ef672c..d7660f4 100644
+--- a/mm/highmem.c
++++ b/mm/highmem.c
@@ -125,9 +125,10 @@ static void flush_all_zero_pkmaps(void)
* So no dangers, even with speculative execution.
*/
@@ -68230,9 +69783,10 @@ diff -urNp linux-3.1.4/mm/highmem.c linux-3.1.4/mm/highmem.c
pkmap_count[last_pkmap_nr] = 1;
set_page_address(page, (void *)vaddr);
-diff -urNp linux-3.1.4/mm/huge_memory.c linux-3.1.4/mm/huge_memory.c
---- linux-3.1.4/mm/huge_memory.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/huge_memory.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/mm/huge_memory.c b/mm/huge_memory.c
+index d819d93..468e18f 100644
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
@@ -702,7 +702,7 @@ out:
* run pte_offset_map on the pmd, if an huge pmd could
* materialize from under us from a different thread.
@@ -68242,7 +69796,7 @@ diff -urNp linux-3.1.4/mm/huge_memory.c linux-3.1.4/mm/huge_memory.c
return VM_FAULT_OOM;
/* if an huge pmd materialized from under us just retry later */
if (unlikely(pmd_trans_huge(*pmd)))
-@@ -829,7 +829,7 @@ static int do_huge_pmd_wp_page_fallback(
+@@ -829,7 +829,7 @@ static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm,
for (i = 0; i < HPAGE_PMD_NR; i++) {
copy_user_highpage(pages[i], page + i,
@@ -68251,10 +69805,11 @@ diff -urNp linux-3.1.4/mm/huge_memory.c linux-3.1.4/mm/huge_memory.c
__SetPageUptodate(pages[i]);
cond_resched();
}
-diff -urNp linux-3.1.4/mm/hugetlb.c linux-3.1.4/mm/hugetlb.c
---- linux-3.1.4/mm/hugetlb.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/hugetlb.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2346,6 +2346,27 @@ static int unmap_ref_private(struct mm_s
+diff --git a/mm/hugetlb.c b/mm/hugetlb.c
+index dae27ba..e8d42be 100644
+--- a/mm/hugetlb.c
++++ b/mm/hugetlb.c
+@@ -2346,6 +2346,27 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
return 1;
}
@@ -68305,7 +69860,7 @@ diff -urNp linux-3.1.4/mm/hugetlb.c linux-3.1.4/mm/hugetlb.c
if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
/* Optimization, do the COW without a second fault */
ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
-@@ -2627,6 +2657,10 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2627,6 +2657,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
static DEFINE_MUTEX(hugetlb_instantiation_mutex);
struct hstate *h = hstate_vma(vma);
@@ -68316,7 +69871,7 @@ diff -urNp linux-3.1.4/mm/hugetlb.c linux-3.1.4/mm/hugetlb.c
ptep = huge_pte_offset(mm, address);
if (ptep) {
entry = huge_ptep_get(ptep);
-@@ -2638,6 +2672,26 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2638,6 +2672,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
VM_FAULT_SET_HINDEX(h - hstates);
}
@@ -68343,10 +69898,11 @@ diff -urNp linux-3.1.4/mm/hugetlb.c linux-3.1.4/mm/hugetlb.c
ptep = huge_pte_alloc(mm, address, huge_page_size(h));
if (!ptep)
return VM_FAULT_OOM;
-diff -urNp linux-3.1.4/mm/internal.h linux-3.1.4/mm/internal.h
---- linux-3.1.4/mm/internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/internal.h 2011-11-16 18:39:08.000000000 -0500
-@@ -95,6 +95,7 @@ extern void putback_lru_page(struct page
+diff --git a/mm/internal.h b/mm/internal.h
+index 2189af4..f2ca332 100644
+--- a/mm/internal.h
++++ b/mm/internal.h
+@@ -95,6 +95,7 @@ extern void putback_lru_page(struct page *page);
* in mm/page_alloc.c
*/
extern void __free_pages_bootmem(struct page *page, unsigned int order);
@@ -68354,27 +69910,11 @@ diff -urNp linux-3.1.4/mm/internal.h linux-3.1.4/mm/internal.h
extern void prep_compound_page(struct page *page, unsigned long order);
#ifdef CONFIG_MEMORY_FAILURE
extern bool is_free_buddy_page(struct page *page);
-diff -urNp linux-3.1.4/mm/Kconfig linux-3.1.4/mm/Kconfig
---- linux-3.1.4/mm/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/Kconfig 2011-11-17 18:57:00.000000000 -0500
-@@ -238,10 +238,10 @@ config KSM
- root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
-
- config DEFAULT_MMAP_MIN_ADDR
-- int "Low address space to protect from user allocation"
-+ int "Low address space to protect from user allocation"
- depends on MMU
-- default 4096
-- help
-+ default 65536
-+ help
- This is the portion of low virtual memory which should be protected
- from userspace allocation. Keeping a user from writing to low pages
- can help reduce the impact of kernel NULL pointer bugs.
-diff -urNp linux-3.1.4/mm/kmemleak.c linux-3.1.4/mm/kmemleak.c
---- linux-3.1.4/mm/kmemleak.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/kmemleak.c 2011-11-16 18:40:44.000000000 -0500
-@@ -357,7 +357,7 @@ static void print_unreferenced(struct se
+diff --git a/mm/kmemleak.c b/mm/kmemleak.c
+index d6880f5..ed77913 100644
+--- a/mm/kmemleak.c
++++ b/mm/kmemleak.c
+@@ -357,7 +357,7 @@ static void print_unreferenced(struct seq_file *seq,
for (i = 0; i < object->trace_len; i++) {
void *ptr = (void *)object->trace[i];
@@ -68383,10 +69923,11 @@ diff -urNp linux-3.1.4/mm/kmemleak.c linux-3.1.4/mm/kmemleak.c
}
}
-diff -urNp linux-3.1.4/mm/maccess.c linux-3.1.4/mm/maccess.c
---- linux-3.1.4/mm/maccess.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/maccess.c 2011-11-16 18:39:08.000000000 -0500
-@@ -26,7 +26,7 @@ long __probe_kernel_read(void *dst, cons
+diff --git a/mm/maccess.c b/mm/maccess.c
+index 4cee182..e00511d 100644
+--- a/mm/maccess.c
++++ b/mm/maccess.c
+@@ -26,7 +26,7 @@ long __probe_kernel_read(void *dst, const void *src, size_t size)
set_fs(KERNEL_DS);
pagefault_disable();
ret = __copy_from_user_inatomic(dst,
@@ -68395,7 +69936,7 @@ diff -urNp linux-3.1.4/mm/maccess.c linux-3.1.4/mm/maccess.c
pagefault_enable();
set_fs(old_fs);
-@@ -53,7 +53,7 @@ long __probe_kernel_write(void *dst, con
+@@ -53,7 +53,7 @@ long __probe_kernel_write(void *dst, const void *src, size_t size)
set_fs(KERNEL_DS);
pagefault_disable();
@@ -68404,10 +69945,11 @@ diff -urNp linux-3.1.4/mm/maccess.c linux-3.1.4/mm/maccess.c
pagefault_enable();
set_fs(old_fs);
-diff -urNp linux-3.1.4/mm/madvise.c linux-3.1.4/mm/madvise.c
---- linux-3.1.4/mm/madvise.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/madvise.c 2011-11-16 18:39:08.000000000 -0500
-@@ -45,6 +45,10 @@ static long madvise_behavior(struct vm_a
+diff --git a/mm/madvise.c b/mm/madvise.c
+index 74bf193..feb6fd3 100644
+--- a/mm/madvise.c
++++ b/mm/madvise.c
+@@ -45,6 +45,10 @@ static long madvise_behavior(struct vm_area_struct * vma,
pgoff_t pgoff;
unsigned long new_flags = vma->vm_flags;
@@ -68432,7 +69974,7 @@ diff -urNp linux-3.1.4/mm/madvise.c linux-3.1.4/mm/madvise.c
vma->vm_flags = new_flags;
out:
-@@ -168,6 +179,11 @@ static long madvise_dontneed(struct vm_a
+@@ -168,6 +179,11 @@ static long madvise_dontneed(struct vm_area_struct * vma,
struct vm_area_struct ** prev,
unsigned long start, unsigned long end)
{
@@ -68444,7 +69986,7 @@ diff -urNp linux-3.1.4/mm/madvise.c linux-3.1.4/mm/madvise.c
*prev = vma;
if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
return -EINVAL;
-@@ -180,6 +196,21 @@ static long madvise_dontneed(struct vm_a
+@@ -180,6 +196,21 @@ static long madvise_dontneed(struct vm_area_struct * vma,
zap_page_range(vma, start, end - start, &details);
} else
zap_page_range(vma, start, end - start, NULL);
@@ -68466,7 +70008,7 @@ diff -urNp linux-3.1.4/mm/madvise.c linux-3.1.4/mm/madvise.c
return 0;
}
-@@ -376,6 +407,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
+@@ -376,6 +407,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
if (end < start)
goto out;
@@ -68483,10 +70025,96 @@ diff -urNp linux-3.1.4/mm/madvise.c linux-3.1.4/mm/madvise.c
error = 0;
if (end == start)
goto out;
-diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
---- linux-3.1.4/mm/memory.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/memory.c 2011-11-16 18:39:08.000000000 -0500
-@@ -457,8 +457,12 @@ static inline void free_pmd_range(struct
+diff --git a/mm/memory-failure.c b/mm/memory-failure.c
+index 2b43ba0..fc09657 100644
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -60,7 +60,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
+
+ int sysctl_memory_failure_recovery __read_mostly = 1;
+
+-atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
++atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
+
+ #if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE)
+
+@@ -201,7 +201,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno,
+ si.si_signo = SIGBUS;
+ si.si_errno = 0;
+ si.si_code = BUS_MCEERR_AO;
+- si.si_addr = (void *)addr;
++ si.si_addr = (void __user *)addr;
+ #ifdef __ARCH_SI_TRAPNO
+ si.si_trapno = trapno;
+ #endif
+@@ -1009,7 +1009,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
+ }
+
+ nr_pages = 1 << compound_trans_order(hpage);
+- atomic_long_add(nr_pages, &mce_bad_pages);
++ atomic_long_add_unchecked(nr_pages, &mce_bad_pages);
+
+ /*
+ * We need/can do nothing about count=0 pages.
+@@ -1039,7 +1039,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
+ if (!PageHWPoison(hpage)
+ || (hwpoison_filter(p) && TestClearPageHWPoison(p))
+ || (p != hpage && TestSetPageHWPoison(hpage))) {
+- atomic_long_sub(nr_pages, &mce_bad_pages);
++ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+ return 0;
+ }
+ set_page_hwpoison_huge_page(hpage);
+@@ -1097,7 +1097,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
+ }
+ if (hwpoison_filter(p)) {
+ if (TestClearPageHWPoison(p))
+- atomic_long_sub(nr_pages, &mce_bad_pages);
++ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+ unlock_page(hpage);
+ put_page(hpage);
+ return 0;
+@@ -1314,7 +1314,7 @@ int unpoison_memory(unsigned long pfn)
+ return 0;
+ }
+ if (TestClearPageHWPoison(p))
+- atomic_long_sub(nr_pages, &mce_bad_pages);
++ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+ pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn);
+ return 0;
+ }
+@@ -1328,7 +1328,7 @@ int unpoison_memory(unsigned long pfn)
+ */
+ if (TestClearPageHWPoison(page)) {
+ pr_info("MCE: Software-unpoisoned page %#lx\n", pfn);
+- atomic_long_sub(nr_pages, &mce_bad_pages);
++ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
+ freeit = 1;
+ if (PageHuge(page))
+ clear_page_hwpoison_huge_page(page);
+@@ -1441,7 +1441,7 @@ static int soft_offline_huge_page(struct page *page, int flags)
+ }
+ done:
+ if (!PageHWPoison(hpage))
+- atomic_long_add(1 << compound_trans_order(hpage), &mce_bad_pages);
++ atomic_long_add_unchecked(1 << compound_trans_order(hpage), &mce_bad_pages);
+ set_page_hwpoison_huge_page(hpage);
+ dequeue_hwpoisoned_huge_page(hpage);
+ /* keep elevated page count for bad page */
+@@ -1572,7 +1572,7 @@ int soft_offline_page(struct page *page, int flags)
+ return ret;
+
+ done:
+- atomic_long_add(1, &mce_bad_pages);
++ atomic_long_add_unchecked(1, &mce_bad_pages);
+ SetPageHWPoison(page);
+ /* keep elevated page count for bad page */
+ return ret;
+diff --git a/mm/memory.c b/mm/memory.c
+index b2b8731..6080174 100644
+--- a/mm/memory.c
++++ b/mm/memory.c
+@@ -457,8 +457,12 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
return;
pmd = pmd_offset(pud, start);
@@ -68499,7 +70127,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
}
static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
-@@ -489,9 +493,12 @@ static inline void free_pud_range(struct
+@@ -489,9 +493,12 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
if (end - 1 > ceiling - 1)
return;
@@ -68525,7 +70153,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
/**
* __get_user_pages() - pin user pages in memory
* @tsk: task_struct of target task
-@@ -1644,10 +1645,10 @@ int __get_user_pages(struct task_struct
+@@ -1644,10 +1645,10 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
(VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
i = 0;
@@ -68538,7 +70166,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
if (!vma && in_gate_area(mm, start)) {
unsigned long pg = start & PAGE_MASK;
pgd_t *pgd;
-@@ -1695,7 +1696,7 @@ int __get_user_pages(struct task_struct
+@@ -1695,7 +1696,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
goto next_page;
}
@@ -68547,7 +70175,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
(vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
!(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1722,11 +1723,6 @@ int __get_user_pages(struct task_struct
+@@ -1722,11 +1723,6 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
int ret;
unsigned int fault_flags = 0;
@@ -68568,7 +70196,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
return i;
}
EXPORT_SYMBOL(__get_user_pages);
-@@ -2007,6 +2003,10 @@ static int insert_page(struct vm_area_st
+@@ -2007,6 +2003,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
page_add_file_rmap(page);
set_pte_at(mm, addr, pte, mk_pte(page, prot));
@@ -68602,7 +70230,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
vma->vm_flags |= VM_INSERTPAGE;
return insert_page(vma, addr, page, vma->vm_page_prot);
}
-@@ -2130,6 +2142,7 @@ int vm_insert_mixed(struct vm_area_struc
+@@ -2130,6 +2142,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn)
{
BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
@@ -68610,7 +70238,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
-@@ -2445,6 +2458,186 @@ static inline void cow_user_page(struct
+@@ -2445,6 +2458,186 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
copy_user_highpage(dst, src, va, vma);
}
@@ -68821,7 +70449,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
/* Free the old page.. */
new_page = old_page;
ret |= VM_FAULT_WRITE;
-@@ -2986,6 +3189,11 @@ static int do_swap_page(struct mm_struct
+@@ -2986,6 +3189,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
swap_free(entry);
if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
try_to_free_swap(page);
@@ -68833,7 +70461,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
unlock_page(page);
if (swapcache) {
/*
-@@ -3009,6 +3217,11 @@ static int do_swap_page(struct mm_struct
+@@ -3009,6 +3217,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, page_table);
@@ -68886,7 +70514,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
* We enter with non-exclusive mmap_sem (to exclude vma changes,
* but allow concurrent faults), and pte mapped but not yet locked.
* We return with mmap_sem still held, but pte unmapped and unlocked.
-@@ -3070,27 +3249,23 @@ static int do_anonymous_page(struct mm_s
+@@ -3070,27 +3249,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *page_table, pmd_t *pmd,
unsigned int flags)
{
@@ -68919,7 +70547,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
if (unlikely(anon_vma_prepare(vma)))
goto oom;
page = alloc_zeroed_user_highpage_movable(vma, address);
-@@ -3109,6 +3284,11 @@ static int do_anonymous_page(struct mm_s
+@@ -3109,6 +3284,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
if (!pte_none(*page_table))
goto release;
@@ -68944,7 +70572,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
unlock:
pte_unmap_unlock(page_table, ptl);
return 0;
-@@ -3259,6 +3445,12 @@ static int __do_fault(struct mm_struct *
+@@ -3259,6 +3445,12 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
*/
/* Only go through if we didn't race with anybody else... */
if (likely(pte_same(*page_table, orig_pte))) {
@@ -68957,7 +70585,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (flags & FAULT_FLAG_WRITE)
-@@ -3278,6 +3470,14 @@ static int __do_fault(struct mm_struct *
+@@ -3278,6 +3470,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, page_table);
@@ -68972,7 +70600,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
} else {
if (cow_page)
mem_cgroup_uncharge_page(cow_page);
-@@ -3431,6 +3631,12 @@ int handle_pte_fault(struct mm_struct *m
+@@ -3431,6 +3631,12 @@ int handle_pte_fault(struct mm_struct *mm,
if (flags & FAULT_FLAG_WRITE)
flush_tlb_fix_spurious_fault(vma, address);
}
@@ -68985,7 +70613,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
unlock:
pte_unmap_unlock(pte, ptl);
return 0;
-@@ -3447,6 +3653,10 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3447,6 +3653,10 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
pmd_t *pmd;
pte_t *pte;
@@ -68996,7 +70624,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
-@@ -3458,6 +3668,34 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3458,6 +3668,34 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
if (unlikely(is_vm_hugetlb_page(vma)))
return hugetlb_fault(mm, vma, address, flags);
@@ -69031,7 +70659,7 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
pgd = pgd_offset(mm, address);
pud = pud_alloc(mm, pgd, address);
if (!pud)
-@@ -3487,7 +3725,7 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3487,7 +3725,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
* run pte_offset_map on the pmd, if an huge pmd could
* materialize from under us from a different thread.
*/
@@ -69049,94 +70677,11 @@ diff -urNp linux-3.1.4/mm/memory.c linux-3.1.4/mm/memory.c
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-diff -urNp linux-3.1.4/mm/memory-failure.c linux-3.1.4/mm/memory-failure.c
---- linux-3.1.4/mm/memory-failure.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/memory-failure.c 2011-11-16 18:39:08.000000000 -0500
-@@ -60,7 +60,7 @@ int sysctl_memory_failure_early_kill __r
-
- int sysctl_memory_failure_recovery __read_mostly = 1;
-
--atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
-+atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
-
- #if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE)
-
-@@ -201,7 +201,7 @@ static int kill_proc_ao(struct task_stru
- si.si_signo = SIGBUS;
- si.si_errno = 0;
- si.si_code = BUS_MCEERR_AO;
-- si.si_addr = (void *)addr;
-+ si.si_addr = (void __user *)addr;
- #ifdef __ARCH_SI_TRAPNO
- si.si_trapno = trapno;
- #endif
-@@ -1009,7 +1009,7 @@ int __memory_failure(unsigned long pfn,
- }
-
- nr_pages = 1 << compound_trans_order(hpage);
-- atomic_long_add(nr_pages, &mce_bad_pages);
-+ atomic_long_add_unchecked(nr_pages, &mce_bad_pages);
-
- /*
- * We need/can do nothing about count=0 pages.
-@@ -1039,7 +1039,7 @@ int __memory_failure(unsigned long pfn,
- if (!PageHWPoison(hpage)
- || (hwpoison_filter(p) && TestClearPageHWPoison(p))
- || (p != hpage && TestSetPageHWPoison(hpage))) {
-- atomic_long_sub(nr_pages, &mce_bad_pages);
-+ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
- return 0;
- }
- set_page_hwpoison_huge_page(hpage);
-@@ -1097,7 +1097,7 @@ int __memory_failure(unsigned long pfn,
- }
- if (hwpoison_filter(p)) {
- if (TestClearPageHWPoison(p))
-- atomic_long_sub(nr_pages, &mce_bad_pages);
-+ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
- unlock_page(hpage);
- put_page(hpage);
- return 0;
-@@ -1314,7 +1314,7 @@ int unpoison_memory(unsigned long pfn)
- return 0;
- }
- if (TestClearPageHWPoison(p))
-- atomic_long_sub(nr_pages, &mce_bad_pages);
-+ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
- pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn);
- return 0;
- }
-@@ -1328,7 +1328,7 @@ int unpoison_memory(unsigned long pfn)
- */
- if (TestClearPageHWPoison(page)) {
- pr_info("MCE: Software-unpoisoned page %#lx\n", pfn);
-- atomic_long_sub(nr_pages, &mce_bad_pages);
-+ atomic_long_sub_unchecked(nr_pages, &mce_bad_pages);
- freeit = 1;
- if (PageHuge(page))
- clear_page_hwpoison_huge_page(page);
-@@ -1441,7 +1441,7 @@ static int soft_offline_huge_page(struct
- }
- done:
- if (!PageHWPoison(hpage))
-- atomic_long_add(1 << compound_trans_order(hpage), &mce_bad_pages);
-+ atomic_long_add_unchecked(1 << compound_trans_order(hpage), &mce_bad_pages);
- set_page_hwpoison_huge_page(hpage);
- dequeue_hwpoisoned_huge_page(hpage);
- /* keep elevated page count for bad page */
-@@ -1572,7 +1572,7 @@ int soft_offline_page(struct page *page,
- return ret;
-
- done:
-- atomic_long_add(1, &mce_bad_pages);
-+ atomic_long_add_unchecked(1, &mce_bad_pages);
- SetPageHWPoison(page);
- /* keep elevated page count for bad page */
- return ret;
-diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
---- linux-3.1.4/mm/mempolicy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/mempolicy.c 2011-11-16 18:40:44.000000000 -0500
-@@ -639,6 +639,10 @@ static int mbind_range(struct mm_struct
+diff --git a/mm/mempolicy.c b/mm/mempolicy.c
+index 9c51f9f..a9416cf 100644
+--- a/mm/mempolicy.c
++++ b/mm/mempolicy.c
+@@ -639,6 +639,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
unsigned long vmstart;
unsigned long vmend;
@@ -69147,7 +70692,7 @@ diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
vma = find_vma_prev(mm, start, &prev);
if (!vma || vma->vm_start > start)
return -EFAULT;
-@@ -669,6 +673,16 @@ static int mbind_range(struct mm_struct
+@@ -669,6 +673,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
err = policy_vma(vma, new_pol);
if (err)
goto out;
@@ -69164,7 +70709,7 @@ diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
}
out:
-@@ -1102,6 +1116,17 @@ static long do_mbind(unsigned long start
+@@ -1102,6 +1116,17 @@ static long do_mbind(unsigned long start, unsigned long len,
if (end < start)
return -EINVAL;
@@ -69182,7 +70727,7 @@ diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
if (end == start)
return 0;
-@@ -1320,6 +1345,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1320,6 +1345,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
if (!mm)
goto out;
@@ -69197,7 +70742,7 @@ diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1329,8 +1362,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
+@@ -1329,8 +1362,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -69207,10 +70752,11 @@ diff -urNp linux-3.1.4/mm/mempolicy.c linux-3.1.4/mm/mempolicy.c
rcu_read_unlock();
err = -EPERM;
goto out;
-diff -urNp linux-3.1.4/mm/migrate.c linux-3.1.4/mm/migrate.c
---- linux-3.1.4/mm/migrate.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/migrate.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1124,6 +1124,8 @@ static int do_pages_move(struct mm_struc
+diff --git a/mm/migrate.c b/mm/migrate.c
+index 14d0a6a..81ffe69 100644
+--- a/mm/migrate.c
++++ b/mm/migrate.c
+@@ -1124,6 +1124,8 @@ static int do_pages_move(struct mm_struct *mm, struct task_struct *task,
unsigned long chunk_start;
int err;
@@ -69219,7 +70765,7 @@ diff -urNp linux-3.1.4/mm/migrate.c linux-3.1.4/mm/migrate.c
task_nodes = cpuset_mems_allowed(task);
err = -ENOMEM;
-@@ -1308,6 +1310,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1308,6 +1310,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
if (!mm)
return -EINVAL;
@@ -69234,7 +70780,7 @@ diff -urNp linux-3.1.4/mm/migrate.c linux-3.1.4/mm/migrate.c
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1317,8 +1327,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1317,8 +1327,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -69244,9 +70790,10 @@ diff -urNp linux-3.1.4/mm/migrate.c linux-3.1.4/mm/migrate.c
rcu_read_unlock();
err = -EPERM;
goto out;
-diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
---- linux-3.1.4/mm/mlock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/mlock.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/mlock.c b/mm/mlock.c
+index 048260c..57f4a4e 100644
+--- a/mm/mlock.c
++++ b/mm/mlock.c
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
@@ -69255,7 +70802,7 @@ diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/rmap.h>
-@@ -377,6 +378,9 @@ static int do_mlock(unsigned long start,
+@@ -377,6 +378,9 @@ static int do_mlock(unsigned long start, size_t len, int on)
return -EINVAL;
if (end == start)
return 0;
@@ -69265,7 +70812,7 @@ diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
vma = find_vma_prev(current->mm, start, &prev);
if (!vma || vma->vm_start > start)
return -ENOMEM;
-@@ -387,6 +391,11 @@ static int do_mlock(unsigned long start,
+@@ -387,6 +391,11 @@ static int do_mlock(unsigned long start, size_t len, int on)
for (nstart = start ; ; ) {
vm_flags_t newflags;
@@ -69277,7 +70824,7 @@ diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
/* Here we know that vma->vm_start <= nstart < vma->vm_end. */
newflags = vma->vm_flags | VM_LOCKED;
-@@ -492,6 +501,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
+@@ -492,6 +501,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len)
lock_limit >>= PAGE_SHIFT;
/* check against resource limits */
@@ -69285,7 +70832,7 @@ diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = do_mlock(start, len, 1);
up_write(&current->mm->mmap_sem);
-@@ -515,17 +525,23 @@ SYSCALL_DEFINE2(munlock, unsigned long,
+@@ -515,17 +525,23 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len)
static int do_mlockall(int flags)
{
struct vm_area_struct * vma, * prev = NULL;
@@ -69320,9 +70867,10 @@ diff -urNp linux-3.1.4/mm/mlock.c linux-3.1.4/mm/mlock.c
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
-diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
---- linux-3.1.4/mm/mmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/mmap.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/mmap.c b/mm/mmap.c
+index a65efd4..17d61ff 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
@@ -46,6 +46,16 @@
#define arch_rebalance_pgtables(addr, len) (addr)
#endif
@@ -69340,7 +70888,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
static void unmap_region(struct mm_struct *mm,
struct vm_area_struct *vma, struct vm_area_struct *prev,
unsigned long start, unsigned long end);
-@@ -71,22 +81,32 @@ static void unmap_region(struct mm_struc
+@@ -71,22 +81,32 @@ static void unmap_region(struct mm_struct *mm,
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
*
*/
@@ -69376,7 +70924,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* Make sure vm_committed_as in one cacheline and not cacheline shared with
* other variables. It can be updated by several CPUs frequently.
-@@ -228,6 +248,7 @@ static struct vm_area_struct *remove_vma
+@@ -228,6 +248,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
struct vm_area_struct *next = vma->vm_next;
might_sleep();
@@ -69418,7 +70966,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
pgoff_t vm_pglen;
-@@ -750,13 +784,20 @@ can_vma_merge_after(struct vm_area_struc
+@@ -750,13 +784,20 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
struct vm_area_struct *vma_merge(struct mm_struct *mm,
struct vm_area_struct *prev, unsigned long addr,
unsigned long end, unsigned long vm_flags,
@@ -69440,7 +70988,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -772,6 +813,15 @@ struct vm_area_struct *vma_merge(struct
+@@ -772,6 +813,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
@@ -69456,7 +71004,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* Can it merge with the predecessor?
*/
-@@ -791,9 +841,24 @@ struct vm_area_struct *vma_merge(struct
+@@ -791,9 +841,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
/* cases 1, 6 */
err = vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
@@ -69482,7 +71030,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (err)
return NULL;
khugepaged_enter_vma_merge(prev);
-@@ -807,12 +872,27 @@ struct vm_area_struct *vma_merge(struct
+@@ -807,12 +872,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
mpol_equal(policy, vma_policy(next)) &&
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen)) {
@@ -69528,7 +71076,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
mm->stack_vm += pages;
if (flags & (VM_RESERVED|VM_IO))
mm->reserved_vm += pages;
-@@ -955,7 +1032,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -955,7 +1032,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
@@ -69537,7 +71085,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
-@@ -981,7 +1058,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -981,7 +1058,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
@@ -69546,7 +71094,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (addr & ~PAGE_MASK)
return addr;
-@@ -992,6 +1069,36 @@ unsigned long do_mmap_pgoff(struct file
+@@ -992,6 +1069,36 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
@@ -69583,7 +71131,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (flags & MAP_LOCKED)
if (!can_do_mlock())
return -EPERM;
-@@ -1003,6 +1110,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1003,6 +1110,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
@@ -69591,7 +71139,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1073,6 +1181,9 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1073,6 +1181,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
if (error)
return error;
@@ -69601,7 +71149,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return mmap_region(file, addr, len, flags, vm_flags, pgoff);
}
EXPORT_SYMBOL(do_mmap_pgoff);
-@@ -1153,7 +1264,7 @@ int vma_wants_writenotify(struct vm_area
+@@ -1153,7 +1264,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
vm_flags_t vm_flags = vma->vm_flags;
/* If it was private or non-writable, the write bit is already clear */
@@ -69610,7 +71158,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1202,14 +1313,24 @@ unsigned long mmap_region(struct file *f
+@@ -1202,14 +1313,24 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
unsigned long charged = 0;
struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
@@ -69752,7 +71300,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* Get an address range which is currently unmapped.
* For shmat() with addr=0.
*
-@@ -1374,18 +1568,23 @@ arch_get_unmapped_area(struct file *filp
+@@ -1374,18 +1568,23 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -69835,7 +71383,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
mm->free_area_cache = addr;
mm->cached_hole_size = ~0UL;
}
-@@ -1441,7 +1646,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1441,7 +1646,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
@@ -69844,7 +71392,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -1450,13 +1655,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1450,13 +1655,18 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (flags & MAP_FIXED)
return addr;
@@ -69867,7 +71415,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
}
/* check if free_area_cache is useful for us */
-@@ -1471,7 +1681,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1471,7 +1681,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
@@ -69876,7 +71424,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -1488,7 +1698,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1488,7 +1698,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
* return with success:
*/
vma = find_vma(mm, addr);
@@ -69885,7 +71433,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
-@@ -1497,8 +1707,8 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1497,8 +1707,8 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
mm->cached_hole_size = vma->vm_start - addr;
/* try just below the current vma->vm_start */
@@ -69933,7 +71481,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* Is this a new hole at the highest possible address?
*/
-@@ -1529,8 +1753,10 @@ void arch_unmap_area_topdown(struct mm_s
+@@ -1529,8 +1753,10 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
mm->free_area_cache = addr;
/* dont allow allocations above current base */
@@ -69974,7 +71522,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -1654,6 +1902,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1654,6 +1902,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
return -ENOMEM;
/* Stack limit test */
@@ -69982,7 +71530,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
return -ENOMEM;
-@@ -1664,6 +1913,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1664,6 +1913,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
locked = mm->locked_vm + grow;
limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
limit >>= PAGE_SHIFT;
@@ -69990,7 +71538,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (locked > limit && !capable(CAP_IPC_LOCK))
return -ENOMEM;
}
-@@ -1694,37 +1944,48 @@ static int acct_stack_growth(struct vm_a
+@@ -1694,37 +1944,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
* PA-RISC uses this for its stack; IA64 for its Register Backing Store.
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
@@ -70048,7 +71596,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
unsigned long size, grow;
size = address - vma->vm_start;
-@@ -1739,6 +2000,8 @@ int expand_upwards(struct vm_area_struct
+@@ -1739,6 +2000,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
}
}
}
@@ -70057,7 +71605,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
vma_unlock_anon_vma(vma);
khugepaged_enter_vma_merge(vma);
return error;
-@@ -1752,6 +2015,8 @@ int expand_downwards(struct vm_area_stru
+@@ -1752,6 +2015,8 @@ int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
int error;
@@ -70066,7 +71614,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* We must make sure the anon_vma is allocated
-@@ -1765,6 +2030,15 @@ int expand_downwards(struct vm_area_stru
+@@ -1765,6 +2030,15 @@ int expand_downwards(struct vm_area_struct *vma,
if (error)
return error;
@@ -70082,7 +71630,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
vma_lock_anon_vma(vma);
/*
-@@ -1774,9 +2048,17 @@ int expand_downwards(struct vm_area_stru
+@@ -1774,9 +2048,17 @@ int expand_downwards(struct vm_area_struct *vma,
*/
/* Somebody else might have raced and expanded it already */
@@ -70101,7 +71649,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -1786,11 +2068,22 @@ int expand_downwards(struct vm_area_stru
+@@ -1786,11 +2068,22 @@ int expand_downwards(struct vm_area_struct *vma,
if (!error) {
vma->vm_start = address;
vma->vm_pgoff -= grow;
@@ -70124,7 +71672,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
khugepaged_enter_vma_merge(vma);
return error;
}
-@@ -1860,6 +2153,13 @@ static void remove_vma_list(struct mm_st
+@@ -1860,6 +2153,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
do {
long nrpages = vma_pages(vma);
@@ -70138,7 +71686,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
mm->total_vm -= nrpages;
vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
vma = remove_vma(vma);
-@@ -1905,6 +2205,16 @@ detach_vmas_to_be_unmapped(struct mm_str
+@@ -1905,6 +2205,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
vma->vm_prev = NULL;
do {
@@ -70155,7 +71703,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
rb_erase(&vma->vm_rb, &mm->mm_rb);
mm->map_count--;
tail_vma = vma;
-@@ -1933,14 +2243,33 @@ static int __split_vma(struct mm_struct
+@@ -1933,14 +2243,33 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
struct vm_area_struct *new;
int err = -ENOMEM;
@@ -70189,7 +71737,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* most fields are the same, copy all, and then fixup */
*new = *vma;
-@@ -1953,6 +2282,22 @@ static int __split_vma(struct mm_struct
+@@ -1953,6 +2282,22 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
}
@@ -70212,7 +71760,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
pol = mpol_dup(vma_policy(vma));
if (IS_ERR(pol)) {
err = PTR_ERR(pol);
-@@ -1978,6 +2323,42 @@ static int __split_vma(struct mm_struct
+@@ -1978,6 +2323,42 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
else
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
@@ -70255,7 +71803,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/* Success. */
if (!err)
return 0;
-@@ -1990,10 +2371,18 @@ static int __split_vma(struct mm_struct
+@@ -1990,10 +2371,18 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
removed_exe_file_vma(mm);
fput(new->vm_file);
}
@@ -70275,7 +71823,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
kmem_cache_free(vm_area_cachep, new);
out_err:
return err;
-@@ -2006,6 +2395,15 @@ static int __split_vma(struct mm_struct
+@@ -2006,6 +2395,15 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, int new_below)
{
@@ -70291,7 +71839,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (mm->map_count >= sysctl_max_map_count)
return -ENOMEM;
-@@ -2017,11 +2415,30 @@ int split_vma(struct mm_struct *mm, stru
+@@ -2017,11 +2415,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
* work. This now handles partial unmappings.
* Jeremy Fitzhardinge <jeremy@goop.org>
*/
@@ -70322,7 +71870,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
return -EINVAL;
-@@ -2096,6 +2513,8 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -2096,6 +2513,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
/* Fix up all other VM information */
remove_vma_list(mm, vma);
@@ -70331,7 +71879,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return 0;
}
-@@ -2108,22 +2527,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a
+@@ -2108,22 +2527,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
profile_munmap(addr);
@@ -70360,7 +71908,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* this is really a simplified "do_mmap". it only handles
* anonymous maps. eventually we may be able to do some
-@@ -2137,6 +2552,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2137,6 +2552,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
struct rb_node ** rb_link, * rb_parent;
pgoff_t pgoff = addr >> PAGE_SHIFT;
int error;
@@ -70368,7 +71916,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
len = PAGE_ALIGN(len);
if (!len)
-@@ -2148,16 +2564,30 @@ unsigned long do_brk(unsigned long addr,
+@@ -2148,16 +2564,30 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
@@ -70400,7 +71948,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
-@@ -2174,22 +2604,22 @@ unsigned long do_brk(unsigned long addr,
+@@ -2174,22 +2604,22 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
/*
* Clear old maps. this also does some error checking for us
*/
@@ -70427,7 +71975,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
-@@ -2203,7 +2633,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2203,7 +2633,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
*/
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma) {
@@ -70436,7 +71984,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return -ENOMEM;
}
-@@ -2217,11 +2647,12 @@ unsigned long do_brk(unsigned long addr,
+@@ -2217,11 +2647,12 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
perf_event_mmap(vma);
@@ -70463,7 +72011,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
}
-@@ -2283,6 +2716,13 @@ int insert_vm_struct(struct mm_struct *
+@@ -2283,6 +2716,13 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
struct vm_area_struct * __vma, * prev;
struct rb_node ** rb_link, * rb_parent;
@@ -70477,7 +72025,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* The vm_pgoff of a purely anonymous vma should be irrelevant
* until its first write fault, when page's anon_vma and index
-@@ -2305,7 +2745,22 @@ int insert_vm_struct(struct mm_struct *
+@@ -2305,7 +2745,22 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
if ((vma->vm_flags & VM_ACCOUNT) &&
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
@@ -70500,7 +72048,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
return 0;
}
-@@ -2323,6 +2778,8 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2323,6 +2778,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
struct rb_node **rb_link, *rb_parent;
struct mempolicy *pol;
@@ -70509,7 +72057,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* If anonymous vma has not yet been faulted, update new pgoff
* to match new location, to increase its chance of merging.
-@@ -2373,6 +2830,39 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2373,6 +2830,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
return NULL;
}
@@ -70549,7 +72097,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
/*
* Return true if the calling process may expand its vm space by the passed
* number of pages
-@@ -2383,7 +2873,7 @@ int may_expand_vm(struct mm_struct *mm,
+@@ -2383,7 +2873,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
unsigned long lim;
lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
@@ -70558,7 +72106,7 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
if (cur + npages > lim)
return 0;
return 1;
-@@ -2454,6 +2944,22 @@ int install_special_mapping(struct mm_st
+@@ -2454,6 +2944,22 @@ int install_special_mapping(struct mm_struct *mm,
vma->vm_start = addr;
vma->vm_end = addr + len;
@@ -70581,9 +72129,10 @@ diff -urNp linux-3.1.4/mm/mmap.c linux-3.1.4/mm/mmap.c
vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND;
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
-diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
---- linux-3.1.4/mm/mprotect.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/mprotect.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/mprotect.c b/mm/mprotect.c
+index 5a688a2..27e031c 100644
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
@@ -23,10 +23,16 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
@@ -70601,7 +72150,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
#ifndef pgprot_modify
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
-@@ -141,6 +147,48 @@ static void change_protection(struct vm_
+@@ -141,6 +147,48 @@ static void change_protection(struct vm_area_struct *vma,
flush_tlb_range(vma, start, end);
}
@@ -70650,7 +72199,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
int
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
unsigned long start, unsigned long end, unsigned long newflags)
-@@ -153,11 +201,29 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -153,11 +201,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
int error;
int dirty_accountable = 0;
@@ -70680,7 +72229,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
/*
* If we make a private mapping writable we increase our commit;
* but (without finer accounting) cannot reduce our commit if we
-@@ -174,6 +240,42 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -174,6 +240,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
}
}
@@ -70746,7 +72295,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
if (vma_wants_writenotify(vma)) {
vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
-@@ -248,6 +362,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -248,6 +362,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
end = start + len;
if (end <= start)
return -ENOMEM;
@@ -70764,7 +72313,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
if (!arch_validate_prot(prot))
return -EINVAL;
-@@ -255,7 +380,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -255,7 +380,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
@@ -70773,7 +72322,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
-@@ -287,6 +412,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -287,6 +412,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
if (start > vma->vm_start)
prev = vma;
@@ -70785,7 +72334,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
for (nstart = start ; ; ) {
unsigned long newflags;
-@@ -296,6 +426,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -296,6 +426,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/* newflags >> 4 shift VM_MAY% in place of VM_% */
if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
@@ -70800,7 +72349,7 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
error = -EACCES;
goto out;
}
-@@ -310,6 +448,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -310,6 +448,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
if (error)
goto out;
@@ -70810,10 +72359,11 @@ diff -urNp linux-3.1.4/mm/mprotect.c linux-3.1.4/mm/mprotect.c
nstart = tmp;
if (nstart < prev->vm_end)
-diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
---- linux-3.1.4/mm/mremap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/mremap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -113,6 +113,12 @@ static void move_ptes(struct vm_area_str
+diff --git a/mm/mremap.c b/mm/mremap.c
+index 506fa44..ccc0ba9 100644
+--- a/mm/mremap.c
++++ b/mm/mremap.c
+@@ -113,6 +113,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
continue;
pte = ptep_clear_flush(vma, old_addr, old_pte);
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
@@ -70826,7 +72376,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
set_pte_at(mm, new_addr, new_pte, pte);
}
-@@ -272,6 +278,11 @@ static struct vm_area_struct *vma_to_res
+@@ -272,6 +278,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
if (is_vm_hugetlb_page(vma))
goto Einval;
@@ -70838,7 +72388,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
/* We can't remap across vm area boundaries */
if (old_len > vma->vm_end - addr)
goto Efault;
-@@ -328,20 +339,25 @@ static unsigned long mremap_to(unsigned
+@@ -328,20 +339,25 @@ static unsigned long mremap_to(unsigned long addr,
unsigned long ret = -EINVAL;
unsigned long charged = 0;
unsigned long map_flags;
@@ -70869,7 +72419,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
goto out;
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
-@@ -413,6 +429,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -413,6 +429,7 @@ unsigned long do_mremap(unsigned long addr,
struct vm_area_struct *vma;
unsigned long ret = -EINVAL;
unsigned long charged = 0;
@@ -70877,7 +72427,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
goto out;
-@@ -431,6 +448,17 @@ unsigned long do_mremap(unsigned long ad
+@@ -431,6 +448,17 @@ unsigned long do_mremap(unsigned long addr,
if (!new_len)
goto out;
@@ -70895,7 +72445,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
if (flags & MREMAP_FIXED) {
if (flags & MREMAP_MAYMOVE)
ret = mremap_to(addr, old_len, new_addr, new_len);
-@@ -480,6 +508,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -480,6 +508,7 @@ unsigned long do_mremap(unsigned long addr,
addr + new_len);
}
ret = addr;
@@ -70903,7 +72453,7 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
goto out;
}
}
-@@ -506,7 +535,13 @@ unsigned long do_mremap(unsigned long ad
+@@ -506,7 +535,13 @@ unsigned long do_mremap(unsigned long addr,
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
if (ret)
goto out;
@@ -70917,10 +72467,11 @@ diff -urNp linux-3.1.4/mm/mremap.c linux-3.1.4/mm/mremap.c
}
out:
if (ret & ~PAGE_MASK)
-diff -urNp linux-3.1.4/mm/nobootmem.c linux-3.1.4/mm/nobootmem.c
---- linux-3.1.4/mm/nobootmem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/nobootmem.c 2011-11-16 18:39:08.000000000 -0500
-@@ -110,19 +110,30 @@ static void __init __free_pages_memory(u
+diff --git a/mm/nobootmem.c b/mm/nobootmem.c
+index 6e93dc7..c98df0c 100644
+--- a/mm/nobootmem.c
++++ b/mm/nobootmem.c
+@@ -110,19 +110,30 @@ static void __init __free_pages_memory(unsigned long start, unsigned long end)
unsigned long __init free_all_memory_core_early(int nodeid)
{
int i;
@@ -70953,10 +72504,11 @@ diff -urNp linux-3.1.4/mm/nobootmem.c linux-3.1.4/mm/nobootmem.c
return count;
}
-diff -urNp linux-3.1.4/mm/nommu.c linux-3.1.4/mm/nommu.c
---- linux-3.1.4/mm/nommu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/nommu.c 2011-11-16 18:39:08.000000000 -0500
-@@ -62,7 +62,6 @@ int sysctl_overcommit_memory = OVERCOMMI
+diff --git a/mm/nommu.c b/mm/nommu.c
+index 4358032..e79b99f 100644
+--- a/mm/nommu.c
++++ b/mm/nommu.c
+@@ -62,7 +62,6 @@ int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS;
@@ -70964,7 +72516,7 @@ diff -urNp linux-3.1.4/mm/nommu.c linux-3.1.4/mm/nommu.c
atomic_long_t mmap_pages_allocated;
-@@ -825,15 +824,6 @@ struct vm_area_struct *find_vma(struct m
+@@ -825,15 +824,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
EXPORT_SYMBOL(find_vma);
/*
@@ -70980,7 +72532,7 @@ diff -urNp linux-3.1.4/mm/nommu.c linux-3.1.4/mm/nommu.c
* expand a stack to a given address
* - not supported under NOMMU conditions
*/
-@@ -1553,6 +1543,7 @@ int split_vma(struct mm_struct *mm, stru
+@@ -1553,6 +1543,7 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
/* most fields are the same, copy all, and then fixup */
*new = *vma;
@@ -70988,10 +72540,11 @@ diff -urNp linux-3.1.4/mm/nommu.c linux-3.1.4/mm/nommu.c
*region = *vma->vm_region;
new->vm_region = region;
-diff -urNp linux-3.1.4/mm/oom_kill.c linux-3.1.4/mm/oom_kill.c
---- linux-3.1.4/mm/oom_kill.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/oom_kill.c 2011-11-18 18:44:21.000000000 -0500
-@@ -162,7 +162,7 @@ static bool oom_unkillable_task(struct t
+diff --git a/mm/oom_kill.c b/mm/oom_kill.c
+index 626303b..e9a1785 100644
+--- a/mm/oom_kill.c
++++ b/mm/oom_kill.c
+@@ -162,7 +162,7 @@ static bool oom_unkillable_task(struct task_struct *p,
unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
const nodemask_t *nodemask, unsigned long totalpages)
{
@@ -71000,9 +72553,10 @@ diff -urNp linux-3.1.4/mm/oom_kill.c linux-3.1.4/mm/oom_kill.c
if (oom_unkillable_task(p, mem, nodemask))
return 0;
-diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
---- linux-3.1.4/mm/page_alloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/page_alloc.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 6e8ecb6..50b8879 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
@@ -340,7 +340,7 @@ out:
* This usage means that zero-order pages may not be compound.
*/
@@ -71012,7 +72566,7 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
{
__free_pages_ok(page, compound_order(page));
}
-@@ -653,6 +653,10 @@ static bool free_pages_prepare(struct pa
+@@ -653,6 +653,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
int i;
int bad = 0;
@@ -71023,7 +72577,7 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
trace_mm_page_free_direct(page, order);
kmemcheck_free_shadow(page, order);
-@@ -668,6 +672,12 @@ static bool free_pages_prepare(struct pa
+@@ -668,6 +672,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
debug_check_no_obj_freed(page_address(page),
PAGE_SIZE << order);
}
@@ -71036,7 +72590,7 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
-@@ -783,8 +793,10 @@ static int prep_new_page(struct page *pa
+@@ -783,8 +793,10 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1);
@@ -71047,7 +72601,7 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
-@@ -2539,6 +2551,8 @@ void show_free_areas(unsigned int filter
+@@ -2539,6 +2551,8 @@ void show_free_areas(unsigned int filter)
int cpu;
struct zone *zone;
@@ -71056,7 +72610,7 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
for_each_populated_zone(zone) {
if (skip_free_areas_node(filter, zone_to_nid(zone)))
continue;
-@@ -3350,7 +3364,13 @@ static int pageblock_is_reserved(unsigne
+@@ -3350,7 +3364,13 @@ static int pageblock_is_reserved(unsigned long start_pfn, unsigned long end_pfn)
unsigned long pfn;
for (pfn = start_pfn; pfn < end_pfn; pfn++) {
@@ -71070,10 +72624,11 @@ diff -urNp linux-3.1.4/mm/page_alloc.c linux-3.1.4/mm/page_alloc.c
return 1;
}
return 0;
-diff -urNp linux-3.1.4/mm/percpu.c linux-3.1.4/mm/percpu.c
---- linux-3.1.4/mm/percpu.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/percpu.c 2011-11-16 18:39:08.000000000 -0500
-@@ -121,7 +121,7 @@ static unsigned int pcpu_first_unit_cpu
+diff --git a/mm/percpu.c b/mm/percpu.c
+index bf80e55..c7c3f9a 100644
+--- a/mm/percpu.c
++++ b/mm/percpu.c
+@@ -121,7 +121,7 @@ static unsigned int pcpu_first_unit_cpu __read_mostly;
static unsigned int pcpu_last_unit_cpu __read_mostly;
/* the address of the first chunk which starts with the kernel static area */
@@ -71082,10 +72637,11 @@ diff -urNp linux-3.1.4/mm/percpu.c linux-3.1.4/mm/percpu.c
EXPORT_SYMBOL_GPL(pcpu_base_addr);
static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */
-diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
---- linux-3.1.4/mm/rmap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/rmap.c 2011-11-16 18:39:08.000000000 -0500
-@@ -152,6 +152,10 @@ int anon_vma_prepare(struct vm_area_stru
+diff --git a/mm/rmap.c b/mm/rmap.c
+index 8005080..198c2cd 100644
+--- a/mm/rmap.c
++++ b/mm/rmap.c
+@@ -152,6 +152,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
struct anon_vma *anon_vma = vma->anon_vma;
struct anon_vma_chain *avc;
@@ -71096,7 +72652,7 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
might_sleep();
if (unlikely(!anon_vma)) {
struct mm_struct *mm = vma->vm_mm;
-@@ -161,6 +165,12 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -161,6 +165,12 @@ int anon_vma_prepare(struct vm_area_struct *vma)
if (!avc)
goto out_enomem;
@@ -71109,7 +72665,7 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
anon_vma = find_mergeable_anon_vma(vma);
allocated = NULL;
if (!anon_vma) {
-@@ -174,6 +184,21 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -174,6 +184,21 @@ int anon_vma_prepare(struct vm_area_struct *vma)
/* page_table_lock to protect against threads */
spin_lock(&mm->page_table_lock);
if (likely(!vma->anon_vma)) {
@@ -71131,7 +72687,7 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
vma->anon_vma = anon_vma;
avc->anon_vma = anon_vma;
avc->vma = vma;
-@@ -187,12 +212,24 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -187,12 +212,24 @@ int anon_vma_prepare(struct vm_area_struct *vma)
if (unlikely(allocated))
put_anon_vma(allocated);
@@ -71156,7 +72712,7 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
anon_vma_chain_free(avc);
out_enomem:
return -ENOMEM;
-@@ -243,7 +280,7 @@ static void anon_vma_chain_link(struct v
+@@ -243,7 +280,7 @@ static void anon_vma_chain_link(struct vm_area_struct *vma,
* Attach the anon_vmas from src to dst.
* Returns 0 on success, -ENOMEM on failure.
*/
@@ -71165,7 +72721,7 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
{
struct anon_vma_chain *avc, *pavc;
struct anon_vma *root = NULL;
-@@ -276,7 +313,7 @@ int anon_vma_clone(struct vm_area_struct
+@@ -276,7 +313,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
* the corresponding VMA in the parent process is attached to.
* Returns 0 on success, non-zero on failure.
*/
@@ -71174,9 +72730,10 @@ diff -urNp linux-3.1.4/mm/rmap.c linux-3.1.4/mm/rmap.c
{
struct anon_vma_chain *avc;
struct anon_vma *anon_vma;
-diff -urNp linux-3.1.4/mm/shmem.c linux-3.1.4/mm/shmem.c
---- linux-3.1.4/mm/shmem.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/shmem.c 2011-11-16 19:28:28.000000000 -0500
+diff --git a/mm/shmem.c b/mm/shmem.c
+index 32f6763..431c405 100644
+--- a/mm/shmem.c
++++ b/mm/shmem.c
@@ -31,7 +31,7 @@
#include <linux/module.h>
#include <linux/swap.h>
@@ -71195,7 +72752,7 @@ diff -urNp linux-3.1.4/mm/shmem.c linux-3.1.4/mm/shmem.c
struct shmem_xattr {
struct list_head list; /* anchored by shmem_inode_info->xattr_list */
-@@ -769,6 +769,8 @@ static struct page *shmem_swapin(swp_ent
+@@ -769,6 +769,8 @@ static struct page *shmem_swapin(swp_entry_t swap, gfp_t gfp,
struct mempolicy mpol, *spol;
struct vm_area_struct pvma;
@@ -71204,7 +72761,7 @@ diff -urNp linux-3.1.4/mm/shmem.c linux-3.1.4/mm/shmem.c
spol = mpol_cond_copy(&mpol,
mpol_shared_policy_lookup(&info->policy, index));
-@@ -2149,8 +2151,7 @@ int shmem_fill_super(struct super_block
+@@ -2149,8 +2151,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
int err = -ENOMEM;
/* Round up to L1_CACHE_BYTES to resist false sharing */
@@ -71214,9 +72771,10 @@ diff -urNp linux-3.1.4/mm/shmem.c linux-3.1.4/mm/shmem.c
if (!sbinfo)
return -ENOMEM;
-diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
---- linux-3.1.4/mm/slab.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/slab.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/slab.c b/mm/slab.c
+index 6d90a09..3cab423 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
@@ -151,7 +151,7 @@
/* Legal flag mask for kmem_cache_create(). */
@@ -71244,7 +72802,7 @@ diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
#define CACHE_CACHE 0
#define SIZE_AC MAX_NUMNODES
#define SIZE_L3 (2 * MAX_NUMNODES)
-@@ -389,10 +389,10 @@ static void kmem_list3_init(struct kmem_
+@@ -389,10 +389,10 @@ static void kmem_list3_init(struct kmem_list3 *parent)
if ((x)->max_freeable < i) \
(x)->max_freeable = i; \
} while (0)
@@ -71259,7 +72817,7 @@ diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
#else
#define STATS_INC_ACTIVE(x) do { } while (0)
#define STATS_DEC_ACTIVE(x) do { } while (0)
-@@ -538,7 +538,7 @@ static inline void *index_to_obj(struct
+@@ -538,7 +538,7 @@ static inline void *index_to_obj(struct kmem_cache *cache, struct slab *slab,
* reciprocal_divide(offset, cache->reciprocal_buffer_size)
*/
static inline unsigned int obj_to_index(const struct kmem_cache *cache,
@@ -71304,7 +72862,7 @@ diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
NULL);
}
#ifdef CONFIG_ZONE_DMA
-@@ -4324,10 +4324,10 @@ static int s_show(struct seq_file *m, vo
+@@ -4324,10 +4324,10 @@ static int s_show(struct seq_file *m, void *p)
}
/* cpu stats */
{
@@ -71319,7 +72877,7 @@ diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
seq_printf(m, " : cpustat %6lu %6lu %6lu %6lu",
allochit, allocmiss, freehit, freemiss);
-@@ -4584,15 +4584,70 @@ static const struct file_operations proc
+@@ -4584,15 +4584,70 @@ static const struct file_operations proc_slabstats_operations = {
static int __init slab_proc_init(void)
{
@@ -71392,9 +72950,10 @@ diff -urNp linux-3.1.4/mm/slab.c linux-3.1.4/mm/slab.c
/**
* ksize - get the actual amount of memory allocated for a given object
* @objp: Pointer to the object
-diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
---- linux-3.1.4/mm/slob.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/slob.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/mm/slob.c b/mm/slob.c
+index bf39181..727f7a3 100644
+--- a/mm/slob.c
++++ b/mm/slob.c
@@ -29,7 +29,7 @@
* If kmalloc is asked for objects of PAGE_SIZE or larger, it calls
* alloc_pages() directly, allocating compound pages so the page order
@@ -71431,7 +72990,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
}
static inline void set_slob_page(struct slob_page *sp)
-@@ -150,7 +152,7 @@ static inline void clear_slob_page(struc
+@@ -150,7 +152,7 @@ static inline void clear_slob_page(struct slob_page *sp)
static inline struct slob_page *slob_page(const void *addr)
{
@@ -71440,7 +72999,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
}
/*
-@@ -210,7 +212,7 @@ static void set_slob(slob_t *s, slobidx_
+@@ -210,7 +212,7 @@ static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
/*
* Return the size of a slob block.
*/
@@ -71467,7 +73026,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
{
return !((unsigned long)slob_next(s) & ~PAGE_MASK);
}
-@@ -254,6 +256,7 @@ static void *slob_new_pages(gfp_t gfp, i
+@@ -254,6 +256,7 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
if (!page)
return NULL;
@@ -71475,7 +73034,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
return page_address(page);
}
-@@ -370,11 +373,11 @@ static void *slob_alloc(size_t size, gfp
+@@ -370,11 +373,11 @@ static void *slob_alloc(size_t size, gfp_t gfp, int align, int node)
if (!b)
return NULL;
sp = slob_page(b);
@@ -71501,7 +73060,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
void *ret;
gfp &= gfp_allowed_mask;
-@@ -494,7 +496,10 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -494,7 +496,10 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
if (!m)
return NULL;
@@ -71513,7 +73072,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
ret = (void *)m + align;
trace_kmalloc_node(_RET_IP_, ret,
-@@ -506,16 +511,25 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -506,16 +511,25 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
gfp |= __GFP_COMP;
ret = slob_new_pages(gfp, order, node);
if (ret) {
@@ -71653,7 +73212,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
}
EXPORT_SYMBOL(ksize);
-@@ -571,8 +664,13 @@ struct kmem_cache *kmem_cache_create(con
+@@ -571,8 +664,13 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
{
struct kmem_cache *c;
@@ -71667,7 +73226,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
if (c) {
c->name = name;
-@@ -614,17 +712,25 @@ void *kmem_cache_alloc_node(struct kmem_
+@@ -614,17 +712,25 @@ void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
lockdep_trace_alloc(flags);
@@ -71712,7 +73271,7 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
}
static void kmem_rcu_free(struct rcu_head *head)
-@@ -652,17 +764,31 @@ static void kmem_rcu_free(struct rcu_hea
+@@ -652,17 +764,31 @@ static void kmem_rcu_free(struct rcu_head *head)
void kmem_cache_free(struct kmem_cache *c, void *b)
{
@@ -71747,9 +73306,10 @@ diff -urNp linux-3.1.4/mm/slob.c linux-3.1.4/mm/slob.c
}
EXPORT_SYMBOL(kmem_cache_free);
-diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
---- linux-3.1.4/mm/slub.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/slub.c 2011-11-16 19:27:25.000000000 -0500
+diff --git a/mm/slub.c b/mm/slub.c
+index 7c54fe8..0bb4ac5 100644
+--- a/mm/slub.c
++++ b/mm/slub.c
@@ -208,7 +208,7 @@ struct track {
enum track_item { TRACK_ALLOC, TRACK_FREE };
@@ -71759,7 +73319,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
static int sysfs_slab_add(struct kmem_cache *);
static int sysfs_slab_alias(struct kmem_cache *, const char *);
static void sysfs_slab_remove(struct kmem_cache *);
-@@ -556,7 +556,7 @@ static void print_track(const char *s, s
+@@ -556,7 +556,7 @@ static void print_track(const char *s, struct track *t)
if (!t->addr)
return;
@@ -71768,7 +73328,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
#ifdef CONFIG_STACKTRACE
{
-@@ -2456,6 +2456,8 @@ void kmem_cache_free(struct kmem_cache *
+@@ -2456,6 +2456,8 @@ void kmem_cache_free(struct kmem_cache *s, void *x)
page = virt_to_head_page(x);
@@ -71786,7 +73346,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
/*
* Calculate the order of allocation given an slab object size.
-@@ -2912,7 +2914,7 @@ static int kmem_cache_open(struct kmem_c
+@@ -2912,7 +2914,7 @@ static int kmem_cache_open(struct kmem_cache *s,
* list to avoid pounding the page allocator excessively.
*/
set_min_partial(s, ilog2(s->size));
@@ -71795,7 +73355,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
#ifdef CONFIG_NUMA
s->remote_node_defrag_ratio = 1000;
#endif
-@@ -3017,8 +3019,7 @@ static inline int kmem_cache_close(struc
+@@ -3017,8 +3019,7 @@ static inline int kmem_cache_close(struct kmem_cache *s)
void kmem_cache_destroy(struct kmem_cache *s)
{
down_write(&slub_lock);
@@ -71805,7 +73365,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
list_del(&s->list);
if (kmem_cache_close(s)) {
printk(KERN_ERR "SLUB %s: %s called for cache that "
-@@ -3228,6 +3229,50 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -3228,6 +3229,50 @@ void *__kmalloc_node(size_t size, gfp_t flags, int node)
EXPORT_SYMBOL(__kmalloc_node);
#endif
@@ -71856,7 +73416,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
size_t ksize(const void *object)
{
struct page *page;
-@@ -3502,7 +3547,7 @@ static void __init kmem_cache_bootstrap_
+@@ -3502,7 +3547,7 @@ static void __init kmem_cache_bootstrap_fixup(struct kmem_cache *s)
int node;
list_add(&s->list, &slab_caches);
@@ -71886,7 +73446,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
caches++;
}
-@@ -3697,7 +3742,7 @@ static int slab_unmergeable(struct kmem_
+@@ -3697,7 +3742,7 @@ static int slab_unmergeable(struct kmem_cache *s)
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
@@ -71895,7 +73455,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
return 1;
return 0;
-@@ -3756,7 +3801,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3756,7 +3801,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
down_write(&slub_lock);
s = find_mergeable(size, align, flags, name, ctor);
if (s) {
@@ -71904,7 +73464,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
/*
* Adjust the object sizes so that we clear
* the complete object on kzalloc.
-@@ -3765,7 +3810,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3765,7 +3810,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
if (sysfs_slab_alias(s, name)) {
@@ -71913,7 +73473,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
goto err;
}
up_write(&slub_lock);
-@@ -3893,7 +3938,7 @@ void *__kmalloc_node_track_caller(size_t
+@@ -3893,7 +3938,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
}
#endif
@@ -71946,7 +73506,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
}
SLAB_ATTR_RO(aliases);
-@@ -5025,6 +5070,7 @@ static char *create_unique_id(struct kme
+@@ -5025,6 +5070,7 @@ static char *create_unique_id(struct kmem_cache *s)
return name;
}
@@ -71954,7 +73514,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
static int sysfs_slab_add(struct kmem_cache *s)
{
int err;
-@@ -5087,6 +5133,7 @@ static void sysfs_slab_remove(struct kme
+@@ -5087,6 +5133,7 @@ static void sysfs_slab_remove(struct kmem_cache *s)
kobject_del(&s->kobj);
kobject_put(&s->kobj);
}
@@ -71970,7 +73530,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
{
struct saved_alias *al;
-@@ -5122,6 +5170,7 @@ static int sysfs_slab_alias(struct kmem_
+@@ -5122,6 +5170,7 @@ static int sysfs_slab_alias(struct kmem_cache *s, const char *name)
alias_list = al;
return 0;
}
@@ -71978,7 +73538,7 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
static int __init slab_sysfs_init(void)
{
-@@ -5257,7 +5306,13 @@ static const struct file_operations proc
+@@ -5257,7 +5306,13 @@ static const struct file_operations proc_slabinfo_operations = {
static int __init slab_proc_init(void)
{
@@ -71993,9 +73553,10 @@ diff -urNp linux-3.1.4/mm/slub.c linux-3.1.4/mm/slub.c
return 0;
}
module_init(slab_proc_init);
-diff -urNp linux-3.1.4/mm/swap.c linux-3.1.4/mm/swap.c
---- linux-3.1.4/mm/swap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/swap.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/mm/swap.c b/mm/swap.c
+index 87627f1..8a9eb34 100644
+--- a/mm/swap.c
++++ b/mm/swap.c
@@ -31,6 +31,7 @@
#include <linux/backing-dev.h>
#include <linux/memcontrol.h>
@@ -72004,7 +73565,7 @@ diff -urNp linux-3.1.4/mm/swap.c linux-3.1.4/mm/swap.c
#include "internal.h"
-@@ -71,6 +72,8 @@ static void __put_compound_page(struct p
+@@ -71,6 +72,8 @@ static void __put_compound_page(struct page *page)
__page_cache_release(page);
dtor = get_compound_page_dtor(page);
@@ -72013,9 +73574,10 @@ diff -urNp linux-3.1.4/mm/swap.c linux-3.1.4/mm/swap.c
(*dtor)(page);
}
-diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
---- linux-3.1.4/mm/swapfile.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/swapfile.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/mm/swapfile.c b/mm/swapfile.c
+index 17bc224..1677059 100644
+--- a/mm/swapfile.c
++++ b/mm/swapfile.c
@@ -62,7 +62,7 @@ static DEFINE_MUTEX(swapon_mutex);
static DECLARE_WAIT_QUEUE_HEAD(proc_poll_wait);
@@ -72025,7 +73587,7 @@ diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
static inline unsigned char swap_count(unsigned char ent)
{
-@@ -1671,7 +1671,7 @@ SYSCALL_DEFINE1(swapoff, const char __us
+@@ -1671,7 +1671,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
}
filp_close(swap_file, NULL);
err = 0;
@@ -72034,7 +73596,7 @@ diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
wake_up_interruptible(&proc_poll_wait);
out_dput:
-@@ -1687,8 +1687,8 @@ static unsigned swaps_poll(struct file *
+@@ -1687,8 +1687,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
poll_wait(file, &proc_poll_wait, wait);
@@ -72045,7 +73607,7 @@ diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
}
-@@ -1786,7 +1786,7 @@ static int swaps_open(struct inode *inod
+@@ -1786,7 +1786,7 @@ static int swaps_open(struct inode *inode, struct file *file)
return ret;
seq = file->private_data;
@@ -72054,7 +73616,7 @@ diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
return 0;
}
-@@ -2124,7 +2124,7 @@ SYSCALL_DEFINE2(swapon, const char __use
+@@ -2124,7 +2124,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
(p->flags & SWP_DISCARDABLE) ? "D" : "");
mutex_unlock(&swapon_mutex);
@@ -72063,9 +73625,10 @@ diff -urNp linux-3.1.4/mm/swapfile.c linux-3.1.4/mm/swapfile.c
wake_up_interruptible(&proc_poll_wait);
if (S_ISREG(inode->i_mode))
-diff -urNp linux-3.1.4/mm/util.c linux-3.1.4/mm/util.c
---- linux-3.1.4/mm/util.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/util.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/mm/util.c b/mm/util.c
+index 88ea1bd..0f1dfdb 100644
+--- a/mm/util.c
++++ b/mm/util.c
@@ -114,6 +114,7 @@ EXPORT_SYMBOL(memdup_user);
* allocated buffer. Use this if you don't want to free the buffer immediately
* like, for example, with RCU.
@@ -72082,7 +73645,7 @@ diff -urNp linux-3.1.4/mm/util.c linux-3.1.4/mm/util.c
void *krealloc(const void *p, size_t new_size, gfp_t flags)
{
void *ret;
-@@ -243,6 +245,12 @@ void __vma_link_list(struct mm_struct *m
+@@ -243,6 +245,12 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
void arch_pick_mmap_layout(struct mm_struct *mm)
{
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -72095,10 +73658,11 @@ diff -urNp linux-3.1.4/mm/util.c linux-3.1.4/mm/util.c
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
}
-diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
---- linux-3.1.4/mm/vmalloc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/vmalloc.c 2011-11-16 18:40:44.000000000 -0500
-@@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd,
+diff --git a/mm/vmalloc.c b/mm/vmalloc.c
+index 56faf31..75c1a4c 100644
+--- a/mm/vmalloc.c
++++ b/mm/vmalloc.c
+@@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end)
pte = pte_offset_kernel(pmd, addr);
do {
@@ -72120,7 +73684,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
} while (pte++, addr += PAGE_SIZE, addr != end);
}
-@@ -91,6 +102,7 @@ static int vmap_pte_range(pmd_t *pmd, un
+@@ -91,6 +102,7 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr,
unsigned long end, pgprot_t prot, struct page **pages, int *nr)
{
pte_t *pte;
@@ -72128,7 +73692,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
/*
* nr is a running index into the array which helps higher level
-@@ -100,17 +112,30 @@ static int vmap_pte_range(pmd_t *pmd, un
+@@ -100,17 +112,30 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr,
pte = pte_alloc_kernel(pmd, addr);
if (!pte)
return -ENOMEM;
@@ -72164,7 +73728,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
}
static int vmap_pmd_range(pud_t *pud, unsigned long addr,
-@@ -191,11 +216,20 @@ int is_vmalloc_or_module_addr(const void
+@@ -191,11 +216,20 @@ int is_vmalloc_or_module_addr(const void *x)
* and fall back on vmalloc() if that fails. Others
* just put it in the vmalloc space.
*/
@@ -72186,7 +73750,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
return is_vmalloc_addr(x);
}
-@@ -216,8 +250,14 @@ struct page *vmalloc_to_page(const void
+@@ -216,8 +250,14 @@ struct page *vmalloc_to_page(const void *vmalloc_addr)
if (!pgd_none(*pgd)) {
pud_t *pud = pud_offset(pgd, addr);
@@ -72201,7 +73765,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
if (!pmd_none(*pmd)) {
pte_t *ptep, pte;
-@@ -1294,6 +1334,16 @@ static struct vm_struct *__get_vm_area_n
+@@ -1294,6 +1334,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
struct vm_struct *area;
BUG_ON(in_interrupt());
@@ -72218,7 +73782,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
if (flags & VM_IOREMAP) {
int bit = fls(size);
-@@ -1526,6 +1576,11 @@ void *vmap(struct page **pages, unsigned
+@@ -1526,6 +1576,11 @@ void *vmap(struct page **pages, unsigned int count,
if (count > totalram_pages)
return NULL;
@@ -72230,7 +73794,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
__builtin_return_address(0));
if (!area)
-@@ -1627,6 +1682,13 @@ void *__vmalloc_node_range(unsigned long
+@@ -1627,6 +1682,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
if (!size || (size >> PAGE_SHIFT) > totalram_pages)
return NULL;
@@ -72244,7 +73808,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST,
start, end, node, gfp_mask, caller);
-@@ -1672,6 +1734,7 @@ static void *__vmalloc_node(unsigned lon
+@@ -1672,6 +1734,7 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
gfp_mask, prot, node, caller);
}
@@ -72252,7 +73816,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
{
return __vmalloc_node(size, 1, gfp_mask, prot, -1,
-@@ -1695,6 +1758,7 @@ static inline void *__vmalloc_node_flags
+@@ -1695,6 +1758,7 @@ static inline void *__vmalloc_node_flags(unsigned long size,
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
@@ -72321,7 +73885,7 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
void *vmalloc_32_user(unsigned long size)
{
struct vm_struct *area;
-@@ -2091,6 +2161,8 @@ int remap_vmalloc_range(struct vm_area_s
+@@ -2091,6 +2161,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
unsigned long uaddr = vma->vm_start;
unsigned long usize = vma->vm_end - vma->vm_start;
@@ -72330,9 +73894,10 @@ diff -urNp linux-3.1.4/mm/vmalloc.c linux-3.1.4/mm/vmalloc.c
if ((PAGE_SIZE-1) & (unsigned long)addr)
return -EINVAL;
-diff -urNp linux-3.1.4/mm/vmstat.c linux-3.1.4/mm/vmstat.c
---- linux-3.1.4/mm/vmstat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/mm/vmstat.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/mm/vmstat.c b/mm/vmstat.c
+index d52b13d..381d1ac 100644
+--- a/mm/vmstat.c
++++ b/mm/vmstat.c
@@ -78,7 +78,7 @@ void vm_events_fold_cpu(int cpu)
*
* vm_stat contains the global counters
@@ -72385,10 +73950,11 @@ diff -urNp linux-3.1.4/mm/vmstat.c linux-3.1.4/mm/vmstat.c
#endif
return 0;
}
-diff -urNp linux-3.1.4/net/8021q/vlan.c linux-3.1.4/net/8021q/vlan.c
---- linux-3.1.4/net/8021q/vlan.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/8021q/vlan.c 2011-11-16 18:39:08.000000000 -0500
-@@ -588,8 +588,7 @@ static int vlan_ioctl_handler(struct net
+diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
+index 8970ba1..e3361fe 100644
+--- a/net/8021q/vlan.c
++++ b/net/8021q/vlan.c
+@@ -588,8 +588,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
@@ -72398,10 +73964,11 @@ diff -urNp linux-3.1.4/net/8021q/vlan.c linux-3.1.4/net/8021q/vlan.c
struct vlan_net *vn;
vn = net_generic(net, vlan_net_id);
-diff -urNp linux-3.1.4/net/9p/trans_fd.c linux-3.1.4/net/9p/trans_fd.c
---- linux-3.1.4/net/9p/trans_fd.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/9p/trans_fd.c 2011-11-16 18:39:08.000000000 -0500
-@@ -423,7 +423,7 @@ static int p9_fd_write(struct p9_client
+diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
+index fdfdb57..38d368c 100644
+--- a/net/9p/trans_fd.c
++++ b/net/9p/trans_fd.c
+@@ -423,7 +423,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
oldfs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -72410,9 +73977,10 @@ diff -urNp linux-3.1.4/net/9p/trans_fd.c linux-3.1.4/net/9p/trans_fd.c
set_fs(oldfs);
if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN)
-diff -urNp linux-3.1.4/net/9p/trans_virtio.c linux-3.1.4/net/9p/trans_virtio.c
---- linux-3.1.4/net/9p/trans_virtio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/9p/trans_virtio.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
+index e317583..3c8aeaf 100644
+--- a/net/9p/trans_virtio.c
++++ b/net/9p/trans_virtio.c
@@ -327,7 +327,7 @@ req_retry_pinned:
} else {
char *pbuf;
@@ -72431,10 +73999,11 @@ diff -urNp linux-3.1.4/net/9p/trans_virtio.c linux-3.1.4/net/9p/trans_virtio.c
else
pbuf = req->tc->pkbuf;
-diff -urNp linux-3.1.4/net/atm/atm_misc.c linux-3.1.4/net/atm/atm_misc.c
---- linux-3.1.4/net/atm/atm_misc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/atm_misc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -17,7 +17,7 @@ int atm_charge(struct atm_vcc *vcc, int
+diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
+index f41f026..fe76ea8 100644
+--- a/net/atm/atm_misc.c
++++ b/net/atm/atm_misc.c
+@@ -17,7 +17,7 @@ int atm_charge(struct atm_vcc *vcc, int truesize)
if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf)
return 1;
atm_return(vcc, truesize);
@@ -72443,7 +74012,7 @@ diff -urNp linux-3.1.4/net/atm/atm_misc.c linux-3.1.4/net/atm/atm_misc.c
return 0;
}
EXPORT_SYMBOL(atm_charge);
-@@ -39,7 +39,7 @@ struct sk_buff *atm_alloc_charge(struct
+@@ -39,7 +39,7 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc, int pdu_size,
}
}
atm_return(vcc, guess);
@@ -72470,9 +74039,10 @@ diff -urNp linux-3.1.4/net/atm/atm_misc.c linux-3.1.4/net/atm/atm_misc.c
__SONET_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-3.1.4/net/atm/lec.h linux-3.1.4/net/atm/lec.h
---- linux-3.1.4/net/atm/lec.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/lec.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/atm/lec.h b/net/atm/lec.h
+index dfc0719..47c5322 100644
+--- a/net/atm/lec.h
++++ b/net/atm/lec.h
@@ -48,7 +48,7 @@ struct lane2_ops {
const u8 *tlvs, u32 sizeoftlvs);
void (*associate_indicator) (struct net_device *dev, const u8 *mac_addr,
@@ -72482,9 +74052,10 @@ diff -urNp linux-3.1.4/net/atm/lec.h linux-3.1.4/net/atm/lec.h
/*
* ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
-diff -urNp linux-3.1.4/net/atm/mpc.h linux-3.1.4/net/atm/mpc.h
---- linux-3.1.4/net/atm/mpc.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/mpc.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/atm/mpc.h b/net/atm/mpc.h
+index 0919a88..a23d54e 100644
+--- a/net/atm/mpc.h
++++ b/net/atm/mpc.h
@@ -33,7 +33,7 @@ struct mpoa_client {
struct mpc_parameters parameters; /* parameters for this client */
@@ -72494,10 +74065,11 @@ diff -urNp linux-3.1.4/net/atm/mpc.h linux-3.1.4/net/atm/mpc.h
};
-diff -urNp linux-3.1.4/net/atm/mpoa_caches.c linux-3.1.4/net/atm/mpoa_caches.c
---- linux-3.1.4/net/atm/mpoa_caches.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/mpoa_caches.c 2011-11-16 18:40:44.000000000 -0500
-@@ -255,6 +255,8 @@ static void check_resolving_entries(stru
+diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
+index d1b2d9a..7cc2219 100644
+--- a/net/atm/mpoa_caches.c
++++ b/net/atm/mpoa_caches.c
+@@ -255,6 +255,8 @@ static void check_resolving_entries(struct mpoa_client *client)
struct timeval now;
struct k_message msg;
@@ -72506,10 +74078,11 @@ diff -urNp linux-3.1.4/net/atm/mpoa_caches.c linux-3.1.4/net/atm/mpoa_caches.c
do_gettimeofday(&now);
read_lock_bh(&client->ingress_lock);
-diff -urNp linux-3.1.4/net/atm/proc.c linux-3.1.4/net/atm/proc.c
---- linux-3.1.4/net/atm/proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/proc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -45,9 +45,9 @@ static void add_stats(struct seq_file *s
+diff --git a/net/atm/proc.c b/net/atm/proc.c
+index 0d020de..011c7bb 100644
+--- a/net/atm/proc.c
++++ b/net/atm/proc.c
+@@ -45,9 +45,9 @@ static void add_stats(struct seq_file *seq, const char *aal,
const struct k_atm_aal_stats *stats)
{
seq_printf(seq, "%s ( %d %d %d %d %d )", aal,
@@ -72522,9 +74095,10 @@ diff -urNp linux-3.1.4/net/atm/proc.c linux-3.1.4/net/atm/proc.c
}
static void atm_dev_info(struct seq_file *seq, const struct atm_dev *dev)
-diff -urNp linux-3.1.4/net/atm/resources.c linux-3.1.4/net/atm/resources.c
---- linux-3.1.4/net/atm/resources.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/atm/resources.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/atm/resources.c b/net/atm/resources.c
+index 23f45ce..c748f1a 100644
+--- a/net/atm/resources.c
++++ b/net/atm/resources.c
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(atm_dev_deregister);
static void copy_aal_stats(struct k_atm_aal_stats *from,
struct atm_aal_stats *to)
@@ -72534,7 +74108,7 @@ diff -urNp linux-3.1.4/net/atm/resources.c linux-3.1.4/net/atm/resources.c
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-@@ -168,7 +168,7 @@ static void copy_aal_stats(struct k_atm_
+@@ -168,7 +168,7 @@ static void copy_aal_stats(struct k_atm_aal_stats *from,
static void subtract_aal_stats(struct k_atm_aal_stats *from,
struct atm_aal_stats *to)
{
@@ -72543,10 +74117,11 @@ diff -urNp linux-3.1.4/net/atm/resources.c linux-3.1.4/net/atm/resources.c
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-3.1.4/net/batman-adv/hard-interface.c linux-3.1.4/net/batman-adv/hard-interface.c
---- linux-3.1.4/net/batman-adv/hard-interface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/hard-interface.c 2011-11-16 18:39:08.000000000 -0500
-@@ -347,8 +347,8 @@ int hardif_enable_interface(struct hard_
+diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
+index db7aacf..991e539 100644
+--- a/net/batman-adv/hard-interface.c
++++ b/net/batman-adv/hard-interface.c
+@@ -347,8 +347,8 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
hard_iface->batman_adv_ptype.dev = hard_iface->net_dev;
dev_add_pack(&hard_iface->batman_adv_ptype);
@@ -72557,10 +74132,11 @@ diff -urNp linux-3.1.4/net/batman-adv/hard-interface.c linux-3.1.4/net/batman-ad
bat_info(hard_iface->soft_iface, "Adding interface: %s\n",
hard_iface->net_dev->name);
-diff -urNp linux-3.1.4/net/batman-adv/routing.c linux-3.1.4/net/batman-adv/routing.c
---- linux-3.1.4/net/batman-adv/routing.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/routing.c 2011-11-16 18:39:08.000000000 -0500
-@@ -656,7 +656,7 @@ void receive_bat_packet(const struct eth
+diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
+index 0f32c81..82d1895 100644
+--- a/net/batman-adv/routing.c
++++ b/net/batman-adv/routing.c
+@@ -656,7 +656,7 @@ void receive_bat_packet(const struct ethhdr *ethhdr,
return;
/* could be changed by schedule_own_packet() */
@@ -72569,10 +74145,11 @@ diff -urNp linux-3.1.4/net/batman-adv/routing.c linux-3.1.4/net/batman-adv/routi
has_directlink_flag = (batman_packet->flags & DIRECTLINK ? 1 : 0);
-diff -urNp linux-3.1.4/net/batman-adv/send.c linux-3.1.4/net/batman-adv/send.c
---- linux-3.1.4/net/batman-adv/send.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/send.c 2011-11-16 18:39:08.000000000 -0500
-@@ -326,7 +326,7 @@ void schedule_own_packet(struct hard_ifa
+diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
+index 58d1447..2a66c8c 100644
+--- a/net/batman-adv/send.c
++++ b/net/batman-adv/send.c
+@@ -326,7 +326,7 @@ void schedule_own_packet(struct hard_iface *hard_iface)
/* change sequence number to network order */
batman_packet->seqno =
@@ -72581,7 +74158,7 @@ diff -urNp linux-3.1.4/net/batman-adv/send.c linux-3.1.4/net/batman-adv/send.c
batman_packet->ttvn = atomic_read(&bat_priv->ttvn);
batman_packet->tt_crc = htons((uint16_t)atomic_read(&bat_priv->tt_crc));
-@@ -343,7 +343,7 @@ void schedule_own_packet(struct hard_ifa
+@@ -343,7 +343,7 @@ void schedule_own_packet(struct hard_iface *hard_iface)
else
batman_packet->gw_flags = NO_FLAGS;
@@ -72590,10 +74167,11 @@ diff -urNp linux-3.1.4/net/batman-adv/send.c linux-3.1.4/net/batman-adv/send.c
slide_own_bcast_window(hard_iface);
send_time = own_send_time(bat_priv);
-diff -urNp linux-3.1.4/net/batman-adv/soft-interface.c linux-3.1.4/net/batman-adv/soft-interface.c
---- linux-3.1.4/net/batman-adv/soft-interface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/soft-interface.c 2011-11-16 18:39:08.000000000 -0500
-@@ -632,7 +632,7 @@ static int interface_tx(struct sk_buff *
+diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
+index 05dd351..2ecd19b 100644
+--- a/net/batman-adv/soft-interface.c
++++ b/net/batman-adv/soft-interface.c
+@@ -632,7 +632,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
/* set broadcast sequence number */
bcast_packet->seqno =
@@ -72602,7 +74180,7 @@ diff -urNp linux-3.1.4/net/batman-adv/soft-interface.c linux-3.1.4/net/batman-ad
add_bcast_packet_to_list(bat_priv, skb, 1);
-@@ -824,7 +824,7 @@ struct net_device *softif_create(const c
+@@ -824,7 +824,7 @@ struct net_device *softif_create(const char *name)
atomic_set(&bat_priv->batman_queue_left, BATMAN_QUEUE_LEN);
atomic_set(&bat_priv->mesh_state, MESH_INACTIVE);
@@ -72611,9 +74189,10 @@ diff -urNp linux-3.1.4/net/batman-adv/soft-interface.c linux-3.1.4/net/batman-ad
atomic_set(&bat_priv->ttvn, 0);
atomic_set(&bat_priv->tt_local_changes, 0);
atomic_set(&bat_priv->tt_ogm_append_cnt, 0);
-diff -urNp linux-3.1.4/net/batman-adv/types.h linux-3.1.4/net/batman-adv/types.h
---- linux-3.1.4/net/batman-adv/types.h 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/types.h 2011-11-26 20:00:43.000000000 -0500
+diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
+index 51a0db7..b8a62be 100644
+--- a/net/batman-adv/types.h
++++ b/net/batman-adv/types.h
@@ -38,8 +38,8 @@ struct hard_iface {
int16_t if_num;
char if_status;
@@ -72634,10 +74213,11 @@ diff -urNp linux-3.1.4/net/batman-adv/types.h linux-3.1.4/net/batman-adv/types.h
atomic_t bcast_queue_left;
atomic_t batman_queue_left;
atomic_t ttvn; /* tranlation table version number */
-diff -urNp linux-3.1.4/net/batman-adv/unicast.c linux-3.1.4/net/batman-adv/unicast.c
---- linux-3.1.4/net/batman-adv/unicast.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/batman-adv/unicast.c 2011-11-16 18:39:08.000000000 -0500
-@@ -264,7 +264,7 @@ int frag_send_skb(struct sk_buff *skb, s
+diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
+index 32b125f..f1447e0 100644
+--- a/net/batman-adv/unicast.c
++++ b/net/batman-adv/unicast.c
+@@ -264,7 +264,7 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
frag1->flags = UNI_FRAG_HEAD | large_tail;
frag2->flags = large_tail;
@@ -72646,10 +74226,11 @@ diff -urNp linux-3.1.4/net/batman-adv/unicast.c linux-3.1.4/net/batman-adv/unica
frag1->seqno = htons(seqno - 1);
frag2->seqno = htons(seqno);
-diff -urNp linux-3.1.4/net/bluetooth/hci_conn.c linux-3.1.4/net/bluetooth/hci_conn.c
---- linux-3.1.4/net/bluetooth/hci_conn.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/bluetooth/hci_conn.c 2011-11-16 18:39:08.000000000 -0500
-@@ -218,7 +218,7 @@ void hci_le_start_enc(struct hci_conn *c
+diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
+index ea7f031..0615edc 100644
+--- a/net/bluetooth/hci_conn.c
++++ b/net/bluetooth/hci_conn.c
+@@ -218,7 +218,7 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
cp.handle = cpu_to_le16(conn->handle);
memcpy(cp.ltk, ltk, sizeof(cp.ltk));
cp.ediv = ediv;
@@ -72658,7 +74239,7 @@ diff -urNp linux-3.1.4/net/bluetooth/hci_conn.c linux-3.1.4/net/bluetooth/hci_co
hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp);
}
-@@ -234,7 +234,7 @@ void hci_le_ltk_reply(struct hci_conn *c
+@@ -234,7 +234,7 @@ void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16])
memset(&cp, 0, sizeof(cp));
cp.handle = cpu_to_le16(conn->handle);
@@ -72667,10 +74248,11 @@ diff -urNp linux-3.1.4/net/bluetooth/hci_conn.c linux-3.1.4/net/bluetooth/hci_co
hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
}
-diff -urNp linux-3.1.4/net/bridge/br_multicast.c linux-3.1.4/net/bridge/br_multicast.c
---- linux-3.1.4/net/bridge/br_multicast.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/bridge/br_multicast.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1485,7 +1485,7 @@ static int br_multicast_ipv6_rcv(struct
+diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
+index 995cbe0..c056d6c 100644
+--- a/net/bridge/br_multicast.c
++++ b/net/bridge/br_multicast.c
+@@ -1485,7 +1485,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
nexthdr = ip6h->nexthdr;
offset = ipv6_skip_exthdr(skb, sizeof(*ip6h), &nexthdr);
@@ -72679,10 +74261,11 @@ diff -urNp linux-3.1.4/net/bridge/br_multicast.c linux-3.1.4/net/bridge/br_multi
return 0;
/* Okay, we found ICMPv6 header */
-diff -urNp linux-3.1.4/net/bridge/netfilter/ebtables.c linux-3.1.4/net/bridge/netfilter/ebtables.c
---- linux-3.1.4/net/bridge/netfilter/ebtables.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/bridge/netfilter/ebtables.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1513,7 +1513,7 @@ static int do_ebt_get_ctl(struct sock *s
+diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
+index 5864cc4..94cab18 100644
+--- a/net/bridge/netfilter/ebtables.c
++++ b/net/bridge/netfilter/ebtables.c
+@@ -1513,7 +1513,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
tmp.valid_hooks = t->table->valid_hooks;
}
mutex_unlock(&ebt_mutex);
@@ -72691,7 +74274,7 @@ diff -urNp linux-3.1.4/net/bridge/netfilter/ebtables.c linux-3.1.4/net/bridge/ne
BUGPRINT("c2u Didn't work\n");
ret = -EFAULT;
break;
-@@ -1781,6 +1781,8 @@ static int compat_copy_everything_to_use
+@@ -1781,6 +1781,8 @@ static int compat_copy_everything_to_user(struct ebt_table *t,
int ret;
void __user *pos;
@@ -72700,9 +74283,10 @@ diff -urNp linux-3.1.4/net/bridge/netfilter/ebtables.c linux-3.1.4/net/bridge/ne
memset(&tinfo, 0, sizeof(tinfo));
if (cmd == EBT_SO_GET_ENTRIES) {
-diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
---- linux-3.1.4/net/caif/caif_socket.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/caif/caif_socket.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
+index a986280..13444a1 100644
+--- a/net/caif/caif_socket.c
++++ b/net/caif/caif_socket.c
@@ -48,19 +48,20 @@ static struct dentry *debugfsdir;
#ifdef CONFIG_DEBUG_FS
struct debug_fs_counter {
@@ -72734,7 +74318,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
#define dbfs_atomic_dec(v) atomic_dec_return(v)
#else
#define dbfs_atomic_inc(v) 0
-@@ -161,7 +162,7 @@ static int caif_queue_rcv_skb(struct soc
+@@ -161,7 +162,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
atomic_read(&cf_sk->sk.sk_rmem_alloc),
sk_rcvbuf_lowwater(cf_sk));
set_rx_flow_off(cf_sk);
@@ -72743,7 +74327,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ);
}
-@@ -172,7 +173,7 @@ static int caif_queue_rcv_skb(struct soc
+@@ -172,7 +173,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
set_rx_flow_off(cf_sk);
if (net_ratelimit())
pr_debug("sending flow OFF due to rmem_schedule\n");
@@ -72752,7 +74336,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ);
}
skb->dev = NULL;
-@@ -233,14 +234,14 @@ static void caif_ctrl_cb(struct cflayer
+@@ -233,14 +234,14 @@ static void caif_ctrl_cb(struct cflayer *layr,
switch (flow) {
case CAIF_CTRLCMD_FLOW_ON_IND:
/* OK from modem to start sending again */
@@ -72769,7 +74353,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
set_tx_flow_off(cf_sk);
cf_sk->sk.sk_state_change(&cf_sk->sk);
break;
-@@ -249,7 +250,7 @@ static void caif_ctrl_cb(struct cflayer
+@@ -249,7 +250,7 @@ static void caif_ctrl_cb(struct cflayer *layr,
/* We're now connected */
caif_client_register_refcnt(&cf_sk->layer,
cfsk_hold, cfsk_put);
@@ -72778,7 +74362,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
cf_sk->sk.sk_state = CAIF_CONNECTED;
set_tx_flow_on(cf_sk);
cf_sk->sk.sk_state_change(&cf_sk->sk);
-@@ -263,7 +264,7 @@ static void caif_ctrl_cb(struct cflayer
+@@ -263,7 +264,7 @@ static void caif_ctrl_cb(struct cflayer *layr,
case CAIF_CTRLCMD_INIT_FAIL_RSP:
/* Connect request failed */
@@ -72787,7 +74371,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
cf_sk->sk.sk_err = ECONNREFUSED;
cf_sk->sk.sk_state = CAIF_DISCONNECTED;
cf_sk->sk.sk_shutdown = SHUTDOWN_MASK;
-@@ -277,7 +278,7 @@ static void caif_ctrl_cb(struct cflayer
+@@ -277,7 +278,7 @@ static void caif_ctrl_cb(struct cflayer *layr,
case CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND:
/* Modem has closed this connection, or device is down. */
@@ -72796,7 +74380,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
cf_sk->sk.sk_shutdown = SHUTDOWN_MASK;
cf_sk->sk.sk_err = ECONNRESET;
set_rx_flow_on(cf_sk);
-@@ -297,7 +298,7 @@ static void caif_check_flow_release(stru
+@@ -297,7 +298,7 @@ static void caif_check_flow_release(struct sock *sk)
return;
if (atomic_read(&sk->sk_rmem_alloc) <= sk_rcvbuf_lowwater(cf_sk)) {
@@ -72805,7 +74389,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
set_rx_flow_on(cf_sk);
caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_ON_REQ);
}
-@@ -854,7 +855,7 @@ static int caif_connect(struct socket *s
+@@ -854,7 +855,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
/*ifindex = id of the interface.*/
cf_sk->conn_req.ifindex = cf_sk->sk.sk_bound_dev_if;
@@ -72814,7 +74398,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
cf_sk->layer.receive = caif_sktrecv_cb;
err = caif_connect_client(sock_net(sk), &cf_sk->conn_req,
-@@ -943,7 +944,7 @@ static int caif_release(struct socket *s
+@@ -943,7 +944,7 @@ static int caif_release(struct socket *sock)
spin_unlock_bh(&sk->sk_receive_queue.lock);
sock->sk = NULL;
@@ -72823,7 +74407,7 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
WARN_ON(IS_ERR(cf_sk->debugfs_socket_dir));
if (cf_sk->debugfs_socket_dir != NULL)
-@@ -1122,7 +1123,7 @@ static int caif_create(struct net *net,
+@@ -1122,7 +1123,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
cf_sk->conn_req.protocol = protocol;
/* Increase the number of sockets created. */
dbfs_atomic_inc(&cnt.caif_nr_socks);
@@ -72832,9 +74416,10 @@ diff -urNp linux-3.1.4/net/caif/caif_socket.c linux-3.1.4/net/caif/caif_socket.c
#ifdef CONFIG_DEBUG_FS
if (!IS_ERR(debugfsdir)) {
-diff -urNp linux-3.1.4/net/caif/cfctrl.c linux-3.1.4/net/caif/cfctrl.c
---- linux-3.1.4/net/caif/cfctrl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/caif/cfctrl.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
+index e22671b..6598ea0 100644
+--- a/net/caif/cfctrl.c
++++ b/net/caif/cfctrl.c
@@ -9,6 +9,7 @@
#include <linux/stddef.h>
#include <linux/spinlock.h>
@@ -72854,7 +74439,7 @@ diff -urNp linux-3.1.4/net/caif/cfctrl.c linux-3.1.4/net/caif/cfctrl.c
this->serv.layer.receive = cfctrl_recv;
sprintf(this->serv.layer.name, "ctrl");
this->serv.layer.ctrlcmd = cfctrl_ctrlcmd;
-@@ -132,8 +133,8 @@ static void cfctrl_insert_req(struct cfc
+@@ -132,8 +133,8 @@ static void cfctrl_insert_req(struct cfctrl *ctrl,
struct cfctrl_request_info *req)
{
spin_lock_bh(&ctrl->info_list_lock);
@@ -72865,7 +74450,7 @@ diff -urNp linux-3.1.4/net/caif/cfctrl.c linux-3.1.4/net/caif/cfctrl.c
list_add_tail(&req->list, &ctrl->list);
spin_unlock_bh(&ctrl->info_list_lock);
}
-@@ -151,7 +152,7 @@ static struct cfctrl_request_info *cfctr
+@@ -151,7 +152,7 @@ static struct cfctrl_request_info *cfctrl_remove_req(struct cfctrl *ctrl,
if (p != first)
pr_warn("Requests are not received in order\n");
@@ -72874,7 +74459,7 @@ diff -urNp linux-3.1.4/net/caif/cfctrl.c linux-3.1.4/net/caif/cfctrl.c
p->sequence_no);
list_del(&p->list);
goto out;
-@@ -364,6 +365,7 @@ static int cfctrl_recv(struct cflayer *l
+@@ -364,6 +365,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
struct cfctrl *cfctrl = container_obj(layer);
struct cfctrl_request_info rsp, *req;
@@ -72882,10 +74467,11 @@ diff -urNp linux-3.1.4/net/caif/cfctrl.c linux-3.1.4/net/caif/cfctrl.c
cfpkt_extr_head(pkt, &cmdrsp, 1);
cmd = cmdrsp & CFCTRL_CMD_MASK;
-diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
---- linux-3.1.4/net/compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/compat.c 2011-11-16 18:39:08.000000000 -0500
-@@ -70,9 +70,9 @@ int get_compat_msghdr(struct msghdr *kms
+diff --git a/net/compat.c b/net/compat.c
+index c578d93..257fab7 100644
+--- a/net/compat.c
++++ b/net/compat.c
+@@ -70,9 +70,9 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg)
__get_user(kmsg->msg_controllen, &umsg->msg_controllen) ||
__get_user(kmsg->msg_flags, &umsg->msg_flags))
return -EFAULT;
@@ -72898,7 +74484,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
return 0;
}
-@@ -84,7 +84,7 @@ int verify_compat_iovec(struct msghdr *k
+@@ -84,7 +84,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
if (kern_msg->msg_namelen) {
if (mode == VERIFY_READ) {
@@ -72907,7 +74493,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
kern_msg->msg_namelen,
kern_address);
if (err < 0)
-@@ -95,7 +95,7 @@ int verify_compat_iovec(struct msghdr *k
+@@ -95,7 +95,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
kern_msg->msg_name = NULL;
tot_len = iov_from_user_compat_to_kern(kern_iov,
@@ -72916,7 +74502,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
kern_msg->msg_iovlen);
if (tot_len >= 0)
kern_msg->msg_iov = kern_iov;
-@@ -115,20 +115,20 @@ int verify_compat_iovec(struct msghdr *k
+@@ -115,20 +115,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
#define CMSG_COMPAT_FIRSTHDR(msg) \
(((msg)->msg_controllen) >= sizeof(struct compat_cmsghdr) ? \
@@ -72940,7 +74526,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
msg->msg_controllen)
return NULL;
return (struct compat_cmsghdr __user *)ptr;
-@@ -220,7 +220,7 @@ int put_cmsg_compat(struct msghdr *kmsg,
+@@ -220,7 +220,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
{
struct compat_timeval ctv;
struct compat_timespec cts[3];
@@ -72949,7 +74535,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
struct compat_cmsghdr cmhdr;
int cmlen;
-@@ -272,7 +272,7 @@ int put_cmsg_compat(struct msghdr *kmsg,
+@@ -272,7 +272,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm)
{
@@ -72958,7 +74544,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
int fdmax = (kmsg->msg_controllen - sizeof(struct compat_cmsghdr)) / sizeof(int);
int fdnum = scm->fp->count;
struct file **fp = scm->fp->fp;
-@@ -369,7 +369,7 @@ static int do_set_sock_timeout(struct so
+@@ -369,7 +369,7 @@ static int do_set_sock_timeout(struct socket *sock, int level,
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -72967,7 +74553,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
set_fs(old_fs);
return err;
-@@ -430,7 +430,7 @@ static int do_get_sock_timeout(struct so
+@@ -430,7 +430,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname,
len = sizeof(ktime);
old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -72976,7 +74562,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
set_fs(old_fs);
if (!err) {
-@@ -565,7 +565,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -565,7 +565,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
case MCAST_JOIN_GROUP:
case MCAST_LEAVE_GROUP:
{
@@ -72985,7 +74571,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
struct group_req __user *kgr =
compat_alloc_user_space(sizeof(struct group_req));
u32 interface;
-@@ -586,7 +586,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -586,7 +586,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
case MCAST_BLOCK_SOURCE:
case MCAST_UNBLOCK_SOURCE:
{
@@ -72994,7 +74580,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
struct group_source_req __user *kgsr = compat_alloc_user_space(
sizeof(struct group_source_req));
u32 interface;
-@@ -607,7 +607,7 @@ int compat_mc_setsockopt(struct sock *so
+@@ -607,7 +607,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname,
}
case MCAST_MSFILTER:
{
@@ -73003,7 +74589,7 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
struct group_filter __user *kgf;
u32 interface, fmode, numsrc;
-@@ -645,7 +645,7 @@ int compat_mc_getsockopt(struct sock *so
+@@ -645,7 +645,7 @@ int compat_mc_getsockopt(struct sock *sock, int level, int optname,
char __user *optval, int __user *optlen,
int (*getsockopt)(struct sock *, int, int, char __user *, int __user *))
{
@@ -73012,10 +74598,11 @@ diff -urNp linux-3.1.4/net/compat.c linux-3.1.4/net/compat.c
struct group_filter __user *kgf;
int __user *koptlen;
u32 interface, fmode, numsrc;
-diff -urNp linux-3.1.4/net/core/datagram.c linux-3.1.4/net/core/datagram.c
---- linux-3.1.4/net/core/datagram.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/datagram.c 2011-11-16 18:39:08.000000000 -0500
-@@ -285,7 +285,7 @@ int skb_kill_datagram(struct sock *sk, s
+diff --git a/net/core/datagram.c b/net/core/datagram.c
+index 18ac112..fe95ed9 100644
+--- a/net/core/datagram.c
++++ b/net/core/datagram.c
+@@ -285,7 +285,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
}
kfree_skb(skb);
@@ -73024,10 +74611,11 @@ diff -urNp linux-3.1.4/net/core/datagram.c linux-3.1.4/net/core/datagram.c
sk_mem_reclaim_partial(sk);
return err;
-diff -urNp linux-3.1.4/net/core/dev.c linux-3.1.4/net/core/dev.c
---- linux-3.1.4/net/core/dev.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/dev.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1135,10 +1135,14 @@ void dev_load(struct net *net, const cha
+diff --git a/net/core/dev.c b/net/core/dev.c
+index ae5cf2d..2c950a1 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -1135,10 +1135,14 @@ void dev_load(struct net *net, const char *name)
if (no_module && capable(CAP_NET_ADMIN))
no_module = request_module("netdev-%s", name);
if (no_module && capable(CAP_SYS_MODULE)) {
@@ -73042,7 +74630,7 @@ diff -urNp linux-3.1.4/net/core/dev.c linux-3.1.4/net/core/dev.c
}
}
EXPORT_SYMBOL(dev_load);
-@@ -1977,7 +1981,7 @@ static int illegal_highdma(struct net_de
+@@ -1977,7 +1981,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
struct dev_gso_cb {
void (*destructor)(struct sk_buff *skb);
@@ -73060,7 +74648,7 @@ diff -urNp linux-3.1.4/net/core/dev.c linux-3.1.4/net/core/dev.c
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
-@@ -3779,7 +3783,7 @@ void netif_napi_del(struct napi_struct *
+@@ -3779,7 +3783,7 @@ void netif_napi_del(struct napi_struct *napi)
}
EXPORT_SYMBOL(netif_napi_del);
@@ -73069,9 +74657,10 @@ diff -urNp linux-3.1.4/net/core/dev.c linux-3.1.4/net/core/dev.c
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
unsigned long time_limit = jiffies + 2;
-diff -urNp linux-3.1.4/net/core/flow.c linux-3.1.4/net/core/flow.c
---- linux-3.1.4/net/core/flow.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/flow.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/core/flow.c b/net/core/flow.c
+index 555a456..de48421 100644
+--- a/net/core/flow.c
++++ b/net/core/flow.c
@@ -61,7 +61,7 @@ struct flow_cache {
struct timer_list rnd_timer;
};
@@ -73081,7 +74670,7 @@ diff -urNp linux-3.1.4/net/core/flow.c linux-3.1.4/net/core/flow.c
EXPORT_SYMBOL(flow_cache_genid);
static struct flow_cache flow_cache_global;
static struct kmem_cache *flow_cachep __read_mostly;
-@@ -86,7 +86,7 @@ static void flow_cache_new_hashrnd(unsig
+@@ -86,7 +86,7 @@ static void flow_cache_new_hashrnd(unsigned long arg)
static int flow_entry_valid(struct flow_cache_entry *fle)
{
@@ -73090,7 +74679,7 @@ diff -urNp linux-3.1.4/net/core/flow.c linux-3.1.4/net/core/flow.c
return 0;
if (fle->object && !fle->object->ops->check(fle->object))
return 0;
-@@ -259,7 +259,7 @@ flow_cache_lookup(struct net *net, const
+@@ -259,7 +259,7 @@ flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir,
hlist_add_head(&fle->u.hlist, &fcp->hash_table[hash]);
fcp->hash_count++;
}
@@ -73108,10 +74697,11 @@ diff -urNp linux-3.1.4/net/core/flow.c linux-3.1.4/net/core/flow.c
if (!IS_ERR(flo))
fle->object = flo;
else
-diff -urNp linux-3.1.4/net/core/iovec.c linux-3.1.4/net/core/iovec.c
---- linux-3.1.4/net/core/iovec.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/iovec.c 2011-11-16 18:39:08.000000000 -0500
-@@ -42,7 +42,7 @@ int verify_iovec(struct msghdr *m, struc
+diff --git a/net/core/iovec.c b/net/core/iovec.c
+index c40f27e..7f49254 100644
+--- a/net/core/iovec.c
++++ b/net/core/iovec.c
+@@ -42,7 +42,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address,
if (m->msg_namelen) {
if (mode == VERIFY_READ) {
void __user *namep;
@@ -73120,7 +74710,7 @@ diff -urNp linux-3.1.4/net/core/iovec.c linux-3.1.4/net/core/iovec.c
err = move_addr_to_kernel(namep, m->msg_namelen,
address);
if (err < 0)
-@@ -54,7 +54,7 @@ int verify_iovec(struct msghdr *m, struc
+@@ -54,7 +54,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address,
}
size = m->msg_iovlen * sizeof(struct iovec);
@@ -73129,9 +74719,10 @@ diff -urNp linux-3.1.4/net/core/iovec.c linux-3.1.4/net/core/iovec.c
return -EFAULT;
m->msg_iov = iov;
-diff -urNp linux-3.1.4/net/core/rtnetlink.c linux-3.1.4/net/core/rtnetlink.c
---- linux-3.1.4/net/core/rtnetlink.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/rtnetlink.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
+index 99d9e95..209bae2 100644
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
@@ -57,7 +57,7 @@ struct rtnl_link {
rtnl_doit_func doit;
rtnl_dumpit_func dumpit;
@@ -73141,9 +74732,10 @@ diff -urNp linux-3.1.4/net/core/rtnetlink.c linux-3.1.4/net/core/rtnetlink.c
static DEFINE_MUTEX(rtnl_mutex);
static u16 min_ifinfo_dump_size;
-diff -urNp linux-3.1.4/net/core/scm.c linux-3.1.4/net/core/scm.c
---- linux-3.1.4/net/core/scm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/scm.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/core/scm.c b/net/core/scm.c
+index 811b53f..5d6c343 100644
+--- a/net/core/scm.c
++++ b/net/core/scm.c
@@ -218,7 +218,7 @@ EXPORT_SYMBOL(__scm_send);
int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{
@@ -73153,7 +74745,7 @@ diff -urNp linux-3.1.4/net/core/scm.c linux-3.1.4/net/core/scm.c
struct cmsghdr cmhdr;
int cmlen = CMSG_LEN(len);
int err;
-@@ -241,7 +241,7 @@ int put_cmsg(struct msghdr * msg, int le
+@@ -241,7 +241,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
err = -EFAULT;
if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
goto out;
@@ -73171,7 +74763,7 @@ diff -urNp linux-3.1.4/net/core/scm.c linux-3.1.4/net/core/scm.c
int fdmax = 0;
int fdnum = scm->fp->count;
-@@ -277,7 +277,7 @@ void scm_detach_fds(struct msghdr *msg,
+@@ -277,7 +277,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
if (fdnum < fdmax)
fdmax = fdnum;
@@ -73180,10 +74772,11 @@ diff -urNp linux-3.1.4/net/core/scm.c linux-3.1.4/net/core/scm.c
i++, cmfptr++)
{
int new_fd;
-diff -urNp linux-3.1.4/net/core/skbuff.c linux-3.1.4/net/core/skbuff.c
---- linux-3.1.4/net/core/skbuff.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/skbuff.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1650,6 +1650,8 @@ int skb_splice_bits(struct sk_buff *skb,
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c
+index 387703f..035abcf 100644
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -1650,6 +1650,8 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset,
struct sock *sk = skb->sk;
int ret = 0;
@@ -73192,10 +74785,11 @@ diff -urNp linux-3.1.4/net/core/skbuff.c linux-3.1.4/net/core/skbuff.c
if (splice_grow_spd(pipe, &spd))
return -ENOMEM;
-diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
---- linux-3.1.4/net/core/sock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/core/sock.c 2011-11-16 18:40:44.000000000 -0500
-@@ -293,7 +293,7 @@ int sock_queue_rcv_skb(struct sock *sk,
+diff --git a/net/core/sock.c b/net/core/sock.c
+index 11d67b3..df26d4b 100644
+--- a/net/core/sock.c
++++ b/net/core/sock.c
+@@ -293,7 +293,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
*/
if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
(unsigned)sk->sk_rcvbuf) {
@@ -73204,7 +74798,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
trace_sock_rcvqueue_full(sk, skb);
return -ENOMEM;
}
-@@ -303,7 +303,7 @@ int sock_queue_rcv_skb(struct sock *sk,
+@@ -303,7 +303,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
return err;
if (!sk_rmem_schedule(sk, skb->truesize)) {
@@ -73213,7 +74807,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
return -ENOBUFS;
}
-@@ -323,7 +323,7 @@ int sock_queue_rcv_skb(struct sock *sk,
+@@ -323,7 +323,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
skb_dst_force(skb);
spin_lock_irqsave(&list->lock, flags);
@@ -73222,7 +74816,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
__skb_queue_tail(list, skb);
spin_unlock_irqrestore(&list->lock, flags);
-@@ -343,7 +343,7 @@ int sk_receive_skb(struct sock *sk, stru
+@@ -343,7 +343,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
skb->dev = NULL;
if (sk_rcvqueues_full(sk, skb)) {
@@ -73231,7 +74825,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
goto discard_and_relse;
}
if (nested)
-@@ -361,7 +361,7 @@ int sk_receive_skb(struct sock *sk, stru
+@@ -361,7 +361,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
} else if (sk_add_backlog(sk, skb)) {
bh_unlock_sock(sk);
@@ -73240,7 +74834,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
goto discard_and_relse;
}
-@@ -924,7 +924,7 @@ int sock_getsockopt(struct socket *sock,
+@@ -924,7 +924,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
if (len > sizeof(peercred))
len = sizeof(peercred);
cred_to_ucred(sk->sk_peer_pid, sk->sk_peer_cred, &peercred);
@@ -73249,7 +74843,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
return -EFAULT;
goto lenout;
}
-@@ -937,7 +937,7 @@ int sock_getsockopt(struct socket *sock,
+@@ -937,7 +937,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
return -ENOTCONN;
if (lv < len)
return -EINVAL;
@@ -73258,7 +74852,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
return -EFAULT;
goto lenout;
}
-@@ -970,7 +970,7 @@ int sock_getsockopt(struct socket *sock,
+@@ -970,7 +970,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
if (len > lv)
len = lv;
@@ -73267,7 +74861,7 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
return -EFAULT;
lenout:
if (put_user(len, optlen))
-@@ -2029,7 +2029,7 @@ void sock_init_data(struct socket *sock,
+@@ -2029,7 +2029,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
*/
smp_wmb();
atomic_set(&sk->sk_refcnt, 1);
@@ -73276,10 +74870,11 @@ diff -urNp linux-3.1.4/net/core/sock.c linux-3.1.4/net/core/sock.c
}
EXPORT_SYMBOL(sock_init_data);
-diff -urNp linux-3.1.4/net/decnet/sysctl_net_decnet.c linux-3.1.4/net/decnet/sysctl_net_decnet.c
---- linux-3.1.4/net/decnet/sysctl_net_decnet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/decnet/sysctl_net_decnet.c 2011-11-16 18:39:08.000000000 -0500
-@@ -174,7 +174,7 @@ static int dn_node_address_handler(ctl_t
+diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
+index 02e75d1..9a57a7c 100644
+--- a/net/decnet/sysctl_net_decnet.c
++++ b/net/decnet/sysctl_net_decnet.c
+@@ -174,7 +174,7 @@ static int dn_node_address_handler(ctl_table *table, int write,
if (len > *lenp) len = *lenp;
@@ -73288,7 +74883,7 @@ diff -urNp linux-3.1.4/net/decnet/sysctl_net_decnet.c linux-3.1.4/net/decnet/sys
return -EFAULT;
*lenp = len;
-@@ -237,7 +237,7 @@ static int dn_def_dev_handler(ctl_table
+@@ -237,7 +237,7 @@ static int dn_def_dev_handler(ctl_table *table, int write,
if (len > *lenp) len = *lenp;
@@ -73297,9 +74892,10 @@ diff -urNp linux-3.1.4/net/decnet/sysctl_net_decnet.c linux-3.1.4/net/decnet/sys
return -EFAULT;
*lenp = len;
-diff -urNp linux-3.1.4/net/econet/Kconfig linux-3.1.4/net/econet/Kconfig
---- linux-3.1.4/net/econet/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/econet/Kconfig 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/econet/Kconfig b/net/econet/Kconfig
+index 39a2d29..f39c0fe 100644
+--- a/net/econet/Kconfig
++++ b/net/econet/Kconfig
@@ -4,7 +4,7 @@
config ECONET
@@ -73309,10 +74905,11 @@ diff -urNp linux-3.1.4/net/econet/Kconfig linux-3.1.4/net/econet/Kconfig
---help---
Econet is a fairly old and slow networking protocol mainly used by
Acorn computers to access file and print servers. It uses native
-diff -urNp linux-3.1.4/net/ipv4/fib_frontend.c linux-3.1.4/net/ipv4/fib_frontend.c
---- linux-3.1.4/net/ipv4/fib_frontend.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/fib_frontend.c 2011-11-16 18:39:08.000000000 -0500
-@@ -970,12 +970,12 @@ static int fib_inetaddr_event(struct not
+diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
+index 92fc5f6..b790d91 100644
+--- a/net/ipv4/fib_frontend.c
++++ b/net/ipv4/fib_frontend.c
+@@ -970,12 +970,12 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
#ifdef CONFIG_IP_ROUTE_MULTIPATH
fib_sync_up(dev);
#endif
@@ -73327,7 +74924,7 @@ diff -urNp linux-3.1.4/net/ipv4/fib_frontend.c linux-3.1.4/net/ipv4/fib_frontend
if (ifa->ifa_dev->ifa_list == NULL) {
/* Last address was deleted from this interface.
* Disable IP.
-@@ -1011,7 +1011,7 @@ static int fib_netdev_event(struct notif
+@@ -1011,7 +1011,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
#ifdef CONFIG_IP_ROUTE_MULTIPATH
fib_sync_up(dev);
#endif
@@ -73336,10 +74933,11 @@ diff -urNp linux-3.1.4/net/ipv4/fib_frontend.c linux-3.1.4/net/ipv4/fib_frontend
rt_cache_flush(dev_net(dev), -1);
break;
case NETDEV_DOWN:
-diff -urNp linux-3.1.4/net/ipv4/fib_semantics.c linux-3.1.4/net/ipv4/fib_semantics.c
---- linux-3.1.4/net/ipv4/fib_semantics.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/fib_semantics.c 2011-11-16 18:39:08.000000000 -0500
-@@ -699,7 +699,7 @@ __be32 fib_info_update_nh_saddr(struct n
+diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
+index 80106d8..232e898 100644
+--- a/net/ipv4/fib_semantics.c
++++ b/net/ipv4/fib_semantics.c
+@@ -699,7 +699,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh)
nh->nh_saddr = inet_select_addr(nh->nh_dev,
nh->nh_gw,
nh->nh_parent->fib_scope);
@@ -73348,10 +74946,11 @@ diff -urNp linux-3.1.4/net/ipv4/fib_semantics.c linux-3.1.4/net/ipv4/fib_semanti
return nh->nh_saddr;
}
-diff -urNp linux-3.1.4/net/ipv4/inet_diag.c linux-3.1.4/net/ipv4/inet_diag.c
---- linux-3.1.4/net/ipv4/inet_diag.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/inet_diag.c 2011-11-16 18:40:44.000000000 -0500
-@@ -114,8 +114,14 @@ static int inet_csk_diag_fill(struct soc
+diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
+index 389a2e6..ac1c1de 100644
+--- a/net/ipv4/inet_diag.c
++++ b/net/ipv4/inet_diag.c
+@@ -114,8 +114,14 @@ static int inet_csk_diag_fill(struct sock *sk,
r->idiag_retrans = 0;
r->id.idiag_if = sk->sk_bound_dev_if;
@@ -73366,7 +74965,7 @@ diff -urNp linux-3.1.4/net/ipv4/inet_diag.c linux-3.1.4/net/ipv4/inet_diag.c
r->id.idiag_sport = inet->inet_sport;
r->id.idiag_dport = inet->inet_dport;
-@@ -201,8 +207,15 @@ static int inet_twsk_diag_fill(struct in
+@@ -201,8 +207,15 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw,
r->idiag_family = tw->tw_family;
r->idiag_retrans = 0;
r->id.idiag_if = tw->tw_bound_dev_if;
@@ -73382,7 +74981,7 @@ diff -urNp linux-3.1.4/net/ipv4/inet_diag.c linux-3.1.4/net/ipv4/inet_diag.c
r->id.idiag_sport = tw->tw_sport;
r->id.idiag_dport = tw->tw_dport;
r->id.idiag_src[0] = tw->tw_rcv_saddr;
-@@ -285,12 +298,14 @@ static int inet_diag_get_exact(struct sk
+@@ -285,12 +298,14 @@ static int inet_diag_get_exact(struct sk_buff *in_skb,
if (sk == NULL)
goto unlock;
@@ -73397,7 +74996,7 @@ diff -urNp linux-3.1.4/net/ipv4/inet_diag.c linux-3.1.4/net/ipv4/inet_diag.c
err = -ENOMEM;
rep = alloc_skb(NLMSG_SPACE((sizeof(struct inet_diag_msg) +
-@@ -580,8 +595,14 @@ static int inet_diag_fill_req(struct sk_
+@@ -580,8 +595,14 @@ static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
r->idiag_retrans = req->retrans;
r->id.idiag_if = sk->sk_bound_dev_if;
@@ -73412,9 +75011,10 @@ diff -urNp linux-3.1.4/net/ipv4/inet_diag.c linux-3.1.4/net/ipv4/inet_diag.c
tmo = req->expires - jiffies;
if (tmo < 0)
-diff -urNp linux-3.1.4/net/ipv4/inet_hashtables.c linux-3.1.4/net/ipv4/inet_hashtables.c
---- linux-3.1.4/net/ipv4/inet_hashtables.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/inet_hashtables.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
+index 984ec65..97ac518 100644
+--- a/net/ipv4/inet_hashtables.c
++++ b/net/ipv4/inet_hashtables.c
@@ -18,12 +18,15 @@
#include <linux/sched.h>
#include <linux/slab.h>
@@ -73440,10 +75040,11 @@ diff -urNp linux-3.1.4/net/ipv4/inet_hashtables.c linux-3.1.4/net/ipv4/inet_hash
if (tw) {
inet_twsk_deschedule(tw, death_row);
while (twrefcnt) {
-diff -urNp linux-3.1.4/net/ipv4/inetpeer.c linux-3.1.4/net/ipv4/inetpeer.c
---- linux-3.1.4/net/ipv4/inetpeer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/inetpeer.c 2011-11-16 19:18:22.000000000 -0500
-@@ -400,6 +400,8 @@ struct inet_peer *inet_getpeer(const str
+diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
+index 86f13c67..0bce60f 100644
+--- a/net/ipv4/inetpeer.c
++++ b/net/ipv4/inetpeer.c
+@@ -400,6 +400,8 @@ struct inet_peer *inet_getpeer(const struct inetpeer_addr *daddr, int create)
unsigned int sequence;
int invalidated, gccnt = 0;
@@ -73463,40 +75064,11 @@ diff -urNp linux-3.1.4/net/ipv4/inetpeer.c linux-3.1.4/net/ipv4/inetpeer.c
(daddr->family == AF_INET) ?
secure_ip_id(daddr->addr.a4) :
secure_ipv6_id(daddr->addr.a6));
-diff -urNp linux-3.1.4/net/ipv4/ipconfig.c linux-3.1.4/net/ipv4/ipconfig.c
---- linux-3.1.4/net/ipv4/ipconfig.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/ipconfig.c 2011-11-16 18:39:08.000000000 -0500
-@@ -313,7 +313,7 @@ static int __init ic_devinet_ioctl(unsig
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = devinet_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
-+ res = devinet_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-@@ -324,7 +324,7 @@ static int __init ic_dev_ioctl(unsigned
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = dev_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
-+ res = dev_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-@@ -335,7 +335,7 @@ static int __init ic_route_ioctl(unsigne
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
-- res = ip_rt_ioctl(&init_net, cmd, (void __user *) arg);
-+ res = ip_rt_ioctl(&init_net, cmd, (void __force_user *) arg);
- set_fs(oldfs);
- return res;
- }
-diff -urNp linux-3.1.4/net/ipv4/ip_fragment.c linux-3.1.4/net/ipv4/ip_fragment.c
---- linux-3.1.4/net/ipv4/ip_fragment.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/ip_fragment.c 2011-11-16 18:39:08.000000000 -0500
-@@ -316,7 +316,7 @@ static inline int ip_frag_too_far(struct
+diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
+index 0e0ab98..2ed7dd5 100644
+--- a/net/ipv4/ip_fragment.c
++++ b/net/ipv4/ip_fragment.c
+@@ -316,7 +316,7 @@ static inline int ip_frag_too_far(struct ipq *qp)
return 0;
start = qp->rid;
@@ -73505,10 +75077,11 @@ diff -urNp linux-3.1.4/net/ipv4/ip_fragment.c linux-3.1.4/net/ipv4/ip_fragment.c
qp->rid = end;
rc = qp->q.fragments && (end - start) > max;
-diff -urNp linux-3.1.4/net/ipv4/ip_sockglue.c linux-3.1.4/net/ipv4/ip_sockglue.c
---- linux-3.1.4/net/ipv4/ip_sockglue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/ip_sockglue.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1073,6 +1073,8 @@ static int do_ip_getsockopt(struct sock
+diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
+index 8905e92..0b179fb 100644
+--- a/net/ipv4/ip_sockglue.c
++++ b/net/ipv4/ip_sockglue.c
+@@ -1073,6 +1073,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
int val;
int len;
@@ -73517,7 +75090,7 @@ diff -urNp linux-3.1.4/net/ipv4/ip_sockglue.c linux-3.1.4/net/ipv4/ip_sockglue.c
if (level != SOL_IP)
return -EOPNOTSUPP;
-@@ -1110,7 +1112,8 @@ static int do_ip_getsockopt(struct sock
+@@ -1110,7 +1112,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
len = min_t(unsigned int, len, opt->optlen);
if (put_user(len, optlen))
return -EFAULT;
@@ -73527,7 +75100,7 @@ diff -urNp linux-3.1.4/net/ipv4/ip_sockglue.c linux-3.1.4/net/ipv4/ip_sockglue.c
return -EFAULT;
return 0;
}
-@@ -1238,7 +1241,7 @@ static int do_ip_getsockopt(struct sock
+@@ -1238,7 +1241,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
@@ -73536,10 +75109,42 @@ diff -urNp linux-3.1.4/net/ipv4/ip_sockglue.c linux-3.1.4/net/ipv4/ip_sockglue.c
msg.msg_controllen = len;
msg.msg_flags = flags;
-diff -urNp linux-3.1.4/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-3.1.4/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-3.1.4/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-11-16 18:39:08.000000000 -0500
-@@ -399,7 +399,7 @@ static unsigned char asn1_octets_decode(
+diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
+index 472a8c4..6507cd4 100644
+--- a/net/ipv4/ipconfig.c
++++ b/net/ipv4/ipconfig.c
+@@ -313,7 +313,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = devinet_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
++ res = devinet_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+@@ -324,7 +324,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = dev_ioctl(&init_net, cmd, (struct ifreq __user *) arg);
++ res = dev_ioctl(&init_net, cmd, (struct ifreq __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+@@ -335,7 +335,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
+
+ mm_segment_t oldfs = get_fs();
+ set_fs(get_ds());
+- res = ip_rt_ioctl(&init_net, cmd, (void __user *) arg);
++ res = ip_rt_ioctl(&init_net, cmd, (void __force_user *) arg);
+ set_fs(oldfs);
+ return res;
+ }
+diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
+index 076b7c8..9c8d038 100644
+--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
++++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
+@@ -399,7 +399,7 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
*len = 0;
@@ -73548,10 +75153,11 @@ diff -urNp linux-3.1.4/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-3.1.4/net/ip
if (*octets == NULL) {
if (net_ratelimit())
pr_notice("OOM in bsalg (%d)\n", __LINE__);
-diff -urNp linux-3.1.4/net/ipv4/ping.c linux-3.1.4/net/ipv4/ping.c
---- linux-3.1.4/net/ipv4/ping.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/ping.c 2011-11-16 18:39:08.000000000 -0500
-@@ -837,7 +837,7 @@ static void ping_format_sock(struct sock
+diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
+index 39b403f..8e6a0a8 100644
+--- a/net/ipv4/ping.c
++++ b/net/ipv4/ping.c
+@@ -837,7 +837,7 @@ static void ping_format_sock(struct sock *sp, struct seq_file *f,
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
@@ -73560,10 +75166,11 @@ diff -urNp linux-3.1.4/net/ipv4/ping.c linux-3.1.4/net/ipv4/ping.c
}
static int ping_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/ipv4/raw.c linux-3.1.4/net/ipv4/raw.c
---- linux-3.1.4/net/ipv4/raw.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/raw.c 2011-11-17 18:58:40.000000000 -0500
-@@ -302,7 +302,7 @@ static int raw_rcv_skb(struct sock * sk,
+diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
+index 61714bd..c9cee6d 100644
+--- a/net/ipv4/raw.c
++++ b/net/ipv4/raw.c
+@@ -302,7 +302,7 @@ static int raw_rcv_skb(struct sock * sk, struct sk_buff * skb)
int raw_rcv(struct sock *sk, struct sk_buff *skb)
{
if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -73594,7 +75201,7 @@ diff -urNp linux-3.1.4/net/ipv4/raw.c linux-3.1.4/net/ipv4/raw.c
if (get_user(len, optlen))
goto out;
-@@ -756,8 +760,8 @@ static int raw_geticmpfilter(struct sock
+@@ -756,8 +760,8 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o
if (len > sizeof(struct icmp_filter))
len = sizeof(struct icmp_filter);
ret = -EFAULT;
@@ -73605,7 +75212,7 @@ diff -urNp linux-3.1.4/net/ipv4/raw.c linux-3.1.4/net/ipv4/raw.c
goto out;
ret = 0;
out: return ret;
-@@ -985,7 +989,13 @@ static void raw_sock_seq_show(struct seq
+@@ -985,7 +989,13 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
sk_wmem_alloc_get(sp),
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
@@ -73620,10 +75227,11 @@ diff -urNp linux-3.1.4/net/ipv4/raw.c linux-3.1.4/net/ipv4/raw.c
}
static int raw_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/ipv4/route.c linux-3.1.4/net/ipv4/route.c
---- linux-3.1.4/net/ipv4/route.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/route.c 2011-11-16 18:39:08.000000000 -0500
-@@ -308,7 +308,7 @@ static inline unsigned int rt_hash(__be3
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 075212e..8713a00 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -308,7 +308,7 @@ static inline unsigned int rt_hash(__be32 daddr, __be32 saddr, int idx,
static inline int rt_genid(struct net *net)
{
@@ -73632,7 +75240,7 @@ diff -urNp linux-3.1.4/net/ipv4/route.c linux-3.1.4/net/ipv4/route.c
}
#ifdef CONFIG_PROC_FS
-@@ -837,7 +837,7 @@ static void rt_cache_invalidate(struct n
+@@ -837,7 +837,7 @@ static void rt_cache_invalidate(struct net *net)
unsigned char shuffle;
get_random_bytes(&shuffle, sizeof(shuffle));
@@ -73650,10 +75258,11 @@ diff -urNp linux-3.1.4/net/ipv4/route.c linux-3.1.4/net/ipv4/route.c
if (peer->tcp_ts_stamp) {
ts = peer->tcp_ts;
tsage = get_seconds() - peer->tcp_ts_stamp;
-diff -urNp linux-3.1.4/net/ipv4/tcp.c linux-3.1.4/net/ipv4/tcp.c
---- linux-3.1.4/net/ipv4/tcp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp.c 2011-11-16 18:40:44.000000000 -0500
-@@ -2122,6 +2122,8 @@ static int do_tcp_setsockopt(struct sock
+diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
+index 46febca..98b73a4 100644
+--- a/net/ipv4/tcp.c
++++ b/net/ipv4/tcp.c
+@@ -2122,6 +2122,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
int val;
int err = 0;
@@ -73662,7 +75271,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp.c linux-3.1.4/net/ipv4/tcp.c
/* These are data/string values, all the others are ints */
switch (optname) {
case TCP_CONGESTION: {
-@@ -2501,6 +2503,8 @@ static int do_tcp_getsockopt(struct sock
+@@ -2501,6 +2503,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
struct tcp_sock *tp = tcp_sk(sk);
int val, len;
@@ -73671,9 +75280,10 @@ diff -urNp linux-3.1.4/net/ipv4/tcp.c linux-3.1.4/net/ipv4/tcp.c
if (get_user(len, optlen))
return -EFAULT;
-diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
---- linux-3.1.4/net/ipv4/tcp_ipv4.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp_ipv4.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
+index 7963e03..c44f5d0 100644
+--- a/net/ipv4/tcp_ipv4.c
++++ b/net/ipv4/tcp_ipv4.c
@@ -87,6 +87,9 @@ int sysctl_tcp_tw_reuse __read_mostly;
int sysctl_tcp_low_latency __read_mostly;
EXPORT_SYMBOL(sysctl_tcp_low_latency);
@@ -73684,7 +75294,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
#ifdef CONFIG_TCP_MD5SIG
static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
-@@ -1622,6 +1625,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
+@@ -1622,6 +1625,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -73728,7 +75338,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
tcp_v4_send_reset(NULL, skb);
}
-@@ -2403,7 +2420,11 @@ static void get_openreq4(struct sock *sk
+@@ -2403,7 +2420,11 @@ static void get_openreq4(struct sock *sk, struct request_sock *req,
0, /* non standard timer */
0, /* open_requests have no inode */
atomic_read(&sk->sk_refcnt),
@@ -73740,7 +75350,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
len);
}
-@@ -2453,7 +2474,12 @@ static void get_tcp4_sock(struct sock *s
+@@ -2453,7 +2474,12 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
sock_i_uid(sk),
icsk->icsk_probes_out,
sock_i_ino(sk),
@@ -73754,7 +75364,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
-@@ -2481,7 +2507,13 @@ static void get_timewait4_sock(struct in
+@@ -2481,7 +2507,13 @@ static void get_timewait4_sock(struct inet_timewait_sock *tw,
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n",
i, src, srcp, dest, destp, tw->tw_substate, 0, 0,
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
@@ -73769,9 +75379,10 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_ipv4.c linux-3.1.4/net/ipv4/tcp_ipv4.c
}
#define TMPSZ 150
-diff -urNp linux-3.1.4/net/ipv4/tcp_minisocks.c linux-3.1.4/net/ipv4/tcp_minisocks.c
---- linux-3.1.4/net/ipv4/tcp_minisocks.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp_minisocks.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
+index 0ce3d06..e182e59 100644
+--- a/net/ipv4/tcp_minisocks.c
++++ b/net/ipv4/tcp_minisocks.c
@@ -27,6 +27,10 @@
#include <net/inet_common.h>
#include <net/xfrm.h>
@@ -73794,10 +75405,11 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_minisocks.c linux-3.1.4/net/ipv4/tcp_minisoc
if (!(flg & TCP_FLAG_RST))
req->rsk_ops->send_reset(sk, skb);
-diff -urNp linux-3.1.4/net/ipv4/tcp_output.c linux-3.1.4/net/ipv4/tcp_output.c
---- linux-3.1.4/net/ipv4/tcp_output.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp_output.c 2011-11-16 18:40:44.000000000 -0500
-@@ -2421,6 +2421,8 @@ struct sk_buff *tcp_make_synack(struct s
+diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
+index 882e0b0..2eba47f 100644
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -2421,6 +2421,8 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
int mss;
int s_data_desired = 0;
@@ -73806,10 +75418,11 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_output.c linux-3.1.4/net/ipv4/tcp_output.c
if (cvp != NULL && cvp->s_data_constant && cvp->s_data_desired)
s_data_desired = cvp->s_data_desired;
skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15 + s_data_desired, 1, GFP_ATOMIC);
-diff -urNp linux-3.1.4/net/ipv4/tcp_probe.c linux-3.1.4/net/ipv4/tcp_probe.c
---- linux-3.1.4/net/ipv4/tcp_probe.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp_probe.c 2011-11-16 18:39:08.000000000 -0500
-@@ -202,7 +202,7 @@ static ssize_t tcpprobe_read(struct file
+diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
+index 85ee7eb..53277ab 100644
+--- a/net/ipv4/tcp_probe.c
++++ b/net/ipv4/tcp_probe.c
+@@ -202,7 +202,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,
if (cnt + width >= len)
break;
@@ -73818,9 +75431,10 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_probe.c linux-3.1.4/net/ipv4/tcp_probe.c
return -EFAULT;
cnt += width;
}
-diff -urNp linux-3.1.4/net/ipv4/tcp_timer.c linux-3.1.4/net/ipv4/tcp_timer.c
---- linux-3.1.4/net/ipv4/tcp_timer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/tcp_timer.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
+index ecd44b0..b32fba6 100644
+--- a/net/ipv4/tcp_timer.c
++++ b/net/ipv4/tcp_timer.c
@@ -22,6 +22,10 @@
#include <linux/gfp.h>
#include <net/tcp.h>
@@ -73832,7 +75446,7 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_timer.c linux-3.1.4/net/ipv4/tcp_timer.c
int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
-@@ -199,6 +203,13 @@ static int tcp_write_timeout(struct sock
+@@ -199,6 +203,13 @@ static int tcp_write_timeout(struct sock *sk)
}
}
@@ -73846,9 +75460,10 @@ diff -urNp linux-3.1.4/net/ipv4/tcp_timer.c linux-3.1.4/net/ipv4/tcp_timer.c
if (retransmits_timed_out(sk, retry_until,
syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {
/* Has it gone just too far? */
-diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
---- linux-3.1.4/net/ipv4/udp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv4/udp.c 2011-11-16 19:17:54.000000000 -0500
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
+index 1b5a193..bd354b0 100644
+--- a/net/ipv4/udp.c
++++ b/net/ipv4/udp.c
@@ -86,6 +86,7 @@
#include <linux/types.h>
#include <linux/fcntl.h>
@@ -73878,7 +75493,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
/*
* This routine is called by the ICMP module when it gets some
* sort of error condition. If err < 0 then the socket should
-@@ -856,9 +864,18 @@ int udp_sendmsg(struct kiocb *iocb, stru
+@@ -856,9 +864,18 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
dport = usin->sin_port;
if (dport == 0)
return -EINVAL;
@@ -73897,7 +75512,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
daddr = inet->inet_daddr;
dport = inet->inet_dport;
/* Open fast path for connected socket.
-@@ -1099,7 +1116,7 @@ static unsigned int first_packet_length(
+@@ -1099,7 +1116,7 @@ static unsigned int first_packet_length(struct sock *sk)
udp_lib_checksum_complete(skb)) {
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
IS_UDPLITE(sk));
@@ -73917,7 +75532,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
ulen = skb->len - sizeof(struct udphdr);
if (len > ulen)
len = ulen;
-@@ -1485,7 +1506,7 @@ int udp_queue_rcv_skb(struct sock *sk, s
+@@ -1485,7 +1506,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
drop:
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -73926,7 +75541,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
kfree_skb(skb);
return -1;
}
-@@ -1504,7 +1525,7 @@ static void flush_stack(struct sock **st
+@@ -1504,7 +1525,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
if (!skb1) {
@@ -73935,7 +75550,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
IS_UDPLITE(sk));
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
-@@ -1673,6 +1694,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1673,6 +1694,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
goto csum_error;
UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -73945,7 +75560,7 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
/*
-@@ -2100,8 +2124,13 @@ static void udp4_format_sock(struct sock
+@@ -2100,8 +2124,13 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
sk_wmem_alloc_get(sp),
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
@@ -73961,10 +75576,11 @@ diff -urNp linux-3.1.4/net/ipv4/udp.c linux-3.1.4/net/ipv4/udp.c
}
int udp4_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/ipv6/addrconf.c linux-3.1.4/net/ipv6/addrconf.c
---- linux-3.1.4/net/ipv6/addrconf.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/addrconf.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2083,7 +2083,7 @@ int addrconf_set_dstaddr(struct net *net
+diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
+index 12368c5..fbf899f 100644
+--- a/net/ipv6/addrconf.c
++++ b/net/ipv6/addrconf.c
+@@ -2083,7 +2083,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
p.iph.ihl = 5;
p.iph.protocol = IPPROTO_IPV6;
p.iph.ttl = 64;
@@ -73973,10 +75589,11 @@ diff -urNp linux-3.1.4/net/ipv6/addrconf.c linux-3.1.4/net/ipv6/addrconf.c
if (ops->ndo_do_ioctl) {
mm_segment_t oldfs = get_fs();
-diff -urNp linux-3.1.4/net/ipv6/inet6_connection_sock.c linux-3.1.4/net/ipv6/inet6_connection_sock.c
---- linux-3.1.4/net/ipv6/inet6_connection_sock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/inet6_connection_sock.c 2011-11-16 18:39:08.000000000 -0500
-@@ -178,7 +178,7 @@ void __inet6_csk_dst_store(struct sock *
+diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
+index 8a58e8c..8b5e631 100644
+--- a/net/ipv6/inet6_connection_sock.c
++++ b/net/ipv6/inet6_connection_sock.c
+@@ -178,7 +178,7 @@ void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst,
#ifdef CONFIG_XFRM
{
struct rt6_info *rt = (struct rt6_info *)dst;
@@ -73985,7 +75602,7 @@ diff -urNp linux-3.1.4/net/ipv6/inet6_connection_sock.c linux-3.1.4/net/ipv6/ine
}
#endif
}
-@@ -193,7 +193,7 @@ struct dst_entry *__inet6_csk_dst_check(
+@@ -193,7 +193,7 @@ struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie)
#ifdef CONFIG_XFRM
if (dst) {
struct rt6_info *rt = (struct rt6_info *)dst;
@@ -73994,10 +75611,11 @@ diff -urNp linux-3.1.4/net/ipv6/inet6_connection_sock.c linux-3.1.4/net/ipv6/ine
__sk_dst_reset(sk);
dst = NULL;
}
-diff -urNp linux-3.1.4/net/ipv6/ipv6_sockglue.c linux-3.1.4/net/ipv6/ipv6_sockglue.c
---- linux-3.1.4/net/ipv6/ipv6_sockglue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/ipv6_sockglue.c 2011-11-16 18:40:44.000000000 -0500
-@@ -129,6 +129,8 @@ static int do_ipv6_setsockopt(struct soc
+diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
+index 2fbda5f..26ed683 100644
+--- a/net/ipv6/ipv6_sockglue.c
++++ b/net/ipv6/ipv6_sockglue.c
+@@ -129,6 +129,8 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
int val, valbool;
int retv = -ENOPROTOOPT;
@@ -74006,7 +75624,7 @@ diff -urNp linux-3.1.4/net/ipv6/ipv6_sockglue.c linux-3.1.4/net/ipv6/ipv6_sockgl
if (optval == NULL)
val=0;
else {
-@@ -919,6 +921,8 @@ static int do_ipv6_getsockopt(struct soc
+@@ -919,6 +921,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
int len;
int val;
@@ -74015,7 +75633,7 @@ diff -urNp linux-3.1.4/net/ipv6/ipv6_sockglue.c linux-3.1.4/net/ipv6/ipv6_sockgl
if (ip6_mroute_opt(optname))
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
-@@ -960,7 +964,7 @@ static int do_ipv6_getsockopt(struct soc
+@@ -960,7 +964,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (sk->sk_type != SOCK_STREAM)
return -ENOPROTOOPT;
@@ -74024,10 +75642,11 @@ diff -urNp linux-3.1.4/net/ipv6/ipv6_sockglue.c linux-3.1.4/net/ipv6/ipv6_sockgl
msg.msg_controllen = len;
msg.msg_flags = flags;
-diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
---- linux-3.1.4/net/ipv6/raw.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/raw.c 2011-11-16 18:40:44.000000000 -0500
-@@ -376,7 +376,7 @@ static inline int rawv6_rcv_skb(struct s
+diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
+index 343852e..c92bd15 100644
+--- a/net/ipv6/raw.c
++++ b/net/ipv6/raw.c
+@@ -376,7 +376,7 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
{
if ((raw6_sk(sk)->checksum || rcu_dereference_raw(sk->sk_filter)) &&
skb_checksum_complete(skb)) {
@@ -74036,7 +75655,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -403,7 +403,7 @@ int rawv6_rcv(struct sock *sk, struct sk
+@@ -403,7 +403,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
struct raw6_sock *rp = raw6_sk(sk);
if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) {
@@ -74045,7 +75664,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -427,7 +427,7 @@ int rawv6_rcv(struct sock *sk, struct sk
+@@ -427,7 +427,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
if (inet->hdrincl) {
if (skb_checksum_complete(skb)) {
@@ -74063,7 +75682,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
struct flowi6 *fl6, struct dst_entry **dstp,
unsigned int flags)
{
-@@ -742,6 +742,8 @@ static int rawv6_sendmsg(struct kiocb *i
+@@ -742,6 +742,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
u16 proto;
int err;
@@ -74089,7 +75708,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
return 0;
default:
return -ENOPROTOOPT;
-@@ -927,6 +932,7 @@ static int rawv6_geticmpfilter(struct so
+@@ -927,6 +932,7 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
int len;
@@ -74097,7 +75716,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
switch (optname) {
case ICMPV6_FILTER:
-@@ -938,7 +944,8 @@ static int rawv6_geticmpfilter(struct so
+@@ -938,7 +944,8 @@ static int rawv6_geticmpfilter(struct sock *sk, int level, int optname,
len = sizeof(struct icmp6_filter);
if (put_user(len, optlen))
return -EFAULT;
@@ -74107,7 +75726,7 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
return -EFAULT;
return 0;
default:
-@@ -1245,7 +1252,13 @@ static void raw6_sock_seq_show(struct se
+@@ -1245,7 +1252,13 @@ static void raw6_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
@@ -74122,10 +75741,11 @@ diff -urNp linux-3.1.4/net/ipv6/raw.c linux-3.1.4/net/ipv6/raw.c
}
static int raw6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
---- linux-3.1.4/net/ipv6/tcp_ipv6.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/tcp_ipv6.c 2011-11-16 18:40:44.000000000 -0500
-@@ -93,6 +93,10 @@ static struct tcp_md5sig_key *tcp_v6_md5
+diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
+index 7b8fc57..c6185da 100644
+--- a/net/ipv6/tcp_ipv6.c
++++ b/net/ipv6/tcp_ipv6.c
+@@ -93,6 +93,10 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
}
#endif
@@ -74136,7 +75756,7 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
static void tcp_v6_hash(struct sock *sk)
{
if (sk->sk_state != TCP_CLOSE) {
-@@ -1647,6 +1651,9 @@ static int tcp_v6_do_rcv(struct sock *sk
+@@ -1647,6 +1651,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -74146,7 +75766,7 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
tcp_v6_send_reset(sk, skb);
discard:
if (opt_skb)
-@@ -1726,12 +1733,20 @@ static int tcp_v6_rcv(struct sk_buff *sk
+@@ -1726,12 +1733,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
TCP_SKB_CB(skb)->sacked = 0;
sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -74180,7 +75800,7 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
tcp_v6_send_reset(NULL, skb);
}
-@@ -2039,7 +2058,13 @@ static void get_openreq6(struct seq_file
+@@ -2039,7 +2058,13 @@ static void get_openreq6(struct seq_file *seq,
uid,
0, /* non standard timer */
0, /* open_requests have no inode */
@@ -74195,7 +75815,7 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
}
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
-@@ -2089,7 +2114,12 @@ static void get_tcp6_sock(struct seq_fil
+@@ -2089,7 +2114,12 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
sock_i_uid(sp),
icsk->icsk_probes_out,
sock_i_ino(sp),
@@ -74209,7 +75829,7 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
-@@ -2124,7 +2154,13 @@ static void get_timewait6_sock(struct se
+@@ -2124,7 +2154,13 @@ static void get_timewait6_sock(struct seq_file *seq,
dest->s6_addr32[2], dest->s6_addr32[3], destp,
tw->tw_substate, 0, 0,
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
@@ -74224,9 +75844,10 @@ diff -urNp linux-3.1.4/net/ipv6/tcp_ipv6.c linux-3.1.4/net/ipv6/tcp_ipv6.c
}
static int tcp6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
---- linux-3.1.4/net/ipv6/udp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/ipv6/udp.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
+index bb95e8e..ae0ee80 100644
+--- a/net/ipv6/udp.c
++++ b/net/ipv6/udp.c
@@ -50,6 +50,10 @@
#include <linux/seq_file.h>
#include "udp_impl.h"
@@ -74238,7 +75859,7 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
{
const struct in6_addr *sk_rcv_saddr6 = &inet6_sk(sk)->rcv_saddr;
-@@ -548,7 +552,7 @@ int udpv6_queue_rcv_skb(struct sock * sk
+@@ -548,7 +552,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
return 0;
drop:
@@ -74247,7 +75868,7 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
drop_no_sk_drops_inc:
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
kfree_skb(skb);
-@@ -624,7 +628,7 @@ static void flush_stack(struct sock **st
+@@ -624,7 +628,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
continue;
}
drop:
@@ -74256,7 +75877,7 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
UDP6_INC_STATS_BH(sock_net(sk),
UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk));
UDP6_INC_STATS_BH(sock_net(sk),
-@@ -779,6 +783,9 @@ int __udp6_lib_rcv(struct sk_buff *skb,
+@@ -779,6 +783,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
proto == IPPROTO_UDPLITE);
@@ -74266,7 +75887,7 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
kfree_skb(skb);
-@@ -795,7 +802,7 @@ int __udp6_lib_rcv(struct sk_buff *skb,
+@@ -795,7 +802,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
if (!sock_owned_by_user(sk))
udpv6_queue_rcv_skb(sk, skb);
else if (sk_add_backlog(sk, skb)) {
@@ -74275,7 +75896,7 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
bh_unlock_sock(sk);
sock_put(sk);
goto discard;
-@@ -1406,8 +1413,13 @@ static void udp6_sock_seq_show(struct se
+@@ -1406,8 +1413,13 @@ static void udp6_sock_seq_show(struct seq_file *seq, struct sock *sp, int bucket
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
@@ -74291,10 +75912,11 @@ diff -urNp linux-3.1.4/net/ipv6/udp.c linux-3.1.4/net/ipv6/udp.c
}
int udp6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/ircomm_tty.c
---- linux-3.1.4/net/irda/ircomm/ircomm_tty.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/irda/ircomm/ircomm_tty.c 2011-11-16 18:39:08.000000000 -0500
-@@ -282,16 +282,16 @@ static int ircomm_tty_block_til_ready(st
+diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
+index b3cc8b3..baa02d0 100644
+--- a/net/irda/ircomm/ircomm_tty.c
++++ b/net/irda/ircomm/ircomm_tty.c
+@@ -282,16 +282,16 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
add_wait_queue(&self->open_wait, &wait);
IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
@@ -74314,7 +75936,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
while (1) {
if (tty->termios->c_cflag & CBAUD) {
-@@ -331,7 +331,7 @@ static int ircomm_tty_block_til_ready(st
+@@ -331,7 +331,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
}
IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
@@ -74323,7 +75945,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
schedule();
}
-@@ -342,13 +342,13 @@ static int ircomm_tty_block_til_ready(st
+@@ -342,13 +342,13 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
if (extra_count) {
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&self->spinlock, flags);
@@ -74340,7 +75962,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
if (!retval)
self->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -417,14 +417,14 @@ static int ircomm_tty_open(struct tty_st
+@@ -417,14 +417,14 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
}
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&self->spinlock, flags);
@@ -74357,7 +75979,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
/* Not really used by us, but lets do it anyway */
self->tty->low_latency = (self->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-@@ -510,7 +510,7 @@ static void ircomm_tty_close(struct tty_
+@@ -510,7 +510,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
return;
}
@@ -74366,7 +75988,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
/*
* Uh, oh. tty->count is 1, which means that the tty
* structure will be freed. state->count should always
-@@ -520,16 +520,16 @@ static void ircomm_tty_close(struct tty_
+@@ -520,16 +520,16 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
*/
IRDA_DEBUG(0, "%s(), bad serial port count; "
"tty->count is 1, state->count is %d\n", __func__ ,
@@ -74389,7 +76011,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
-@@ -561,7 +561,7 @@ static void ircomm_tty_close(struct tty_
+@@ -561,7 +561,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
tty->closing = 0;
self->tty = NULL;
@@ -74398,7 +76020,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
if (self->close_delay)
schedule_timeout_interruptible(self->close_delay);
wake_up_interruptible(&self->open_wait);
-@@ -1013,7 +1013,7 @@ static void ircomm_tty_hangup(struct tty
+@@ -1013,7 +1013,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
spin_lock_irqsave(&self->spinlock, flags);
self->flags &= ~ASYNC_NORMAL_ACTIVE;
self->tty = NULL;
@@ -74407,7 +76029,7 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
spin_unlock_irqrestore(&self->spinlock, flags);
wake_up_interruptible(&self->open_wait);
-@@ -1360,7 +1360,7 @@ static void ircomm_tty_line_info(struct
+@@ -1360,7 +1360,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
seq_putc(m, '\n');
seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
@@ -74416,10 +76038,11 @@ diff -urNp linux-3.1.4/net/irda/ircomm/ircomm_tty.c linux-3.1.4/net/irda/ircomm/
seq_printf(m, "Max data size: %d\n", self->max_data_size);
seq_printf(m, "Max header size: %d\n", self->max_header_size);
-diff -urNp linux-3.1.4/net/iucv/af_iucv.c linux-3.1.4/net/iucv/af_iucv.c
---- linux-3.1.4/net/iucv/af_iucv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/iucv/af_iucv.c 2011-11-16 18:39:08.000000000 -0500
-@@ -648,10 +648,10 @@ static int iucv_sock_autobind(struct soc
+diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
+index e2013e4..edfc1e3 100644
+--- a/net/iucv/af_iucv.c
++++ b/net/iucv/af_iucv.c
+@@ -648,10 +648,10 @@ static int iucv_sock_autobind(struct sock *sk)
write_lock_bh(&iucv_sk_list.lock);
@@ -74432,10 +76055,11 @@ diff -urNp linux-3.1.4/net/iucv/af_iucv.c linux-3.1.4/net/iucv/af_iucv.c
}
write_unlock_bh(&iucv_sk_list.lock);
-diff -urNp linux-3.1.4/net/key/af_key.c linux-3.1.4/net/key/af_key.c
---- linux-3.1.4/net/key/af_key.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/key/af_key.c 2011-11-16 18:40:44.000000000 -0500
-@@ -2481,6 +2481,8 @@ static int pfkey_migrate(struct sock *sk
+diff --git a/net/key/af_key.c b/net/key/af_key.c
+index 1e733e9..c84de2f 100644
+--- a/net/key/af_key.c
++++ b/net/key/af_key.c
+@@ -2481,6 +2481,8 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff *skb,
struct xfrm_migrate m[XFRM_MAX_DEPTH];
struct xfrm_kmaddress k;
@@ -74444,7 +76068,7 @@ diff -urNp linux-3.1.4/net/key/af_key.c linux-3.1.4/net/key/af_key.c
if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC - 1],
ext_hdrs[SADB_EXT_ADDRESS_DST - 1]) ||
!ext_hdrs[SADB_X_EXT_POLICY - 1]) {
-@@ -3016,10 +3018,10 @@ static int pfkey_send_policy_notify(stru
+@@ -3016,10 +3018,10 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struc
static u32 get_acqseq(void)
{
u32 res;
@@ -74457,10 +76081,11 @@ diff -urNp linux-3.1.4/net/key/af_key.c linux-3.1.4/net/key/af_key.c
} while (!res);
return res;
}
-diff -urNp linux-3.1.4/net/lapb/lapb_iface.c linux-3.1.4/net/lapb/lapb_iface.c
---- linux-3.1.4/net/lapb/lapb_iface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/lapb/lapb_iface.c 2011-11-16 18:39:08.000000000 -0500
-@@ -158,7 +158,7 @@ int lapb_register(struct net_device *dev
+diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
+index 956b7e4..f01d328 100644
+--- a/net/lapb/lapb_iface.c
++++ b/net/lapb/lapb_iface.c
+@@ -158,7 +158,7 @@ int lapb_register(struct net_device *dev, struct lapb_register_struct *callbacks
goto out;
lapb->dev = dev;
@@ -74469,7 +76094,7 @@ diff -urNp linux-3.1.4/net/lapb/lapb_iface.c linux-3.1.4/net/lapb/lapb_iface.c
__lapb_insert_cb(lapb);
-@@ -380,32 +380,32 @@ int lapb_data_received(struct net_device
+@@ -380,32 +380,32 @@ int lapb_data_received(struct net_device *dev, struct sk_buff *skb)
void lapb_connect_confirmation(struct lapb_cb *lapb, int reason)
{
@@ -74512,7 +76137,7 @@ diff -urNp linux-3.1.4/net/lapb/lapb_iface.c linux-3.1.4/net/lapb/lapb_iface.c
kfree_skb(skb);
return NET_RX_SUCCESS; /* For now; must be != NET_RX_DROP */
-@@ -415,8 +415,8 @@ int lapb_data_transmit(struct lapb_cb *l
+@@ -415,8 +415,8 @@ int lapb_data_transmit(struct lapb_cb *lapb, struct sk_buff *skb)
{
int used = 0;
@@ -74523,10 +76148,11 @@ diff -urNp linux-3.1.4/net/lapb/lapb_iface.c linux-3.1.4/net/lapb/lapb_iface.c
used = 1;
}
-diff -urNp linux-3.1.4/net/mac80211/debugfs_sta.c linux-3.1.4/net/mac80211/debugfs_sta.c
---- linux-3.1.4/net/mac80211/debugfs_sta.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/debugfs_sta.c 2011-11-16 18:40:44.000000000 -0500
-@@ -140,6 +140,8 @@ static ssize_t sta_agg_status_read(struc
+diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
+index a01d213..6a1f1ab 100644
+--- a/net/mac80211/debugfs_sta.c
++++ b/net/mac80211/debugfs_sta.c
+@@ -140,6 +140,8 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
struct tid_ampdu_rx *tid_rx;
struct tid_ampdu_tx *tid_tx;
@@ -74535,7 +76161,7 @@ diff -urNp linux-3.1.4/net/mac80211/debugfs_sta.c linux-3.1.4/net/mac80211/debug
rcu_read_lock();
p += scnprintf(p, sizeof(buf) + buf - p, "next dialog_token: %#02x\n",
-@@ -240,6 +242,8 @@ static ssize_t sta_ht_capa_read(struct f
+@@ -240,6 +242,8 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
struct sta_info *sta = file->private_data;
struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap;
@@ -74544,9 +76170,10 @@ diff -urNp linux-3.1.4/net/mac80211/debugfs_sta.c linux-3.1.4/net/mac80211/debug
p += scnprintf(p, sizeof(buf) + buf - p, "ht %ssupported\n",
htc->ht_supported ? "" : "not ");
if (htc->ht_supported) {
-diff -urNp linux-3.1.4/net/mac80211/ieee80211_i.h linux-3.1.4/net/mac80211/ieee80211_i.h
---- linux-3.1.4/net/mac80211/ieee80211_i.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/ieee80211_i.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
+index 9fab144..7f0fc14 100644
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
@@ -27,6 +27,7 @@
#include <net/ieee80211_radiotap.h>
#include <net/cfg80211.h>
@@ -74564,10 +76191,11 @@ diff -urNp linux-3.1.4/net/mac80211/ieee80211_i.h linux-3.1.4/net/mac80211/ieee8
int monitors, cooked_mntrs;
/* number of interfaces with corresponding FIF_ flags */
int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
-diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
---- linux-3.1.4/net/mac80211/iface.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/iface.c 2011-11-16 18:39:08.000000000 -0500
-@@ -211,7 +211,7 @@ static int ieee80211_do_open(struct net_
+diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
+index 556e7e6..120dcaf 100644
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -211,7 +211,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
break;
}
@@ -74576,7 +76204,7 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
res = drv_start(local);
if (res)
goto err_del_bss;
-@@ -235,7 +235,7 @@ static int ieee80211_do_open(struct net_
+@@ -235,7 +235,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -74585,7 +76213,7 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
drv_stop(local);
return -EADDRNOTAVAIL;
}
-@@ -327,7 +327,7 @@ static int ieee80211_do_open(struct net_
+@@ -327,7 +327,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
mutex_unlock(&local->mtx);
if (coming_up)
@@ -74594,7 +76222,7 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
if (hw_reconf_flags) {
ieee80211_hw_config(local, hw_reconf_flags);
-@@ -347,7 +347,7 @@ static int ieee80211_do_open(struct net_
+@@ -347,7 +347,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
err_del_interface:
drv_remove_interface(local, &sdata->vif);
err_stop:
@@ -74603,7 +76231,7 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
drv_stop(local);
err_del_bss:
sdata->bss = NULL;
-@@ -474,7 +474,7 @@ static void ieee80211_do_stop(struct iee
+@@ -474,7 +474,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
}
if (going_down)
@@ -74612,7 +76240,7 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
-@@ -533,7 +533,7 @@ static void ieee80211_do_stop(struct iee
+@@ -533,7 +533,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
ieee80211_recalc_ps(local, -1);
@@ -74621,10 +76249,11 @@ diff -urNp linux-3.1.4/net/mac80211/iface.c linux-3.1.4/net/mac80211/iface.c
if (local->ops->napi_poll)
napi_disable(&local->napi);
ieee80211_clear_tx_pending(local);
-diff -urNp linux-3.1.4/net/mac80211/main.c linux-3.1.4/net/mac80211/main.c
---- linux-3.1.4/net/mac80211/main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/main.c 2011-11-16 18:39:08.000000000 -0500
-@@ -209,7 +209,7 @@ int ieee80211_hw_config(struct ieee80211
+diff --git a/net/mac80211/main.c b/net/mac80211/main.c
+index acb4423..278c8e5 100644
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -209,7 +209,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
local->hw.conf.power_level = power;
}
@@ -74633,10 +76262,11 @@ diff -urNp linux-3.1.4/net/mac80211/main.c linux-3.1.4/net/mac80211/main.c
ret = drv_config(local, changed);
/*
* Goal:
-diff -urNp linux-3.1.4/net/mac80211/mlme.c linux-3.1.4/net/mac80211/mlme.c
---- linux-3.1.4/net/mac80211/mlme.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/mlme.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1464,6 +1464,8 @@ static bool ieee80211_assoc_success(stru
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index 0f48368..d48e688 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1464,6 +1464,8 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
bool have_higher_than_11mbit = false;
u16 ap_ht_cap_flags;
@@ -74645,10 +76275,11 @@ diff -urNp linux-3.1.4/net/mac80211/mlme.c linux-3.1.4/net/mac80211/mlme.c
/* AssocResp and ReassocResp have identical structure */
aid = le16_to_cpu(mgmt->u.assoc_resp.aid);
-diff -urNp linux-3.1.4/net/mac80211/pm.c linux-3.1.4/net/mac80211/pm.c
---- linux-3.1.4/net/mac80211/pm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/pm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -34,7 +34,7 @@ int __ieee80211_suspend(struct ieee80211
+diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
+index 6326d34..7225f61 100644
+--- a/net/mac80211/pm.c
++++ b/net/mac80211/pm.c
+@@ -34,7 +34,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;
@@ -74657,7 +76288,7 @@ diff -urNp linux-3.1.4/net/mac80211/pm.c linux-3.1.4/net/mac80211/pm.c
goto suspend;
ieee80211_scan_cancel(local);
-@@ -72,7 +72,7 @@ int __ieee80211_suspend(struct ieee80211
+@@ -72,7 +72,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
cancel_work_sync(&local->dynamic_ps_enable_work);
del_timer_sync(&local->dynamic_ps_timer);
@@ -74666,7 +76297,7 @@ diff -urNp linux-3.1.4/net/mac80211/pm.c linux-3.1.4/net/mac80211/pm.c
if (local->wowlan) {
int err = drv_suspend(local, wowlan);
if (err < 0) {
-@@ -129,7 +129,7 @@ int __ieee80211_suspend(struct ieee80211
+@@ -129,7 +129,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
}
/* stop hardware - this must stop RX */
@@ -74675,10 +76306,11 @@ diff -urNp linux-3.1.4/net/mac80211/pm.c linux-3.1.4/net/mac80211/pm.c
ieee80211_stop_device(local);
suspend:
-diff -urNp linux-3.1.4/net/mac80211/rate.c linux-3.1.4/net/mac80211/rate.c
---- linux-3.1.4/net/mac80211/rate.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/rate.c 2011-11-16 18:39:08.000000000 -0500
-@@ -371,7 +371,7 @@ int ieee80211_init_rate_ctrl_alg(struct
+diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
+index 3d5a2cb..b17ad48 100644
+--- a/net/mac80211/rate.c
++++ b/net/mac80211/rate.c
+@@ -371,7 +371,7 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
ASSERT_RTNL();
@@ -74687,10 +76319,11 @@ diff -urNp linux-3.1.4/net/mac80211/rate.c linux-3.1.4/net/mac80211/rate.c
return -EBUSY;
if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
-diff -urNp linux-3.1.4/net/mac80211/rc80211_pid_debugfs.c linux-3.1.4/net/mac80211/rc80211_pid_debugfs.c
---- linux-3.1.4/net/mac80211/rc80211_pid_debugfs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/mac80211/rc80211_pid_debugfs.c 2011-11-16 18:39:08.000000000 -0500
-@@ -192,7 +192,7 @@ static ssize_t rate_control_pid_events_r
+diff --git a/net/mac80211/rc80211_pid_debugfs.c b/net/mac80211/rc80211_pid_debugfs.c
+index 4851e9e..d860e05 100644
+--- a/net/mac80211/rc80211_pid_debugfs.c
++++ b/net/mac80211/rc80211_pid_debugfs.c
+@@ -192,7 +192,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
spin_unlock_irqrestore(&events->lock, status);
@@ -74699,10 +76332,11 @@ diff -urNp linux-3.1.4/net/mac80211/rc80211_pid_debugfs.c linux-3.1.4/net/mac802
return -EFAULT;
return p;
-diff -urNp linux-3.1.4/net/mac80211/util.c linux-3.1.4/net/mac80211/util.c
---- linux-3.1.4/net/mac80211/util.c 2011-11-26 19:57:29.000000000 -0500
-+++ linux-3.1.4/net/mac80211/util.c 2011-11-26 20:00:43.000000000 -0500
-@@ -1170,7 +1170,7 @@ int ieee80211_reconfig(struct ieee80211_
+diff --git a/net/mac80211/util.c b/net/mac80211/util.c
+index fd031e8..84fbfcf 100644
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -1170,7 +1170,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
drv_set_coverage_class(local, hw->wiphy->coverage_class);
/* everything else happens only if HW was up & running */
@@ -74711,10 +76345,44 @@ diff -urNp linux-3.1.4/net/mac80211/util.c linux-3.1.4/net/mac80211/util.c
goto wake_up;
/*
-diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c
---- linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c 2011-11-16 18:39:08.000000000 -0500
-@@ -556,7 +556,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, s
+diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
+index 32bff6d..d0cf986 100644
+--- a/net/netfilter/Kconfig
++++ b/net/netfilter/Kconfig
+@@ -781,6 +781,16 @@ config NETFILTER_XT_MATCH_ESP
+
+ To compile it as a module, choose M here. If unsure, say N.
+
++config NETFILTER_XT_MATCH_GRADM
++ tristate '"gradm" match support'
++ depends on NETFILTER_XTABLES && NETFILTER_ADVANCED
++ depends on GRKERNSEC && !GRKERNSEC_NO_RBAC
++ ---help---
++ The gradm match allows to match on grsecurity RBAC being enabled.
++ It is useful when iptables rules are applied early on bootup to
++ prevent connections to the machine (except from a trusted host)
++ while the RBAC system is disabled.
++
+ config NETFILTER_XT_MATCH_HASHLIMIT
+ tristate '"hashlimit" match support'
+ depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
+diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
+index 1a02853..5d8c22e 100644
+--- a/net/netfilter/Makefile
++++ b/net/netfilter/Makefile
+@@ -81,6 +81,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
++obj-$(CONFIG_NETFILTER_XT_MATCH_GRADM) += xt_gradm.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
+ obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
+diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
+index 12571fb..fb73976 100644
+--- a/net/netfilter/ipvs/ip_vs_conn.c
++++ b/net/netfilter/ipvs/ip_vs_conn.c
+@@ -556,7 +556,7 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
/* Increase the refcnt counter of the dest */
atomic_inc(&dest->refcnt);
@@ -74723,7 +76391,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c linux-3.1.4/net/netfilter
if (cp->protocol != IPPROTO_UDP)
conn_flags &= ~IP_VS_CONN_F_ONE_PACKET;
/* Bind with the destination and its corresponding transmitter */
-@@ -869,7 +869,7 @@ ip_vs_conn_new(const struct ip_vs_conn_p
+@@ -869,7 +869,7 @@ ip_vs_conn_new(const struct ip_vs_conn_param *p,
atomic_set(&cp->refcnt, 1);
atomic_set(&cp->n_control, 0);
@@ -74732,7 +76400,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c linux-3.1.4/net/netfilter
atomic_inc(&ipvs->conn_count);
if (flags & IP_VS_CONN_F_NO_CPORT)
-@@ -1149,7 +1149,7 @@ static inline int todrop_entry(struct ip
+@@ -1149,7 +1149,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
/* Don't drop the entry if its number of incoming packets is not
located in [0, 8] */
@@ -74741,10 +76409,11 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_conn.c linux-3.1.4/net/netfilter
if (i > 8 || i < 0) return 0;
if (!todrop_rate[i]) return 0;
-diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c
---- linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c 2011-11-16 18:39:08.000000000 -0500
-@@ -563,7 +563,7 @@ int ip_vs_leave(struct ip_vs_service *sv
+diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
+index 4f77bb1..5d0bc26 100644
+--- a/net/netfilter/ipvs/ip_vs_core.c
++++ b/net/netfilter/ipvs/ip_vs_core.c
+@@ -563,7 +563,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
ret = cp->packet_xmit(skb, cp, pd->pp);
/* do not touch skb anymore */
@@ -74753,7 +76422,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c linux-3.1.4/net/netfilter
ip_vs_conn_put(cp);
return ret;
}
-@@ -1612,7 +1612,7 @@ ip_vs_in(unsigned int hooknum, struct sk
+@@ -1612,7 +1612,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
if (cp->flags & IP_VS_CONN_F_ONE_PACKET)
pkts = sysctl_sync_threshold(ipvs);
else
@@ -74762,10 +76431,11 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_core.c linux-3.1.4/net/netfilter
if ((ipvs->sync_state & IP_VS_STATE_MASTER) &&
cp->protocol == IPPROTO_SCTP) {
-diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c
---- linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c 2011-11-16 19:13:12.000000000 -0500
-@@ -782,7 +782,7 @@ __ip_vs_update_dest(struct ip_vs_service
+diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
+index e3be48b..d658c8c 100644
+--- a/net/netfilter/ipvs/ip_vs_ctl.c
++++ b/net/netfilter/ipvs/ip_vs_ctl.c
+@@ -782,7 +782,7 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
ip_vs_rs_hash(ipvs, dest);
write_unlock_bh(&ipvs->rs_lock);
}
@@ -74774,7 +76444,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
/* bind the service */
if (!dest->svc) {
-@@ -2027,7 +2027,7 @@ static int ip_vs_info_seq_show(struct se
+@@ -2027,7 +2027,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
" %-7s %-6d %-10d %-10d\n",
&dest->addr.in6,
ntohs(dest->port),
@@ -74783,7 +76453,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
atomic_read(&dest->weight),
atomic_read(&dest->activeconns),
atomic_read(&dest->inactconns));
-@@ -2038,7 +2038,7 @@ static int ip_vs_info_seq_show(struct se
+@@ -2038,7 +2038,7 @@ static int ip_vs_info_seq_show(struct seq_file *seq, void *v)
"%-7s %-6d %-10d %-10d\n",
ntohl(dest->addr.ip),
ntohs(dest->port),
@@ -74792,7 +76462,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
atomic_read(&dest->weight),
atomic_read(&dest->activeconns),
atomic_read(&dest->inactconns));
-@@ -2285,6 +2285,8 @@ do_ip_vs_set_ctl(struct sock *sk, int cm
+@@ -2285,6 +2285,8 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
struct ip_vs_dest_user_kern udest;
struct netns_ipvs *ipvs = net_ipvs(net);
@@ -74801,7 +76471,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
if (!capable(CAP_NET_ADMIN))
return -EPERM;
-@@ -2508,7 +2510,7 @@ __ip_vs_get_dest_entries(struct net *net
+@@ -2508,7 +2510,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
entry.addr = dest->addr.ip;
entry.port = dest->port;
@@ -74810,7 +76480,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
entry.weight = atomic_read(&dest->weight);
entry.u_threshold = dest->u_threshold;
entry.l_threshold = dest->l_threshold;
-@@ -3041,7 +3043,7 @@ static int ip_vs_genl_fill_dest(struct s
+@@ -3041,7 +3043,7 @@ static int ip_vs_genl_fill_dest(struct sk_buff *skb, struct ip_vs_dest *dest)
NLA_PUT_U16(skb, IPVS_DEST_ATTR_PORT, dest->port);
NLA_PUT_U32(skb, IPVS_DEST_ATTR_FWD_METHOD,
@@ -74819,9 +76489,10 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_ctl.c linux-3.1.4/net/netfilter/
NLA_PUT_U32(skb, IPVS_DEST_ATTR_WEIGHT, atomic_read(&dest->weight));
NLA_PUT_U32(skb, IPVS_DEST_ATTR_U_THRESH, dest->u_threshold);
NLA_PUT_U32(skb, IPVS_DEST_ATTR_L_THRESH, dest->l_threshold);
-diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c
---- linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
+index 3cdd479..116afa8 100644
+--- a/net/netfilter/ipvs/ip_vs_sync.c
++++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -649,7 +649,7 @@ control:
* i.e only increment in_pkts for Templates.
*/
@@ -74831,7 +76502,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c linux-3.1.4/net/netfilter
if (pkts % sysctl_sync_period(ipvs) != 1)
return;
-@@ -795,7 +795,7 @@ static void ip_vs_proc_conn(struct net *
+@@ -795,7 +795,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,
if (opt)
memcpy(&cp->in_seq, opt, sizeof(*opt));
@@ -74840,10 +76511,11 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_sync.c linux-3.1.4/net/netfilter
cp->state = state;
cp->old_state = cp->state;
/*
-diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c
---- linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1151,7 +1151,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, str
+diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
+index ee319a4..8a285ee 100644
+--- a/net/netfilter/ipvs/ip_vs_xmit.c
++++ b/net/netfilter/ipvs/ip_vs_xmit.c
+@@ -1151,7 +1151,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
else
rc = NF_ACCEPT;
/* do not touch skb anymore */
@@ -74852,7 +76524,7 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c linux-3.1.4/net/netfilter
goto out;
}
-@@ -1272,7 +1272,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb,
+@@ -1272,7 +1272,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
else
rc = NF_ACCEPT;
/* do not touch skb anymore */
@@ -74861,40 +76533,10 @@ diff -urNp linux-3.1.4/net/netfilter/ipvs/ip_vs_xmit.c linux-3.1.4/net/netfilter
goto out;
}
-diff -urNp linux-3.1.4/net/netfilter/Kconfig linux-3.1.4/net/netfilter/Kconfig
---- linux-3.1.4/net/netfilter/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/Kconfig 2011-11-16 18:40:44.000000000 -0500
-@@ -781,6 +781,16 @@ config NETFILTER_XT_MATCH_ESP
-
- To compile it as a module, choose M here. If unsure, say N.
-
-+config NETFILTER_XT_MATCH_GRADM
-+ tristate '"gradm" match support'
-+ depends on NETFILTER_XTABLES && NETFILTER_ADVANCED
-+ depends on GRKERNSEC && !GRKERNSEC_NO_RBAC
-+ ---help---
-+ The gradm match allows to match on grsecurity RBAC being enabled.
-+ It is useful when iptables rules are applied early on bootup to
-+ prevent connections to the machine (except from a trusted host)
-+ while the RBAC system is disabled.
-+
- config NETFILTER_XT_MATCH_HASHLIMIT
- tristate '"hashlimit" match support'
- depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
-diff -urNp linux-3.1.4/net/netfilter/Makefile linux-3.1.4/net/netfilter/Makefile
---- linux-3.1.4/net/netfilter/Makefile 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/Makefile 2011-11-16 18:40:44.000000000 -0500
-@@ -81,6 +81,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) +=
- obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
-+obj-$(CONFIG_NETFILTER_XT_MATCH_GRADM) += xt_gradm.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
- obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
-diff -urNp linux-3.1.4/net/netfilter/nfnetlink_log.c linux-3.1.4/net/netfilter/nfnetlink_log.c
---- linux-3.1.4/net/netfilter/nfnetlink_log.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/nfnetlink_log.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
+index 2d8158a..5dca296 100644
+--- a/net/netfilter/nfnetlink_log.c
++++ b/net/netfilter/nfnetlink_log.c
@@ -70,7 +70,7 @@ struct nfulnl_instance {
};
@@ -74904,7 +76546,7 @@ diff -urNp linux-3.1.4/net/netfilter/nfnetlink_log.c linux-3.1.4/net/netfilter/n
#define INSTANCE_BUCKETS 16
static struct hlist_head instance_table[INSTANCE_BUCKETS];
-@@ -505,7 +505,7 @@ __build_packet_message(struct nfulnl_ins
+@@ -505,7 +505,7 @@ __build_packet_message(struct nfulnl_instance *inst,
/* global sequence number */
if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL)
NLA_PUT_BE32(inst->skb, NFULA_SEQ_GLOBAL,
@@ -74913,9 +76555,11 @@ diff -urNp linux-3.1.4/net/netfilter/nfnetlink_log.c linux-3.1.4/net/netfilter/n
if (data_len) {
struct nlattr *nla;
-diff -urNp linux-3.1.4/net/netfilter/xt_gradm.c linux-3.1.4/net/netfilter/xt_gradm.c
---- linux-3.1.4/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/net/netfilter/xt_gradm.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
+new file mode 100644
+index 0000000..6905327
+--- /dev/null
++++ b/net/netfilter/xt_gradm.c
@@ -0,0 +1,51 @@
+/*
+ * gradm match for netfilter
@@ -74968,9 +76612,10 @@ diff -urNp linux-3.1.4/net/netfilter/xt_gradm.c linux-3.1.4/net/netfilter/xt_gra
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("ipt_gradm");
+MODULE_ALIAS("ip6t_gradm");
-diff -urNp linux-3.1.4/net/netfilter/xt_statistic.c linux-3.1.4/net/netfilter/xt_statistic.c
---- linux-3.1.4/net/netfilter/xt_statistic.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netfilter/xt_statistic.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c
+index 42ecb71..8d687c0 100644
+--- a/net/netfilter/xt_statistic.c
++++ b/net/netfilter/xt_statistic.c
@@ -18,7 +18,7 @@
#include <linux/netfilter/x_tables.h>
@@ -74980,7 +76625,7 @@ diff -urNp linux-3.1.4/net/netfilter/xt_statistic.c linux-3.1.4/net/netfilter/xt
} ____cacheline_aligned_in_smp;
MODULE_LICENSE("GPL");
-@@ -41,9 +41,9 @@ statistic_mt(const struct sk_buff *skb,
+@@ -41,9 +41,9 @@ statistic_mt(const struct sk_buff *skb, struct xt_action_param *par)
break;
case XT_STATISTIC_MODE_NTH:
do {
@@ -74992,7 +76637,7 @@ diff -urNp linux-3.1.4/net/netfilter/xt_statistic.c linux-3.1.4/net/netfilter/xt
if (nval == 0)
ret = !ret;
break;
-@@ -63,7 +63,7 @@ static int statistic_mt_check(const stru
+@@ -63,7 +63,7 @@ static int statistic_mt_check(const struct xt_mtchk_param *par)
info->master = kzalloc(sizeof(*info->master), GFP_KERNEL);
if (info->master == NULL)
return -ENOMEM;
@@ -75001,10 +76646,11 @@ diff -urNp linux-3.1.4/net/netfilter/xt_statistic.c linux-3.1.4/net/netfilter/xt
return 0;
}
-diff -urNp linux-3.1.4/net/netlink/af_netlink.c linux-3.1.4/net/netlink/af_netlink.c
---- linux-3.1.4/net/netlink/af_netlink.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netlink/af_netlink.c 2011-11-16 18:39:08.000000000 -0500
-@@ -742,7 +742,7 @@ static void netlink_overrun(struct sock
+diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
+index 0a4db02..604f748 100644
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -742,7 +742,7 @@ static void netlink_overrun(struct sock *sk)
sk->sk_error_report(sk);
}
}
@@ -75013,7 +76659,7 @@ diff -urNp linux-3.1.4/net/netlink/af_netlink.c linux-3.1.4/net/netlink/af_netli
}
static struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid)
-@@ -2000,7 +2000,7 @@ static int netlink_seq_show(struct seq_f
+@@ -2000,7 +2000,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
sk_wmem_alloc_get(s),
nlk->cb,
atomic_read(&s->sk_refcnt),
@@ -75022,10 +76668,11 @@ diff -urNp linux-3.1.4/net/netlink/af_netlink.c linux-3.1.4/net/netlink/af_netli
sock_i_ino(s)
);
-diff -urNp linux-3.1.4/net/netrom/af_netrom.c linux-3.1.4/net/netrom/af_netrom.c
---- linux-3.1.4/net/netrom/af_netrom.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/netrom/af_netrom.c 2011-11-16 18:40:44.000000000 -0500
-@@ -839,6 +839,7 @@ static int nr_getname(struct socket *soc
+diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
+index 732152f..60bb09e 100644
+--- a/net/netrom/af_netrom.c
++++ b/net/netrom/af_netrom.c
+@@ -839,6 +839,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
struct sock *sk = sock->sk;
struct nr_sock *nr = nr_sk(sk);
@@ -75033,7 +76680,7 @@ diff -urNp linux-3.1.4/net/netrom/af_netrom.c linux-3.1.4/net/netrom/af_netrom.c
lock_sock(sk);
if (peer != 0) {
if (sk->sk_state != TCP_ESTABLISHED) {
-@@ -853,7 +854,6 @@ static int nr_getname(struct socket *soc
+@@ -853,7 +854,6 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
*uaddr_len = sizeof(struct full_sockaddr_ax25);
} else {
sax->fsa_ax25.sax25_family = AF_NETROM;
@@ -75041,10 +76688,11 @@ diff -urNp linux-3.1.4/net/netrom/af_netrom.c linux-3.1.4/net/netrom/af_netrom.c
sax->fsa_ax25.sax25_call = nr->source_addr;
*uaddr_len = sizeof(struct sockaddr_ax25);
}
-diff -urNp linux-3.1.4/net/packet/af_packet.c linux-3.1.4/net/packet/af_packet.c
---- linux-3.1.4/net/packet/af_packet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/packet/af_packet.c 2011-11-16 18:39:08.000000000 -0500
-@@ -954,7 +954,7 @@ static int packet_rcv(struct sk_buff *sk
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index fabb4fa..e146b73 100644
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -954,7 +954,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
spin_lock(&sk->sk_receive_queue.lock);
po->stats.tp_packets++;
@@ -75053,7 +76701,7 @@ diff -urNp linux-3.1.4/net/packet/af_packet.c linux-3.1.4/net/packet/af_packet.c
__skb_queue_tail(&sk->sk_receive_queue, skb);
spin_unlock(&sk->sk_receive_queue.lock);
sk->sk_data_ready(sk, skb->len);
-@@ -963,7 +963,7 @@ static int packet_rcv(struct sk_buff *sk
+@@ -963,7 +963,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
drop_n_acct:
spin_lock(&sk->sk_receive_queue.lock);
po->stats.tp_drops++;
@@ -75062,7 +76710,7 @@ diff -urNp linux-3.1.4/net/packet/af_packet.c linux-3.1.4/net/packet/af_packet.c
spin_unlock(&sk->sk_receive_queue.lock);
drop_n_restore:
-@@ -2479,7 +2479,7 @@ static int packet_getsockopt(struct sock
+@@ -2479,7 +2479,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
case PACKET_HDRLEN:
if (len > sizeof(int))
len = sizeof(int);
@@ -75071,7 +76719,7 @@ diff -urNp linux-3.1.4/net/packet/af_packet.c linux-3.1.4/net/packet/af_packet.c
return -EFAULT;
switch (val) {
case TPACKET_V1:
-@@ -2526,7 +2526,7 @@ static int packet_getsockopt(struct sock
+@@ -2526,7 +2526,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
if (put_user(len, optlen))
return -EFAULT;
@@ -75080,10 +76728,11 @@ diff -urNp linux-3.1.4/net/packet/af_packet.c linux-3.1.4/net/packet/af_packet.c
return -EFAULT;
return 0;
}
-diff -urNp linux-3.1.4/net/phonet/af_phonet.c linux-3.1.4/net/phonet/af_phonet.c
---- linux-3.1.4/net/phonet/af_phonet.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/phonet/af_phonet.c 2011-11-16 18:40:44.000000000 -0500
-@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_pr
+diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
+index c6fffd9..a7ffa0c 100644
+--- a/net/phonet/af_phonet.c
++++ b/net/phonet/af_phonet.c
+@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_proto_get(unsigned int protocol)
{
struct phonet_protocol *pp;
@@ -75092,7 +76741,7 @@ diff -urNp linux-3.1.4/net/phonet/af_phonet.c linux-3.1.4/net/phonet/af_phonet.c
return NULL;
rcu_read_lock();
-@@ -469,7 +469,7 @@ int __init_or_module phonet_proto_regist
+@@ -469,7 +469,7 @@ int __init_or_module phonet_proto_register(unsigned int protocol,
{
int err = 0;
@@ -75101,10 +76750,11 @@ diff -urNp linux-3.1.4/net/phonet/af_phonet.c linux-3.1.4/net/phonet/af_phonet.c
return -EINVAL;
err = proto_register(pp->prot, 1);
-diff -urNp linux-3.1.4/net/phonet/pep.c linux-3.1.4/net/phonet/pep.c
---- linux-3.1.4/net/phonet/pep.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/phonet/pep.c 2011-11-16 18:39:08.000000000 -0500
-@@ -387,7 +387,7 @@ static int pipe_do_rcv(struct sock *sk,
+diff --git a/net/phonet/pep.c b/net/phonet/pep.c
+index f17fd84..edffce8 100644
+--- a/net/phonet/pep.c
++++ b/net/phonet/pep.c
+@@ -387,7 +387,7 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
case PNS_PEP_CTRL_REQ:
if (skb_queue_len(&pn->ctrlreq_queue) >= PNPIPE_CTRLREQ_MAX) {
@@ -75113,7 +76763,7 @@ diff -urNp linux-3.1.4/net/phonet/pep.c linux-3.1.4/net/phonet/pep.c
break;
}
__skb_pull(skb, 4);
-@@ -408,7 +408,7 @@ static int pipe_do_rcv(struct sock *sk,
+@@ -408,7 +408,7 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb)
}
if (pn->rx_credits == 0) {
@@ -75122,7 +76772,7 @@ diff -urNp linux-3.1.4/net/phonet/pep.c linux-3.1.4/net/phonet/pep.c
err = -ENOBUFS;
break;
}
-@@ -556,7 +556,7 @@ static int pipe_handler_do_rcv(struct so
+@@ -556,7 +556,7 @@ static int pipe_handler_do_rcv(struct sock *sk, struct sk_buff *skb)
}
if (pn->rx_credits == 0) {
@@ -75131,10 +76781,11 @@ diff -urNp linux-3.1.4/net/phonet/pep.c linux-3.1.4/net/phonet/pep.c
err = NET_RX_DROP;
break;
}
-diff -urNp linux-3.1.4/net/phonet/socket.c linux-3.1.4/net/phonet/socket.c
---- linux-3.1.4/net/phonet/socket.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/phonet/socket.c 2011-11-16 18:40:44.000000000 -0500
-@@ -612,8 +612,13 @@ static int pn_sock_seq_show(struct seq_f
+diff --git a/net/phonet/socket.c b/net/phonet/socket.c
+index ab07711..9d4ac5d 100644
+--- a/net/phonet/socket.c
++++ b/net/phonet/socket.c
+@@ -612,8 +612,13 @@ static int pn_sock_seq_show(struct seq_file *seq, void *v)
pn->resource, sk->sk_state,
sk_wmem_alloc_get(sk), sk_rmem_alloc_get(sk),
sock_i_uid(sk), sock_i_ino(sk),
@@ -75150,9 +76801,10 @@ diff -urNp linux-3.1.4/net/phonet/socket.c linux-3.1.4/net/phonet/socket.c
}
seq_printf(seq, "%*s\n", 127 - len, "");
return 0;
-diff -urNp linux-3.1.4/net/rds/cong.c linux-3.1.4/net/rds/cong.c
---- linux-3.1.4/net/rds/cong.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/cong.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/rds/cong.c b/net/rds/cong.c
+index 6daaa49..fbf6af5 100644
+--- a/net/rds/cong.c
++++ b/net/rds/cong.c
@@ -77,7 +77,7 @@
* finds that the saved generation number is smaller than the global generation
* number, it wakes up the process.
@@ -75162,7 +76814,7 @@ diff -urNp linux-3.1.4/net/rds/cong.c linux-3.1.4/net/rds/cong.c
/*
* Congestion monitoring
-@@ -232,7 +232,7 @@ void rds_cong_map_updated(struct rds_con
+@@ -232,7 +232,7 @@ void rds_cong_map_updated(struct rds_cong_map *map, uint64_t portmask)
rdsdebug("waking map %p for %pI4\n",
map, &map->m_addr);
rds_stats_inc(s_cong_update_received);
@@ -75180,21 +76832,10 @@ diff -urNp linux-3.1.4/net/rds/cong.c linux-3.1.4/net/rds/cong.c
if (likely(*recent == gen))
return 0;
-diff -urNp linux-3.1.4/net/rds/ib_cm.c linux-3.1.4/net/rds/ib_cm.c
---- linux-3.1.4/net/rds/ib_cm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/ib_cm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -720,7 +720,7 @@ void rds_ib_conn_shutdown(struct rds_con
- /* Clear the ACK state */
- clear_bit(IB_ACK_IN_FLIGHT, &ic->i_ack_flags);
- #ifdef KERNEL_HAS_ATOMIC64
-- atomic64_set(&ic->i_ack_next, 0);
-+ atomic64_set_unchecked(&ic->i_ack_next, 0);
- #else
- ic->i_ack_next = 0;
- #endif
-diff -urNp linux-3.1.4/net/rds/ib.h linux-3.1.4/net/rds/ib.h
---- linux-3.1.4/net/rds/ib.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/ib.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/rds/ib.h b/net/rds/ib.h
+index edfaaaf..8c89879 100644
+--- a/net/rds/ib.h
++++ b/net/rds/ib.h
@@ -128,7 +128,7 @@ struct rds_ib_connection {
/* sending acks */
unsigned long i_ack_flags;
@@ -75204,10 +76845,24 @@ diff -urNp linux-3.1.4/net/rds/ib.h linux-3.1.4/net/rds/ib.h
#else
spinlock_t i_ack_lock; /* protect i_ack_next */
u64 i_ack_next; /* next ACK to send */
-diff -urNp linux-3.1.4/net/rds/ib_recv.c linux-3.1.4/net/rds/ib_recv.c
---- linux-3.1.4/net/rds/ib_recv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/ib_recv.c 2011-11-16 18:39:08.000000000 -0500
-@@ -592,7 +592,7 @@ static u64 rds_ib_get_ack(struct rds_ib_
+diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
+index cd67026..0b9a54a 100644
+--- a/net/rds/ib_cm.c
++++ b/net/rds/ib_cm.c
+@@ -720,7 +720,7 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
+ /* Clear the ACK state */
+ clear_bit(IB_ACK_IN_FLIGHT, &ic->i_ack_flags);
+ #ifdef KERNEL_HAS_ATOMIC64
+- atomic64_set(&ic->i_ack_next, 0);
++ atomic64_set_unchecked(&ic->i_ack_next, 0);
+ #else
+ ic->i_ack_next = 0;
+ #endif
+diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
+index e29e0ca..fa3a6a3 100644
+--- a/net/rds/ib_recv.c
++++ b/net/rds/ib_recv.c
+@@ -592,7 +592,7 @@ static u64 rds_ib_get_ack(struct rds_ib_connection *ic)
static void rds_ib_set_ack(struct rds_ib_connection *ic, u64 seq,
int ack_required)
{
@@ -75216,7 +76871,7 @@ diff -urNp linux-3.1.4/net/rds/ib_recv.c linux-3.1.4/net/rds/ib_recv.c
if (ack_required) {
smp_mb__before_clear_bit();
set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
-@@ -604,7 +604,7 @@ static u64 rds_ib_get_ack(struct rds_ib_
+@@ -604,7 +604,7 @@ static u64 rds_ib_get_ack(struct rds_ib_connection *ic)
clear_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
smp_mb__after_clear_bit();
@@ -75225,21 +76880,10 @@ diff -urNp linux-3.1.4/net/rds/ib_recv.c linux-3.1.4/net/rds/ib_recv.c
}
#endif
-diff -urNp linux-3.1.4/net/rds/iw_cm.c linux-3.1.4/net/rds/iw_cm.c
---- linux-3.1.4/net/rds/iw_cm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/iw_cm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -663,7 +663,7 @@ void rds_iw_conn_shutdown(struct rds_con
- /* Clear the ACK state */
- clear_bit(IB_ACK_IN_FLIGHT, &ic->i_ack_flags);
- #ifdef KERNEL_HAS_ATOMIC64
-- atomic64_set(&ic->i_ack_next, 0);
-+ atomic64_set_unchecked(&ic->i_ack_next, 0);
- #else
- ic->i_ack_next = 0;
- #endif
-diff -urNp linux-3.1.4/net/rds/iw.h linux-3.1.4/net/rds/iw.h
---- linux-3.1.4/net/rds/iw.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/iw.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/rds/iw.h b/net/rds/iw.h
+index 04ce3b1..48119a6 100644
+--- a/net/rds/iw.h
++++ b/net/rds/iw.h
@@ -134,7 +134,7 @@ struct rds_iw_connection {
/* sending acks */
unsigned long i_ack_flags;
@@ -75249,10 +76893,24 @@ diff -urNp linux-3.1.4/net/rds/iw.h linux-3.1.4/net/rds/iw.h
#else
spinlock_t i_ack_lock; /* protect i_ack_next */
u64 i_ack_next; /* next ACK to send */
-diff -urNp linux-3.1.4/net/rds/iw_rdma.c linux-3.1.4/net/rds/iw_rdma.c
---- linux-3.1.4/net/rds/iw_rdma.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/iw_rdma.c 2011-11-16 18:40:44.000000000 -0500
-@@ -184,6 +184,8 @@ int rds_iw_update_cm_id(struct rds_iw_de
+diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c
+index 9556d28..f046d0e 100644
+--- a/net/rds/iw_cm.c
++++ b/net/rds/iw_cm.c
+@@ -663,7 +663,7 @@ void rds_iw_conn_shutdown(struct rds_connection *conn)
+ /* Clear the ACK state */
+ clear_bit(IB_ACK_IN_FLIGHT, &ic->i_ack_flags);
+ #ifdef KERNEL_HAS_ATOMIC64
+- atomic64_set(&ic->i_ack_next, 0);
++ atomic64_set_unchecked(&ic->i_ack_next, 0);
+ #else
+ ic->i_ack_next = 0;
+ #endif
+diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
+index 4e1de17..d121708 100644
+--- a/net/rds/iw_rdma.c
++++ b/net/rds/iw_rdma.c
+@@ -184,6 +184,8 @@ int rds_iw_update_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_i
struct rdma_cm_id *pcm_id;
int rc;
@@ -75261,10 +76919,11 @@ diff -urNp linux-3.1.4/net/rds/iw_rdma.c linux-3.1.4/net/rds/iw_rdma.c
src_addr = (struct sockaddr_in *)&cm_id->route.addr.src_addr;
dst_addr = (struct sockaddr_in *)&cm_id->route.addr.dst_addr;
-diff -urNp linux-3.1.4/net/rds/iw_recv.c linux-3.1.4/net/rds/iw_recv.c
---- linux-3.1.4/net/rds/iw_recv.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/iw_recv.c 2011-11-16 18:39:08.000000000 -0500
-@@ -427,7 +427,7 @@ static u64 rds_iw_get_ack(struct rds_iw_
+diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c
+index 5e57347..3916042 100644
+--- a/net/rds/iw_recv.c
++++ b/net/rds/iw_recv.c
+@@ -427,7 +427,7 @@ static u64 rds_iw_get_ack(struct rds_iw_connection *ic)
static void rds_iw_set_ack(struct rds_iw_connection *ic, u64 seq,
int ack_required)
{
@@ -75273,7 +76932,7 @@ diff -urNp linux-3.1.4/net/rds/iw_recv.c linux-3.1.4/net/rds/iw_recv.c
if (ack_required) {
smp_mb__before_clear_bit();
set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
-@@ -439,7 +439,7 @@ static u64 rds_iw_get_ack(struct rds_iw_
+@@ -439,7 +439,7 @@ static u64 rds_iw_get_ack(struct rds_iw_connection *ic)
clear_bit(IB_ACK_REQUESTED, &ic->i_ack_flags);
smp_mb__after_clear_bit();
@@ -75282,10 +76941,11 @@ diff -urNp linux-3.1.4/net/rds/iw_recv.c linux-3.1.4/net/rds/iw_recv.c
}
#endif
-diff -urNp linux-3.1.4/net/rds/tcp.c linux-3.1.4/net/rds/tcp.c
---- linux-3.1.4/net/rds/tcp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/tcp.c 2011-11-16 18:39:08.000000000 -0500
-@@ -58,7 +58,7 @@ void rds_tcp_nonagle(struct socket *sock
+diff --git a/net/rds/tcp.c b/net/rds/tcp.c
+index 8e0a320..ee8e38f 100644
+--- a/net/rds/tcp.c
++++ b/net/rds/tcp.c
+@@ -58,7 +58,7 @@ void rds_tcp_nonagle(struct socket *sock)
int val = 1;
set_fs(KERNEL_DS);
@@ -75294,10 +76954,11 @@ diff -urNp linux-3.1.4/net/rds/tcp.c linux-3.1.4/net/rds/tcp.c
sizeof(val));
set_fs(oldfs);
}
-diff -urNp linux-3.1.4/net/rds/tcp_send.c linux-3.1.4/net/rds/tcp_send.c
---- linux-3.1.4/net/rds/tcp_send.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rds/tcp_send.c 2011-11-16 18:39:08.000000000 -0500
-@@ -43,7 +43,7 @@ static void rds_tcp_cork(struct socket *
+diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
+index 1b4fd68..2234175 100644
+--- a/net/rds/tcp_send.c
++++ b/net/rds/tcp_send.c
+@@ -43,7 +43,7 @@ static void rds_tcp_cork(struct socket *sock, int val)
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -75306,10 +76967,11 @@ diff -urNp linux-3.1.4/net/rds/tcp_send.c linux-3.1.4/net/rds/tcp_send.c
sizeof(val));
set_fs(oldfs);
}
-diff -urNp linux-3.1.4/net/rxrpc/af_rxrpc.c linux-3.1.4/net/rxrpc/af_rxrpc.c
---- linux-3.1.4/net/rxrpc/af_rxrpc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/af_rxrpc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -39,7 +39,7 @@ static const struct proto_ops rxrpc_rpc_
+diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
+index 74c064c..fdec26f 100644
+--- a/net/rxrpc/af_rxrpc.c
++++ b/net/rxrpc/af_rxrpc.c
+@@ -39,7 +39,7 @@ static const struct proto_ops rxrpc_rpc_ops;
__be32 rxrpc_epoch;
/* current debugging ID */
@@ -75318,10 +76980,11 @@ diff -urNp linux-3.1.4/net/rxrpc/af_rxrpc.c linux-3.1.4/net/rxrpc/af_rxrpc.c
/* count of skbs currently in use */
atomic_t rxrpc_n_skbs;
-diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
---- linux-3.1.4/net/rxrpc/ar-ack.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-ack.c 2011-11-16 18:40:44.000000000 -0500
-@@ -175,7 +175,7 @@ static void rxrpc_resend(struct rxrpc_ca
+diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
+index f99cfce..3682692 100644
+--- a/net/rxrpc/ar-ack.c
++++ b/net/rxrpc/ar-ack.c
+@@ -175,7 +175,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
_enter("{%d,%d,%d,%d},",
call->acks_hard, call->acks_unacked,
@@ -75330,7 +76993,7 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
CIRC_CNT(call->acks_head, call->acks_tail, call->acks_winsz));
stop = 0;
-@@ -199,7 +199,7 @@ static void rxrpc_resend(struct rxrpc_ca
+@@ -199,7 +199,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
/* each Tx packet has a new serial number */
sp->hdr.serial =
@@ -75339,7 +77002,7 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
hdr = (struct rxrpc_header *) txb->head;
hdr->serial = sp->hdr.serial;
-@@ -403,7 +403,7 @@ static void rxrpc_rotate_tx_window(struc
+@@ -403,7 +403,7 @@ static void rxrpc_rotate_tx_window(struct rxrpc_call *call, u32 hard)
*/
static void rxrpc_clear_tx_window(struct rxrpc_call *call)
{
@@ -75357,7 +77020,7 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
_proto("Rx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }",
latest,
-@@ -842,6 +842,8 @@ void rxrpc_process_call(struct work_stru
+@@ -842,6 +842,8 @@ void rxrpc_process_call(struct work_struct *work)
u32 abort_code = RX_PROTOCOL_ERROR;
u8 *acks = NULL;
@@ -75366,7 +77029,7 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
//printk("\n--------------------\n");
_enter("{%d,%s,%lx} [%lu]",
call->debug_id, rxrpc_call_states[call->state], call->events,
-@@ -1161,7 +1163,7 @@ void rxrpc_process_call(struct work_stru
+@@ -1161,7 +1163,7 @@ void rxrpc_process_call(struct work_struct *work)
goto maybe_reschedule;
send_ACK_with_skew:
@@ -75393,10 +77056,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-ack.c linux-3.1.4/net/rxrpc/ar-ack.c
_proto("Tx %s %%%u", rxrpc_pkts[hdr.type], ntohl(hdr.serial));
send_message_2:
-diff -urNp linux-3.1.4/net/rxrpc/ar-call.c linux-3.1.4/net/rxrpc/ar-call.c
---- linux-3.1.4/net/rxrpc/ar-call.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-call.c 2011-11-16 18:39:08.000000000 -0500
-@@ -83,7 +83,7 @@ static struct rxrpc_call *rxrpc_alloc_ca
+diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c
+index bf656c2..48f9d27 100644
+--- a/net/rxrpc/ar-call.c
++++ b/net/rxrpc/ar-call.c
+@@ -83,7 +83,7 @@ static struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp)
spin_lock_init(&call->lock);
rwlock_init(&call->state_lock);
atomic_set(&call->usage, 1);
@@ -75405,10 +77069,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-call.c linux-3.1.4/net/rxrpc/ar-call.c
call->state = RXRPC_CALL_CLIENT_SEND_REQUEST;
memset(&call->sock_node, 0xed, sizeof(call->sock_node));
-diff -urNp linux-3.1.4/net/rxrpc/ar-connection.c linux-3.1.4/net/rxrpc/ar-connection.c
---- linux-3.1.4/net/rxrpc/ar-connection.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-connection.c 2011-11-16 18:39:08.000000000 -0500
-@@ -206,7 +206,7 @@ static struct rxrpc_connection *rxrpc_al
+diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
+index 4106ca9..a338d7a 100644
+--- a/net/rxrpc/ar-connection.c
++++ b/net/rxrpc/ar-connection.c
+@@ -206,7 +206,7 @@ static struct rxrpc_connection *rxrpc_alloc_connection(gfp_t gfp)
rwlock_init(&conn->lock);
spin_lock_init(&conn->state_lock);
atomic_set(&conn->usage, 1);
@@ -75417,10 +77082,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-connection.c linux-3.1.4/net/rxrpc/ar-connec
conn->avail_calls = RXRPC_MAXCALLS;
conn->size_align = 4;
conn->header_size = sizeof(struct rxrpc_header);
-diff -urNp linux-3.1.4/net/rxrpc/ar-connevent.c linux-3.1.4/net/rxrpc/ar-connevent.c
---- linux-3.1.4/net/rxrpc/ar-connevent.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-connevent.c 2011-11-16 18:39:08.000000000 -0500
-@@ -109,7 +109,7 @@ static int rxrpc_abort_connection(struct
+diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c
+index e7ed43a..6afa140 100644
+--- a/net/rxrpc/ar-connevent.c
++++ b/net/rxrpc/ar-connevent.c
+@@ -109,7 +109,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn,
len = iov[0].iov_len + iov[1].iov_len;
@@ -75429,10 +77095,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-connevent.c linux-3.1.4/net/rxrpc/ar-conneve
_proto("Tx CONN ABORT %%%u { %d }", ntohl(hdr.serial), abort_code);
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 2, len);
-diff -urNp linux-3.1.4/net/rxrpc/ar-input.c linux-3.1.4/net/rxrpc/ar-input.c
---- linux-3.1.4/net/rxrpc/ar-input.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-input.c 2011-11-16 18:39:08.000000000 -0500
-@@ -340,9 +340,9 @@ void rxrpc_fast_process_packet(struct rx
+diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c
+index 1a2b0633..e8d1382 100644
+--- a/net/rxrpc/ar-input.c
++++ b/net/rxrpc/ar-input.c
+@@ -340,9 +340,9 @@ void rxrpc_fast_process_packet(struct rxrpc_call *call, struct sk_buff *skb)
/* track the latest serial number on this connection for ACK packet
* information */
serial = ntohl(sp->hdr.serial);
@@ -75444,9 +77111,10 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-input.c linux-3.1.4/net/rxrpc/ar-input.c
serial);
/* request ACK generation for any ACK or DATA packet that requests
-diff -urNp linux-3.1.4/net/rxrpc/ar-internal.h linux-3.1.4/net/rxrpc/ar-internal.h
---- linux-3.1.4/net/rxrpc/ar-internal.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-internal.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
+index 8e22bd3..f66d1c0 100644
+--- a/net/rxrpc/ar-internal.h
++++ b/net/rxrpc/ar-internal.h
@@ -272,8 +272,8 @@ struct rxrpc_connection {
int error; /* error code for local abort */
int debug_id; /* debug ID for printks */
@@ -75467,7 +77135,7 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-internal.h linux-3.1.4/net/rxrpc/ar-internal
u32 abort_code; /* local/remote abort code */
enum { /* current state of call */
RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
-@@ -420,7 +420,7 @@ static inline void rxrpc_abort_call(stru
+@@ -420,7 +420,7 @@ static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
*/
extern atomic_t rxrpc_n_skbs;
extern __be32 rxrpc_epoch;
@@ -75476,10 +77144,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-internal.h linux-3.1.4/net/rxrpc/ar-internal
extern struct workqueue_struct *rxrpc_workqueue;
/*
-diff -urNp linux-3.1.4/net/rxrpc/ar-local.c linux-3.1.4/net/rxrpc/ar-local.c
---- linux-3.1.4/net/rxrpc/ar-local.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-local.c 2011-11-16 18:39:08.000000000 -0500
-@@ -45,7 +45,7 @@ struct rxrpc_local *rxrpc_alloc_local(st
+diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/ar-local.c
+index 87f7135..74d3703 100644
+--- a/net/rxrpc/ar-local.c
++++ b/net/rxrpc/ar-local.c
+@@ -45,7 +45,7 @@ struct rxrpc_local *rxrpc_alloc_local(struct sockaddr_rxrpc *srx)
spin_lock_init(&local->lock);
rwlock_init(&local->services_lock);
atomic_set(&local->usage, 1);
@@ -75488,10 +77157,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-local.c linux-3.1.4/net/rxrpc/ar-local.c
memcpy(&local->srx, srx, sizeof(*srx));
}
-diff -urNp linux-3.1.4/net/rxrpc/ar-output.c linux-3.1.4/net/rxrpc/ar-output.c
---- linux-3.1.4/net/rxrpc/ar-output.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-output.c 2011-11-16 18:39:08.000000000 -0500
-@@ -681,9 +681,9 @@ static int rxrpc_send_data(struct kiocb
+diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
+index 5f22e26..e5bd20f 100644
+--- a/net/rxrpc/ar-output.c
++++ b/net/rxrpc/ar-output.c
+@@ -681,9 +681,9 @@ static int rxrpc_send_data(struct kiocb *iocb,
sp->hdr.cid = call->cid;
sp->hdr.callNumber = call->call_id;
sp->hdr.seq =
@@ -75503,10 +77173,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-output.c linux-3.1.4/net/rxrpc/ar-output.c
sp->hdr.type = RXRPC_PACKET_TYPE_DATA;
sp->hdr.userStatus = 0;
sp->hdr.securityIndex = conn->security_ix;
-diff -urNp linux-3.1.4/net/rxrpc/ar-peer.c linux-3.1.4/net/rxrpc/ar-peer.c
---- linux-3.1.4/net/rxrpc/ar-peer.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-peer.c 2011-11-16 18:39:08.000000000 -0500
-@@ -72,7 +72,7 @@ static struct rxrpc_peer *rxrpc_alloc_pe
+diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c
+index 2754f09..b20e38f 100644
+--- a/net/rxrpc/ar-peer.c
++++ b/net/rxrpc/ar-peer.c
+@@ -72,7 +72,7 @@ static struct rxrpc_peer *rxrpc_alloc_peer(struct sockaddr_rxrpc *srx,
INIT_LIST_HEAD(&peer->error_targets);
spin_lock_init(&peer->lock);
atomic_set(&peer->usage, 1);
@@ -75515,10 +77186,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-peer.c linux-3.1.4/net/rxrpc/ar-peer.c
memcpy(&peer->srx, srx, sizeof(*srx));
rxrpc_assess_MTU_size(peer);
-diff -urNp linux-3.1.4/net/rxrpc/ar-proc.c linux-3.1.4/net/rxrpc/ar-proc.c
---- linux-3.1.4/net/rxrpc/ar-proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-proc.c 2011-11-16 18:39:08.000000000 -0500
-@@ -164,8 +164,8 @@ static int rxrpc_connection_seq_show(str
+diff --git a/net/rxrpc/ar-proc.c b/net/rxrpc/ar-proc.c
+index 38047f7..9f48511 100644
+--- a/net/rxrpc/ar-proc.c
++++ b/net/rxrpc/ar-proc.c
+@@ -164,8 +164,8 @@ static int rxrpc_connection_seq_show(struct seq_file *seq, void *v)
atomic_read(&conn->usage),
rxrpc_conn_states[conn->state],
key_serial(conn->key),
@@ -75529,10 +77201,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-proc.c linux-3.1.4/net/rxrpc/ar-proc.c
return 0;
}
-diff -urNp linux-3.1.4/net/rxrpc/ar-transport.c linux-3.1.4/net/rxrpc/ar-transport.c
---- linux-3.1.4/net/rxrpc/ar-transport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/ar-transport.c 2011-11-16 18:39:08.000000000 -0500
-@@ -47,7 +47,7 @@ static struct rxrpc_transport *rxrpc_all
+diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
+index 92df566..87ec1bf 100644
+--- a/net/rxrpc/ar-transport.c
++++ b/net/rxrpc/ar-transport.c
+@@ -47,7 +47,7 @@ static struct rxrpc_transport *rxrpc_alloc_transport(struct rxrpc_local *local,
spin_lock_init(&trans->client_lock);
rwlock_init(&trans->conn_lock);
atomic_set(&trans->usage, 1);
@@ -75541,10 +77214,11 @@ diff -urNp linux-3.1.4/net/rxrpc/ar-transport.c linux-3.1.4/net/rxrpc/ar-transpo
if (peer->srx.transport.family == AF_INET) {
switch (peer->srx.transport_type) {
-diff -urNp linux-3.1.4/net/rxrpc/rxkad.c linux-3.1.4/net/rxrpc/rxkad.c
---- linux-3.1.4/net/rxrpc/rxkad.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/rxrpc/rxkad.c 2011-11-16 18:40:44.000000000 -0500
-@@ -211,6 +211,8 @@ static int rxkad_secure_packet_encrypt(c
+diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
+index 7635107..5000b71 100644
+--- a/net/rxrpc/rxkad.c
++++ b/net/rxrpc/rxkad.c
+@@ -211,6 +211,8 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
u16 check;
int nsg;
@@ -75553,7 +77227,7 @@ diff -urNp linux-3.1.4/net/rxrpc/rxkad.c linux-3.1.4/net/rxrpc/rxkad.c
sp = rxrpc_skb(skb);
_enter("");
-@@ -338,6 +340,8 @@ static int rxkad_verify_packet_auth(cons
+@@ -338,6 +340,8 @@ static int rxkad_verify_packet_auth(const struct rxrpc_call *call,
u16 check;
int nsg;
@@ -75562,7 +77236,7 @@ diff -urNp linux-3.1.4/net/rxrpc/rxkad.c linux-3.1.4/net/rxrpc/rxkad.c
_enter("");
sp = rxrpc_skb(skb);
-@@ -610,7 +614,7 @@ static int rxkad_issue_challenge(struct
+@@ -610,7 +614,7 @@ static int rxkad_issue_challenge(struct rxrpc_connection *conn)
len = iov[0].iov_len + iov[1].iov_len;
@@ -75571,7 +77245,7 @@ diff -urNp linux-3.1.4/net/rxrpc/rxkad.c linux-3.1.4/net/rxrpc/rxkad.c
_proto("Tx CHALLENGE %%%u", ntohl(hdr.serial));
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 2, len);
-@@ -660,7 +664,7 @@ static int rxkad_send_response(struct rx
+@@ -660,7 +664,7 @@ static int rxkad_send_response(struct rxrpc_connection *conn,
len = iov[0].iov_len + iov[1].iov_len + iov[2].iov_len;
@@ -75580,10 +77254,24 @@ diff -urNp linux-3.1.4/net/rxrpc/rxkad.c linux-3.1.4/net/rxrpc/rxkad.c
_proto("Tx RESPONSE %%%u", ntohl(hdr->serial));
ret = kernel_sendmsg(conn->trans->local->socket, &msg, iov, 3, len);
-diff -urNp linux-3.1.4/net/sctp/proc.c linux-3.1.4/net/sctp/proc.c
---- linux-3.1.4/net/sctp/proc.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sctp/proc.c 2011-11-16 18:40:44.000000000 -0500
-@@ -318,7 +318,8 @@ static int sctp_assocs_seq_show(struct s
+diff --git a/net/sctp/auth.c b/net/sctp/auth.c
+index 865e68f..bf81204 100644
+--- a/net/sctp/auth.c
++++ b/net/sctp/auth.c
+@@ -82,7 +82,7 @@ static struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp)
+ struct sctp_auth_bytes *key;
+
+ /* Verify that we are not going to overflow INT_MAX */
+- if ((INT_MAX - key_len) < sizeof(struct sctp_auth_bytes))
++ if (key_len > (INT_MAX - sizeof(struct sctp_auth_bytes)))
+ return NULL;
+
+ /* Allocate the shared key */
+diff --git a/net/sctp/proc.c b/net/sctp/proc.c
+index 05a6ce2..c8bf836 100644
+--- a/net/sctp/proc.c
++++ b/net/sctp/proc.c
+@@ -318,7 +318,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
seq_printf(seq,
"%8pK %8pK %-3d %-3d %-2d %-4d "
"%4d %8d %8d %7d %5lu %-5d %5d ",
@@ -75593,10 +77281,11 @@ diff -urNp linux-3.1.4/net/sctp/proc.c linux-3.1.4/net/sctp/proc.c
assoc->state, hash,
assoc->assoc_id,
assoc->sndbuf_used,
-diff -urNp linux-3.1.4/net/sctp/socket.c linux-3.1.4/net/sctp/socket.c
---- linux-3.1.4/net/sctp/socket.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sctp/socket.c 2011-11-16 18:39:08.000000000 -0500
-@@ -4575,7 +4575,7 @@ static int sctp_getsockopt_peer_addrs(st
+diff --git a/net/sctp/socket.c b/net/sctp/socket.c
+index 836aa63..d779d7b 100644
+--- a/net/sctp/socket.c
++++ b/net/sctp/socket.c
+@@ -4575,7 +4575,7 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
if (space_left < addrlen)
return -ENOMEM;
@@ -75605,9 +77294,10 @@ diff -urNp linux-3.1.4/net/sctp/socket.c linux-3.1.4/net/sctp/socket.c
return -EFAULT;
to += addrlen;
cnt++;
-diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
---- linux-3.1.4/net/socket.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/socket.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/net/socket.c b/net/socket.c
+index ffe92ca..8057b85 100644
+--- a/net/socket.c
++++ b/net/socket.c
@@ -88,6 +88,7 @@
#include <linux/nsproxy.h>
#include <linux/magic.h>
@@ -75625,7 +77315,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos);
-@@ -321,7 +324,7 @@ static struct dentry *sockfs_mount(struc
+@@ -321,7 +324,7 @@ static struct dentry *sockfs_mount(struct file_system_type *fs_type,
&sockfs_dentry_operations, SOCKFS_MAGIC);
}
@@ -75634,7 +77324,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
static struct file_system_type sock_fs_type = {
.name = "sockfs",
-@@ -1187,6 +1190,8 @@ int __sock_create(struct net *net, int f
+@@ -1187,6 +1190,8 @@ int __sock_create(struct net *net, int family, int type, int protocol,
return -EAFNOSUPPORT;
if (type < 0 || type >= SOCK_MAX)
return -EINVAL;
@@ -75643,7 +77333,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
/* Compatibility.
-@@ -1319,6 +1324,16 @@ SYSCALL_DEFINE3(socket, int, family, int
+@@ -1319,6 +1324,16 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
@@ -75660,7 +77350,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
retval = sock_create(family, type, protocol, &sock);
if (retval < 0)
goto out;
-@@ -1431,6 +1446,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1431,6 +1446,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
if (sock) {
err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address);
if (err >= 0) {
@@ -75675,7 +77365,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
err = security_socket_bind(sock,
(struct sockaddr *)&address,
addrlen);
-@@ -1439,6 +1462,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1439,6 +1462,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
(struct sockaddr *)
&address, addrlen);
}
@@ -75683,7 +77373,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1462,10 +1486,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba
+@@ -1462,10 +1486,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, backlog)
if ((unsigned)backlog > somaxconn)
backlog = somaxconn;
@@ -75704,7 +77394,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1509,6 +1543,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1509,6 +1543,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
newsock->type = sock->type;
newsock->ops = sock->ops;
@@ -75723,7 +77413,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
/*
* We don't need try_module_get here, as the listening socket (sock)
* has the protocol module (sock->ops->owner) held.
-@@ -1547,6 +1593,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1547,6 +1593,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
fd_install(newfd, newfile);
err = newfd;
@@ -75732,7 +77422,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
out_put:
fput_light(sock->file, fput_needed);
out:
-@@ -1579,6 +1627,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1579,6 +1627,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
int, addrlen)
{
struct socket *sock;
@@ -75740,7 +77430,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
struct sockaddr_storage address;
int err, fput_needed;
-@@ -1589,6 +1638,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1589,6 +1638,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
if (err < 0)
goto out_put;
@@ -75758,7 +77448,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
err =
security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
if (err)
-@@ -1890,6 +1950,8 @@ static int __sys_sendmsg(struct socket *
+@@ -1890,6 +1950,8 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
unsigned char *ctl_buf = ctl;
int err, ctl_len, iov_size, total_len;
@@ -75767,7 +77457,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
err = -EFAULT;
if (MSG_CMSG_COMPAT & flags) {
if (get_compat_msghdr(msg_sys, msg_compat))
-@@ -1950,7 +2012,7 @@ static int __sys_sendmsg(struct socket *
+@@ -1950,7 +2012,7 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
* checking falls down on this.
*/
if (copy_from_user(ctl_buf,
@@ -75776,7 +77466,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
ctl_len))
goto out_freectl;
msg_sys->msg_control = ctl_buf;
-@@ -2120,7 +2182,7 @@ static int __sys_recvmsg(struct socket *
+@@ -2120,7 +2182,7 @@ static int __sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
* kernel msghdr to use the kernel address space)
*/
@@ -75785,7 +77475,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
uaddr_len = COMPAT_NAMELEN(msg);
if (MSG_CMSG_COMPAT & flags) {
err = verify_compat_iovec(msg_sys, iov,
-@@ -2748,7 +2810,7 @@ static int ethtool_ioctl(struct net *net
+@@ -2748,7 +2810,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
}
ifr = compat_alloc_user_space(buf_size);
@@ -75794,7 +77484,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ))
return -EFAULT;
-@@ -2772,12 +2834,12 @@ static int ethtool_ioctl(struct net *net
+@@ -2772,12 +2834,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
offsetof(struct ethtool_rxnfc, fs.ring_cookie));
if (copy_in_user(rxnfc, compat_rxnfc,
@@ -75811,7 +77501,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt,
sizeof(rxnfc->rule_cnt)))
return -EFAULT;
-@@ -2789,12 +2851,12 @@ static int ethtool_ioctl(struct net *net
+@@ -2789,12 +2851,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
if (convert_out) {
if (copy_in_user(compat_rxnfc, rxnfc,
@@ -75828,7 +77518,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt,
sizeof(rxnfc->rule_cnt)))
return -EFAULT;
-@@ -2864,7 +2926,7 @@ static int bond_ioctl(struct net *net, u
+@@ -2864,7 +2926,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
old_fs = get_fs();
set_fs(KERNEL_DS);
err = dev_ioctl(net, cmd,
@@ -75837,7 +77527,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
set_fs(old_fs);
return err;
-@@ -2973,7 +3035,7 @@ static int compat_sioc_ifmap(struct net
+@@ -2973,7 +3035,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -75846,7 +77536,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
set_fs(old_fs);
if (cmd == SIOCGIFMAP && !err) {
-@@ -3078,7 +3140,7 @@ static int routing_ioctl(struct net *net
+@@ -3078,7 +3140,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
ret |= __get_user(rtdev, &(ur4->rt_dev));
if (rtdev) {
ret |= copy_from_user(devname, compat_ptr(rtdev), 15);
@@ -75855,7 +77545,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
devname[15] = 0;
} else
r4.rt_dev = NULL;
-@@ -3318,8 +3380,8 @@ int kernel_getsockopt(struct socket *soc
+@@ -3318,8 +3380,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
int __user *uoptlen;
int err;
@@ -75866,7 +77556,7 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
set_fs(KERNEL_DS);
if (level == SOL_SOCKET)
-@@ -3339,7 +3401,7 @@ int kernel_setsockopt(struct socket *soc
+@@ -3339,7 +3401,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
char __user *uoptval;
int err;
@@ -75875,10 +77565,11 @@ diff -urNp linux-3.1.4/net/socket.c linux-3.1.4/net/socket.c
set_fs(KERNEL_DS);
if (level == SOL_SOCKET)
-diff -urNp linux-3.1.4/net/sunrpc/sched.c linux-3.1.4/net/sunrpc/sched.c
---- linux-3.1.4/net/sunrpc/sched.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/sched.c 2011-11-16 18:39:08.000000000 -0500
-@@ -238,9 +238,9 @@ static int rpc_wait_bit_killable(void *w
+diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
+index d12ffa5..0b5a6e2 100644
+--- a/net/sunrpc/sched.c
++++ b/net/sunrpc/sched.c
+@@ -238,9 +238,9 @@ static int rpc_wait_bit_killable(void *word)
#ifdef RPC_DEBUG
static void rpc_task_set_debuginfo(struct rpc_task *task)
{
@@ -75890,10 +77581,11 @@ diff -urNp linux-3.1.4/net/sunrpc/sched.c linux-3.1.4/net/sunrpc/sched.c
}
#else
static inline void rpc_task_set_debuginfo(struct rpc_task *task)
-diff -urNp linux-3.1.4/net/sunrpc/svcsock.c linux-3.1.4/net/sunrpc/svcsock.c
---- linux-3.1.4/net/sunrpc/svcsock.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/svcsock.c 2011-11-16 18:39:08.000000000 -0500
-@@ -394,7 +394,7 @@ static int svc_partial_recvfrom(struct s
+diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
+index 767d494..fe17e9d 100644
+--- a/net/sunrpc/svcsock.c
++++ b/net/sunrpc/svcsock.c
+@@ -394,7 +394,7 @@ static int svc_partial_recvfrom(struct svc_rqst *rqstp,
int buflen, unsigned int base)
{
size_t save_iovlen;
@@ -75902,10 +77594,11 @@ diff -urNp linux-3.1.4/net/sunrpc/svcsock.c linux-3.1.4/net/sunrpc/svcsock.c
unsigned int i;
int ret;
-diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c
---- linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c 2011-11-16 18:39:08.000000000 -0500
-@@ -61,15 +61,15 @@ unsigned int svcrdma_max_req_size = RPCR
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 09af4fa..77110a9 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -61,15 +61,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
static unsigned int min_max_inline = 4096;
static unsigned int max_max_inline = 65536;
@@ -75930,7 +77623,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c linux-3.1.4/net/sunrpc/xpr
/* Temporary NFS request map and context caches */
struct kmem_cache *svc_rdma_map_cachep;
-@@ -109,7 +109,7 @@ static int read_reset_stat(ctl_table *ta
+@@ -109,7 +109,7 @@ static int read_reset_stat(ctl_table *table, int write,
len -= *ppos;
if (len > *lenp)
len = *lenp;
@@ -75939,7 +77632,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c linux-3.1.4/net/sunrpc/xpr
return -EFAULT;
*lenp = len;
*ppos += len;
-@@ -150,63 +150,63 @@ static ctl_table svcrdma_parm_table[] =
+@@ -150,63 +150,63 @@ static ctl_table svcrdma_parm_table[] = {
{
.procname = "rdma_stat_read",
.data = &rdma_stat_read,
@@ -76012,9 +77705,10 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma.c linux-3.1.4/net/sunrpc/xpr
.mode = 0644,
.proc_handler = read_reset_stat,
},
-diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
---- linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+index df67211..c354b13 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -499,7 +499,7 @@ next_sge:
svc_rdma_put_context(ctxt, 0);
goto out;
@@ -76024,7 +77718,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-3.1.4/net/s
if (read_wr.num_sge < chl_map->ch[ch_no].count) {
chl_map->ch[ch_no].count -= read_wr.num_sge;
-@@ -609,7 +609,7 @@ int svc_rdma_recvfrom(struct svc_rqst *r
+@@ -609,7 +609,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
dto_q);
list_del_init(&ctxt->dto_q);
} else {
@@ -76033,7 +77727,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-3.1.4/net/s
clear_bit(XPT_DATA, &xprt->xpt_flags);
ctxt = NULL;
}
-@@ -629,7 +629,7 @@ int svc_rdma_recvfrom(struct svc_rqst *r
+@@ -629,7 +629,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
dprintk("svcrdma: processing ctxt=%p on xprt=%p, rqstp=%p, status=%d\n",
ctxt, rdma_xprt, rqstp, ctxt->wc_status);
BUG_ON(ctxt->wc_status != IB_WC_SUCCESS);
@@ -76042,10 +77736,11 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c linux-3.1.4/net/s
/* Build up the XDR from the receive buffers. */
rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len);
-diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_sendto.c linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_sendto.c
---- linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_sendto.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_sendto.c 2011-11-16 18:39:08.000000000 -0500
-@@ -362,7 +362,7 @@ static int send_write(struct svcxprt_rdm
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+index 249a835..fb2794b 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+@@ -362,7 +362,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
write_wr.wr.rdma.remote_addr = to;
/* Post It */
@@ -76054,10 +77749,11 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_sendto.c linux-3.1.4/net/sun
if (svc_rdma_send(xprt, &write_wr))
goto err;
return 0;
-diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c
---- linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c 2011-11-16 18:39:08.000000000 -0500
-@@ -299,7 +299,7 @@ static void rq_cq_reap(struct svcxprt_rd
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index a385430..32254ea 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -299,7 +299,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP);
@@ -76066,7 +77762,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/
while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) {
ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
-@@ -321,7 +321,7 @@ static void rq_cq_reap(struct svcxprt_rd
+@@ -321,7 +321,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -76075,7 +77771,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/
set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
/*
-@@ -393,7 +393,7 @@ static void sq_cq_reap(struct svcxprt_rd
+@@ -393,7 +393,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
@@ -76084,7 +77780,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/
while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) {
if (wc.status != IB_WC_SUCCESS)
/* Close the transport */
-@@ -411,7 +411,7 @@ static void sq_cq_reap(struct svcxprt_rd
+@@ -411,7 +411,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -76093,7 +77789,7 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/
}
static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
-@@ -1273,7 +1273,7 @@ int svc_rdma_send(struct svcxprt_rdma *x
+@@ -1273,7 +1273,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
spin_lock_bh(&xprt->sc_lock);
if (xprt->sc_sq_depth < atomic_read(&xprt->sc_sq_count) + wr_count) {
spin_unlock_bh(&xprt->sc_lock);
@@ -76102,10 +77798,11 @@ diff -urNp linux-3.1.4/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-3.1.4/net/
/* See if we can opportunistically reap SQ WR to make room */
sq_cq_reap(xprt);
-diff -urNp linux-3.1.4/net/sysctl_net.c linux-3.1.4/net/sysctl_net.c
---- linux-3.1.4/net/sysctl_net.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/sysctl_net.c 2011-11-16 18:40:44.000000000 -0500
-@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ct
+diff --git a/net/sysctl_net.c b/net/sysctl_net.c
+index ca84212..3aa338f 100644
+--- a/net/sysctl_net.c
++++ b/net/sysctl_net.c
+@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ctl_table_root *root,
struct ctl_table *table)
{
/* Allow network administrator to have same access as root. */
@@ -76114,10 +77811,11 @@ diff -urNp linux-3.1.4/net/sysctl_net.c linux-3.1.4/net/sysctl_net.c
int mode = (table->mode >> 6) & 7;
return (mode << 6) | (mode << 3) | mode;
}
-diff -urNp linux-3.1.4/net/tipc/link.c linux-3.1.4/net/tipc/link.c
---- linux-3.1.4/net/tipc/link.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/tipc/link.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1170,7 +1170,7 @@ static int link_send_sections_long(struc
+diff --git a/net/tipc/link.c b/net/tipc/link.c
+index f89570c..016cf63 100644
+--- a/net/tipc/link.c
++++ b/net/tipc/link.c
+@@ -1170,7 +1170,7 @@ static int link_send_sections_long(struct tipc_port *sender,
struct tipc_msg fragm_hdr;
struct sk_buff *buf, *buf_chain, *prev;
u32 fragm_crs, fragm_rest, hsz, sect_rest;
@@ -76144,10 +77842,11 @@ diff -urNp linux-3.1.4/net/tipc/link.c linux-3.1.4/net/tipc/link.c
sect_crs += sz;
sect_rest -= sz;
fragm_crs += sz;
-diff -urNp linux-3.1.4/net/tipc/msg.c linux-3.1.4/net/tipc/msg.c
---- linux-3.1.4/net/tipc/msg.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/tipc/msg.c 2011-11-16 18:39:08.000000000 -0500
-@@ -99,7 +99,7 @@ int tipc_msg_build(struct tipc_msg *hdr,
+diff --git a/net/tipc/msg.c b/net/tipc/msg.c
+index 83d5096..dcba497 100644
+--- a/net/tipc/msg.c
++++ b/net/tipc/msg.c
+@@ -99,7 +99,7 @@ int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect,
msg_sect[cnt].iov_len);
else
skb_copy_to_linear_data_offset(*buf, pos,
@@ -76156,10 +77855,11 @@ diff -urNp linux-3.1.4/net/tipc/msg.c linux-3.1.4/net/tipc/msg.c
msg_sect[cnt].iov_len);
pos += msg_sect[cnt].iov_len;
}
-diff -urNp linux-3.1.4/net/tipc/subscr.c linux-3.1.4/net/tipc/subscr.c
---- linux-3.1.4/net/tipc/subscr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/tipc/subscr.c 2011-11-16 18:39:08.000000000 -0500
-@@ -101,7 +101,7 @@ static void subscr_send_event(struct sub
+diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
+index 6cf7268..7a488ce 100644
+--- a/net/tipc/subscr.c
++++ b/net/tipc/subscr.c
+@@ -101,7 +101,7 @@ static void subscr_send_event(struct subscription *sub,
{
struct iovec msg_sect;
@@ -76168,10 +77868,11 @@ diff -urNp linux-3.1.4/net/tipc/subscr.c linux-3.1.4/net/tipc/subscr.c
msg_sect.iov_len = sizeof(struct tipc_event);
sub->evt.event = htohl(event, sub->swap);
-diff -urNp linux-3.1.4/net/unix/af_unix.c linux-3.1.4/net/unix/af_unix.c
---- linux-3.1.4/net/unix/af_unix.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/unix/af_unix.c 2011-11-16 19:17:17.000000000 -0500
-@@ -767,6 +767,12 @@ static struct sock *unix_find_other(stru
+diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
+index ec68e1c..fdd792f 100644
+--- a/net/unix/af_unix.c
++++ b/net/unix/af_unix.c
+@@ -767,6 +767,12 @@ static struct sock *unix_find_other(struct net *net,
err = -ECONNREFUSED;
if (!S_ISSOCK(inode->i_mode))
goto put_fail;
@@ -76184,7 +77885,7 @@ diff -urNp linux-3.1.4/net/unix/af_unix.c linux-3.1.4/net/unix/af_unix.c
u = unix_find_socket_byinode(inode);
if (!u)
goto put_fail;
-@@ -787,6 +793,13 @@ static struct sock *unix_find_other(stru
+@@ -787,6 +793,13 @@ static struct sock *unix_find_other(struct net *net,
if (u) {
struct dentry *dentry;
dentry = unix_sk(u)->dentry;
@@ -76198,7 +77899,7 @@ diff -urNp linux-3.1.4/net/unix/af_unix.c linux-3.1.4/net/unix/af_unix.c
if (dentry)
touch_atime(unix_sk(u)->mnt, dentry);
} else
-@@ -869,11 +882,18 @@ static int unix_bind(struct socket *sock
+@@ -869,11 +882,18 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
err = security_path_mknod(&path, dentry, mode, 0);
if (err)
goto out_mknod_drop_write;
@@ -76217,9 +77918,10 @@ diff -urNp linux-3.1.4/net/unix/af_unix.c linux-3.1.4/net/unix/af_unix.c
mutex_unlock(&path.dentry->d_inode->i_mutex);
dput(path.dentry);
path.dentry = dentry;
-diff -urNp linux-3.1.4/net/wireless/core.h linux-3.1.4/net/wireless/core.h
---- linux-3.1.4/net/wireless/core.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/wireless/core.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/net/wireless/core.h b/net/wireless/core.h
+index 8672e02..48782dd 100644
+--- a/net/wireless/core.h
++++ b/net/wireless/core.h
@@ -27,7 +27,7 @@ struct cfg80211_registered_device {
struct mutex mtx;
@@ -76229,10 +77931,11 @@ diff -urNp linux-3.1.4/net/wireless/core.h linux-3.1.4/net/wireless/core.h
struct rfkill *rfkill;
struct work_struct rfkill_sync;
-diff -urNp linux-3.1.4/net/wireless/wext-core.c linux-3.1.4/net/wireless/wext-core.c
---- linux-3.1.4/net/wireless/wext-core.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/wireless/wext-core.c 2011-11-16 18:39:08.000000000 -0500
-@@ -746,8 +746,7 @@ static int ioctl_standard_iw_point(struc
+diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
+index fdbc23c..212d53e 100644
+--- a/net/wireless/wext-core.c
++++ b/net/wireless/wext-core.c
+@@ -746,8 +746,7 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
*/
/* Support for very large requests */
@@ -76242,7 +77945,7 @@ diff -urNp linux-3.1.4/net/wireless/wext-core.c linux-3.1.4/net/wireless/wext-co
/* Allow userspace to GET more than max so
* we can support any size GET requests.
* There is still a limit : -ENOMEM.
-@@ -784,22 +783,6 @@ static int ioctl_standard_iw_point(struc
+@@ -784,22 +783,6 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
}
}
@@ -76265,10 +77968,11 @@ diff -urNp linux-3.1.4/net/wireless/wext-core.c linux-3.1.4/net/wireless/wext-co
err = handler(dev, info, (union iwreq_data *) iwp, extra);
iwp->length += essid_compat;
-diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
---- linux-3.1.4/net/xfrm/xfrm_policy.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/xfrm/xfrm_policy.c 2011-11-16 18:39:08.000000000 -0500
-@@ -299,7 +299,7 @@ static void xfrm_policy_kill(struct xfrm
+diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
+index 552df27..8e7f238 100644
+--- a/net/xfrm/xfrm_policy.c
++++ b/net/xfrm/xfrm_policy.c
+@@ -299,7 +299,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
{
policy->walk.dead = 1;
@@ -76277,7 +77981,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
if (del_timer(&policy->timer))
xfrm_pol_put(policy);
-@@ -583,7 +583,7 @@ int xfrm_policy_insert(int dir, struct x
+@@ -583,7 +583,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
hlist_add_head(&policy->bydst, chain);
xfrm_pol_hold(policy);
net->xfrm.policy_count[dir]++;
@@ -76295,7 +77999,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
xfrm_dst_alloc_copy(void **target, const void *src, int size)
{
if (!*target) {
-@@ -1542,7 +1542,7 @@ xfrm_dst_alloc_copy(void **target, const
+@@ -1542,7 +1542,7 @@ xfrm_dst_alloc_copy(void **target, const void *src, int size)
return 0;
}
@@ -76304,7 +78008,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1554,7 +1554,7 @@ xfrm_dst_update_parent(struct dst_entry
+@@ -1554,7 +1554,7 @@ xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
#endif
}
@@ -76313,7 +78017,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
xfrm_dst_update_origin(struct dst_entry *dst, const struct flowi *fl)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1648,7 +1648,7 @@ xfrm_resolve_and_create_bundle(struct xf
+@@ -1648,7 +1648,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
xdst->num_pols = num_pols;
memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
@@ -76322,7 +78026,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
return xdst;
}
-@@ -2335,7 +2335,7 @@ static int xfrm_bundle_ok(struct xfrm_ds
+@@ -2335,7 +2335,7 @@ static int xfrm_bundle_ok(struct xfrm_dst *first)
if (xdst->xfrm_genid != dst->xfrm->genid)
return 0;
if (xdst->num_pols > 0 &&
@@ -76331,7 +78035,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
return 0;
mtu = dst_mtu(dst->child);
-@@ -2870,7 +2870,7 @@ static int xfrm_policy_migrate(struct xf
+@@ -2870,7 +2870,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
sizeof(pol->xfrm_vec[i].saddr));
pol->xfrm_vec[i].encap_family = mp->new_family;
/* flush bundles */
@@ -76340,10 +78044,11 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_policy.c linux-3.1.4/net/xfrm/xfrm_policy.c
}
}
-diff -urNp linux-3.1.4/net/xfrm/xfrm_user.c linux-3.1.4/net/xfrm/xfrm_user.c
---- linux-3.1.4/net/xfrm/xfrm_user.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/net/xfrm/xfrm_user.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1394,6 +1394,8 @@ static int copy_to_user_tmpl(struct xfrm
+diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
+index 0256b8a..9341ef6 100644
+--- a/net/xfrm/xfrm_user.c
++++ b/net/xfrm/xfrm_user.c
+@@ -1394,6 +1394,8 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb)
struct xfrm_user_tmpl vec[XFRM_MAX_DEPTH];
int i;
@@ -76352,7 +78057,7 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_user.c linux-3.1.4/net/xfrm/xfrm_user.c
if (xp->xfrm_nr == 0)
return 0;
-@@ -2062,6 +2064,8 @@ static int xfrm_do_migrate(struct sk_buf
+@@ -2062,6 +2064,8 @@ static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh,
int err;
int n = 0;
@@ -76361,10 +78066,58 @@ diff -urNp linux-3.1.4/net/xfrm/xfrm_user.c linux-3.1.4/net/xfrm/xfrm_user.c
if (attrs[XFRMA_MIGRATE] == NULL)
return -EINVAL;
-diff -urNp linux-3.1.4/scripts/basic/fixdep.c linux-3.1.4/scripts/basic/fixdep.c
---- linux-3.1.4/scripts/basic/fixdep.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/basic/fixdep.c 2011-11-16 18:39:08.000000000 -0500
-@@ -161,7 +161,7 @@ static unsigned int strhash(const char *
+diff --git a/scripts/Makefile.build b/scripts/Makefile.build
+index a0fd502..a8e6e83 100644
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -109,7 +109,7 @@ endif
+ endif
+
+ # Do not include host rules unless needed
+-ifneq ($(hostprogs-y)$(hostprogs-m),)
++ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m),)
+ include scripts/Makefile.host
+ endif
+
+diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
+index 686cb0d..9d653bf 100644
+--- a/scripts/Makefile.clean
++++ b/scripts/Makefile.clean
+@@ -43,7 +43,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
+ __clean-files := $(extra-y) $(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))
+
+diff --git a/scripts/Makefile.host b/scripts/Makefile.host
+index 1ac414f..a1c1451 100644
+--- a/scripts/Makefile.host
++++ b/scripts/Makefile.host
+@@ -31,6 +31,7 @@
+ # Note: Shared libraries consisting of C++ files are not supported
+
+ __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
++__hostlibs := $(sort $(hostlibs-y) $(hostlibs-m))
+
+ # C code
+ # Executables compiled from a single .c file
+@@ -54,6 +55,7 @@ host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs)))
+ # Shared libaries (only .c supported)
+ # Shared libraries (.so) - all .so files referenced in "xxx-objs"
+ host-cshlib := $(sort $(filter %.so, $(host-cobjs)))
++host-cshlib += $(sort $(filter %.so, $(__hostlibs)))
+ # Remove .so files from "xxx-objs"
+ host-cobjs := $(filter-out %.so,$(host-cobjs))
+
+diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
+index 291228e..6c55203 100644
+--- a/scripts/basic/fixdep.c
++++ b/scripts/basic/fixdep.c
+@@ -161,7 +161,7 @@ static unsigned int strhash(const char *str, unsigned int sz)
/*
* Lookup a value in the configuration string.
*/
@@ -76386,7 +78139,7 @@ diff -urNp linux-3.1.4/scripts/basic/fixdep.c linux-3.1.4/scripts/basic/fixdep.c
if (is_defined_config(m, slen, hash))
return;
-@@ -235,9 +235,9 @@ static void use_config(const char *m, in
+@@ -235,9 +235,9 @@ static void use_config(const char *m, int slen)
static void parse_config_file(const char *map, size_t len)
{
@@ -76407,60 +78160,19 @@ diff -urNp linux-3.1.4/scripts/basic/fixdep.c linux-3.1.4/scripts/basic/fixdep.c
if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
-diff -urNp linux-3.1.4/scripts/gcc-plugin.sh linux-3.1.4/scripts/gcc-plugin.sh
---- linux-3.1.4/scripts/gcc-plugin.sh 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/scripts/gcc-plugin.sh 2011-11-20 19:21:53.000000000 -0500
+diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh
+new file mode 100644
+index 0000000..8729101
+--- /dev/null
++++ b/scripts/gcc-plugin.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo -e "#include \"gcc-plugin.h\"\n#include \"tree.h\"\n#include \"tm.h\"\n#include \"rtl.h\"" | $1 -x c -shared - -o /dev/null -I`$2 -print-file-name=plugin`/include >/dev/null 2>&1 && echo "y"
-diff -urNp linux-3.1.4/scripts/Makefile.build linux-3.1.4/scripts/Makefile.build
---- linux-3.1.4/scripts/Makefile.build 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/Makefile.build 2011-11-16 18:40:44.000000000 -0500
-@@ -109,7 +109,7 @@ endif
- endif
-
- # Do not include host rules unless needed
--ifneq ($(hostprogs-y)$(hostprogs-m),)
-+ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m),)
- include scripts/Makefile.host
- endif
-
-diff -urNp linux-3.1.4/scripts/Makefile.clean linux-3.1.4/scripts/Makefile.clean
---- linux-3.1.4/scripts/Makefile.clean 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/Makefile.clean 2011-11-16 18:39:08.000000000 -0500
-@@ -43,7 +43,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subd
- __clean-files := $(extra-y) $(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))
-
-diff -urNp linux-3.1.4/scripts/Makefile.host linux-3.1.4/scripts/Makefile.host
---- linux-3.1.4/scripts/Makefile.host 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/Makefile.host 2011-11-16 18:39:08.000000000 -0500
-@@ -31,6 +31,7 @@
- # Note: Shared libraries consisting of C++ files are not supported
-
- __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
-+__hostlibs := $(sort $(hostlibs-y) $(hostlibs-m))
-
- # C code
- # Executables compiled from a single .c file
-@@ -54,6 +55,7 @@ host-cxxobjs := $(sort $(foreach m,$(hos
- # Shared libaries (only .c supported)
- # Shared libraries (.so) - all .so files referenced in "xxx-objs"
- host-cshlib := $(sort $(filter %.so, $(host-cobjs)))
-+host-cshlib += $(sort $(filter %.so, $(__hostlibs)))
- # Remove .so files from "xxx-objs"
- host-cobjs := $(filter-out %.so,$(host-cobjs))
-
-diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2alias.c
---- linux-3.1.4/scripts/mod/file2alias.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/mod/file2alias.c 2011-11-16 18:39:08.000000000 -0500
-@@ -72,7 +72,7 @@ static void device_id_check(const char *
+diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
+index e26e2fb..f84937b 100644
+--- a/scripts/mod/file2alias.c
++++ b/scripts/mod/file2alias.c
+@@ -72,7 +72,7 @@ static void device_id_check(const char *modname, const char *device_id,
unsigned long size, unsigned long id_size,
void *symval)
{
@@ -76469,7 +78181,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
if (size % id_size || size < id_size) {
if (cross_build != 0)
-@@ -102,7 +102,7 @@ static void device_id_check(const char *
+@@ -102,7 +102,7 @@ static void device_id_check(const char *modname, const char *device_id,
/* USB is special because the bcdDevice can be matched against a numeric range */
/* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */
static void do_usb_entry(struct usb_device_id *id,
@@ -76478,7 +78190,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
unsigned char range_lo, unsigned char range_hi,
unsigned char max, struct module *mod)
{
-@@ -203,7 +203,7 @@ static void do_usb_entry_multi(struct us
+@@ -203,7 +203,7 @@ static void do_usb_entry_multi(struct usb_device_id *id, struct module *mod)
{
unsigned int devlo, devhi;
unsigned char chi, clo, max;
@@ -76487,7 +78199,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
id->match_flags = TO_NATIVE(id->match_flags);
id->idVendor = TO_NATIVE(id->idVendor);
-@@ -437,7 +437,7 @@ static void do_pnp_device_entry(void *sy
+@@ -437,7 +437,7 @@ static void do_pnp_device_entry(void *symval, unsigned long size,
for (i = 0; i < count; i++) {
const char *id = (char *)devs[i].id;
char acpi_id[sizeof(devs[0].id)];
@@ -76496,7 +78208,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -467,7 +467,7 @@ static void do_pnp_card_entries(void *sy
+@@ -467,7 +467,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
for (j = 0; j < PNP_MAX_DEVICES; j++) {
const char *id = (char *)card->devs[j].id;
@@ -76505,7 +78217,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
int dup = 0;
if (!id[0])
-@@ -493,7 +493,7 @@ static void do_pnp_card_entries(void *sy
+@@ -493,7 +493,7 @@ static void do_pnp_card_entries(void *symval, unsigned long size,
/* add an individual alias for every device entry */
if (!dup) {
char acpi_id[sizeof(card->devs[0].id)];
@@ -76514,7 +78226,7 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -786,7 +786,7 @@ static void dmi_ascii_filter(char *d, co
+@@ -786,7 +786,7 @@ static void dmi_ascii_filter(char *d, const char *s)
static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
char *alias)
{
@@ -76523,9 +78235,10 @@ diff -urNp linux-3.1.4/scripts/mod/file2alias.c linux-3.1.4/scripts/mod/file2ali
sprintf(alias, "dmi*");
-diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
---- linux-3.1.4/scripts/mod/modpost.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/mod/modpost.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
+index a509ff8..5822633 100644
+--- a/scripts/mod/modpost.c
++++ b/scripts/mod/modpost.c
@@ -919,6 +919,7 @@ enum mismatch {
ANY_INIT_TO_ANY_EXIT,
ANY_EXIT_TO_ANY_INIT,
@@ -76534,7 +78247,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
};
struct sectioncheck {
-@@ -1027,6 +1028,12 @@ const struct sectioncheck sectioncheck[]
+@@ -1027,6 +1028,12 @@ const struct sectioncheck sectioncheck[] = {
.tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
.mismatch = EXPORT_TO_INIT_EXIT,
.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
@@ -76547,7 +78260,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
}
};
-@@ -1149,10 +1156,10 @@ static Elf_Sym *find_elf_symbol(struct e
+@@ -1149,10 +1156,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
continue;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
continue;
@@ -76560,7 +78273,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
if (d < 0)
d = addr - sym->st_value;
if (d < distance) {
-@@ -1431,6 +1438,14 @@ static void report_sec_mismatch(const ch
+@@ -1431,6 +1438,14 @@ static void report_sec_mismatch(const char *modname,
tosym, prl_to, prl_to, tosym);
free(prl_to);
break;
@@ -76575,7 +78288,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
}
fprintf(stderr, "\n");
}
-@@ -1656,7 +1671,7 @@ static void section_rel(const char *modn
+@@ -1656,7 +1671,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
static void check_sec_ref(struct module *mod, const char *modname,
struct elf_info *elf)
{
@@ -76584,7 +78297,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
Elf_Shdr *sechdrs = elf->sechdrs;
/* Walk through all sections */
-@@ -1754,7 +1769,7 @@ void __attribute__((format(printf, 2, 3)
+@@ -1754,7 +1769,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
va_end(ap);
}
@@ -76593,7 +78306,7 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
{
if (buf->size - buf->pos < len) {
buf->size += len + SZ;
-@@ -1966,7 +1981,7 @@ static void write_if_changed(struct buff
+@@ -1966,7 +1981,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
if (fstat(fileno(file), &st) < 0)
goto close_write;
@@ -76602,10 +78315,11 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.c linux-3.1.4/scripts/mod/modpost.c
goto close_write;
tmp = NOFAIL(malloc(b->pos));
-diff -urNp linux-3.1.4/scripts/mod/modpost.h linux-3.1.4/scripts/mod/modpost.h
---- linux-3.1.4/scripts/mod/modpost.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/mod/modpost.h 2011-11-16 18:39:08.000000000 -0500
-@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e
+diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
+index 2031119..b5433af 100644
+--- a/scripts/mod/modpost.h
++++ b/scripts/mod/modpost.h
+@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *expr);
struct buffer {
char *p;
@@ -76624,10 +78338,11 @@ diff -urNp linux-3.1.4/scripts/mod/modpost.h linux-3.1.4/scripts/mod/modpost.h
struct module {
struct module *next;
-diff -urNp linux-3.1.4/scripts/mod/sumversion.c linux-3.1.4/scripts/mod/sumversion.c
---- linux-3.1.4/scripts/mod/sumversion.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/mod/sumversion.c 2011-11-16 18:39:08.000000000 -0500
-@@ -470,7 +470,7 @@ static void write_version(const char *fi
+diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
+index 9dfcd6d..099068e 100644
+--- a/scripts/mod/sumversion.c
++++ b/scripts/mod/sumversion.c
+@@ -470,7 +470,7 @@ static void write_version(const char *filename, const char *sum,
goto out;
}
@@ -76636,9 +78351,10 @@ diff -urNp linux-3.1.4/scripts/mod/sumversion.c linux-3.1.4/scripts/mod/sumversi
warn("writing sum in %s failed: %s\n",
filename, strerror(errno));
goto out;
-diff -urNp linux-3.1.4/scripts/pnmtologo.c linux-3.1.4/scripts/pnmtologo.c
---- linux-3.1.4/scripts/pnmtologo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/scripts/pnmtologo.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
+index 5c11312..72742b5 100644
+--- a/scripts/pnmtologo.c
++++ b/scripts/pnmtologo.c
@@ -237,14 +237,14 @@ static void write_header(void)
fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out);
@@ -76665,107 +78381,10 @@ diff -urNp linux-3.1.4/scripts/pnmtologo.c linux-3.1.4/scripts/pnmtologo.c
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
-diff -urNp linux-3.1.4/security/apparmor/lsm.c linux-3.1.4/security/apparmor/lsm.c
---- linux-3.1.4/security/apparmor/lsm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/apparmor/lsm.c 2011-11-16 18:40:44.000000000 -0500
-@@ -621,7 +621,7 @@ static int apparmor_task_setrlimit(struc
- return error;
- }
-
--static struct security_operations apparmor_ops = {
-+static struct security_operations apparmor_ops __read_only = {
- .name = "apparmor",
-
- .ptrace_access_check = apparmor_ptrace_access_check,
-diff -urNp linux-3.1.4/security/commoncap.c linux-3.1.4/security/commoncap.c
---- linux-3.1.4/security/commoncap.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/commoncap.c 2011-11-16 18:40:44.000000000 -0500
-@@ -28,6 +28,7 @@
- #include <linux/prctl.h>
- #include <linux/securebits.h>
- #include <linux/user_namespace.h>
-+#include <net/sock.h>
-
- /*
- * If a non-root user executes a setuid-root binary in
-@@ -58,7 +59,7 @@ int cap_netlink_send(struct sock *sk, st
-
- int cap_netlink_recv(struct sk_buff *skb, int cap)
- {
-- if (!cap_raised(current_cap(), cap))
-+ if (!cap_raised(current_cap(), cap) || !gr_is_capable(cap))
- return -EPERM;
- return 0;
- }
-@@ -575,6 +576,9 @@ int cap_bprm_secureexec(struct linux_bin
- {
- const struct cred *cred = current_cred();
-
-+ if (gr_acl_enable_at_secure())
-+ return 1;
-+
- if (cred->uid != 0) {
- if (bprm->cap_effective)
- return 1;
-diff -urNp linux-3.1.4/security/integrity/ima/ima_api.c linux-3.1.4/security/integrity/ima/ima_api.c
---- linux-3.1.4/security/integrity/ima/ima_api.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/integrity/ima/ima_api.c 2011-11-16 18:39:08.000000000 -0500
-@@ -75,7 +75,7 @@ void ima_add_violation(struct inode *ino
- int result;
-
- /* can overflow, only indicator */
-- atomic_long_inc(&ima_htable.violations);
-+ atomic_long_inc_unchecked(&ima_htable.violations);
-
- entry = kmalloc(sizeof(*entry), GFP_KERNEL);
- if (!entry) {
-diff -urNp linux-3.1.4/security/integrity/ima/ima_fs.c linux-3.1.4/security/integrity/ima/ima_fs.c
---- linux-3.1.4/security/integrity/ima/ima_fs.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/integrity/ima/ima_fs.c 2011-11-16 18:39:08.000000000 -0500
-@@ -28,12 +28,12 @@
- static int valid_policy = 1;
- #define TMPBUFLEN 12
- static ssize_t ima_show_htable_value(char __user *buf, size_t count,
-- loff_t *ppos, atomic_long_t *val)
-+ loff_t *ppos, atomic_long_unchecked_t *val)
- {
- char tmpbuf[TMPBUFLEN];
- ssize_t len;
-
-- len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read(val));
-+ len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read_unchecked(val));
- return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
- }
-
-diff -urNp linux-3.1.4/security/integrity/ima/ima.h linux-3.1.4/security/integrity/ima/ima.h
---- linux-3.1.4/security/integrity/ima/ima.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/integrity/ima/ima.h 2011-11-16 18:39:08.000000000 -0500
-@@ -85,8 +85,8 @@ void ima_add_violation(struct inode *ino
- extern spinlock_t ima_queue_lock;
-
- struct ima_h_table {
-- atomic_long_t len; /* number of stored measurements in the list */
-- atomic_long_t violations;
-+ atomic_long_unchecked_t len; /* number of stored measurements in the list */
-+ atomic_long_unchecked_t violations;
- struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
- };
- extern struct ima_h_table ima_htable;
-diff -urNp linux-3.1.4/security/integrity/ima/ima_queue.c linux-3.1.4/security/integrity/ima/ima_queue.c
---- linux-3.1.4/security/integrity/ima/ima_queue.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/integrity/ima/ima_queue.c 2011-11-16 18:39:08.000000000 -0500
-@@ -79,7 +79,7 @@ static int ima_add_digest_entry(struct i
- INIT_LIST_HEAD(&qe->later);
- list_add_tail_rcu(&qe->later, &ima_measurements);
-
-- atomic_long_inc(&ima_htable.len);
-+ atomic_long_inc_unchecked(&ima_htable.len);
- key = ima_hash_key(entry->digest);
- hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
- return 0;
-diff -urNp linux-3.1.4/security/Kconfig linux-3.1.4/security/Kconfig
---- linux-3.1.4/security/Kconfig 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/Kconfig 2011-12-02 17:38:47.000000000 -0500
+diff --git a/security/Kconfig b/security/Kconfig
+index e0f08b5..7388edd 100644
+--- a/security/Kconfig
++++ b/security/Kconfig
@@ -4,6 +4,586 @@
menu "Security options"
@@ -77362,9 +78981,114 @@ diff -urNp linux-3.1.4/security/Kconfig linux-3.1.4/security/Kconfig
default 65536
help
This is the portion of low virtual memory which should be protected
-diff -urNp linux-3.1.4/security/keys/compat.c linux-3.1.4/security/keys/compat.c
---- linux-3.1.4/security/keys/compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/keys/compat.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
+index 3783202..1852837 100644
+--- a/security/apparmor/lsm.c
++++ b/security/apparmor/lsm.c
+@@ -621,7 +621,7 @@ static int apparmor_task_setrlimit(struct task_struct *task,
+ return error;
+ }
+
+-static struct security_operations apparmor_ops = {
++static struct security_operations apparmor_ops __read_only = {
+ .name = "apparmor",
+
+ .ptrace_access_check = apparmor_ptrace_access_check,
+diff --git a/security/commoncap.c b/security/commoncap.c
+index a93b3b7..4410df9 100644
+--- a/security/commoncap.c
++++ b/security/commoncap.c
+@@ -28,6 +28,7 @@
+ #include <linux/prctl.h>
+ #include <linux/securebits.h>
+ #include <linux/user_namespace.h>
++#include <net/sock.h>
+
+ /*
+ * If a non-root user executes a setuid-root binary in
+@@ -58,7 +59,7 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
+
+ int cap_netlink_recv(struct sk_buff *skb, int cap)
+ {
+- if (!cap_raised(current_cap(), cap))
++ if (!cap_raised(current_cap(), cap) || !gr_is_capable(cap))
+ return -EPERM;
+ return 0;
+ }
+@@ -575,6 +576,9 @@ int cap_bprm_secureexec(struct linux_binprm *bprm)
+ {
+ const struct cred *cred = current_cred();
+
++ if (gr_acl_enable_at_secure())
++ return 1;
++
+ if (cred->uid != 0) {
+ if (bprm->cap_effective)
+ return 1;
+diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
+index 08408bd..67e6e78 100644
+--- a/security/integrity/ima/ima.h
++++ b/security/integrity/ima/ima.h
+@@ -85,8 +85,8 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
+ extern spinlock_t ima_queue_lock;
+
+ struct ima_h_table {
+- atomic_long_t len; /* number of stored measurements in the list */
+- atomic_long_t violations;
++ atomic_long_unchecked_t len; /* number of stored measurements in the list */
++ atomic_long_unchecked_t violations;
+ struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
+ };
+ extern struct ima_h_table ima_htable;
+diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
+index da36d2c..e1e1965 100644
+--- a/security/integrity/ima/ima_api.c
++++ b/security/integrity/ima/ima_api.c
+@@ -75,7 +75,7 @@ void ima_add_violation(struct inode *inode, const unsigned char *filename,
+ int result;
+
+ /* can overflow, only indicator */
+- atomic_long_inc(&ima_htable.violations);
++ atomic_long_inc_unchecked(&ima_htable.violations);
+
+ entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+ if (!entry) {
+diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
+index ef21b96..d53e674 100644
+--- a/security/integrity/ima/ima_fs.c
++++ b/security/integrity/ima/ima_fs.c
+@@ -28,12 +28,12 @@
+ static int valid_policy = 1;
+ #define TMPBUFLEN 12
+ static ssize_t ima_show_htable_value(char __user *buf, size_t count,
+- loff_t *ppos, atomic_long_t *val)
++ loff_t *ppos, atomic_long_unchecked_t *val)
+ {
+ char tmpbuf[TMPBUFLEN];
+ ssize_t len;
+
+- len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read(val));
++ len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read_unchecked(val));
+ return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
+ }
+
+diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c
+index 8e28f04..d5951b1 100644
+--- a/security/integrity/ima/ima_queue.c
++++ b/security/integrity/ima/ima_queue.c
+@@ -79,7 +79,7 @@ static int ima_add_digest_entry(struct ima_template_entry *entry)
+ INIT_LIST_HEAD(&qe->later);
+ list_add_tail_rcu(&qe->later, &ima_measurements);
+
+- atomic_long_inc(&ima_htable.len);
++ atomic_long_inc_unchecked(&ima_htable.len);
+ key = ima_hash_key(entry->digest);
+ hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
+ return 0;
+diff --git a/security/keys/compat.c b/security/keys/compat.c
+index 338b510..a235861 100644
+--- a/security/keys/compat.c
++++ b/security/keys/compat.c
@@ -44,7 +44,7 @@ long compat_keyctl_instantiate_key_iov(
if (ret == 0)
goto no_payload_free;
@@ -77374,10 +79098,11 @@ diff -urNp linux-3.1.4/security/keys/compat.c linux-3.1.4/security/keys/compat.c
if (iov != iovstack)
kfree(iov);
-diff -urNp linux-3.1.4/security/keys/keyctl.c linux-3.1.4/security/keys/keyctl.c
---- linux-3.1.4/security/keys/keyctl.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/keys/keyctl.c 2011-11-16 18:39:08.000000000 -0500
-@@ -921,7 +921,7 @@ static int keyctl_change_reqkey_auth(str
+diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
+index eca5191..da9c7f0 100644
+--- a/security/keys/keyctl.c
++++ b/security/keys/keyctl.c
+@@ -921,7 +921,7 @@ static int keyctl_change_reqkey_auth(struct key *key)
/*
* Copy the iovec data from userspace
*/
@@ -77386,7 +79111,7 @@ diff -urNp linux-3.1.4/security/keys/keyctl.c linux-3.1.4/security/keys/keyctl.c
unsigned ioc)
{
for (; ioc > 0; ioc--) {
-@@ -943,7 +943,7 @@ static long copy_from_user_iovec(void *b
+@@ -943,7 +943,7 @@ static long copy_from_user_iovec(void *buffer, const struct iovec *iov,
* If successful, 0 will be returned.
*/
long keyctl_instantiate_key_common(key_serial_t id,
@@ -77395,7 +79120,7 @@ diff -urNp linux-3.1.4/security/keys/keyctl.c linux-3.1.4/security/keys/keyctl.c
unsigned ioc,
size_t plen,
key_serial_t ringid)
-@@ -1038,7 +1038,7 @@ long keyctl_instantiate_key(key_serial_t
+@@ -1038,7 +1038,7 @@ long keyctl_instantiate_key(key_serial_t id,
[0].iov_len = plen
};
@@ -77404,7 +79129,7 @@ diff -urNp linux-3.1.4/security/keys/keyctl.c linux-3.1.4/security/keys/keyctl.c
}
return keyctl_instantiate_key_common(id, NULL, 0, 0, ringid);
-@@ -1071,7 +1071,7 @@ long keyctl_instantiate_key_iov(key_seri
+@@ -1071,7 +1071,7 @@ long keyctl_instantiate_key_iov(key_serial_t id,
if (ret == 0)
goto no_payload_free;
@@ -77413,10 +79138,11 @@ diff -urNp linux-3.1.4/security/keys/keyctl.c linux-3.1.4/security/keys/keyctl.c
if (iov != iovstack)
kfree(iov);
-diff -urNp linux-3.1.4/security/keys/keyring.c linux-3.1.4/security/keys/keyring.c
---- linux-3.1.4/security/keys/keyring.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/keys/keyring.c 2011-11-16 18:39:08.000000000 -0500
-@@ -214,15 +214,15 @@ static long keyring_read(const struct ke
+diff --git a/security/keys/keyring.c b/security/keys/keyring.c
+index 30e242f..ec111ab 100644
+--- a/security/keys/keyring.c
++++ b/security/keys/keyring.c
+@@ -214,15 +214,15 @@ static long keyring_read(const struct key *keyring,
ret = -EFAULT;
for (loop = 0; loop < klist->nkeys; loop++) {
@@ -77435,10 +79161,11 @@ diff -urNp linux-3.1.4/security/keys/keyring.c linux-3.1.4/security/keys/keyring
goto error;
buflen -= tmp;
-diff -urNp linux-3.1.4/security/min_addr.c linux-3.1.4/security/min_addr.c
---- linux-3.1.4/security/min_addr.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/min_addr.c 2011-11-16 18:40:44.000000000 -0500
-@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG
+diff --git a/security/min_addr.c b/security/min_addr.c
+index f728728..6457a0c 100644
+--- a/security/min_addr.c
++++ b/security/min_addr.c
+@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
*/
static void update_mmap_min_addr(void)
{
@@ -77454,10 +79181,11 @@ diff -urNp linux-3.1.4/security/min_addr.c linux-3.1.4/security/min_addr.c
}
/*
-diff -urNp linux-3.1.4/security/security.c linux-3.1.4/security/security.c
---- linux-3.1.4/security/security.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/security.c 2011-11-16 18:40:44.000000000 -0500
-@@ -25,8 +25,8 @@ static __initdata char chosen_lsm[SECURI
+diff --git a/security/security.c b/security/security.c
+index d9e1533..91427f2 100644
+--- a/security/security.c
++++ b/security/security.c
+@@ -25,8 +25,8 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
/* things that live in capability.c */
extern void __init security_fixup_ops(struct security_operations *ops);
@@ -77478,9 +79206,10 @@ diff -urNp linux-3.1.4/security/security.c linux-3.1.4/security/security.c
}
/* Save user chosen LSM */
-diff -urNp linux-3.1.4/security/selinux/hooks.c linux-3.1.4/security/selinux/hooks.c
---- linux-3.1.4/security/selinux/hooks.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/selinux/hooks.c 2011-11-16 18:40:44.000000000 -0500
+diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
+index 266a229..61bd553 100644
+--- a/security/selinux/hooks.c
++++ b/security/selinux/hooks.c
@@ -93,7 +93,6 @@
#define NUM_SEL_MNT_OPTS 5
@@ -77489,7 +79218,7 @@ diff -urNp linux-3.1.4/security/selinux/hooks.c linux-3.1.4/security/selinux/hoo
/* SECMARK reference count */
atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
-@@ -5455,7 +5454,7 @@ static int selinux_key_getsecurity(struc
+@@ -5455,7 +5454,7 @@ static int selinux_key_getsecurity(struct key *key, char **_buffer)
#endif
@@ -77498,10 +79227,11 @@ diff -urNp linux-3.1.4/security/selinux/hooks.c linux-3.1.4/security/selinux/hoo
.name = "selinux",
.ptrace_access_check = selinux_ptrace_access_check,
-diff -urNp linux-3.1.4/security/selinux/include/xfrm.h linux-3.1.4/security/selinux/include/xfrm.h
---- linux-3.1.4/security/selinux/include/xfrm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/selinux/include/xfrm.h 2011-11-16 18:39:08.000000000 -0500
-@@ -48,7 +48,7 @@ int selinux_xfrm_decode_session(struct s
+diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h
+index b43813c..74be837 100644
+--- a/security/selinux/include/xfrm.h
++++ b/security/selinux/include/xfrm.h
+@@ -48,7 +48,7 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
static inline void selinux_xfrm_notify_policyload(void)
{
@@ -77510,10 +79240,11 @@ diff -urNp linux-3.1.4/security/selinux/include/xfrm.h linux-3.1.4/security/seli
}
#else
static inline int selinux_xfrm_enabled(void)
-diff -urNp linux-3.1.4/security/selinux/ss/services.c linux-3.1.4/security/selinux/ss/services.c
---- linux-3.1.4/security/selinux/ss/services.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/selinux/ss/services.c 2011-11-16 18:40:44.000000000 -0500
-@@ -1814,6 +1814,8 @@ int security_load_policy(void *data, siz
+diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
+index f6917bc..8e8713e 100644
+--- a/security/selinux/ss/services.c
++++ b/security/selinux/ss/services.c
+@@ -1814,6 +1814,8 @@ int security_load_policy(void *data, size_t len)
int rc = 0;
struct policy_file file = { data, len }, *fp = &file;
@@ -77522,10 +79253,11 @@ diff -urNp linux-3.1.4/security/selinux/ss/services.c linux-3.1.4/security/selin
if (!ss_initialized) {
avtab_cache_init();
rc = policydb_read(&policydb, fp);
-diff -urNp linux-3.1.4/security/smack/smack_lsm.c linux-3.1.4/security/smack/smack_lsm.c
---- linux-3.1.4/security/smack/smack_lsm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/smack/smack_lsm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -3393,7 +3393,7 @@ static int smack_inode_getsecctx(struct
+diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
+index b9c5e14..20ab779 100644
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -3393,7 +3393,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
return 0;
}
@@ -77534,10 +79266,11 @@ diff -urNp linux-3.1.4/security/smack/smack_lsm.c linux-3.1.4/security/smack/sma
.name = "smack",
.ptrace_access_check = smack_ptrace_access_check,
-diff -urNp linux-3.1.4/security/tomoyo/tomoyo.c linux-3.1.4/security/tomoyo/tomoyo.c
---- linux-3.1.4/security/tomoyo/tomoyo.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/security/tomoyo/tomoyo.c 2011-11-16 18:39:08.000000000 -0500
-@@ -446,7 +446,7 @@ static int tomoyo_sb_pivotroot(struct pa
+diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
+index f776400..f95b158c 100644
+--- a/security/tomoyo/tomoyo.c
++++ b/security/tomoyo/tomoyo.c
+@@ -446,7 +446,7 @@ static int tomoyo_sb_pivotroot(struct path *old_path, struct path *new_path)
* tomoyo_security_ops is a "struct security_operations" which is used for
* registering TOMOYO.
*/
@@ -77546,9 +79279,10 @@ diff -urNp linux-3.1.4/security/tomoyo/tomoyo.c linux-3.1.4/security/tomoyo/tomo
.name = "tomoyo",
.cred_alloc_blank = tomoyo_cred_alloc_blank,
.cred_prepare = tomoyo_cred_prepare,
-diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.c linux-3.1.4/sound/aoa/codecs/onyx.c
---- linux-3.1.4/sound/aoa/codecs/onyx.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/aoa/codecs/onyx.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
+index 3687a6c..652565e 100644
+--- a/sound/aoa/codecs/onyx.c
++++ b/sound/aoa/codecs/onyx.c
@@ -54,7 +54,7 @@ struct onyx {
spdif_locked:1,
analog_locked:1,
@@ -77558,7 +79292,7 @@ diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.c linux-3.1.4/sound/aoa/codecs/onyx
struct codec_info *codec_info;
/* mutex serializes concurrent access to the device
-@@ -753,7 +753,7 @@ static int onyx_open(struct codec_info_i
+@@ -753,7 +753,7 @@ static int onyx_open(struct codec_info_item *cii,
struct onyx *onyx = cii->codec_data;
mutex_lock(&onyx->mutex);
@@ -77567,7 +79301,7 @@ diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.c linux-3.1.4/sound/aoa/codecs/onyx
mutex_unlock(&onyx->mutex);
return 0;
-@@ -765,8 +765,7 @@ static int onyx_close(struct codec_info_
+@@ -765,8 +765,7 @@ static int onyx_close(struct codec_info_item *cii,
struct onyx *onyx = cii->codec_data;
mutex_lock(&onyx->mutex);
@@ -77577,9 +79311,10 @@ diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.c linux-3.1.4/sound/aoa/codecs/onyx
onyx->spdif_locked = onyx->analog_locked = 0;
mutex_unlock(&onyx->mutex);
-diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.h linux-3.1.4/sound/aoa/codecs/onyx.h
---- linux-3.1.4/sound/aoa/codecs/onyx.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/aoa/codecs/onyx.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/aoa/codecs/onyx.h b/sound/aoa/codecs/onyx.h
+index ffd2025..df062c9 100644
+--- a/sound/aoa/codecs/onyx.h
++++ b/sound/aoa/codecs/onyx.h
@@ -11,6 +11,7 @@
#include <linux/i2c.h>
#include <asm/pmac_low_i2c.h>
@@ -77588,10 +79323,11 @@ diff -urNp linux-3.1.4/sound/aoa/codecs/onyx.h linux-3.1.4/sound/aoa/codecs/onyx
/* PCM3052 register definitions */
-diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_oss.c
---- linux-3.1.4/sound/core/oss/pcm_oss.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/core/oss/pcm_oss.c 2011-11-16 18:39:08.000000000 -0500
-@@ -1189,10 +1189,10 @@ snd_pcm_sframes_t snd_pcm_oss_write3(str
+diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
+index 23c34a0..a2673a5 100644
+--- a/sound/core/oss/pcm_oss.c
++++ b/sound/core/oss/pcm_oss.c
+@@ -1189,10 +1189,10 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
if (in_kernel) {
mm_segment_t fs;
fs = snd_enter_user();
@@ -77604,7 +79340,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
}
if (ret != -EPIPE && ret != -ESTRPIPE)
break;
-@@ -1234,10 +1234,10 @@ snd_pcm_sframes_t snd_pcm_oss_read3(stru
+@@ -1234,10 +1234,10 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
if (in_kernel) {
mm_segment_t fs;
fs = snd_enter_user();
@@ -77617,7 +79353,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
}
if (ret == -EPIPE) {
if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) {
-@@ -1337,7 +1337,7 @@ static ssize_t snd_pcm_oss_write2(struct
+@@ -1337,7 +1337,7 @@ static ssize_t snd_pcm_oss_write2(struct snd_pcm_substream *substream, const cha
struct snd_pcm_plugin_channel *channels;
size_t oss_frame_bytes = (runtime->oss.plugin_first->src_width * runtime->oss.plugin_first->src_format.channels) / 8;
if (!in_kernel) {
@@ -77626,7 +79362,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
return -EFAULT;
buf = runtime->oss.buffer;
}
-@@ -1407,7 +1407,7 @@ static ssize_t snd_pcm_oss_write1(struct
+@@ -1407,7 +1407,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
}
} else {
tmp = snd_pcm_oss_write2(substream,
@@ -77635,7 +79371,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
runtime->oss.period_bytes, 0);
if (tmp <= 0)
goto err;
-@@ -1433,7 +1433,7 @@ static ssize_t snd_pcm_oss_read2(struct
+@@ -1433,7 +1433,7 @@ static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf,
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_sframes_t frames, frames1;
#ifdef CONFIG_SND_PCM_OSS_PLUGINS
@@ -77644,7 +79380,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
if (runtime->oss.plugin_first) {
struct snd_pcm_plugin_channel *channels;
size_t oss_frame_bytes = (runtime->oss.plugin_last->dst_width * runtime->oss.plugin_last->dst_format.channels) / 8;
-@@ -1495,7 +1495,7 @@ static ssize_t snd_pcm_oss_read1(struct
+@@ -1495,7 +1495,7 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
xfer += tmp;
runtime->oss.buffer_used -= tmp;
} else {
@@ -77653,7 +79389,7 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
runtime->oss.period_bytes, 0);
if (tmp <= 0)
goto err;
-@@ -1663,7 +1663,7 @@ static int snd_pcm_oss_sync(struct snd_p
+@@ -1663,7 +1663,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
size1);
size1 /= runtime->channels; /* frames */
fs = snd_enter_user();
@@ -77662,10 +79398,11 @@ diff -urNp linux-3.1.4/sound/core/oss/pcm_oss.c linux-3.1.4/sound/core/oss/pcm_o
snd_leave_user(fs);
}
} else if (runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) {
-diff -urNp linux-3.1.4/sound/core/pcm_compat.c linux-3.1.4/sound/core/pcm_compat.c
---- linux-3.1.4/sound/core/pcm_compat.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/core/pcm_compat.c 2011-11-16 18:39:08.000000000 -0500
-@@ -31,7 +31,7 @@ static int snd_pcm_ioctl_delay_compat(st
+diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
+index 91cdf94..4085161 100644
+--- a/sound/core/pcm_compat.c
++++ b/sound/core/pcm_compat.c
+@@ -31,7 +31,7 @@ static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
int err;
fs = snd_enter_user();
@@ -77674,10 +79411,11 @@ diff -urNp linux-3.1.4/sound/core/pcm_compat.c linux-3.1.4/sound/core/pcm_compat
snd_leave_user(fs);
if (err < 0)
return err;
-diff -urNp linux-3.1.4/sound/core/pcm_native.c linux-3.1.4/sound/core/pcm_native.c
---- linux-3.1.4/sound/core/pcm_native.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/core/pcm_native.c 2011-11-16 18:39:08.000000000 -0500
-@@ -2770,11 +2770,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_
+diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
+index 1c6be91..c761a59 100644
+--- a/sound/core/pcm_native.c
++++ b/sound/core/pcm_native.c
+@@ -2770,11 +2770,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
switch (substream->stream) {
case SNDRV_PCM_STREAM_PLAYBACK:
result = snd_pcm_playback_ioctl1(NULL, substream, cmd,
@@ -77691,9 +79429,10 @@ diff -urNp linux-3.1.4/sound/core/pcm_native.c linux-3.1.4/sound/core/pcm_native
break;
default:
result = -EINVAL;
-diff -urNp linux-3.1.4/sound/core/seq/seq_device.c linux-3.1.4/sound/core/seq/seq_device.c
---- linux-3.1.4/sound/core/seq/seq_device.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/core/seq/seq_device.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
+index 1f99767..14636533 100644
+--- a/sound/core/seq/seq_device.c
++++ b/sound/core/seq/seq_device.c
@@ -63,7 +63,7 @@ struct ops_list {
int argsize; /* argument size */
@@ -77703,7 +79442,7 @@ diff -urNp linux-3.1.4/sound/core/seq/seq_device.c linux-3.1.4/sound/core/seq/se
/* registred devices */
struct list_head dev_list; /* list of devices */
-@@ -332,7 +332,7 @@ int snd_seq_device_register_driver(char
+@@ -332,7 +332,7 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
mutex_lock(&ops->reg_mutex);
/* copy driver operators */
@@ -77712,7 +79451,7 @@ diff -urNp linux-3.1.4/sound/core/seq/seq_device.c linux-3.1.4/sound/core/seq/se
ops->driver |= DRIVER_LOADED;
ops->argsize = argsize;
-@@ -462,7 +462,7 @@ static int init_device(struct snd_seq_de
+@@ -462,7 +462,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL;
}
@@ -77721,7 +79460,7 @@ diff -urNp linux-3.1.4/sound/core/seq/seq_device.c linux-3.1.4/sound/core/seq/se
dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
ops->num_init_devices++;
} else {
-@@ -489,7 +489,7 @@ static int free_device(struct snd_seq_de
+@@ -489,7 +489,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL;
}
@@ -77730,9 +79469,10 @@ diff -urNp linux-3.1.4/sound/core/seq/seq_device.c linux-3.1.4/sound/core/seq/se
dev->status = SNDRV_SEQ_DEVICE_FREE;
dev->driver_data = NULL;
ops->num_init_devices--;
-diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
---- linux-3.1.4/sound/drivers/mts64.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/drivers/mts64.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
+index 8539ab0..be8a121 100644
+--- a/sound/drivers/mts64.c
++++ b/sound/drivers/mts64.c
@@ -28,6 +28,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
@@ -77750,7 +79490,7 @@ diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
int current_midi_output_port;
int current_midi_input_port;
u8 mode[MTS64_NUM_INPUT_PORTS];
-@@ -696,7 +697,7 @@ static int snd_mts64_rawmidi_open(struct
+@@ -696,7 +697,7 @@ static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream)
{
struct mts64 *mts = substream->rmidi->private_data;
@@ -77759,7 +79499,7 @@ diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
/* We don't need a spinlock here, because this is just called
if the device has not been opened before.
So there aren't any IRQs from the device */
-@@ -704,7 +705,7 @@ static int snd_mts64_rawmidi_open(struct
+@@ -704,7 +705,7 @@ static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream)
msleep(50);
}
@@ -77768,7 +79508,7 @@ diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
return 0;
}
-@@ -714,8 +715,7 @@ static int snd_mts64_rawmidi_close(struc
+@@ -714,8 +715,7 @@ static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream)
struct mts64 *mts = substream->rmidi->private_data;
unsigned long flags;
@@ -77778,7 +79518,7 @@ diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
/* We need the spinlock_irqsave here because we can still
have IRQs at this point */
spin_lock_irqsave(&mts->lock, flags);
-@@ -724,8 +724,8 @@ static int snd_mts64_rawmidi_close(struc
+@@ -724,8 +724,8 @@ static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream)
msleep(500);
@@ -77789,10 +79529,11 @@ diff -urNp linux-3.1.4/sound/drivers/mts64.c linux-3.1.4/sound/drivers/mts64.c
return 0;
}
-diff -urNp linux-3.1.4/sound/drivers/opl4/opl4_lib.c linux-3.1.4/sound/drivers/opl4/opl4_lib.c
---- linux-3.1.4/sound/drivers/opl4/opl4_lib.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/drivers/opl4/opl4_lib.c 2011-11-16 18:39:08.000000000 -0500
-@@ -28,7 +28,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@
+diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
+index f07e38d..7aae69a 100644
+--- a/sound/drivers/opl4/opl4_lib.c
++++ b/sound/drivers/opl4/opl4_lib.c
+@@ -28,7 +28,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
MODULE_DESCRIPTION("OPL4 driver");
MODULE_LICENSE("GPL");
@@ -77801,9 +79542,10 @@ diff -urNp linux-3.1.4/sound/drivers/opl4/opl4_lib.c linux-3.1.4/sound/drivers/o
{
int timeout = 10;
while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)
-diff -urNp linux-3.1.4/sound/drivers/portman2x4.c linux-3.1.4/sound/drivers/portman2x4.c
---- linux-3.1.4/sound/drivers/portman2x4.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/drivers/portman2x4.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
+index f2b0ba2..429efc5 100644
+--- a/sound/drivers/portman2x4.c
++++ b/sound/drivers/portman2x4.c
@@ -47,6 +47,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
@@ -77821,10 +79563,11 @@ diff -urNp linux-3.1.4/sound/drivers/portman2x4.c linux-3.1.4/sound/drivers/port
int mode[PORTMAN_NUM_INPUT_PORTS];
struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS];
};
-diff -urNp linux-3.1.4/sound/firewire/amdtp.c linux-3.1.4/sound/firewire/amdtp.c
---- linux-3.1.4/sound/firewire/amdtp.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/firewire/amdtp.c 2011-11-16 18:39:08.000000000 -0500
-@@ -371,7 +371,7 @@ static void queue_out_packet(struct amdt
+diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c
+index 87657dd..a8268d4 100644
+--- a/sound/firewire/amdtp.c
++++ b/sound/firewire/amdtp.c
+@@ -371,7 +371,7 @@ static void queue_out_packet(struct amdtp_out_stream *s, unsigned int cycle)
ptr = s->pcm_buffer_pointer + data_blocks;
if (ptr >= pcm->runtime->buffer_size)
ptr -= pcm->runtime->buffer_size;
@@ -77842,10 +79585,11 @@ diff -urNp linux-3.1.4/sound/firewire/amdtp.c linux-3.1.4/sound/firewire/amdtp.c
(fw_parent_device(s->unit)->card->node_id & 0x3f) << 24;
}
EXPORT_SYMBOL(amdtp_out_stream_update);
-diff -urNp linux-3.1.4/sound/firewire/amdtp.h linux-3.1.4/sound/firewire/amdtp.h
---- linux-3.1.4/sound/firewire/amdtp.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/firewire/amdtp.h 2011-11-16 18:39:08.000000000 -0500
-@@ -146,7 +146,7 @@ static inline void amdtp_out_stream_pcm_
+diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
+index 537a9cb..8e8c8e9 100644
+--- a/sound/firewire/amdtp.h
++++ b/sound/firewire/amdtp.h
+@@ -146,7 +146,7 @@ static inline void amdtp_out_stream_pcm_prepare(struct amdtp_out_stream *s)
static inline void amdtp_out_stream_pcm_trigger(struct amdtp_out_stream *s,
struct snd_pcm_substream *pcm)
{
@@ -77854,10 +79598,11 @@ diff -urNp linux-3.1.4/sound/firewire/amdtp.h linux-3.1.4/sound/firewire/amdtp.h
}
/**
-diff -urNp linux-3.1.4/sound/firewire/isight.c linux-3.1.4/sound/firewire/isight.c
---- linux-3.1.4/sound/firewire/isight.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/firewire/isight.c 2011-11-16 18:39:08.000000000 -0500
-@@ -97,7 +97,7 @@ static void isight_update_pointers(struc
+diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c
+index 4400308..261e9f3 100644
+--- a/sound/firewire/isight.c
++++ b/sound/firewire/isight.c
+@@ -97,7 +97,7 @@ static void isight_update_pointers(struct isight *isight, unsigned int count)
ptr += count;
if (ptr >= runtime->buffer_size)
ptr -= runtime->buffer_size;
@@ -77866,7 +79611,7 @@ diff -urNp linux-3.1.4/sound/firewire/isight.c linux-3.1.4/sound/firewire/isight
isight->period_counter += count;
if (isight->period_counter >= runtime->period_size) {
-@@ -308,7 +308,7 @@ static int isight_hw_params(struct snd_p
+@@ -308,7 +308,7 @@ static int isight_hw_params(struct snd_pcm_substream *substream,
if (err < 0)
return err;
@@ -77875,7 +79620,7 @@ diff -urNp linux-3.1.4/sound/firewire/isight.c linux-3.1.4/sound/firewire/isight
return 0;
}
-@@ -341,7 +341,7 @@ static int isight_hw_free(struct snd_pcm
+@@ -341,7 +341,7 @@ static int isight_hw_free(struct snd_pcm_substream *substream)
{
struct isight *isight = substream->private_data;
@@ -77884,7 +79629,7 @@ diff -urNp linux-3.1.4/sound/firewire/isight.c linux-3.1.4/sound/firewire/isight
mutex_lock(&isight->mutex);
isight_stop_streaming(isight);
-@@ -434,10 +434,10 @@ static int isight_trigger(struct snd_pcm
+@@ -434,10 +434,10 @@ static int isight_trigger(struct snd_pcm_substream *substream, int cmd)
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
@@ -77897,9 +79642,10 @@ diff -urNp linux-3.1.4/sound/firewire/isight.c linux-3.1.4/sound/firewire/isight
break;
default:
return -EINVAL;
-diff -urNp linux-3.1.4/sound/isa/cmi8330.c linux-3.1.4/sound/isa/cmi8330.c
---- linux-3.1.4/sound/isa/cmi8330.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/isa/cmi8330.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
+index fe79a16..4d9714e 100644
+--- a/sound/isa/cmi8330.c
++++ b/sound/isa/cmi8330.c
@@ -172,7 +172,7 @@ struct snd_cmi8330 {
struct snd_pcm *pcm;
@@ -77909,9 +79655,10 @@ diff -urNp linux-3.1.4/sound/isa/cmi8330.c linux-3.1.4/sound/isa/cmi8330.c
snd_pcm_open_callback_t open;
void *private_data; /* sb or wss */
} streams[2];
-diff -urNp linux-3.1.4/sound/oss/sb_audio.c linux-3.1.4/sound/oss/sb_audio.c
---- linux-3.1.4/sound/oss/sb_audio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/oss/sb_audio.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
+index 733b014..56ce96f 100644
+--- a/sound/oss/sb_audio.c
++++ b/sound/oss/sb_audio.c
@@ -901,7 +901,7 @@ sb16_copy_from_user(int dev,
buf16 = (signed short *)(localbuf + localoffs);
while (c)
@@ -77921,9 +79668,10 @@ diff -urNp linux-3.1.4/sound/oss/sb_audio.c linux-3.1.4/sound/oss/sb_audio.c
if (copy_from_user(lbuf8,
userbuf+useroffs + p,
locallen))
-diff -urNp linux-3.1.4/sound/oss/swarm_cs4297a.c linux-3.1.4/sound/oss/swarm_cs4297a.c
---- linux-3.1.4/sound/oss/swarm_cs4297a.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/oss/swarm_cs4297a.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
+index 09d4648..cf234c7 100644
+--- a/sound/oss/swarm_cs4297a.c
++++ b/sound/oss/swarm_cs4297a.c
@@ -2606,7 +2606,6 @@ static int __init cs4297a_init(void)
{
struct cs4297a_state *s;
@@ -77958,9 +79706,10 @@ diff -urNp linux-3.1.4/sound/oss/swarm_cs4297a.c linux-3.1.4/sound/oss/swarm_cs4
list_add(&s->list, &cs4297a_devs);
-diff -urNp linux-3.1.4/sound/pci/hda/hda_codec.h linux-3.1.4/sound/pci/hda/hda_codec.h
---- linux-3.1.4/sound/pci/hda/hda_codec.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/pci/hda/hda_codec.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
+index 755f2b0..5c12361 100644
+--- a/sound/pci/hda/hda_codec.h
++++ b/sound/pci/hda/hda_codec.h
@@ -611,7 +611,7 @@ struct hda_bus_ops {
/* notify power-up/down from codec to controller */
void (*pm_notify)(struct hda_bus *bus);
@@ -77996,9 +79745,10 @@ diff -urNp linux-3.1.4/sound/pci/hda/hda_codec.h linux-3.1.4/sound/pci/hda/hda_c
/* PCM to create, set by patch_ops.build_pcms callback */
unsigned int num_pcms;
-diff -urNp linux-3.1.4/sound/pci/ice1712/ice1712.h linux-3.1.4/sound/pci/ice1712/ice1712.h
---- linux-3.1.4/sound/pci/ice1712/ice1712.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/pci/ice1712/ice1712.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
+index 0da778a..bc38b84 100644
+--- a/sound/pci/ice1712/ice1712.h
++++ b/sound/pci/ice1712/ice1712.h
@@ -269,7 +269,7 @@ struct snd_ak4xxx_private {
unsigned int mask_flags; /* total mask bits */
struct snd_akm4xxx_ops {
@@ -78017,10 +79767,11 @@ diff -urNp linux-3.1.4/sound/pci/ice1712/ice1712.h linux-3.1.4/sound/pci/ice1712
};
-diff -urNp linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c
---- linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c 2011-11-16 18:39:08.000000000 -0500
-@@ -202,8 +202,8 @@ static void snd_ymfpci_hw_stop(struct sn
+diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
+index f3260e6..4a285d8 100644
+--- a/sound/pci/ymfpci/ymfpci_main.c
++++ b/sound/pci/ymfpci/ymfpci_main.c
+@@ -202,8 +202,8 @@ static void snd_ymfpci_hw_stop(struct snd_ymfpci *chip)
if ((snd_ymfpci_readl(chip, YDSXGR_STATUS) & 2) == 0)
break;
}
@@ -78031,7 +79782,7 @@ diff -urNp linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c linux-3.1.4/sound/pci/ymfp
wake_up(&chip->interrupt_sleep);
}
__end:
-@@ -787,7 +787,7 @@ static void snd_ymfpci_irq_wait(struct s
+@@ -787,7 +787,7 @@ static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip)
continue;
init_waitqueue_entry(&wait, current);
add_wait_queue(&chip->interrupt_sleep, &wait);
@@ -78040,7 +79791,7 @@ diff -urNp linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c linux-3.1.4/sound/pci/ymfp
schedule_timeout_uninterruptible(msecs_to_jiffies(50));
remove_wait_queue(&chip->interrupt_sleep, &wait);
}
-@@ -825,8 +825,8 @@ static irqreturn_t snd_ymfpci_interrupt(
+@@ -825,8 +825,8 @@ static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id)
snd_ymfpci_writel(chip, YDSXGR_MODE, mode);
spin_unlock(&chip->reg_lock);
@@ -78051,7 +79802,7 @@ diff -urNp linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c linux-3.1.4/sound/pci/ymfp
wake_up(&chip->interrupt_sleep);
}
}
-@@ -2363,7 +2363,7 @@ int __devinit snd_ymfpci_create(struct s
+@@ -2363,7 +2363,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
spin_lock_init(&chip->reg_lock);
spin_lock_init(&chip->voice_lock);
init_waitqueue_head(&chip->interrupt_sleep);
@@ -78060,10 +79811,11 @@ diff -urNp linux-3.1.4/sound/pci/ymfpci/ymfpci_main.c linux-3.1.4/sound/pci/ymfp
chip->card = card;
chip->pci = pci;
chip->irq = -1;
-diff -urNp linux-3.1.4/sound/soc/soc-pcm.c linux-3.1.4/sound/soc/soc-pcm.c
---- linux-3.1.4/sound/soc/soc-pcm.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/soc/soc-pcm.c 2011-11-16 18:39:08.000000000 -0500
-@@ -568,7 +568,7 @@ static snd_pcm_uframes_t soc_pcm_pointer
+diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
+index 2879c88..224159e 100644
+--- a/sound/soc/soc-pcm.c
++++ b/sound/soc/soc-pcm.c
+@@ -568,7 +568,7 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
}
/* ASoC PCM operations */
@@ -78072,9 +79824,10 @@ diff -urNp linux-3.1.4/sound/soc/soc-pcm.c linux-3.1.4/sound/soc/soc-pcm.c
.open = soc_pcm_open,
.close = soc_pcm_close,
.hw_params = soc_pcm_hw_params,
-diff -urNp linux-3.1.4/sound/usb/card.h linux-3.1.4/sound/usb/card.h
---- linux-3.1.4/sound/usb/card.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/sound/usb/card.h 2011-11-16 18:39:08.000000000 -0500
+diff --git a/sound/usb/card.h b/sound/usb/card.h
+index ae4251d..0961361 100644
+--- a/sound/usb/card.h
++++ b/sound/usb/card.h
@@ -44,6 +44,7 @@ struct snd_urb_ops {
int (*prepare_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
int (*retire_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
@@ -78092,9 +79845,38 @@ diff -urNp linux-3.1.4/sound/usb/card.h linux-3.1.4/sound/usb/card.h
};
struct snd_usb_stream {
-diff -urNp linux-3.1.4/tools/gcc/checker_plugin.c linux-3.1.4/tools/gcc/checker_plugin.c
---- linux-3.1.4/tools/gcc/checker_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/checker_plugin.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile
+new file mode 100644
+index 0000000..b044b80
+--- /dev/null
++++ b/tools/gcc/Makefile
+@@ -0,0 +1,21 @@
++#CC := gcc
++#PLUGIN_SOURCE_FILES := pax_plugin.c
++#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
++GCCPLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
++#CFLAGS += -I$(GCCPLUGINS_DIR)/include -fPIC -O2 -Wall -W
++
++HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include
++
++hostlibs-y := constify_plugin.so
++hostlibs-$(CONFIG_PAX_MEMORY_STACKLEAK) += stackleak_plugin.so
++hostlibs-$(CONFIG_KALLOCSTAT_PLUGIN) += kallocstat_plugin.so
++hostlibs-$(CONFIG_PAX_KERNEXEC_PLUGIN) += kernexec_plugin.so
++hostlibs-$(CONFIG_CHECKER_PLUGIN) += checker_plugin.so
++
++always := $(hostlibs-y)
++
++constify_plugin-objs := constify_plugin.o
++stackleak_plugin-objs := stackleak_plugin.o
++kallocstat_plugin-objs := kallocstat_plugin.o
++kernexec_plugin-objs := kernexec_plugin.o
++checker_plugin-objs := checker_plugin.o
+diff --git a/tools/gcc/checker_plugin.c b/tools/gcc/checker_plugin.c
+new file mode 100644
+index 0000000..d41b5af
+--- /dev/null
++++ b/tools/gcc/checker_plugin.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -78267,9 +80049,11 @@ diff -urNp linux-3.1.4/tools/gcc/checker_plugin.c linux-3.1.4/tools/gcc/checker_
+
+ return 0;
+}
-diff -urNp linux-3.1.4/tools/gcc/constify_plugin.c linux-3.1.4/tools/gcc/constify_plugin.c
---- linux-3.1.4/tools/gcc/constify_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/constify_plugin.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/tools/gcc/constify_plugin.c b/tools/gcc/constify_plugin.c
+new file mode 100644
+index 0000000..5b07edd
+--- /dev/null
++++ b/tools/gcc/constify_plugin.c
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2011 by Emese Revfy <re.emese@gmail.com>
@@ -78574,9 +80358,11 @@ diff -urNp linux-3.1.4/tools/gcc/constify_plugin.c linux-3.1.4/tools/gcc/constif
+
+ return 0;
+}
-diff -urNp linux-3.1.4/tools/gcc/kallocstat_plugin.c linux-3.1.4/tools/gcc/kallocstat_plugin.c
---- linux-3.1.4/tools/gcc/kallocstat_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/kallocstat_plugin.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/tools/gcc/kallocstat_plugin.c b/tools/gcc/kallocstat_plugin.c
+new file mode 100644
+index 0000000..a5eabce
+--- /dev/null
++++ b/tools/gcc/kallocstat_plugin.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -78745,9 +80531,11 @@ diff -urNp linux-3.1.4/tools/gcc/kallocstat_plugin.c linux-3.1.4/tools/gcc/kallo
+
+ return 0;
+}
-diff -urNp linux-3.1.4/tools/gcc/kernexec_plugin.c linux-3.1.4/tools/gcc/kernexec_plugin.c
---- linux-3.1.4/tools/gcc/kernexec_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/kernexec_plugin.c 2011-12-02 17:38:47.000000000 -0500
+diff --git a/tools/gcc/kernexec_plugin.c b/tools/gcc/kernexec_plugin.c
+new file mode 100644
+index 0000000..51f747e
+--- /dev/null
++++ b/tools/gcc/kernexec_plugin.c
@@ -0,0 +1,348 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -79097,34 +80885,11 @@ diff -urNp linux-3.1.4/tools/gcc/kernexec_plugin.c linux-3.1.4/tools/gcc/kernexe
+
+ return 0;
+}
-diff -urNp linux-3.1.4/tools/gcc/Makefile linux-3.1.4/tools/gcc/Makefile
---- linux-3.1.4/tools/gcc/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/Makefile 2011-11-16 20:37:08.000000000 -0500
-@@ -0,0 +1,21 @@
-+#CC := gcc
-+#PLUGIN_SOURCE_FILES := pax_plugin.c
-+#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
-+GCCPLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
-+#CFLAGS += -I$(GCCPLUGINS_DIR)/include -fPIC -O2 -Wall -W
-+
-+HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include
-+
-+hostlibs-y := constify_plugin.so
-+hostlibs-$(CONFIG_PAX_MEMORY_STACKLEAK) += stackleak_plugin.so
-+hostlibs-$(CONFIG_KALLOCSTAT_PLUGIN) += kallocstat_plugin.so
-+hostlibs-$(CONFIG_PAX_KERNEXEC_PLUGIN) += kernexec_plugin.so
-+hostlibs-$(CONFIG_CHECKER_PLUGIN) += checker_plugin.so
-+
-+always := $(hostlibs-y)
-+
-+constify_plugin-objs := constify_plugin.o
-+stackleak_plugin-objs := stackleak_plugin.o
-+kallocstat_plugin-objs := kallocstat_plugin.o
-+kernexec_plugin-objs := kernexec_plugin.o
-+checker_plugin-objs := checker_plugin.o
-diff -urNp linux-3.1.4/tools/gcc/stackleak_plugin.c linux-3.1.4/tools/gcc/stackleak_plugin.c
---- linux-3.1.4/tools/gcc/stackleak_plugin.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-3.1.4/tools/gcc/stackleak_plugin.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/tools/gcc/stackleak_plugin.c b/tools/gcc/stackleak_plugin.c
+new file mode 100644
+index 0000000..41dd4b1
+--- /dev/null
++++ b/tools/gcc/stackleak_plugin.c
@@ -0,0 +1,291 @@
+/*
+ * Copyright 2011 by the PaX Team <pageexec@freemail.hu>
@@ -79417,9 +81182,10 @@ diff -urNp linux-3.1.4/tools/gcc/stackleak_plugin.c linux-3.1.4/tools/gcc/stackl
+
+ return 0;
+}
-diff -urNp linux-3.1.4/tools/perf/util/include/asm/alternative-asm.h linux-3.1.4/tools/perf/util/include/asm/alternative-asm.h
---- linux-3.1.4/tools/perf/util/include/asm/alternative-asm.h 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/tools/perf/util/include/asm/alternative-asm.h 2011-12-02 17:38:47.000000000 -0500
+diff --git a/tools/perf/util/include/asm/alternative-asm.h b/tools/perf/util/include/asm/alternative-asm.h
+index 6789d78..4afd019 100644
+--- a/tools/perf/util/include/asm/alternative-asm.h
++++ b/tools/perf/util/include/asm/alternative-asm.h
@@ -5,4 +5,7 @@
#define altinstruction_entry #
@@ -79428,10 +81194,11 @@ diff -urNp linux-3.1.4/tools/perf/util/include/asm/alternative-asm.h linux-3.1.4
+ .endm
+
#endif
-diff -urNp linux-3.1.4/usr/gen_init_cpio.c linux-3.1.4/usr/gen_init_cpio.c
---- linux-3.1.4/usr/gen_init_cpio.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/usr/gen_init_cpio.c 2011-11-16 18:39:08.000000000 -0500
-@@ -303,7 +303,7 @@ static int cpio_mkfile(const char *name,
+diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
+index af0f22f..9a7d479 100644
+--- a/usr/gen_init_cpio.c
++++ b/usr/gen_init_cpio.c
+@@ -303,7 +303,7 @@ static int cpio_mkfile(const char *name, const char *location,
int retval;
int rc = -1;
int namesize;
@@ -79440,7 +81207,7 @@ diff -urNp linux-3.1.4/usr/gen_init_cpio.c linux-3.1.4/usr/gen_init_cpio.c
mode |= S_IFREG;
-@@ -392,9 +392,10 @@ static char *cpio_replace_env(char *new_
+@@ -392,9 +392,10 @@ static char *cpio_replace_env(char *new_location)
*env_var = *expanded = '\0';
strncat(env_var, start + 2, end - start - 2);
strncat(expanded, new_location, start - new_location);
@@ -79453,9 +81220,10 @@ diff -urNp linux-3.1.4/usr/gen_init_cpio.c linux-3.1.4/usr/gen_init_cpio.c
} else
break;
}
-diff -urNp linux-3.1.4/virt/kvm/kvm_main.c linux-3.1.4/virt/kvm/kvm_main.c
---- linux-3.1.4/virt/kvm/kvm_main.c 2011-11-11 15:19:27.000000000 -0500
-+++ linux-3.1.4/virt/kvm/kvm_main.c 2011-11-16 18:39:08.000000000 -0500
+diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
+index aefdda3..8e8fbb9 100644
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
@@ -73,7 +73,7 @@ LIST_HEAD(vm_list);
static cpumask_var_t cpus_hardware_enabled;
@@ -79465,7 +81233,7 @@ diff -urNp linux-3.1.4/virt/kvm/kvm_main.c linux-3.1.4/virt/kvm/kvm_main.c
struct kmem_cache *kvm_vcpu_cache;
EXPORT_SYMBOL_GPL(kvm_vcpu_cache);
-@@ -2266,7 +2266,7 @@ static void hardware_enable_nolock(void
+@@ -2266,7 +2266,7 @@ static void hardware_enable_nolock(void *junk)
if (r) {
cpumask_clear_cpu(cpu, cpus_hardware_enabled);
@@ -79487,7 +81255,7 @@ diff -urNp linux-3.1.4/virt/kvm/kvm_main.c linux-3.1.4/virt/kvm/kvm_main.c
hardware_disable_all_nolock();
r = -EBUSY;
}
-@@ -2588,7 +2588,7 @@ static void kvm_sched_out(struct preempt
+@@ -2588,7 +2588,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
kvm_arch_vcpu_put(vcpu);
}
@@ -79496,7 +81264,7 @@ diff -urNp linux-3.1.4/virt/kvm/kvm_main.c linux-3.1.4/virt/kvm/kvm_main.c
struct module *module)
{
int r;
-@@ -2651,7 +2651,7 @@ int kvm_init(void *opaque, unsigned vcpu
+@@ -2651,7 +2651,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
if (!vcpu_align)
vcpu_align = __alignof__(struct kvm_vcpu);
kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align,
@@ -79505,7 +81273,7 @@ diff -urNp linux-3.1.4/virt/kvm/kvm_main.c linux-3.1.4/virt/kvm/kvm_main.c
if (!kvm_vcpu_cache) {
r = -ENOMEM;
goto out_free_3;
-@@ -2661,9 +2661,11 @@ int kvm_init(void *opaque, unsigned vcpu
+@@ -2661,9 +2661,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
if (r)
goto out_free;