-diff -urNp linux-2.6.37.2/arch/alpha/include/asm/dma-mapping.h linux-2.6.37.2/arch/alpha/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/alpha/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/include/asm/dma-mapping.h linux-2.6.38.1/arch/alpha/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/alpha/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -3,9 +3,9 @@
#include <linux/dma-attrs.h>
{
return dma_ops;
}
-diff -urNp linux-2.6.37.2/arch/alpha/include/asm/elf.h linux-2.6.37.2/arch/alpha/include/asm/elf.h
---- linux-2.6.37.2/arch/alpha/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/include/asm/elf.h linux-2.6.38.1/arch/alpha/include/asm/elf.h
+--- linux-2.6.38.1/arch/alpha/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -90,6 +90,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
/* $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.37.2/arch/alpha/include/asm/pgtable.h linux-2.6.37.2/arch/alpha/include/asm/pgtable.h
---- linux-2.6.37.2/arch/alpha/include/asm/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/include/asm/pgtable.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/include/asm/pgtable.h linux-2.6.38.1/arch/alpha/include/asm/pgtable.h
+--- linux-2.6.38.1/arch/alpha/include/asm/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/include/asm/pgtable.h 2011-03-21 18:31:35.000000000 -0400
@@ -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)
#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.37.2/arch/alpha/kernel/module.c linux-2.6.37.2/arch/alpha/kernel/module.c
---- linux-2.6.37.2/arch/alpha/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/kernel/module.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/kernel/module.c linux-2.6.38.1/arch/alpha/kernel/module.c
+--- linux-2.6.38.1/arch/alpha/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
/* The small sections were sorted to the end of the segment.
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
-diff -urNp linux-2.6.37.2/arch/alpha/kernel/osf_sys.c linux-2.6.37.2/arch/alpha/kernel/osf_sys.c
---- linux-2.6.37.2/arch/alpha/kernel/osf_sys.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/kernel/osf_sys.c 2011-01-17 02:41:00.000000000 -0500
-@@ -1165,7 +1165,7 @@ arch_get_unmapped_area_1(unsigned long a
+diff -urNp linux-2.6.38.1/arch/alpha/kernel/osf_sys.c linux-2.6.38.1/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.38.1/arch/alpha/kernel/osf_sys.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/kernel/osf_sys.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1162,7 +1162,7 @@ arch_get_unmapped_area_1(unsigned long a
/* At this point: (!vma || addr < vma->vm_end). */
if (limit - len < addr)
return -ENOMEM;
return addr;
addr = vma->vm_end;
vma = vma->vm_next;
-@@ -1201,6 +1201,10 @@ arch_get_unmapped_area(struct file *filp
+@@ -1198,6 +1198,10 @@ arch_get_unmapped_area(struct file *filp
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != (unsigned long) -ENOMEM)
-@@ -1208,8 +1212,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1205,8 +1209,8 @@ arch_get_unmapped_area(struct file *filp
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
if (addr != (unsigned long) -ENOMEM)
return addr;
-diff -urNp linux-2.6.37.2/arch/alpha/kernel/pci_iommu.c linux-2.6.37.2/arch/alpha/kernel/pci_iommu.c
---- linux-2.6.37.2/arch/alpha/kernel/pci_iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/kernel/pci_iommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/kernel/pci_iommu.c linux-2.6.38.1/arch/alpha/kernel/pci_iommu.c
+--- linux-2.6.38.1/arch/alpha/kernel/pci_iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/kernel/pci_iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -950,7 +950,7 @@ static int alpha_pci_set_mask(struct dev
return 0;
}
-struct dma_map_ops *dma_ops = &alpha_pci_ops;
+const struct dma_map_ops *dma_ops = &alpha_pci_ops;
EXPORT_SYMBOL(dma_ops);
-diff -urNp linux-2.6.37.2/arch/alpha/kernel/pci-noop.c linux-2.6.37.2/arch/alpha/kernel/pci-noop.c
---- linux-2.6.37.2/arch/alpha/kernel/pci-noop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/kernel/pci-noop.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/kernel/pci-noop.c linux-2.6.38.1/arch/alpha/kernel/pci-noop.c
+--- linux-2.6.38.1/arch/alpha/kernel/pci-noop.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/kernel/pci-noop.c 2011-03-21 18:31:35.000000000 -0400
@@ -173,7 +173,7 @@ static int alpha_noop_set_mask(struct de
return 0;
}
EXPORT_SYMBOL(dma_ops);
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
-diff -urNp linux-2.6.37.2/arch/alpha/mm/fault.c linux-2.6.37.2/arch/alpha/mm/fault.c
---- linux-2.6.37.2/arch/alpha/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/alpha/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/alpha/mm/fault.c linux-2.6.38.1/arch/alpha/mm/fault.c
+--- linux-2.6.38.1/arch/alpha/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/alpha/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
__reload_thread(pcb);
}
} else if (!cause) {
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
-diff -urNp linux-2.6.37.2/arch/arm/include/asm/elf.h linux-2.6.37.2/arch/arm/include/asm/elf.h
---- linux-2.6.37.2/arch/arm/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
-@@ -113,7 +113,14 @@ int dump_task_regs(struct task_struct *t
+diff -urNp linux-2.6.38.1/arch/arm/include/asm/elf.h linux-2.6.38.1/arch/arm/include/asm/elf.h
+--- linux-2.6.38.1/arch/arm/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
+@@ -115,7 +115,14 @@ int dump_task_regs(struct task_struct *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. */
/* 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
-@@ -123,10 +130,6 @@ int dump_task_regs(struct task_struct *t
+@@ -125,10 +132,6 @@ int dump_task_regs(struct task_struct *t
extern void elf_set_personality(const struct elf32_hdr *);
#define SET_PERSONALITY(ex) elf_set_personality(&(ex))
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-2.6.37.2/arch/arm/include/asm/kmap_types.h linux-2.6.37.2/arch/arm/include/asm/kmap_types.h
---- linux-2.6.37.2/arch/arm/include/asm/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/include/asm/kmap_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/include/asm/kmap_types.h linux-2.6.38.1/arch/arm/include/asm/kmap_types.h
+--- linux-2.6.38.1/arch/arm/include/asm/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/include/asm/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -21,6 +21,7 @@ enum km_type {
KM_L1_CACHE,
KM_L2_CACHE,
KM_TYPE_NR
};
-diff -urNp linux-2.6.37.2/arch/arm/include/asm/uaccess.h linux-2.6.37.2/arch/arm/include/asm/uaccess.h
---- linux-2.6.37.2/arch/arm/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/include/asm/uaccess.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/include/asm/uaccess.h linux-2.6.38.1/arch/arm/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/arm/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -403,6 +403,9 @@ extern unsigned long __must_check __strn
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
if (access_ok(VERIFY_WRITE, to, n))
n = __copy_to_user(to, from, n);
return n;
-diff -urNp linux-2.6.37.2/arch/arm/kernel/kgdb.c linux-2.6.37.2/arch/arm/kernel/kgdb.c
---- linux-2.6.37.2/arch/arm/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/kernel/kgdb.c linux-2.6.38.1/arch/arm/kernel/kgdb.c
+--- linux-2.6.38.1/arch/arm/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
@@ -246,7 +246,7 @@ void kgdb_arch_exit(void)
* and we handle the normal undef case within the do_undefinstr
* handler.
#ifndef __ARMEB__
.gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
#else /* ! __ARMEB__ */
-diff -urNp linux-2.6.37.2/arch/arm/kernel/process.c linux-2.6.37.2/arch/arm/kernel/process.c
---- linux-2.6.37.2/arch/arm/kernel/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/kernel/process.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/kernel/process.c linux-2.6.38.1/arch/arm/kernel/process.c
+--- linux-2.6.38.1/arch/arm/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
@@ -28,7 +28,6 @@
#include <linux/tick.h>
#include <linux/utsname.h>
- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
-}
-
+ #ifdef CONFIG_MMU
/*
* The vectors page is always readable from user space for the
- * atomic helpers and the signal restart code. Let's declare a mapping
-diff -urNp linux-2.6.37.2/arch/arm/mach-at91/pm.c linux-2.6.37.2/arch/arm/mach-at91/pm.c
---- linux-2.6.37.2/arch/arm/mach-at91/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-at91/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -301,7 +301,7 @@ static void at91_pm_end(void)
- }
-
-
--static struct platform_suspend_ops at91_pm_ops ={
-+static const struct platform_suspend_ops at91_pm_ops ={
- .valid = at91_pm_valid_state,
- .begin = at91_pm_begin,
- .enter = at91_pm_enter,
-diff -urNp linux-2.6.37.2/arch/arm/mach-davinci/pm.c linux-2.6.37.2/arch/arm/mach-davinci/pm.c
---- linux-2.6.37.2/arch/arm/mach-davinci/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-davinci/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -110,7 +110,7 @@ static int davinci_pm_enter(suspend_stat
- return ret;
- }
-
--static struct platform_suspend_ops davinci_pm_ops = {
-+static const struct platform_suspend_ops davinci_pm_ops = {
- .enter = davinci_pm_enter,
- .valid = suspend_valid_only_mem,
- };
-diff -urNp linux-2.6.37.2/arch/arm/mach-imx/pm-imx27.c linux-2.6.37.2/arch/arm/mach-imx/pm-imx27.c
---- linux-2.6.37.2/arch/arm/mach-imx/pm-imx27.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-imx/pm-imx27.c 2011-01-17 02:41:00.000000000 -0500
-@@ -32,7 +32,7 @@ static int mx27_suspend_enter(suspend_st
- return 0;
- }
-
--static struct platform_suspend_ops mx27_suspend_ops = {
-+static const struct platform_suspend_ops mx27_suspend_ops = {
- .enter = mx27_suspend_enter,
- .valid = suspend_valid_only_mem,
- };
-diff -urNp linux-2.6.37.2/arch/arm/mach-lpc32xx/pm.c linux-2.6.37.2/arch/arm/mach-lpc32xx/pm.c
---- linux-2.6.37.2/arch/arm/mach-lpc32xx/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-lpc32xx/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -123,7 +123,7 @@ static int lpc32xx_pm_enter(suspend_stat
- return 0;
- }
-
--static struct platform_suspend_ops lpc32xx_pm_ops = {
-+static const struct platform_suspend_ops lpc32xx_pm_ops = {
- .valid = suspend_valid_only_mem,
- .enter = lpc32xx_pm_enter,
- };
-diff -urNp linux-2.6.37.2/arch/arm/mach-msm/last_radio_log.c linux-2.6.37.2/arch/arm/mach-msm/last_radio_log.c
---- linux-2.6.37.2/arch/arm/mach-msm/last_radio_log.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-msm/last_radio_log.c 2011-01-17 02:41:00.000000000 -0500
-@@ -47,6 +47,7 @@ static ssize_t last_radio_log_read(struc
+diff -urNp linux-2.6.38.1/arch/arm/mach-msm/last_radio_log.c linux-2.6.38.1/arch/arm/mach-msm/last_radio_log.c
+--- linux-2.6.38.1/arch/arm/mach-msm/last_radio_log.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/mach-msm/last_radio_log.c 2011-03-21 18:31:35.000000000 -0400
+@@ -47,7 +47,7 @@ static ssize_t last_radio_log_read(struc
return count;
}
-+/* cannot be const, see msm_init_last_radio_log */
- static struct file_operations last_radio_log_fops = {
+-static struct file_operations last_radio_log_fops = {
++static struct file_operations last_radio_log_fops = { /* cannot be const, see msm_init_last_radio_log */
.read = last_radio_log_read,
.llseek = default_llseek,
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap1/pm.c linux-2.6.37.2/arch/arm/mach-omap1/pm.c
---- linux-2.6.37.2/arch/arm/mach-omap1/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap1/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq
-
-
-
--static struct platform_suspend_ops omap_pm_ops ={
-+static const struct platform_suspend_ops omap_pm_ops ={
- .prepare = omap_pm_prepare,
- .enter = omap_pm_enter,
- .finish = omap_pm_finish,
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap2/mux.c linux-2.6.37.2/arch/arm/mach-omap2/mux.c
---- linux-2.6.37.2/arch/arm/mach-omap2/mux.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap2/mux.c 2011-02-27 15:27:38.000000000 -0500
-@@ -393,7 +393,7 @@ static void __init omap_mux_dbg_init(voi
- list_for_each_entry(e, &muxmodes, node) {
- struct omap_mux *m = &e->mux;
-
-- (void)debugfs_create_file(m->muxnames[0], S_IWUGO, mux_dbg_dir,
-+ (void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir,
- m, &omap_mux_dbg_signal_fops);
- }
- }
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap2/pm24xx.c linux-2.6.37.2/arch/arm/mach-omap2/pm24xx.c
---- linux-2.6.37.2/arch/arm/mach-omap2/pm24xx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap2/pm24xx.c 2011-01-17 02:41:00.000000000 -0500
-@@ -359,7 +359,7 @@ static void omap2_pm_end(void)
- suspend_state = PM_SUSPEND_ON;
- }
-
--static struct platform_suspend_ops omap_pm_ops = {
-+static const struct platform_suspend_ops omap_pm_ops = {
- .begin = omap2_pm_begin,
- .prepare = omap2_pm_prepare,
- .enter = omap2_pm_enter,
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap2/pm34xx.c linux-2.6.37.2/arch/arm/mach-omap2/pm34xx.c
---- linux-2.6.37.2/arch/arm/mach-omap2/pm34xx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap2/pm34xx.c 2011-01-17 02:41:00.000000000 -0500
-@@ -617,7 +617,7 @@ static void omap3_pm_end(void)
- return;
- }
-
--static struct platform_suspend_ops omap_pm_ops = {
-+static const struct platform_suspend_ops omap_pm_ops = {
- .begin = omap3_pm_begin,
- .end = omap3_pm_end,
- .prepare = omap3_pm_prepare,
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap2/pm44xx.c linux-2.6.37.2/arch/arm/mach-omap2/pm44xx.c
---- linux-2.6.37.2/arch/arm/mach-omap2/pm44xx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap2/pm44xx.c 2011-01-17 02:41:00.000000000 -0500
-@@ -75,7 +75,7 @@ static void omap4_pm_end(void)
- return;
- }
-
--static struct platform_suspend_ops omap_pm_ops = {
-+static const struct platform_suspend_ops omap_pm_ops = {
- .begin = omap4_pm_begin,
- .end = omap4_pm_end,
- .prepare = omap4_pm_prepare,
-diff -urNp linux-2.6.37.2/arch/arm/mach-omap2/pm-debug.c linux-2.6.37.2/arch/arm/mach-omap2/pm-debug.c
---- linux-2.6.37.2/arch/arm/mach-omap2/pm-debug.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-omap2/pm-debug.c 2011-02-27 15:28:01.000000000 -0500
-@@ -632,14 +632,14 @@ static int __init pm_dbg_init(void)
-
- }
-
-- (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d,
-+ (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
- &enable_off_mode, &pm_dbg_option_fops);
-- (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d,
-+ (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
- &sleep_while_idle, &pm_dbg_option_fops);
-- (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUGO, d,
-+ (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
- &wakeup_timer_seconds, &pm_dbg_option_fops);
- (void) debugfs_create_file("wakeup_timer_milliseconds",
-- S_IRUGO | S_IWUGO, d, &wakeup_timer_milliseconds,
-+ S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
- &pm_dbg_option_fops);
- pm_dbg_init_done = 1;
-
-diff -urNp linux-2.6.37.2/arch/arm/mach-pnx4008/pm.c linux-2.6.37.2/arch/arm/mach-pnx4008/pm.c
---- linux-2.6.37.2/arch/arm/mach-pnx4008/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-pnx4008/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -119,7 +119,7 @@ static int pnx4008_pm_valid(suspend_stat
- (state == PM_SUSPEND_MEM);
- }
-
--static struct platform_suspend_ops pnx4008_pm_ops = {
-+static const struct platform_suspend_ops pnx4008_pm_ops = {
- .enter = pnx4008_pm_enter,
- .valid = pnx4008_pm_valid,
- };
-diff -urNp linux-2.6.37.2/arch/arm/mach-pxa/pm.c linux-2.6.37.2/arch/arm/mach-pxa/pm.c
---- linux-2.6.37.2/arch/arm/mach-pxa/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-pxa/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -96,7 +96,7 @@ void pxa_pm_finish(void)
- pxa_cpu_pm_fns->finish();
- }
-
--static struct platform_suspend_ops pxa_pm_ops = {
-+static const struct platform_suspend_ops pxa_pm_ops = {
- .valid = pxa_pm_valid,
- .enter = pxa_pm_enter,
- .prepare = pxa_pm_prepare,
-diff -urNp linux-2.6.37.2/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.37.2/arch/arm/mach-pxa/sharpsl_pm.c
---- linux-2.6.37.2/arch/arm/mach-pxa/sharpsl_pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-pxa/sharpsl_pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -868,7 +868,7 @@ static void sharpsl_apm_get_power_status
- }
-
- #ifdef CONFIG_PM
--static struct platform_suspend_ops sharpsl_pm_ops = {
-+static const struct platform_suspend_ops sharpsl_pm_ops = {
- .prepare = pxa_pm_prepare,
- .finish = pxa_pm_finish,
- .enter = corgi_pxa_pm_enter,
-diff -urNp linux-2.6.37.2/arch/arm/mach-sa1100/pm.c linux-2.6.37.2/arch/arm/mach-sa1100/pm.c
---- linux-2.6.37.2/arch/arm/mach-sa1100/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-sa1100/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp)
- return virt_to_phys(sp);
- }
-
--static struct platform_suspend_ops sa11x0_pm_ops = {
-+static const struct platform_suspend_ops sa11x0_pm_ops = {
- .enter = sa11x0_pm_enter,
- .valid = suspend_valid_only_mem,
- };
-diff -urNp linux-2.6.37.2/arch/arm/mach-ux500/mbox.c linux-2.6.37.2/arch/arm/mach-ux500/mbox.c
---- linux-2.6.37.2/arch/arm/mach-ux500/mbox.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mach-ux500/mbox.c 2011-02-27 15:26:39.000000000 -0500
+ };
+diff -urNp linux-2.6.38.1/arch/arm/mach-ux500/mbox-db5500.c linux-2.6.38.1/arch/arm/mach-ux500/mbox-db5500.c
+--- linux-2.6.38.1/arch/arm/mach-ux500/mbox-db5500.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/mach-ux500/mbox-db5500.c 2011-03-21 18:31:35.000000000 -0400
@@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct dev
return sprintf(buf, "0x%X\n", mbox_value);
}
static int mbox_show(struct seq_file *s, void *data)
{
-diff -urNp linux-2.6.37.2/arch/arm/mm/fault.c linux-2.6.37.2/arch/arm/mm/fault.c
---- linux-2.6.37.2/arch/arm/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/mm/fault.c linux-2.6.38.1/arch/arm/mm/fault.c
+--- linux-2.6.38.1/arch/arm/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -167,6 +167,13 @@ __do_user_fault(struct task_struct *tsk,
}
#endif
/*
* First Level Translation Fault Handler
*
-diff -urNp linux-2.6.37.2/arch/arm/mm/mmap.c linux-2.6.37.2/arch/arm/mm/mmap.c
---- linux-2.6.37.2/arch/arm/mm/mmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/mm/mmap.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/arm/mm/mmap.c linux-2.6.38.1/arch/arm/mm/mmap.c
+--- linux-2.6.38.1/arch/arm/mm/mmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/arm/mm/mmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -64,6 +64,10 @@ arch_get_unmapped_area(struct file *filp
if (len > TASK_SIZE)
return -ENOMEM;
/*
* Remember the place where we stopped the search:
*/
-diff -urNp linux-2.6.37.2/arch/arm/plat-samsung/pm.c linux-2.6.37.2/arch/arm/plat-samsung/pm.c
---- linux-2.6.37.2/arch/arm/plat-samsung/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/arm/plat-samsung/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -355,7 +355,7 @@ static void s3c_pm_finish(void)
- s3c_pm_check_cleanup();
- }
-
--static struct platform_suspend_ops s3c_pm_ops = {
-+static const struct platform_suspend_ops s3c_pm_ops = {
- .enter = s3c_pm_enter,
- .prepare = s3c_pm_prepare,
- .finish = s3c_pm_finish,
-diff -urNp linux-2.6.37.2/arch/avr32/include/asm/elf.h linux-2.6.37.2/arch/avr32/include/asm/elf.h
---- linux-2.6.37.2/arch/avr32/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/avr32/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/avr32/include/asm/elf.h linux-2.6.38.1/arch/avr32/include/asm/elf.h
+--- linux-2.6.38.1/arch/avr32/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/avr32/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpreg
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. */
/* 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.37.2/arch/avr32/include/asm/kmap_types.h linux-2.6.37.2/arch/avr32/include/asm/kmap_types.h
---- linux-2.6.37.2/arch/avr32/include/asm/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/avr32/include/asm/kmap_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/avr32/include/asm/kmap_types.h linux-2.6.38.1/arch/avr32/include/asm/kmap_types.h
+--- linux-2.6.38.1/arch/avr32/include/asm/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/avr32/include/asm/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -22,7 +22,8 @@ D(10) KM_IRQ0,
D(11) KM_IRQ1,
D(12) KM_SOFTIRQ0,
};
#undef D
-diff -urNp linux-2.6.37.2/arch/avr32/mach-at32ap/pm.c linux-2.6.37.2/arch/avr32/mach-at32ap/pm.c
---- linux-2.6.37.2/arch/avr32/mach-at32ap/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/avr32/mach-at32ap/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -176,7 +176,7 @@ out:
- return 0;
- }
-
--static struct platform_suspend_ops avr32_pm_ops = {
-+static const struct platform_suspend_ops avr32_pm_ops = {
- .valid = avr32_pm_valid_state,
- .enter = avr32_pm_enter,
- };
-diff -urNp linux-2.6.37.2/arch/avr32/mm/fault.c linux-2.6.37.2/arch/avr32/mm/fault.c
---- linux-2.6.37.2/arch/avr32/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/avr32/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/avr32/mm/fault.c linux-2.6.38.1/arch/avr32/mm/fault.c
+--- linux-2.6.38.1/arch/avr32/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/avr32/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
int exception_trace = 1;
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
-diff -urNp linux-2.6.37.2/arch/blackfin/kernel/kgdb.c linux-2.6.37.2/arch/blackfin/kernel/kgdb.c
---- linux-2.6.37.2/arch/blackfin/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/blackfin/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
-@@ -397,7 +397,7 @@ int kgdb_arch_handle_exception(int vecto
+diff -urNp linux-2.6.38.1/arch/blackfin/kernel/kgdb.c linux-2.6.38.1/arch/blackfin/kernel/kgdb.c
+--- linux-2.6.38.1/arch/blackfin/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/blackfin/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
+@@ -420,7 +420,7 @@ int kgdb_arch_handle_exception(int vecto
return -1; /* this means that we do not want to exit from the handler */
}
.gdb_bpt_instr = {0xa1},
#ifdef CONFIG_SMP
.flags = KGDB_HW_BREAKPOINT|KGDB_THR_PROC_SWAP,
-diff -urNp linux-2.6.37.2/arch/blackfin/mach-common/pm.c linux-2.6.37.2/arch/blackfin/mach-common/pm.c
---- linux-2.6.37.2/arch/blackfin/mach-common/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/blackfin/mach-common/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -233,7 +233,7 @@ static int bfin_pm_enter(suspend_state_t
- return 0;
- }
-
--struct platform_suspend_ops bfin_pm_ops = {
-+const struct platform_suspend_ops bfin_pm_ops = {
- .enter = bfin_pm_enter,
- .valid = bfin_pm_valid,
- };
-diff -urNp linux-2.6.37.2/arch/blackfin/mm/maccess.c linux-2.6.37.2/arch/blackfin/mm/maccess.c
---- linux-2.6.37.2/arch/blackfin/mm/maccess.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/blackfin/mm/maccess.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/blackfin/mm/maccess.c linux-2.6.38.1/arch/blackfin/mm/maccess.c
+--- linux-2.6.38.1/arch/blackfin/mm/maccess.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/blackfin/mm/maccess.c 2011-03-21 18:31:35.000000000 -0400
@@ -16,7 +16,7 @@ static int validate_memory_access_addres
return bfin_mem_access_type(addr, size);
}
{
unsigned long ldst = (unsigned long)dst;
int mem_type;
-diff -urNp linux-2.6.37.2/arch/frv/include/asm/kmap_types.h linux-2.6.37.2/arch/frv/include/asm/kmap_types.h
---- linux-2.6.37.2/arch/frv/include/asm/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/frv/include/asm/kmap_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/frv/include/asm/kmap_types.h linux-2.6.38.1/arch/frv/include/asm/kmap_types.h
+--- linux-2.6.38.1/arch/frv/include/asm/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/frv/include/asm/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
KM_TYPE_NR
};
-diff -urNp linux-2.6.37.2/arch/frv/mm/elf-fdpic.c linux-2.6.37.2/arch/frv/mm/elf-fdpic.c
---- linux-2.6.37.2/arch/frv/mm/elf-fdpic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/frv/mm/elf-fdpic.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/frv/mm/elf-fdpic.c linux-2.6.38.1/arch/frv/mm/elf-fdpic.c
+--- linux-2.6.38.1/arch/frv/mm/elf-fdpic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/frv/mm/elf-fdpic.c 2011-03-21 18:31:35.000000000 -0400
@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str
if (addr) {
addr = PAGE_ALIGN(addr);
goto success;
addr = vma->vm_end;
}
-diff -urNp linux-2.6.37.2/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.37.2/arch/ia64/hp/common/hwsw_iommu.c
---- linux-2.6.37.2/arch/ia64/hp/common/hwsw_iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/hp/common/hwsw_iommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.38.1/arch/ia64/hp/common/hwsw_iommu.c
+--- linux-2.6.38.1/arch/ia64/hp/common/hwsw_iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/hp/common/hwsw_iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -17,7 +17,7 @@
#include <linux/swiotlb.h>
#include <asm/machvec.h>
{
if (use_swiotlb(dev))
return &swiotlb_dma_ops;
-diff -urNp linux-2.6.37.2/arch/ia64/hp/common/sba_iommu.c linux-2.6.37.2/arch/ia64/hp/common/sba_iommu.c
---- linux-2.6.37.2/arch/ia64/hp/common/sba_iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/hp/common/sba_iommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/hp/common/sba_iommu.c linux-2.6.38.1/arch/ia64/hp/common/sba_iommu.c
+--- linux-2.6.38.1/arch/ia64/hp/common/sba_iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/hp/common/sba_iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_d
},
};
.alloc_coherent = sba_alloc_coherent,
.free_coherent = sba_free_coherent,
.map_page = sba_map_page,
-diff -urNp linux-2.6.37.2/arch/ia64/include/asm/dma-mapping.h linux-2.6.37.2/arch/ia64/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/ia64/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/dma-mapping.h linux-2.6.38.1/arch/ia64/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/ia64/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,7 +12,7 @@
#define ARCH_HAS_DMA_GET_REQUIRED_MASK
return ops->dma_supported(dev, mask);
}
-diff -urNp linux-2.6.37.2/arch/ia64/include/asm/elf.h linux-2.6.37.2/arch/ia64/include/asm/elf.h
---- linux-2.6.37.2/arch/ia64/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/elf.h linux-2.6.38.1/arch/ia64/include/asm/elf.h
+--- linux-2.6.38.1/arch/ia64/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -42,6 +42,13 @@
*/
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL)
#define PT_IA_64_UNWIND 0x70000001
/* IA-64 relocations: */
-diff -urNp linux-2.6.37.2/arch/ia64/include/asm/machvec.h linux-2.6.37.2/arch/ia64/include/asm/machvec.h
---- linux-2.6.37.2/arch/ia64/include/asm/machvec.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/machvec.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/machvec.h linux-2.6.38.1/arch/ia64/include/asm/machvec.h
+--- linux-2.6.38.1/arch/ia64/include/asm/machvec.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/machvec.h 2011-03-21 18:31:35.000000000 -0400
@@ -45,7 +45,7 @@ typedef void ia64_mv_kernel_launch_event
/* DMA-mapping interface: */
typedef void ia64_mv_dma_init (void);
/*
* Define default versions so we can extend machvec for new platforms without having
-diff -urNp linux-2.6.37.2/arch/ia64/include/asm/pgtable.h linux-2.6.37.2/arch/ia64/include/asm/pgtable.h
---- linux-2.6.37.2/arch/ia64/include/asm/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/pgtable.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/pgtable.h linux-2.6.38.1/arch/ia64/include/asm/pgtable.h
+--- linux-2.6.38.1/arch/ia64/include/asm/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/pgtable.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,7 +12,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
#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.37.2/arch/ia64/include/asm/spinlock.h linux-2.6.37.2/arch/ia64/include/asm/spinlock.h
---- linux-2.6.37.2/arch/ia64/include/asm/spinlock.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/spinlock.h 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/spinlock.h linux-2.6.38.1/arch/ia64/include/asm/spinlock.h
+--- linux-2.6.38.1/arch/ia64/include/asm/spinlock.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/spinlock.h 2011-03-21 18:31:35.000000000 -0400
@@ -72,7 +72,7 @@ static __always_inline void __ticket_spi
unsigned short *p = (unsigned short *)&lock->lock + 1, tmp;
}
static __always_inline void __ticket_spin_unlock_wait(arch_spinlock_t *lock)
-diff -urNp linux-2.6.37.2/arch/ia64/include/asm/uaccess.h linux-2.6.37.2/arch/ia64/include/asm/uaccess.h
---- linux-2.6.37.2/arch/ia64/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/include/asm/uaccess.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/include/asm/uaccess.h linux-2.6.38.1/arch/ia64/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/ia64/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _
const void *__cu_from = (from); \
long __cu_len = (n); \
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
__cu_len; \
})
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/dma-mapping.c linux-2.6.37.2/arch/ia64/kernel/dma-mapping.c
---- linux-2.6.37.2/arch/ia64/kernel/dma-mapping.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/dma-mapping.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/dma-mapping.c linux-2.6.38.1/arch/ia64/kernel/dma-mapping.c
+--- linux-2.6.38.1/arch/ia64/kernel/dma-mapping.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/dma-mapping.c 2011-03-21 18:31:35.000000000 -0400
@@ -3,7 +3,7 @@
/* Set this to 1 if there is a HW IOMMU in the system */
int iommu_detected __read_mostly;
{
return dma_ops;
}
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/module.c linux-2.6.37.2/arch/ia64/kernel/module.c
---- linux-2.6.37.2/arch/ia64/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/module.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/module.c linux-2.6.38.1/arch/ia64/kernel/module.c
+--- linux-2.6.38.1/arch/ia64/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
@@ -315,8 +315,7 @@ module_alloc (unsigned long size)
void
module_free (struct module *mod, void *module_region)
mod->arch.gp = gp;
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/pci-dma.c linux-2.6.37.2/arch/ia64/kernel/pci-dma.c
---- linux-2.6.37.2/arch/ia64/kernel/pci-dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/pci-dma.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/pci-dma.c linux-2.6.38.1/arch/ia64/kernel/pci-dma.c
+--- linux-2.6.38.1/arch/ia64/kernel/pci-dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/pci-dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ struct device fallback_dev = {
.dma_mask = &fallback_dev.coherent_dma_mask,
};
static int __init pci_iommu_init(void)
{
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/pci-swiotlb.c linux-2.6.37.2/arch/ia64/kernel/pci-swiotlb.c
---- linux-2.6.37.2/arch/ia64/kernel/pci-swiotlb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/pci-swiotlb.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/pci-swiotlb.c linux-2.6.38.1/arch/ia64/kernel/pci-swiotlb.c
+--- linux-2.6.38.1/arch/ia64/kernel/pci-swiotlb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/pci-swiotlb.c 2011-03-21 18:31:35.000000000 -0400
@@ -22,7 +22,7 @@ static void *ia64_swiotlb_alloc_coherent
return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
}
.alloc_coherent = ia64_swiotlb_alloc_coherent,
.free_coherent = swiotlb_free_coherent,
.map_page = swiotlb_map_page,
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/sys_ia64.c linux-2.6.37.2/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.37.2/arch/ia64/kernel/sys_ia64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/sys_ia64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/sys_ia64.c linux-2.6.38.1/arch/ia64/kernel/sys_ia64.c
+--- linux-2.6.38.1/arch/ia64/kernel/sys_ia64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/sys_ia64.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
/* Remember the address where we stopped this search: */
mm->free_area_cache = addr + len;
return addr;
-diff -urNp linux-2.6.37.2/arch/ia64/kernel/vmlinux.lds.S linux-2.6.37.2/arch/ia64/kernel/vmlinux.lds.S
---- linux-2.6.37.2/arch/ia64/kernel/vmlinux.lds.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/kernel/vmlinux.lds.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/kernel/vmlinux.lds.S linux-2.6.38.1/arch/ia64/kernel/vmlinux.lds.S
+--- linux-2.6.38.1/arch/ia64/kernel/vmlinux.lds.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/kernel/vmlinux.lds.S 2011-03-21 18:31:35.000000000 -0400
@@ -199,7 +199,7 @@ SECTIONS {
/* Per-cpu data: */
. = ALIGN(PERCPU_PAGE_SIZE);
/*
* ensure percpu data fits
* into percpu page size
-diff -urNp linux-2.6.37.2/arch/ia64/mm/fault.c linux-2.6.37.2/arch/ia64/mm/fault.c
---- linux-2.6.37.2/arch/ia64/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/mm/fault.c linux-2.6.38.1/arch/ia64/mm/fault.c
+--- linux-2.6.38.1/arch/ia64/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned
return pte_present(pte);
}
/*
* 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-2.6.37.2/arch/ia64/mm/hugetlbpage.c linux-2.6.37.2/arch/ia64/mm/hugetlbpage.c
---- linux-2.6.37.2/arch/ia64/mm/hugetlbpage.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/mm/hugetlbpage.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/mm/hugetlbpage.c linux-2.6.38.1/arch/ia64/mm/hugetlbpage.c
+--- linux-2.6.38.1/arch/ia64/mm/hugetlbpage.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/mm/hugetlbpage.c 2011-03-21 18:31:35.000000000 -0400
@@ -171,7 +171,7 @@ unsigned long hugetlb_get_unmapped_area(
/* At this point: (!vmm || addr < vmm->vm_end). */
if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
return addr;
addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
}
-diff -urNp linux-2.6.37.2/arch/ia64/mm/init.c linux-2.6.37.2/arch/ia64/mm/init.c
---- linux-2.6.37.2/arch/ia64/mm/init.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/mm/init.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/mm/init.c linux-2.6.38.1/arch/ia64/mm/init.c
+--- linux-2.6.38.1/arch/ia64/mm/init.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/mm/init.c 2011-03-21 18:31:35.000000000 -0400
@@ -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;
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(¤t->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
-diff -urNp linux-2.6.37.2/arch/ia64/sn/pci/pci_dma.c linux-2.6.37.2/arch/ia64/sn/pci/pci_dma.c
---- linux-2.6.37.2/arch/ia64/sn/pci/pci_dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/ia64/sn/pci/pci_dma.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/ia64/sn/pci/pci_dma.c linux-2.6.38.1/arch/ia64/sn/pci/pci_dma.c
+--- linux-2.6.38.1/arch/ia64/sn/pci/pci_dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/ia64/sn/pci/pci_dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -465,7 +465,7 @@ int sn_pci_legacy_write(struct pci_bus *
return ret;
}
.alloc_coherent = sn_dma_alloc_coherent,
.free_coherent = sn_dma_free_coherent,
.map_page = sn_dma_map_page,
-diff -urNp linux-2.6.37.2/arch/m32r/lib/usercopy.c linux-2.6.37.2/arch/m32r/lib/usercopy.c
---- linux-2.6.37.2/arch/m32r/lib/usercopy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/m32r/lib/usercopy.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/m32r/lib/usercopy.c linux-2.6.38.1/arch/m32r/lib/usercopy.c
+--- linux-2.6.38.1/arch/m32r/lib/usercopy.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/m32r/lib/usercopy.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,9 @@
unsigned long
__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
-diff -urNp linux-2.6.37.2/arch/microblaze/include/asm/device.h linux-2.6.37.2/arch/microblaze/include/asm/device.h
---- linux-2.6.37.2/arch/microblaze/include/asm/device.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/include/asm/device.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/include/asm/device.h linux-2.6.38.1/arch/microblaze/include/asm/device.h
+--- linux-2.6.38.1/arch/microblaze/include/asm/device.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/include/asm/device.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,7 +13,7 @@ struct device_node;
struct dev_archdata {
void *dma_data;
};
-diff -urNp linux-2.6.37.2/arch/microblaze/include/asm/dma-mapping.h linux-2.6.37.2/arch/microblaze/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/microblaze/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/include/asm/dma-mapping.h linux-2.6.38.1/arch/microblaze/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/microblaze/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -43,14 +43,14 @@ static inline unsigned long device_to_ma
return 0xfffffffful;
}
BUG_ON(!ops);
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
-diff -urNp linux-2.6.37.2/arch/microblaze/include/asm/pci.h linux-2.6.37.2/arch/microblaze/include/asm/pci.h
---- linux-2.6.37.2/arch/microblaze/include/asm/pci.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/include/asm/pci.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/include/asm/pci.h linux-2.6.38.1/arch/microblaze/include/asm/pci.h
+--- linux-2.6.38.1/arch/microblaze/include/asm/pci.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/include/asm/pci.h 2011-03-21 18:31:35.000000000 -0400
@@ -54,8 +54,8 @@ static inline void pcibios_penalize_isa_
}
#else /* CONFIG_PCI */
#define set_pci_dma_ops(d)
#define get_pci_dma_ops() NULL
-diff -urNp linux-2.6.37.2/arch/microblaze/kernel/dma.c linux-2.6.37.2/arch/microblaze/kernel/dma.c
---- linux-2.6.37.2/arch/microblaze/kernel/dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/kernel/dma.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/kernel/dma.c linux-2.6.38.1/arch/microblaze/kernel/dma.c
+--- linux-2.6.38.1/arch/microblaze/kernel/dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/kernel/dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -133,7 +133,7 @@ static inline void dma_direct_unmap_page
__dma_sync_page(dma_address, 0 , size, direction);
}
.alloc_coherent = dma_direct_alloc_coherent,
.free_coherent = dma_direct_free_coherent,
.map_sg = dma_direct_map_sg,
-diff -urNp linux-2.6.37.2/arch/microblaze/kernel/kgdb.c linux-2.6.37.2/arch/microblaze/kernel/kgdb.c
---- linux-2.6.37.2/arch/microblaze/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/kernel/kgdb.c linux-2.6.38.1/arch/microblaze/kernel/kgdb.c
+--- linux-2.6.38.1/arch/microblaze/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
@@ -141,10 +141,11 @@ void kgdb_arch_exit(void)
/*
* Global data
.gdb_bpt_instr = {0xba, 0x0c, 0x00, 0x18}, /* brki r16, 0x18 */
#endif
};
-diff -urNp linux-2.6.37.2/arch/microblaze/pci/pci-common.c linux-2.6.37.2/arch/microblaze/pci/pci-common.c
---- linux-2.6.37.2/arch/microblaze/pci/pci-common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/microblaze/pci/pci-common.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/microblaze/pci/pci-common.c linux-2.6.38.1/arch/microblaze/pci/pci-common.c
+--- linux-2.6.38.1/arch/microblaze/pci/pci-common.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/microblaze/pci/pci-common.c 2011-03-21 18:31:35.000000000 -0400
@@ -47,14 +47,14 @@ resource_size_t isa_mem_base;
/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
unsigned int pci_flags;
{
return pci_dma_ops;
}
-diff -urNp linux-2.6.37.2/arch/mips/alchemy/devboards/pm.c linux-2.6.37.2/arch/mips/alchemy/devboards/pm.c
---- linux-2.6.37.2/arch/mips/alchemy/devboards/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/alchemy/devboards/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -110,7 +110,7 @@ static void db1x_pm_end(void)
-
- }
-
--static struct platform_suspend_ops db1x_pm_ops = {
-+static const struct platform_suspend_ops db1x_pm_ops = {
- .valid = suspend_valid_only_mem,
- .begin = db1x_pm_begin,
- .enter = db1x_pm_enter,
-diff -urNp linux-2.6.37.2/arch/mips/cavium-octeon/dma-octeon.c linux-2.6.37.2/arch/mips/cavium-octeon/dma-octeon.c
---- linux-2.6.37.2/arch/mips/cavium-octeon/dma-octeon.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/cavium-octeon/dma-octeon.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/cavium-octeon/dma-octeon.c linux-2.6.38.1/arch/mips/cavium-octeon/dma-octeon.c
+--- linux-2.6.38.1/arch/mips/cavium-octeon/dma-octeon.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/cavium-octeon/dma-octeon.c 2011-03-21 18:31:35.000000000 -0400
@@ -202,7 +202,7 @@ static phys_addr_t octeon_unity_dma_to_p
}
void __init octeon_pci_dma_init(void)
{
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/device.h linux-2.6.37.2/arch/mips/include/asm/device.h
---- linux-2.6.37.2/arch/mips/include/asm/device.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/device.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/device.h linux-2.6.38.1/arch/mips/include/asm/device.h
+--- linux-2.6.38.1/arch/mips/include/asm/device.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/device.h 2011-03-21 18:31:35.000000000 -0400
@@ -10,7 +10,7 @@ struct dma_map_ops;
struct dev_archdata {
};
struct pdev_archdata {
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/dma-mapping.h linux-2.6.37.2/arch/mips/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/mips/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/dma-mapping.h linux-2.6.38.1/arch/mips/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/mips/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -7,9 +7,9 @@
#include <dma-coherence.h>
ops->free_coherent(dev, size, vaddr, dma_handle);
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/elf.h linux-2.6.37.2/arch/mips/include/asm/elf.h
---- linux-2.6.37.2/arch/mips/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/elf.h linux-2.6.38.1/arch/mips/include/asm/elf.h
+--- linux-2.6.38.1/arch/mips/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -372,13 +372,16 @@ extern const char *__elf_platform;
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_ELF_H */
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h linux-2.6.37.2/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
---- linux-2.6.37.2/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h linux-2.6.38.1/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
+--- linux-2.6.38.1/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h 2011-03-21 18:31:35.000000000 -0400
@@ -66,7 +66,7 @@ dma_addr_t phys_to_dma(struct device *de
phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
extern char *octeon_swiotlb;
#endif /* __ASM_MACH_CAVIUM_OCTEON_DMA_COHERENCE_H */
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/page.h linux-2.6.37.2/arch/mips/include/asm/page.h
---- linux-2.6.37.2/arch/mips/include/asm/page.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/page.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/page.h linux-2.6.38.1/arch/mips/include/asm/page.h
+--- linux-2.6.38.1/arch/mips/include/asm/page.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/page.h 2011-03-21 18:31:35.000000000 -0400
@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct pa
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
-diff -urNp linux-2.6.37.2/arch/mips/include/asm/system.h linux-2.6.37.2/arch/mips/include/asm/system.h
---- linux-2.6.37.2/arch/mips/include/asm/system.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/include/asm/system.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/include/asm/system.h linux-2.6.38.1/arch/mips/include/asm/system.h
+--- linux-2.6.38.1/arch/mips/include/asm/system.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/include/asm/system.h 2011-03-21 18:31:35.000000000 -0400
@@ -23,6 +23,7 @@
#include <asm/dsp.h>
#include <asm/watch.h>
+#define arch_align_stack(x) ((x) & ALMASK)
#endif /* _ASM_SYSTEM_H */
-diff -urNp linux-2.6.37.2/arch/mips/jz4740/pm.c linux-2.6.37.2/arch/mips/jz4740/pm.c
---- linux-2.6.37.2/arch/mips/jz4740/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/jz4740/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -42,7 +42,7 @@ static int jz4740_pm_enter(suspend_state
- return 0;
- }
-
--static struct platform_suspend_ops jz4740_pm_ops = {
-+static const struct platform_suspend_ops jz4740_pm_ops = {
- .valid = suspend_valid_only_mem,
- .enter = jz4740_pm_enter,
- };
-diff -urNp linux-2.6.37.2/arch/mips/kernel/binfmt_elfn32.c linux-2.6.37.2/arch/mips/kernel/binfmt_elfn32.c
---- linux-2.6.37.2/arch/mips/kernel/binfmt_elfn32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/kernel/binfmt_elfn32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/kernel/binfmt_elfn32.c linux-2.6.38.1/arch/mips/kernel/binfmt_elfn32.c
+--- linux-2.6.38.1/arch/mips/kernel/binfmt_elfn32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/kernel/binfmt_elfn32.c 2011-03-21 18:31:35.000000000 -0400
@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
#include <asm/processor.h>
#include <linux/module.h>
#include <linux/elfcore.h>
-diff -urNp linux-2.6.37.2/arch/mips/kernel/binfmt_elfo32.c linux-2.6.37.2/arch/mips/kernel/binfmt_elfo32.c
---- linux-2.6.37.2/arch/mips/kernel/binfmt_elfo32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/kernel/binfmt_elfo32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/kernel/binfmt_elfo32.c linux-2.6.38.1/arch/mips/kernel/binfmt_elfo32.c
+--- linux-2.6.38.1/arch/mips/kernel/binfmt_elfo32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/kernel/binfmt_elfo32.c 2011-03-21 18:31:35.000000000 -0400
@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
#include <asm/processor.h>
/*
-diff -urNp linux-2.6.37.2/arch/mips/kernel/kgdb.c linux-2.6.37.2/arch/mips/kernel/kgdb.c
---- linux-2.6.37.2/arch/mips/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
-@@ -351,6 +351,7 @@ int kgdb_arch_handle_exception(int vecto
+diff -urNp linux-2.6.38.1/arch/mips/kernel/kgdb.c linux-2.6.38.1/arch/mips/kernel/kgdb.c
+--- linux-2.6.38.1/arch/mips/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
+@@ -351,7 +351,7 @@ int kgdb_arch_handle_exception(int vecto
return -1;
}
-+/* cannot be const, see kgdb_arch_init */
- struct kgdb_arch arch_kgdb_ops;
+-struct kgdb_arch arch_kgdb_ops;
++struct kgdb_arch arch_kgdb_ops; /* cannot be const, see kgdb_arch_init */
/*
-diff -urNp linux-2.6.37.2/arch/mips/kernel/process.c linux-2.6.37.2/arch/mips/kernel/process.c
---- linux-2.6.37.2/arch/mips/kernel/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/kernel/process.c 2011-01-17 02:41:00.000000000 -0500
+ * We use kgdb_early_setup so that functions we need to call now don't
+diff -urNp linux-2.6.38.1/arch/mips/kernel/process.c linux-2.6.38.1/arch/mips/kernel/process.c
+--- linux-2.6.38.1/arch/mips/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
@@ -473,15 +473,3 @@ unsigned long get_wchan(struct task_stru
out:
return pc;
-
- return sp & ALMASK;
-}
-diff -urNp linux-2.6.37.2/arch/mips/kernel/syscall.c linux-2.6.37.2/arch/mips/kernel/syscall.c
---- linux-2.6.37.2/arch/mips/kernel/syscall.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/kernel/syscall.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/kernel/syscall.c linux-2.6.38.1/arch/mips/kernel/syscall.c
+--- linux-2.6.38.1/arch/mips/kernel/syscall.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/kernel/syscall.c 2011-03-21 18:31:35.000000000 -0400
@@ -108,14 +108,18 @@ unsigned long arch_get_unmapped_area(str
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long,
fd, off_t, offset)
-diff -urNp linux-2.6.37.2/arch/mips/loongson/common/pm.c linux-2.6.37.2/arch/mips/loongson/common/pm.c
---- linux-2.6.37.2/arch/mips/loongson/common/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/loongson/common/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -147,7 +147,7 @@ static int loongson_pm_valid_state(suspe
- }
- }
-
--static struct platform_suspend_ops loongson_pm_ops = {
-+static const struct platform_suspend_ops loongson_pm_ops = {
- .valid = loongson_pm_valid_state,
- .enter = loongson_pm_enter,
- };
-diff -urNp linux-2.6.37.2/arch/mips/mm/dma-default.c linux-2.6.37.2/arch/mips/mm/dma-default.c
---- linux-2.6.37.2/arch/mips/mm/dma-default.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/mm/dma-default.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/mm/dma-default.c linux-2.6.38.1/arch/mips/mm/dma-default.c
+--- linux-2.6.38.1/arch/mips/mm/dma-default.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/mm/dma-default.c 2011-03-21 18:31:35.000000000 -0400
@@ -300,7 +300,7 @@ void dma_cache_sync(struct device *dev,
EXPORT_SYMBOL(dma_cache_sync);
EXPORT_SYMBOL(mips_dma_map_ops);
#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
-diff -urNp linux-2.6.37.2/arch/mips/mm/fault.c linux-2.6.37.2/arch/mips/mm/fault.c
---- linux-2.6.37.2/arch/mips/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/mips/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/mips/mm/fault.c linux-2.6.38.1/arch/mips/mm/fault.c
+--- linux-2.6.38.1/arch/mips/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/mips/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -28,6 +28,23 @@
#include <asm/highmem.h> /* For VMALLOC_END */
#include <linux/kdebug.h>
/*
* 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.37.2/arch/parisc/include/asm/elf.h linux-2.6.37.2/arch/parisc/include/asm/elf.h
---- linux-2.6.37.2/arch/parisc/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/parisc/include/asm/elf.h linux-2.6.38.1/arch/parisc/include/asm/elf.h
+--- linux-2.6.38.1/arch/parisc/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -342,6 +342,13 @@ struct pt_regs; /* forward declaration..
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
/* 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.37.2/arch/parisc/include/asm/pgtable.h linux-2.6.37.2/arch/parisc/include/asm/pgtable.h
---- linux-2.6.37.2/arch/parisc/include/asm/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/include/asm/pgtable.h 2011-01-17 02:41:00.000000000 -0500
-@@ -207,6 +207,17 @@
+diff -urNp linux-2.6.38.1/arch/parisc/include/asm/pgtable.h linux-2.6.38.1/arch/parisc/include/asm/pgtable.h
+--- linux-2.6.38.1/arch/parisc/include/asm/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/include/asm/pgtable.h 2011-03-21 18:31:35.000000000 -0400
+@@ -209,6 +209,17 @@ struct vm_area_struct;
#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
#define PAGE_COPY PAGE_EXECREAD
#define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED)
#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.37.2/arch/parisc/kernel/module.c linux-2.6.37.2/arch/parisc/kernel/module.c
---- linux-2.6.37.2/arch/parisc/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/kernel/module.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/parisc/kernel/module.c linux-2.6.38.1/arch/parisc/kernel/module.c
+--- linux-2.6.38.1/arch/parisc/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
@@ -96,16 +96,38 @@
/* three functions to determine where in the module core
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.37.2/arch/parisc/kernel/sys_parisc.c linux-2.6.37.2/arch/parisc/kernel/sys_parisc.c
---- linux-2.6.37.2/arch/parisc/kernel/sys_parisc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/kernel/sys_parisc.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/parisc/kernel/sys_parisc.c linux-2.6.38.1/arch/parisc/kernel/sys_parisc.c
+--- linux-2.6.38.1/arch/parisc/kernel/sys_parisc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/kernel/sys_parisc.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(u
/* At this point: (!vma || addr < vma->vm_end). */
if (TASK_SIZE - len < addr)
if (filp) {
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
-diff -urNp linux-2.6.37.2/arch/parisc/kernel/traps.c linux-2.6.37.2/arch/parisc/kernel/traps.c
---- linux-2.6.37.2/arch/parisc/kernel/traps.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/kernel/traps.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/parisc/kernel/traps.c linux-2.6.38.1/arch/parisc/kernel/traps.c
+--- linux-2.6.38.1/arch/parisc/kernel/traps.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/kernel/traps.c 2011-03-21 18:31:35.000000000 -0400
@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod
down_read(¤t->mm->mmap_sem);
fault_address = regs->iaoq[0];
fault_space = regs->iasq[0];
-diff -urNp linux-2.6.37.2/arch/parisc/mm/fault.c linux-2.6.37.2/arch/parisc/mm/fault.c
---- linux-2.6.37.2/arch/parisc/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/parisc/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/parisc/mm/fault.c linux-2.6.38.1/arch/parisc/mm/fault.c
+--- linux-2.6.38.1/arch/parisc/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/parisc/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -15,6 +15,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
/*
* If for any reason at all we couldn't handle the fault, make
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/device.h linux-2.6.37.2/arch/powerpc/include/asm/device.h
---- linux-2.6.37.2/arch/powerpc/include/asm/device.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/device.h 2011-01-17 02:41:00.000000000 -0500
-@@ -11,7 +11,7 @@ struct device_node;
-
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/device.h linux-2.6.38.1/arch/powerpc/include/asm/device.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/device.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/device.h 2011-03-21 18:31:35.000000000 -0400
+@@ -17,7 +17,7 @@ struct device_node;
+ */
struct dev_archdata {
/* DMA operations on that device */
- struct dma_map_ops *dma_ops;
/*
* When an iommu is in use, dma_data is used as a ptr to the base of the
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/dma-mapping.h linux-2.6.37.2/arch/powerpc/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/powerpc/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/dma-mapping.h linux-2.6.38.1/arch/powerpc/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -66,12 +66,13 @@ static inline unsigned long device_to_ma
/*
* Available generic sets of operations
if (dma_ops->mapping_error)
return dma_ops->mapping_error(dev, dma_addr);
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/elf.h linux-2.6.37.2/arch/powerpc/include/asm/elf.h
---- linux-2.6.37.2/arch/powerpc/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/elf.h linux-2.6.38.1/arch/powerpc/include/asm/elf.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -178,8 +178,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E
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. */
#endif /* __KERNEL__ */
/*
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/iommu.h linux-2.6.37.2/arch/powerpc/include/asm/iommu.h
---- linux-2.6.37.2/arch/powerpc/include/asm/iommu.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/iommu.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/iommu.h linux-2.6.38.1/arch/powerpc/include/asm/iommu.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/iommu.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/iommu.h 2011-03-21 18:31:35.000000000 -0400
@@ -116,6 +116,9 @@ extern void iommu_init_early_iSeries(voi
extern void iommu_init_early_dart(void);
extern void iommu_init_early_pasemi(void);
#ifdef CONFIG_PCI
extern void pci_iommu_init(void);
extern void pci_direct_iommu_init(void);
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/kmap_types.h linux-2.6.37.2/arch/powerpc/include/asm/kmap_types.h
---- linux-2.6.37.2/arch/powerpc/include/asm/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/kmap_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/kmap_types.h linux-2.6.38.1/arch/powerpc/include/asm/kmap_types.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -27,6 +27,7 @@ enum km_type {
KM_PPC_SYNC_PAGE,
KM_PPC_SYNC_ICACHE,
KM_TYPE_NR
};
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/page_64.h linux-2.6.37.2/arch/powerpc/include/asm/page_64.h
---- linux-2.6.37.2/arch/powerpc/include/asm/page_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/page_64.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/page_64.h linux-2.6.38.1/arch/powerpc/include/asm/page_64.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/page_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/page_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -172,15 +172,18 @@ do { \
* stack by default, so in the absense of a PT_GNU_STACK program header
* we turn execute permission off.
#include <asm-generic/getorder.h>
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/page.h linux-2.6.37.2/arch/powerpc/include/asm/page.h
---- linux-2.6.37.2/arch/powerpc/include/asm/page.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/page.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/page.h linux-2.6.38.1/arch/powerpc/include/asm/page.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/page.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/page.h 2011-03-21 18:31:35.000000000 -0400
@@ -129,8 +129,9 @@ extern phys_addr_t kernstart_addr;
* and needs to be executable. This means the whole heap ends
* up being executable.
#ifndef __ASSEMBLY__
#undef STRICT_MM_TYPECHECKS
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/pci.h linux-2.6.37.2/arch/powerpc/include/asm/pci.h
---- linux-2.6.37.2/arch/powerpc/include/asm/pci.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/pci.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/pci.h linux-2.6.38.1/arch/powerpc/include/asm/pci.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/pci.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/pci.h 2011-03-21 18:31:35.000000000 -0400
@@ -65,8 +65,8 @@ static inline int pci_get_legacy_ide_irq
}
#else /* CONFIG_PCI */
#define set_pci_dma_ops(d)
#define get_pci_dma_ops() NULL
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/pgtable.h linux-2.6.37.2/arch/powerpc/include/asm/pgtable.h
---- linux-2.6.37.2/arch/powerpc/include/asm/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/pgtable.h 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/pgtable.h linux-2.6.38.1/arch/powerpc/include/asm/pgtable.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/pgtable.h 2011-03-21 18:31:35.000000000 -0400
@@ -2,6 +2,7 @@
#define _ASM_POWERPC_PGTABLE_H
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#include <asm/processor.h> /* For TASK_SIZE */
#include <asm/mmu.h>
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/pte-hash32.h linux-2.6.37.2/arch/powerpc/include/asm/pte-hash32.h
---- linux-2.6.37.2/arch/powerpc/include/asm/pte-hash32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/pte-hash32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/pte-hash32.h linux-2.6.38.1/arch/powerpc/include/asm/pte-hash32.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/pte-hash32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/pte-hash32.h 2011-03-21 18:31:35.000000000 -0400
@@ -21,6 +21,7 @@
#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
#define _PAGE_USER 0x004 /* usermode access allowed */
#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.37.2/arch/powerpc/include/asm/reg.h linux-2.6.37.2/arch/powerpc/include/asm/reg.h
---- linux-2.6.37.2/arch/powerpc/include/asm/reg.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/reg.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/reg.h linux-2.6.38.1/arch/powerpc/include/asm/reg.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/reg.h 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/reg.h 2011-03-23 17:21:43.000000000 -0400
@@ -191,6 +191,7 @@
#define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */
#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
#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.37.2/arch/powerpc/include/asm/swiotlb.h linux-2.6.37.2/arch/powerpc/include/asm/swiotlb.h
---- linux-2.6.37.2/arch/powerpc/include/asm/swiotlb.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/swiotlb.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/swiotlb.h linux-2.6.38.1/arch/powerpc/include/asm/swiotlb.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/swiotlb.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/swiotlb.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,7 +13,7 @@
#include <linux/swiotlb.h>
static inline void dma_mark_clean(void *addr, size_t size) {}
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/system.h linux-2.6.37.2/arch/powerpc/include/asm/system.h
---- linux-2.6.37.2/arch/powerpc/include/asm/system.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/system.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/system.h linux-2.6.38.1/arch/powerpc/include/asm/system.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/system.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/system.h 2011-03-21 18:31:35.000000000 -0400
@@ -533,7 +533,7 @@ __cmpxchg_local(volatile void *ptr, unsi
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif
/* Used in very early kernel initialization. */
extern unsigned long reloc_offset(void);
-diff -urNp linux-2.6.37.2/arch/powerpc/include/asm/uaccess.h linux-2.6.37.2/arch/powerpc/include/asm/uaccess.h
---- linux-2.6.37.2/arch/powerpc/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/include/asm/uaccess.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/include/asm/uaccess.h linux-2.6.38.1/arch/powerpc/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/powerpc/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,8 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1
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.37.2/arch/powerpc/kernel/dma.c linux-2.6.37.2/arch/powerpc/kernel/dma.c
---- linux-2.6.37.2/arch/powerpc/kernel/dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/dma.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/dma.c linux-2.6.38.1/arch/powerpc/kernel/dma.c
+--- linux-2.6.38.1/arch/powerpc/kernel/dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -136,7 +136,7 @@ static inline void dma_direct_sync_singl
}
#endif
if (ppc_md.dma_set_mask)
return ppc_md.dma_set_mask(dev, dma_mask);
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/dma-iommu.c linux-2.6.37.2/arch/powerpc/kernel/dma-iommu.c
---- linux-2.6.37.2/arch/powerpc/kernel/dma-iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/dma-iommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/dma-iommu.c linux-2.6.38.1/arch/powerpc/kernel/dma-iommu.c
+--- linux-2.6.38.1/arch/powerpc/kernel/dma-iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/dma-iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -70,7 +70,7 @@ static void dma_iommu_unmap_sg(struct de
}
{
struct iommu_table *tbl = get_iommu_table_base(dev);
-@@ -90,6 +90,7 @@ static int dma_iommu_dma_supported(struc
+@@ -90,7 +90,7 @@ static int dma_iommu_dma_supported(struc
return 1;
}
-+/* cannot be const, see arch/powerpc/platforms/cell/iommu.c */
- struct dma_map_ops dma_iommu_ops = {
+-struct dma_map_ops dma_iommu_ops = {
++struct dma_map_ops dma_iommu_ops = { /* cannot be const, see arch/powerpc/platforms/cell/iommu.c */
.alloc_coherent = dma_iommu_alloc_coherent,
.free_coherent = dma_iommu_free_coherent,
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.37.2/arch/powerpc/kernel/dma-swiotlb.c
---- linux-2.6.37.2/arch/powerpc/kernel/dma-swiotlb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/dma-swiotlb.c 2011-01-17 02:41:00.000000000 -0500
+ .map_sg = dma_iommu_map_sg,
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.38.1/arch/powerpc/kernel/dma-swiotlb.c
+--- linux-2.6.38.1/arch/powerpc/kernel/dma-swiotlb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/dma-swiotlb.c 2011-03-21 18:31:35.000000000 -0400
@@ -31,7 +31,7 @@ unsigned int ppc_swiotlb_enable;
* map_page, and unmap_page on highmem, use normal dma_ops
* for everything else.
.alloc_coherent = dma_direct_alloc_coherent,
.free_coherent = dma_direct_free_coherent,
.map_sg = swiotlb_map_sg_attrs,
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/exceptions-64e.S linux-2.6.37.2/arch/powerpc/kernel/exceptions-64e.S
---- linux-2.6.37.2/arch/powerpc/kernel/exceptions-64e.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/exceptions-64e.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/exceptions-64e.S linux-2.6.38.1/arch/powerpc/kernel/exceptions-64e.S
+--- linux-2.6.38.1/arch/powerpc/kernel/exceptions-64e.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/exceptions-64e.S 2011-03-21 18:31:35.000000000 -0400
@@ -495,6 +495,7 @@ storage_fault_common:
std r14,_DAR(r1)
std r15,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
ld r4,_DAR(r1)
bl .bad_page_fault
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/exceptions-64s.S linux-2.6.37.2/arch/powerpc/kernel/exceptions-64s.S
---- linux-2.6.37.2/arch/powerpc/kernel/exceptions-64s.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/exceptions-64s.S 2011-01-17 02:41:00.000000000 -0500
-@@ -847,10 +847,10 @@ handle_page_fault:
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/exceptions-64s.S linux-2.6.38.1/arch/powerpc/kernel/exceptions-64s.S
+--- linux-2.6.38.1/arch/powerpc/kernel/exceptions-64s.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/exceptions-64s.S 2011-03-21 18:31:35.000000000 -0400
+@@ -848,10 +848,10 @@ handle_page_fault:
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
lwz r4,_DAR(r1)
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/ibmebus.c linux-2.6.37.2/arch/powerpc/kernel/ibmebus.c
---- linux-2.6.37.2/arch/powerpc/kernel/ibmebus.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/ibmebus.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/ibmebus.c linux-2.6.38.1/arch/powerpc/kernel/ibmebus.c
+--- linux-2.6.38.1/arch/powerpc/kernel/ibmebus.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/ibmebus.c 2011-03-21 18:31:35.000000000 -0400
@@ -128,7 +128,7 @@ static int ibmebus_dma_supported(struct
return 1;
}
.alloc_coherent = ibmebus_alloc_coherent,
.free_coherent = ibmebus_free_coherent,
.map_sg = ibmebus_map_sg,
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/kgdb.c linux-2.6.37.2/arch/powerpc/kernel/kgdb.c
---- linux-2.6.37.2/arch/powerpc/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/kgdb.c linux-2.6.38.1/arch/powerpc/kernel/kgdb.c
+--- linux-2.6.38.1/arch/powerpc/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
@@ -422,7 +422,7 @@ int kgdb_arch_handle_exception(int vecto
/*
* Global data
.gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08},
};
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/module_32.c linux-2.6.37.2/arch/powerpc/kernel/module_32.c
---- linux-2.6.37.2/arch/powerpc/kernel/module_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/module_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/module_32.c linux-2.6.38.1/arch/powerpc/kernel/module_32.c
+--- linux-2.6.38.1/arch/powerpc/kernel/module_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/module_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr
me->arch.core_plt_section = i;
}
/* Find this entry, or if that fails, the next avail. entry */
while (entry->jump[0]) {
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/module.c linux-2.6.37.2/arch/powerpc/kernel/module.c
---- linux-2.6.37.2/arch/powerpc/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/module.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/module.c linux-2.6.38.1/arch/powerpc/kernel/module.c
+--- linux-2.6.38.1/arch/powerpc/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
@@ -31,11 +31,24 @@
LIST_HEAD(module_bug_list);
static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
const char *name)
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/pci-common.c linux-2.6.37.2/arch/powerpc/kernel/pci-common.c
---- linux-2.6.37.2/arch/powerpc/kernel/pci-common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/pci-common.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/pci-common.c linux-2.6.38.1/arch/powerpc/kernel/pci-common.c
+--- linux-2.6.38.1/arch/powerpc/kernel/pci-common.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/pci-common.c 2011-03-21 18:31:35.000000000 -0400
@@ -52,14 +52,14 @@ resource_size_t isa_mem_base;
unsigned int ppc_pci_flags = 0;
{
return pci_dma_ops;
}
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/process.c linux-2.6.37.2/arch/powerpc/kernel/process.c
---- linux-2.6.37.2/arch/powerpc/kernel/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/process.c 2011-01-17 02:41:00.000000000 -0500
-@@ -653,8 +653,8 @@ void show_regs(struct pt_regs * regs)
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/process.c linux-2.6.38.1/arch/powerpc/kernel/process.c
+--- linux-2.6.38.1/arch/powerpc/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
+@@ -655,8 +655,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
*/
#endif
show_stack(current, (unsigned long *) regs->gpr[1]);
if (!user_mode(regs))
-@@ -1144,10 +1144,10 @@ void show_stack(struct task_struct *tsk,
+@@ -1146,10 +1146,10 @@ void show_stack(struct task_struct *tsk,
newsp = stack[0];
ip = stack[STACK_FRAME_LR_SAVE];
if (!firstframe || ip != lr) {
(void *)current->ret_stack[curr_frame].ret);
curr_frame--;
}
-@@ -1167,7 +1167,7 @@ void show_stack(struct task_struct *tsk,
+@@ -1169,7 +1169,7 @@ void show_stack(struct task_struct *tsk,
struct pt_regs *regs = (struct pt_regs *)
(sp + STACK_FRAME_OVERHEAD);
lr = regs->link;
regs->trap, (void *)regs->nip, (void *)lr);
firstframe = 1;
}
-@@ -1242,58 +1242,3 @@ void thread_info_cache_init(void)
+@@ -1244,58 +1244,3 @@ void thread_info_cache_init(void)
}
#endif /* THREAD_SHIFT < PAGE_SHIFT */
-
- return ret;
-}
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/signal_32.c linux-2.6.37.2/arch/powerpc/kernel/signal_32.c
---- linux-2.6.37.2/arch/powerpc/kernel/signal_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/signal_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/signal_32.c linux-2.6.38.1/arch/powerpc/kernel/signal_32.c
+--- linux-2.6.38.1/arch/powerpc/kernel/signal_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/signal_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -858,7 +858,7 @@ int handle_rt_signal32(unsigned long sig
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
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.37.2/arch/powerpc/kernel/signal_64.c linux-2.6.37.2/arch/powerpc/kernel/signal_64.c
---- linux-2.6.37.2/arch/powerpc/kernel/signal_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/signal_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/signal_64.c linux-2.6.38.1/arch/powerpc/kernel/signal_64.c
+--- linux-2.6.38.1/arch/powerpc/kernel/signal_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/signal_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct
current->thread.fpscr.val = 0;
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.37.2/arch/powerpc/kernel/vdso.c linux-2.6.37.2/arch/powerpc/kernel/vdso.c
---- linux-2.6.37.2/arch/powerpc/kernel/vdso.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/vdso.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/vdso.c linux-2.6.38.1/arch/powerpc/kernel/vdso.c
+--- linux-2.6.38.1/arch/powerpc/kernel/vdso.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/vdso.c 2011-03-21 18:31:35.000000000 -0400
@@ -36,6 +36,7 @@
#include <asm/firmware.h>
#include <asm/vdso.h>
if (IS_ERR_VALUE(vdso_base)) {
rc = vdso_base;
goto fail_mmapsem;
-diff -urNp linux-2.6.37.2/arch/powerpc/kernel/vio.c linux-2.6.37.2/arch/powerpc/kernel/vio.c
---- linux-2.6.37.2/arch/powerpc/kernel/vio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/kernel/vio.c 2011-01-17 02:41:00.000000000 -0500
-@@ -600,11 +600,12 @@ static void vio_dma_iommu_unmap_sg(struc
- vio_cmo_dealloc(viodev, alloc_size);
+diff -urNp linux-2.6.38.1/arch/powerpc/kernel/vio.c linux-2.6.38.1/arch/powerpc/kernel/vio.c
+--- linux-2.6.38.1/arch/powerpc/kernel/vio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/kernel/vio.c 2011-03-21 18:31:35.000000000 -0400
+@@ -605,11 +605,12 @@ static int vio_dma_iommu_dma_supported(s
+ return dma_iommu_ops.dma_supported(dev, mask);
}
-struct dma_map_ops vio_dma_mapping_ops = {
-+static const struct dma_map_ops vio_dma_mapping_ops = {
++const struct dma_map_ops vio_dma_mapping_ops = {
.alloc_coherent = vio_dma_iommu_alloc_coherent,
.free_coherent = vio_dma_iommu_free_coherent,
.map_sg = vio_dma_iommu_map_sg,
+ .dma_supported = dma_iommu_dma_supported,
.map_page = vio_dma_iommu_map_page,
.unmap_page = vio_dma_iommu_unmap_page,
-
-@@ -858,7 +859,6 @@ static void vio_cmo_bus_remove(struct vi
-
- static void vio_cmo_set_dma_ops(struct vio_dev *viodev)
- {
-- vio_dma_mapping_ops.dma_supported = dma_iommu_ops.dma_supported;
- viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops;
- }
-
-diff -urNp linux-2.6.37.2/arch/powerpc/lib/usercopy_64.c linux-2.6.37.2/arch/powerpc/lib/usercopy_64.c
---- linux-2.6.37.2/arch/powerpc/lib/usercopy_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/lib/usercopy_64.c 2011-01-17 02:41:00.000000000 -0500
+ .dma_supported = vio_dma_iommu_dma_supported,
+diff -urNp linux-2.6.38.1/arch/powerpc/lib/usercopy_64.c linux-2.6.38.1/arch/powerpc/lib/usercopy_64.c
+--- linux-2.6.38.1/arch/powerpc/lib/usercopy_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/lib/usercopy_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -9,22 +9,6 @@
#include <linux/module.h>
#include <asm/uaccess.h>
-EXPORT_SYMBOL(copy_to_user);
EXPORT_SYMBOL(copy_in_user);
-diff -urNp linux-2.6.37.2/arch/powerpc/mm/fault.c linux-2.6.37.2/arch/powerpc/mm/fault.c
---- linux-2.6.37.2/arch/powerpc/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/mm/fault.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/mm/fault.c linux-2.6.38.1/arch/powerpc/mm/fault.c
+--- linux-2.6.38.1/arch/powerpc/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/mm/fault.c 2011-03-21 18:31:35.000000000 -0400
@@ -31,6 +31,10 @@
#include <linux/kdebug.h>
#include <linux/perf_event.h>
_exception(SIGSEGV, regs, code, address);
return 0;
}
-diff -urNp linux-2.6.37.2/arch/powerpc/mm/mmap_64.c linux-2.6.37.2/arch/powerpc/mm/mmap_64.c
---- linux-2.6.37.2/arch/powerpc/mm/mmap_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/mm/mmap_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/mm/mmap_64.c linux-2.6.38.1/arch/powerpc/mm/mmap_64.c
+--- linux-2.6.38.1/arch/powerpc/mm/mmap_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/mm/mmap_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.37.2/arch/powerpc/mm/slice.c linux-2.6.37.2/arch/powerpc/mm/slice.c
---- linux-2.6.37.2/arch/powerpc/mm/slice.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/mm/slice.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/mm/slice.c linux-2.6.38.1/arch/powerpc/mm/slice.c
+--- linux-2.6.38.1/arch/powerpc/mm/slice.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/mm/slice.c 2011-03-21 23:47:41.000000000 -0400
@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_
if ((mm->task_size - len) < addr)
return 0;
/*
* Remember the place where we stopped the search:
*/
-@@ -336,7 +336,7 @@ static unsigned long slice_find_area_top
+@@ -313,10 +313,14 @@ static unsigned long slice_find_area_top
+ }
+ }
+
+- addr = mm->mmap_base;
+- while (addr > len) {
++ if (mm->mmap_base < len)
++ addr = -ENOMEM;
++ else
++ addr = mm->mmap_base - len;
++
++ while (!IS_ERR_VALUE(addr)) {
+ /* Go down by chunk size */
+- addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
++ addr = _ALIGN_DOWN(addr, 1ul << pshift);
+
+ /* 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
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
if (use_cache)
mm->free_area_cache = addr;
-@@ -426,6 +426,11 @@ unsigned long slice_get_unmapped_area(un
+@@ -348,7 +352,7 @@ static unsigned long slice_find_area_top
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = vma->vm_start;
++ addr = skip_heap_stack_gap(vma, len);
+ }
+
+ /*
+@@ -426,6 +430,11 @@ unsigned long slice_get_unmapped_area(un
if (fixed && addr > (mm->task_size - len))
return -EINVAL;
/* If hint, make sure it matches our alignment restrictions */
if (!fixed && addr) {
addr = _ALIGN_UP(addr, 1ul << pshift);
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.37.2/arch/powerpc/platforms/52xx/lite5200_pm.c
---- linux-2.6.37.2/arch/powerpc/platforms/52xx/lite5200_pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/52xx/lite5200_pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -232,7 +232,7 @@ static void lite5200_pm_end(void)
- lite5200_pm_target_state = PM_SUSPEND_ON;
- }
-
--static struct platform_suspend_ops lite5200_pm_ops = {
-+static const struct platform_suspend_ops lite5200_pm_ops = {
- .valid = lite5200_pm_valid,
- .begin = lite5200_pm_begin,
- .prepare = lite5200_pm_prepare,
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.37.2/arch/powerpc/platforms/52xx/mpc52xx_pm.c
---- linux-2.6.37.2/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -186,7 +186,7 @@ void mpc52xx_pm_finish(void)
- iounmap(mbar);
- }
-
--static struct platform_suspend_ops mpc52xx_pm_ops = {
-+static const struct platform_suspend_ops mpc52xx_pm_ops = {
- .valid = mpc52xx_pm_valid,
- .prepare = mpc52xx_pm_prepare,
- .enter = mpc52xx_pm_enter,
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/83xx/suspend.c linux-2.6.37.2/arch/powerpc/platforms/83xx/suspend.c
---- linux-2.6.37.2/arch/powerpc/platforms/83xx/suspend.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/83xx/suspend.c 2011-01-17 02:41:00.000000000 -0500
-@@ -311,7 +311,7 @@ static int mpc83xx_is_pci_agent(void)
- return ret;
- }
-
--static struct platform_suspend_ops mpc83xx_suspend_ops = {
-+static const struct platform_suspend_ops mpc83xx_suspend_ops = {
- .valid = mpc83xx_suspend_valid,
- .begin = mpc83xx_suspend_begin,
- .enter = mpc83xx_suspend_enter,
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/cell/iommu.c linux-2.6.37.2/arch/powerpc/platforms/cell/iommu.c
---- linux-2.6.37.2/arch/powerpc/platforms/cell/iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/cell/iommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/platforms/cell/iommu.c linux-2.6.38.1/arch/powerpc/platforms/cell/iommu.c
+--- linux-2.6.38.1/arch/powerpc/platforms/cell/iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/platforms/cell/iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struc
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
.alloc_coherent = dma_fixed_alloc_coherent,
.free_coherent = dma_fixed_free_coherent,
.map_sg = dma_fixed_map_sg,
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.37.2/arch/powerpc/platforms/ps3/system-bus.c
---- linux-2.6.37.2/arch/powerpc/platforms/ps3/system-bus.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/ps3/system-bus.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.38.1/arch/powerpc/platforms/ps3/system-bus.c
+--- linux-2.6.38.1/arch/powerpc/platforms/ps3/system-bus.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/platforms/ps3/system-bus.c 2011-03-21 18:31:35.000000000 -0400
@@ -695,7 +695,7 @@ static int ps3_dma_supported(struct devi
return mask >= DMA_BIT_MASK(32);
}
.alloc_coherent = ps3_alloc_coherent,
.free_coherent = ps3_free_coherent,
.map_sg = ps3_ioc0_map_sg,
-diff -urNp linux-2.6.37.2/arch/powerpc/platforms/pseries/suspend.c linux-2.6.37.2/arch/powerpc/platforms/pseries/suspend.c
---- linux-2.6.37.2/arch/powerpc/platforms/pseries/suspend.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/platforms/pseries/suspend.c 2011-01-17 02:41:00.000000000 -0500
-@@ -153,7 +153,7 @@ static struct sysdev_class suspend_sysde
- .name = "power",
- };
-
--static struct platform_suspend_ops pseries_suspend_ops = {
-+static const struct platform_suspend_ops pseries_suspend_ops = {
- .valid = suspend_valid_only_mem,
- .begin = pseries_suspend_begin,
- .prepare_late = pseries_prepare_late,
-diff -urNp linux-2.6.37.2/arch/powerpc/sysdev/fsl_pmc.c linux-2.6.37.2/arch/powerpc/sysdev/fsl_pmc.c
---- linux-2.6.37.2/arch/powerpc/sysdev/fsl_pmc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/powerpc/sysdev/fsl_pmc.c 2011-01-17 02:41:00.000000000 -0500
-@@ -53,7 +53,7 @@ static int pmc_suspend_valid(suspend_sta
- return 1;
+diff -urNp linux-2.6.38.1/arch/powerpc/sysdev/ppc4xx_cpm.c linux-2.6.38.1/arch/powerpc/sysdev/ppc4xx_cpm.c
+--- linux-2.6.38.1/arch/powerpc/sysdev/ppc4xx_cpm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/powerpc/sysdev/ppc4xx_cpm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -240,7 +240,7 @@ static int cpm_suspend_enter(suspend_sta
+ return 0;
}
--static struct platform_suspend_ops pmc_suspend_ops = {
-+static const struct platform_suspend_ops pmc_suspend_ops = {
- .valid = pmc_suspend_valid,
- .enter = pmc_suspend_enter,
+-static struct platform_suspend_ops cpm_suspend_ops = {
++static const struct platform_suspend_ops cpm_suspend_ops = {
+ .valid = cpm_suspend_valid,
+ .enter = cpm_suspend_enter,
};
-diff -urNp linux-2.6.37.2/arch/s390/include/asm/elf.h linux-2.6.37.2/arch/s390/include/asm/elf.h
---- linux-2.6.37.2/arch/s390/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
-@@ -163,6 +163,13 @@ extern unsigned int vdso_enabled;
+diff -urNp linux-2.6.38.1/arch/s390/include/asm/elf.h linux-2.6.38.1/arch/s390/include/asm/elf.h
+--- linux-2.6.38.1/arch/s390/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
+@@ -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. */
- #define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)
+-extern unsigned long randomize_et_dyn(unsigned long base);
+-#define ELF_ET_DYN_BASE (randomize_et_dyn(STACK_TOP / 3 * 2))
++#define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)
++
+#ifdef CONFIG_PAX_ASLR
+#define PAX_ELF_ET_DYN_BASE (test_thread_flag(TIF_31BIT) ? 0x10000UL : 0x80000000UL)
+
+#define PAX_DELTA_MMAP_LEN (test_thread_flag(TIF_31BIT) ? 15 : 26 )
+#define PAX_DELTA_STACK_LEN (test_thread_flag(TIF_31BIT) ? 15 : 26 )
+#endif
-+
+
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. */
+@@ -222,7 +228,4 @@ struct linux_binprm;
+ #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
+ int arch_setup_additional_pages(struct linux_binprm *, int);
+
+-extern unsigned long arch_randomize_brk(struct mm_struct *mm);
+-#define arch_randomize_brk arch_randomize_brk
+-
+ #endif
+diff -urNp linux-2.6.38.1/arch/s390/include/asm/system.h linux-2.6.38.1/arch/s390/include/asm/system.h
+--- linux-2.6.38.1/arch/s390/include/asm/system.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/include/asm/system.h 2011-03-21 18:31:35.000000000 -0400
+@@ -449,7 +449,7 @@ extern void (*_machine_restart)(char *co
+ extern void (*_machine_halt)(void);
+ extern void (*_machine_power_off)(void);
-diff -urNp linux-2.6.37.2/arch/s390/include/asm/uaccess.h linux-2.6.37.2/arch/s390/include/asm/uaccess.h
---- linux-2.6.37.2/arch/s390/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/include/asm/uaccess.h 2011-01-17 02:41:00.000000000 -0500
+-extern unsigned long arch_align_stack(unsigned long sp);
++#define arch_align_stack(x) ((x) & ~0xfUL)
+
+ static inline int tprot(unsigned long addr)
+ {
+diff -urNp linux-2.6.38.1/arch/s390/include/asm/uaccess.h linux-2.6.38.1/arch/s390/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/s390/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -234,6 +234,10 @@ static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (unlikely(sz != -1 && sz < n)) {
copy_from_user_overflow();
return n;
-diff -urNp linux-2.6.37.2/arch/s390/Kconfig linux-2.6.37.2/arch/s390/Kconfig
---- linux-2.6.37.2/arch/s390/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/Kconfig 2011-01-17 02:41:00.000000000 -0500
-@@ -242,13 +242,12 @@ config AUDIT_ARCH
-
- config S390_EXEC_PROTECT
- bool "Data execute protection"
-+ default y
+diff -urNp linux-2.6.38.1/arch/s390/Kconfig linux-2.6.38.1/arch/s390/Kconfig
+--- linux-2.6.38.1/arch/s390/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/Kconfig 2011-03-21 18:31:35.000000000 -0400
+@@ -233,11 +233,9 @@ config S390_EXEC_PROTECT
+ prompt "Data execute protection"
help
This option allows to enable a buffer overflow protection for user
- space programs and it also selects the addressing mode option above.
- reduce system performance.
+ space programs.
+ Enabling this (via kernel parameter) on machines earlier than IBM
-+ System z9 will reduce system performance.
++ System z9 this will reduce system performance.
comment "Code generation options"
-diff -urNp linux-2.6.37.2/arch/s390/kernel/module.c linux-2.6.37.2/arch/s390/kernel/module.c
---- linux-2.6.37.2/arch/s390/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/kernel/module.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/s390/kernel/module.c linux-2.6.38.1/arch/s390/kernel/module.c
+--- linux-2.6.38.1/arch/s390/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
@@ -168,11 +168,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
/* Increase core size by size of got & plt and set start
rela->r_addend - loc;
if (r_type == R_390_GOTPC)
*(unsigned int *) loc = val;
-diff -urNp linux-2.6.37.2/arch/s390/kernel/setup.c linux-2.6.37.2/arch/s390/kernel/setup.c
---- linux-2.6.37.2/arch/s390/kernel/setup.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/kernel/setup.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/s390/kernel/process.c linux-2.6.38.1/arch/s390/kernel/process.c
+--- linux-2.6.38.1/arch/s390/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
+@@ -334,39 +334,3 @@ unsigned long get_wchan(struct task_stru
+ }
+ return 0;
+ }
+-
+-unsigned long arch_align_stack(unsigned long sp)
+-{
+- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+- sp -= get_random_int() & ~PAGE_MASK;
+- return sp & ~0xf;
+-}
+-
+-static inline unsigned long brk_rnd(void)
+-{
+- /* 8MB for 32bit, 1GB for 64bit */
+- if (is_32bit_task())
+- return (get_random_int() & 0x7ffUL) << PAGE_SHIFT;
+- else
+- return (get_random_int() & 0x3ffffUL) << PAGE_SHIFT;
+-}
+-
+-unsigned long arch_randomize_brk(struct mm_struct *mm)
+-{
+- unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd());
+-
+- if (ret < mm->brk)
+- return mm->brk;
+- return ret;
+-}
+-
+-unsigned long randomize_et_dyn(unsigned long base)
+-{
+- unsigned long ret = PAGE_ALIGN(base + brk_rnd());
+-
+- if (!(current->flags & PF_RANDOMIZE))
+- return base;
+- if (ret < base)
+- return base;
+- return ret;
+-}
+diff -urNp linux-2.6.38.1/arch/s390/kernel/setup.c linux-2.6.38.1/arch/s390/kernel/setup.c
+--- linux-2.6.38.1/arch/s390/kernel/setup.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/kernel/setup.c 2011-03-21 18:31:35.000000000 -0400
@@ -281,7 +281,7 @@ static int __init early_parse_mem(char *
}
early_param("mem", early_parse_mem);
static void setup_addressing_mode(void)
{
if (user_mode == SECONDARY_SPACE_MODE) {
-diff -urNp linux-2.6.37.2/arch/s390/mm/maccess.c linux-2.6.37.2/arch/s390/mm/maccess.c
---- linux-2.6.37.2/arch/s390/mm/maccess.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/mm/maccess.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/s390/mm/maccess.c linux-2.6.38.1/arch/s390/mm/maccess.c
+--- linux-2.6.38.1/arch/s390/mm/maccess.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/mm/maccess.c 2011-03-21 18:31:35.000000000 -0400
@@ -45,7 +45,7 @@ static long probe_kernel_write_odd(void
return rc ? rc : count;
}
{
long copied = 0;
-diff -urNp linux-2.6.37.2/arch/s390/mm/mmap.c linux-2.6.37.2/arch/s390/mm/mmap.c
---- linux-2.6.37.2/arch/s390/mm/mmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/s390/mm/mmap.c 2011-01-17 02:41:00.000000000 -0500
-@@ -78,10 +78,22 @@ void arch_pick_mmap_layout(struct mm_str
+diff -urNp linux-2.6.38.1/arch/s390/mm/mmap.c linux-2.6.38.1/arch/s390/mm/mmap.c
+--- linux-2.6.38.1/arch/s390/mm/mmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/s390/mm/mmap.c 2011-03-21 18:31:35.000000000 -0400
+@@ -91,10 +91,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
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
+@@ -166,10 +178,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
mm->get_unmapped_area = s390_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.37.2/arch/score/include/asm/system.h linux-2.6.37.2/arch/score/include/asm/system.h
---- linux-2.6.37.2/arch/score/include/asm/system.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/score/include/asm/system.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/score/include/asm/system.h linux-2.6.38.1/arch/score/include/asm/system.h
+--- linux-2.6.38.1/arch/score/include/asm/system.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/score/include/asm/system.h 2011-03-21 18:31:35.000000000 -0400
@@ -17,7 +17,7 @@ do { \
#define finish_arch_switch(prev) do {} while (0)
#define mb() barrier()
#define rmb() barrier()
-diff -urNp linux-2.6.37.2/arch/score/kernel/process.c linux-2.6.37.2/arch/score/kernel/process.c
---- linux-2.6.37.2/arch/score/kernel/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/score/kernel/process.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/score/kernel/process.c linux-2.6.38.1/arch/score/kernel/process.c
+--- linux-2.6.38.1/arch/score/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/score/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
@@ -161,8 +161,3 @@ unsigned long get_wchan(struct task_stru
return task_pt_regs(task)->cp0_epc;
-{
- return sp;
-}
-diff -urNp linux-2.6.37.2/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.37.2/arch/sh/boards/mach-hp6xx/pm.c
---- linux-2.6.37.2/arch/sh/boards/mach-hp6xx/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/boards/mach-hp6xx/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -143,7 +143,7 @@ static int hp6x0_pm_enter(suspend_state_
- return 0;
- }
-
--static struct platform_suspend_ops hp6x0_pm_ops = {
-+static const struct platform_suspend_ops hp6x0_pm_ops = {
- .enter = hp6x0_pm_enter,
- .valid = suspend_valid_only_mem,
- };
-diff -urNp linux-2.6.37.2/arch/sh/include/asm/dma-mapping.h linux-2.6.37.2/arch/sh/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/sh/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sh/include/asm/dma-mapping.h linux-2.6.38.1/arch/sh/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/sh/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sh/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -1,10 +1,10 @@
#ifndef __ASM_SH_DMA_MAPPING_H
#define __ASM_SH_DMA_MAPPING_H
if (dma_release_from_coherent(dev, get_order(size), vaddr))
return;
-diff -urNp linux-2.6.37.2/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.37.2/arch/sh/kernel/cpu/shmobile/pm.c
---- linux-2.6.37.2/arch/sh/kernel/cpu/shmobile/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/kernel/cpu/shmobile/pm.c 2011-01-17 02:41:00.000000000 -0500
-@@ -141,7 +141,7 @@ static int sh_pm_enter(suspend_state_t s
- return 0;
- }
-
--static struct platform_suspend_ops sh_pm_ops = {
-+static const struct platform_suspend_ops sh_pm_ops = {
- .enter = sh_pm_enter,
- .valid = suspend_valid_only_mem,
- };
-diff -urNp linux-2.6.37.2/arch/sh/kernel/dma-nommu.c linux-2.6.37.2/arch/sh/kernel/dma-nommu.c
---- linux-2.6.37.2/arch/sh/kernel/dma-nommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/kernel/dma-nommu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sh/kernel/dma-nommu.c linux-2.6.38.1/arch/sh/kernel/dma-nommu.c
+--- linux-2.6.38.1/arch/sh/kernel/dma-nommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sh/kernel/dma-nommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -62,7 +62,7 @@ static void nommu_sync_sg(struct device
}
#endif
.alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = dma_generic_free_coherent,
.map_page = nommu_map_page,
-diff -urNp linux-2.6.37.2/arch/sh/kernel/kgdb.c linux-2.6.37.2/arch/sh/kernel/kgdb.c
---- linux-2.6.37.2/arch/sh/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/kernel/kgdb.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sh/kernel/kgdb.c linux-2.6.38.1/arch/sh/kernel/kgdb.c
+--- linux-2.6.38.1/arch/sh/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sh/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
@@ -319,7 +319,7 @@ void kgdb_arch_exit(void)
unregister_die_notifier(&kgdb_notifier);
}
/* Breakpoint instruction: trapa #0x3c */
#ifdef CONFIG_CPU_LITTLE_ENDIAN
.gdb_bpt_instr = { 0x3c, 0xc3 },
-diff -urNp linux-2.6.37.2/arch/sh/mm/consistent.c linux-2.6.37.2/arch/sh/mm/consistent.c
---- linux-2.6.37.2/arch/sh/mm/consistent.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/mm/consistent.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sh/mm/consistent.c linux-2.6.38.1/arch/sh/mm/consistent.c
+--- linux-2.6.38.1/arch/sh/mm/consistent.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sh/mm/consistent.c 2011-03-21 18:31:35.000000000 -0400
@@ -22,7 +22,7 @@
#define PREALLOC_DMA_DEBUG_ENTRIES 4096
EXPORT_SYMBOL(dma_ops);
static int __init dma_init(void)
-diff -urNp linux-2.6.37.2/arch/sh/mm/mmap.c linux-2.6.37.2/arch/sh/mm/mmap.c
---- linux-2.6.37.2/arch/sh/mm/mmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sh/mm/mmap.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sh/mm/mmap.c linux-2.6.38.1/arch/sh/mm/mmap.c
+--- linux-2.6.38.1/arch/sh/mm/mmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sh/mm/mmap.c 2011-03-21 23:47:41.000000000 -0400
@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str
addr = PAGE_ALIGN(addr);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -199,7 +197,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -188,18 +186,18 @@ arch_get_unmapped_area_topdown(struct fi
+ if (unlikely(mm->mmap_base < len))
+ goto bottomup;
+
+- addr = mm->mmap_base-len;
+- if (do_colour_align)
+- addr = COLOUR_ALIGN_DOWN(addr, pgoff);
++ addr = mm->mmap_base - len;
+
+ do {
++ if (do_colour_align)
++ addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+ /*
+ * Lookup failure means no vma is above this address,
+ * else if new region fits below vma->vm_start,
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/atomic_64.h linux-2.6.37.2/arch/sparc/include/asm/atomic_64.h
---- linux-2.6.37.2/arch/sparc/include/asm/atomic_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/atomic_64.h 2011-01-17 02:41:00.000000000 -0500
+@@ -209,10 +207,8 @@ arch_get_unmapped_area_topdown(struct fi
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = vma->vm_start-len;
+- if (do_colour_align)
+- addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+- } while (likely(len < vma->vm_start));
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+ bottomup:
+ /*
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/atomic_64.h linux-2.6.38.1/arch/sparc/include/asm/atomic_64.h
+--- linux-2.6.38.1/arch/sparc/include/asm/atomic_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/atomic_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -14,18 +14,40 @@
#define ATOMIC64_INIT(i) { (i) }
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/dma-mapping.h linux-2.6.37.2/arch/sparc/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/sparc/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/dma-mapping.h linux-2.6.38.1/arch/sparc/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/sparc/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,10 +12,10 @@ extern int dma_supported(struct device *
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
ops->free_coherent(dev, size, cpu_addr, dma_handle);
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/elf_32.h linux-2.6.37.2/arch/sparc/include/asm/elf_32.h
---- linux-2.6.37.2/arch/sparc/include/asm/elf_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/elf_32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/elf_32.h linux-2.6.38.1/arch/sparc/include/asm/elf_32.h
+--- linux-2.6.38.1/arch/sparc/include/asm/elf_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/elf_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -114,6 +114,13 @@ typedef struct {
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
/* 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.37.2/arch/sparc/include/asm/elf_64.h linux-2.6.37.2/arch/sparc/include/asm/elf_64.h
---- linux-2.6.37.2/arch/sparc/include/asm/elf_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/elf_64.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/elf_64.h linux-2.6.38.1/arch/sparc/include/asm/elf_64.h
+--- linux-2.6.38.1/arch/sparc/include/asm/elf_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/elf_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -162,6 +162,12 @@ typedef struct {
#define ELF_ET_DYN_BASE 0x0000010000000000UL
#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/pgtable_32.h linux-2.6.37.2/arch/sparc/include/asm/pgtable_32.h
---- linux-2.6.37.2/arch/sparc/include/asm/pgtable_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/pgtable_32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/pgtable_32.h linux-2.6.38.1/arch/sparc/include/asm/pgtable_32.h
+--- linux-2.6.38.1/arch/sparc/include/asm/pgtable_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/pgtable_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -43,6 +43,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_copy)
extern unsigned long page_kernel;
#ifdef MODULE
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.37.2/arch/sparc/include/asm/pgtsrmmu.h
---- linux-2.6.37.2/arch/sparc/include/asm/pgtsrmmu.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/pgtsrmmu.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.38.1/arch/sparc/include/asm/pgtsrmmu.h
+--- linux-2.6.38.1/arch/sparc/include/asm/pgtsrmmu.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/pgtsrmmu.h 2011-03-21 18:31:35.000000000 -0400
@@ -115,6 +115,13 @@
SRMMU_EXEC | SRMMU_REF)
#define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
#define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
SRMMU_DIRTY | SRMMU_REF)
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/spinlock_64.h linux-2.6.37.2/arch/sparc/include/asm/spinlock_64.h
---- linux-2.6.37.2/arch/sparc/include/asm/spinlock_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/spinlock_64.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/spinlock_64.h linux-2.6.38.1/arch/sparc/include/asm/spinlock_64.h
+--- linux-2.6.38.1/arch/sparc/include/asm/spinlock_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/spinlock_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -99,7 +99,12 @@ static void inline arch_read_lock(arch_r
__asm__ __volatile__ (
"1: ldsw [%2], %0\n"
" cas [%2], %0, %1\n"
" cmp %0, %1\n"
" bne,pn %%xcc, 1b\n"
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/uaccess_32.h linux-2.6.37.2/arch/sparc/include/asm/uaccess_32.h
---- linux-2.6.37.2/arch/sparc/include/asm/uaccess_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/uaccess_32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/uaccess_32.h linux-2.6.38.1/arch/sparc/include/asm/uaccess_32.h
+--- linux-2.6.38.1/arch/sparc/include/asm/uaccess_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/uaccess_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
return __copy_user((__force void __user *) to, from, n);
}
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/uaccess_64.h linux-2.6.37.2/arch/sparc/include/asm/uaccess_64.h
---- linux-2.6.37.2/arch/sparc/include/asm/uaccess_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/uaccess_64.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/uaccess_64.h linux-2.6.38.1/arch/sparc/include/asm/uaccess_64.h
+--- linux-2.6.38.1/arch/sparc/include/asm/uaccess_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/uaccess_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <linux/string.h>
if (unlikely(ret))
ret = copy_to_user_fixup(to, from, size);
return ret;
-diff -urNp linux-2.6.37.2/arch/sparc/include/asm/uaccess.h linux-2.6.37.2/arch/sparc/include/asm/uaccess.h
---- linux-2.6.37.2/arch/sparc/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/include/asm/uaccess.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/include/asm/uaccess.h linux-2.6.38.1/arch/sparc/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/sparc/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -1,5 +1,13 @@
#ifndef ___ASM_SPARC_UACCESS_H
#define ___ASM_SPARC_UACCESS_H
#if defined(__sparc__) && defined(__arch64__)
#include <asm/uaccess_64.h>
#else
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/iommu.c linux-2.6.37.2/arch/sparc/kernel/iommu.c
---- linux-2.6.37.2/arch/sparc/kernel/iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/iommu.c 2011-01-17 02:41:00.000000000 -0500
-@@ -828,7 +828,7 @@ static void dma_4u_sync_sg_for_cpu(struc
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/iommu.c linux-2.6.38.1/arch/sparc/kernel/iommu.c
+--- linux-2.6.38.1/arch/sparc/kernel/iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/iommu.c 2011-03-21 18:31:35.000000000 -0400
+@@ -827,7 +827,7 @@ static void dma_4u_sync_sg_for_cpu(struc
spin_unlock_irqrestore(&iommu->lock, flags);
}
.alloc_coherent = dma_4u_alloc_coherent,
.free_coherent = dma_4u_free_coherent,
.map_page = dma_4u_map_page,
-@@ -839,7 +839,7 @@ static struct dma_map_ops sun4u_dma_ops
+@@ -838,7 +838,7 @@ static struct dma_map_ops sun4u_dma_ops
.sync_sg_for_cpu = dma_4u_sync_sg_for_cpu,
};
EXPORT_SYMBOL(dma_ops);
extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/ioport.c linux-2.6.37.2/arch/sparc/kernel/ioport.c
---- linux-2.6.37.2/arch/sparc/kernel/ioport.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/ioport.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/ioport.c linux-2.6.38.1/arch/sparc/kernel/ioport.c
+--- linux-2.6.38.1/arch/sparc/kernel/ioport.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/ioport.c 2011-03-21 18:31:35.000000000 -0400
@@ -397,7 +397,7 @@ static void sbus_sync_sg_for_device(stru
BUG();
}
.alloc_coherent = pci32_alloc_coherent,
.free_coherent = pci32_free_coherent,
.map_page = pci32_map_page,
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/kgdb_32.c linux-2.6.37.2/arch/sparc/kernel/kgdb_32.c
---- linux-2.6.37.2/arch/sparc/kernel/kgdb_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/kgdb_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/kgdb_32.c linux-2.6.38.1/arch/sparc/kernel/kgdb_32.c
+--- linux-2.6.38.1/arch/sparc/kernel/kgdb_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/kgdb_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -164,7 +164,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
regs->npc = regs->pc + 4;
}
/* Breakpoint instruction: ta 0x7d */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
};
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/kgdb_64.c linux-2.6.37.2/arch/sparc/kernel/kgdb_64.c
---- linux-2.6.37.2/arch/sparc/kernel/kgdb_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/kgdb_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/kgdb_64.c linux-2.6.38.1/arch/sparc/kernel/kgdb_64.c
+--- linux-2.6.38.1/arch/sparc/kernel/kgdb_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/kgdb_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -187,7 +187,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
regs->tnpc = regs->tpc + 4;
}
/* Breakpoint instruction: ta 0x72 */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },
};
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/Makefile linux-2.6.37.2/arch/sparc/kernel/Makefile
---- linux-2.6.37.2/arch/sparc/kernel/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/Makefile 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/Makefile linux-2.6.38.1/arch/sparc/kernel/Makefile
+--- linux-2.6.38.1/arch/sparc/kernel/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -3,7 +3,7 @@
#
extra-y := head_$(BITS).o
extra-y += init_task.o
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/pci_sun4v.c linux-2.6.37.2/arch/sparc/kernel/pci_sun4v.c
---- linux-2.6.37.2/arch/sparc/kernel/pci_sun4v.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/pci_sun4v.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/pci_sun4v.c linux-2.6.38.1/arch/sparc/kernel/pci_sun4v.c
+--- linux-2.6.38.1/arch/sparc/kernel/pci_sun4v.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/pci_sun4v.c 2011-03-21 18:31:35.000000000 -0400
@@ -525,7 +525,7 @@ static void dma_4v_unmap_sg(struct devic
spin_unlock_irqrestore(&iommu->lock, flags);
}
.alloc_coherent = dma_4v_alloc_coherent,
.free_coherent = dma_4v_free_coherent,
.map_page = dma_4v_map_page,
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/process_32.c linux-2.6.37.2/arch/sparc/kernel/process_32.c
---- linux-2.6.37.2/arch/sparc/kernel/process_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/process_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/process_32.c linux-2.6.38.1/arch/sparc/kernel/process_32.c
+--- linux-2.6.38.1/arch/sparc/kernel/process_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/process_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -196,7 +196,7 @@ void __show_backtrace(unsigned long fp)
rw->ins[4], rw->ins[5],
rw->ins[6],
fp = rw->ins[6];
} while (++count < 16);
printk("\n");
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/process_64.c linux-2.6.37.2/arch/sparc/kernel/process_64.c
---- linux-2.6.37.2/arch/sparc/kernel/process_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/process_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/process_64.c linux-2.6.38.1/arch/sparc/kernel/process_64.c
+--- linux-2.6.38.1/arch/sparc/kernel/process_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/process_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -180,14 +180,14 @@ static void show_regwindow(struct pt_reg
printk("i4: %016lx i5: %016lx i6: %016lx i7: %016lx\n",
rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]);
(void *) gp->tpc,
(void *) gp->o7,
(void *) gp->i7,
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/sys_sparc_32.c linux-2.6.37.2/arch/sparc/kernel/sys_sparc_32.c
---- linux-2.6.37.2/arch/sparc/kernel/sys_sparc_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/sys_sparc_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/sys_sparc_32.c linux-2.6.38.1/arch/sparc/kernel/sys_sparc_32.c
+--- linux-2.6.38.1/arch/sparc/kernel/sys_sparc_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/sys_sparc_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -56,7 +56,7 @@ unsigned long arch_get_unmapped_area(str
if (ARCH_SUN4C && len > 0x20000000)
return -ENOMEM;
return addr;
addr = vmm->vm_end;
if (flags & MAP_SHARED)
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/sys_sparc_64.c linux-2.6.37.2/arch/sparc/kernel/sys_sparc_64.c
---- linux-2.6.37.2/arch/sparc/kernel/sys_sparc_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/sys_sparc_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/sys_sparc_64.c linux-2.6.38.1/arch/sparc/kernel/sys_sparc_64.c
+--- linux-2.6.38.1/arch/sparc/kernel/sys_sparc_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/sys_sparc_64.c 2011-03-21 23:47:41.000000000 -0400
@@ -124,7 +124,7 @@ unsigned long arch_get_unmapped_area(str
/* We do not accept a shared mapping if it would violate
* cache aliasing constraints.
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -278,7 +280,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -267,18 +269,18 @@ arch_get_unmapped_area_topdown(struct fi
+ if (unlikely(mm->mmap_base < len))
+ goto bottomup;
+
+- addr = mm->mmap_base-len;
+- if (do_color_align)
+- addr = COLOUR_ALIGN_DOWN(addr, pgoff);
++ addr = mm->mmap_base - len;
+
+ do {
++ if (do_color_align)
++ addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+ /*
+ * Lookup failure means no vma is above this address,
+ * else if new region fits below vma->vm_start,
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -385,6 +387,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -288,10 +290,8 @@ arch_get_unmapped_area_topdown(struct fi
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = vma->vm_start-len;
+- if (do_color_align)
+- addr = COLOUR_ALIGN_DOWN(addr, pgoff);
+- } while (likely(len < vma->vm_start));
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+ bottomup:
+ /*
+@@ -385,6 +385,12 @@ void arch_pick_mmap_layout(struct mm_str
gap == RLIM_INFINITY ||
sysctl_legacy_va_layout) {
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
} else {
-@@ -397,6 +405,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -397,6 +403,12 @@ void arch_pick_mmap_layout(struct mm_str
gap = (task_size / 6 * 5);
mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/traps_32.c linux-2.6.37.2/arch/sparc/kernel/traps_32.c
---- linux-2.6.37.2/arch/sparc/kernel/traps_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/traps_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/traps_32.c linux-2.6.38.1/arch/sparc/kernel/traps_32.c
+--- linux-2.6.38.1/arch/sparc/kernel/traps_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/traps_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -76,7 +76,7 @@ void die_if_kernel(char *str, struct pt_
count++ < 30 &&
(((unsigned long) rw) >= PAGE_OFFSET) &&
(void *) rw->ins[7]);
rw = (struct reg_window32 *)rw->ins[6];
}
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/traps_64.c linux-2.6.37.2/arch/sparc/kernel/traps_64.c
---- linux-2.6.37.2/arch/sparc/kernel/traps_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/traps_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/traps_64.c linux-2.6.38.1/arch/sparc/kernel/traps_64.c
+--- linux-2.6.38.1/arch/sparc/kernel/traps_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/traps_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -75,7 +75,7 @@ static void dump_tl1_traplog(struct tl1_
i + 1,
p->trapstack[i].tstate, p->trapstack[i].tpc,
(void *) rw->ins[7]);
rw = kernel_stack_up(rw);
-diff -urNp linux-2.6.37.2/arch/sparc/kernel/unaligned_64.c linux-2.6.37.2/arch/sparc/kernel/unaligned_64.c
---- linux-2.6.37.2/arch/sparc/kernel/unaligned_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/kernel/unaligned_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/kernel/unaligned_64.c linux-2.6.38.1/arch/sparc/kernel/unaligned_64.c
+--- linux-2.6.38.1/arch/sparc/kernel/unaligned_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/kernel/unaligned_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -278,7 +278,7 @@ static void log_unaligned(struct pt_regs
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
regs->tpc, (void *) regs->tpc);
}
}
-diff -urNp linux-2.6.37.2/arch/sparc/lib/atomic_64.S linux-2.6.37.2/arch/sparc/lib/atomic_64.S
---- linux-2.6.37.2/arch/sparc/lib/atomic_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/lib/atomic_64.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/lib/atomic_64.S linux-2.6.38.1/arch/sparc/lib/atomic_64.S
+--- linux-2.6.38.1/arch/sparc/lib/atomic_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/lib/atomic_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -18,7 +18,12 @@
atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
BACKOFF_SETUP(%o2)
casx [%o1], %g1, %g7
cmp %g1, %g7
bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
-diff -urNp linux-2.6.37.2/arch/sparc/lib/ksyms.c linux-2.6.37.2/arch/sparc/lib/ksyms.c
---- linux-2.6.37.2/arch/sparc/lib/ksyms.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/lib/ksyms.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/lib/ksyms.c linux-2.6.38.1/arch/sparc/lib/ksyms.c
+--- linux-2.6.38.1/arch/sparc/lib/ksyms.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/lib/ksyms.c 2011-03-21 18:31:35.000000000 -0400
@@ -142,12 +142,17 @@ EXPORT_SYMBOL(__downgrade_write);
/* Atomic counter implementation. */
EXPORT_SYMBOL(atomic64_sub_ret);
/* Atomic bit operations. */
-diff -urNp linux-2.6.37.2/arch/sparc/Makefile linux-2.6.37.2/arch/sparc/Makefile
---- linux-2.6.37.2/arch/sparc/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/Makefile 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/Makefile linux-2.6.38.1/arch/sparc/Makefile
+--- linux-2.6.38.1/arch/sparc/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
# Export what is needed by arch/sparc/boot/Makefile
export VMLINUX_INIT VMLINUX_MAIN
VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
VMLINUX_MAIN += $(drivers-y) $(net-y)
-diff -urNp linux-2.6.37.2/arch/sparc/mm/fault_32.c linux-2.6.37.2/arch/sparc/mm/fault_32.c
---- linux-2.6.37.2/arch/sparc/mm/fault_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/fault_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/fault_32.c linux-2.6.38.1/arch/sparc/mm/fault_32.c
+--- linux-2.6.38.1/arch/sparc/mm/fault_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/fault_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -22,6 +22,9 @@
#include <linux/interrupt.h>
#include <linux/module.h>
/* Allow reads even for write-only mappings */
if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
-diff -urNp linux-2.6.37.2/arch/sparc/mm/fault_64.c linux-2.6.37.2/arch/sparc/mm/fault_64.c
---- linux-2.6.37.2/arch/sparc/mm/fault_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/fault_64.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/fault_64.c linux-2.6.38.1/arch/sparc/mm/fault_64.c
+--- linux-2.6.38.1/arch/sparc/mm/fault_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/fault_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -21,6 +21,9 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
/* 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.37.2/arch/sparc/mm/hugetlbpage.c linux-2.6.37.2/arch/sparc/mm/hugetlbpage.c
---- linux-2.6.37.2/arch/sparc/mm/hugetlbpage.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/hugetlbpage.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/hugetlbpage.c linux-2.6.38.1/arch/sparc/mm/hugetlbpage.c
+--- linux-2.6.38.1/arch/sparc/mm/hugetlbpage.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/hugetlbpage.c 2011-03-21 23:47:41.000000000 -0400
@@ -68,7 +68,7 @@ full_search:
}
return -ENOMEM;
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -125,7 +125,7 @@ hugetlb_get_unmapped_area_topdown(struct
+@@ -116,16 +116,17 @@ hugetlb_get_unmapped_area_topdown(struct
+ if (unlikely(mm->mmap_base < len))
+ goto bottomup;
+
+- addr = (mm->mmap_base-len) & HPAGE_MASK;
++ addr = mm->mmap_base - len;
+
+ do {
++ addr &= HPAGE_MASK;
+ /*
+ * Lookup failure means no vma is above this address,
+ * else if new region fits below vma->vm_start,
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
}
-@@ -182,8 +182,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -135,8 +136,8 @@ hugetlb_get_unmapped_area_topdown(struct
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = (vma->vm_start-len) & HPAGE_MASK;
+- } while (likely(len < vma->vm_start));
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+ bottomup:
+ /*
+@@ -182,8 +183,7 @@ hugetlb_get_unmapped_area(struct file *f
if (addr) {
addr = ALIGN(addr, HPAGE_SIZE);
vma = find_vma(mm, addr);
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-2.6.37.2/arch/sparc/mm/init_32.c linux-2.6.37.2/arch/sparc/mm/init_32.c
---- linux-2.6.37.2/arch/sparc/mm/init_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/init_32.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/init_32.c linux-2.6.38.1/arch/sparc/mm/init_32.c
+--- linux-2.6.38.1/arch/sparc/mm/init_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/init_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -318,6 +318,9 @@ extern void device_scan(void);
pgprot_t PAGE_SHARED __read_mostly;
EXPORT_SYMBOL(PAGE_SHARED);
protection_map[12] = PAGE_READONLY;
protection_map[13] = PAGE_READONLY;
protection_map[14] = PAGE_SHARED;
-diff -urNp linux-2.6.37.2/arch/sparc/mm/Makefile linux-2.6.37.2/arch/sparc/mm/Makefile
---- linux-2.6.37.2/arch/sparc/mm/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/Makefile 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/Makefile linux-2.6.38.1/arch/sparc/mm/Makefile
+--- linux-2.6.38.1/arch/sparc/mm/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -2,7 +2,7 @@
#
obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
obj-y += fault_$(BITS).o
-diff -urNp linux-2.6.37.2/arch/sparc/mm/srmmu.c linux-2.6.37.2/arch/sparc/mm/srmmu.c
---- linux-2.6.37.2/arch/sparc/mm/srmmu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/sparc/mm/srmmu.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/sparc/mm/srmmu.c linux-2.6.38.1/arch/sparc/mm/srmmu.c
+--- linux-2.6.38.1/arch/sparc/mm/srmmu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/sparc/mm/srmmu.c 2011-03-21 18:31:35.000000000 -0400
@@ -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));
BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
-diff -urNp linux-2.6.37.2/arch/um/include/asm/kmap_types.h linux-2.6.37.2/arch/um/include/asm/kmap_types.h
---- linux-2.6.37.2/arch/um/include/asm/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/um/include/asm/kmap_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/um/include/asm/kmap_types.h linux-2.6.38.1/arch/um/include/asm/kmap_types.h
+--- linux-2.6.38.1/arch/um/include/asm/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/um/include/asm/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
KM_TYPE_NR
};
-diff -urNp linux-2.6.37.2/arch/um/include/asm/page.h linux-2.6.37.2/arch/um/include/asm/page.h
---- linux-2.6.37.2/arch/um/include/asm/page.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/um/include/asm/page.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/um/include/asm/page.h linux-2.6.38.1/arch/um/include/asm/page.h
+--- linux-2.6.38.1/arch/um/include/asm/page.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/um/include/asm/page.h 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,9 @@
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifndef __ASSEMBLY__
struct page;
-diff -urNp linux-2.6.37.2/arch/um/kernel/process.c linux-2.6.37.2/arch/um/kernel/process.c
---- linux-2.6.37.2/arch/um/kernel/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/um/kernel/process.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/um/kernel/process.c linux-2.6.38.1/arch/um/kernel/process.c
+--- linux-2.6.38.1/arch/um/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/um/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
@@ -404,22 +404,6 @@ int singlestepping(void * t)
return 2;
}
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack_page, sp, ip;
-diff -urNp linux-2.6.37.2/arch/um/sys-i386/syscalls.c linux-2.6.37.2/arch/um/sys-i386/syscalls.c
---- linux-2.6.37.2/arch/um/sys-i386/syscalls.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/um/sys-i386/syscalls.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/um/sys-i386/syscalls.c linux-2.6.38.1/arch/um/sys-i386/syscalls.c
+--- linux-2.6.38.1/arch/um/sys-i386/syscalls.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/um/sys-i386/syscalls.c 2011-03-21 18:31:35.000000000 -0400
@@ -11,6 +11,21 @@
#include "asm/uaccess.h"
#include "asm/unistd.h"
/*
* The prototype on i386 is:
*
-diff -urNp linux-2.6.37.2/arch/x86/boot/bitops.h linux-2.6.37.2/arch/x86/boot/bitops.h
---- linux-2.6.37.2/arch/x86/boot/bitops.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/bitops.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/bitops.h linux-2.6.38.1/arch/x86/boot/bitops.h
+--- linux-2.6.38.1/arch/x86/boot/bitops.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/bitops.h 2011-03-21 18:31:35.000000000 -0400
@@ -26,7 +26,7 @@ static inline int variable_test_bit(int
u8 v;
const u32 *p = (const u32 *)addr;
}
#endif /* BOOT_BITOPS_H */
-diff -urNp linux-2.6.37.2/arch/x86/boot/boot.h linux-2.6.37.2/arch/x86/boot/boot.h
---- linux-2.6.37.2/arch/x86/boot/boot.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/boot.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/boot.h linux-2.6.38.1/arch/x86/boot/boot.h
+--- linux-2.6.38.1/arch/x86/boot/boot.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/boot.h 2011-03-21 18:31:35.000000000 -0400
@@ -85,7 +85,7 @@ static inline void io_delay(void)
static inline u16 ds(void)
{
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
-diff -urNp linux-2.6.37.2/arch/x86/boot/compressed/head_32.S linux-2.6.37.2/arch/x86/boot/compressed/head_32.S
---- linux-2.6.37.2/arch/x86/boot/compressed/head_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/compressed/head_32.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/compressed/head_32.S linux-2.6.38.1/arch/x86/boot/compressed/head_32.S
+--- linux-2.6.38.1/arch/x86/boot/compressed/head_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/compressed/head_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -76,7 +76,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
jmp 1b
2:
-diff -urNp linux-2.6.37.2/arch/x86/boot/compressed/head_64.S linux-2.6.37.2/arch/x86/boot/compressed/head_64.S
---- linux-2.6.37.2/arch/x86/boot/compressed/head_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/compressed/head_64.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/compressed/head_64.S linux-2.6.38.1/arch/x86/boot/compressed/head_64.S
+--- linux-2.6.38.1/arch/x86/boot/compressed/head_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/compressed/head_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -91,7 +91,7 @@ ENTRY(startup_32)
notl %eax
andl %eax, %ebx
#endif
/* Target address to relocate to for decompression */
-diff -urNp linux-2.6.37.2/arch/x86/boot/compressed/misc.c linux-2.6.37.2/arch/x86/boot/compressed/misc.c
---- linux-2.6.37.2/arch/x86/boot/compressed/misc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/compressed/misc.c 2011-01-17 02:41:00.000000000 -0500
-@@ -306,7 +306,7 @@ static void parse_elf(void *output)
+diff -urNp linux-2.6.38.1/arch/x86/boot/compressed/misc.c linux-2.6.38.1/arch/x86/boot/compressed/misc.c
+--- linux-2.6.38.1/arch/x86/boot/compressed/misc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/compressed/misc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -310,7 +310,7 @@ static void parse_elf(void *output)
case PT_LOAD:
#ifdef CONFIG_RELOCATABLE
dest = output;
#else
dest = (void *)(phdr->p_paddr);
#endif
-@@ -359,7 +359,7 @@ asmlinkage void decompress_kernel(void *
+@@ -363,7 +363,7 @@ asmlinkage void decompress_kernel(void *
error("Destination address too large");
#endif
#ifndef CONFIG_RELOCATABLE
error("Wrong destination address");
#endif
-diff -urNp linux-2.6.37.2/arch/x86/boot/compressed/mkpiggy.c linux-2.6.37.2/arch/x86/boot/compressed/mkpiggy.c
---- linux-2.6.37.2/arch/x86/boot/compressed/mkpiggy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/compressed/mkpiggy.c 2011-01-17 02:41:00.000000000 -0500
-@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
-
- offs = (olen > ilen) ? olen - ilen : 0;
- offs += olen >> 12; /* Add 8 bytes for each 32K block */
-- offs += 32*1024 + 18; /* Add 32K + 18 bytes slack */
-+ offs += 64*1024; /* Add 64K bytes slack */
- offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
-
- printf(".section \".rodata..compressed\",\"a\",@progbits\n");
-diff -urNp linux-2.6.37.2/arch/x86/boot/compressed/relocs.c linux-2.6.37.2/arch/x86/boot/compressed/relocs.c
---- linux-2.6.37.2/arch/x86/boot/compressed/relocs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/compressed/relocs.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/compressed/relocs.c linux-2.6.38.1/arch/x86/boot/compressed/relocs.c
+--- linux-2.6.38.1/arch/x86/boot/compressed/relocs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/compressed/relocs.c 2011-03-21 18:31:35.000000000 -0400
@@ -13,8 +13,11 @@
static void die(char *fmt, ...);
read_shdrs(fp);
read_strtabs(fp);
read_symtabs(fp);
-diff -urNp linux-2.6.37.2/arch/x86/boot/cpucheck.c linux-2.6.37.2/arch/x86/boot/cpucheck.c
---- linux-2.6.37.2/arch/x86/boot/cpucheck.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/cpucheck.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/cpucheck.c linux-2.6.38.1/arch/x86/boot/cpucheck.c
+--- linux-2.6.38.1/arch/x86/boot/cpucheck.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/cpucheck.c 2011-03-21 18:31:35.000000000 -0400
@@ -74,7 +74,7 @@ static int has_fpu(void)
u16 fcw = -1, fsw = -1;
u32 cr0;
err = check_flags();
}
-diff -urNp linux-2.6.37.2/arch/x86/boot/header.S linux-2.6.37.2/arch/x86/boot/header.S
---- linux-2.6.37.2/arch/x86/boot/header.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/header.S 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/header.S linux-2.6.38.1/arch/x86/boot/header.S
+--- linux-2.6.38.1/arch/x86/boot/header.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/header.S 2011-03-21 18:31:35.000000000 -0400
@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical
# single linked list of
# struct setup_data
#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.37.2/arch/x86/boot/memory.c linux-2.6.37.2/arch/x86/boot/memory.c
---- linux-2.6.37.2/arch/x86/boot/memory.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/memory.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/memory.c linux-2.6.38.1/arch/x86/boot/memory.c
+--- linux-2.6.38.1/arch/x86/boot/memory.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/memory.c 2011-03-21 18:31:35.000000000 -0400
@@ -19,7 +19,7 @@
static int detect_memory_e820(void)
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.37.2/arch/x86/boot/video.c linux-2.6.37.2/arch/x86/boot/video.c
---- linux-2.6.37.2/arch/x86/boot/video.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/video.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/video.c linux-2.6.38.1/arch/x86/boot/video.c
+--- linux-2.6.38.1/arch/x86/boot/video.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/video.c 2011-03-21 18:31:35.000000000 -0400
@@ -96,7 +96,7 @@ static void store_mode_params(void)
static unsigned int get_entry(void)
{
int key;
unsigned int v;
-diff -urNp linux-2.6.37.2/arch/x86/boot/video-vesa.c linux-2.6.37.2/arch/x86/boot/video-vesa.c
---- linux-2.6.37.2/arch/x86/boot/video-vesa.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/boot/video-vesa.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/boot/video-vesa.c linux-2.6.38.1/arch/x86/boot/video-vesa.c
+--- linux-2.6.38.1/arch/x86/boot/video-vesa.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/boot/video-vesa.c 2011-03-21 18:31:35.000000000 -0400
@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
boot_params.screen_info.vesapm_seg = oreg.es;
}
/*
-diff -urNp linux-2.6.37.2/arch/x86/ia32/ia32_aout.c linux-2.6.37.2/arch/x86/ia32/ia32_aout.c
---- linux-2.6.37.2/arch/x86/ia32/ia32_aout.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/ia32/ia32_aout.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/ia32/ia32_aout.c linux-2.6.38.1/arch/x86/ia32/ia32_aout.c
+--- linux-2.6.38.1/arch/x86/ia32/ia32_aout.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/ia32/ia32_aout.c 2011-03-21 18:31:35.000000000 -0400
@@ -162,6 +162,8 @@ static int aout_core_dump(long signr, st
unsigned long dump_start, dump_size;
struct user32 dump;
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
-diff -urNp linux-2.6.37.2/arch/x86/ia32/ia32entry.S linux-2.6.37.2/arch/x86/ia32/ia32entry.S
---- linux-2.6.37.2/arch/x86/ia32/ia32entry.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/ia32/ia32entry.S 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/ia32/ia32entry.S linux-2.6.38.1/arch/x86/ia32/ia32entry.S
+--- linux-2.6.38.1/arch/x86/ia32/ia32entry.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/ia32/ia32entry.S 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,7 @@
#include <asm/thread_info.h>
#include <asm/segment.h>
/*
* No need to follow this irqs on/off section: the syscall
* disabled irqs and here we enable it straight after entry:
-diff -urNp linux-2.6.37.2/arch/x86/ia32/ia32_signal.c linux-2.6.37.2/arch/x86/ia32/ia32_signal.c
---- linux-2.6.37.2/arch/x86/ia32/ia32_signal.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/ia32/ia32_signal.c 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/ia32/ia32_signal.c linux-2.6.38.1/arch/x86/ia32/ia32_signal.c
+--- linux-2.6.38.1/arch/x86/ia32/ia32_signal.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/ia32/ia32_signal.c 2011-03-21 18:31:35.000000000 -0400
@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct
sp -= frame_size;
/* Align the stack pointer according to the i386 ABI,
} put_user_catch(err);
if (err)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/alternative.h linux-2.6.37.2/arch/x86/include/asm/alternative.h
---- linux-2.6.37.2/arch/x86/include/asm/alternative.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/alternative.h 2011-01-17 02:41:00.000000000 -0500
-@@ -93,7 +93,7 @@ static inline int alternatives_text_rese
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/alternative.h linux-2.6.38.1/arch/x86/include/asm/alternative.h
+--- linux-2.6.38.1/arch/x86/include/asm/alternative.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/alternative.h 2011-03-21 18:31:35.000000000 -0400
+@@ -94,7 +94,7 @@ static inline int alternatives_text_rese
".section .discard,\"aw\",@progbits\n" \
" .byte 0xff + (664f-663f) - (662b-661b)\n" /* rlen <= slen */ \
".previous\n" \
"663:\n\t" newinstr "\n664:\n" /* replacement */ \
".previous"
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/apm.h linux-2.6.37.2/arch/x86/include/asm/apm.h
---- linux-2.6.37.2/arch/x86/include/asm/apm.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/apm.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/apm.h linux-2.6.38.1/arch/x86/include/asm/apm.h
+--- linux-2.6.38.1/arch/x86/include/asm/apm.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/apm.h 2011-03-21 18:31:35.000000000 -0400
@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"setc %%bl\n\t"
"popl %%ebp\n\t"
"popl %%edi\n\t"
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/atomic64_32.h linux-2.6.37.2/arch/x86/include/asm/atomic64_32.h
---- linux-2.6.37.2/arch/x86/include/asm/atomic64_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/atomic64_32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/atomic64_32.h linux-2.6.38.1/arch/x86/include/asm/atomic64_32.h
+--- linux-2.6.38.1/arch/x86/include/asm/atomic64_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/atomic64_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,6 +12,14 @@ typedef struct {
u64 __aligned(8) counter;
} atomic64_t;
#define ATOMIC64_INIT(val) { (val) }
#ifdef CONFIG_X86_CMPXCHG64
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/atomic64_64.h linux-2.6.37.2/arch/x86/include/asm/atomic64_64.h
---- linux-2.6.37.2/arch/x86/include/asm/atomic64_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/atomic64_64.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/atomic64_64.h linux-2.6.38.1/arch/x86/include/asm/atomic64_64.h
+--- linux-2.6.38.1/arch/x86/include/asm/atomic64_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/atomic64_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -18,7 +18,19 @@
*/
static inline long atomic64_read(const atomic64_t *v)
}
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/atomic.h linux-2.6.37.2/arch/x86/include/asm/atomic.h
---- linux-2.6.37.2/arch/x86/include/asm/atomic.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/atomic.h 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/atomic.h linux-2.6.38.1/arch/x86/include/asm/atomic.h
+--- linux-2.6.38.1/arch/x86/include/asm/atomic.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/atomic.h 2011-03-21 18:31:35.000000000 -0400
@@ -22,7 +22,18 @@
*/
static inline int atomic_read(const atomic_t *v)
/*
* atomic_dec_if_positive - decrement by 1 if old value positive
* @v: pointer of type atomic_t
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/bitops.h linux-2.6.37.2/arch/x86/include/asm/bitops.h
---- linux-2.6.37.2/arch/x86/include/asm/bitops.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/bitops.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/bitops.h linux-2.6.38.1/arch/x86/include/asm/bitops.h
+--- linux-2.6.38.1/arch/x86/include/asm/bitops.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/bitops.h 2011-03-21 18:31:35.000000000 -0400
@@ -38,7 +38,7 @@
* a mask operation on a byte.
*/
#define CONST_MASK(nr) (1 << ((nr) & 7))
/**
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/boot.h linux-2.6.37.2/arch/x86/include/asm/boot.h
---- linux-2.6.37.2/arch/x86/include/asm/boot.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/boot.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/boot.h linux-2.6.38.1/arch/x86/include/asm/boot.h
+--- linux-2.6.38.1/arch/x86/include/asm/boot.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/boot.h 2011-03-21 18:31:35.000000000 -0400
@@ -11,10 +11,15 @@
#include <asm/pgtable_types.h>
/* Minimum kernel alignment, as a power of two */
#ifdef CONFIG_X86_64
#define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/cacheflush.h linux-2.6.37.2/arch/x86/include/asm/cacheflush.h
---- linux-2.6.37.2/arch/x86/include/asm/cacheflush.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/cacheflush.h 2011-01-17 02:41:00.000000000 -0500
-@@ -66,7 +66,7 @@ static inline unsigned long get_page_mem
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/cacheflush.h linux-2.6.38.1/arch/x86/include/asm/cacheflush.h
+--- linux-2.6.38.1/arch/x86/include/asm/cacheflush.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/cacheflush.h 2011-03-21 18:31:35.000000000 -0400
+@@ -26,7 +26,7 @@ static inline unsigned long get_page_mem
unsigned long pg_flags = pg->flags & _PGMT_MASK;
if (pg_flags == _PGMT_DEFAULT)
else if (pg_flags == _PGMT_WC)
return _PAGE_CACHE_WC;
else if (pg_flags == _PGMT_UC_MINUS)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/cache.h linux-2.6.37.2/arch/x86/include/asm/cache.h
---- linux-2.6.37.2/arch/x86/include/asm/cache.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/cache.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/cache.h linux-2.6.38.1/arch/x86/include/asm/cache.h
+--- linux-2.6.38.1/arch/x86/include/asm/cache.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/cache.h 2011-03-21 18:31:35.000000000 -0400
@@ -8,6 +8,7 @@
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/checksum_32.h linux-2.6.37.2/arch/x86/include/asm/checksum_32.h
---- linux-2.6.37.2/arch/x86/include/asm/checksum_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/checksum_32.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/checksum_32.h linux-2.6.38.1/arch/x86/include/asm/checksum_32.h
+--- linux-2.6.38.1/arch/x86/include/asm/checksum_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/checksum_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene
int len, __wsum sum,
int *src_err_ptr, int *dst_err_ptr);
len, sum, NULL, err_ptr);
if (len)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/cpufeature.h linux-2.6.37.2/arch/x86/include/asm/cpufeature.h
---- linux-2.6.37.2/arch/x86/include/asm/cpufeature.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/cpufeature.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/cpufeature.h linux-2.6.38.1/arch/x86/include/asm/cpufeature.h
+--- linux-2.6.38.1/arch/x86/include/asm/cpufeature.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/cpufeature.h 2011-03-21 18:31:35.000000000 -0400
@@ -349,7 +349,7 @@ static __always_inline __pure bool __sta
".section .discard,\"aw\",@progbits\n"
" .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
"3: movb $1,%0\n"
"4:\n"
".previous\n"
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/desc_defs.h linux-2.6.37.2/arch/x86/include/asm/desc_defs.h
---- linux-2.6.37.2/arch/x86/include/asm/desc_defs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/desc_defs.h 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/desc_defs.h linux-2.6.38.1/arch/x86/include/asm/desc_defs.h
+--- linux-2.6.38.1/arch/x86/include/asm/desc_defs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/desc_defs.h 2011-03-21 18:31:35.000000000 -0400
@@ -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;
+ 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.37.2/arch/x86/include/asm/desc.h linux-2.6.37.2/arch/x86/include/asm/desc.h
---- linux-2.6.37.2/arch/x86/include/asm/desc.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/desc.h 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/desc.h linux-2.6.38.1/arch/x86/include/asm/desc.h
+--- linux-2.6.38.1/arch/x86/include/asm/desc.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/desc.h 2011-03-21 18:31:35.000000000 -0400
@@ -4,6 +4,7 @@
#include <asm/desc_defs.h>
#include <asm/ldt.h>
- gate->a = (seg << 16) | (base & 0xffff);
- gate->b = (base & 0xffff0000) |
- (((0x80 | type | (dpl << 5)) & 0xff) << 8);
-+ gate->offset_low = base;
-+ gate->seg = seg;
-+ gate->reserved = 0;
-+ gate->type = type;
-+ gate->s = 0;
-+ gate->dpl = dpl;
-+ gate->p = 1;
-+ gate->offset_high = base >> 16;
++ gate->gate.offset_low = base;
++ gate->gate.seg = seg;
++ gate->gate.reserved = 0;
++ gate->gate.type = type;
++ gate->gate.s = 0;
++ gate->gate.dpl = dpl;
++ gate->gate.p = 1;
++ gate->gate.offset_high = base >> 16;
}
#endif
+#endif
+
#endif /* _ASM_X86_DESC_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/device.h linux-2.6.37.2/arch/x86/include/asm/device.h
---- linux-2.6.37.2/arch/x86/include/asm/device.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/device.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/device.h linux-2.6.38.1/arch/x86/include/asm/device.h
+--- linux-2.6.38.1/arch/x86/include/asm/device.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/device.h 2011-03-21 18:31:35.000000000 -0400
@@ -6,7 +6,7 @@ struct dev_archdata {
void *acpi_handle;
#endif
#endif
#if defined(CONFIG_DMAR) || defined(CONFIG_AMD_IOMMU)
void *iommu; /* hook for IOMMU specific extension */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/dma-mapping.h linux-2.6.37.2/arch/x86/include/asm/dma-mapping.h
---- linux-2.6.37.2/arch/x86/include/asm/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/dma-mapping.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/dma-mapping.h linux-2.6.38.1/arch/x86/include/asm/dma-mapping.h
+--- linux-2.6.38.1/arch/x86/include/asm/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -26,9 +26,9 @@ extern int iommu_merge;
extern struct device x86_dma_fallback_dev;
extern int panic_on_overflow;
WARN_ON(irqs_disabled()); /* for portability */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/e820.h linux-2.6.37.2/arch/x86/include/asm/e820.h
---- linux-2.6.37.2/arch/x86/include/asm/e820.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/e820.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/e820.h linux-2.6.38.1/arch/x86/include/asm/e820.h
+--- linux-2.6.38.1/arch/x86/include/asm/e820.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/e820.h 2011-03-21 18:31:35.000000000 -0400
@@ -69,7 +69,7 @@ struct e820map {
#define ISA_START_ADDRESS 0xa0000
#define ISA_END_ADDRESS 0x100000
#define BIOS_END 0x00100000
#define BIOS_ROM_BASE 0xffe00000
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/elf.h linux-2.6.37.2/arch/x86/include/asm/elf.h
---- linux-2.6.37.2/arch/x86/include/asm/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/elf.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/elf.h linux-2.6.38.1/arch/x86/include/asm/elf.h
+--- linux-2.6.38.1/arch/x86/include/asm/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -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. */
-#define arch_randomize_brk arch_randomize_brk
-
#endif /* _ASM_X86_ELF_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/futex.h linux-2.6.37.2/arch/x86/include/asm/futex.h
---- linux-2.6.37.2/arch/x86/include/asm/futex.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/futex.h 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/futex.h linux-2.6.38.1/arch/x86/include/asm/futex.h
+--- linux-2.6.38.1/arch/x86/include/asm/futex.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/futex.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,16 +12,18 @@
#include <asm/system.h>
switch (op) {
case FUTEX_OP_SET:
- __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
-+ __futex_atomic_op1("xchgl %0, "__copyuser_seg"%2", ret, oldval, uaddr, oparg);
++ __futex_atomic_op1(__copyuser_seg"xchgl %0, %2", ret, oldval, uaddr, oparg);
break;
case FUTEX_OP_ADD:
- __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval,
-+ __futex_atomic_op1(LOCK_PREFIX "xaddl %0, "__copyuser_seg"%2", ret, oldval,
++ __futex_atomic_op1(LOCK_PREFIX __copyuser_seg"xaddl %0, %2", ret, oldval,
uaddr, oparg);
break;
case FUTEX_OP_OR:
return -EFAULT;
- asm volatile("1:\t" LOCK_PREFIX "cmpxchgl %3, %1\n"
-+ asm volatile("1:\t" LOCK_PREFIX "cmpxchgl %3, "__copyuser_seg"%1\n"
++ asm volatile("1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgl %3, %1\n"
"2:\t.section .fixup, \"ax\"\n"
"3:\tmov %2, %0\n"
"\tjmp 2b\n"
: "i" (-EFAULT), "r" (newval), "0" (oldval)
: "memory"
);
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/i387.h linux-2.6.37.2/arch/x86/include/asm/i387.h
---- linux-2.6.37.2/arch/x86/include/asm/i387.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/i387.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/i387.h linux-2.6.38.1/arch/x86/include/asm/i387.h
+--- linux-2.6.38.1/arch/x86/include/asm/i387.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/i387.h 2011-03-21 18:31:35.000000000 -0400
@@ -92,6 +92,11 @@ static inline int fxrstor_checking(struc
{
int err;
+#endif
+
/* See comment in fxsave() below. */
- asm volatile("1: rex64/fxrstor (%[fx])\n\t"
- "2:\n"
-@@ -109,6 +114,11 @@ static inline int fxsave_user(struct i38
+ #ifdef CONFIG_AS_FXSAVEQ
+ asm volatile("1: fxrstorq %[fx]\n\t"
+@@ -121,6 +126,11 @@ static inline int fxsave_user(struct i38
{
int err;
/*
* Clear the bytes not touched by the fxsave and reserved
* for the SW usage.
-@@ -189,13 +199,8 @@ static inline void fpu_fxsave(struct fpu
+@@ -213,13 +223,8 @@ static inline void fpu_fxsave(struct fpu
#endif /* CONFIG_X86_64 */
/* We need a safe address that is cheap to find and that is already
/*
* These must be called with preempt disabled
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/io.h linux-2.6.37.2/arch/x86/include/asm/io.h
---- linux-2.6.37.2/arch/x86/include/asm/io.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/io.h 2011-01-27 22:37:21.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/io.h linux-2.6.38.1/arch/x86/include/asm/io.h
+--- linux-2.6.38.1/arch/x86/include/asm/io.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/io.h 2011-03-21 18:31:35.000000000 -0400
@@ -216,6 +216,17 @@ extern void set_iounmap_nonlazy(void);
#include <linux/vmalloc.h>
/*
* Convert a virtual cached pointer to an uncached pointer
*/
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/iommu.h linux-2.6.37.2/arch/x86/include/asm/iommu.h
---- linux-2.6.37.2/arch/x86/include/asm/iommu.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/iommu.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/iommu.h linux-2.6.38.1/arch/x86/include/asm/iommu.h
+--- linux-2.6.38.1/arch/x86/include/asm/iommu.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/iommu.h 2011-03-21 18:31:35.000000000 -0400
@@ -1,7 +1,7 @@
#ifndef _ASM_X86_IOMMU_H
#define _ASM_X86_IOMMU_H
extern int force_iommu, no_iommu;
extern int iommu_detected;
extern int iommu_pass_through;
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/irqflags.h linux-2.6.37.2/arch/x86/include/asm/irqflags.h
---- linux-2.6.37.2/arch/x86/include/asm/irqflags.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/irqflags.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/irqflags.h linux-2.6.38.1/arch/x86/include/asm/irqflags.h
+--- linux-2.6.38.1/arch/x86/include/asm/irqflags.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/irqflags.h 2011-03-21 18:31:35.000000000 -0400
@@ -140,6 +140,11 @@ static inline unsigned long arch_local_i
sti; \
sysexit
#else
#define INTERRUPT_RETURN iret
#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/kvm_host.h linux-2.6.37.2/arch/x86/include/asm/kvm_host.h
---- linux-2.6.37.2/arch/x86/include/asm/kvm_host.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/kvm_host.h 2011-01-17 02:41:00.000000000 -0500
-@@ -585,7 +585,7 @@ struct kvm_x86_ops {
- const struct trace_print_flags *exit_reasons_str;
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/kvm_host.h linux-2.6.38.1/arch/x86/include/asm/kvm_host.h
+--- linux-2.6.38.1/arch/x86/include/asm/kvm_host.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/kvm_host.h 2011-03-21 18:31:35.000000000 -0400
+@@ -603,7 +603,7 @@ struct kvm_arch_async_pf {
+ bool direct_map;
};
-extern struct kvm_x86_ops *kvm_x86_ops;
int kvm_mmu_module_init(void);
void kvm_mmu_module_exit(void);
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/local.h linux-2.6.37.2/arch/x86/include/asm/local.h
---- linux-2.6.37.2/arch/x86/include/asm/local.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/local.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/local.h linux-2.6.38.1/arch/x86/include/asm/local.h
+--- linux-2.6.38.1/arch/x86/include/asm/local.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/local.h 2011-03-21 18:31:35.000000000 -0400
@@ -18,26 +18,58 @@ typedef struct {
static inline void local_inc(local_t *l)
: "+r" (i), "+m" (l->a.counter)
: : "memory");
return i + __i;
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/mc146818rtc.h linux-2.6.37.2/arch/x86/include/asm/mc146818rtc.h
---- linux-2.6.37.2/arch/x86/include/asm/mc146818rtc.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/mc146818rtc.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/mc146818rtc.h linux-2.6.38.1/arch/x86/include/asm/mc146818rtc.h
+--- linux-2.6.38.1/arch/x86/include/asm/mc146818rtc.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/mc146818rtc.h 2011-03-21 18:31:35.000000000 -0400
@@ -81,8 +81,8 @@ static inline unsigned char current_lock
#else
#define lock_cmos_prefix(reg) do {} while (0)
#define do_i_have_lock_cmos() 0
#define current_lock_cmos_reg() 0
#endif
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/microcode.h linux-2.6.37.2/arch/x86/include/asm/microcode.h
---- linux-2.6.37.2/arch/x86/include/asm/microcode.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/microcode.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/mce.h linux-2.6.38.1/arch/x86/include/asm/mce.h
+--- linux-2.6.38.1/arch/x86/include/asm/mce.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/mce.h 2011-03-21 18:31:35.000000000 -0400
+@@ -198,7 +198,7 @@ int mce_notify_irq(void);
+ void mce_notify_process(void);
+
+ DECLARE_PER_CPU(struct mce, injectm);
+-extern struct file_operations mce_chrdev_ops;
++extern struct file_operations mce_chrdev_ops; /* cannot be const, see arch/x86/kernel/cpu/mcheck/mce. */
+
+ /*
+ * Exception handler
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/microcode.h linux-2.6.38.1/arch/x86/include/asm/microcode.h
+--- linux-2.6.38.1/arch/x86/include/asm/microcode.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/microcode.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,13 +12,13 @@ struct device;
enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND };
/*
* The generic 'microcode_core' part guarantees that
-@@ -38,18 +38,18 @@ struct ucode_cpu_info {
+@@ -38,16 +38,16 @@ struct ucode_cpu_info {
extern struct ucode_cpu_info ucode_cpu_info[];
#ifdef CONFIG_MICROCODE_INTEL
#ifdef CONFIG_MICROCODE_AMD
-extern struct microcode_ops * __init init_amd_microcode(void);
+extern const struct microcode_ops * __init init_amd_microcode(void);
+
+ static inline void get_ucode_data(void *to, const u8 *from, size_t n)
+ {
+@@ -55,7 +55,7 @@ static inline void get_ucode_data(void *
+ }
+
#else
-static inline struct microcode_ops * __init init_amd_microcode(void)
+static inline const struct microcode_ops * __init init_amd_microcode(void)
{
return NULL;
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/mman.h linux-2.6.37.2/arch/x86/include/asm/mman.h
---- linux-2.6.37.2/arch/x86/include/asm/mman.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/mman.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/mman.h linux-2.6.38.1/arch/x86/include/asm/mman.h
+--- linux-2.6.38.1/arch/x86/include/asm/mman.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/mman.h 2011-03-21 18:31:35.000000000 -0400
@@ -5,4 +5,14 @@
#include <asm-generic/mman.h>
+#endif
+
#endif /* _ASM_X86_MMAN_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/mmu_context.h linux-2.6.37.2/arch/x86/include/asm/mmu_context.h
---- linux-2.6.37.2/arch/x86/include/asm/mmu_context.h 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/mmu_context.h 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/mmu_context.h linux-2.6.38.1/arch/x86/include/asm/mmu_context.h
+--- linux-2.6.38.1/arch/x86/include/asm/mmu_context.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/mmu_context.h 2011-03-21 18:31:35.000000000 -0400
@@ -24,6 +24,21 @@ void destroy_context(struct mm_struct *m
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
}
#define activate_mm(prev, next) \
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/mmu.h linux-2.6.37.2/arch/x86/include/asm/mmu.h
---- linux-2.6.37.2/arch/x86/include/asm/mmu.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/mmu.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/mmu.h linux-2.6.38.1/arch/x86/include/asm/mmu.h
+--- linux-2.6.38.1/arch/x86/include/asm/mmu.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/mmu.h 2011-03-21 18:31:35.000000000 -0400
@@ -9,10 +9,23 @@
* we put the segment information here.
*/
} mm_context_t;
#ifdef CONFIG_SMP
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/module.h linux-2.6.37.2/arch/x86/include/asm/module.h
---- linux-2.6.37.2/arch/x86/include/asm/module.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/module.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/module.h linux-2.6.38.1/arch/x86/include/asm/module.h
+--- linux-2.6.38.1/arch/x86/include/asm/module.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/module.h 2011-03-21 18:31:35.000000000 -0400
@@ -59,8 +59,26 @@
#error unknown processor family
#endif
#endif
#endif /* _ASM_X86_MODULE_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/page_64_types.h linux-2.6.37.2/arch/x86/include/asm/page_64_types.h
---- linux-2.6.37.2/arch/x86/include/asm/page_64_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/page_64_types.h 2011-01-17 02:41:00.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/page_64_types.h linux-2.6.38.1/arch/x86/include/asm/page_64_types.h
+--- linux-2.6.38.1/arch/x86/include/asm/page_64_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/page_64_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -56,7 +56,7 @@ void copy_page(void *to, void *from);
/* duplicated to the one in bootmem.h */
extern unsigned long __phys_addr(unsigned long);
#define __phys_reloc_hide(x) (x)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/paravirt.h linux-2.6.37.2/arch/x86/include/asm/paravirt.h
---- linux-2.6.37.2/arch/x86/include/asm/paravirt.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/paravirt.h 2011-01-17 02:41:00.000000000 -0500
-@@ -715,6 +715,21 @@ static inline void __set_fixmap(unsigned
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/paravirt.h linux-2.6.38.1/arch/x86/include/asm/paravirt.h
+--- linux-2.6.38.1/arch/x86/include/asm/paravirt.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/paravirt.h 2011-03-21 18:31:35.000000000 -0400
+@@ -739,6 +739,21 @@ static inline void __set_fixmap(unsigned
pv_mmu_ops.set_fixmap(idx, phys, flags);
}
#if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
static inline int arch_spin_is_locked(struct arch_spinlock *lock)
-@@ -931,7 +946,7 @@ extern void default_banner(void);
+@@ -955,7 +970,7 @@ extern void default_banner(void);
#define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
#define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
#endif
#define INTERRUPT_RETURN \
-@@ -1008,6 +1023,21 @@ extern void default_banner(void);
+@@ -1032,6 +1047,21 @@ extern void default_banner(void);
PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit), \
CLBR_NONE, \
jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit))
#endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/paravirt_types.h linux-2.6.37.2/arch/x86/include/asm/paravirt_types.h
---- linux-2.6.37.2/arch/x86/include/asm/paravirt_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/paravirt_types.h 2011-01-17 02:41:00.000000000 -0500
-@@ -311,6 +311,12 @@ struct pv_mmu_ops {
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/paravirt_types.h linux-2.6.38.1/arch/x86/include/asm/paravirt_types.h
+--- linux-2.6.38.1/arch/x86/include/asm/paravirt_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/paravirt_types.h 2011-03-21 18:31:35.000000000 -0400
+@@ -317,6 +317,12 @@ struct pv_mmu_ops {
an mfn. We can tell which is which from the index. */
void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags);
};
struct arch_spinlock;
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pci_x86.h linux-2.6.37.2/arch/x86/include/asm/pci_x86.h
---- linux-2.6.37.2/arch/x86/include/asm/pci_x86.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pci_x86.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pci_x86.h linux-2.6.38.1/arch/x86/include/asm/pci_x86.h
+--- linux-2.6.38.1/arch/x86/include/asm/pci_x86.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pci_x86.h 2011-03-21 18:31:35.000000000 -0400
@@ -93,16 +93,16 @@ extern int (*pcibios_enable_irq)(struct
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
extern bool port_cf9_safe;
/* arch_initcall level */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgalloc.h linux-2.6.37.2/arch/x86/include/asm/pgalloc.h
---- linux-2.6.37.2/arch/x86/include/asm/pgalloc.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgalloc.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgalloc.h linux-2.6.38.1/arch/x86/include/asm/pgalloc.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgalloc.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgalloc.h 2011-03-21 18:31:35.000000000 -0400
@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(s
pmd_t *pmd, pte_t *pte)
{
set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable-2level.h linux-2.6.37.2/arch/x86/include/asm/pgtable-2level.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable-2level.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable-2level.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable-2level.h linux-2.6.38.1/arch/x86/include/asm/pgtable-2level.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable-2level.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable-2level.h 2011-03-21 18:31:35.000000000 -0400
@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
}
static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable_32.h linux-2.6.37.2/arch/x86/include/asm/pgtable_32.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable_32.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable_32.h linux-2.6.38.1/arch/x86/include/asm/pgtable_32.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -25,9 +25,6 @@
struct mm_struct;
struct vm_area_struct;
/*
* kern_addr_valid() is (1) for FLATMEM and (0) for
* SPARSEMEM and DISCONTIGMEM
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable_32_types.h linux-2.6.37.2/arch/x86/include/asm/pgtable_32_types.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable_32_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable_32_types.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable_32_types.h linux-2.6.38.1/arch/x86/include/asm/pgtable_32_types.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable_32_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable_32_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -8,7 +8,7 @@
*/
#ifdef CONFIG_X86_PAE
#define MODULES_VADDR VMALLOC_START
#define MODULES_END VMALLOC_END
#define MODULES_LEN (MODULES_VADDR - MODULES_END)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable-3level.h linux-2.6.37.2/arch/x86/include/asm/pgtable-3level.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable-3level.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable-3level.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable-3level.h linux-2.6.38.1/arch/x86/include/asm/pgtable-3level.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable-3level.h 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable-3level.h 2011-03-23 17:21:43.000000000 -0400
@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
}
/*
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable_64.h linux-2.6.37.2/arch/x86/include/asm/pgtable_64.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable_64.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable_64.h linux-2.6.38.1/arch/x86/include/asm/pgtable_64.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -16,10 +16,13 @@
extern pud_t level3_kernel_pgt[512];
#define swapper_pg_dir init_level4_pgt
-@@ -74,7 +77,9 @@ static inline pte_t native_ptep_get_and_
+@@ -61,7 +64,9 @@ static inline void native_set_pte_atomic
static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
{
}
static inline void native_pmd_clear(pmd_t *pmd)
-@@ -94,7 +99,9 @@ static inline void native_pud_clear(pud_
+@@ -107,7 +112,9 @@ static inline void native_pud_clear(pud_
static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
{
}
static inline void native_pgd_clear(pgd_t *pgd)
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable_64_types.h linux-2.6.37.2/arch/x86/include/asm/pgtable_64_types.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable_64_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable_64_types.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable_64_types.h linux-2.6.38.1/arch/x86/include/asm/pgtable_64_types.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable_64_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable_64_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
#define MODULES_END _AC(0xffffffffff000000, UL)
+#define ktva_ktla(addr) (addr)
#endif /* _ASM_X86_PGTABLE_64_DEFS_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable.h linux-2.6.37.2/arch/x86/include/asm/pgtable.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable.h 2011-01-17 02:41:01.000000000 -0500
-@@ -78,12 +78,51 @@ extern struct mm_struct *pgd_page_get_mm
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable.h linux-2.6.38.1/arch/x86/include/asm/pgtable.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable.h 2011-03-21 18:31:35.000000000 -0400
+@@ -81,12 +81,51 @@ extern struct mm_struct *pgd_page_get_mm
#define arch_end_context_switch(prev) do {} while(0)
static inline int pte_dirty(pte_t pte)
{
return pte_flags(pte) & _PAGE_DIRTY;
-@@ -171,9 +210,29 @@ static inline pte_t pte_wrprotect(pte_t
+@@ -196,9 +235,29 @@ static inline pte_t pte_wrprotect(pte_t
return pte_clear_flags(pte, _PAGE_RW);
}
}
static inline pte_t pte_mkdirty(pte_t pte)
-@@ -306,6 +365,15 @@ pte_t *populate_extra_pte(unsigned long
+@@ -390,6 +449,15 @@ pte_t *populate_extra_pte(unsigned long
#endif
#ifndef __ASSEMBLY__
#include <linux/mm_types.h>
static inline int pte_none(pte_t pte)
-@@ -476,7 +544,7 @@ static inline pud_t *pud_offset(pgd_t *p
+@@ -560,7 +628,7 @@ static inline pud_t *pud_offset(pgd_t *p
static inline int pgd_bad(pgd_t pgd)
{
}
static inline int pgd_none(pgd_t pgd)
-@@ -499,7 +567,12 @@ static inline int pgd_none(pgd_t pgd)
+@@ -583,7 +651,12 @@ static inline int pgd_none(pgd_t pgd)
* pgd_offset() returns a (pgd_t *)
* pgd_index() is used get the offset into the pgd page's array of pgd_t's;
*/
/*
* a shortcut which implies the use of the kernel's pgd, instead
* of a process's
-@@ -510,6 +583,20 @@ static inline int pgd_none(pgd_t pgd)
+@@ -594,6 +667,20 @@ static inline int pgd_none(pgd_t pgd)
#define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
#ifndef __ASSEMBLY__
extern int direct_gbpages;
-@@ -617,11 +704,23 @@ static inline void ptep_set_wrprotect(st
+@@ -758,11 +845,23 @@ static inline void pmdp_set_wrprotect(st
* dst and src can be on the same page, but the range must not overlap,
* and must not cross a page boundary.
*/
#include <asm-generic/pgtable.h>
#endif /* __ASSEMBLY__ */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/pgtable_types.h linux-2.6.37.2/arch/x86/include/asm/pgtable_types.h
---- linux-2.6.37.2/arch/x86/include/asm/pgtable_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/pgtable_types.h 2011-01-17 02:41:01.000000000 -0500
-@@ -16,12 +16,11 @@
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/pgtable_types.h linux-2.6.38.1/arch/x86/include/asm/pgtable_types.h
+--- linux-2.6.38.1/arch/x86/include/asm/pgtable_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/pgtable_types.h 2011-03-21 18:31:35.000000000 -0400
+@@ -16,13 +16,12 @@
#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
#define _PAGE_BIT_PAT 7 /* on 4KB pages */
#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
-#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
-#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
+-#define _PAGE_BIT_SPLITTING _PAGE_BIT_UNUSED1 /* only valid on a PSE pmd */
+#define _PAGE_BIT_CPA_TEST _PAGE_BIT_SPECIAL
++#define _PAGE_BIT_SPLITTING _PAGE_BIT_SPECIAL /* only valid on a PSE pmd */
#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
/* If _PAGE_BIT_PRESENT is clear, we use these: */
-@@ -39,7 +38,6 @@
+@@ -40,7 +39,6 @@
#define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
-@@ -55,8 +53,10 @@
+@@ -57,8 +55,10 @@
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
#endif
#define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE)
-@@ -93,6 +93,9 @@
+@@ -96,6 +96,9 @@
#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
_PAGE_ACCESSED)
#define __PAGE_KERNEL_EXEC \
(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
-@@ -103,8 +106,8 @@
+@@ -106,8 +109,8 @@
#define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
-@@ -163,8 +166,8 @@
+@@ -166,8 +169,8 @@
* bits are combined, this will alow user to access the high address mapped
* VDSO in the presence of CONFIG_COMPAT_VDSO
*/
#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
#endif
-@@ -202,7 +205,17 @@ static inline pgdval_t pgd_flags(pgd_t p
+@@ -205,7 +208,17 @@ static inline pgdval_t pgd_flags(pgd_t p
{
return native_pgd_val(pgd) & PTE_FLAGS_MASK;
}
#if PAGETABLE_LEVELS > 3
typedef struct { pudval_t pud; } pud_t;
-@@ -216,8 +229,6 @@ static inline pudval_t native_pud_val(pu
+@@ -219,8 +232,6 @@ static inline pudval_t native_pud_val(pu
return pud.pud;
}
#else
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
+@@ -240,8 +251,6 @@ static inline pmdval_t native_pmd_val(pm
return pmd.pmd;
}
#else
static inline pmdval_t native_pmd_val(pmd_t pmd)
{
return native_pgd_val(pmd.pud.pgd);
-@@ -278,7 +287,6 @@ typedef struct page *pgtable_t;
+@@ -281,7 +290,6 @@ typedef struct page *pgtable_t;
extern pteval_t __supported_pte_mask;
extern void set_nx(void);
#define pgprot_writecombine pgprot_writecombine
extern pgprot_t pgprot_writecombine(pgprot_t prot);
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/processor.h linux-2.6.37.2/arch/x86/include/asm/processor.h
---- linux-2.6.37.2/arch/x86/include/asm/processor.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/processor.h 2011-01-17 02:41:01.000000000 -0500
-@@ -271,7 +271,7 @@ struct tss_struct {
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/processor.h linux-2.6.38.1/arch/x86/include/asm/processor.h
+--- linux-2.6.38.1/arch/x86/include/asm/processor.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/processor.h 2011-03-21 18:31:35.000000000 -0400
+@@ -270,7 +270,7 @@ struct tss_struct {
} ____cacheline_aligned;
#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.37.2/arch/x86/include/asm/ptrace.h linux-2.6.37.2/arch/x86/include/asm/ptrace.h
---- linux-2.6.37.2/arch/x86/include/asm/ptrace.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/ptrace.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/ptrace.h linux-2.6.38.1/arch/x86/include/asm/ptrace.h
+--- linux-2.6.38.1/arch/x86/include/asm/ptrace.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/ptrace.h 2011-03-21 18:31:35.000000000 -0400
@@ -152,28 +152,29 @@ static inline unsigned long regs_return_
}
#endif
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/reboot.h linux-2.6.37.2/arch/x86/include/asm/reboot.h
---- linux-2.6.37.2/arch/x86/include/asm/reboot.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/reboot.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/reboot.h linux-2.6.38.1/arch/x86/include/asm/reboot.h
+--- linux-2.6.38.1/arch/x86/include/asm/reboot.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/reboot.h 2011-03-21 18:31:35.000000000 -0400
@@ -18,7 +18,7 @@ extern struct machine_ops machine_ops;
void native_machine_crash_shutdown(struct pt_regs *regs);
typedef void (*nmi_shootdown_cb)(int, struct die_args*);
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/rwsem.h linux-2.6.37.2/arch/x86/include/asm/rwsem.h
---- linux-2.6.37.2/arch/x86/include/asm/rwsem.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/rwsem.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/rwsem.h linux-2.6.38.1/arch/x86/include/asm/rwsem.h
+--- linux-2.6.38.1/arch/x86/include/asm/rwsem.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/rwsem.h 2011-03-21 18:31:35.000000000 -0400
@@ -118,6 +118,14 @@ static inline void __down_read(struct rw
{
asm volatile("# beginning down_read\n\t"
: "+r" (tmp), "+m" (sem->count)
: : "memory");
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/segment.h linux-2.6.37.2/arch/x86/include/asm/segment.h
---- linux-2.6.37.2/arch/x86/include/asm/segment.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/segment.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/segment.h linux-2.6.38.1/arch/x86/include/asm/segment.h
+--- linux-2.6.38.1/arch/x86/include/asm/segment.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/segment.h 2011-03-21 18:31:35.000000000 -0400
@@ -62,8 +62,8 @@
* 26 - ESPFIX small SS
* 27 - per-cpu [ offset to per-cpu data area ]
#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.37.2/arch/x86/include/asm/smp.h linux-2.6.37.2/arch/x86/include/asm/smp.h
---- linux-2.6.37.2/arch/x86/include/asm/smp.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/smp.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/smp.h linux-2.6.38.1/arch/x86/include/asm/smp.h
+--- linux-2.6.38.1/arch/x86/include/asm/smp.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/smp.h 2011-03-21 18:31:35.000000000 -0400
@@ -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);
static inline struct cpumask *cpu_sibling_mask(int cpu)
{
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/spinlock.h linux-2.6.37.2/arch/x86/include/asm/spinlock.h
---- linux-2.6.37.2/arch/x86/include/asm/spinlock.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/spinlock.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/spinlock.h linux-2.6.38.1/arch/x86/include/asm/spinlock.h
+--- linux-2.6.38.1/arch/x86/include/asm/spinlock.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/spinlock.h 2011-03-21 18:31:35.000000000 -0400
@@ -249,6 +249,14 @@ static inline int arch_write_can_lock(ar
static inline void arch_read_lock(arch_rwlock_t *rw)
{
: "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/stackprotector.h linux-2.6.37.2/arch/x86/include/asm/stackprotector.h
---- linux-2.6.37.2/arch/x86/include/asm/stackprotector.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/stackprotector.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/stackprotector.h linux-2.6.38.1/arch/x86/include/asm/stackprotector.h
+--- linux-2.6.38.1/arch/x86/include/asm/stackprotector.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/stackprotector.h 2011-03-21 18:31:35.000000000 -0400
@@ -113,7 +113,7 @@ static inline void setup_stack_canary_se
static inline void load_stack_canary_segment(void)
asm volatile ("mov %0, %%gs" : : "r" (0));
#endif
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/system.h linux-2.6.37.2/arch/x86/include/asm/system.h
---- linux-2.6.37.2/arch/x86/include/asm/system.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/system.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/system.h linux-2.6.38.1/arch/x86/include/asm/system.h
+--- linux-2.6.38.1/arch/x86/include/asm/system.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/system.h 2011-03-21 18:31:35.000000000 -0400
@@ -202,7 +202,7 @@ static inline unsigned long get_limit(un
{
unsigned long __limit;
extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
void default_idle(void);
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/uaccess_32.h linux-2.6.37.2/arch/x86/include/asm/uaccess_32.h
---- linux-2.6.37.2/arch/x86/include/asm/uaccess_32.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/uaccess_32.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/uaccess_32.h linux-2.6.38.1/arch/x86/include/asm/uaccess_32.h
+--- linux-2.6.38.1/arch/x86/include/asm/uaccess_32.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/uaccess_32.h 2011-03-21 18:31:35.000000000 -0400
@@ -44,6 +44,9 @@ unsigned long __must_check __copy_from_u
static __always_inline unsigned long __must_check
__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
return n;
}
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/uaccess_64.h linux-2.6.37.2/arch/x86/include/asm/uaccess_64.h
---- linux-2.6.37.2/arch/x86/include/asm/uaccess_64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/uaccess_64.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/uaccess_64.h linux-2.6.38.1/arch/x86/include/asm/uaccess_64.h
+--- linux-2.6.38.1/arch/x86/include/asm/uaccess_64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/uaccess_64.h 2011-03-21 18:31:35.000000000 -0400
@@ -11,6 +11,9 @@
#include <asm/alternative.h>
#include <asm/cpufeature.h>
copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
#endif /* _ASM_X86_UACCESS_64_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/uaccess.h linux-2.6.37.2/arch/x86/include/asm/uaccess.h
---- linux-2.6.37.2/arch/x86/include/asm/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/uaccess.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/uaccess.h linux-2.6.38.1/arch/x86/include/asm/uaccess.h
+--- linux-2.6.38.1/arch/x86/include/asm/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -8,12 +8,15 @@
#include <linux/thread_info.h>
#include <linux/prefetch.h>
-
+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __copyuser_seg "%%gs:"
++#define __copyuser_seg "gs;"
+#define __COPYUSER_SET_ES "pushl %%gs; popl %%es\n"
+#define __COPYUSER_RESTORE_ES "pushl %%ss; popl %%es\n"
+#else
#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: movl %%eax," __copyuser_seg"0(%2)\n" \
-+ "2: movl %%edx," __copyuser_seg"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" \
#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: movl %%eax," __copyuser_seg"0(%1)\n" \
-+ "2: movl %%edx," __copyuser_seg"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) \
#define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
- asm volatile("1: mov"itype" %2,%"rtype"1\n" \
-+ asm volatile("1: mov"itype" "__copyuser_seg"%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" \
#define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
- asm volatile("1: mov"itype" %1,%"rtype"0\n" \
-+ asm volatile("1: mov"itype" "__copyuser_seg"%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)))
*/
#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
- asm volatile("1: mov"itype" %"rtype"1,%2\n" \
-+ asm volatile("1: mov"itype" %"rtype"1," __copyuser_seg"%2\n"\
++ asm volatile("1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
"2:\n" \
".section .fixup,\"ax\"\n" \
"3: mov %3,%0\n" \
#define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
- asm volatile("1: mov"itype" %"rtype"0,%1\n" \
-+ asm volatile("1: mov"itype" %"rtype"0," __copyuser_seg"%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)))
#ifdef CONFIG_X86_32
# include "uaccess_32.h"
#else
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/vgtod.h linux-2.6.37.2/arch/x86/include/asm/vgtod.h
---- linux-2.6.37.2/arch/x86/include/asm/vgtod.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/vgtod.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/vgtod.h linux-2.6.38.1/arch/x86/include/asm/vgtod.h
+--- linux-2.6.38.1/arch/x86/include/asm/vgtod.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/vgtod.h 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@ struct vsyscall_gtod_data {
int sysctl_enabled;
struct timezone sys_tz;
cycle_t (*vread)(void);
cycle_t cycle_last;
cycle_t mask;
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/vsyscall.h linux-2.6.37.2/arch/x86/include/asm/vsyscall.h
---- linux-2.6.37.2/arch/x86/include/asm/vsyscall.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/vsyscall.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/vsyscall.h linux-2.6.38.1/arch/x86/include/asm/vsyscall.h
+--- linux-2.6.38.1/arch/x86/include/asm/vsyscall.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/vsyscall.h 2011-03-21 18:31:35.000000000 -0400
@@ -15,9 +15,10 @@ enum vsyscall_num {
#ifdef __KERNEL__
#endif /* __KERNEL__ */
#endif /* _ASM_X86_VSYSCALL_H */
-diff -urNp linux-2.6.37.2/arch/x86/include/asm/xsave.h linux-2.6.37.2/arch/x86/include/asm/xsave.h
---- linux-2.6.37.2/arch/x86/include/asm/xsave.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/include/asm/xsave.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/include/asm/xsave.h linux-2.6.38.1/arch/x86/include/asm/xsave.h
+--- linux-2.6.38.1/arch/x86/include/asm/xsave.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/include/asm/xsave.h 2011-03-21 18:31:35.000000000 -0400
@@ -65,6 +65,11 @@ static inline int xsave_user(struct xsav
{
int err;
__asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
"2:\n"
".section .fixup,\"ax\"\n"
-diff -urNp linux-2.6.37.2/arch/x86/Kconfig linux-2.6.37.2/arch/x86/Kconfig
---- linux-2.6.37.2/arch/x86/Kconfig 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/Kconfig 2011-02-22 16:05:42.000000000 -0500
-@@ -225,7 +225,7 @@ config X86_TRAMPOLINE
+diff -urNp linux-2.6.38.1/arch/x86/Kconfig linux-2.6.38.1/arch/x86/Kconfig
+--- linux-2.6.38.1/arch/x86/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/Kconfig 2011-03-21 18:31:35.000000000 -0400
+@@ -223,7 +223,7 @@ config X86_TRAMPOLINE
config X86_32_LAZY_GS
def_bool y
config ARCH_HWEIGHT_CFLAGS
string
-@@ -992,7 +992,7 @@ choice
+@@ -1019,7 +1019,7 @@ choice
config NOHIGHMEM
bool "off"
---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
-@@ -1029,7 +1029,7 @@ config NOHIGHMEM
+@@ -1056,7 +1056,7 @@ config NOHIGHMEM
config HIGHMEM4G
bool "4GB"
---help---
Select this if you have a 32-bit processor and between 1 and 4
gigabytes of physical RAM.
-@@ -1083,7 +1083,7 @@ config PAGE_OFFSET
+@@ -1110,7 +1110,7 @@ config PAGE_OFFSET
hex
default 0xB0000000 if VMSPLIT_3G_OPT
default 0x80000000 if VMSPLIT_2G
default 0x40000000 if VMSPLIT_1G
default 0xC0000000
depends on X86_32
-@@ -1427,7 +1427,7 @@ config ARCH_USES_PG_UNCACHED
+@@ -1454,7 +1454,7 @@ config ARCH_USES_PG_UNCACHED
config EFI
bool "EFI runtime service support"
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
-@@ -1457,6 +1457,7 @@ config SECCOMP
+@@ -1484,6 +1484,7 @@ config SECCOMP
config CC_STACKPROTECTOR
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
---help---
This option turns on the -fstack-protector GCC feature. This
feature puts, at the beginning of functions, a canary value on
-@@ -1514,6 +1515,7 @@ config KEXEC_JUMP
+@@ -1541,6 +1542,7 @@ config KEXEC_JUMP
config PHYSICAL_START
- hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
+ 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.
-@@ -1577,6 +1579,7 @@ config X86_NEED_RELOCS
+@@ -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 0x2000 0x1000000
---help---
This value puts the alignment restrictions on physical address
-@@ -1608,9 +1611,10 @@ config HOTPLUG_CPU
+@@ -1635,9 +1638,10 @@ config HOTPLUG_CPU
Say N if you want to disable CPU hotplug.
config COMPAT_VDSO
---help---
Map the 32-bit VDSO to the predictable old-style address too.
-diff -urNp linux-2.6.37.2/arch/x86/Kconfig.cpu linux-2.6.37.2/arch/x86/Kconfig.cpu
---- linux-2.6.37.2/arch/x86/Kconfig.cpu 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/Kconfig.cpu 2011-01-17 02:41:01.000000000 -0500
-@@ -336,7 +336,7 @@ config X86_PPRO_FENCE
+diff -urNp linux-2.6.38.1/arch/x86/Kconfig.cpu linux-2.6.38.1/arch/x86/Kconfig.cpu
+--- linux-2.6.38.1/arch/x86/Kconfig.cpu 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/Kconfig.cpu 2011-03-21 18:31:35.000000000 -0400
+@@ -339,7 +339,7 @@ config X86_PPRO_FENCE
config X86_F00F_BUG
def_bool y
config X86_INVD_BUG
def_bool y
-@@ -360,7 +360,7 @@ config X86_POPAD_OK
+@@ -363,7 +363,7 @@ config X86_POPAD_OK
config X86_ALIGNMENT_16
def_bool y
config X86_INTEL_USERCOPY
def_bool y
-@@ -406,7 +406,7 @@ config X86_CMPXCHG64
+@@ -409,7 +409,7 @@ config X86_CMPXCHG64
# generates cmov.
config X86_CMOV
def_bool y
config X86_MINIMUM_CPU_FAMILY
int
-diff -urNp linux-2.6.37.2/arch/x86/Kconfig.debug linux-2.6.37.2/arch/x86/Kconfig.debug
---- linux-2.6.37.2/arch/x86/Kconfig.debug 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/Kconfig.debug 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/Kconfig.debug linux-2.6.38.1/arch/x86/Kconfig.debug
+--- linux-2.6.38.1/arch/x86/Kconfig.debug 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/Kconfig.debug 2011-03-21 18:31:35.000000000 -0400
@@ -101,7 +101,7 @@ config X86_PTDUMP
config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
---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.37.2/arch/x86/kernel/acpi/boot.c linux-2.6.37.2/arch/x86/kernel/acpi/boot.c
---- linux-2.6.37.2/arch/x86/kernel/acpi/boot.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/acpi/boot.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1498,7 +1498,7 @@ static struct dmi_system_id __initdata a
+@@ -119,7 +119,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-2.6.38.1/arch/x86/kernel/acpi/boot.c linux-2.6.38.1/arch/x86/kernel/acpi/boot.c
+--- linux-2.6.38.1/arch/x86/kernel/acpi/boot.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/acpi/boot.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1472,7 +1472,7 @@ static struct dmi_system_id __initdata a
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
},
},
};
/*
-diff -urNp linux-2.6.37.2/arch/x86/kernel/acpi/sleep.c linux-2.6.37.2/arch/x86/kernel/acpi/sleep.c
---- linux-2.6.37.2/arch/x86/kernel/acpi/sleep.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/acpi/sleep.c 2011-01-17 02:41:01.000000000 -0500
-@@ -12,6 +12,7 @@
- #include <linux/cpumask.h>
- #include <asm/segment.h>
- #include <asm/desc.h>
-+#include <asm/e820.h>
-
- #ifdef CONFIG_X86_32
- #include <asm/pgtable.h>
-@@ -20,7 +21,7 @@
+diff -urNp linux-2.6.38.1/arch/x86/kernel/acpi/sleep.c linux-2.6.38.1/arch/x86/kernel/acpi/sleep.c
+--- linux-2.6.38.1/arch/x86/kernel/acpi/sleep.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/acpi/sleep.c 2011-03-21 18:31:35.000000000 -0400
+@@ -18,7 +18,7 @@
#include "realmode/wakeup.h"
#include "sleep.h"
unsigned long acpi_realmode_flags;
/* address in low memory of the wakeup routine. */
-@@ -101,8 +102,12 @@ int acpi_save_state_mem(void)
+@@ -99,8 +99,12 @@ int acpi_save_state_mem(void)
header->trampoline_segment = setup_trampoline() >> 4;
#ifdef CONFIG_SMP
- stack_start.sp = temp_stack + sizeof(temp_stack);
+ stack_start = (unsigned long)temp_stack + sizeof(temp_stack);
+
+ pax_open_kernel();
early_gdt_descr.address =
initial_gs = per_cpu_offset(smp_processor_id());
#endif
initial_code = (unsigned long)wakeup_long64;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.37.2/arch/x86/kernel/acpi/wakeup_32.S
---- linux-2.6.37.2/arch/x86/kernel/acpi/wakeup_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/acpi/wakeup_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.38.1/arch/x86/kernel/acpi/wakeup_32.S
+--- linux-2.6.38.1/arch/x86/kernel/acpi/wakeup_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/acpi/wakeup_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -30,13 +30,11 @@ wakeup_pmode_return:
# and restore the stack ... but you need gdt for this to work
movl saved_context_esp, %esp
bogus_magic:
jmp bogus_magic
-diff -urNp linux-2.6.37.2/arch/x86/kernel/alternative.c linux-2.6.37.2/arch/x86/kernel/alternative.c
---- linux-2.6.37.2/arch/x86/kernel/alternative.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/alternative.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/alternative.c linux-2.6.38.1/arch/x86/kernel/alternative.c
+--- linux-2.6.38.1/arch/x86/kernel/alternative.c 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/alternative.c 2011-03-26 20:47:42.000000000 -0400
@@ -248,7 +248,7 @@ static void alternatives_smp_lock(const
if (!*poff || ptr < text || ptr >= text_end)
continue;
text_poke(ptr, ((unsigned char []){0x3E}), 1);
};
mutex_unlock(&text_mutex);
-@@ -437,7 +437,7 @@ void __init_or_module apply_paravirt(str
+@@ -438,7 +438,7 @@ void __init_or_module apply_paravirt(str
BUG_ON(p->len > MAX_PATCH_LEN);
/* prep the buffer with the original instructions */
used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf,
(unsigned long)p->instr, p->len);
-@@ -505,7 +505,7 @@ void __init alternative_instructions(voi
+@@ -506,7 +506,7 @@ void __init alternative_instructions(voi
if (smp_alt_once)
free_init_pages("SMP alternatives",
(unsigned long)__smp_locks,
restart_nmi();
}
-@@ -522,13 +522,17 @@ void __init alternative_instructions(voi
+@@ -523,13 +523,17 @@ void __init alternative_instructions(voi
* instructions. And on the local CPU you need to be protected again NMI or MCE
* handlers seeing an inconsistent instruction while you patch.
*/
local_irq_restore(flags);
/* Could also do a CLFLUSH here to speed up CPU recovery; but
that causes hangs on some VIA CPUs. */
-@@ -550,36 +554,22 @@ void *__init_or_module text_poke_early(v
+@@ -551,36 +555,22 @@ void *__init_or_module text_poke_early(v
*/
void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
{
return addr;
}
-@@ -645,9 +635,9 @@ void *__kprobes text_poke_smp(void *addr
+@@ -620,12 +610,7 @@ static int __kprobes stop_machine_text_p
+ flush_icache_range((unsigned long)p->addr,
+ (unsigned long)p->addr + p->len);
+ }
+- /*
+- * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
+- * that a core serializing instruction such as "cpuid" should be
+- * executed on _each_ core before the new instruction is made visible.
+- */
+- sync_core();
++
+ return 0;
+ }
+
+@@ -682,9 +667,9 @@ void __kprobes text_poke_smp_batch(struc
#if defined(CONFIG_DYNAMIC_FTRACE) || defined(HAVE_JUMP_LABEL)
#ifdef CONFIG_X86_64
#endif
void __init arch_init_ideal_nop5(void)
-diff -urNp linux-2.6.37.2/arch/x86/kernel/amd_iommu.c linux-2.6.37.2/arch/x86/kernel/amd_iommu.c
---- linux-2.6.37.2/arch/x86/kernel/amd_iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/amd_iommu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/amd_iommu.c linux-2.6.38.1/arch/x86/kernel/amd_iommu.c
+--- linux-2.6.38.1/arch/x86/kernel/amd_iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/amd_iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -2286,7 +2286,7 @@ static void prealloc_protection_domains(
}
}
.alloc_coherent = alloc_coherent,
.free_coherent = free_coherent,
.map_page = map_page,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/apic/io_apic.c linux-2.6.37.2/arch/x86/kernel/apic/io_apic.c
---- linux-2.6.37.2/arch/x86/kernel/apic/io_apic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/apic/io_apic.c 2011-01-17 02:41:01.000000000 -0500
-@@ -597,7 +597,7 @@ struct IO_APIC_route_entry **alloc_ioapi
+diff -urNp linux-2.6.38.1/arch/x86/kernel/apic/io_apic.c linux-2.6.38.1/arch/x86/kernel/apic/io_apic.c
+--- linux-2.6.38.1/arch/x86/kernel/apic/io_apic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/apic/io_apic.c 2011-03-21 18:31:35.000000000 -0400
+@@ -617,7 +617,7 @@ struct IO_APIC_route_entry **alloc_ioapi
ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics,
GFP_KERNEL);
if (!ioapic_entries)
for (apic = 0; apic < nr_ioapics; apic++) {
ioapic_entries[apic] =
-@@ -614,7 +614,7 @@ nomem:
+@@ -634,7 +634,7 @@ nomem:
kfree(ioapic_entries[apic]);
kfree(ioapic_entries);
}
/*
-@@ -1024,7 +1024,7 @@ int IO_APIC_get_PCI_irq_vector(int bus,
+@@ -1044,7 +1044,7 @@ int IO_APIC_get_PCI_irq_vector(int bus,
}
EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
{
/* Used to the online set of cpus does not change
* during assign_irq_vector.
-@@ -1032,7 +1032,7 @@ void lock_vector_lock(void)
+@@ -1052,7 +1052,7 @@ void lock_vector_lock(void)
raw_spin_lock(&vector_lock);
}
{
raw_spin_unlock(&vector_lock);
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/apm_32.c linux-2.6.37.2/arch/x86/kernel/apm_32.c
---- linux-2.6.37.2/arch/x86/kernel/apm_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/apm_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/apm_32.c linux-2.6.38.1/arch/x86/kernel/apm_32.c
+--- linux-2.6.38.1/arch/x86/kernel/apm_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/apm_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -410,7 +410,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.
proc_create("apm", 0, NULL, &apm_file_ops);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/asm-offsets_32.c linux-2.6.37.2/arch/x86/kernel/asm-offsets_32.c
---- linux-2.6.37.2/arch/x86/kernel/asm-offsets_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/asm-offsets_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/asm-offsets_32.c linux-2.6.38.1/arch/x86/kernel/asm-offsets_32.c
+--- linux-2.6.38.1/arch/x86/kernel/asm-offsets_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/asm-offsets_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -113,6 +113,11 @@ void foo(void)
OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit);
#endif
#ifdef CONFIG_XEN
-diff -urNp linux-2.6.37.2/arch/x86/kernel/asm-offsets_64.c linux-2.6.37.2/arch/x86/kernel/asm-offsets_64.c
---- linux-2.6.37.2/arch/x86/kernel/asm-offsets_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/asm-offsets_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/asm-offsets_64.c linux-2.6.38.1/arch/x86/kernel/asm-offsets_64.c
+--- linux-2.6.38.1/arch/x86/kernel/asm-offsets_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/asm-offsets_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -63,6 +63,18 @@ int main(void)
OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit);
OFFSET(PV_CPU_swapgs, pv_cpu_ops, swapgs);
DEFINE(TSS_ist, offsetof(struct tss_struct, x86_tss.ist));
BLANK();
DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/common.c linux-2.6.37.2/arch/x86/kernel/cpu/common.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/common.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/common.c linux-2.6.38.1/arch/x86/kernel/cpu/common.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/common.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/common.c 2011-03-21 18:31:35.000000000 -0400
@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitcon
static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
/* If the model name is still unset, do table lookup. */
if (!c->x86_model_id[0]) {
const char *p;
-@@ -1085,7 +1035,7 @@ struct pt_regs * __cpuinit idle_regs(str
+@@ -1084,7 +1034,7 @@ struct pt_regs * __cpuinit idle_regs(str
{
memset(regs, 0, sizeof(struct pt_regs));
regs->fs = __KERNEL_PERCPU;
return regs;
}
-@@ -1140,7 +1090,7 @@ void __cpuinit cpu_init(void)
+@@ -1139,7 +1089,7 @@ void __cpuinit cpu_init(void)
int i;
cpu = stack_smp_processor_id();
oist = &per_cpu(orig_ist, cpu);
#ifdef CONFIG_NUMA
-@@ -1166,7 +1116,7 @@ void __cpuinit cpu_init(void)
+@@ -1165,7 +1115,7 @@ void __cpuinit cpu_init(void)
switch_to_new_gdt(cpu);
loadsegment(fs, 0);
memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
syscall_init();
-@@ -1175,7 +1125,6 @@ void __cpuinit cpu_init(void)
+@@ -1174,7 +1124,6 @@ void __cpuinit cpu_init(void)
wrmsrl(MSR_KERNEL_GS_BASE, 0);
barrier();
if (cpu != 0)
enable_x2apic();
-@@ -1229,7 +1178,7 @@ void __cpuinit cpu_init(void)
+@@ -1228,7 +1177,7 @@ void __cpuinit cpu_init(void)
{
int cpu = smp_processor_id();
struct task_struct *curr = current;
struct thread_struct *thread = &curr->thread;
if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2011-03-21 18:31:35.000000000 -0400
@@ -481,7 +481,7 @@ static const struct dmi_system_id sw_any
DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"),
},
};
static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2011-03-21 18:31:35.000000000 -0400
@@ -226,7 +226,7 @@ static struct cpu_model models[] =
{ &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL },
{ &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL },
};
#undef _BANIAS
#undef BANIAS
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/intel.c linux-2.6.37.2/arch/x86/kernel/cpu/intel.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/intel.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/intel.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/intel.c linux-2.6.38.1/arch/x86/kernel/cpu/intel.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/intel.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/intel.c 2011-03-21 18:31:35.000000000 -0400
@@ -161,7 +161,7 @@ static void __cpuinit trap_init_f00f_bug
* Update the IDT descriptor and reload the IDT so that
* it uses the read-only mapped virtual address.
load_idt(&idt_descr);
}
#endif
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/Makefile linux-2.6.37.2/arch/x86/kernel/cpu/Makefile
---- linux-2.6.37.2/arch/x86/kernel/cpu/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/Makefile 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/Makefile linux-2.6.38.1/arch/x86/kernel/cpu/Makefile
+--- linux-2.6.38.1/arch/x86/kernel/cpu/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -8,10 +8,6 @@ CFLAGS_REMOVE_common.o = -pg
CFLAGS_REMOVE_perf_event.o = -pg
endif
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-2.6.37.2/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.37.2/arch/x86/kernel/cpu/mcheck/mce.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/mcheck/mce.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/mcheck/mce.c 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.38.1/arch/x86/kernel/cpu/mcheck/mce.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/mcheck/mce.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/mcheck/mce.c 2011-03-21 18:31:35.000000000 -0400
@@ -45,6 +45,7 @@
#include <asm/ipi.h>
#include <asm/mce.h>
open_exclu = 0;
spin_unlock(&mce_state_lock);
-@@ -1673,6 +1674,7 @@ static struct miscdevice mce_log_device
+@@ -1658,8 +1659,7 @@ static long mce_ioctl(struct file *f, un
+ }
+ }
+
+-/* Modified in mce-inject.c, so not static or const */
+-struct file_operations mce_chrdev_ops = {
++struct file_operations mce_chrdev_ops = { /* Modified in mce-inject.c, so not static or const */
+ .open = mce_open,
+ .release = mce_release,
+ .read = mce_read,
+@@ -1673,6 +1673,7 @@ static struct miscdevice mce_log_device
MISC_MCELOG_MINOR,
"mcelog",
&mce_chrdev_ops,
};
/*
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/generic.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/generic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/generic.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/generic.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/generic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/generic.c 2011-03-21 18:31:35.000000000 -0400
@@ -28,7 +28,7 @@ static struct fixed_range_block fixed_ra
{ MSR_MTRRfix64K_00000, 1 }, /* one 64k MTRR */
{ MSR_MTRRfix16K_80000, 2 }, /* two 16k MTRRs */
};
static unsigned long smp_changes_mask;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/main.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/main.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/main.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/main.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/main.c 2011-03-21 18:31:35.000000000 -0400
@@ -61,7 +61,7 @@ static DEFINE_MUTEX(mtrr_mutex);
u64 size_or_mask, size_and_mask;
static bool mtrr_aps_delayed_init;
const struct mtrr_ops *mtrr_if;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/mtrr.h
---- linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/mtrr.h
+--- linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/mtrr/mtrr.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,19 +12,19 @@
extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
};
extern int generic_get_free_region(unsigned long base, unsigned long size,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.37.2/arch/x86/kernel/cpu/perfctr-watchdog.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/perfctr-watchdog.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/perfctr-watchdog.c 2011-01-17 02:41:01.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;
-@@ -634,6 +634,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, see probe_nmi_watchdog */
- static struct wd_ops intel_arch_wd_ops;
-
- static int setup_intel_arch_watchdog(unsigned nmi_hz)
-@@ -686,6 +687,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.37.2/arch/x86/kernel/cpu/perf_event.c linux-2.6.37.2/arch/x86/kernel/cpu/perf_event.c
---- linux-2.6.37.2/arch/x86/kernel/cpu/perf_event.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/cpu/perf_event.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1757,7 +1757,7 @@ perf_callchain_user(struct perf_callchai
+diff -urNp linux-2.6.38.1/arch/x86/kernel/cpu/perf_event.c linux-2.6.38.1/arch/x86/kernel/cpu/perf_event.c
+--- linux-2.6.38.1/arch/x86/kernel/cpu/perf_event.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/cpu/perf_event.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1781,7 +1781,7 @@ perf_callchain_user(struct perf_callchai
break;
perf_callchain_store(entry, frame.return_address);
}
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/crash.c linux-2.6.37.2/arch/x86/kernel/crash.c
---- linux-2.6.37.2/arch/x86/kernel/crash.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/crash.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/crash.c linux-2.6.38.1/arch/x86/kernel/crash.c
+--- linux-2.6.38.1/arch/x86/kernel/crash.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/crash.c 2011-03-21 18:31:35.000000000 -0400
@@ -42,7 +42,7 @@ static void kdump_nmi_callback(int cpu,
regs = args->regs;
crash_fixup_ss_esp(&fixed_regs, regs);
regs = &fixed_regs;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/doublefault_32.c linux-2.6.37.2/arch/x86/kernel/doublefault_32.c
---- linux-2.6.37.2/arch/x86/kernel/doublefault_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/doublefault_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/doublefault_32.c linux-2.6.38.1/arch/x86/kernel/doublefault_32.c
+--- linux-2.6.38.1/arch/x86/kernel/doublefault_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/doublefault_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -11,7 +11,7 @@
#define DOUBLEFAULT_STACKSIZE (1024)
.fs = __KERNEL_PERCPU,
.__cr3 = __pa_nodebug(swapper_pg_dir),
-diff -urNp linux-2.6.37.2/arch/x86/kernel/dumpstack_32.c linux-2.6.37.2/arch/x86/kernel/dumpstack_32.c
---- linux-2.6.37.2/arch/x86/kernel/dumpstack_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/dumpstack_32.c 2011-01-17 02:41:01.000000000 -0500
-@@ -105,11 +105,12 @@ void show_registers(struct pt_regs *regs
+diff -urNp linux-2.6.38.1/arch/x86/kernel/dumpstack_32.c linux-2.6.38.1/arch/x86/kernel/dumpstack_32.c
+--- linux-2.6.38.1/arch/x86/kernel/dumpstack_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/dumpstack_32.c 2011-03-21 18:31:35.000000000 -0400
+@@ -95,21 +95,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..
*/
+ unsigned long cs_base = get_desc_base(&get_cpu_gdt_table(smp_processor_id())[(0xffff & regs->cs) >> 3]);
printk(KERN_EMERG "Stack:\n");
- show_stack_log_lvl(NULL, regs, ®s->sp,
-@@ -117,10 +118,10 @@ void show_registers(struct pt_regs *regs
+ show_stack_log_lvl(NULL, regs, ®s->sp, KERN_EMERG);
printk(KERN_EMERG "Code: ");
code_len = code_len - code_prologue + 1;
}
for (i = 0; i < code_len; i++, ip++) {
-@@ -129,7 +130,7 @@ void show_registers(struct pt_regs *regs
+@@ -118,7 +119,7 @@ void show_registers(struct pt_regs *regs
printk(" Bad EIP value.");
break;
}
printk("<%02x> ", c);
else
printk("%02x ", c);
-@@ -142,6 +143,7 @@ int is_valid_bugaddr(unsigned long ip)
+@@ -131,6 +132,7 @@ int is_valid_bugaddr(unsigned long ip)
{
unsigned short ud2;
if (ip < PAGE_OFFSET)
return 0;
if (probe_kernel_address((unsigned short *)ip, ud2))
-diff -urNp linux-2.6.37.2/arch/x86/kernel/dumpstack.c linux-2.6.37.2/arch/x86/kernel/dumpstack.c
---- linux-2.6.37.2/arch/x86/kernel/dumpstack.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/dumpstack.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/dumpstack.c linux-2.6.38.1/arch/x86/kernel/dumpstack.c
+--- linux-2.6.38.1/arch/x86/kernel/dumpstack.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/dumpstack.c 2011-03-21 18:31:35.000000000 -0400
@@ -2,6 +2,9 @@
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
reliable ? "" : "? ", (void *) address);
}
-@@ -206,7 +209,7 @@ void dump_stack(void)
- #endif
+@@ -200,7 +203,7 @@ void dump_stack(void)
+ unsigned long stack;
printk("Pid: %d, comm: %.20s %s %s %.*s\n",
- current->pid, current->comm, print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
-@@ -262,7 +265,7 @@ void __kprobes oops_end(unsigned long fl
+@@ -257,7 +260,7 @@ void __kprobes oops_end(unsigned long fl
panic("Fatal exception in interrupt");
if (panic_on_oops)
panic("Fatal exception");
}
int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-@@ -289,7 +292,7 @@ int __kprobes __die(const char *str, str
+@@ -284,7 +287,7 @@ int __kprobes __die(const char *str, str
show_registers(regs);
#ifdef CONFIG_X86_32
sp = regs->sp;
ss = regs->ss & 0xffff;
} else {
-@@ -317,7 +320,7 @@ void die(const char *str, struct pt_regs
+@@ -312,7 +315,7 @@ void die(const char *str, struct pt_regs
unsigned long flags = oops_begin();
int sig = SIGSEGV;
report_bug(regs->ip, regs);
if (__die(str, regs, err))
-diff -urNp linux-2.6.37.2/arch/x86/kernel/entry_32.S linux-2.6.37.2/arch/x86/kernel/entry_32.S
---- linux-2.6.37.2/arch/x86/kernel/entry_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/entry_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/entry_32.S linux-2.6.38.1/arch/x86/kernel/entry_32.S
+--- linux-2.6.38.1/arch/x86/kernel/entry_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/entry_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -183,13 +183,81 @@
/*CFI_REL_OFFSET gs, PT_GS*/
.endm
RESTORE_REGS
lss 12+4(%esp), %esp # back to espfix stack
CFI_ADJUST_CFA_OFFSET -24
-diff -urNp linux-2.6.37.2/arch/x86/kernel/entry_64.S linux-2.6.37.2/arch/x86/kernel/entry_64.S
---- linux-2.6.37.2/arch/x86/kernel/entry_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/entry_64.S 2011-02-27 14:48:10.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/entry_64.S linux-2.6.38.1/arch/x86/kernel/entry_64.S
+--- linux-2.6.38.1/arch/x86/kernel/entry_64.S 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/entry_64.S 2011-03-23 17:21:49.000000000 -0400
@@ -53,6 +53,7 @@
#include <asm/paravirt.h>
#include <asm/ftrace.h>
.macro TRACE_IRQS_IRETQ offset=ARGOFFSET
#ifdef CONFIG_TRACE_IRQFLAGS
-@@ -312,7 +508,7 @@ ENTRY(save_args)
- leaq -ARGOFFSET+16(%rsp),%rdi /* arg1 for handler */
+@@ -316,7 +512,7 @@ ENTRY(save_args)
+ leaq -RBP+8(%rsp),%rdi /* arg1 for handler */
movq_cfi rbp, 8 /* push %rbp */
leaq 8(%rsp), %rbp /* mov %rsp, %ebp */
- testl $3, CS(%rdi)
je 1f
SWAPGS
/*
-@@ -403,7 +599,7 @@ ENTRY(ret_from_fork)
+@@ -407,7 +603,7 @@ ENTRY(ret_from_fork)
RESTORE_REST
je int_ret_from_sys_call
testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET
-@@ -462,6 +658,7 @@ ENTRY(system_call_after_swapgs)
+@@ -466,6 +662,7 @@ ENTRY(system_call_after_swapgs)
movq %rsp,PER_CPU_VAR(old_rsp)
movq PER_CPU_VAR(kernel_stack),%rsp
/*
* No need to follow this irqs off/on section - it's straight
* and short:
-@@ -496,6 +693,7 @@ sysret_check:
+@@ -500,6 +697,7 @@ sysret_check:
andl %edi,%edx
jnz sysret_careful
CFI_REMEMBER_STATE
/*
* sysretq will re-enable interrupts:
*/
-@@ -605,7 +803,7 @@ tracesys:
+@@ -609,7 +807,7 @@ tracesys:
GLOBAL(int_ret_from_sys_call)
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
je retint_restore_args
movl $_TIF_ALLWORK_MASK,%edi
/* edi: mask to check */
-@@ -786,6 +984,16 @@ END(interrupt)
- CFI_ADJUST_CFA_OFFSET ORIG_RAX-ARGOFFSET+8
+@@ -791,6 +989,16 @@ END(interrupt)
+ CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP
call save_args
PARTIAL_FRAME 0
+#ifdef CONFIG_PAX_MEMORY_UDEREF
call \func
.endm
-@@ -813,7 +1021,7 @@ ret_from_intr:
+@@ -823,7 +1031,7 @@ ret_from_intr:
CFI_ADJUST_CFA_OFFSET -8
exit_intr:
GET_THREAD_INFO(%rcx)
je retint_kernel
/* Interrupt came from user space */
-@@ -835,12 +1043,14 @@ retint_swapgs: /* return to user-space
+@@ -845,12 +1053,14 @@ retint_swapgs: /* return to user-space
* The iretq could re-enable interrupts:
*/
DISABLE_INTERRUPTS(CLBR_ANY)
/*
* The iretq could re-enable interrupts:
*/
-@@ -1012,6 +1222,16 @@ ENTRY(\sym)
+@@ -1022,6 +1232,16 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call error_entry
DEFAULT_FRAME 0
movq %rsp,%rdi /* pt_regs pointer */
xorl %esi,%esi /* no error code */
call \do_sym
-@@ -1029,6 +1249,16 @@ ENTRY(\sym)
+@@ -1039,6 +1259,16 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid
TRACE_IRQS_OFF
movq %rsp,%rdi /* pt_regs pointer */
xorl %esi,%esi /* no error code */
call \do_sym
-@@ -1037,7 +1267,7 @@ ENTRY(\sym)
+@@ -1047,7 +1277,7 @@ ENTRY(\sym)
END(\sym)
.endm
.macro paranoidzeroentry_ist sym do_sym ist
ENTRY(\sym)
INTR_FRAME
-@@ -1047,8 +1277,24 @@ ENTRY(\sym)
+@@ -1057,8 +1287,24 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid
TRACE_IRQS_OFF
subq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist)
call \do_sym
addq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist)
-@@ -1065,6 +1311,16 @@ ENTRY(\sym)
+@@ -1075,6 +1321,16 @@ ENTRY(\sym)
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call error_entry
DEFAULT_FRAME 0
movq %rsp,%rdi /* pt_regs pointer */
movq ORIG_RAX(%rsp),%rsi /* get error code */
movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
-@@ -1084,6 +1340,16 @@ ENTRY(\sym)
+@@ -1094,6 +1350,16 @@ ENTRY(\sym)
call save_paranoid
DEFAULT_FRAME 0
TRACE_IRQS_OFF
movq %rsp,%rdi /* pt_regs pointer */
movq ORIG_RAX(%rsp),%rsi /* get error code */
movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
-@@ -1343,14 +1609,27 @@ ENTRY(paranoid_exit)
+@@ -1356,14 +1622,27 @@ ENTRY(paranoid_exit)
TRACE_IRQS_OFF
testl %ebx,%ebx /* swapgs needed? */
jnz paranoid_restore
TRACE_IRQS_IRETQ 0
RESTORE_ALL 8
jmp irq_return
-@@ -1408,7 +1687,7 @@ ENTRY(error_entry)
+@@ -1421,7 +1700,7 @@ ENTRY(error_entry)
movq_cfi r14, R14+8
movq_cfi r15, R15+8
xorl %ebx,%ebx
je error_kernelspace
error_swapgs:
SWAPGS
-@@ -1472,6 +1751,16 @@ ENTRY(nmi)
+@@ -1485,6 +1764,16 @@ ENTRY(nmi)
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid
DEFAULT_FRAME 0
/* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
movq %rsp,%rdi
movq $-1,%rsi
-@@ -1482,11 +1771,25 @@ ENTRY(nmi)
+@@ -1495,11 +1784,25 @@ ENTRY(nmi)
DISABLE_INTERRUPTS(CLBR_NONE)
testl %ebx,%ebx /* swapgs needed? */
jnz nmi_restore
RESTORE_ALL 8
jmp irq_return
nmi_userspace:
-diff -urNp linux-2.6.37.2/arch/x86/kernel/ftrace.c linux-2.6.37.2/arch/x86/kernel/ftrace.c
---- linux-2.6.37.2/arch/x86/kernel/ftrace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/ftrace.c 2011-01-17 02:41:01.000000000 -0500
-@@ -174,7 +174,9 @@ void ftrace_nmi_enter(void)
+diff -urNp linux-2.6.38.1/arch/x86/kernel/ftrace.c linux-2.6.38.1/arch/x86/kernel/ftrace.c
+--- linux-2.6.38.1/arch/x86/kernel/ftrace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/ftrace.c 2011-03-21 18:31:35.000000000 -0400
+@@ -177,7 +177,9 @@ void ftrace_nmi_enter(void)
if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
smp_rmb();
atomic_inc(&nmi_update_count);
}
/* Must have previous changes seen before executions */
-@@ -268,6 +270,8 @@ ftrace_modify_code(unsigned long ip, uns
+@@ -271,6 +273,8 @@ ftrace_modify_code(unsigned long ip, uns
{
unsigned char replaced[MCOUNT_INSN_SIZE];
/*
* Note: Due to modules and __init, code can
* disappear and change, we need to protect against faulting
-@@ -324,7 +328,7 @@ int ftrace_update_ftrace_func(ftrace_fun
+@@ -327,7 +331,7 @@ int ftrace_update_ftrace_func(ftrace_fun
unsigned char old[MCOUNT_INSN_SIZE], *new;
int ret;
new = ftrace_call_replace(ip, (unsigned long)func);
ret = ftrace_modify_code(ip, old, new);
-@@ -350,6 +354,8 @@ static int ftrace_mod_jmp(unsigned long
+@@ -353,6 +357,8 @@ static int ftrace_mod_jmp(unsigned long
{
unsigned char code[MCOUNT_INSN_SIZE];
if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
return -EFAULT;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/head32.c linux-2.6.37.2/arch/x86/kernel/head32.c
---- linux-2.6.37.2/arch/x86/kernel/head32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/head32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/head32.c linux-2.6.38.1/arch/x86/kernel/head32.c
+--- linux-2.6.38.1/arch/x86/kernel/head32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/head32.c 2011-03-21 18:31:35.000000000 -0400
@@ -19,6 +19,7 @@
#include <asm/io_apic.h>
#include <asm/bios_ebda.h>
#ifdef CONFIG_BLK_DEV_INITRD
/* Reserve INITRD */
-diff -urNp linux-2.6.37.2/arch/x86/kernel/head_32.S linux-2.6.37.2/arch/x86/kernel/head_32.S
---- linux-2.6.37.2/arch/x86/kernel/head_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/head_32.S 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/head_32.S linux-2.6.38.1/arch/x86/kernel/head_32.S
+--- linux-2.6.38.1/arch/x86/kernel/head_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/head_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -25,6 +25,12 @@
/* Physical address */
#define pa(X) ((X) - __PAGE_OFFSET)
+#endif
+
ENTRY(startup_32)
- /* test KEEP_SEGMENTS flag to see if the bootloader is asking
- us to not reload segments */
-@@ -101,6 +116,57 @@ ENTRY(startup_32)
- movl %eax,%gs
+ movl pa(stack_start),%ecx
+
+@@ -105,6 +120,57 @@ ENTRY(startup_32)
2:
+ leal -__PAGE_OFFSET(%ecx),%esp
+#ifdef CONFIG_SMP
+ movl $pa(cpu_gdt_table),%edi
/*
* Clear BSS first so that there are no surprises...
*/
-@@ -150,9 +216,7 @@ ENTRY(startup_32)
- cmpl $num_subarch_entries, %eax
- jae bad_subarch
-
-- movl pa(subarch_entries)(,%eax,4), %eax
-- subl $__PAGE_OFFSET, %eax
-- jmp *%eax
-+ jmp *pa(subarch_entries)(,%eax,4)
-
- bad_subarch:
- WEAK(lguest_entry)
-@@ -164,10 +228,10 @@ WEAK(xen_entry)
- __INITDATA
-
- subarch_entries:
-- .long default_entry /* normal x86/PC */
-- .long lguest_entry /* lguest hypervisor */
-- .long xen_entry /* Xen hypervisor */
-- .long default_entry /* Moorestown MID */
-+ .long ta(default_entry) /* normal x86/PC */
-+ .long ta(lguest_entry) /* lguest hypervisor */
-+ .long ta(xen_entry) /* Xen hypervisor */
-+ .long ta(default_entry) /* Moorestown MID */
- num_subarch_entries = (. - subarch_entries) / 4
- .previous
- #endif /* CONFIG_PARAVIRT */
-@@ -227,8 +291,11 @@ default_entry:
+@@ -195,8 +261,11 @@ ENTRY(startup_32)
movl %eax, pa(max_pfn_mapped)
/* Do early initialization of the fixmap area */
#else /* Not PAE */
page_pde_offset = (__PAGE_OFFSET >> 20);
-@@ -258,8 +325,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
+@@ -226,8 +295,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
movl %eax, pa(max_pfn_mapped)
/* Do early initialization of the fixmap area */
+ movl $pa(initial_pg_fixmap)+PDE_IDENT_ATTR,pa(initial_page_table+0xffc)
+#endif
#endif
- jmp 3f
- /*
-@@ -306,6 +376,7 @@ ENTRY(startup_32_smp)
+
+ #ifdef CONFIG_PARAVIRT
+@@ -241,9 +313,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
+ cmpl $num_subarch_entries, %eax
+ jae bad_subarch
+
+- movl pa(subarch_entries)(,%eax,4), %eax
+- subl $__PAGE_OFFSET, %eax
+- jmp *%eax
++ jmp *pa(subarch_entries)(,%eax,4)
+
+ bad_subarch:
+ WEAK(lguest_entry)
+@@ -255,10 +325,10 @@ WEAK(xen_entry)
+ __INITDATA
+
+ subarch_entries:
+- .long default_entry /* normal x86/PC */
+- .long lguest_entry /* lguest hypervisor */
+- .long xen_entry /* Xen hypervisor */
+- .long default_entry /* Moorestown MID */
++ .long pa(default_entry) /* normal x86/PC */
++ .long pa(lguest_entry) /* lguest hypervisor */
++ .long pa(xen_entry) /* Xen hypervisor */
++ .long pa(default_entry) /* Moorestown MID */
+ num_subarch_entries = (. - subarch_entries) / 4
+ .previous
+ #else
+@@ -312,6 +382,7 @@ default_entry:
orl %edx,%eax
movl %eax,%cr4
testb $X86_CR4_PAE, %al # check if PAE is enabled
jz 6f
-@@ -330,6 +401,9 @@ ENTRY(startup_32_smp)
+@@ -340,6 +411,9 @@ default_entry:
/* Make changes effective */
wrmsr
6:
/*
-@@ -355,9 +429,7 @@ ENTRY(startup_32_smp)
-
- #ifdef CONFIG_SMP
- cmpb $0, ready
-- jz 1f /* Initial CPU cleans BSS */
-- jmp checkCPUtype
--1:
-+ jnz checkCPUtype /* Initial CPU cleans BSS */
- #endif /* CONFIG_SMP */
-
- /*
-@@ -435,7 +507,7 @@ is386: movl $2,%ecx # set MP
+@@ -443,7 +517,7 @@ is386: movl $2,%ecx # set MP
1: movl $(__KERNEL_DS),%eax # reload all the segment registers
movl %eax,%ss # after changing gdt.
movl %eax,%ds
movl %eax,%es
-@@ -449,15 +521,22 @@ is386: movl $2,%ecx # set MP
+@@ -457,15 +531,22 @@ is386: movl $2,%ecx # set MP
*/
cmpb $0,ready
jne 1f
movl %eax,%gs
xorl %eax,%eax # Clear LDT
-@@ -468,10 +547,6 @@ is386: movl $2,%ecx # set MP
- #ifdef CONFIG_SMP
- movb ready, %cl
- movb $1, ready
-- cmpb $0,%cl # the first CPU calls start_kernel
-- je 1f
-- movl (stack_start), %esp
--1:
- #endif /* CONFIG_SMP */
- jmp *(initial_code)
-
-@@ -557,22 +632,22 @@ early_page_fault:
+@@ -558,22 +639,22 @@ early_page_fault:
jmp early_fault
early_fault:
hlt_loop:
hlt
jmp hlt_loop
-@@ -580,8 +655,11 @@ hlt_loop:
+@@ -581,8 +662,11 @@ hlt_loop:
/* This is the default interrupt "handler" :-) */
ALIGN
ignore_int:
pushl %eax
pushl %ecx
pushl %edx
-@@ -590,9 +668,6 @@ ignore_int:
+@@ -591,9 +675,6 @@ ignore_int:
movl $(__KERNEL_DS),%eax
movl %eax,%ds
movl %eax,%es
pushl 16(%esp)
pushl 24(%esp)
pushl 32(%esp)
-@@ -619,29 +694,43 @@ ENTRY(initial_code)
+@@ -622,29 +703,43 @@ ENTRY(initial_code)
/*
* BSS section
*/
- .align PAGE_SIZE_asm
#ifdef CONFIG_X86_PAE
+.section .initial_pg_pmd,"a",@progbits
- ENTRY(initial_pg_pmd)
+ initial_pg_pmd:
.fill 1024*KPMDS,4,0
#else
+.section .initial_page_table,"a",@progbits
.fill 1024,4,0
#endif
+.section .initial_pg_fixmap,"a",@progbits
- ENTRY(initial_pg_fixmap)
+ initial_pg_fixmap:
.fill 1024,4,0
+.section .empty_zero_page,"a",@progbits
ENTRY(empty_zero_page)
ENTRY(initial_page_table)
.long pa(initial_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */
# if KPMDS == 3
-@@ -660,15 +749,24 @@ ENTRY(initial_page_table)
+@@ -663,13 +758,22 @@ ENTRY(initial_page_table)
# error "Kernel PMDs should be 1, 2 or 3"
# endif
.align PAGE_SIZE_asm /* needs to be page-sized too */
#endif
.data
+ .balign 4
ENTRY(stack_start)
- .long init_thread_union+THREAD_SIZE
+ .long init_thread_union+THREAD_SIZE-8
- .long __BOOT_DS
-
- ready: .byte 0
+.section .rodata,"a",@progbits
early_recursion_flag:
.long 0
-@@ -704,7 +802,7 @@ fault_msg:
+@@ -707,7 +811,7 @@ fault_msg:
.word 0 # 32 bit align gdt_desc.address
boot_gdt_descr:
.word __BOOT_DS+7
.word 0 # 32-bit align idt_desc.address
idt_descr:
-@@ -715,7 +813,7 @@ idt_descr:
+@@ -718,7 +822,7 @@ idt_descr:
.word 0 # 32 bit align gdt_desc.address
ENTRY(early_gdt_descr)
.word GDT_ENTRIES*8-1
/*
* The boot_gdt must mirror the equivalent in setup.S and is
-@@ -724,5 +822,65 @@ ENTRY(early_gdt_descr)
+@@ -727,5 +831,65 @@ ENTRY(early_gdt_descr)
.align L1_CACHE_BYTES
ENTRY(boot_gdt)
.fill GDT_ENTRY_BOOT_CS,8,0
+ /* 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.37.2/arch/x86/kernel/head_64.S linux-2.6.37.2/arch/x86/kernel/head_64.S
---- linux-2.6.37.2/arch/x86/kernel/head_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/head_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/head_64.S linux-2.6.38.1/arch/x86/kernel/head_64.S
+--- linux-2.6.38.1/arch/x86/kernel/head_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/head_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -19,6 +19,7 @@
#include <asm/cache.h>
#include <asm/processor-flags.h>
__PAGE_ALIGNED_BSS
.align PAGE_SIZE
-diff -urNp linux-2.6.37.2/arch/x86/kernel/i386_ksyms_32.c linux-2.6.37.2/arch/x86/kernel/i386_ksyms_32.c
---- linux-2.6.37.2/arch/x86/kernel/i386_ksyms_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/i386_ksyms_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/i386_ksyms_32.c linux-2.6.38.1/arch/x86/kernel/i386_ksyms_32.c
+--- linux-2.6.38.1/arch/x86/kernel/i386_ksyms_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/i386_ksyms_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void);
EXPORT_SYMBOL(cmpxchg8b_emu);
#endif
+#ifdef CONFIG_PAX_KERNEXEC
+EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR);
+#endif
-diff -urNp linux-2.6.37.2/arch/x86/kernel/init_task.c linux-2.6.37.2/arch/x86/kernel/init_task.c
---- linux-2.6.37.2/arch/x86/kernel/init_task.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/init_task.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/init_task.c linux-2.6.38.1/arch/x86/kernel/init_task.c
+--- linux-2.6.38.1/arch/x86/kernel/init_task.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/init_task.c 2011-03-21 18:31:35.000000000 -0400
@@ -38,5 +38,5 @@ EXPORT_SYMBOL(init_task);
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
-
+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.37.2/arch/x86/kernel/ioport.c linux-2.6.37.2/arch/x86/kernel/ioport.c
---- linux-2.6.37.2/arch/x86/kernel/ioport.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/ioport.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/ioport.c linux-2.6.38.1/arch/x86/kernel/ioport.c
+--- linux-2.6.38.1/arch/x86/kernel/ioport.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/ioport.c 2011-03-21 18:31:35.000000000 -0400
@@ -6,6 +6,7 @@
#include <linux/sched.h>
#include <linux/kernel.h>
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/irq_32.c linux-2.6.37.2/arch/x86/kernel/irq_32.c
---- linux-2.6.37.2/arch/x86/kernel/irq_32.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/irq_32.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/irq_32.c linux-2.6.38.1/arch/x86/kernel/irq_32.c
+--- linux-2.6.38.1/arch/x86/kernel/irq_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/irq_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -91,7 +91,7 @@ execute_on_irq_stack(int overflow, struc
return 0;
/*
* Shouldnt happen, we returned above if in_interrupt():
*/
-diff -urNp linux-2.6.37.2/arch/x86/kernel/kgdb.c linux-2.6.37.2/arch/x86/kernel/kgdb.c
---- linux-2.6.37.2/arch/x86/kernel/kgdb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/kgdb.c 2011-01-17 02:41:01.000000000 -0500
-@@ -123,11 +123,11 @@ char *dbg_get_reg(int regno, void *mem,
+diff -urNp linux-2.6.38.1/arch/x86/kernel/kgdb.c linux-2.6.38.1/arch/x86/kernel/kgdb.c
+--- linux-2.6.38.1/arch/x86/kernel/kgdb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/kgdb.c 2011-03-21 18:31:35.000000000 -0400
+@@ -124,11 +124,11 @@ char *dbg_get_reg(int regno, void *mem,
switch (regno) {
#ifdef CONFIG_X86_32
case GDB_SS:
*(unsigned long *)mem = kernel_stack_pointer(regs);
break;
case GDB_GS:
-@@ -722,7 +722,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
+@@ -719,7 +719,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
regs->ip = ip;
}
/* Breakpoint instruction: */
.gdb_bpt_instr = { 0xcc },
.flags = KGDB_HW_BREAKPOINT,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/kprobes.c linux-2.6.37.2/arch/x86/kernel/kprobes.c
---- linux-2.6.37.2/arch/x86/kernel/kprobes.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/kprobes.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/kprobes.c linux-2.6.38.1/arch/x86/kernel/kprobes.c
+--- linux-2.6.38.1/arch/x86/kernel/kprobes.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/kprobes.c 2011-03-21 18:31:35.000000000 -0400
@@ -115,8 +115,11 @@ static void __kprobes __synthesize_relat
} __attribute__((packed)) *insn;
return ret;
switch (val) {
-@@ -1368,7 +1375,7 @@ int __kprobes arch_prepare_optimized_kpr
+@@ -1372,7 +1379,7 @@ int __kprobes arch_prepare_optimized_kpr
* Verify if the address gap is in 2GB range, because this uses
* a relative jump.
*/
if (abs(rel) > 0x7fffffff)
return -ERANGE;
-@@ -1389,11 +1396,11 @@ int __kprobes arch_prepare_optimized_kpr
+@@ -1393,11 +1400,11 @@ int __kprobes arch_prepare_optimized_kpr
synthesize_set_arg1(buf + TMPL_MOVE_IDX, (unsigned long)op);
/* Set probe function call */
flush_icache_range((unsigned long) buf,
(unsigned long) buf + TMPL_END_IDX +
-@@ -1409,7 +1416,7 @@ int __kprobes arch_optimize_kprobe(struc
+@@ -1419,7 +1426,7 @@ static void __kprobes setup_optimize_kpr
((long)op->kp.addr + RELATIVEJUMP_SIZE));
/* Backup instructions which will be replaced by jump address */
+ memcpy(op->optinsn.copied_insn, ktla_ktva(op->kp.addr) + INT3_SIZE,
RELATIVE_ADDR_SIZE);
- jmp_code[0] = RELATIVEJUMP_OPCODE;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/ldt.c linux-2.6.37.2/arch/x86/kernel/ldt.c
---- linux-2.6.37.2/arch/x86/kernel/ldt.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/ldt.c 2011-01-17 02:41:01.000000000 -0500
+ insn_buf[0] = RELATIVEJUMP_OPCODE;
+diff -urNp linux-2.6.38.1/arch/x86/kernel/ldt.c linux-2.6.38.1/arch/x86/kernel/ldt.c
+--- linux-2.6.38.1/arch/x86/kernel/ldt.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/ldt.c 2011-03-21 18:31:35.000000000 -0400
@@ -67,13 +67,13 @@ static int alloc_ldt(mm_context_t *pc, i
if (reload) {
#ifdef CONFIG_SMP
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/machine_kexec_32.c linux-2.6.37.2/arch/x86/kernel/machine_kexec_32.c
---- linux-2.6.37.2/arch/x86/kernel/machine_kexec_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/machine_kexec_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/machine_kexec_32.c linux-2.6.38.1/arch/x86/kernel/machine_kexec_32.c
+--- linux-2.6.38.1/arch/x86/kernel/machine_kexec_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/machine_kexec_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -27,7 +27,7 @@
#include <asm/cacheflush.h>
#include <asm/debugreg.h>
relocate_kernel_ptr = control_page;
page_list[PA_CONTROL_PAGE] = __pa(control_page);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/microcode_amd.c linux-2.6.37.2/arch/x86/kernel/microcode_amd.c
---- linux-2.6.37.2/arch/x86/kernel/microcode_amd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/microcode_amd.c 2011-01-17 02:41:01.000000000 -0500
-@@ -331,7 +331,7 @@ static void microcode_fini_cpu_amd(int c
+diff -urNp linux-2.6.38.1/arch/x86/kernel/microcode_amd.c linux-2.6.38.1/arch/x86/kernel/microcode_amd.c
+--- linux-2.6.38.1/arch/x86/kernel/microcode_amd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/microcode_amd.c 2011-03-21 18:31:35.000000000 -0400
+@@ -317,7 +317,7 @@ static void microcode_fini_cpu_amd(int c
uci->mc = NULL;
}
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info_amd,
-@@ -339,7 +339,7 @@ static struct microcode_ops microcode_am
+@@ -325,7 +325,7 @@ static struct microcode_ops microcode_am
.microcode_fini_cpu = microcode_fini_cpu_amd,
};
{
return µcode_amd_ops;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/microcode_core.c linux-2.6.37.2/arch/x86/kernel/microcode_core.c
---- linux-2.6.37.2/arch/x86/kernel/microcode_core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/microcode_core.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/microcode_core.c linux-2.6.38.1/arch/x86/kernel/microcode_core.c
+--- linux-2.6.38.1/arch/x86/kernel/microcode_core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/microcode_core.c 2011-03-21 18:31:35.000000000 -0400
@@ -92,7 +92,7 @@ MODULE_LICENSE("GPL");
#define MICROCODE_VERSION "2.00"
/*
* Synchronization.
-diff -urNp linux-2.6.37.2/arch/x86/kernel/microcode_intel.c linux-2.6.37.2/arch/x86/kernel/microcode_intel.c
---- linux-2.6.37.2/arch/x86/kernel/microcode_intel.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/microcode_intel.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/microcode_intel.c linux-2.6.38.1/arch/x86/kernel/microcode_intel.c
+--- linux-2.6.38.1/arch/x86/kernel/microcode_intel.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/microcode_intel.c 2011-03-21 18:31:35.000000000 -0400
@@ -440,13 +440,13 @@ static enum ucode_state request_microcod
static int get_ucode_user(void *to, const void *from, size_t n)
{
return µcode_intel_ops;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/module.c linux-2.6.37.2/arch/x86/kernel/module.c
---- linux-2.6.37.2/arch/x86/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/module.c 2011-01-17 02:41:01.000000000 -0500
-@@ -35,7 +35,7 @@
+diff -urNp linux-2.6.38.1/arch/x86/kernel/module.c linux-2.6.38.1/arch/x86/kernel/module.c
+--- linux-2.6.38.1/arch/x86/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
+@@ -35,21 +35,66 @@
#define DEBUGP(fmt...)
#endif
-void *module_alloc(unsigned long size)
-+static void *__module_alloc(unsigned long size, pgprot_t prot)
++static inline void *__module_alloc(unsigned long size, pgprot_t prot)
{
- struct vm_struct *area;
-
-@@ -49,8 +49,18 @@ void *module_alloc(unsigned long size)
- if (!area)
+ if (PAGE_ALIGN(size) > MODULES_LEN)
return NULL;
+ return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
+- GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC,
++ GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, prot,
+ -1, __builtin_return_address(0));
+ }
-- return __vmalloc_area(area, GFP_KERNEL | __GFP_HIGHMEM,
-- PAGE_KERNEL_EXEC);
-+ return __vmalloc_area(area, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, prot);
-+}
-+
+void *module_alloc(unsigned long size)
+{
+
+ return __module_alloc(size, PAGE_KERNEL_EXEC);
+#endif
+
- }
-
++}
++
/* Free memory returned from module_alloc */
-@@ -59,6 +69,40 @@ void module_free(struct module *mod, voi
+ void module_free(struct module *mod, void *module_region)
+ {
vfree(module_region);
}
/* We don't need anything special. */
int module_frob_arch_sections(Elf_Ehdr *hdr,
Elf_Shdr *sechdrs,
-@@ -78,14 +122,16 @@ int apply_relocate(Elf32_Shdr *sechdrs,
+@@ -69,14 +114,16 @@ int apply_relocate(Elf32_Shdr *sechdrs,
unsigned int i;
Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr;
Elf32_Sym *sym;
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
-@@ -94,11 +140,15 @@ int apply_relocate(Elf32_Shdr *sechdrs,
+@@ -85,11 +132,15 @@ int apply_relocate(Elf32_Shdr *sechdrs,
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_386_32:
/* We add the value into the location given */
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
-@@ -154,21 +204,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
+@@ -145,21 +196,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
case R_X86_64_NONE:
break;
case R_X86_64_64:
#if 0
if ((s64)val != *(s32 *)loc)
goto overflow;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/paravirt.c linux-2.6.37.2/arch/x86/kernel/paravirt.c
---- linux-2.6.37.2/arch/x86/kernel/paravirt.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/paravirt.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/paravirt.c linux-2.6.38.1/arch/x86/kernel/paravirt.c
+--- linux-2.6.38.1/arch/x86/kernel/paravirt.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/paravirt.c 2011-03-21 18:31:35.000000000 -0400
@@ -122,7 +122,7 @@ unsigned paravirt_patch_jmp(void *insnbu
* corresponding structure. */
static void *get_call_destination(u8 type)
.read_cr2 = native_read_cr2,
.write_cr2 = native_write_cr2,
-@@ -462,6 +462,12 @@ struct pv_mmu_ops pv_mmu_ops = {
+@@ -465,6 +465,12 @@ struct pv_mmu_ops pv_mmu_ops = {
},
.set_fixmap = native_set_fixmap,
};
EXPORT_SYMBOL_GPL(pv_time_ops);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.37.2/arch/x86/kernel/paravirt-spinlocks.c
---- linux-2.6.37.2/arch/x86/kernel/paravirt-spinlocks.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/paravirt-spinlocks.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.38.1/arch/x86/kernel/paravirt-spinlocks.c
+--- linux-2.6.38.1/arch/x86/kernel/paravirt-spinlocks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/paravirt-spinlocks.c 2011-03-21 18:31:35.000000000 -0400
@@ -13,7 +13,7 @@ default_spin_lock_flags(arch_spinlock_t
arch_spin_lock(lock);
}
#ifdef CONFIG_SMP
.spin_is_locked = __ticket_spin_is_locked,
.spin_is_contended = __ticket_spin_is_contended,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/pci-calgary_64.c linux-2.6.37.2/arch/x86/kernel/pci-calgary_64.c
---- linux-2.6.37.2/arch/x86/kernel/pci-calgary_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/pci-calgary_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/pci-calgary_64.c linux-2.6.38.1/arch/x86/kernel/pci-calgary_64.c
+--- linux-2.6.38.1/arch/x86/kernel/pci-calgary_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/pci-calgary_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -476,7 +476,7 @@ static void calgary_free_coherent(struct
free_pages((unsigned long)vaddr, get_order(size));
}
.alloc_coherent = calgary_alloc_coherent,
.free_coherent = calgary_free_coherent,
.map_sg = calgary_map_sg,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/pci-dma.c linux-2.6.37.2/arch/x86/kernel/pci-dma.c
---- linux-2.6.37.2/arch/x86/kernel/pci-dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/pci-dma.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/pci-dma.c linux-2.6.38.1/arch/x86/kernel/pci-dma.c
+--- linux-2.6.38.1/arch/x86/kernel/pci-dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/pci-dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -16,7 +16,7 @@
static int forbid_dac __read_mostly;
#ifdef CONFIG_PCI
if (mask > 0xffffffff && forbid_dac > 0) {
-diff -urNp linux-2.6.37.2/arch/x86/kernel/pci-gart_64.c linux-2.6.37.2/arch/x86/kernel/pci-gart_64.c
---- linux-2.6.37.2/arch/x86/kernel/pci-gart_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/pci-gart_64.c 2011-01-17 02:41:01.000000000 -0500
-@@ -706,7 +706,7 @@ static __init int init_k8_gatt(struct ag
+diff -urNp linux-2.6.38.1/arch/x86/kernel/pci-gart_64.c linux-2.6.38.1/arch/x86/kernel/pci-gart_64.c
+--- linux-2.6.38.1/arch/x86/kernel/pci-gart_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/pci-gart_64.c 2011-03-21 18:31:35.000000000 -0400
+@@ -706,7 +706,7 @@ static __init int init_amd_gatt(struct a
return -1;
}
.map_sg = gart_map_sg,
.unmap_sg = gart_unmap_sg,
.map_page = gart_map_page,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/pci-nommu.c linux-2.6.37.2/arch/x86/kernel/pci-nommu.c
---- linux-2.6.37.2/arch/x86/kernel/pci-nommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/pci-nommu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/pci-nommu.c linux-2.6.38.1/arch/x86/kernel/pci-nommu.c
+--- linux-2.6.38.1/arch/x86/kernel/pci-nommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/pci-nommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -95,7 +95,7 @@ static void nommu_sync_sg_for_device(str
flush_write_buffers();
}
.alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = nommu_free_coherent,
.map_sg = nommu_map_sg,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/pci-swiotlb.c linux-2.6.37.2/arch/x86/kernel/pci-swiotlb.c
---- linux-2.6.37.2/arch/x86/kernel/pci-swiotlb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/pci-swiotlb.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/pci-swiotlb.c linux-2.6.38.1/arch/x86/kernel/pci-swiotlb.c
+--- linux-2.6.38.1/arch/x86/kernel/pci-swiotlb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/pci-swiotlb.c 2011-03-21 18:31:35.000000000 -0400
@@ -26,7 +26,7 @@ static void *x86_swiotlb_alloc_coherent(
return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags);
}
.mapping_error = swiotlb_dma_mapping_error,
.alloc_coherent = x86_swiotlb_alloc_coherent,
.free_coherent = swiotlb_free_coherent,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/process_32.c linux-2.6.37.2/arch/x86/kernel/process_32.c
---- linux-2.6.37.2/arch/x86/kernel/process_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/process_32.c 2011-01-17 02:41:01.000000000 -0500
-@@ -67,6 +67,7 @@ asmlinkage void ret_from_fork(void) __as
+diff -urNp linux-2.6.38.1/arch/x86/kernel/process_32.c linux-2.6.38.1/arch/x86/kernel/process_32.c
+--- linux-2.6.38.1/arch/x86/kernel/process_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/process_32.c 2011-03-21 18:31:35.000000000 -0400
+@@ -65,6 +65,7 @@ asmlinkage void ret_from_fork(void) __as
unsigned long thread_saved_pc(struct task_struct *tsk)
{
return ((unsigned long *)tsk->thread.sp)[3];
}
#ifndef CONFIG_SMP
-@@ -130,15 +131,14 @@ void __show_regs(struct pt_regs *regs, i
+@@ -126,15 +127,14 @@ void __show_regs(struct pt_regs *regs, i
unsigned long sp;
unsigned short ss, gs;
show_regs_common();
-@@ -200,7 +200,7 @@ int copy_thread(unsigned long clone_flag
+@@ -196,7 +196,7 @@ int copy_thread(unsigned long clone_flag
struct task_struct *tsk;
int err;
*childregs = *regs;
childregs->ax = 0;
childregs->sp = sp;
-@@ -297,7 +297,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -293,7 +293,7 @@ __switch_to(struct task_struct *prev_p,
struct thread_struct *prev = &prev_p->thread,
*next = &next_p->thread;
int cpu = smp_processor_id();
bool preload_fpu;
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
-@@ -332,6 +332,10 @@ __switch_to(struct task_struct *prev_p,
+@@ -328,6 +328,10 @@ __switch_to(struct task_struct *prev_p,
*/
lazy_save_gs(prev->gs);
/*
* Load the per-thread Thread-Local Storage descriptor.
*/
-@@ -408,3 +412,27 @@ unsigned long get_wchan(struct task_stru
+@@ -404,3 +408,27 @@ unsigned long get_wchan(struct task_stru
return 0;
}
+ load_sp0(init_tss + smp_processor_id(), thread);
+}
+#endif
-diff -urNp linux-2.6.37.2/arch/x86/kernel/process_64.c linux-2.6.37.2/arch/x86/kernel/process_64.c
---- linux-2.6.37.2/arch/x86/kernel/process_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/process_64.c 2011-01-17 02:41:01.000000000 -0500
-@@ -89,7 +89,7 @@ static void __exit_idle(void)
+diff -urNp linux-2.6.38.1/arch/x86/kernel/process_64.c linux-2.6.38.1/arch/x86/kernel/process_64.c
+--- linux-2.6.38.1/arch/x86/kernel/process_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/process_64.c 2011-03-21 18:31:35.000000000 -0400
+@@ -87,7 +87,7 @@ static void __exit_idle(void)
void exit_idle(void)
{
/* idle loop has pid 0 */
return;
__exit_idle();
}
-@@ -380,7 +380,7 @@ __switch_to(struct task_struct *prev_p,
+@@ -376,7 +376,7 @@ __switch_to(struct task_struct *prev_p,
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
unsigned fsindex, gsindex;
bool preload_fpu;
-@@ -533,12 +533,11 @@ unsigned long get_wchan(struct task_stru
+@@ -529,12 +529,11 @@ unsigned long get_wchan(struct task_stru
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack = (unsigned long)task_stack_page(p);
return 0;
ip = *(u64 *)(fp+8);
if (!in_sched_functions(ip))
-diff -urNp linux-2.6.37.2/arch/x86/kernel/process.c linux-2.6.37.2/arch/x86/kernel/process.c
---- linux-2.6.37.2/arch/x86/kernel/process.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/process.c 2011-02-27 14:49:45.000000000 -0500
-@@ -75,7 +75,7 @@ void exit_thread(void)
+diff -urNp linux-2.6.38.1/arch/x86/kernel/process.c linux-2.6.38.1/arch/x86/kernel/process.c
+--- linux-2.6.38.1/arch/x86/kernel/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/process.c 2011-03-21 18:31:35.000000000 -0400
+@@ -70,7 +70,7 @@ void exit_thread(void)
unsigned long *bp = t->io_bitmap_ptr;
if (bp) {
t->io_bitmap_ptr = NULL;
clear_thread_flag(TIF_IO_BITMAP);
-@@ -103,6 +103,7 @@ void show_regs_common(void)
+@@ -97,6 +97,7 @@ void show_regs_common(void)
vendor = dmi_get_system_info(DMI_SYS_VENDOR);
if (!vendor)
vendor = "";
product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (!product)
product = "";
-@@ -111,8 +112,8 @@ void show_regs_common(void)
+@@ -105,8 +106,8 @@ void show_regs_common(void)
board = dmi_get_system_info(DMI_BOARD_NAME);
printk(KERN_CONT "\n");
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
-@@ -129,6 +130,9 @@ void flush_thread(void)
+@@ -123,6 +124,9 @@ void flush_thread(void)
{
struct task_struct *tsk = current;
flush_ptrace_hw_breakpoint(tsk);
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
/*
-@@ -291,10 +295,10 @@ int kernel_thread(int (*fn)(void *), voi
+@@ -285,10 +289,10 @@ int kernel_thread(int (*fn)(void *), voi
regs.di = (unsigned long) arg;
#ifdef CONFIG_X86_32
#else
regs.ss = __KERNEL_DS;
#endif
-@@ -669,17 +673,3 @@ static int __init idle_setup(char *str)
+@@ -667,17 +671,3 @@ static int __init idle_setup(char *str)
return 0;
}
early_param("idle", idle_setup);
- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
-}
-
-diff -urNp linux-2.6.37.2/arch/x86/kernel/ptrace.c linux-2.6.37.2/arch/x86/kernel/ptrace.c
---- linux-2.6.37.2/arch/x86/kernel/ptrace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/ptrace.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/ptrace.c linux-2.6.38.1/arch/x86/kernel/ptrace.c
+--- linux-2.6.38.1/arch/x86/kernel/ptrace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/ptrace.c 2011-03-21 18:31:35.000000000 -0400
@@ -805,7 +805,7 @@ long arch_ptrace(struct task_struct *chi
unsigned long addr, unsigned long data)
{
}
void user_single_step_siginfo(struct task_struct *tsk,
-diff -urNp linux-2.6.37.2/arch/x86/kernel/reboot.c linux-2.6.37.2/arch/x86/kernel/reboot.c
---- linux-2.6.37.2/arch/x86/kernel/reboot.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/reboot.c 2011-01-17 02:41:01.000000000 -0500
-@@ -33,7 +33,7 @@ void (*pm_power_off)(void);
+@@ -1347,7 +1347,7 @@ void send_sigtrap(struct task_struct *ts
+ * We must return the syscall number to actually look up in the table.
+ * This can be -1L to skip running any syscall at all.
+ */
+-asmregparm long syscall_trace_enter(struct pt_regs *regs)
++long syscall_trace_enter(struct pt_regs *regs)
+ {
+ long ret = 0;
+
+@@ -1392,7 +1392,7 @@ asmregparm long syscall_trace_enter(stru
+ return ret ?: regs->orig_ax;
+ }
+
+-asmregparm void syscall_trace_leave(struct pt_regs *regs)
++void syscall_trace_leave(struct pt_regs *regs)
+ {
+ bool step;
+
+diff -urNp linux-2.6.38.1/arch/x86/kernel/reboot.c linux-2.6.38.1/arch/x86/kernel/reboot.c
+--- linux-2.6.38.1/arch/x86/kernel/reboot.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/reboot.c 2011-03-21 18:31:35.000000000 -0400
+@@ -34,7 +34,7 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
static const struct desc_ptr no_idt = {};
enum reboot_type reboot_type = BOOT_KBD;
int reboot_force;
-@@ -284,7 +284,7 @@ static struct dmi_system_id __initdata r
- DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
+@@ -293,7 +293,7 @@ static struct dmi_system_id __initdata r
+ DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),
},
},
- { }
};
static int __init reboot_init(void)
-@@ -300,12 +300,12 @@ core_initcall(reboot_init);
+@@ -309,12 +309,12 @@ core_initcall(reboot_init);
controller to pulse the CPU reset line, which is more thorough, but
doesn't work with at least one type of 486 motherboard. It is easy
to stop this code working; hence the copious comments. */
};
static const struct desc_ptr
-@@ -354,7 +354,7 @@ static const unsigned char jump_to_bios
+@@ -363,7 +363,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!
*/
{
local_irq_disable();
-@@ -381,16 +381,15 @@ void machine_real_restart(const unsigned
+@@ -390,16 +390,15 @@ void machine_real_restart(const unsigned
boot)". This seems like a fairly standard thing that gets set by
REBOOT.COM programs, and the previous reset routine did this
too. */
/* Set up the IDT for real mode. */
load_idt(&real_mode_idt);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/setup.c linux-2.6.37.2/arch/x86/kernel/setup.c
---- linux-2.6.37.2/arch/x86/kernel/setup.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/setup.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/setup.c linux-2.6.38.1/arch/x86/kernel/setup.c
+--- linux-2.6.38.1/arch/x86/kernel/setup.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/setup.c 2011-03-21 18:31:35.000000000 -0400
@@ -654,7 +654,7 @@ static void __init trim_bios_range(void)
* area (640->1Mb) as ram even though it is not.
* take them out.
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.37.2/arch/x86/kernel/setup_percpu.c linux-2.6.37.2/arch/x86/kernel/setup_percpu.c
---- linux-2.6.37.2/arch/x86/kernel/setup_percpu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/setup_percpu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/setup_percpu.c linux-2.6.38.1/arch/x86/kernel/setup_percpu.c
+--- linux-2.6.38.1/arch/x86/kernel/setup_percpu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/setup_percpu.c 2011-03-21 18:31:35.000000000 -0400
@@ -21,19 +21,17 @@
#include <asm/cpu.h>
#include <asm/stackprotector.h>
/*
* Up to this point, the boot CPU has been using .init.data
* area. Reload any changed state for the boot CPU.
-diff -urNp linux-2.6.37.2/arch/x86/kernel/signal.c linux-2.6.37.2/arch/x86/kernel/signal.c
---- linux-2.6.37.2/arch/x86/kernel/signal.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/signal.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/signal.c linux-2.6.38.1/arch/x86/kernel/signal.c
+--- linux-2.6.38.1/arch/x86/kernel/signal.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/signal.c 2011-03-21 18:31:35.000000000 -0400
@@ -198,7 +198,7 @@ static unsigned long align_sigframe(unsi
* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0.
return;
if (current_thread_info()->status & TS_RESTORE_SIGMASK)
-diff -urNp linux-2.6.37.2/arch/x86/kernel/smpboot.c linux-2.6.37.2/arch/x86/kernel/smpboot.c
---- linux-2.6.37.2/arch/x86/kernel/smpboot.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/smpboot.c 2011-02-27 14:49:45.000000000 -0500
-@@ -786,7 +786,11 @@ do_rest:
+diff -urNp linux-2.6.38.1/arch/x86/kernel/smpboot.c linux-2.6.38.1/arch/x86/kernel/smpboot.c
+--- linux-2.6.38.1/arch/x86/kernel/smpboot.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/smpboot.c 2011-03-21 18:31:35.000000000 -0400
+@@ -783,7 +783,11 @@ do_rest:
(unsigned long)task_stack_page(c_idle.idle) -
KERNEL_STACK_OFFSET + THREAD_SIZE;
#endif
+ pax_close_kernel();
+
initial_code = (unsigned long)start_secondary;
- stack_start.sp = (void *) c_idle.idle->thread.sp;
+ stack_start = c_idle.idle->thread.sp;
-@@ -926,6 +930,12 @@ int __cpuinit native_cpu_up(unsigned int
+@@ -923,6 +927,12 @@ int __cpuinit native_cpu_up(unsigned int
per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
err = do_boot_cpu(apicid, cpu);
if (err) {
pr_debug("do_boot_cpu failed %d\n", err);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/step.c linux-2.6.37.2/arch/x86/kernel/step.c
---- linux-2.6.37.2/arch/x86/kernel/step.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/step.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/step.c linux-2.6.38.1/arch/x86/kernel/step.c
+--- linux-2.6.38.1/arch/x86/kernel/step.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/step.c 2011-03-21 18:31:35.000000000 -0400
@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struc
struct desc_struct *desc;
unsigned long base;
/* 32-bit mode: register increment */
return 0;
/* 64-bit mode: REX prefix */
-diff -urNp linux-2.6.37.2/arch/x86/kernel/syscall_table_32.S linux-2.6.37.2/arch/x86/kernel/syscall_table_32.S
---- linux-2.6.37.2/arch/x86/kernel/syscall_table_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/syscall_table_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/syscall_table_32.S linux-2.6.38.1/arch/x86/kernel/syscall_table_32.S
+--- linux-2.6.38.1/arch/x86/kernel/syscall_table_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/syscall_table_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -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.37.2/arch/x86/kernel/sys_i386_32.c linux-2.6.37.2/arch/x86/kernel/sys_i386_32.c
---- linux-2.6.37.2/arch/x86/kernel/sys_i386_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/sys_i386_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/sys_i386_32.c linux-2.6.38.1/arch/x86/kernel/sys_i386_32.c
+--- linux-2.6.38.1/arch/x86/kernel/sys_i386_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/sys_i386_32.c 2011-03-21 23:47:41.000000000 -0400
@@ -24,17 +24,224 @@
#include <asm/syscalls.h>
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
-+ addr = vma->vm_start-len;
-+ } while (len < vma->vm_start);
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+bottomup:
+ /*
+
+ return addr;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/sys_x86_64.c linux-2.6.37.2/arch/x86/kernel/sys_x86_64.c
---- linux-2.6.37.2/arch/x86/kernel/sys_x86_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/sys_x86_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/sys_x86_64.c linux-2.6.38.1/arch/x86/kernel/sys_x86_64.c
+--- linux-2.6.38.1/arch/x86/kernel/sys_x86_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/sys_x86_64.c 2011-03-21 23:47:41.000000000 -0400
@@ -32,8 +32,8 @@ out:
return error;
}
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -141,12 +144,15 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -141,13 +144,18 @@ arch_get_unmapped_area_topdown(struct fi
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT))
goto bottomup;
/* requesting a specific address */
if (addr) {
addr = PAGE_ALIGN(addr);
- vma = find_vma(mm, addr);
+- vma = find_vma(mm, addr);
- if (TASK_SIZE - len >= addr &&
- (!vma || addr + len <= vma->vm_start))
-+ if (TASK_SIZE - len >= addr && check_heap_stack_gap(vma, addr, len))
- return addr;
+- return addr;
++ if (TASK_SIZE - len >= addr) {
++ vma = find_vma(mm, addr);
++ if (check_heap_stack_gap(vma, addr, len))
++ return addr;
++ }
}
-@@ -162,7 +168,7 @@ arch_get_unmapped_area_topdown(struct fi
+ /* check if free_area_cache is useful for us */
+@@ -162,7 +170,7 @@ arch_get_unmapped_area_topdown(struct fi
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
/* remember the address as a hint for next time */
return mm->free_area_cache = addr-len;
}
-@@ -179,7 +185,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -179,7 +187,7 @@ arch_get_unmapped_area_topdown(struct fi
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
return mm->free_area_cache = addr;
-@@ -198,13 +204,21 @@ bottomup:
+@@ -188,8 +196,8 @@ arch_get_unmapped_area_topdown(struct fi
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = vma->vm_start-len;
+- } while (len < vma->vm_start);
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+ bottomup:
+ /*
+@@ -198,13 +206,21 @@ bottomup:
* can happen with large stack limits and large mmap()
* allocations.
*/
mm->cached_hole_size = ~0UL;
return addr;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/time.c linux-2.6.37.2/arch/x86/kernel/time.c
---- linux-2.6.37.2/arch/x86/kernel/time.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/time.c 2011-01-17 02:41:01.000000000 -0500
-@@ -26,17 +26,13 @@
- int timer_ack;
- #endif
+diff -urNp linux-2.6.38.1/arch/x86/kernel/time.c linux-2.6.38.1/arch/x86/kernel/time.c
+--- linux-2.6.38.1/arch/x86/kernel/time.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/time.c 2011-03-21 18:31:35.000000000 -0400
+@@ -22,17 +22,13 @@
+ #include <asm/hpet.h>
+ #include <asm/time.h>
-#ifdef CONFIG_X86_64
-volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
#else
unsigned long *sp =
(unsigned long *)kernel_stack_pointer(regs);
-@@ -45,11 +41,17 @@ unsigned long profile_pc(struct pt_regs
+@@ -41,11 +37,17 @@ unsigned long profile_pc(struct pt_regs
* or above a saved flags. Eflags has bits 22-31 zero,
* kernel addresses don't.
*/
}
return pc;
}
-diff -urNp linux-2.6.37.2/arch/x86/kernel/tls.c linux-2.6.37.2/arch/x86/kernel/tls.c
---- linux-2.6.37.2/arch/x86/kernel/tls.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/tls.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/tls.c linux-2.6.38.1/arch/x86/kernel/tls.c
+--- linux-2.6.38.1/arch/x86/kernel/tls.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/tls.c 2011-03-21 18:31:35.000000000 -0400
@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
return -EINVAL;
set_tls_desc(p, idx, &info, 1);
return 0;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/trampoline_32.S linux-2.6.37.2/arch/x86/kernel/trampoline_32.S
---- linux-2.6.37.2/arch/x86/kernel/trampoline_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/trampoline_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/trampoline_32.S linux-2.6.38.1/arch/x86/kernel/trampoline_32.S
+--- linux-2.6.38.1/arch/x86/kernel/trampoline_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/trampoline_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -32,6 +32,12 @@
#include <asm/segment.h>
#include <asm/page_types.h>
# 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.37.2/arch/x86/kernel/trampoline_64.S linux-2.6.37.2/arch/x86/kernel/trampoline_64.S
---- linux-2.6.37.2/arch/x86/kernel/trampoline_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/trampoline_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/trampoline_64.S linux-2.6.38.1/arch/x86/kernel/trampoline_64.S
+--- linux-2.6.38.1/arch/x86/kernel/trampoline_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/trampoline_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -91,7 +91,7 @@ startup_32:
movl $__KERNEL_DS, %eax # Initialize the %ds segment register
movl %eax, %ds
.long tgdt - r_base
.short 0
.quad 0x00cf9b000000ffff # __KERNEL32_CS
-diff -urNp linux-2.6.37.2/arch/x86/kernel/traps.c linux-2.6.37.2/arch/x86/kernel/traps.c
---- linux-2.6.37.2/arch/x86/kernel/traps.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/traps.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/traps.c linux-2.6.38.1/arch/x86/kernel/traps.c
+--- linux-2.6.38.1/arch/x86/kernel/traps.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/traps.c 2011-03-21 18:31:35.000000000 -0400
@@ -70,12 +70,6 @@ asmlinkage int system_call(void);
/* Do we ignore FPU interrupts ? */
#endif
DECLARE_BITMAP(used_vectors, NR_VECTORS);
-@@ -110,13 +104,13 @@ static inline void preempt_conditional_c
+@@ -117,13 +111,13 @@ static inline void preempt_conditional_c
}
static void __kprobes
/*
* traps 0, 1, 3, 4, and 5 should be forwarded to vm86.
* On nmi (interrupt 2), do_trap should not be called.
-@@ -127,7 +121,7 @@ do_trap(int trapnr, int signr, char *str
+@@ -134,7 +128,7 @@ do_trap(int trapnr, int signr, char *str
}
#endif
goto kernel_trap;
#ifdef CONFIG_X86_32
-@@ -150,7 +144,7 @@ trap_signal:
+@@ -157,7 +151,7 @@ trap_signal:
printk_ratelimit()) {
printk(KERN_INFO
"%s[%d] trap %s ip:%lx sp:%lx error:%lx",
regs->ip, regs->sp, error_code);
print_vma_addr(" in ", regs->ip);
printk("\n");
-@@ -167,8 +161,20 @@ kernel_trap:
+@@ -174,8 +168,20 @@ kernel_trap:
if (!fixup_exception(regs)) {
tsk->thread.error_code = error_code;
tsk->thread.trap_no = trapnr;
return;
#ifdef CONFIG_X86_32
-@@ -257,14 +263,30 @@ do_general_protection(struct pt_regs *re
+@@ -264,14 +270,30 @@ do_general_protection(struct pt_regs *re
conditional_sti(regs);
#ifdef CONFIG_X86_32
tsk->thread.error_code = error_code;
tsk->thread.trap_no = 13;
-@@ -297,6 +319,13 @@ gp_in_kernel:
+@@ -304,6 +326,13 @@ gp_in_kernel:
if (notify_die(DIE_GPF, "general protection fault", regs,
error_code, 13, SIGSEGV) == NOTIFY_STOP)
return;
die("general protection fault", regs, error_code);
}
-@@ -572,7 +601,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -569,7 +598,7 @@ dotraplinkage void __kprobes do_debug(st
/* It's safe to allow irq's after DR6 has been saved */
preempt_conditional_sti(regs);
handle_vm86_trap((struct kernel_vm86_regs *) regs,
error_code, 1);
preempt_conditional_cli(regs);
-@@ -586,7 +615,7 @@ dotraplinkage void __kprobes do_debug(st
+@@ -583,7 +612,7 @@ dotraplinkage void __kprobes do_debug(st
* We already checked v86 mode above, so we can check for kernel mode
* by just checking the CPL of CS.
*/
tsk->thread.debugreg6 &= ~DR_STEP;
set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
regs->flags &= ~X86_EFLAGS_TF;
-@@ -615,7 +644,7 @@ void math_error(struct pt_regs *regs, in
+@@ -612,7 +641,7 @@ void math_error(struct pt_regs *regs, in
return;
conditional_sti(regs);
{
if (!fixup_exception(regs)) {
task->thread.error_code = error_code;
-diff -urNp linux-2.6.37.2/arch/x86/kernel/tsc.c linux-2.6.37.2/arch/x86/kernel/tsc.c
---- linux-2.6.37.2/arch/x86/kernel/tsc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/tsc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/tsc.c linux-2.6.38.1/arch/x86/kernel/tsc.c
+--- linux-2.6.38.1/arch/x86/kernel/tsc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/tsc.c 2011-03-21 18:31:35.000000000 -0400
@@ -837,7 +837,7 @@ static struct dmi_system_id __initdata b
DMI_MATCH(DMI_BOARD_NAME, "2635FA0"),
},
};
static void __init check_system_tsc_reliable(void)
-diff -urNp linux-2.6.37.2/arch/x86/kernel/vm86_32.c linux-2.6.37.2/arch/x86/kernel/vm86_32.c
---- linux-2.6.37.2/arch/x86/kernel/vm86_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/vm86_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/vm86_32.c linux-2.6.38.1/arch/x86/kernel/vm86_32.c
+--- linux-2.6.38.1/arch/x86/kernel/vm86_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/vm86_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,6 +41,7 @@
#include <linux/ptrace.h>
#include <linux/audit.h>
current->thread.sp0 = current->thread.saved_sp0;
current->thread.sysenter_cs = __KERNEL_CS;
load_sp0(tss, ¤t->thread);
-@@ -207,6 +208,13 @@ int sys_vm86old(struct vm86_struct __use
+@@ -208,6 +209,13 @@ int sys_vm86old(struct vm86_struct __use
struct task_struct *tsk;
int tmp, ret = -EPERM;
tsk = current;
if (tsk->thread.saved_sp0)
goto out;
-@@ -237,6 +245,14 @@ int sys_vm86(unsigned long cmd, unsigned
+@@ -238,6 +246,14 @@ int sys_vm86(unsigned long cmd, unsigned
int tmp, ret;
struct vm86plus_struct __user *v86;
tsk = current;
switch (cmd) {
case VM86_REQUEST_IRQ:
-@@ -323,7 +339,7 @@ static void do_sys_vm86(struct kernel_vm
+@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm
tsk->thread.saved_fs = info->regs32->fs;
tsk->thread.saved_gs = get_user_gs(info->regs32);
tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
-@@ -528,7 +544,7 @@ static void do_int(struct kernel_vm86_re
+@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_re
goto cannot_handle;
if (i == 0x21 && is_revectored(AH(regs), &KVM86->int21_revectored))
goto cannot_handle;
if (get_user(segoffs, intr_ptr))
goto cannot_handle;
if ((segoffs >> 16) == BIOSSEG)
-diff -urNp linux-2.6.37.2/arch/x86/kernel/vmlinux.lds.S linux-2.6.37.2/arch/x86/kernel/vmlinux.lds.S
---- linux-2.6.37.2/arch/x86/kernel/vmlinux.lds.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/vmlinux.lds.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/vmlinux.lds.S linux-2.6.38.1/arch/x86/kernel/vmlinux.lds.S
+--- linux-2.6.38.1/arch/x86/kernel/vmlinux.lds.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/vmlinux.lds.S 2011-03-21 18:31:35.000000000 -0400
@@ -26,6 +26,13 @@
#include <asm/page_types.h>
#include <asm/cache.h>
PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
-- data PT_LOAD FLAGS(7); /* RWE */
+#ifdef CONFIG_X86_32
+ module PT_LOAD FLAGS(5); /* R_E */
+#endif
+#else
+ rodata PT_LOAD FLAGS(4); /* R__ */
+#endif
-+ data PT_LOAD FLAGS(6); /* RW_ */
+ data PT_LOAD FLAGS(6); /* RW_ */
#ifdef CONFIG_X86_64
user PT_LOAD FLAGS(5); /* R_E */
+#endif
+
+ EXCEPTION_TABLE(16) :rodata
- X64_ALIGN_DEBUG_RODATA_BEGIN
- RO_DATA(PAGE_SIZE)
-@@ -122,16 +176,20 @@ SECTIONS
+ #if defined(CONFIG_DEBUG_RODATA)
+ /* .text should occupy whole number of pages */
+@@ -126,16 +180,20 @@ SECTIONS
/* Data */
.data : AT(ADDR(.data) - LOAD_OFFSET) {
PAGE_ALIGNED_DATA(PAGE_SIZE)
-@@ -140,6 +198,8 @@ SECTIONS
+@@ -144,6 +202,8 @@ SECTIONS
DATA_DATA
CONSTRUCTORS
/* rarely changed data like cpu maps */
READ_MOSTLY_DATA(INTERNODE_CACHE_BYTES)
-@@ -194,12 +254,6 @@ SECTIONS
+@@ -198,12 +258,6 @@ SECTIONS
}
vgetcpu_mode = VVIRT(.vgetcpu_mode);
.vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) {
*(.vsyscall_3)
}
-@@ -215,12 +269,19 @@ SECTIONS
+@@ -219,12 +273,19 @@ SECTIONS
#endif /* CONFIG_X86_64 */
/* Init code and data - will be freed after init */
/*
* percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
* output PHDR, so the next output section - .init.text - should
-@@ -229,12 +290,27 @@ SECTIONS
+@@ -233,12 +294,27 @@ SECTIONS
PERCPU_VADDR(0, :percpu)
#endif
.x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
__x86_cpu_dev_start = .;
-@@ -288,19 +364,12 @@ SECTIONS
+@@ -292,19 +368,12 @@ SECTIONS
__iommu_table_end = .;
}
. = ALIGN(8);
PERCPU(THREAD_SIZE)
#endif
-@@ -319,16 +388,10 @@ SECTIONS
+@@ -323,16 +392,10 @@ SECTIONS
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
__smp_locks = .;
*(.smp_locks)
/* BSS */
. = ALIGN(PAGE_SIZE);
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
-@@ -344,6 +407,7 @@ SECTIONS
+@@ -348,6 +411,7 @@ SECTIONS
__brk_base = .;
. += 64 * 1024; /* 64k alignment slop space */
*(.brk_reservation) /* areas brk users have reserved */
__brk_limit = .;
}
-@@ -370,13 +434,12 @@ SECTIONS
+@@ -374,13 +438,12 @@ SECTIONS
* for the boot processor.
*/
#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
"kernel image bigger than KERNEL_IMAGE_SIZE");
#ifdef CONFIG_SMP
-diff -urNp linux-2.6.37.2/arch/x86/kernel/vsyscall_64.c linux-2.6.37.2/arch/x86/kernel/vsyscall_64.c
---- linux-2.6.37.2/arch/x86/kernel/vsyscall_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/vsyscall_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/vsyscall_64.c linux-2.6.38.1/arch/x86/kernel/vsyscall_64.c
+--- linux-2.6.38.1/arch/x86/kernel/vsyscall_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/vsyscall_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -80,6 +80,7 @@ void update_vsyscall(struct timespec *wa
write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
p = tcache->blob[1];
} else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
/* Load per CPU data from RDTSCP */
-diff -urNp linux-2.6.37.2/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.37.2/arch/x86/kernel/x8664_ksyms_64.c
---- linux-2.6.37.2/arch/x86/kernel/x8664_ksyms_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/x8664_ksyms_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.38.1/arch/x86/kernel/x8664_ksyms_64.c
+--- linux-2.6.38.1/arch/x86/kernel/x8664_ksyms_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/x8664_ksyms_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -29,8 +29,6 @@ EXPORT_SYMBOL(__put_user_8);
EXPORT_SYMBOL(copy_user_generic_string);
EXPORT_SYMBOL(copy_user_generic_unrolled);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);
-diff -urNp linux-2.6.37.2/arch/x86/kernel/xsave.c linux-2.6.37.2/arch/x86/kernel/xsave.c
---- linux-2.6.37.2/arch/x86/kernel/xsave.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kernel/xsave.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kernel/xsave.c linux-2.6.38.1/arch/x86/kernel/xsave.c
+--- linux-2.6.38.1/arch/x86/kernel/xsave.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kernel/xsave.c 2011-03-21 18:31:35.000000000 -0400
@@ -130,7 +130,7 @@ int check_for_xstate(struct i387_fxsave_
fx_sw_user->xstate_size > fx_sw_user->extended_size)
return -EINVAL;
buf);
if (unlikely(err)) {
/*
-diff -urNp linux-2.6.37.2/arch/x86/kvm/emulate.c linux-2.6.37.2/arch/x86/kvm/emulate.c
---- linux-2.6.37.2/arch/x86/kvm/emulate.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kvm/emulate.c 2011-01-17 02:41:01.000000000 -0500
-@@ -96,7 +96,7 @@
+diff -urNp linux-2.6.38.1/arch/x86/kvm/emulate.c linux-2.6.38.1/arch/x86/kvm/emulate.c
+--- linux-2.6.38.1/arch/x86/kvm/emulate.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kvm/emulate.c 2011-03-21 18:31:35.000000000 -0400
+@@ -88,7 +88,7 @@
#define Src2ImmByte (2<<29)
#define Src2One (3<<29)
#define Src2Imm (4<<29)
#define X2(x...) x, x
#define X3(x...) X2(x), x
-@@ -197,6 +197,7 @@ struct group_dual {
+@@ -189,6 +189,7 @@ struct group_dual {
#define ____emulate_2op(_op, _src, _dst, _eflags, _x, _y, _suffix, _dsttype) \
do { \
__asm__ __volatile__ ( \
_PRE_EFLAGS("0", "4", "2") \
_op _suffix " %"_x"3,%1; " \
-@@ -210,8 +211,6 @@ struct group_dual {
+@@ -202,8 +203,6 @@ struct group_dual {
/* Raw emulation: instruction has two explicit operands. */
#define __emulate_2op_nobyte(_op,_src,_dst,_eflags,_wx,_wy,_lx,_ly,_qx,_qy) \
do { \
switch ((_dst).bytes) { \
case 2: \
____emulate_2op(_op,_src,_dst,_eflags,_wx,_wy,"w",u16);\
-@@ -227,7 +226,6 @@ struct group_dual {
+@@ -219,7 +218,6 @@ struct group_dual {
#define __emulate_2op(_op,_src,_dst,_eflags,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy) \
do { \
switch ((_dst).bytes) { \
case 1: \
____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b",u8); \
-diff -urNp linux-2.6.37.2/arch/x86/kvm/lapic.c linux-2.6.37.2/arch/x86/kvm/lapic.c
---- linux-2.6.37.2/arch/x86/kvm/lapic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kvm/lapic.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/kvm/lapic.c linux-2.6.38.1/arch/x86/kvm/lapic.c
+--- linux-2.6.38.1/arch/x86/kvm/lapic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kvm/lapic.c 2011-03-21 18:31:35.000000000 -0400
@@ -53,7 +53,7 @@
#define APIC_BUS_CYCLE_NS 1
#define APIC_LVT_NUM 6
/* 14 is the version for Xeon and Pentium 8.4.8*/
-diff -urNp linux-2.6.37.2/arch/x86/kvm/svm.c linux-2.6.37.2/arch/x86/kvm/svm.c
---- linux-2.6.37.2/arch/x86/kvm/svm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kvm/svm.c 2011-01-17 02:41:01.000000000 -0500
-@@ -3023,7 +3023,11 @@ static void reload_tss(struct kvm_vcpu *
+diff -urNp linux-2.6.38.1/arch/x86/kvm/svm.c linux-2.6.38.1/arch/x86/kvm/svm.c
+--- linux-2.6.38.1/arch/x86/kvm/svm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kvm/svm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3273,7 +3273,11 @@ static void reload_tss(struct kvm_vcpu *
int cpu = raw_smp_processor_id();
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
load_TR_desc();
}
-@@ -3600,7 +3604,7 @@ static void svm_fpu_deactivate(struct kv
+@@ -3850,7 +3854,7 @@ static void svm_fpu_deactivate(struct kv
update_cr0_intercept(svm);
}
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
.hardware_setup = svm_hardware_setup,
-diff -urNp linux-2.6.37.2/arch/x86/kvm/vmx.c linux-2.6.37.2/arch/x86/kvm/vmx.c
---- linux-2.6.37.2/arch/x86/kvm/vmx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kvm/vmx.c 2011-01-17 02:41:01.000000000 -0500
-@@ -705,7 +705,11 @@ static void reload_tss(void)
+diff -urNp linux-2.6.38.1/arch/x86/kvm/vmx.c linux-2.6.38.1/arch/x86/kvm/vmx.c
+--- linux-2.6.38.1/arch/x86/kvm/vmx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kvm/vmx.c 2011-03-21 18:31:35.000000000 -0400
+@@ -725,7 +725,11 @@ static void reload_tss(void)
struct desc_struct *descs;
descs = (void *)gdt->address;
load_TR_desc();
}
-@@ -1589,8 +1593,11 @@ static __init int hardware_setup(void)
+@@ -1642,8 +1646,11 @@ static __init int hardware_setup(void)
if (!cpu_has_vmx_flexpriority())
flexpriority_enabled = 0;
if (enable_ept && !cpu_has_vmx_ept_2m_page())
kvm_disable_largepages();
-@@ -2575,7 +2582,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
+@@ -2640,7 +2647,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0);
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0);
vmcs_write64(VM_EXIT_MSR_LOAD_ADDR, __pa(vmx->msr_autoload.host));
-@@ -3959,6 +3966,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -4031,6 +4038,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
"jmp .Lkvm_vmx_return \n\t"
".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t"
".Lkvm_vmx_return: "
/* Save guest registers, load host registers, keep flags */
"xchg %0, (%%"R"sp) \n\t"
"mov %%"R"ax, %c[rax](%0) \n\t"
-@@ -4005,6 +4018,11 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -4077,6 +4090,11 @@ static void vmx_vcpu_run(struct kvm_vcpu
[r15]"i"(offsetof(struct vcpu_vmx, vcpu.arch.regs[VCPU_REGS_R15])),
#endif
[cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2))
: "cc", "memory"
, R"ax", R"bx", R"di", R"si"
#ifdef CONFIG_X86_64
-@@ -4018,7 +4036,7 @@ static void vmx_vcpu_run(struct kvm_vcpu
+@@ -4091,7 +4109,7 @@ static void vmx_vcpu_run(struct kvm_vcpu
vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD);
vmx->launched = 1;
vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
-@@ -4253,7 +4271,7 @@ static void vmx_set_supported_cpuid(u32
+@@ -4326,7 +4344,7 @@ static void vmx_set_supported_cpuid(u32
{
}
.cpu_has_kvm_support = cpu_has_kvm_support,
.disabled_by_bios = vmx_disabled_by_bios,
.hardware_setup = hardware_setup,
-diff -urNp linux-2.6.37.2/arch/x86/kvm/x86.c linux-2.6.37.2/arch/x86/kvm/x86.c
---- linux-2.6.37.2/arch/x86/kvm/x86.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/kvm/x86.c 2011-01-17 02:41:01.000000000 -0500
-@@ -92,7 +92,7 @@ static void update_cr8_intercept(struct
+diff -urNp linux-2.6.38.1/arch/x86/kvm/x86.c linux-2.6.38.1/arch/x86/kvm/x86.c
+--- linux-2.6.38.1/arch/x86/kvm/x86.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/kvm/x86.c 2011-03-21 18:31:35.000000000 -0400
+@@ -93,7 +93,7 @@ static void update_cr8_intercept(struct
static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries);
EXPORT_SYMBOL_GPL(kvm_x86_ops);
int ignore_msrs = 0;
-@@ -118,38 +118,38 @@ static struct kvm_shared_msrs_global __r
+@@ -119,38 +119,38 @@ static struct kvm_shared_msrs_global __r
static DEFINE_PER_CPU(struct kvm_shared_msrs, shared_msrs);
struct kvm_stats_debugfs_item debugfs_entries[] = {
{ NULL }
};
-@@ -1979,6 +1979,8 @@ long kvm_arch_dev_ioctl(struct file *fil
+@@ -2023,6 +2023,8 @@ long kvm_arch_dev_ioctl(struct file *fil
if (n < msr_list.nmsrs)
goto out;
r = -EFAULT;
if (copy_to_user(user_msr_list->indices, &msrs_to_save,
num_msrs_to_save * sizeof(u32)))
goto out;
-@@ -2446,7 +2448,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
+@@ -2499,7 +2501,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
struct kvm_interrupt *irq)
{
return -EINVAL;
if (irqchip_in_kernel(vcpu->kvm))
return -ENXIO;
-@@ -4623,10 +4625,10 @@ void kvm_after_handle_nmi(struct kvm_vcp
+@@ -4687,10 +4689,10 @@ void kvm_after_handle_nmi(struct kvm_vcp
}
EXPORT_SYMBOL_GPL(kvm_after_handle_nmi);
if (kvm_x86_ops) {
printk(KERN_ERR "kvm: already loaded the other module\n");
-diff -urNp linux-2.6.37.2/arch/x86/lib/atomic64_cx8_32.S linux-2.6.37.2/arch/x86/lib/atomic64_cx8_32.S
---- linux-2.6.37.2/arch/x86/lib/atomic64_cx8_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/atomic64_cx8_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/atomic64_cx8_32.S linux-2.6.38.1/arch/x86/lib/atomic64_cx8_32.S
+--- linux-2.6.38.1/arch/x86/lib/atomic64_cx8_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/atomic64_cx8_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -86,13 +86,23 @@ ENTRY(atomic64_\func\()_return_cx8)
movl %edx, %ecx
\ins\()l %esi, %ebx
LOCK_PREFIX
cmpxchg8b (%esi)
jne 1b
-diff -urNp linux-2.6.37.2/arch/x86/lib/checksum_32.S linux-2.6.37.2/arch/x86/lib/checksum_32.S
---- linux-2.6.37.2/arch/x86/lib/checksum_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/checksum_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/checksum_32.S linux-2.6.38.1/arch/x86/lib/checksum_32.S
+--- linux-2.6.38.1/arch/x86/lib/checksum_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/checksum_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -28,7 +28,8 @@
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#undef ROUND
#undef ROUND1
-diff -urNp linux-2.6.37.2/arch/x86/lib/clear_page_64.S linux-2.6.37.2/arch/x86/lib/clear_page_64.S
---- linux-2.6.37.2/arch/x86/lib/clear_page_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/clear_page_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/clear_page_64.S linux-2.6.38.1/arch/x86/lib/clear_page_64.S
+--- linux-2.6.38.1/arch/x86/lib/clear_page_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/clear_page_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ ENDPROC(clear_page)
#include <asm/cpufeature.h>
1: .byte 0xeb /* jmp <disp8> */
.byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.37.2/arch/x86/lib/copy_page_64.S linux-2.6.37.2/arch/x86/lib/copy_page_64.S
---- linux-2.6.37.2/arch/x86/lib/copy_page_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/copy_page_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/copy_page_64.S linux-2.6.38.1/arch/x86/lib/copy_page_64.S
+--- linux-2.6.38.1/arch/x86/lib/copy_page_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/copy_page_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -104,7 +104,7 @@ ENDPROC(copy_page)
#include <asm/cpufeature.h>
1: .byte 0xeb /* jmp <disp8> */
.byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
2:
-diff -urNp linux-2.6.37.2/arch/x86/lib/copy_user_64.S linux-2.6.37.2/arch/x86/lib/copy_user_64.S
---- linux-2.6.37.2/arch/x86/lib/copy_user_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/copy_user_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/copy_user_64.S linux-2.6.38.1/arch/x86/lib/copy_user_64.S
+--- linux-2.6.38.1/arch/x86/lib/copy_user_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/copy_user_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -15,13 +15,14 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
movl %edx,%ecx
xorl %eax,%eax
rep
-diff -urNp linux-2.6.37.2/arch/x86/lib/copy_user_nocache_64.S linux-2.6.37.2/arch/x86/lib/copy_user_nocache_64.S
---- linux-2.6.37.2/arch/x86/lib/copy_user_nocache_64.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/copy_user_nocache_64.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/copy_user_nocache_64.S linux-2.6.38.1/arch/x86/lib/copy_user_nocache_64.S
+--- linux-2.6.38.1/arch/x86/lib/copy_user_nocache_64.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/copy_user_nocache_64.S 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@
#include <asm/current.h>
#include <asm/asm-offsets.h>
cmpl $8,%edx
jb 20f /* less then 8 bytes, go to byte copy loop */
ALIGN_DESTINATION
-diff -urNp linux-2.6.37.2/arch/x86/lib/csum-wrappers_64.c linux-2.6.37.2/arch/x86/lib/csum-wrappers_64.c
---- linux-2.6.37.2/arch/x86/lib/csum-wrappers_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/csum-wrappers_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/csum-wrappers_64.c linux-2.6.38.1/arch/x86/lib/csum-wrappers_64.c
+--- linux-2.6.38.1/arch/x86/lib/csum-wrappers_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/csum-wrappers_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -52,6 +52,8 @@ csum_partial_copy_from_user(const void _
len -= 2;
}
return csum_partial_copy_generic(src, (void __force *)dst,
len, isum, NULL, errp);
}
-diff -urNp linux-2.6.37.2/arch/x86/lib/getuser.S linux-2.6.37.2/arch/x86/lib/getuser.S
---- linux-2.6.37.2/arch/x86/lib/getuser.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/getuser.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/getuser.S linux-2.6.38.1/arch/x86/lib/getuser.S
+--- linux-2.6.38.1/arch/x86/lib/getuser.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/getuser.S 2011-03-21 18:31:35.000000000 -0400
@@ -33,14 +33,35 @@
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
+#include <asm/pgtable.h>
+
+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __copyuser_seg %gs:
++#define __copyuser_seg gs;
+#else
+#define __copyuser_seg
+#endif
+
+#endif
+
-+1: movzb __copyuser_seg (%_ASM_AX),%edx
++1: __copyuser_seg movzb (%_ASM_AX),%edx
xor %eax,%eax
ret
CFI_ENDPROC
+
+#endif
+
-+2: movzwl __copyuser_seg -1(%_ASM_AX),%edx
++2: __copyuser_seg movzwl -1(%_ASM_AX),%edx
xor %eax,%eax
ret
CFI_ENDPROC
+
+#endif
+
-+3: mov __copyuser_seg -3(%_ASM_AX),%edx
++3: __copyuser_seg mov -3(%_ASM_AX),%edx
xor %eax,%eax
ret
CFI_ENDPROC
4: movq -7(%_ASM_AX),%_ASM_DX
xor %eax,%eax
ret
-diff -urNp linux-2.6.37.2/arch/x86/lib/insn.c linux-2.6.37.2/arch/x86/lib/insn.c
---- linux-2.6.37.2/arch/x86/lib/insn.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/insn.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/insn.c linux-2.6.38.1/arch/x86/lib/insn.c
+--- linux-2.6.38.1/arch/x86/lib/insn.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/insn.c 2011-03-21 18:31:35.000000000 -0400
@@ -21,6 +21,11 @@
#include <linux/string.h>
#include <asm/inat.h>
insn->x86_64 = x86_64 ? 1 : 0;
insn->opnd_bytes = 4;
if (x86_64)
-diff -urNp linux-2.6.37.2/arch/x86/lib/mmx_32.c linux-2.6.37.2/arch/x86/lib/mmx_32.c
---- linux-2.6.37.2/arch/x86/lib/mmx_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/mmx_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/mmx_32.c linux-2.6.38.1/arch/x86/lib/mmx_32.c
+--- linux-2.6.38.1/arch/x86/lib/mmx_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/mmx_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *
{
void *p;
from += 64;
to += 64;
-diff -urNp linux-2.6.37.2/arch/x86/lib/putuser.S linux-2.6.37.2/arch/x86/lib/putuser.S
---- linux-2.6.37.2/arch/x86/lib/putuser.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/putuser.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/putuser.S linux-2.6.38.1/arch/x86/lib/putuser.S
+--- linux-2.6.38.1/arch/x86/lib/putuser.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/putuser.S 2011-03-21 18:31:35.000000000 -0400
@@ -15,7 +15,8 @@
#include <asm/thread_info.h>
#include <asm/errno.h>
+#endif
+
+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_MEMORY_UDEREF)
-+#define __copyuser_seg %gs:
++#define __copyuser_seg gs;
+#else
+#define __copyuser_seg
+#endif
+
+#endif
+
-+1: movb %al,__copyuser_seg (_DEST)
++1: __copyuser_seg movb %al,(_DEST)
xor %eax,%eax
EXIT
ENDPROC(__put_user_1)
+
+#endif
+
-+2: movw %ax,__copyuser_seg (_DEST)
++2: __copyuser_seg movw %ax,(_DEST)
xor %eax,%eax
EXIT
ENDPROC(__put_user_2)
+
+#endif
+
-+3: movl %eax,__copyuser_seg (_DEST)
++3: __copyuser_seg movl %eax,(_DEST)
xor %eax,%eax
EXIT
ENDPROC(__put_user_4)
+
+#endif
+
-+4: mov %_ASM_AX,__copyuser_seg (_DEST)
++4: __copyuser_seg mov %_ASM_AX,(_DEST)
#ifdef CONFIG_X86_32
-5: movl %edx,4(%_ASM_CX)
-+5: movl %edx,__copyuser_seg 4(_DEST)
++5: __copyuser_seg movl %edx,4(_DEST)
#endif
xor %eax,%eax
EXIT
-diff -urNp linux-2.6.37.2/arch/x86/lib/usercopy_32.c linux-2.6.37.2/arch/x86/lib/usercopy_32.c
---- linux-2.6.37.2/arch/x86/lib/usercopy_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/usercopy_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/usercopy_32.c linux-2.6.38.1/arch/x86/lib/usercopy_32.c
+--- linux-2.6.38.1/arch/x86/lib/usercopy_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/usercopy_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ do { \
__asm__ __volatile__( \
" testl %1,%1\n" \
" jz 2f\n" \
- "0: lodsb\n" \
-+ "0: lodsb " __copyuser_seg" (%%esi)\n" \
++ "0: "__copyuser_seg"lodsb\n" \
" stosb\n" \
" testb %%al,%%al\n" \
" jz 1f\n" \
"4: movl 4(%4), %%edx\n"
- "5: movl %%eax, 0(%3)\n"
- "6: movl %%edx, 4(%3)\n"
-+ "5: movl %%eax, "__copyuser_seg" 0(%3)\n"
-+ "6: movl %%edx, "__copyuser_seg" 4(%3)\n"
++ "5: "__copyuser_seg" movl %%eax, 0(%3)\n"
++ "6: "__copyuser_seg" movl %%edx, 4(%3)\n"
"7: movl 8(%4), %%eax\n"
"8: movl 12(%4),%%edx\n"
- "9: movl %%eax, 8(%3)\n"
- "10: movl %%edx, 12(%3)\n"
-+ "9: movl %%eax, "__copyuser_seg" 8(%3)\n"
-+ "10: movl %%edx, "__copyuser_seg" 12(%3)\n"
++ "9: "__copyuser_seg" movl %%eax, 8(%3)\n"
++ "10: "__copyuser_seg" movl %%edx, 12(%3)\n"
"11: movl 16(%4), %%eax\n"
"12: movl 20(%4), %%edx\n"
- "13: movl %%eax, 16(%3)\n"
- "14: movl %%edx, 20(%3)\n"
-+ "13: movl %%eax, "__copyuser_seg" 16(%3)\n"
-+ "14: movl %%edx, "__copyuser_seg" 20(%3)\n"
++ "13: "__copyuser_seg" movl %%eax, 16(%3)\n"
++ "14: "__copyuser_seg" movl %%edx, 20(%3)\n"
"15: movl 24(%4), %%eax\n"
"16: movl 28(%4), %%edx\n"
- "17: movl %%eax, 24(%3)\n"
- "18: movl %%edx, 28(%3)\n"
-+ "17: movl %%eax, "__copyuser_seg" 24(%3)\n"
-+ "18: movl %%edx, "__copyuser_seg" 28(%3)\n"
++ "17: "__copyuser_seg" movl %%eax, 24(%3)\n"
++ "18: "__copyuser_seg" movl %%edx, 28(%3)\n"
"19: movl 32(%4), %%eax\n"
"20: movl 36(%4), %%edx\n"
- "21: movl %%eax, 32(%3)\n"
- "22: movl %%edx, 36(%3)\n"
-+ "21: movl %%eax, "__copyuser_seg" 32(%3)\n"
-+ "22: movl %%edx, "__copyuser_seg" 36(%3)\n"
++ "21: "__copyuser_seg" movl %%eax, 32(%3)\n"
++ "22: "__copyuser_seg" movl %%edx, 36(%3)\n"
"23: movl 40(%4), %%eax\n"
"24: movl 44(%4), %%edx\n"
- "25: movl %%eax, 40(%3)\n"
- "26: movl %%edx, 44(%3)\n"
-+ "25: movl %%eax, "__copyuser_seg" 40(%3)\n"
-+ "26: movl %%edx, "__copyuser_seg" 44(%3)\n"
++ "25: "__copyuser_seg" movl %%eax, 40(%3)\n"
++ "26: "__copyuser_seg" movl %%edx, 44(%3)\n"
"27: movl 48(%4), %%eax\n"
"28: movl 52(%4), %%edx\n"
- "29: movl %%eax, 48(%3)\n"
- "30: movl %%edx, 52(%3)\n"
-+ "29: movl %%eax, "__copyuser_seg" 48(%3)\n"
-+ "30: movl %%edx, "__copyuser_seg" 52(%3)\n"
++ "29: "__copyuser_seg" movl %%eax, 48(%3)\n"
++ "30: "__copyuser_seg" movl %%edx, 52(%3)\n"
"31: movl 56(%4), %%eax\n"
"32: movl 60(%4), %%edx\n"
- "33: movl %%eax, 56(%3)\n"
- "34: movl %%edx, 60(%3)\n"
-+ "33: movl %%eax, "__copyuser_seg" 56(%3)\n"
-+ "34: movl %%edx, "__copyuser_seg" 60(%3)\n"
++ "33: "__copyuser_seg" movl %%eax, 56(%3)\n"
++ "34: "__copyuser_seg" movl %%edx, 60(%3)\n"
" addl $-64, %0\n"
" addl $64, %4\n"
" addl $64, %3\n"
+ int d0, d1;
+ __asm__ __volatile__(
+ " .align 2,0x90\n"
-+ "1: movl "__copyuser_seg" 32(%4), %%eax\n"
++ "1: "__copyuser_seg" movl 32(%4), %%eax\n"
+ " cmpl $67, %0\n"
+ " jbe 3f\n"
-+ "2: movl "__copyuser_seg" 64(%4), %%eax\n"
++ "2: "__copyuser_seg" movl 64(%4), %%eax\n"
+ " .align 2,0x90\n"
-+ "3: movl "__copyuser_seg" 0(%4), %%eax\n"
-+ "4: movl "__copyuser_seg" 4(%4), %%edx\n"
++ "3: "__copyuser_seg" movl 0(%4), %%eax\n"
++ "4: "__copyuser_seg" movl 4(%4), %%edx\n"
+ "5: movl %%eax, 0(%3)\n"
+ "6: movl %%edx, 4(%3)\n"
-+ "7: movl "__copyuser_seg" 8(%4), %%eax\n"
-+ "8: movl "__copyuser_seg" 12(%4),%%edx\n"
++ "7: "__copyuser_seg" movl 8(%4), %%eax\n"
++ "8: "__copyuser_seg" movl 12(%4),%%edx\n"
+ "9: movl %%eax, 8(%3)\n"
+ "10: movl %%edx, 12(%3)\n"
-+ "11: movl "__copyuser_seg" 16(%4), %%eax\n"
-+ "12: movl "__copyuser_seg" 20(%4), %%edx\n"
++ "11: "__copyuser_seg" movl 16(%4), %%eax\n"
++ "12: "__copyuser_seg" movl 20(%4), %%edx\n"
+ "13: movl %%eax, 16(%3)\n"
+ "14: movl %%edx, 20(%3)\n"
-+ "15: movl "__copyuser_seg" 24(%4), %%eax\n"
-+ "16: movl "__copyuser_seg" 28(%4), %%edx\n"
++ "15: "__copyuser_seg" movl 24(%4), %%eax\n"
++ "16: "__copyuser_seg" movl 28(%4), %%edx\n"
+ "17: movl %%eax, 24(%3)\n"
+ "18: movl %%edx, 28(%3)\n"
-+ "19: movl "__copyuser_seg" 32(%4), %%eax\n"
-+ "20: movl "__copyuser_seg" 36(%4), %%edx\n"
++ "19: "__copyuser_seg" movl 32(%4), %%eax\n"
++ "20: "__copyuser_seg" movl 36(%4), %%edx\n"
+ "21: movl %%eax, 32(%3)\n"
+ "22: movl %%edx, 36(%3)\n"
-+ "23: movl "__copyuser_seg" 40(%4), %%eax\n"
-+ "24: movl "__copyuser_seg" 44(%4), %%edx\n"
++ "23: "__copyuser_seg" movl 40(%4), %%eax\n"
++ "24: "__copyuser_seg" movl 44(%4), %%edx\n"
+ "25: movl %%eax, 40(%3)\n"
+ "26: movl %%edx, 44(%3)\n"
-+ "27: movl "__copyuser_seg" 48(%4), %%eax\n"
-+ "28: movl "__copyuser_seg" 52(%4), %%edx\n"
++ "27: "__copyuser_seg" movl 48(%4), %%eax\n"
++ "28: "__copyuser_seg" movl 52(%4), %%edx\n"
+ "29: movl %%eax, 48(%3)\n"
+ "30: movl %%edx, 52(%3)\n"
-+ "31: movl "__copyuser_seg" 56(%4), %%eax\n"
-+ "32: movl "__copyuser_seg" 60(%4), %%edx\n"
++ "31: "__copyuser_seg" movl 56(%4), %%eax\n"
++ "32: "__copyuser_seg" movl 60(%4), %%edx\n"
+ "33: movl %%eax, 56(%3)\n"
+ "34: movl %%edx, 60(%3)\n"
+ " addl $-64, %0\n"
+ " shrl $2, %0\n"
+ " andl $3, %%eax\n"
+ " cld\n"
-+ "99: rep; movsl "__copyuser_seg" (%%esi), (%%edi)\n"
++ "99: rep; "__copyuser_seg" movsl\n"
+ "36: movl %%eax, %0\n"
-+ "37: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n"
++ "37: rep; "__copyuser_seg" movsb\n"
+ "100:\n"
".section .fixup,\"ax\"\n"
"101: lea 0(%%eax,%0,4),%0\n"
__asm__ __volatile__(
" .align 2,0x90\n"
- "0: movl 32(%4), %%eax\n"
-+ "0: movl "__copyuser_seg" 32(%4), %%eax\n"
++ "0: "__copyuser_seg" movl 32(%4), %%eax\n"
" cmpl $67, %0\n"
" jbe 2f\n"
- "1: movl 64(%4), %%eax\n"
-+ "1: movl "__copyuser_seg" 64(%4), %%eax\n"
++ "1: "__copyuser_seg" movl 64(%4), %%eax\n"
" .align 2,0x90\n"
- "2: movl 0(%4), %%eax\n"
- "21: movl 4(%4), %%edx\n"
-+ "2: movl "__copyuser_seg" 0(%4), %%eax\n"
-+ "21: movl "__copyuser_seg" 4(%4), %%edx\n"
++ "2: "__copyuser_seg" movl 0(%4), %%eax\n"
++ "21: "__copyuser_seg" movl 4(%4), %%edx\n"
" movl %%eax, 0(%3)\n"
" movl %%edx, 4(%3)\n"
- "3: movl 8(%4), %%eax\n"
- "31: movl 12(%4),%%edx\n"
-+ "3: movl "__copyuser_seg" 8(%4), %%eax\n"
-+ "31: movl "__copyuser_seg" 12(%4),%%edx\n"
++ "3: "__copyuser_seg" movl 8(%4), %%eax\n"
++ "31: "__copyuser_seg" movl 12(%4),%%edx\n"
" movl %%eax, 8(%3)\n"
" movl %%edx, 12(%3)\n"
- "4: movl 16(%4), %%eax\n"
- "41: movl 20(%4), %%edx\n"
-+ "4: movl "__copyuser_seg" 16(%4), %%eax\n"
-+ "41: movl "__copyuser_seg" 20(%4), %%edx\n"
++ "4: "__copyuser_seg" movl 16(%4), %%eax\n"
++ "41: "__copyuser_seg" movl 20(%4), %%edx\n"
" movl %%eax, 16(%3)\n"
" movl %%edx, 20(%3)\n"
- "10: movl 24(%4), %%eax\n"
- "51: movl 28(%4), %%edx\n"
-+ "10: movl "__copyuser_seg" 24(%4), %%eax\n"
-+ "51: movl "__copyuser_seg" 28(%4), %%edx\n"
++ "10: "__copyuser_seg" movl 24(%4), %%eax\n"
++ "51: "__copyuser_seg" movl 28(%4), %%edx\n"
" movl %%eax, 24(%3)\n"
" movl %%edx, 28(%3)\n"
- "11: movl 32(%4), %%eax\n"
- "61: movl 36(%4), %%edx\n"
-+ "11: movl "__copyuser_seg" 32(%4), %%eax\n"
-+ "61: movl "__copyuser_seg" 36(%4), %%edx\n"
++ "11: "__copyuser_seg" movl 32(%4), %%eax\n"
++ "61: "__copyuser_seg" movl 36(%4), %%edx\n"
" movl %%eax, 32(%3)\n"
" movl %%edx, 36(%3)\n"
- "12: movl 40(%4), %%eax\n"
- "71: movl 44(%4), %%edx\n"
-+ "12: movl "__copyuser_seg" 40(%4), %%eax\n"
-+ "71: movl "__copyuser_seg" 44(%4), %%edx\n"
++ "12: "__copyuser_seg" movl 40(%4), %%eax\n"
++ "71: "__copyuser_seg" movl 44(%4), %%edx\n"
" movl %%eax, 40(%3)\n"
" movl %%edx, 44(%3)\n"
- "13: movl 48(%4), %%eax\n"
- "81: movl 52(%4), %%edx\n"
-+ "13: movl "__copyuser_seg" 48(%4), %%eax\n"
-+ "81: movl "__copyuser_seg" 52(%4), %%edx\n"
++ "13: "__copyuser_seg" movl 48(%4), %%eax\n"
++ "81: "__copyuser_seg" movl 52(%4), %%edx\n"
" movl %%eax, 48(%3)\n"
" movl %%edx, 52(%3)\n"
- "14: movl 56(%4), %%eax\n"
- "91: movl 60(%4), %%edx\n"
-+ "14: movl "__copyuser_seg" 56(%4), %%eax\n"
-+ "91: movl "__copyuser_seg" 60(%4), %%edx\n"
++ "14: "__copyuser_seg" movl 56(%4), %%eax\n"
++ "91: "__copyuser_seg" movl 60(%4), %%edx\n"
" movl %%eax, 56(%3)\n"
" movl %%edx, 60(%3)\n"
" addl $-64, %0\n"
" andl $3, %%eax\n"
" cld\n"
- "6: rep; movsl\n"
-+ "6: rep; movsl "__copyuser_seg" (%%esi), (%%edi)\n"
++ "6: rep; "__copyuser_seg" movsl\n"
" movl %%eax,%0\n"
- "7: rep; movsb\n"
-+ "7: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n"
++ "7: rep; "__copyuser_seg" movsb\n"
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
__asm__ __volatile__(
" .align 2,0x90\n"
- "0: movl 32(%4), %%eax\n"
-+ "0: movl "__copyuser_seg" 32(%4), %%eax\n"
++ "0: "__copyuser_seg" movl 32(%4), %%eax\n"
" cmpl $67, %0\n"
" jbe 2f\n"
- "1: movl 64(%4), %%eax\n"
-+ "1: movl "__copyuser_seg" 64(%4), %%eax\n"
++ "1: "__copyuser_seg" movl 64(%4), %%eax\n"
" .align 2,0x90\n"
- "2: movl 0(%4), %%eax\n"
- "21: movl 4(%4), %%edx\n"
-+ "2: movl "__copyuser_seg" 0(%4), %%eax\n"
-+ "21: movl "__copyuser_seg" 4(%4), %%edx\n"
++ "2: "__copyuser_seg" movl 0(%4), %%eax\n"
++ "21: "__copyuser_seg" movl 4(%4), %%edx\n"
" movnti %%eax, 0(%3)\n"
" movnti %%edx, 4(%3)\n"
- "3: movl 8(%4), %%eax\n"
- "31: movl 12(%4),%%edx\n"
-+ "3: movl "__copyuser_seg" 8(%4), %%eax\n"
-+ "31: movl "__copyuser_seg" 12(%4),%%edx\n"
++ "3: "__copyuser_seg" movl 8(%4), %%eax\n"
++ "31: "__copyuser_seg" movl 12(%4),%%edx\n"
" movnti %%eax, 8(%3)\n"
" movnti %%edx, 12(%3)\n"
- "4: movl 16(%4), %%eax\n"
- "41: movl 20(%4), %%edx\n"
-+ "4: movl "__copyuser_seg" 16(%4), %%eax\n"
-+ "41: movl "__copyuser_seg" 20(%4), %%edx\n"
++ "4: "__copyuser_seg" movl 16(%4), %%eax\n"
++ "41: "__copyuser_seg" movl 20(%4), %%edx\n"
" movnti %%eax, 16(%3)\n"
" movnti %%edx, 20(%3)\n"
- "10: movl 24(%4), %%eax\n"
- "51: movl 28(%4), %%edx\n"
-+ "10: movl "__copyuser_seg" 24(%4), %%eax\n"
-+ "51: movl "__copyuser_seg" 28(%4), %%edx\n"
++ "10: "__copyuser_seg" movl 24(%4), %%eax\n"
++ "51: "__copyuser_seg" movl 28(%4), %%edx\n"
" movnti %%eax, 24(%3)\n"
" movnti %%edx, 28(%3)\n"
- "11: movl 32(%4), %%eax\n"
- "61: movl 36(%4), %%edx\n"
-+ "11: movl "__copyuser_seg" 32(%4), %%eax\n"
-+ "61: movl "__copyuser_seg" 36(%4), %%edx\n"
++ "11: "__copyuser_seg" movl 32(%4), %%eax\n"
++ "61: "__copyuser_seg" movl 36(%4), %%edx\n"
" movnti %%eax, 32(%3)\n"
" movnti %%edx, 36(%3)\n"
- "12: movl 40(%4), %%eax\n"
- "71: movl 44(%4), %%edx\n"
-+ "12: movl "__copyuser_seg" 40(%4), %%eax\n"
-+ "71: movl "__copyuser_seg" 44(%4), %%edx\n"
++ "12: "__copyuser_seg" movl 40(%4), %%eax\n"
++ "71: "__copyuser_seg" movl 44(%4), %%edx\n"
" movnti %%eax, 40(%3)\n"
" movnti %%edx, 44(%3)\n"
- "13: movl 48(%4), %%eax\n"
- "81: movl 52(%4), %%edx\n"
-+ "13: movl "__copyuser_seg" 48(%4), %%eax\n"
-+ "81: movl "__copyuser_seg" 52(%4), %%edx\n"
++ "13: "__copyuser_seg" movl 48(%4), %%eax\n"
++ "81: "__copyuser_seg" movl 52(%4), %%edx\n"
" movnti %%eax, 48(%3)\n"
" movnti %%edx, 52(%3)\n"
- "14: movl 56(%4), %%eax\n"
- "91: movl 60(%4), %%edx\n"
-+ "14: movl "__copyuser_seg" 56(%4), %%eax\n"
-+ "91: movl "__copyuser_seg" 60(%4), %%edx\n"
++ "14: "__copyuser_seg" movl 56(%4), %%eax\n"
++ "91: "__copyuser_seg" movl 60(%4), %%edx\n"
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
" andl $3, %%eax\n"
" cld\n"
- "6: rep; movsl\n"
-+ "6: rep; movsl "__copyuser_seg" (%%esi), (%%edi)\n"
++ "6: rep; "__copyuser_seg" movsl\n"
" movl %%eax,%0\n"
- "7: rep; movsb\n"
-+ "7: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n"
++ "7: rep; "__copyuser_seg" movsb\n"
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
__asm__ __volatile__(
" .align 2,0x90\n"
- "0: movl 32(%4), %%eax\n"
-+ "0: movl "__copyuser_seg" 32(%4), %%eax\n"
++ "0: "__copyuser_seg" movl 32(%4), %%eax\n"
" cmpl $67, %0\n"
" jbe 2f\n"
- "1: movl 64(%4), %%eax\n"
-+ "1: movl "__copyuser_seg" 64(%4), %%eax\n"
++ "1: "__copyuser_seg" movl 64(%4), %%eax\n"
" .align 2,0x90\n"
- "2: movl 0(%4), %%eax\n"
- "21: movl 4(%4), %%edx\n"
-+ "2: movl "__copyuser_seg" 0(%4), %%eax\n"
-+ "21: movl "__copyuser_seg" 4(%4), %%edx\n"
++ "2: "__copyuser_seg" movl 0(%4), %%eax\n"
++ "21: "__copyuser_seg" movl 4(%4), %%edx\n"
" movnti %%eax, 0(%3)\n"
" movnti %%edx, 4(%3)\n"
- "3: movl 8(%4), %%eax\n"
- "31: movl 12(%4),%%edx\n"
-+ "3: movl "__copyuser_seg" 8(%4), %%eax\n"
-+ "31: movl "__copyuser_seg" 12(%4),%%edx\n"
++ "3: "__copyuser_seg" movl 8(%4), %%eax\n"
++ "31: "__copyuser_seg" movl 12(%4),%%edx\n"
" movnti %%eax, 8(%3)\n"
" movnti %%edx, 12(%3)\n"
- "4: movl 16(%4), %%eax\n"
- "41: movl 20(%4), %%edx\n"
-+ "4: movl "__copyuser_seg" 16(%4), %%eax\n"
-+ "41: movl "__copyuser_seg" 20(%4), %%edx\n"
++ "4: "__copyuser_seg" movl 16(%4), %%eax\n"
++ "41: "__copyuser_seg" movl 20(%4), %%edx\n"
" movnti %%eax, 16(%3)\n"
" movnti %%edx, 20(%3)\n"
- "10: movl 24(%4), %%eax\n"
- "51: movl 28(%4), %%edx\n"
-+ "10: movl "__copyuser_seg" 24(%4), %%eax\n"
-+ "51: movl "__copyuser_seg" 28(%4), %%edx\n"
++ "10: "__copyuser_seg" movl 24(%4), %%eax\n"
++ "51: "__copyuser_seg" movl 28(%4), %%edx\n"
" movnti %%eax, 24(%3)\n"
" movnti %%edx, 28(%3)\n"
- "11: movl 32(%4), %%eax\n"
- "61: movl 36(%4), %%edx\n"
-+ "11: movl "__copyuser_seg" 32(%4), %%eax\n"
-+ "61: movl "__copyuser_seg" 36(%4), %%edx\n"
++ "11: "__copyuser_seg" movl 32(%4), %%eax\n"
++ "61: "__copyuser_seg" movl 36(%4), %%edx\n"
" movnti %%eax, 32(%3)\n"
" movnti %%edx, 36(%3)\n"
- "12: movl 40(%4), %%eax\n"
- "71: movl 44(%4), %%edx\n"
-+ "12: movl "__copyuser_seg" 40(%4), %%eax\n"
-+ "71: movl "__copyuser_seg" 44(%4), %%edx\n"
++ "12: "__copyuser_seg" movl 40(%4), %%eax\n"
++ "71: "__copyuser_seg" movl 44(%4), %%edx\n"
" movnti %%eax, 40(%3)\n"
" movnti %%edx, 44(%3)\n"
- "13: movl 48(%4), %%eax\n"
- "81: movl 52(%4), %%edx\n"
-+ "13: movl "__copyuser_seg" 48(%4), %%eax\n"
-+ "81: movl "__copyuser_seg" 52(%4), %%edx\n"
++ "13: "__copyuser_seg" movl 48(%4), %%eax\n"
++ "81: "__copyuser_seg" movl 52(%4), %%edx\n"
" movnti %%eax, 48(%3)\n"
" movnti %%edx, 52(%3)\n"
- "14: movl 56(%4), %%eax\n"
- "91: movl 60(%4), %%edx\n"
-+ "14: movl "__copyuser_seg" 56(%4), %%eax\n"
-+ "91: movl "__copyuser_seg" 60(%4), %%edx\n"
++ "14: "__copyuser_seg" movl 56(%4), %%eax\n"
++ "91: "__copyuser_seg" movl 60(%4), %%edx\n"
" movnti %%eax, 56(%3)\n"
" movnti %%edx, 60(%3)\n"
" addl $-64, %0\n"
" andl $3, %%eax\n"
" cld\n"
- "6: rep; movsl\n"
-+ "6: rep; movsl "__copyuser_seg" (%%esi), (%%edi)\n"
++ "6: rep; "__copyuser_seg" movsl\n"
" movl %%eax,%0\n"
- "7: rep; movsb\n"
-+ "7: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n"
++ "7: rep; "__copyuser_seg" movsb\n"
"8:\n"
".section .fixup,\"ax\"\n"
"9: lea 0(%%eax,%0,4),%0\n"
" andl $7,%0\n" \
" subl %0,%3\n" \
- "4: rep; movsb\n" \
-+ "4: rep; movsb "prefix" (%%esi), (%%edi)\n" \
++ "4: rep; "prefix"movsb\n" \
" movl %3,%0\n" \
" shrl $2,%0\n" \
" andl $3,%3\n" \
" .align 2,0x90\n" \
- "0: rep; movsl\n" \
-+ "0: rep; movsl "prefix" (%%esi), (%%edi)\n" \
++ "0: rep; "prefix"movsl\n" \
" movl %3,%0\n" \
- "1: rep; movsb\n" \
-+ "1: rep; movsb "prefix" (%%esi), (%%edi)\n" \
++ "1: rep; "prefix"movsb\n" \
"2:\n" \
+ restore \
".section .fixup,\"ax\"\n" \
" andl $7,%0\n" \
" subl %0,%3\n" \
- "4: rep; movsb\n" \
-+ "4: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n" \
++ "4: rep; "__copyuser_seg"movsb\n" \
" movl %3,%0\n" \
" shrl $2,%0\n" \
" andl $3,%3\n" \
" .align 2,0x90\n" \
- "0: rep; movsl\n" \
-+ "0: rep; movsl "__copyuser_seg" (%%esi), (%%edi)\n" \
++ "0: rep; "__copyuser_seg"movsl\n" \
" movl %3,%0\n" \
- "1: rep; movsb\n" \
-+ "1: rep; movsb "__copyuser_seg" (%%esi), (%%edi)\n" \
++ "1: rep; "__copyuser_seg"movsb\n" \
"2:\n" \
".section .fixup,\"ax\"\n" \
"5: addl %3,%0\n" \
+}
+EXPORT_SYMBOL(set_fs);
+#endif
-diff -urNp linux-2.6.37.2/arch/x86/lib/usercopy_64.c linux-2.6.37.2/arch/x86/lib/usercopy_64.c
---- linux-2.6.37.2/arch/x86/lib/usercopy_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/lib/usercopy_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/lib/usercopy_64.c linux-2.6.38.1/arch/x86/lib/usercopy_64.c
+--- linux-2.6.38.1/arch/x86/lib/usercopy_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/lib/usercopy_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -42,6 +42,8 @@ long
__strncpy_from_user(char *dst, const char __user *src, long count)
{
}
EXPORT_SYMBOL(copy_in_user);
-diff -urNp linux-2.6.37.2/arch/x86/Makefile linux-2.6.37.2/arch/x86/Makefile
---- linux-2.6.37.2/arch/x86/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/Makefile 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/Makefile linux-2.6.38.1/arch/x86/Makefile
+--- linux-2.6.38.1/arch/x86/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -195,3 +195,12 @@ define archhelp
echo ' FDARGS="..." arguments for the booted kernel'
echo ' FDINITRD=file initrd for the booted kernel'
+
+archprepare:
+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
-diff -urNp linux-2.6.37.2/arch/x86/mm/extable.c linux-2.6.37.2/arch/x86/mm/extable.c
---- linux-2.6.37.2/arch/x86/mm/extable.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/extable.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/extable.c linux-2.6.38.1/arch/x86/mm/extable.c
+--- linux-2.6.38.1/arch/x86/mm/extable.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/extable.c 2011-03-21 18:31:35.000000000 -0400
@@ -1,14 +1,71 @@
#include <linux/module.h>
#include <linux/spinlock.h>
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.37.2/arch/x86/mm/fault.c linux-2.6.37.2/arch/x86/mm/fault.c
---- linux-2.6.37.2/arch/x86/mm/fault.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/fault.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/fault.c linux-2.6.38.1/arch/x86/mm/fault.c
+--- linux-2.6.38.1/arch/x86/mm/fault.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/fault.c 2011-03-21 23:48:53.000000000 -0400
@@ -12,10 +12,18 @@
#include <linux/mmiotrace.h> /* kmmio_handler, ... */
#include <linux/perf_event.h> /* perf_sw_event */
DEFINE_SPINLOCK(pgd_lock);
LIST_HEAD(pgd_list);
-@@ -231,18 +269,35 @@ void vmalloc_sync_all(void)
+@@ -229,10 +267,22 @@ void vmalloc_sync_all(void)
+ for (address = VMALLOC_START & PMD_MASK;
+ address >= TASK_SIZE && address < FIXADDR_TOP;
address += PMD_SIZE) {
-
- unsigned long flags;
+
+#ifdef CONFIG_PAX_PER_CPU_PGD
+ unsigned long cpu;
struct page *page;
+#endif
- spin_lock_irqsave(&pgd_lock, flags);
+ spin_lock(&pgd_lock);
+
+#ifdef CONFIG_PAX_PER_CPU_PGD
+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
spinlock_t *pgt_lock;
pmd_t *ret;
+@@ -240,8 +290,13 @@ void vmalloc_sync_all(void)
pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
spin_lock(pgt_lock);
if (!ret)
break;
-@@ -276,6 +331,11 @@ static noinline __kprobes int vmalloc_fa
+@@ -275,6 +330,11 @@ static noinline __kprobes int vmalloc_fa
* an interrupt in the middle of a task switch..
*/
pgd_paddr = read_cr3();
pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
if (!pmd_k)
return -1;
-@@ -371,7 +431,14 @@ static noinline __kprobes int vmalloc_fa
+@@ -370,7 +430,14 @@ static noinline __kprobes int vmalloc_fa
* happen within a race in page table update. In the later
* case just flush:
*/
pgd_ref = pgd_offset_k(address);
if (pgd_none(*pgd_ref))
return -1;
-@@ -533,7 +600,7 @@ static int is_errata93(struct pt_regs *r
+@@ -532,7 +599,7 @@ static int is_errata93(struct pt_regs *r
static int is_errata100(struct pt_regs *regs, unsigned long address)
{
#ifdef CONFIG_X86_64
return 1;
#endif
return 0;
-@@ -560,7 +627,7 @@ static int is_f00f_bug(struct pt_regs *r
+@@ -559,7 +626,7 @@ static int is_f00f_bug(struct pt_regs *r
}
static const char nx_warning[] = KERN_CRIT
static void
show_fault_oops(struct pt_regs *regs, unsigned long error_code,
-@@ -569,15 +636,26 @@ show_fault_oops(struct pt_regs *regs, un
+@@ -568,15 +635,26 @@ show_fault_oops(struct pt_regs *regs, un
if (!oops_may_print())
return;
printk(KERN_ALERT "BUG: unable to handle kernel ");
if (address < PAGE_SIZE)
printk(KERN_CONT "NULL pointer dereference");
-@@ -702,6 +780,68 @@ __bad_area_nosemaphore(struct pt_regs *r
+@@ -701,6 +779,68 @@ __bad_area_nosemaphore(struct pt_regs *r
unsigned long address, int si_code)
{
struct task_struct *tsk = current;
/* User mode accesses just cause a SIGSEGV */
if (error_code & PF_USER) {
-@@ -849,6 +989,99 @@ static int spurious_fault_check(unsigned
+@@ -855,6 +995,99 @@ static int spurious_fault_check(unsigned
return 1;
}
+ */
+ "invlpg (%0)\n"
+#endif
-+ "testb $0,"__copyuser_seg"(%0)\n"
++ __copyuser_seg"testb $0,(%0)\n"
+ "xorb %3,(%1)\n"
+ :
+ : "r" (address), "r" (pte), "q" (pte_mask), "i" (_PAGE_USER)
/*
* Handle a spurious fault caused by a stale TLB entry.
*
-@@ -921,6 +1154,9 @@ int show_unhandled_signals = 1;
+@@ -927,6 +1160,9 @@ int show_unhandled_signals = 1;
static inline int
access_error(unsigned long error_code, struct vm_area_struct *vma)
{
if (error_code & PF_WRITE) {
/* write, present and write, not present: */
if (unlikely(!(vma->vm_flags & VM_WRITE)))
-@@ -954,19 +1190,33 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -960,19 +1196,33 @@ do_page_fault(struct pt_regs *regs, unsi
{
struct vm_area_struct *vma;
struct task_struct *tsk;
+ if (address < PAX_USER_SHADOW_BASE) {
+ printk(KERN_ERR "PAX: please report this to pageexec@freemail.hu\n");
+ printk(KERN_ERR "PAX: faulting IP: %pA\n", (void *)regs->ip);
-+ show_trace_log_lvl(NULL, NULL, (void *)regs->sp, regs->bp, KERN_ERR);
++ show_trace_log_lvl(NULL, NULL, (void *)regs->sp, KERN_ERR);
+ } else
+ address -= PAX_USER_SHADOW_BASE;
+ }
/*
* Detect and handle instructions that would cause a page fault for
* both a tracked kernel page and a userspace page.
-@@ -1026,7 +1276,7 @@ do_page_fault(struct pt_regs *regs, unsi
+@@ -1032,7 +1282,7 @@ do_page_fault(struct pt_regs *regs, unsi
* User-mode registers count as a user access even for any
* potential system fault or CPU buglet:
*/
local_irq_enable();
error_code |= PF_USER;
} else {
-@@ -1081,6 +1331,11 @@ retry:
+@@ -1087,6 +1337,11 @@ retry:
might_sleep();
}
vma = find_vma(mm, address);
if (unlikely(!vma)) {
bad_area(regs, error_code, address);
-@@ -1092,18 +1347,24 @@ retry:
+@@ -1098,18 +1353,24 @@ retry:
bad_area(regs, error_code, address);
return;
}
if (unlikely(expand_stack(vma, address))) {
bad_area(regs, error_code, address);
return;
-@@ -1158,3 +1419,199 @@ good_area:
+@@ -1164,3 +1425,199 @@ good_area:
up_read(&mm->mmap_sem);
}
+
+ return ret ? -EFAULT : 0;
+}
-diff -urNp linux-2.6.37.2/arch/x86/mm/gup.c linux-2.6.37.2/arch/x86/mm/gup.c
---- linux-2.6.37.2/arch/x86/mm/gup.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/gup.c 2011-01-17 02:41:01.000000000 -0500
-@@ -237,7 +237,7 @@ int __get_user_pages_fast(unsigned long
+diff -urNp linux-2.6.38.1/arch/x86/mm/gup.c linux-2.6.38.1/arch/x86/mm/gup.c
+--- linux-2.6.38.1/arch/x86/mm/gup.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/gup.c 2011-03-21 18:31:35.000000000 -0400
+@@ -263,7 +263,7 @@ int __get_user_pages_fast(unsigned long
addr = start;
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
(void __user *)start, len)))
return 0;
-diff -urNp linux-2.6.37.2/arch/x86/mm/highmem_32.c linux-2.6.37.2/arch/x86/mm/highmem_32.c
---- linux-2.6.37.2/arch/x86/mm/highmem_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/highmem_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/highmem_32.c linux-2.6.38.1/arch/x86/mm/highmem_32.c
+--- linux-2.6.38.1/arch/x86/mm/highmem_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/highmem_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -44,7 +44,10 @@ void *kmap_atomic_prot(struct page *page
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
return (void *)vaddr;
}
-diff -urNp linux-2.6.37.2/arch/x86/mm/hugetlbpage.c linux-2.6.37.2/arch/x86/mm/hugetlbpage.c
---- linux-2.6.37.2/arch/x86/mm/hugetlbpage.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/hugetlbpage.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/hugetlbpage.c linux-2.6.38.1/arch/x86/mm/hugetlbpage.c
+--- linux-2.6.38.1/arch/x86/mm/hugetlbpage.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/hugetlbpage.c 2011-03-21 23:47:41.000000000 -0400
@@ -266,13 +266,20 @@ static unsigned long hugetlb_get_unmappe
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
/* don't allow allocations above current base */
if (mm->free_area_cache > base)
-@@ -321,7 +328,7 @@ static unsigned long hugetlb_get_unmappe
+@@ -321,64 +328,63 @@ static unsigned long hugetlb_get_unmappe
largest_hole = 0;
mm->free_area_cache = base;
}
/* make sure it can fit in the remaining address space */
if (mm->free_area_cache < len)
goto fail;
-@@ -329,33 +336,27 @@ try_again:
+
/* either no address requested or cant fit in requested address hole */
- addr = (mm->free_area_cache - len) & huge_page_mask(h);
+- addr = (mm->free_area_cache - len) & huge_page_mask(h);
++ addr = (mm->free_area_cache - len);
do {
++ addr &= huge_page_mask(h);
+ vma = find_vma(mm, addr);
/*
* Lookup failure means no vma is above this address,
+ largest_hole = vma->vm_start - addr;
/* try just below the current vma->vm_start */
- addr = (vma->vm_start - len) & huge_page_mask(h);
-@@ -363,22 +364,26 @@ try_again:
+- addr = (vma->vm_start - len) & huge_page_mask(h);
+- } while (len <= vma->vm_start);
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
fail:
/*
mm->cached_hole_size = ~0UL;
addr = hugetlb_get_unmapped_area_bottomup(file, addr0,
len, pgoff, flags);
-@@ -386,6 +391,7 @@ fail:
+@@ -386,6 +392,7 @@ fail:
/*
* Restore the topdown base:
*/
mm->free_area_cache = base;
mm->cached_hole_size = ~0UL;
-@@ -399,10 +405,19 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -399,10 +406,19 @@ hugetlb_get_unmapped_area(struct file *f
struct hstate *h = hstate_file(file);
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
return -ENOMEM;
if (flags & MAP_FIXED) {
-@@ -414,8 +429,7 @@ hugetlb_get_unmapped_area(struct file *f
+@@ -414,8 +430,7 @@ hugetlb_get_unmapped_area(struct file *f
if (addr) {
addr = ALIGN(addr, huge_page_size(h));
vma = find_vma(mm, addr);
return addr;
}
if (mm->get_unmapped_area == arch_get_unmapped_area)
-diff -urNp linux-2.6.37.2/arch/x86/mm/init_32.c linux-2.6.37.2/arch/x86/mm/init_32.c
---- linux-2.6.37.2/arch/x86/mm/init_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/init_32.c 2011-01-17 02:41:01.000000000 -0500
-@@ -73,36 +73,6 @@ static __init void *alloc_low_page(void)
+diff -urNp linux-2.6.38.1/arch/x86/mm/init_32.c linux-2.6.38.1/arch/x86/mm/init_32.c
+--- linux-2.6.38.1/arch/x86/mm/init_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/init_32.c 2011-03-21 18:31:35.000000000 -0400
+@@ -74,36 +74,6 @@ static __init void *alloc_low_page(void)
}
/*
* Create a page table and place a pointer to it in a middle page
* directory entry:
*/
-@@ -122,13 +92,28 @@ static pte_t * __init one_page_table_ini
+@@ -123,13 +93,28 @@ static pte_t * __init one_page_table_ini
page_table = (pte_t *)alloc_low_page();
paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
pmd_t * __init populate_extra_pmd(unsigned long vaddr)
{
int pgd_idx = pgd_index(vaddr);
-@@ -202,6 +187,7 @@ page_table_range_init(unsigned long star
+@@ -203,6 +188,7 @@ page_table_range_init(unsigned long star
int pgd_idx, pmd_idx;
unsigned long vaddr;
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte = NULL;
-@@ -211,8 +197,13 @@ page_table_range_init(unsigned long star
+@@ -212,8 +198,13 @@ page_table_range_init(unsigned long star
pgd = pgd_base + pgd_idx;
for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd++, pgd_idx++) {
for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
pmd++, pmd_idx++) {
pte = page_table_kmap_check(one_page_table_init(pmd),
-@@ -224,11 +215,20 @@ page_table_range_init(unsigned long star
+@@ -225,11 +216,20 @@ page_table_range_init(unsigned long star
}
}
-static inline int is_kernel_text(unsigned long addr)
+static inline int is_kernel_text(unsigned long start, unsigned long end)
{
-- if (addr >= PAGE_OFFSET && addr <= (unsigned long)__init_end)
+- if (addr >= (unsigned long)_text && addr <= (unsigned long)__init_end)
- return 1;
- return 0;
+ if ((start > ktla_ktva((unsigned long)_etext) ||
}
/*
-@@ -245,9 +245,10 @@ kernel_physical_mapping_init(unsigned lo
+@@ -246,9 +246,10 @@ kernel_physical_mapping_init(unsigned lo
unsigned long last_map_addr = end;
unsigned long start_pfn, end_pfn;
pgd_t *pgd_base = swapper_pg_dir;
pmd_t *pmd;
pte_t *pte;
unsigned pages_2m, pages_4k;
-@@ -280,8 +281,13 @@ repeat:
+@@ -281,8 +282,13 @@ repeat:
pfn = start_pfn;
pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
pgd = pgd_base + pgd_idx;
if (pfn >= end_pfn)
continue;
-@@ -293,14 +299,13 @@ repeat:
+@@ -294,14 +300,13 @@ repeat:
#endif
for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn;
pmd++, pmd_idx++) {
pgprot_t prot = PAGE_KERNEL_LARGE;
/*
* first pass will use the same initial
-@@ -310,11 +315,7 @@ repeat:
+@@ -311,11 +316,7 @@ repeat:
__pgprot(PTE_IDENT_ATTR |
_PAGE_PSE);
prot = PAGE_KERNEL_LARGE_EXEC;
pages_2m++;
-@@ -331,7 +332,7 @@ repeat:
+@@ -332,7 +333,7 @@ repeat:
pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
pte += pte_ofs;
for (; pte_ofs < PTRS_PER_PTE && pfn < end_pfn;
pgprot_t prot = PAGE_KERNEL;
/*
* first pass will use the same initial
-@@ -339,7 +340,7 @@ repeat:
+@@ -340,7 +341,7 @@ repeat:
*/
pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR);
prot = PAGE_KERNEL_EXEC;
pages_4k++;
-@@ -471,7 +472,7 @@ void __init native_pagetable_setup_start
+@@ -472,7 +473,7 @@ void __init native_pagetable_setup_start
pud = pud_offset(pgd, va);
pmd = pmd_offset(pud, va);
break;
pte = pte_offset_kernel(pmd, va);
-@@ -523,12 +524,10 @@ void __init early_ioremap_page_table_ran
+@@ -524,12 +525,10 @@ void __init early_ioremap_page_table_ran
static void __init pagetable_init(void)
{
EXPORT_SYMBOL_GPL(__supported_pte_mask);
/* user-defined highmem size */
-@@ -753,6 +752,12 @@ void __init mem_init(void)
+@@ -755,6 +754,12 @@ void __init mem_init(void)
pci_iommu_alloc();
#ifdef CONFIG_FLATMEM
BUG_ON(!mem_map);
#endif
-@@ -770,7 +775,7 @@ void __init mem_init(void)
+@@ -772,7 +777,7 @@ void __init mem_init(void)
set_highmem_pages_init();
codesize = (unsigned long) &_etext - (unsigned long) &_text;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
-@@ -811,10 +816,10 @@ void __init mem_init(void)
+@@ -813,10 +818,10 @@ void __init mem_init(void)
((unsigned long)&__init_end -
(unsigned long)&__init_begin) >> 10,
((unsigned long)&_etext - (unsigned long)&_text) >> 10);
/*
-@@ -892,6 +897,7 @@ void set_kernel_text_rw(void)
+@@ -894,6 +899,7 @@ void set_kernel_text_rw(void)
if (!kernel_set_to_readonly)
return;
pr_debug("Set kernel text: %lx - %lx for read write\n",
start, start+size);
-@@ -906,6 +912,7 @@ void set_kernel_text_ro(void)
+@@ -908,6 +914,7 @@ void set_kernel_text_ro(void)
if (!kernel_set_to_readonly)
return;
pr_debug("Set kernel text: %lx - %lx for read only\n",
start, start+size);
-@@ -917,6 +924,7 @@ void mark_rodata_ro(void)
+@@ -936,6 +943,7 @@ void mark_rodata_ro(void)
unsigned long start = PFN_ALIGN(_text);
unsigned long size = PFN_ALIGN(_etext) - start;
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.37.2/arch/x86/mm/init_64.c linux-2.6.37.2/arch/x86/mm/init_64.c
---- linux-2.6.37.2/arch/x86/mm/init_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/init_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/init_64.c linux-2.6.38.1/arch/x86/mm/init_64.c
+--- linux-2.6.38.1/arch/x86/mm/init_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/init_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -72,7 +72,7 @@ early_param("gbpages", parse_direct_gbpa
* around without checking the pgd every time.
*/
EXPORT_SYMBOL_GPL(__supported_pte_mask);
int force_personality32;
-@@ -106,12 +106,22 @@ void sync_global_pgds(unsigned long star
+@@ -105,12 +105,22 @@ void sync_global_pgds(unsigned long star
+
for (address = start; address <= end; address += PGDIR_SIZE) {
const pgd_t *pgd_ref = pgd_offset_k(address);
- unsigned long flags;
+
+#ifdef CONFIG_PAX_PER_CPU_PGD
+ unsigned long cpu;
if (pgd_none(*pgd_ref))
continue;
- spin_lock_irqsave(&pgd_lock, flags);
+ spin_lock(&pgd_lock);
+
+#ifdef CONFIG_PAX_PER_CPU_PGD
+ for (cpu = 0; cpu < NR_CPUS; ++cpu) {
pgd_t *pgd;
spinlock_t *pgt_lock;
@@ -119,6 +129,7 @@ void sync_global_pgds(unsigned long star
- pgd = (pgd_t *)page_address(page) + pgd_index(address);
+ /* the pgt_lock only for Xen */
pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
spin_lock(pgt_lock);
+#endif
+#endif
+
}
- spin_unlock_irqrestore(&pgd_lock, flags);
+ spin_unlock(&pgd_lock);
}
@@ -200,7 +214,9 @@ void set_pte_vaddr_pud(pud_t *pud_page,
pmd = fill_pmd(pud, vaddr);
return "[vdso]";
if (vma == &gate_vma)
return "[vsyscall]";
-diff -urNp linux-2.6.37.2/arch/x86/mm/init.c linux-2.6.37.2/arch/x86/mm/init.c
---- linux-2.6.37.2/arch/x86/mm/init.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/init.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/init.c linux-2.6.38.1/arch/x86/mm/init.c
+--- linux-2.6.38.1/arch/x86/mm/init.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/init.c 2011-03-21 18:31:35.000000000 -0400
@@ -72,11 +72,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.
return 1;
if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
return 0;
-@@ -382,6 +384,86 @@ void free_init_pages(char *what, unsigne
+@@ -383,6 +385,86 @@ void free_init_pages(char *what, unsigne
void free_initmem(void)
{
free_init_pages("unused kernel memory",
(unsigned long)(&__init_begin),
(unsigned long)(&__init_end));
-diff -urNp linux-2.6.37.2/arch/x86/mm/iomap_32.c linux-2.6.37.2/arch/x86/mm/iomap_32.c
---- linux-2.6.37.2/arch/x86/mm/iomap_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/iomap_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/iomap_32.c linux-2.6.38.1/arch/x86/mm/iomap_32.c
+--- linux-2.6.38.1/arch/x86/mm/iomap_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/iomap_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -64,7 +64,11 @@ void *kmap_atomic_prot_pfn(unsigned long
type = kmap_atomic_idx_push();
idx = type + KM_TYPE_NR * smp_processor_id();
arch_flush_lazy_mmu_mode();
return (void *)vaddr;
-diff -urNp linux-2.6.37.2/arch/x86/mm/ioremap.c linux-2.6.37.2/arch/x86/mm/ioremap.c
---- linux-2.6.37.2/arch/x86/mm/ioremap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/ioremap.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/ioremap.c linux-2.6.38.1/arch/x86/mm/ioremap.c
+--- linux-2.6.38.1/arch/x86/mm/ioremap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/ioremap.c 2011-03-21 18:31:35.000000000 -0400
@@ -104,7 +104,7 @@ static void __iomem *__ioremap_caller(re
for (pfn = phys_addr >> PAGE_SHIFT; pfn <= last_pfn; pfn++) {
int is_ram = page_is_ram(pfn);
/*
* The boot-ioremap range spans multiple pmds, for which
-diff -urNp linux-2.6.37.2/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.37.2/arch/x86/mm/kmemcheck/kmemcheck.c
---- linux-2.6.37.2/arch/x86/mm/kmemcheck/kmemcheck.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/kmemcheck/kmemcheck.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.38.1/arch/x86/mm/kmemcheck/kmemcheck.c
+--- linux-2.6.38.1/arch/x86/mm/kmemcheck/kmemcheck.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/kmemcheck/kmemcheck.c 2011-03-21 18:31:35.000000000 -0400
@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *reg
* memory (e.g. tracked pages)? For now, we need this to avoid
* invoking kmemcheck for PnP BIOS calls.
return false;
pte = kmemcheck_pte_lookup(address);
-diff -urNp linux-2.6.37.2/arch/x86/mm/mmap.c linux-2.6.37.2/arch/x86/mm/mmap.c
---- linux-2.6.37.2/arch/x86/mm/mmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/mmap.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/mmap.c linux-2.6.38.1/arch/x86/mm/mmap.c
+--- linux-2.6.38.1/arch/x86/mm/mmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/mmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size
* Leave an at least ~128 MB hole with possible stack randomization.
*/
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
mm->unmap_area = arch_unmap_area_topdown;
}
-diff -urNp linux-2.6.37.2/arch/x86/mm/numa_32.c linux-2.6.37.2/arch/x86/mm/numa_32.c
---- linux-2.6.37.2/arch/x86/mm/numa_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/numa_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/numa_32.c linux-2.6.38.1/arch/x86/mm/numa_32.c
+--- linux-2.6.38.1/arch/x86/mm/numa_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/numa_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -99,7 +99,6 @@ unsigned long node_memmap_size_bytes(int
}
#endif
extern unsigned long highend_pfn, highstart_pfn;
#define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE)
-diff -urNp linux-2.6.37.2/arch/x86/mm/pageattr.c linux-2.6.37.2/arch/x86/mm/pageattr.c
---- linux-2.6.37.2/arch/x86/mm/pageattr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/pageattr.c 2011-01-17 02:41:01.000000000 -0500
-@@ -261,16 +261,17 @@ static inline pgprot_t static_protection
- * PCI BIOS based config access (CONFIG_PCI_GOBIOS) support.
+diff -urNp linux-2.6.38.1/arch/x86/mm/pageattr.c linux-2.6.38.1/arch/x86/mm/pageattr.c
+--- linux-2.6.38.1/arch/x86/mm/pageattr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/pageattr.c 2011-03-21 18:31:35.000000000 -0400
+@@ -261,7 +261,7 @@ static inline pgprot_t static_protection
*/
- if (within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
+ #ifdef CONFIG_PCI_BIOS
+ if (pcibios_enabled && within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
- pgprot_val(forbidden) |= _PAGE_NX;
+ pgprot_val(forbidden) |= _PAGE_NX & __supported_pte_mask;
+ #endif
/*
- * The kernel text needs to be executable for obvious reasons
+@@ -269,9 +269,10 @@ static inline pgprot_t static_protection
* Does not cover __inittext since that is gone later on. On
* 64bit we do not enforce !NX on the low mapping
*/
/*
* The .rodata section needs to be read-only. Using the pfn
* catches all aliases.
-@@ -278,6 +279,7 @@ static inline pgprot_t static_protection
+@@ -279,6 +280,7 @@ static inline pgprot_t static_protection
if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
__pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
pgprot_val(forbidden) |= _PAGE_RW;
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
/*
-@@ -316,6 +318,13 @@ static inline pgprot_t static_protection
+@@ -317,6 +319,13 @@ static inline pgprot_t static_protection
}
#endif
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
return prot;
-@@ -368,23 +377,37 @@ EXPORT_SYMBOL_GPL(lookup_address);
+@@ -369,23 +378,37 @@ EXPORT_SYMBOL_GPL(lookup_address);
static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
{
/* change init_mm */
}
static int
-diff -urNp linux-2.6.37.2/arch/x86/mm/pageattr-test.c linux-2.6.37.2/arch/x86/mm/pageattr-test.c
---- linux-2.6.37.2/arch/x86/mm/pageattr-test.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/pageattr-test.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/pageattr-test.c linux-2.6.38.1/arch/x86/mm/pageattr-test.c
+--- linux-2.6.38.1/arch/x86/mm/pageattr-test.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/pageattr-test.c 2011-03-21 18:31:35.000000000 -0400
@@ -36,7 +36,7 @@ enum {
static int pte_testbit(pte_t pte)
}
struct split_state {
-diff -urNp linux-2.6.37.2/arch/x86/mm/pat.c linux-2.6.37.2/arch/x86/mm/pat.c
---- linux-2.6.37.2/arch/x86/mm/pat.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/pat.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/pat.c linux-2.6.38.1/arch/x86/mm/pat.c
+--- linux-2.6.38.1/arch/x86/mm/pat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/pat.c 2011-03-21 18:31:35.000000000 -0400
@@ -361,7 +361,7 @@ int free_memtype(u64 start, u64 end)
if (!entry) {
cattr_name(want_flags),
(unsigned long long)paddr,
(unsigned long long)(paddr + size),
-diff -urNp linux-2.6.37.2/arch/x86/mm/pgtable_32.c linux-2.6.37.2/arch/x86/mm/pgtable_32.c
---- linux-2.6.37.2/arch/x86/mm/pgtable_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/pgtable_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/pgtable_32.c linux-2.6.38.1/arch/x86/mm/pgtable_32.c
+--- linux-2.6.38.1/arch/x86/mm/pgtable_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/pgtable_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -48,10 +48,13 @@ void set_pte_vaddr(unsigned long vaddr,
return;
}
/*
* It's enough to flush this one mapping.
-diff -urNp linux-2.6.37.2/arch/x86/mm/pgtable.c linux-2.6.37.2/arch/x86/mm/pgtable.c
---- linux-2.6.37.2/arch/x86/mm/pgtable.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/pgtable.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/pgtable.c linux-2.6.38.1/arch/x86/mm/pgtable.c
+--- linux-2.6.38.1/arch/x86/mm/pgtable.c 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/pgtable.c 2011-03-24 23:22:14.000000000 -0400
@@ -84,9 +84,58 @@ static inline void pgd_list_del(pgd_t *p
list_del(&page->lru);
}
static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
{
-@@ -130,6 +179,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -128,6 +177,7 @@ static void pgd_dtor(pgd_t *pgd)
pgd_list_del(pgd);
- spin_unlock_irqrestore(&pgd_lock, flags);
+ spin_unlock(&pgd_lock);
}
+#endif
/*
* List of all pgd's needed for non-PAE so it can invalidate entries
-@@ -142,7 +192,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -140,7 +190,7 @@ static void pgd_dtor(pgd_t *pgd)
* -- wli
*/
/*
* In PAE mode, we need to do a cr3 reload (=tlb flush) when
* updating the top-level pagetable entries to guarantee the
-@@ -154,7 +204,7 @@ static void pgd_dtor(pgd_t *pgd)
+@@ -152,7 +202,7 @@ static void pgd_dtor(pgd_t *pgd)
* not shared between pagetables (!SHARED_KERNEL_PMDS), we allocate
* and initialize the kernel pmds here.
*/
void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
{
-@@ -173,36 +223,38 @@ void pud_populate(struct mm_struct *mm,
- if (mm == current->active_mm)
- write_cr3(read_cr3());
+@@ -170,36 +220,38 @@ void pud_populate(struct mm_struct *mm,
+ */
+ flush_tlb_mm(mm);
}
+#elif defined(CONFIG_X86_64) && defined(CONFIG_PAX_PER_CPU_PGD)
+#define PREALLOCATED_PXDS USER_PGD_PTRS
return -ENOMEM;
}
-@@ -215,51 +267,56 @@ static int preallocate_pmds(pmd_t *pmds[
+@@ -212,51 +264,55 @@ static int preallocate_pmds(pmd_t *pmds[
* preallocate which never got a corresponding vma will need to be
* freed manually.
*/
pgd_t *pgd;
- pmd_t *pmds[PREALLOCATED_PMDS];
+ pxd_t *pxds[PREALLOCATED_PXDS];
-+
- unsigned long flags;
pgd = (pgd_t *)__get_free_page(PGALLOC_GFP);
-@@ -269,11 +326,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+
+@@ -265,11 +321,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
mm->pgd = pgd;
/*
* Make sure that pre-populating the pmds is atomic with
-@@ -283,14 +340,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
- spin_lock_irqsave(&pgd_lock, flags);
+@@ -279,14 +335,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+ spin_lock(&pgd_lock);
pgd_ctor(mm, pgd);
- pgd_prepopulate_pmd(mm, pgd, pmds);
+ pgd_prepopulate_pxd(mm, pgd, pxds);
- spin_unlock_irqrestore(&pgd_lock, flags);
+ spin_unlock(&pgd_lock);
return pgd;
out_free_pgd:
free_page((unsigned long)pgd);
out:
-@@ -299,7 +356,7 @@ out:
+@@ -295,7 +351,7 @@ out:
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
pgd_dtor(pgd);
paravirt_pgd_free(mm, pgd);
free_page((unsigned long)pgd);
-diff -urNp linux-2.6.37.2/arch/x86/mm/setup_nx.c linux-2.6.37.2/arch/x86/mm/setup_nx.c
---- linux-2.6.37.2/arch/x86/mm/setup_nx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/setup_nx.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/setup_nx.c linux-2.6.38.1/arch/x86/mm/setup_nx.c
+--- linux-2.6.38.1/arch/x86/mm/setup_nx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/setup_nx.c 2011-03-21 18:31:35.000000000 -0400
@@ -5,8 +5,10 @@
#include <asm/pgtable.h>
#include <asm/proto.h>
__supported_pte_mask &= ~_PAGE_NX;
}
-diff -urNp linux-2.6.37.2/arch/x86/mm/tlb.c linux-2.6.37.2/arch/x86/mm/tlb.c
---- linux-2.6.37.2/arch/x86/mm/tlb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/mm/tlb.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/mm/tlb.c linux-2.6.38.1/arch/x86/mm/tlb.c
+--- linux-2.6.38.1/arch/x86/mm/tlb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/mm/tlb.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,7 +14,7 @@
#include <asm/uv/uv.h>
}
EXPORT_SYMBOL_GPL(leave_mm);
-diff -urNp linux-2.6.37.2/arch/x86/oprofile/backtrace.c linux-2.6.37.2/arch/x86/oprofile/backtrace.c
---- linux-2.6.37.2/arch/x86/oprofile/backtrace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/oprofile/backtrace.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/oprofile/backtrace.c linux-2.6.38.1/arch/x86/oprofile/backtrace.c
+--- linux-2.6.38.1/arch/x86/oprofile/backtrace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/oprofile/backtrace.c 2011-03-21 18:31:35.000000000 -0400
@@ -57,7 +57,7 @@ dump_user_backtrace_32(struct stack_fram
struct stack_frame_ia32 *fp;
+ if (!user_mode(regs)) {
unsigned long stack = kernel_stack_pointer(regs);
if (depth)
- dump_trace(NULL, regs, (unsigned long *)stack, 0,
-diff -urNp linux-2.6.37.2/arch/x86/oprofile/op_model_p4.c linux-2.6.37.2/arch/x86/oprofile/op_model_p4.c
---- linux-2.6.37.2/arch/x86/oprofile/op_model_p4.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/oprofile/op_model_p4.c 2011-01-17 02:41:01.000000000 -0500
+ dump_trace(NULL, regs, (unsigned long *)stack,
+diff -urNp linux-2.6.38.1/arch/x86/oprofile/op_model_p4.c linux-2.6.38.1/arch/x86/oprofile/op_model_p4.c
+--- linux-2.6.38.1/arch/x86/oprofile/op_model_p4.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/oprofile/op_model_p4.c 2011-03-21 18:31:35.000000000 -0400
@@ -50,7 +50,7 @@ static inline void setup_num_counters(vo
#endif
}
{
#ifdef CONFIG_SMP
return smp_num_siblings == 2 ? 2 : 1;
-diff -urNp linux-2.6.37.2/arch/x86/pci/common.c linux-2.6.37.2/arch/x86/pci/common.c
---- linux-2.6.37.2/arch/x86/pci/common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/common.c 2011-01-17 02:41:01.000000000 -0500
-@@ -32,8 +32,8 @@ int noioapicreroute = 1;
+diff -urNp linux-2.6.38.1/arch/x86/pci/ce4100.c linux-2.6.38.1/arch/x86/pci/ce4100.c
+--- linux-2.6.38.1/arch/x86/pci/ce4100.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/ce4100.c 2011-03-21 18:31:35.000000000 -0400
+@@ -302,7 +302,7 @@ static int ce4100_conf_write(unsigned in
+ return pci_direct_conf1.write(seg, bus, devfn, reg, len, value);
+ }
+
+-struct pci_raw_ops ce4100_pci_conf = {
++const struct pci_raw_ops ce4100_pci_conf = {
+ .read = ce4100_conf_read,
+ .write = ce4100_conf_write,
+ };
+diff -urNp linux-2.6.38.1/arch/x86/pci/common.c linux-2.6.38.1/arch/x86/pci/common.c
+--- linux-2.6.38.1/arch/x86/pci/common.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/common.c 2011-03-21 18:31:35.000000000 -0400
+@@ -33,8 +33,8 @@ int noioapicreroute = 1;
int pcibios_last_bus = -1;
unsigned long pirq_table_addr;
struct pci_bus *pci_root_bus;
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 *val)
-@@ -382,7 +382,7 @@ static const struct dmi_system_id __devi
+@@ -423,7 +423,7 @@ static const struct dmi_system_id __devi
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
},
},
};
void __init dmi_check_pciprobe(void)
-diff -urNp linux-2.6.37.2/arch/x86/pci/direct.c linux-2.6.37.2/arch/x86/pci/direct.c
---- linux-2.6.37.2/arch/x86/pci/direct.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/direct.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/direct.c linux-2.6.38.1/arch/x86/pci/direct.c
+--- linux-2.6.38.1/arch/x86/pci/direct.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/direct.c 2011-03-21 18:31:35.000000000 -0400
@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int
#undef PCI_CONF1_ADDRESS
{
u32 x = 0;
int year, devfn;
-diff -urNp linux-2.6.37.2/arch/x86/pci/fixup.c linux-2.6.37.2/arch/x86/pci/fixup.c
---- linux-2.6.37.2/arch/x86/pci/fixup.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/fixup.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/fixup.c linux-2.6.38.1/arch/x86/pci/fixup.c
+--- linux-2.6.38.1/arch/x86/pci/fixup.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/fixup.c 2011-03-21 18:31:35.000000000 -0400
@@ -364,7 +364,7 @@ static const struct dmi_system_id __devi
DMI_MATCH(DMI_PRODUCT_NAME, "MS-6702E"),
},
};
static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
-diff -urNp linux-2.6.37.2/arch/x86/pci/irq.c linux-2.6.37.2/arch/x86/pci/irq.c
---- linux-2.6.37.2/arch/x86/pci/irq.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/irq.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/irq.c linux-2.6.38.1/arch/x86/pci/irq.c
+--- linux-2.6.38.1/arch/x86/pci/irq.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/irq.c 2011-03-21 18:31:35.000000000 -0400
@@ -542,7 +542,7 @@ static __init int intel_router_probe(str
static struct pci_device_id __initdata pirq_440gx[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
};
/* 440GX has a proprietary PIRQ router -- don't use it */
-@@ -1114,7 +1114,7 @@ static struct dmi_system_id __initdata p
+@@ -1115,7 +1115,7 @@ static struct dmi_system_id __initdata p
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
},
},
};
void __init pcibios_irq_init(void)
-diff -urNp linux-2.6.37.2/arch/x86/pci/mmconfig_32.c linux-2.6.37.2/arch/x86/pci/mmconfig_32.c
---- linux-2.6.37.2/arch/x86/pci/mmconfig_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/mmconfig_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/mmconfig_32.c linux-2.6.38.1/arch/x86/pci/mmconfig_32.c
+--- linux-2.6.38.1/arch/x86/pci/mmconfig_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/mmconfig_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -117,7 +117,7 @@ static int pci_mmcfg_write(unsigned int
return 0;
}
.read = pci_mmcfg_read,
.write = pci_mmcfg_write,
};
-diff -urNp linux-2.6.37.2/arch/x86/pci/mmconfig_64.c linux-2.6.37.2/arch/x86/pci/mmconfig_64.c
---- linux-2.6.37.2/arch/x86/pci/mmconfig_64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/mmconfig_64.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/mmconfig_64.c linux-2.6.38.1/arch/x86/pci/mmconfig_64.c
+--- linux-2.6.38.1/arch/x86/pci/mmconfig_64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/mmconfig_64.c 2011-03-21 18:31:35.000000000 -0400
@@ -81,7 +81,7 @@ static int pci_mmcfg_write(unsigned int
return 0;
}
.read = pci_mmcfg_read,
.write = pci_mmcfg_write,
};
-diff -urNp linux-2.6.37.2/arch/x86/pci/numaq_32.c linux-2.6.37.2/arch/x86/pci/numaq_32.c
---- linux-2.6.37.2/arch/x86/pci/numaq_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/numaq_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/numaq_32.c linux-2.6.38.1/arch/x86/pci/numaq_32.c
+--- linux-2.6.38.1/arch/x86/pci/numaq_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/numaq_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -108,7 +108,7 @@ static int pci_conf1_mq_write(unsigned i
#undef PCI_CONF1_MQ_ADDRESS
.read = pci_conf1_mq_read,
.write = pci_conf1_mq_write
};
-diff -urNp linux-2.6.37.2/arch/x86/pci/olpc.c linux-2.6.37.2/arch/x86/pci/olpc.c
---- linux-2.6.37.2/arch/x86/pci/olpc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/olpc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/pci/olpc.c linux-2.6.38.1/arch/x86/pci/olpc.c
+--- linux-2.6.38.1/arch/x86/pci/olpc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/olpc.c 2011-03-21 18:31:35.000000000 -0400
@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int s
return 0;
}
.read = pci_olpc_read,
.write = pci_olpc_write,
};
-diff -urNp linux-2.6.37.2/arch/x86/pci/pcbios.c linux-2.6.37.2/arch/x86/pci/pcbios.c
---- linux-2.6.37.2/arch/x86/pci/pcbios.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/pci/pcbios.c 2011-01-17 02:41:01.000000000 -0500
-@@ -57,50 +57,93 @@ union bios32 {
+diff -urNp linux-2.6.38.1/arch/x86/pci/pcbios.c linux-2.6.38.1/arch/x86/pci/pcbios.c
+--- linux-2.6.38.1/arch/x86/pci/pcbios.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/pci/pcbios.c 2011-03-21 18:31:35.000000000 -0400
+@@ -79,50 +79,93 @@ union bios32 {
static struct {
unsigned long address;
unsigned short segment;
static int __devinit check_pcibios(void)
{
-@@ -109,11 +152,13 @@ static int __devinit check_pcibios(void)
+@@ -131,11 +174,13 @@ static int __devinit check_pcibios(void)
unsigned long flags, pcibios_entry;
if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -122,7 +167,8 @@ static int __devinit check_pcibios(void)
+@@ -144,7 +189,8 @@ static int __devinit check_pcibios(void)
"=b" (ebx),
"=c" (ecx)
: "1" (PCIBIOS_PCI_BIOS_PRESENT),
: "memory");
local_irq_restore(flags);
-@@ -166,7 +212,10 @@ static int pci_bios_read(unsigned int se
+@@ -188,7 +234,10 @@ static int pci_bios_read(unsigned int se
switch (len) {
case 1:
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -175,7 +224,8 @@ static int pci_bios_read(unsigned int se
+@@ -197,7 +246,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_BYTE),
"b" (bx),
"D" ((long)reg),
/*
* Zero-extend the result beyond 8 bits, do not trust the
* BIOS having done it:
-@@ -183,7 +233,10 @@ static int pci_bios_read(unsigned int se
+@@ -205,7 +255,10 @@ static int pci_bios_read(unsigned int se
*value &= 0xff;
break;
case 2:
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -192,7 +245,8 @@ static int pci_bios_read(unsigned int se
+@@ -214,7 +267,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_WORD),
"b" (bx),
"D" ((long)reg),
/*
* Zero-extend the result beyond 16 bits, do not trust the
* BIOS having done it:
-@@ -200,7 +254,10 @@ static int pci_bios_read(unsigned int se
+@@ -222,7 +276,10 @@ static int pci_bios_read(unsigned int se
*value &= 0xffff;
break;
case 4:
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -209,7 +266,8 @@ static int pci_bios_read(unsigned int se
+@@ -231,7 +288,8 @@ static int pci_bios_read(unsigned int se
: "1" (PCIBIOS_READ_CONFIG_DWORD),
"b" (bx),
"D" ((long)reg),
break;
}
-@@ -232,7 +290,10 @@ static int pci_bios_write(unsigned int s
+@@ -254,7 +312,10 @@ static int pci_bios_write(unsigned int s
switch (len) {
case 1:
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -241,10 +302,14 @@ static int pci_bios_write(unsigned int s
+@@ -263,10 +324,14 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -253,10 +318,14 @@ static int pci_bios_write(unsigned int s
+@@ -275,10 +340,14 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -265,7 +334,8 @@ static int pci_bios_write(unsigned int s
+@@ -287,7 +356,8 @@ static int pci_bios_write(unsigned int s
"c" (value),
"b" (bx),
"D" ((long)reg),
break;
}
-@@ -279,7 +349,7 @@ static int pci_bios_write(unsigned int s
+@@ -301,7 +371,7 @@ static int pci_bios_write(unsigned int s
* Function table for BIOS32 access
*/
.read = pci_bios_read,
.write = pci_bios_write
};
-@@ -288,7 +358,7 @@ static struct pci_raw_ops pci_bios_acces
+@@ -310,7 +380,7 @@ static struct pci_raw_ops pci_bios_acces
* Try to find PCI BIOS.
*/
{
union bios32 *check;
unsigned char sum;
-@@ -369,10 +439,13 @@ struct irq_routing_table * pcibios_get_i
+@@ -392,10 +462,13 @@ struct irq_routing_table * pcibios_get_i
DBG("PCI: Fetching IRQ routing table... ");
__asm__("push %%es\n\t"
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -383,7 +456,8 @@ struct irq_routing_table * pcibios_get_i
+@@ -406,7 +479,8 @@ struct irq_routing_table * pcibios_get_i
"1" (0),
"D" ((long) &opt),
"S" (&pci_indirect),
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00)
-@@ -407,7 +481,10 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -430,7 +504,10 @@ int pcibios_set_irq_routing(struct pci_d
{
int ret;
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -415,7 +492,8 @@ int pcibios_set_irq_routing(struct pci_d
+@@ -438,7 +515,8 @@ int pcibios_set_irq_routing(struct pci_d
: "0" (PCIBIOS_SET_PCI_HW_INT),
"b" ((dev->bus->number << 8) | dev->devfn),
"c" ((irq << 8) | (pin + 10)),
return !(ret & 0xff00);
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
-diff -urNp linux-2.6.37.2/arch/x86/platform/efi/efi_32.c linux-2.6.37.2/arch/x86/platform/efi/efi_32.c
---- linux-2.6.37.2/arch/x86/platform/efi/efi_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/platform/efi/efi_32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/platform/efi/efi_32.c linux-2.6.38.1/arch/x86/platform/efi/efi_32.c
+--- linux-2.6.38.1/arch/x86/platform/efi/efi_32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/platform/efi/efi_32.c 2011-03-21 18:31:35.000000000 -0400
@@ -38,70 +38,37 @@
*/
/*
* After the lock is released, the original page table is restored.
-diff -urNp linux-2.6.37.2/arch/x86/platform/efi/efi_stub_32.S linux-2.6.37.2/arch/x86/platform/efi/efi_stub_32.S
---- linux-2.6.37.2/arch/x86/platform/efi/efi_stub_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/platform/efi/efi_stub_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/platform/efi/efi_stub_32.S linux-2.6.38.1/arch/x86/platform/efi/efi_stub_32.S
+--- linux-2.6.38.1/arch/x86/platform/efi/efi_stub_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/platform/efi/efi_stub_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -6,6 +6,7 @@
*/
saved_return_addr:
.long 0
efi_rt_function_ptr:
-diff -urNp linux-2.6.37.2/arch/x86/power/cpu.c linux-2.6.37.2/arch/x86/power/cpu.c
---- linux-2.6.37.2/arch/x86/power/cpu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/power/cpu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/power/cpu.c linux-2.6.38.1/arch/x86/power/cpu.c
+--- linux-2.6.38.1/arch/x86/power/cpu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/power/cpu.c 2011-03-21 18:31:35.000000000 -0400
@@ -130,7 +130,7 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
syscall_init(); /* This sets MSR_*STAR and related */
#endif
-diff -urNp linux-2.6.37.2/arch/x86/vdso/Makefile linux-2.6.37.2/arch/x86/vdso/Makefile
---- linux-2.6.37.2/arch/x86/vdso/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/Makefile 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/Makefile linux-2.6.38.1/arch/x86/vdso/Makefile
+--- linux-2.6.38.1/arch/x86/vdso/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -123,7 +123,7 @@ quiet_cmd_vdso = VDSO $@
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
GCOV_PROFILE := n
#
-diff -urNp linux-2.6.37.2/arch/x86/vdso/vclock_gettime.c linux-2.6.37.2/arch/x86/vdso/vclock_gettime.c
---- linux-2.6.37.2/arch/x86/vdso/vclock_gettime.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/vclock_gettime.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/vclock_gettime.c linux-2.6.38.1/arch/x86/vdso/vclock_gettime.c
+--- linux-2.6.38.1/arch/x86/vdso/vclock_gettime.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/vclock_gettime.c 2011-03-21 18:31:35.000000000 -0400
@@ -22,24 +22,48 @@
#include <asm/hpet.h>
#include <asm/unistd.h>
}
int gettimeofday(struct timeval *, struct timezone *)
__attribute__((weak, alias("__vdso_gettimeofday")));
-diff -urNp linux-2.6.37.2/arch/x86/vdso/vdso32-setup.c linux-2.6.37.2/arch/x86/vdso/vdso32-setup.c
---- linux-2.6.37.2/arch/x86/vdso/vdso32-setup.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/vdso32-setup.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/vdso32-setup.c linux-2.6.38.1/arch/x86/vdso/vdso32-setup.c
+--- linux-2.6.38.1/arch/x86/vdso/vdso32-setup.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/vdso32-setup.c 2011-03-21 18:31:35.000000000 -0400
@@ -25,6 +25,7 @@
#include <asm/tlbflush.h>
#include <asm/vdso.h>
return &gate_vma;
return NULL;
}
-diff -urNp linux-2.6.37.2/arch/x86/vdso/vdso.lds.S linux-2.6.37.2/arch/x86/vdso/vdso.lds.S
---- linux-2.6.37.2/arch/x86/vdso/vdso.lds.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/vdso.lds.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/vdso.lds.S linux-2.6.38.1/arch/x86/vdso/vdso.lds.S
+--- linux-2.6.38.1/arch/x86/vdso/vdso.lds.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/vdso.lds.S 2011-03-21 18:31:35.000000000 -0400
@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK;
#define VEXTERN(x) VDSO64_ ## x = vdso_ ## x;
#include "vextern.h"
+VEXTERN(fallback_time)
+VEXTERN(getcpu)
+#undef VEXTERN
-diff -urNp linux-2.6.37.2/arch/x86/vdso/vextern.h linux-2.6.37.2/arch/x86/vdso/vextern.h
---- linux-2.6.37.2/arch/x86/vdso/vextern.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/vextern.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/vextern.h linux-2.6.38.1/arch/x86/vdso/vextern.h
+--- linux-2.6.38.1/arch/x86/vdso/vextern.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/vextern.h 2011-03-21 18:31:35.000000000 -0400
@@ -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. */
-VEXTERN(jiffies)
VEXTERN(vgetcpu_mode)
VEXTERN(vsyscall_gtod_data)
-diff -urNp linux-2.6.37.2/arch/x86/vdso/vma.c linux-2.6.37.2/arch/x86/vdso/vma.c
---- linux-2.6.37.2/arch/x86/vdso/vma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/vdso/vma.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/vdso/vma.c linux-2.6.38.1/arch/x86/vdso/vma.c
+--- linux-2.6.38.1/arch/x86/vdso/vma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/vdso/vma.c 2011-03-21 18:31:35.000000000 -0400
@@ -58,7 +58,7 @@ static int __init init_vdso_vars(void)
if (!vbase)
goto oom;
- return 0;
-}
-__setup("vdso=", vdso_setup);
-diff -urNp linux-2.6.37.2/arch/x86/xen/enlighten.c linux-2.6.37.2/arch/x86/xen/enlighten.c
---- linux-2.6.37.2/arch/x86/xen/enlighten.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/enlighten.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/xen/enlighten.c linux-2.6.38.1/arch/x86/xen/enlighten.c
+--- linux-2.6.38.1/arch/x86/xen/enlighten.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/enlighten.c 2011-03-21 18:31:35.000000000 -0400
@@ -85,8 +85,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
struct shared_info xen_dummy_shared_info;
RESERVE_BRK(shared_info_page_brk, PAGE_SIZE);
__read_mostly int xen_have_vector_callback;
EXPORT_SYMBOL_GPL(xen_have_vector_callback);
-@@ -574,7 +572,7 @@ static void xen_write_idt_entry(gate_des
-
- preempt_disable();
-
-- start = __get_cpu_var(idt_desc).address;
-+ start = (unsigned long)__get_cpu_var(idt_desc).address;
- end = start + __get_cpu_var(idt_desc).size + 1;
-
- xen_mc_flush();
@@ -1134,7 +1132,17 @@ asmlinkage void __init xen_start_kernel(
__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
-
xen_smp_init();
- pgd = (pgd_t *)xen_start_info->pt_base;
-diff -urNp linux-2.6.37.2/arch/x86/xen/mmu.c linux-2.6.37.2/arch/x86/xen/mmu.c
---- linux-2.6.37.2/arch/x86/xen/mmu.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/mmu.c 2011-02-27 14:49:45.000000000 -0500
-@@ -2096,6 +2096,8 @@ __init pgd_t *xen_setup_kernel_pagetable
+ #ifdef CONFIG_ACPI_NUMA
+diff -urNp linux-2.6.38.1/arch/x86/xen/mmu.c linux-2.6.38.1/arch/x86/xen/mmu.c
+--- linux-2.6.38.1/arch/x86/xen/mmu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/mmu.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1718,6 +1718,8 @@ __init pgd_t *xen_setup_kernel_pagetable
convert_pfn_mfn(init_level4_pgt);
convert_pfn_mfn(level3_ident_pgt);
convert_pfn_mfn(level3_kernel_pgt);
l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud);
-@@ -2114,7 +2116,10 @@ __init pgd_t *xen_setup_kernel_pagetable
+@@ -1736,7 +1738,10 @@ __init pgd_t *xen_setup_kernel_pagetable
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);
set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
-diff -urNp linux-2.6.37.2/arch/x86/xen/pci-swiotlb-xen.c linux-2.6.37.2/arch/x86/xen/pci-swiotlb-xen.c
---- linux-2.6.37.2/arch/x86/xen/pci-swiotlb-xen.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/pci-swiotlb-xen.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/xen/pci-swiotlb-xen.c linux-2.6.38.1/arch/x86/xen/pci-swiotlb-xen.c
+--- linux-2.6.38.1/arch/x86/xen/pci-swiotlb-xen.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/pci-swiotlb-xen.c 2011-03-21 18:31:35.000000000 -0400
@@ -10,7 +10,7 @@
int xen_swiotlb __read_mostly;
.mapping_error = xen_swiotlb_dma_mapping_error,
.alloc_coherent = xen_swiotlb_alloc_coherent,
.free_coherent = xen_swiotlb_free_coherent,
-diff -urNp linux-2.6.37.2/arch/x86/xen/smp.c linux-2.6.37.2/arch/x86/xen/smp.c
---- linux-2.6.37.2/arch/x86/xen/smp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/smp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/xen/smp.c linux-2.6.38.1/arch/x86/xen/smp.c
+--- linux-2.6.38.1/arch/x86/xen/smp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/smp.c 2011-03-21 18:31:35.000000000 -0400
@@ -194,11 +194,6 @@ static void __init xen_smp_prepare_boot_
{
BUG_ON(smp_processor_id() != 0);
#else
ctxt->gs_base_kernel = per_cpu_offset(cpu);
#endif
-diff -urNp linux-2.6.37.2/arch/x86/xen/xen-head.S linux-2.6.37.2/arch/x86/xen/xen-head.S
---- linux-2.6.37.2/arch/x86/xen/xen-head.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/xen-head.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/xen/xen-head.S linux-2.6.38.1/arch/x86/xen/xen-head.S
+--- linux-2.6.38.1/arch/x86/xen/xen-head.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/xen-head.S 2011-03-21 18:31:35.000000000 -0400
@@ -19,6 +19,17 @@ ENTRY(startup_xen)
#ifdef CONFIG_X86_32
mov %esi,xen_start_info
#else
mov %rsi,xen_start_info
mov $init_thread_union+THREAD_SIZE,%rsp
-diff -urNp linux-2.6.37.2/arch/x86/xen/xen-ops.h linux-2.6.37.2/arch/x86/xen/xen-ops.h
---- linux-2.6.37.2/arch/x86/xen/xen-ops.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/arch/x86/xen/xen-ops.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/arch/x86/xen/xen-ops.h linux-2.6.38.1/arch/x86/xen/xen-ops.h
+--- linux-2.6.38.1/arch/x86/xen/xen-ops.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/arch/x86/xen/xen-ops.h 2011-03-21 18:31:35.000000000 -0400
@@ -10,8 +10,6 @@
extern const char xen_hypervisor_callback[];
extern const char xen_failsafe_callback[];
struct trap_info;
void xen_copy_trap_info(struct trap_info *traps);
-diff -urNp linux-2.6.37.2/block/blk-iopoll.c linux-2.6.37.2/block/blk-iopoll.c
---- linux-2.6.37.2/block/blk-iopoll.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/block/blk-iopoll.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/block/blk-iopoll.c linux-2.6.38.1/block/blk-iopoll.c
+--- linux-2.6.38.1/block/blk-iopoll.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/block/blk-iopoll.c 2011-03-21 18:31:35.000000000 -0400
@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopo
}
EXPORT_SYMBOL(blk_iopoll_complete);
{
struct list_head *list = &__get_cpu_var(blk_cpu_iopoll);
int rearm = 0, budget = blk_iopoll_budget;
-diff -urNp linux-2.6.37.2/block/blk-map.c linux-2.6.37.2/block/blk-map.c
---- linux-2.6.37.2/block/blk-map.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/block/blk-map.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/block/blk-map.c linux-2.6.38.1/block/blk-map.c
+--- linux-2.6.38.1/block/blk-map.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/block/blk-map.c 2011-03-21 18:31:35.000000000 -0400
@@ -301,7 +301,7 @@ int blk_rq_map_kern(struct request_queue
if (!len || !kbuf)
return -EINVAL;
if (do_copy)
bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
else
-diff -urNp linux-2.6.37.2/block/blk-softirq.c linux-2.6.37.2/block/blk-softirq.c
---- linux-2.6.37.2/block/blk-softirq.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/block/blk-softirq.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/block/blk-softirq.c linux-2.6.38.1/block/blk-softirq.c
+--- linux-2.6.38.1/block/blk-softirq.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/block/blk-softirq.c 2011-03-21 18:31:35.000000000 -0400
@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head,
* Softirq action handler - move entries to local list and loop over them
* while passing them to the queue registered handler.
{
struct list_head *cpu_list, local_list;
-diff -urNp linux-2.6.37.2/crypto/lrw.c linux-2.6.37.2/crypto/lrw.c
---- linux-2.6.37.2/crypto/lrw.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/crypto/lrw.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/crypto/lrw.c linux-2.6.38.1/crypto/lrw.c
+--- linux-2.6.38.1/crypto/lrw.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/crypto/lrw.c 2011-03-21 18:31:35.000000000 -0400
@@ -60,7 +60,7 @@ static int setkey(struct crypto_tfm *par
struct priv *ctx = crypto_tfm_ctx(parent);
struct crypto_cipher *child = ctx->child;
int bsize = crypto_cipher_blocksize(child);
crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
-diff -urNp linux-2.6.37.2/Documentation/dontdiff linux-2.6.37.2/Documentation/dontdiff
---- linux-2.6.37.2/Documentation/dontdiff 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/Documentation/dontdiff 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/Documentation/dontdiff linux-2.6.38.1/Documentation/dontdiff
+--- linux-2.6.38.1/Documentation/dontdiff 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/Documentation/dontdiff 2011-03-21 18:31:35.000000000 -0400
@@ -3,6 +3,7 @@
*.bin
*.cpio
SCCS
System.map*
TAGS
-@@ -62,6 +70,7 @@ aic7*reg_print.c*
- aic7*seq.h*
- aicasm
- aicdb.h*
-+altivec[0-9].c
- asm-offsets.h
- asm_offsets.h
- autoconf.h*
-@@ -76,7 +85,10 @@ btfixupprep
- build
- bvmlinux
+@@ -82,6 +90,8 @@ bvmlinux
bzImage*
-+capflags.c
+ capflags.c
classlist.h*
+clut_vga16.c
+common-cmds.h
comp*.log
compile.h*
conf
-@@ -100,19 +112,23 @@ fore200e_mkfirm
+@@ -106,16 +116,19 @@ fore200e_mkfirm
fore200e_pca_fw.c*
gconf
gen-devlist
+hash
ihex2fw
ikconfig.h*
-+inat-tables.c
+ inat-tables.c
initramfs_data.cpio
+initramfs_data.cpio.bz2
initramfs_data.cpio.gz
initramfs_list
-+int[0-9]*.c
+ int16.c
+@@ -125,7 +138,6 @@ int32.c
+ int4.c
+ int8.c
kallsyms
-kconfig
keywords.c
ksym.c*
ksym.h*
-@@ -136,10 +152,13 @@ mkboot
+@@ -149,7 +161,9 @@ mkboot
mkbugboot
mkcpustr
mkdep
mktables
mktree
modpost
-+modules.builtin
- modules.order
- modversions.h*
- ncscope.*
-@@ -151,7 +170,9 @@ parse.h
+@@ -165,6 +179,7 @@ parse.h
patches*
pca200e.bin
pca200e_ecd.bin2
+perf-archive
piggy.gz
-+piggy.S
piggyback
- pnmtologo
- ppc_defs.h*
-@@ -160,15 +181,18 @@ qconf
+ piggy.S
+@@ -180,6 +195,7 @@ r600_reg_safe.h
raid6altivec*.c
raid6int*.c
raid6tables.c
+regdb.c
relocs
- series
- setup
+ rn50_reg_safe.h
+ rs600_reg_safe.h
+@@ -189,6 +205,7 @@ setup
setup.bin
setup.elf
sImage
sm_tbl*
split-include
syscalltab.h
-+tables.c
- tags
- tftpboot.img
- timeconst.h
-@@ -189,14 +213,20 @@ version.h*
+@@ -213,13 +230,17 @@ version.h*
vmlinux
vmlinux-*
vmlinux.aout
+vmlinux.bin.bz2
vmlinux.lds
+vmlinux.relocs
-+voffset.h
+ voffset.h
vsyscall.lds
vsyscall_32.lds
wanxlfw.inc
wakeup.bin
wakeup.elf
wakeup.lds
- zImage*
- zconf.hash.c
-+zoffset.h
-diff -urNp linux-2.6.37.2/Documentation/filesystems/sysfs.txt linux-2.6.37.2/Documentation/filesystems/sysfs.txt
---- linux-2.6.37.2/Documentation/filesystems/sysfs.txt 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/Documentation/filesystems/sysfs.txt 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/Documentation/filesystems/sysfs.txt linux-2.6.38.1/Documentation/filesystems/sysfs.txt
+--- linux-2.6.38.1/Documentation/filesystems/sysfs.txt 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/Documentation/filesystems/sysfs.txt 2011-03-21 18:31:35.000000000 -0400
@@ -123,8 +123,8 @@ set of sysfs operations for forwarding r
show and store methods of the attribute owners.
};
[ Subsystems should have already defined a struct kobj_type as a
-diff -urNp linux-2.6.37.2/Documentation/kernel-parameters.txt linux-2.6.37.2/Documentation/kernel-parameters.txt
---- linux-2.6.37.2/Documentation/kernel-parameters.txt 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/Documentation/kernel-parameters.txt 2011-02-22 16:05:42.000000000 -0500
-@@ -1850,6 +1850,13 @@ and is between 256 and 4096 characters.
+diff -urNp linux-2.6.38.1/Documentation/kernel-parameters.txt linux-2.6.38.1/Documentation/kernel-parameters.txt
+--- linux-2.6.38.1/Documentation/kernel-parameters.txt 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/Documentation/kernel-parameters.txt 2011-03-21 18:31:35.000000000 -0400
+@@ -1853,6 +1853,13 @@ bytes respectively. Such letter suffixes
the specified number of seconds. This is to be used if
your oopses keep scrolling off the screen.
+ expand down segment used by UDEREF on X86-32 or the frequent
+ page table updates on X86-64.
+
-+ pax_softmode= [X86-32] 0/1 to disable/enable PaX softmode on boot already.
++ pax_softmode= 0/1 to disable/enable PaX softmode on boot already.
+
pcbit= [HW,ISDN]
pcd. [PARIDE]
-diff -urNp linux-2.6.37.2/drivers/acpi/battery.c linux-2.6.37.2/drivers/acpi/battery.c
---- linux-2.6.37.2/drivers/acpi/battery.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/battery.c 2011-01-17 02:41:01.000000000 -0500
-@@ -851,7 +851,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
+diff -urNp linux-2.6.38.1/drivers/acpi/battery.c linux-2.6.38.1/drivers/acpi/battery.c
+--- linux-2.6.38.1/drivers/acpi/battery.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/battery.c 2011-03-21 18:31:35.000000000 -0400
+@@ -862,7 +862,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
}
static struct battery_file {
mode_t mode;
const char *name;
} acpi_battery_file[] = {
-diff -urNp linux-2.6.37.2/drivers/acpi/blacklist.c linux-2.6.37.2/drivers/acpi/blacklist.c
---- linux-2.6.37.2/drivers/acpi/blacklist.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/blacklist.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/acpi/blacklist.c linux-2.6.38.1/drivers/acpi/blacklist.c
+--- linux-2.6.38.1/drivers/acpi/blacklist.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/blacklist.c 2011-03-21 18:31:35.000000000 -0400
@@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_b
{"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
"Incorrect _ADR", 1},
};
#if CONFIG_ACPI_BLACKLIST_YEAR
-diff -urNp linux-2.6.37.2/drivers/acpi/dock.c linux-2.6.37.2/drivers/acpi/dock.c
---- linux-2.6.37.2/drivers/acpi/dock.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/dock.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/acpi/dock.c linux-2.6.38.1/drivers/acpi/dock.c
+--- linux-2.6.38.1/drivers/acpi/dock.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/dock.c 2011-03-21 18:31:35.000000000 -0400
@@ -77,7 +77,7 @@ struct dock_dependent_device {
struct list_head list;
struct list_head hotplug_list;
void *context)
{
struct dock_dependent_device *dd;
-diff -urNp linux-2.6.37.2/drivers/acpi/ec_sys.c linux-2.6.37.2/drivers/acpi/ec_sys.c
---- linux-2.6.37.2/drivers/acpi/ec_sys.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/ec_sys.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/acpi/ec_sys.c linux-2.6.38.1/drivers/acpi/ec_sys.c
+--- linux-2.6.38.1/drivers/acpi/ec_sys.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/ec_sys.c 2011-03-21 18:31:35.000000000 -0400
@@ -96,7 +96,7 @@ static ssize_t acpi_ec_write_io(struct f
return count;
}
.owner = THIS_MODULE,
.open = acpi_ec_open_io,
.read = acpi_ec_read_io,
-diff -urNp linux-2.6.37.2/drivers/acpi/osl.c linux-2.6.37.2/drivers/acpi/osl.c
---- linux-2.6.37.2/drivers/acpi/osl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/osl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -643,6 +643,8 @@ acpi_os_read_memory(acpi_physical_addres
- rcu_read_unlock();
- if (!virt_addr) {
- virt_addr = ioremap(phys_addr, size);
-+ if (!virt_addr)
-+ return AE_NO_MEMORY;
- unmap = 1;
- }
- if (!value)
-@@ -679,6 +681,8 @@ acpi_os_write_memory(acpi_physical_addre
- rcu_read_unlock();
- if (!virt_addr) {
- virt_addr = ioremap(phys_addr, size);
-+ if (!virt_addr)
-+ return AE_NO_MEMORY;
- unmap = 1;
- }
-
-diff -urNp linux-2.6.37.2/drivers/acpi/power_meter.c linux-2.6.37.2/drivers/acpi/power_meter.c
---- linux-2.6.37.2/drivers/acpi/power_meter.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/power_meter.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/acpi/power_meter.c linux-2.6.38.1/drivers/acpi/power_meter.c
+--- linux-2.6.38.1/drivers/acpi/power_meter.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/power_meter.c 2011-03-21 18:31:35.000000000 -0400
@@ -316,8 +316,6 @@ static ssize_t set_trip(struct device *d
return res;
mutex_lock(&resource->lock);
resource->trip[attr->index - 7] = temp;
-diff -urNp linux-2.6.37.2/drivers/acpi/proc.c linux-2.6.37.2/drivers/acpi/proc.c
---- linux-2.6.37.2/drivers/acpi/proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/proc.c 2011-01-17 02:41:01.000000000 -0500
-@@ -338,20 +338,15 @@ acpi_system_write_wakeup_device(struct f
+diff -urNp linux-2.6.38.1/drivers/acpi/proc.c linux-2.6.38.1/drivers/acpi/proc.c
+--- linux-2.6.38.1/drivers/acpi/proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/proc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -342,19 +342,13 @@ acpi_system_write_wakeup_device(struct f
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};
- struct acpi_device *found_dev = NULL;
-
+-
- if (len > 4)
- len = 4;
- if (len < 0)
- return -EFAULT;
-+ if (count > 4)
-+ count = 4;
++ 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;
- strbuf[len] = '\0';
mutex_lock(&acpi_device_lock);
list_for_each_safe(node, next, &acpi_wakeup_device_list) {
-@@ -360,7 +355,7 @@ acpi_system_write_wakeup_device(struct f
+@@ -363,7 +357,7 @@ acpi_system_write_wakeup_device(struct f
if (!dev->wakeup.flags.valid)
continue;
- if (!strncmp(dev->pnp.bus_id, str, 4)) {
+ if (!strncmp(dev->pnp.bus_id, strbuf, 4)) {
- dev->wakeup.state.enabled =
- dev->wakeup.state.enabled ? 0 : 1;
- found_dev = dev;
-diff -urNp linux-2.6.37.2/drivers/acpi/processor_driver.c linux-2.6.37.2/drivers/acpi/processor_driver.c
---- linux-2.6.37.2/drivers/acpi/processor_driver.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/processor_driver.c 2011-01-17 02:41:01.000000000 -0500
-@@ -519,7 +519,7 @@ static int __cpuinit acpi_processor_add(
+ if (device_can_wakeup(&dev->dev)) {
+ bool enable = !device_may_wakeup(&dev->dev);
+ device_set_wakeup_enable(&dev->dev, enable);
+diff -urNp linux-2.6.38.1/drivers/acpi/processor_driver.c linux-2.6.38.1/drivers/acpi/processor_driver.c
+--- linux-2.6.38.1/drivers/acpi/processor_driver.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/processor_driver.c 2011-03-21 18:31:35.000000000 -0400
+@@ -473,7 +473,7 @@ static int __cpuinit acpi_processor_add(
return 0;
#endif
/*
* Buggy BIOS check
-diff -urNp linux-2.6.37.2/drivers/acpi/processor_idle.c linux-2.6.37.2/drivers/acpi/processor_idle.c
---- linux-2.6.37.2/drivers/acpi/processor_idle.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/processor_idle.c 2011-01-17 02:41:01.000000000 -0500
-@@ -114,7 +114,7 @@ static struct dmi_system_id __cpuinitdat
+diff -urNp linux-2.6.38.1/drivers/acpi/processor_idle.c linux-2.6.38.1/drivers/acpi/processor_idle.c
+--- linux-2.6.38.1/drivers/acpi/processor_idle.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/acpi/processor_idle.c 2011-03-21 18:31:35.000000000 -0400
+@@ -121,7 +121,7 @@ static struct dmi_system_id __cpuinitdat
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")},
(void *)1},
};
-diff -urNp linux-2.6.37.2/drivers/acpi/sleep.c linux-2.6.37.2/drivers/acpi/sleep.c
---- linux-2.6.37.2/drivers/acpi/sleep.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/sleep.c 2011-01-17 02:41:01.000000000 -0500
-@@ -319,7 +319,7 @@ static int acpi_suspend_state_valid(susp
- }
- }
+diff -urNp linux-2.6.38.1/drivers/ata/acard-ahci.c linux-2.6.38.1/drivers/ata/acard-ahci.c
+--- linux-2.6.38.1/drivers/ata/acard-ahci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/acard-ahci.c 2011-03-21 18:31:35.000000000 -0400
+@@ -87,7 +87,7 @@ static struct scsi_host_template acard_a
+ AHCI_SHT("acard-ahci"),
+ };
--static struct platform_suspend_ops acpi_suspend_ops = {
-+static const struct platform_suspend_ops acpi_suspend_ops = {
- .valid = acpi_suspend_state_valid,
- .begin = acpi_suspend_begin,
- .prepare_late = acpi_pm_prepare,
-@@ -347,7 +347,7 @@ static int acpi_suspend_begin_old(suspen
- * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
- * been requested.
- */
--static struct platform_suspend_ops acpi_suspend_ops_old = {
-+static const struct platform_suspend_ops acpi_suspend_ops_old = {
- .valid = acpi_suspend_state_valid,
- .begin = acpi_suspend_begin_old,
- .prepare_late = acpi_pm_pre_suspend,
-@@ -506,7 +506,7 @@ static void acpi_pm_thaw(void)
- acpi_enable_all_runtime_gpes();
- }
-
--static struct platform_hibernation_ops acpi_hibernation_ops = {
-+static const struct platform_hibernation_ops acpi_hibernation_ops = {
- .begin = acpi_hibernation_begin,
- .end = acpi_pm_end,
- .pre_snapshot = acpi_pm_prepare,
-@@ -549,7 +549,7 @@ static int acpi_hibernation_begin_old(vo
- * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
- * been requested.
- */
--static struct platform_hibernation_ops acpi_hibernation_ops_old = {
-+static const struct platform_hibernation_ops acpi_hibernation_ops_old = {
- .begin = acpi_hibernation_begin_old,
- .end = acpi_pm_end,
- .pre_snapshot = acpi_pm_pre_suspend,
-diff -urNp linux-2.6.37.2/drivers/acpi/video.c linux-2.6.37.2/drivers/acpi/video.c
---- linux-2.6.37.2/drivers/acpi/video.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/acpi/video.c 2011-01-17 02:41:01.000000000 -0500
-@@ -260,7 +260,7 @@ static int acpi_video_set_brightness(str
- vd->brightness->levels[request_level]);
- }
-
--static struct backlight_ops acpi_backlight_ops = {
-+static const struct backlight_ops acpi_backlight_ops = {
- .get_brightness = acpi_video_get_brightness,
- .update_status = acpi_video_set_brightness,
- };
-diff -urNp linux-2.6.37.2/drivers/ata/ahci.c linux-2.6.37.2/drivers/ata/ahci.c
---- linux-2.6.37.2/drivers/ata/ahci.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/ahci.c 2011-01-17 02:41:01.000000000 -0500
+-static struct ata_port_operations acard_ops = {
++static const struct ata_port_operations acard_ops = {
+ .inherits = &ahci_ops,
+ .qc_prep = acard_ahci_qc_prep,
+ .qc_fill_rtf = acard_ahci_qc_fill_rtf,
+diff -urNp linux-2.6.38.1/drivers/ata/ahci.c linux-2.6.38.1/drivers/ata/ahci.c
+--- linux-2.6.38.1/drivers/ata/ahci.c 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/ahci.c 2011-03-23 17:21:49.000000000 -0400
@@ -94,17 +94,17 @@ static struct scsi_host_template ahci_sh
AHCI_SHT("ahci"),
};
.inherits = &ahci_ops,
.softreset = ahci_sb600_softreset,
.pmp_softreset = ahci_sb600_softreset,
-@@ -388,7 +388,7 @@ static const struct pci_device_id ahci_p
+@@ -394,7 +394,7 @@ static const struct pci_device_id ahci_p
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
};
-diff -urNp linux-2.6.37.2/drivers/ata/ahci.h linux-2.6.37.2/drivers/ata/ahci.h
---- linux-2.6.37.2/drivers/ata/ahci.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/ahci.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/ahci.h linux-2.6.38.1/drivers/ata/ahci.h
+--- linux-2.6.38.1/drivers/ata/ahci.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/ahci.h 2011-03-21 18:31:35.000000000 -0400
@@ -309,7 +309,7 @@ extern struct device_attribute *ahci_sde
.shost_attrs = ahci_shost_attrs, \
.sdev_attrs = ahci_sdev_attrs
-extern struct ata_port_operations ahci_ops;
+extern const struct ata_port_operations ahci_ops;
- void ahci_save_initial_config(struct device *dev,
- struct ahci_host_priv *hpriv,
-diff -urNp linux-2.6.37.2/drivers/ata/ata_generic.c linux-2.6.37.2/drivers/ata/ata_generic.c
---- linux-2.6.37.2/drivers/ata/ata_generic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/ata_generic.c 2011-01-17 02:41:01.000000000 -0500
+ void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag,
+ u32 opts);
+diff -urNp linux-2.6.38.1/drivers/ata/ata_generic.c linux-2.6.38.1/drivers/ata/ata_generic.c
+--- linux-2.6.38.1/drivers/ata/ata_generic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/ata_generic.c 2011-03-21 18:31:35.000000000 -0400
@@ -101,7 +101,7 @@ static struct scsi_host_template generic
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_mode = generic_set_mode,
-diff -urNp linux-2.6.37.2/drivers/ata/ata_piix.c linux-2.6.37.2/drivers/ata/ata_piix.c
---- linux-2.6.37.2/drivers/ata/ata_piix.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/ata_piix.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/ata_piix.c linux-2.6.38.1/drivers/ata/ata_piix.c
+--- linux-2.6.38.1/drivers/ata/ata_piix.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/ata_piix.c 2011-03-21 18:31:35.000000000 -0400
@@ -309,7 +309,7 @@ static const struct pci_device_id piix_p
{ 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (PBG) */
};
static const char *oemstrs[] = {
"Tecra M3,",
-diff -urNp linux-2.6.37.2/drivers/ata/libahci.c linux-2.6.37.2/drivers/ata/libahci.c
---- linux-2.6.37.2/drivers/ata/libahci.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/libahci.c 2011-01-17 02:41:01.000000000 -0500
-@@ -140,7 +140,7 @@ struct device_attribute *ahci_sdev_attrs
+diff -urNp linux-2.6.38.1/drivers/ata/libahci.c linux-2.6.38.1/drivers/ata/libahci.c
+--- linux-2.6.38.1/drivers/ata/libahci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/libahci.c 2011-03-21 18:31:35.000000000 -0400
+@@ -137,7 +137,7 @@ struct device_attribute *ahci_sdev_attrs
};
EXPORT_SYMBOL_GPL(ahci_sdev_attrs);
.inherits = &sata_pmp_port_ops,
.qc_defer = ahci_pmp_qc_defer,
-diff -urNp linux-2.6.37.2/drivers/ata/libata-acpi.c linux-2.6.37.2/drivers/ata/libata-acpi.c
---- linux-2.6.37.2/drivers/ata/libata-acpi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/libata-acpi.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/libata-acpi.c linux-2.6.38.1/drivers/ata/libata-acpi.c
+--- linux-2.6.38.1/drivers/ata/libata-acpi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/libata-acpi.c 2011-03-21 18:31:35.000000000 -0400
@@ -218,12 +218,12 @@ static void ata_acpi_dev_uevent(acpi_han
ata_acpi_uevent(dev->link->ap, dev, event);
}
.handler = ata_acpi_ap_notify_dock,
.uevent = ata_acpi_ap_uevent,
};
-diff -urNp linux-2.6.37.2/drivers/ata/libata-core.c linux-2.6.37.2/drivers/ata/libata-core.c
---- linux-2.6.37.2/drivers/ata/libata-core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/libata-core.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/libata-core.c linux-2.6.38.1/drivers/ata/libata-core.c
+--- linux-2.6.38.1/drivers/ata/libata-core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/libata-core.c 2011-03-21 18:31:35.000000000 -0400
@@ -897,7 +897,7 @@ static const struct ata_xfer_ent {
{ ATA_SHIFT_PIO, ATA_NR_PIO_MODES, XFER_PIO_0 },
{ ATA_SHIFT_MWDMA, ATA_NR_MWDMA_MODES, XFER_MW_DMA_0 },
};
#define ENOUGH(v, unit) (((v)-1)/(unit)+1)
-@@ -4140,7 +4140,7 @@ static const struct ata_blacklist_entry
- { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
+@@ -4141,7 +4141,7 @@ static const struct ata_blacklist_entry
+ { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER },
/* End Marker */
- { }
};
/**
-@@ -4745,7 +4745,7 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -4746,7 +4746,7 @@ void ata_qc_free(struct ata_queued_cmd *
struct ata_port *ap;
unsigned int tag;
ap = qc->ap;
qc->flags = 0;
-@@ -4761,7 +4761,7 @@ void __ata_qc_complete(struct ata_queued
+@@ -4762,7 +4762,7 @@ void __ata_qc_complete(struct ata_queued
struct ata_port *ap;
struct ata_link *link;
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;
-@@ -5754,7 +5754,7 @@ static void ata_host_stop(struct device
+@@ -5755,7 +5755,7 @@ static void ata_host_stop(struct device
* LOCKING:
* None.
*/
{
static DEFINE_SPINLOCK(lock);
const struct ata_port_operations *cur;
-@@ -5766,6 +5766,7 @@ static void ata_finalize_port_ops(struct
+@@ -5767,6 +5767,7 @@ static void ata_finalize_port_ops(struct
return;
spin_lock(&lock);
for (cur = ops->inherits; cur; cur = cur->inherits) {
void **inherit = (void **)cur;
-@@ -5779,8 +5780,9 @@ static void ata_finalize_port_ops(struct
+@@ -5780,8 +5781,9 @@ static void ata_finalize_port_ops(struct
if (IS_ERR(*pp))
*pp = NULL;
spin_unlock(&lock);
}
-@@ -5877,7 +5879,7 @@ int ata_host_start(struct ata_host *host
+@@ -5878,7 +5880,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,
{
spin_lock_init(&host->lock);
mutex_init(&host->eh_mutex);
-@@ -6583,7 +6585,7 @@ static void ata_dummy_error_handler(stru
+@@ -6584,7 +6586,7 @@ static void ata_dummy_error_handler(stru
/* truly dummy */
}
.qc_prep = ata_noop_qc_prep,
.qc_issue = ata_dummy_qc_issue,
.error_handler = ata_dummy_error_handler,
-diff -urNp linux-2.6.37.2/drivers/ata/libata-eh.c linux-2.6.37.2/drivers/ata/libata-eh.c
---- linux-2.6.37.2/drivers/ata/libata-eh.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/libata-eh.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/libata-eh.c linux-2.6.38.1/drivers/ata/libata-eh.c
+--- linux-2.6.38.1/drivers/ata/libata-eh.c 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/libata-eh.c 2011-03-23 17:21:49.000000000 -0400
@@ -3880,7 +3880,7 @@ void ata_do_eh(struct ata_port *ap, ata_
*/
void ata_std_error_handler(struct ata_port *ap)
ata_reset_fn_t hardreset = ops->hardreset;
/* ignore built-in hardreset if SCR access is not available */
-diff -urNp linux-2.6.37.2/drivers/ata/libata-pmp.c linux-2.6.37.2/drivers/ata/libata-pmp.c
---- linux-2.6.37.2/drivers/ata/libata-pmp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/libata-pmp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/libata-pmp.c linux-2.6.38.1/drivers/ata/libata-pmp.c
+--- linux-2.6.38.1/drivers/ata/libata-pmp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/libata-pmp.c 2011-03-21 18:31:35.000000000 -0400
@@ -912,7 +912,7 @@ static int sata_pmp_handle_link_fail(str
*/
static int sata_pmp_eh_recover(struct ata_port *ap)
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.37.2/drivers/ata/pata_acpi.c linux-2.6.37.2/drivers/ata/pata_acpi.c
---- linux-2.6.37.2/drivers/ata/pata_acpi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_acpi.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_acpi.c linux-2.6.38.1/drivers/ata/pata_acpi.c
+--- linux-2.6.38.1/drivers/ata/pata_acpi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_acpi.c 2011-03-21 18:31:35.000000000 -0400
@@ -216,7 +216,7 @@ static struct scsi_host_template pacpi_s
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.qc_issue = pacpi_qc_issue,
.cable_detect = pacpi_cable_detect,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_ali.c linux-2.6.37.2/drivers/ata/pata_ali.c
---- linux-2.6.37.2/drivers/ata/pata_ali.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_ali.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_ali.c linux-2.6.38.1/drivers/ata/pata_ali.c
+--- linux-2.6.38.1/drivers/ata/pata_ali.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_ali.c 2011-03-21 18:31:35.000000000 -0400
@@ -363,7 +363,7 @@ static struct scsi_host_template ali_sht
* Port operations for PIO only ALi
*/
.inherits = &ali_dma_base_ops,
.check_atapi_dma = ali_check_atapi_dma,
.dev_config = ali_warn_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_amd.c linux-2.6.37.2/drivers/ata/pata_amd.c
---- linux-2.6.37.2/drivers/ata/pata_amd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_amd.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_amd.c linux-2.6.38.1/drivers/ata/pata_amd.c
+--- linux-2.6.38.1/drivers/ata/pata_amd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_amd.c 2011-03-21 18:31:35.000000000 -0400
@@ -397,28 +397,28 @@ static const struct ata_port_operations
.prereset = amd_pre_reset,
};
.inherits = &nv_base_port_ops,
.set_piomode = nv133_set_piomode,
.set_dmamode = nv133_set_dmamode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_artop.c linux-2.6.37.2/drivers/ata/pata_artop.c
---- linux-2.6.37.2/drivers/ata/pata_artop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_artop.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_artop.c linux-2.6.38.1/drivers/ata/pata_artop.c
+--- linux-2.6.38.1/drivers/ata/pata_artop.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_artop.c 2011-03-21 18:31:35.000000000 -0400
@@ -312,7 +312,7 @@ static struct scsi_host_template artop_s
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = artop6260_cable_detect,
.set_piomode = artop6260_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_at32.c linux-2.6.37.2/drivers/ata/pata_at32.c
---- linux-2.6.37.2/drivers/ata/pata_at32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_at32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_at32.c linux-2.6.38.1/drivers/ata/pata_at32.c
+--- linux-2.6.38.1/drivers/ata/pata_at32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_at32.c 2011-03-21 18:31:35.000000000 -0400
@@ -173,7 +173,7 @@ static struct scsi_host_template at32_sh
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = pata_at32_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_at91.c linux-2.6.37.2/drivers/ata/pata_at91.c
---- linux-2.6.37.2/drivers/ata/pata_at91.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_at91.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_at91.c linux-2.6.38.1/drivers/ata/pata_at91.c
+--- linux-2.6.38.1/drivers/ata/pata_at91.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_at91.c 2011-03-21 18:31:35.000000000 -0400
@@ -196,7 +196,7 @@ static struct scsi_host_template pata_at
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.sff_data_xfer = pata_at91_data_xfer_noirq,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_atiixp.c linux-2.6.37.2/drivers/ata/pata_atiixp.c
---- linux-2.6.37.2/drivers/ata/pata_atiixp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_atiixp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_atiixp.c linux-2.6.38.1/drivers/ata/pata_atiixp.c
+--- linux-2.6.38.1/drivers/ata/pata_atiixp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_atiixp.c 2011-03-21 18:31:35.000000000 -0400
@@ -214,7 +214,7 @@ static struct scsi_host_template atiixp_
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_bmdma_dumb_qc_prep,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_atp867x.c linux-2.6.37.2/drivers/ata/pata_atp867x.c
---- linux-2.6.37.2/drivers/ata/pata_atp867x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_atp867x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_atp867x.c linux-2.6.38.1/drivers/ata/pata_atp867x.c
+--- linux-2.6.38.1/drivers/ata/pata_atp867x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_atp867x.c 2011-03-21 18:31:35.000000000 -0400
@@ -275,7 +275,7 @@ static struct scsi_host_template atp867x
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = atp867x_cable_detect,
.set_piomode = atp867x_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_bf54x.c linux-2.6.37.2/drivers/ata/pata_bf54x.c
---- linux-2.6.37.2/drivers/ata/pata_bf54x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_bf54x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_bf54x.c linux-2.6.38.1/drivers/ata/pata_bf54x.c
+--- linux-2.6.38.1/drivers/ata/pata_bf54x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_bf54x.c 2011-03-21 18:31:35.000000000 -0400
@@ -1420,7 +1420,7 @@ static struct scsi_host_template bfin_sh
.dma_boundary = ATA_DMA_BOUNDARY,
};
.inherits = &ata_bmdma_port_ops,
.set_piomode = bfin_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cmd640.c linux-2.6.37.2/drivers/ata/pata_cmd640.c
---- linux-2.6.37.2/drivers/ata/pata_cmd640.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cmd640.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cmd640.c linux-2.6.38.1/drivers/ata/pata_cmd640.c
+--- linux-2.6.38.1/drivers/ata/pata_cmd640.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cmd640.c 2011-03-21 18:31:35.000000000 -0400
@@ -176,7 +176,7 @@ static struct scsi_host_template cmd640_
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_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.37.2/drivers/ata/pata_cmd64x.c linux-2.6.37.2/drivers/ata/pata_cmd64x.c
---- linux-2.6.37.2/drivers/ata/pata_cmd64x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cmd64x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cmd64x.c linux-2.6.38.1/drivers/ata/pata_cmd64x.c
+--- linux-2.6.38.1/drivers/ata/pata_cmd64x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cmd64x.c 2011-03-21 18:31:35.000000000 -0400
@@ -268,18 +268,18 @@ static const struct ata_port_operations
.set_dmamode = cmd64x_set_dmamode,
};
.inherits = &cmd64x_base_ops,
.bmdma_stop = cmd648_bmdma_stop,
.cable_detect = cmd648_cable_detect,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cs5520.c linux-2.6.37.2/drivers/ata/pata_cs5520.c
---- linux-2.6.37.2/drivers/ata/pata_cs5520.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cs5520.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cs5520.c linux-2.6.38.1/drivers/ata/pata_cs5520.c
+--- linux-2.6.38.1/drivers/ata/pata_cs5520.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cs5520.c 2011-03-21 18:31:35.000000000 -0400
@@ -108,7 +108,7 @@ static struct scsi_host_template cs5520_
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_bmdma_dumb_qc_prep,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cs5530.c linux-2.6.37.2/drivers/ata/pata_cs5530.c
---- linux-2.6.37.2/drivers/ata/pata_cs5530.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cs5530.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cs5530.c linux-2.6.38.1/drivers/ata/pata_cs5530.c
+--- linux-2.6.38.1/drivers/ata/pata_cs5530.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cs5530.c 2011-03-21 18:31:35.000000000 -0400
@@ -164,7 +164,7 @@ static struct scsi_host_template cs5530_
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_bmdma_dumb_qc_prep,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cs5535.c linux-2.6.37.2/drivers/ata/pata_cs5535.c
---- linux-2.6.37.2/drivers/ata/pata_cs5535.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cs5535.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cs5535.c linux-2.6.38.1/drivers/ata/pata_cs5535.c
+--- linux-2.6.38.1/drivers/ata/pata_cs5535.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cs5535.c 2011-03-21 18:31:35.000000000 -0400
@@ -160,7 +160,7 @@ static struct scsi_host_template cs5535_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = cs5535_cable_detect,
.set_piomode = cs5535_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cs5536.c linux-2.6.37.2/drivers/ata/pata_cs5536.c
---- linux-2.6.37.2/drivers/ata/pata_cs5536.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cs5536.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cs5536.c linux-2.6.38.1/drivers/ata/pata_cs5536.c
+--- linux-2.6.38.1/drivers/ata/pata_cs5536.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cs5536.c 2011-03-21 18:31:35.000000000 -0400
@@ -233,7 +233,7 @@ static struct scsi_host_template cs5536_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma32_port_ops,
.cable_detect = cs5536_cable_detect,
.set_piomode = cs5536_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_cypress.c linux-2.6.37.2/drivers/ata/pata_cypress.c
---- linux-2.6.37.2/drivers/ata/pata_cypress.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_cypress.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_cypress.c linux-2.6.38.1/drivers/ata/pata_cypress.c
+--- linux-2.6.38.1/drivers/ata/pata_cypress.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_cypress.c 2011-03-21 18:31:35.000000000 -0400
@@ -115,7 +115,7 @@ static struct scsi_host_template cy82c69
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = cy82c693_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_efar.c linux-2.6.37.2/drivers/ata/pata_efar.c
---- linux-2.6.37.2/drivers/ata/pata_efar.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_efar.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_efar.c linux-2.6.38.1/drivers/ata/pata_efar.c
+--- linux-2.6.38.1/drivers/ata/pata_efar.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_efar.c 2011-03-21 18:31:35.000000000 -0400
@@ -238,7 +238,7 @@ static struct scsi_host_template efar_sh
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = efar_cable_detect,
.set_piomode = efar_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_hpt366.c linux-2.6.37.2/drivers/ata/pata_hpt366.c
---- linux-2.6.37.2/drivers/ata/pata_hpt366.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_hpt366.c 2011-01-17 02:41:01.000000000 -0500
-@@ -269,7 +269,7 @@ static struct scsi_host_template hpt36x_
+diff -urNp linux-2.6.38.1/drivers/ata/pata_hpt366.c linux-2.6.38.1/drivers/ata/pata_hpt366.c
+--- linux-2.6.38.1/drivers/ata/pata_hpt366.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_hpt366.c 2011-03-21 18:31:35.000000000 -0400
+@@ -275,7 +275,7 @@ static struct scsi_host_template hpt36x_
* Configuration for HPT366/68
*/
.inherits = &ata_bmdma_port_ops,
.cable_detect = hpt36x_cable_detect,
.mode_filter = hpt366_filter,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_hpt37x.c linux-2.6.37.2/drivers/ata/pata_hpt37x.c
---- linux-2.6.37.2/drivers/ata/pata_hpt37x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_hpt37x.c 2011-01-17 02:41:01.000000000 -0500
-@@ -564,7 +564,7 @@ static struct scsi_host_template hpt37x_
+diff -urNp linux-2.6.38.1/drivers/ata/pata_hpt37x.c linux-2.6.38.1/drivers/ata/pata_hpt37x.c
+--- linux-2.6.38.1/drivers/ata/pata_hpt37x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_hpt37x.c 2011-03-21 18:31:35.000000000 -0400
+@@ -587,7 +587,7 @@ static struct scsi_host_template hpt37x_
* Configuration for HPT370
*/
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt370_bmdma_stop,
-@@ -580,7 +580,7 @@ static struct ata_port_operations hpt370
+@@ -603,7 +603,7 @@ static struct ata_port_operations hpt370
* Configuration for HPT370A. Close to 370 but less filters
*/
.inherits = &hpt370_port_ops,
.mode_filter = hpt370a_filter,
};
-@@ -590,7 +590,7 @@ static struct ata_port_operations hpt370
- * and DMA mode setting functionality.
+@@ -613,7 +613,7 @@ static struct ata_port_operations hpt370
+ * mode setting functionality.
*/
--static struct ata_port_operations hpt372_port_ops = {
-+static const struct ata_port_operations hpt372_port_ops = {
+-static struct ata_port_operations hpt302_port_ops = {
++static const struct ata_port_operations hpt302_port_ops = {
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt37x_bmdma_stop,
-@@ -606,7 +606,7 @@ static struct ata_port_operations hpt372
+@@ -629,7 +629,7 @@ static struct ata_port_operations hpt302
+ * but we have a mode filter.
+ */
+
+-static struct ata_port_operations hpt372_port_ops = {
++static const struct ata_port_operations hpt372_port_ops = {
+ .inherits = &hpt302_port_ops,
+ .mode_filter = hpt372_filter,
+ };
+@@ -639,7 +639,7 @@ static struct ata_port_operations hpt372
* but we have a different cable detection procedure for function 1.
*/
+static const struct ata_port_operations hpt374_fn1_port_ops = {
.inherits = &hpt372_port_ops,
.cable_detect = hpt374_fn1_cable_detect,
- .prereset = hpt37x_pre_reset,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_hpt3x2n.c linux-2.6.37.2/drivers/ata/pata_hpt3x2n.c
---- linux-2.6.37.2/drivers/ata/pata_hpt3x2n.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_hpt3x2n.c 2011-01-17 02:41:01.000000000 -0500
-@@ -331,7 +331,7 @@ static struct scsi_host_template hpt3x2n
- * Configuration for HPT3x2n.
+ };
+diff -urNp linux-2.6.38.1/drivers/ata/pata_hpt3x2n.c linux-2.6.38.1/drivers/ata/pata_hpt3x2n.c
+--- linux-2.6.38.1/drivers/ata/pata_hpt3x2n.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_hpt3x2n.c 2011-03-21 18:31:35.000000000 -0400
+@@ -348,7 +348,7 @@ static struct scsi_host_template hpt3x2n
+ * Configuration for HPT302N/371N.
*/
--static struct ata_port_operations hpt3x2n_port_ops = {
-+static const struct ata_port_operations hpt3x2n_port_ops = {
+-static struct ata_port_operations hpt3xxn_port_ops = {
++static const struct ata_port_operations hpt3xxn_port_ops = {
.inherits = &ata_bmdma_port_ops,
.bmdma_stop = hpt3x2n_bmdma_stop,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_hpt3x3.c linux-2.6.37.2/drivers/ata/pata_hpt3x3.c
---- linux-2.6.37.2/drivers/ata/pata_hpt3x3.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_hpt3x3.c 2011-01-17 02:41:01.000000000 -0500
+@@ -366,7 +366,7 @@ static struct ata_port_operations hpt3xx
+ * Configuration for HPT372N. Same as 302N/371N but we have a mode filter.
+ */
+
+-static struct ata_port_operations hpt372n_port_ops = {
++static const struct ata_port_operations hpt372n_port_ops = {
+ .inherits = &hpt3xxn_port_ops,
+ .mode_filter = &hpt372n_filter,
+ };
+diff -urNp linux-2.6.38.1/drivers/ata/pata_hpt3x3.c linux-2.6.38.1/drivers/ata/pata_hpt3x3.c
+--- linux-2.6.38.1/drivers/ata/pata_hpt3x3.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_hpt3x3.c 2011-03-21 18:31:35.000000000 -0400
@@ -141,7 +141,7 @@ static struct scsi_host_template hpt3x3_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = hpt3x3_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_icside.c linux-2.6.37.2/drivers/ata/pata_icside.c
---- linux-2.6.37.2/drivers/ata/pata_icside.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_icside.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_icside.c linux-2.6.38.1/drivers/ata/pata_icside.c
+--- linux-2.6.38.1/drivers/ata/pata_icside.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_icside.c 2011-03-21 18:31:35.000000000 -0400
@@ -320,7 +320,7 @@ static void pata_icside_postreset(struct
}
}
.inherits = &ata_bmdma_port_ops,
/* no need to build any PRD tables for DMA */
.qc_prep = ata_noop_qc_prep,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_isapnp.c linux-2.6.37.2/drivers/ata/pata_isapnp.c
---- linux-2.6.37.2/drivers/ata/pata_isapnp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_isapnp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_isapnp.c linux-2.6.38.1/drivers/ata/pata_isapnp.c
+--- linux-2.6.38.1/drivers/ata/pata_isapnp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_isapnp.c 2011-03-21 18:31:35.000000000 -0400
@@ -23,12 +23,12 @@ static struct scsi_host_template isapnp_
ATA_PIO_SHT(DRV_NAME),
};
.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.37.2/drivers/ata/pata_it8213.c linux-2.6.37.2/drivers/ata/pata_it8213.c
---- linux-2.6.37.2/drivers/ata/pata_it8213.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_it8213.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_it8213.c linux-2.6.38.1/drivers/ata/pata_it8213.c
+--- linux-2.6.38.1/drivers/ata/pata_it8213.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_it8213.c 2011-03-21 18:31:35.000000000 -0400
@@ -233,7 +233,7 @@ static struct scsi_host_template it8213_
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = it8213_cable_detect,
.set_piomode = it8213_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_it821x.c linux-2.6.37.2/drivers/ata/pata_it821x.c
---- linux-2.6.37.2/drivers/ata/pata_it821x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_it821x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_it821x.c linux-2.6.38.1/drivers/ata/pata_it821x.c
+--- linux-2.6.38.1/drivers/ata/pata_it821x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_it821x.c 2011-03-21 18:31:35.000000000 -0400
@@ -801,7 +801,7 @@ static struct scsi_host_template it821x_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.check_atapi_dma= it821x_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_ixp4xx_cf.c linux-2.6.37.2/drivers/ata/pata_ixp4xx_cf.c
---- linux-2.6.37.2/drivers/ata/pata_ixp4xx_cf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_ixp4xx_cf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_ixp4xx_cf.c linux-2.6.38.1/drivers/ata/pata_ixp4xx_cf.c
+--- linux-2.6.38.1/drivers/ata/pata_ixp4xx_cf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_ixp4xx_cf.c 2011-03-21 18:31:35.000000000 -0400
@@ -89,7 +89,7 @@ static struct scsi_host_template ixp4xx_
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ixp4xx_mmio_data_xfer,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_jmicron.c linux-2.6.37.2/drivers/ata/pata_jmicron.c
---- linux-2.6.37.2/drivers/ata/pata_jmicron.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_jmicron.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_jmicron.c linux-2.6.38.1/drivers/ata/pata_jmicron.c
+--- linux-2.6.38.1/drivers/ata/pata_jmicron.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_jmicron.c 2011-03-21 18:31:35.000000000 -0400
@@ -111,7 +111,7 @@ static struct scsi_host_template jmicron
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.prereset = jmicron_pre_reset,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pata_legacy.c linux-2.6.37.2/drivers/ata/pata_legacy.c
---- linux-2.6.37.2/drivers/ata/pata_legacy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_legacy.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_legacy.c linux-2.6.38.1/drivers/ata/pata_legacy.c
+--- linux-2.6.38.1/drivers/ata/pata_legacy.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_legacy.c 2011-03-21 18:31:35.000000000 -0400
@@ -116,7 +116,7 @@ struct legacy_probe {
struct legacy_controller {
struct legacy_data *ld = &legacy_data[probe->slot];
struct ata_host *host = NULL;
struct ata_port *ap;
-diff -urNp linux-2.6.37.2/drivers/ata/pata_macio.c linux-2.6.37.2/drivers/ata/pata_macio.c
---- linux-2.6.37.2/drivers/ata/pata_macio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_macio.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_macio.c linux-2.6.38.1/drivers/ata/pata_macio.c
+--- linux-2.6.38.1/drivers/ata/pata_macio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_macio.c 2011-03-21 18:31:35.000000000 -0400
@@ -918,9 +918,8 @@ static struct scsi_host_template pata_ma
.slave_configure = pata_macio_slave_config,
};
.freeze = pata_macio_freeze,
.set_piomode = pata_macio_set_timings,
.set_dmamode = pata_macio_set_timings,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_marvell.c linux-2.6.37.2/drivers/ata/pata_marvell.c
---- linux-2.6.37.2/drivers/ata/pata_marvell.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_marvell.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_marvell.c linux-2.6.38.1/drivers/ata/pata_marvell.c
+--- linux-2.6.38.1/drivers/ata/pata_marvell.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_marvell.c 2011-03-21 18:31:35.000000000 -0400
@@ -100,7 +100,7 @@ static struct scsi_host_template marvell
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = marvell_cable_detect,
.prereset = marvell_pre_reset,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_mpc52xx.c linux-2.6.37.2/drivers/ata/pata_mpc52xx.c
---- linux-2.6.37.2/drivers/ata/pata_mpc52xx.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_mpc52xx.c 2011-02-22 16:12:20.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_mpc52xx.c linux-2.6.38.1/drivers/ata/pata_mpc52xx.c
+--- linux-2.6.38.1/drivers/ata/pata_mpc52xx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_mpc52xx.c 2011-03-21 18:31:35.000000000 -0400
@@ -609,7 +609,7 @@ static struct scsi_host_template mpc52xx
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.sff_dev_select = mpc52xx_ata_dev_select,
.set_piomode = mpc52xx_ata_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_mpiix.c linux-2.6.37.2/drivers/ata/pata_mpiix.c
---- linux-2.6.37.2/drivers/ata/pata_mpiix.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_mpiix.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_mpiix.c linux-2.6.38.1/drivers/ata/pata_mpiix.c
+--- linux-2.6.38.1/drivers/ata/pata_mpiix.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_mpiix.c 2011-03-21 18:31:35.000000000 -0400
@@ -140,7 +140,7 @@ static struct scsi_host_template mpiix_s
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.qc_issue = mpiix_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_netcell.c linux-2.6.37.2/drivers/ata/pata_netcell.c
---- linux-2.6.37.2/drivers/ata/pata_netcell.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_netcell.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_netcell.c linux-2.6.38.1/drivers/ata/pata_netcell.c
+--- linux-2.6.38.1/drivers/ata/pata_netcell.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_netcell.c 2011-03-21 18:31:35.000000000 -0400
@@ -34,7 +34,7 @@ static struct scsi_host_template netcell
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_80wire,
.read_id = netcell_read_id,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_ninja32.c linux-2.6.37.2/drivers/ata/pata_ninja32.c
---- linux-2.6.37.2/drivers/ata/pata_ninja32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_ninja32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_ninja32.c linux-2.6.38.1/drivers/ata/pata_ninja32.c
+--- linux-2.6.38.1/drivers/ata/pata_ninja32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_ninja32.c 2011-03-21 18:31:35.000000000 -0400
@@ -81,7 +81,7 @@ static struct scsi_host_template ninja32
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.sff_dev_select = ninja32_dev_select,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_ns87410.c linux-2.6.37.2/drivers/ata/pata_ns87410.c
---- linux-2.6.37.2/drivers/ata/pata_ns87410.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_ns87410.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_ns87410.c linux-2.6.38.1/drivers/ata/pata_ns87410.c
+--- linux-2.6.38.1/drivers/ata/pata_ns87410.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_ns87410.c 2011-03-21 18:31:35.000000000 -0400
@@ -132,7 +132,7 @@ static struct scsi_host_template ns87410
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.qc_issue = ns87410_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_ns87415.c linux-2.6.37.2/drivers/ata/pata_ns87415.c
---- linux-2.6.37.2/drivers/ata/pata_ns87415.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_ns87415.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_ns87415.c linux-2.6.38.1/drivers/ata/pata_ns87415.c
+--- linux-2.6.38.1/drivers/ata/pata_ns87415.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_ns87415.c 2011-03-21 18:31:35.000000000 -0400
@@ -299,7 +299,7 @@ static u8 ns87560_bmdma_status(struct at
}
#endif /* 87560 SuperIO Support */
.inherits = &ns87415_pata_ops,
.sff_tf_read = ns87560_tf_read,
.sff_check_status = ns87560_check_status,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_octeon_cf.c linux-2.6.37.2/drivers/ata/pata_octeon_cf.c
---- linux-2.6.37.2/drivers/ata/pata_octeon_cf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_octeon_cf.c 2011-01-17 02:41:01.000000000 -0500
-@@ -780,6 +780,7 @@ static unsigned int octeon_cf_qc_issue(s
+diff -urNp linux-2.6.38.1/drivers/ata/pata_octeon_cf.c linux-2.6.38.1/drivers/ata/pata_octeon_cf.c
+--- linux-2.6.38.1/drivers/ata/pata_octeon_cf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_octeon_cf.c 2011-03-21 18:31:35.000000000 -0400
+@@ -780,7 +780,7 @@ static unsigned int octeon_cf_qc_issue(s
return 0;
}
-+/* cannot be const */
- static struct ata_port_operations octeon_cf_ops = {
+-static struct ata_port_operations octeon_cf_ops = {
++static struct ata_port_operations octeon_cf_ops = { /* cannot be const */
.inherits = &ata_sff_port_ops,
.check_atapi_dma = octeon_cf_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_oldpiix.c linux-2.6.37.2/drivers/ata/pata_oldpiix.c
---- linux-2.6.37.2/drivers/ata/pata_oldpiix.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_oldpiix.c 2011-01-17 02:41:01.000000000 -0500
+ .qc_prep = ata_noop_qc_prep,
+diff -urNp linux-2.6.38.1/drivers/ata/pata_oldpiix.c linux-2.6.38.1/drivers/ata/pata_oldpiix.c
+--- linux-2.6.38.1/drivers/ata/pata_oldpiix.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_oldpiix.c 2011-03-21 18:31:35.000000000 -0400
@@ -208,7 +208,7 @@ static struct scsi_host_template oldpiix
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.qc_issue = oldpiix_qc_issue,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_opti.c linux-2.6.37.2/drivers/ata/pata_opti.c
---- linux-2.6.37.2/drivers/ata/pata_opti.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_opti.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_opti.c linux-2.6.38.1/drivers/ata/pata_opti.c
+--- linux-2.6.38.1/drivers/ata/pata_opti.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_opti.c 2011-03-21 18:31:35.000000000 -0400
@@ -152,7 +152,7 @@ static struct scsi_host_template opti_sh
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = opti_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_optidma.c linux-2.6.37.2/drivers/ata/pata_optidma.c
---- linux-2.6.37.2/drivers/ata/pata_optidma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_optidma.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_optidma.c linux-2.6.38.1/drivers/ata/pata_optidma.c
+--- linux-2.6.38.1/drivers/ata/pata_optidma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_optidma.c 2011-03-21 18:31:35.000000000 -0400
@@ -337,7 +337,7 @@ static struct scsi_host_template optidma
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &optidma_port_ops,
.set_piomode = optiplus_set_pio_mode,
.set_dmamode = optiplus_set_dma_mode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_palmld.c linux-2.6.37.2/drivers/ata/pata_palmld.c
---- linux-2.6.37.2/drivers/ata/pata_palmld.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_palmld.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_palmld.c linux-2.6.38.1/drivers/ata/pata_palmld.c
+--- linux-2.6.38.1/drivers/ata/pata_palmld.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_palmld.c 2011-03-21 18:31:35.000000000 -0400
@@ -37,7 +37,7 @@ static struct scsi_host_template palmld_
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_pcmcia.c linux-2.6.37.2/drivers/ata/pata_pcmcia.c
---- linux-2.6.37.2/drivers/ata/pata_pcmcia.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_pcmcia.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_pcmcia.c linux-2.6.38.1/drivers/ata/pata_pcmcia.c
+--- linux-2.6.38.1/drivers/ata/pata_pcmcia.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_pcmcia.c 2011-03-21 18:31:35.000000000 -0400
@@ -151,14 +151,14 @@ static struct scsi_host_template pcmcia_
ATA_PIO_SHT(DRV_NAME),
};
/* Set up attributes in order to probe card and get resources */
pdev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO |
-diff -urNp linux-2.6.37.2/drivers/ata/pata_pdc2027x.c linux-2.6.37.2/drivers/ata/pata_pdc2027x.c
---- linux-2.6.37.2/drivers/ata/pata_pdc2027x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_pdc2027x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_pdc2027x.c linux-2.6.38.1/drivers/ata/pata_pdc2027x.c
+--- linux-2.6.38.1/drivers/ata/pata_pdc2027x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_pdc2027x.c 2011-03-21 18:31:35.000000000 -0400
@@ -132,14 +132,14 @@ static struct scsi_host_template pdc2027
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &pdc2027x_pata100_ops,
.mode_filter = pdc2027x_mode_filter,
.set_piomode = pdc2027x_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_pdc202xx_old.c linux-2.6.37.2/drivers/ata/pata_pdc202xx_old.c
---- linux-2.6.37.2/drivers/ata/pata_pdc202xx_old.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_pdc202xx_old.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_pdc202xx_old.c linux-2.6.38.1/drivers/ata/pata_pdc202xx_old.c
+--- linux-2.6.38.1/drivers/ata/pata_pdc202xx_old.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_pdc202xx_old.c 2011-03-21 18:31:35.000000000 -0400
@@ -295,7 +295,7 @@ static struct scsi_host_template pdc202x
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &pdc2024x_port_ops,
.check_atapi_dma = pdc2026x_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_piccolo.c linux-2.6.37.2/drivers/ata/pata_piccolo.c
---- linux-2.6.37.2/drivers/ata/pata_piccolo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_piccolo.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_piccolo.c linux-2.6.38.1/drivers/ata/pata_piccolo.c
+--- linux-2.6.38.1/drivers/ata/pata_piccolo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_piccolo.c 2011-03-21 18:31:35.000000000 -0400
@@ -67,7 +67,7 @@ static struct scsi_host_template tosh_sh
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_piomode = tosh_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_platform.c linux-2.6.37.2/drivers/ata/pata_platform.c
---- linux-2.6.37.2/drivers/ata/pata_platform.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_platform.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_platform.c linux-2.6.38.1/drivers/ata/pata_platform.c
+--- linux-2.6.38.1/drivers/ata/pata_platform.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_platform.c 2011-03-21 18:31:35.000000000 -0400
@@ -48,7 +48,7 @@ static struct scsi_host_template pata_pl
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
.cable_detect = ata_cable_unknown,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_pxa.c linux-2.6.37.2/drivers/ata/pata_pxa.c
---- linux-2.6.37.2/drivers/ata/pata_pxa.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_pxa.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_pxa.c linux-2.6.38.1/drivers/ata/pata_pxa.c
+--- linux-2.6.38.1/drivers/ata/pata_pxa.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_pxa.c 2011-03-21 18:31:35.000000000 -0400
@@ -198,7 +198,7 @@ static struct scsi_host_template pxa_ata
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_40wire,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_qdi.c linux-2.6.37.2/drivers/ata/pata_qdi.c
---- linux-2.6.37.2/drivers/ata/pata_qdi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_qdi.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_qdi.c linux-2.6.38.1/drivers/ata/pata_qdi.c
+--- linux-2.6.38.1/drivers/ata/pata_qdi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_qdi.c 2011-03-21 18:31:35.000000000 -0400
@@ -157,7 +157,7 @@ static struct scsi_host_template qdi_sht
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &qdi6500_port_ops,
.set_piomode = qdi6580_set_piomode,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pata_radisys.c linux-2.6.37.2/drivers/ata/pata_radisys.c
---- linux-2.6.37.2/drivers/ata/pata_radisys.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_radisys.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_radisys.c linux-2.6.38.1/drivers/ata/pata_radisys.c
+--- linux-2.6.38.1/drivers/ata/pata_radisys.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_radisys.c 2011-03-21 18:31:35.000000000 -0400
@@ -187,7 +187,7 @@ static struct scsi_host_template radisys
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.qc_issue = radisys_qc_issue,
.cable_detect = ata_cable_unknown,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_rb532_cf.c linux-2.6.37.2/drivers/ata/pata_rb532_cf.c
---- linux-2.6.37.2/drivers/ata/pata_rb532_cf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_rb532_cf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_rb532_cf.c linux-2.6.38.1/drivers/ata/pata_rb532_cf.c
+--- linux-2.6.38.1/drivers/ata/pata_rb532_cf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_rb532_cf.c 2011-03-21 18:31:35.000000000 -0400
@@ -69,7 +69,7 @@ static irqreturn_t rb532_pata_irq_handle
return IRQ_HANDLED;
}
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer32,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pata_rdc.c linux-2.6.37.2/drivers/ata/pata_rdc.c
---- linux-2.6.37.2/drivers/ata/pata_rdc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_rdc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_rdc.c linux-2.6.38.1/drivers/ata/pata_rdc.c
+--- linux-2.6.38.1/drivers/ata/pata_rdc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_rdc.c 2011-03-21 18:31:35.000000000 -0400
@@ -273,7 +273,7 @@ static void rdc_set_dmamode(struct ata_p
pci_write_config_byte(dev, 0x48, udma_enable);
}
.inherits = &ata_bmdma32_port_ops,
.cable_detect = rdc_pata_cable_detect,
.set_piomode = rdc_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_rz1000.c linux-2.6.37.2/drivers/ata/pata_rz1000.c
---- linux-2.6.37.2/drivers/ata/pata_rz1000.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_rz1000.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_rz1000.c linux-2.6.38.1/drivers/ata/pata_rz1000.c
+--- linux-2.6.38.1/drivers/ata/pata_rz1000.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_rz1000.c 2011-03-21 18:31:35.000000000 -0400
@@ -54,7 +54,7 @@ static struct scsi_host_template rz1000_
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.cable_detect = ata_cable_40wire,
.set_mode = rz1000_set_mode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_samsung_cf.c linux-2.6.37.2/drivers/ata/pata_samsung_cf.c
---- linux-2.6.37.2/drivers/ata/pata_samsung_cf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_samsung_cf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_samsung_cf.c linux-2.6.38.1/drivers/ata/pata_samsung_cf.c
+--- linux-2.6.38.1/drivers/ata/pata_samsung_cf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_samsung_cf.c 2011-03-21 18:31:35.000000000 -0400
@@ -399,7 +399,7 @@ static struct scsi_host_template pata_s3
ATA_PIO_SHT(DRV_NAME),
};
.inherits = &ata_sff_port_ops,
.set_piomode = pata_s3c_set_piomode,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pata_sc1200.c linux-2.6.37.2/drivers/ata/pata_sc1200.c
---- linux-2.6.37.2/drivers/ata/pata_sc1200.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_sc1200.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_sc1200.c linux-2.6.38.1/drivers/ata/pata_sc1200.c
+--- linux-2.6.38.1/drivers/ata/pata_sc1200.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_sc1200.c 2011-03-21 18:31:35.000000000 -0400
@@ -207,7 +207,7 @@ static struct scsi_host_template sc1200_
.sg_tablesize = LIBATA_DUMB_MAX_PRD,
};
.inherits = &ata_bmdma_port_ops,
.qc_prep = ata_bmdma_dumb_qc_prep,
.qc_issue = sc1200_qc_issue,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_scc.c linux-2.6.37.2/drivers/ata/pata_scc.c
---- linux-2.6.37.2/drivers/ata/pata_scc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_scc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_scc.c linux-2.6.38.1/drivers/ata/pata_scc.c
+--- linux-2.6.38.1/drivers/ata/pata_scc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_scc.c 2011-03-21 18:31:35.000000000 -0400
@@ -926,7 +926,7 @@ static struct scsi_host_template scc_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.set_piomode = scc_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_sch.c linux-2.6.37.2/drivers/ata/pata_sch.c
---- linux-2.6.37.2/drivers/ata/pata_sch.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_sch.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_sch.c linux-2.6.38.1/drivers/ata/pata_sch.c
+--- linux-2.6.38.1/drivers/ata/pata_sch.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_sch.c 2011-03-21 18:31:35.000000000 -0400
@@ -75,7 +75,7 @@ static struct scsi_host_template sch_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_unknown,
.set_piomode = sch_set_piomode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_serverworks.c linux-2.6.37.2/drivers/ata/pata_serverworks.c
---- linux-2.6.37.2/drivers/ata/pata_serverworks.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_serverworks.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_serverworks.c linux-2.6.38.1/drivers/ata/pata_serverworks.c
+--- linux-2.6.38.1/drivers/ata/pata_serverworks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_serverworks.c 2011-03-21 18:31:35.000000000 -0400
@@ -300,7 +300,7 @@ static struct scsi_host_template serverw
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &serverworks_osb4_port_ops,
.mode_filter = serverworks_csb_filter,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pata_sil680.c linux-2.6.37.2/drivers/ata/pata_sil680.c
---- linux-2.6.37.2/drivers/ata/pata_sil680.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_sil680.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_sil680.c linux-2.6.38.1/drivers/ata/pata_sil680.c
+--- linux-2.6.38.1/drivers/ata/pata_sil680.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_sil680.c 2011-03-21 18:31:35.000000000 -0400
@@ -225,8 +225,7 @@ static struct scsi_host_template sil680_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma32_port_ops,
.sff_exec_command = sil680_sff_exec_command,
.sff_irq_check = sil680_sff_irq_check,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_sis.c linux-2.6.37.2/drivers/ata/pata_sis.c
---- linux-2.6.37.2/drivers/ata/pata_sis.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_sis.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_sis.c linux-2.6.38.1/drivers/ata/pata_sis.c
+--- linux-2.6.38.1/drivers/ata/pata_sis.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_sis.c 2011-03-21 18:31:35.000000000 -0400
@@ -503,47 +503,47 @@ static struct scsi_host_template sis_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &sis_base_ops,
.set_piomode = sis_old_set_piomode,
.set_dmamode = sis_old_set_dmamode,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_sl82c105.c linux-2.6.37.2/drivers/ata/pata_sl82c105.c
---- linux-2.6.37.2/drivers/ata/pata_sl82c105.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_sl82c105.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_sl82c105.c linux-2.6.38.1/drivers/ata/pata_sl82c105.c
+--- linux-2.6.38.1/drivers/ata/pata_sl82c105.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_sl82c105.c 2011-03-21 18:31:35.000000000 -0400
@@ -241,7 +241,7 @@ static struct scsi_host_template sl82c10
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.qc_defer = sl82c105_qc_defer,
.bmdma_start = sl82c105_bmdma_start,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_triflex.c linux-2.6.37.2/drivers/ata/pata_triflex.c
---- linux-2.6.37.2/drivers/ata/pata_triflex.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_triflex.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_triflex.c linux-2.6.38.1/drivers/ata/pata_triflex.c
+--- linux-2.6.38.1/drivers/ata/pata_triflex.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_triflex.c 2011-03-21 18:31:35.000000000 -0400
@@ -178,7 +178,7 @@ static struct scsi_host_template triflex
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.bmdma_start = triflex_bmdma_start,
.bmdma_stop = triflex_bmdma_stop,
-diff -urNp linux-2.6.37.2/drivers/ata/pata_via.c linux-2.6.37.2/drivers/ata/pata_via.c
---- linux-2.6.37.2/drivers/ata/pata_via.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pata_via.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pata_via.c linux-2.6.38.1/drivers/ata/pata_via.c
+--- linux-2.6.38.1/drivers/ata/pata_via.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pata_via.c 2011-03-21 18:31:35.000000000 -0400
@@ -441,7 +441,7 @@ static struct scsi_host_template via_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &via_port_ops,
.sff_data_xfer = ata_sff_data_xfer_noirq,
};
-diff -urNp linux-2.6.37.2/drivers/ata/pdc_adma.c linux-2.6.37.2/drivers/ata/pdc_adma.c
---- linux-2.6.37.2/drivers/ata/pdc_adma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/pdc_adma.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/pdc_adma.c linux-2.6.38.1/drivers/ata/pdc_adma.c
+--- linux-2.6.38.1/drivers/ata/pdc_adma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/pdc_adma.c 2011-03-21 18:31:35.000000000 -0400
@@ -146,7 +146,7 @@ static struct scsi_host_template adma_at
.dma_boundary = ADMA_DMA_BOUNDARY,
};
.inherits = &ata_sff_port_ops,
.lost_interrupt = ATA_OP_NULL,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_dwc_460ex.c linux-2.6.37.2/drivers/ata/sata_dwc_460ex.c
---- linux-2.6.37.2/drivers/ata/sata_dwc_460ex.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_dwc_460ex.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_dwc_460ex.c linux-2.6.38.1/drivers/ata/sata_dwc_460ex.c
+--- linux-2.6.38.1/drivers/ata/sata_dwc_460ex.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_dwc_460ex.c 2011-03-21 18:31:35.000000000 -0400
@@ -1560,7 +1560,7 @@ static struct scsi_host_template sata_dw
.dma_boundary = ATA_DMA_BOUNDARY,
};
.inherits = &ata_sff_port_ops,
.error_handler = sata_dwc_error_handler,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_fsl.c linux-2.6.37.2/drivers/ata/sata_fsl.c
---- linux-2.6.37.2/drivers/ata/sata_fsl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_fsl.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_fsl.c linux-2.6.38.1/drivers/ata/sata_fsl.c
+--- linux-2.6.38.1/drivers/ata/sata_fsl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_fsl.c 2011-03-21 18:31:35.000000000 -0400
@@ -1258,7 +1258,7 @@ static struct scsi_host_template sata_fs
.dma_boundary = ATA_DMA_BOUNDARY,
};
.inherits = &sata_pmp_port_ops,
.qc_defer = ata_std_qc_defer,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_inic162x.c linux-2.6.37.2/drivers/ata/sata_inic162x.c
---- linux-2.6.37.2/drivers/ata/sata_inic162x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_inic162x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_inic162x.c linux-2.6.38.1/drivers/ata/sata_inic162x.c
+--- linux-2.6.38.1/drivers/ata/sata_inic162x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_inic162x.c 2011-03-21 18:31:35.000000000 -0400
@@ -705,7 +705,7 @@ static int inic_port_start(struct ata_po
return 0;
}
.inherits = &sata_port_ops,
.check_atapi_dma = inic_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_mv.c linux-2.6.37.2/drivers/ata/sata_mv.c
---- linux-2.6.37.2/drivers/ata/sata_mv.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_mv.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_mv.c linux-2.6.38.1/drivers/ata/sata_mv.c
+--- linux-2.6.38.1/drivers/ata/sata_mv.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_mv.c 2011-03-21 18:31:35.000000000 -0400
@@ -663,7 +663,7 @@ static struct scsi_host_template mv6_sht
.dma_boundary = MV_DMA_BOUNDARY,
};
.inherits = &mv6_ops,
.dev_config = ATA_OP_NULL,
.qc_prep = mv_qc_prep_iie,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_nv.c linux-2.6.37.2/drivers/ata/sata_nv.c
---- linux-2.6.37.2/drivers/ata/sata_nv.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_nv.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_nv.c linux-2.6.38.1/drivers/ata/sata_nv.c
+--- linux-2.6.38.1/drivers/ata/sata_nv.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_nv.c 2011-03-21 18:31:35.000000000 -0400
@@ -465,7 +465,7 @@ static struct scsi_host_template nv_swnc
* cases. Define nv_hardreset() which only kicks in for post-boot
* probing and use it for all variants.
.inherits = &nv_generic_ops,
.qc_defer = ata_std_qc_defer,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_promise.c linux-2.6.37.2/drivers/ata/sata_promise.c
---- linux-2.6.37.2/drivers/ata/sata_promise.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_promise.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_promise.c linux-2.6.38.1/drivers/ata/sata_promise.c
+--- linux-2.6.38.1/drivers/ata/sata_promise.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_promise.c 2011-03-21 18:31:35.000000000 -0400
@@ -196,7 +196,7 @@ static const struct ata_port_operations
.error_handler = pdc_error_handler,
};
.inherits = &pdc_common_ops,
.cable_detect = pdc_pata_cable_detect,
.freeze = pdc_freeze,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_qstor.c linux-2.6.37.2/drivers/ata/sata_qstor.c
---- linux-2.6.37.2/drivers/ata/sata_qstor.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_qstor.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_qstor.c linux-2.6.38.1/drivers/ata/sata_qstor.c
+--- linux-2.6.38.1/drivers/ata/sata_qstor.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_qstor.c 2011-03-21 18:31:35.000000000 -0400
@@ -131,7 +131,7 @@ static struct scsi_host_template qs_ata_
.dma_boundary = QS_DMA_BOUNDARY,
};
.inherits = &ata_sff_port_ops,
.check_atapi_dma = qs_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_sil24.c linux-2.6.37.2/drivers/ata/sata_sil24.c
---- linux-2.6.37.2/drivers/ata/sata_sil24.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_sil24.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_sil24.c linux-2.6.38.1/drivers/ata/sata_sil24.c
+--- linux-2.6.38.1/drivers/ata/sata_sil24.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_sil24.c 2011-03-21 18:31:35.000000000 -0400
@@ -389,7 +389,7 @@ static struct scsi_host_template sil24_s
.dma_boundary = ATA_DMA_BOUNDARY,
};
.inherits = &sata_pmp_port_ops,
.qc_defer = sil24_qc_defer,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_sil.c linux-2.6.37.2/drivers/ata/sata_sil.c
---- linux-2.6.37.2/drivers/ata/sata_sil.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_sil.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_sil.c linux-2.6.38.1/drivers/ata/sata_sil.c
+--- linux-2.6.38.1/drivers/ata/sata_sil.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_sil.c 2011-03-21 18:31:35.000000000 -0400
@@ -182,7 +182,7 @@ static struct scsi_host_template sil_sht
.sg_tablesize = ATA_MAX_PRD
};
.inherits = &ata_bmdma32_port_ops,
.dev_config = sil_dev_config,
.set_mode = sil_set_mode,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_sis.c linux-2.6.37.2/drivers/ata/sata_sis.c
---- linux-2.6.37.2/drivers/ata/sata_sis.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_sis.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_sis.c linux-2.6.38.1/drivers/ata/sata_sis.c
+--- linux-2.6.38.1/drivers/ata/sata_sis.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_sis.c 2011-03-21 18:31:35.000000000 -0400
@@ -89,7 +89,7 @@ static struct scsi_host_template sis_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.scr_read = sis_scr_read,
.scr_write = sis_scr_write,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_svw.c linux-2.6.37.2/drivers/ata/sata_svw.c
---- linux-2.6.37.2/drivers/ata/sata_svw.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_svw.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_svw.c linux-2.6.38.1/drivers/ata/sata_svw.c
+--- linux-2.6.38.1/drivers/ata/sata_svw.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_svw.c 2011-03-21 18:31:35.000000000 -0400
@@ -344,7 +344,7 @@ static struct scsi_host_template k2_sata
};
.inherits = &ata_bmdma_port_ops,
.sff_tf_load = k2_sata_tf_load,
.sff_tf_read = k2_sata_tf_read,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_sx4.c linux-2.6.37.2/drivers/ata/sata_sx4.c
---- linux-2.6.37.2/drivers/ata/sata_sx4.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_sx4.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_sx4.c linux-2.6.38.1/drivers/ata/sata_sx4.c
+--- linux-2.6.38.1/drivers/ata/sata_sx4.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_sx4.c 2011-03-21 18:31:35.000000000 -0400
@@ -249,7 +249,7 @@ static struct scsi_host_template pdc_sat
};
.inherits = &ata_sff_port_ops,
.check_atapi_dma = pdc_check_atapi_dma,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_uli.c linux-2.6.37.2/drivers/ata/sata_uli.c
---- linux-2.6.37.2/drivers/ata/sata_uli.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_uli.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_uli.c linux-2.6.38.1/drivers/ata/sata_uli.c
+--- linux-2.6.38.1/drivers/ata/sata_uli.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_uli.c 2011-03-21 18:31:35.000000000 -0400
@@ -80,7 +80,7 @@ static struct scsi_host_template uli_sht
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.scr_read = uli_scr_read,
.scr_write = uli_scr_write,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_via.c linux-2.6.37.2/drivers/ata/sata_via.c
---- linux-2.6.37.2/drivers/ata/sata_via.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_via.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_via.c linux-2.6.38.1/drivers/ata/sata_via.c
+--- linux-2.6.38.1/drivers/ata/sata_via.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_via.c 2011-03-21 18:31:35.000000000 -0400
@@ -115,32 +115,32 @@ static struct scsi_host_template svia_sh
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &svia_base_ops,
.hardreset = sata_std_hardreset,
.scr_read = vt8251_scr_read,
-diff -urNp linux-2.6.37.2/drivers/ata/sata_vsc.c linux-2.6.37.2/drivers/ata/sata_vsc.c
---- linux-2.6.37.2/drivers/ata/sata_vsc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ata/sata_vsc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ata/sata_vsc.c linux-2.6.38.1/drivers/ata/sata_vsc.c
+--- linux-2.6.38.1/drivers/ata/sata_vsc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ata/sata_vsc.c 2011-03-21 18:31:35.000000000 -0400
@@ -300,7 +300,7 @@ static struct scsi_host_template vsc_sat
};
.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.37.2/drivers/atm/adummy.c linux-2.6.37.2/drivers/atm/adummy.c
---- linux-2.6.37.2/drivers/atm/adummy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/adummy.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/adummy.c linux-2.6.38.1/drivers/atm/adummy.c
+--- linux-2.6.38.1/drivers/atm/adummy.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/adummy.c 2011-03-21 18:31:35.000000000 -0400
@@ -114,7 +114,7 @@ adummy_send(struct atm_vcc *vcc, struct
vcc->pop(vcc, skb);
else
return 0;
}
-diff -urNp linux-2.6.37.2/drivers/atm/ambassador.c linux-2.6.37.2/drivers/atm/ambassador.c
---- linux-2.6.37.2/drivers/atm/ambassador.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/ambassador.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/ambassador.c linux-2.6.38.1/drivers/atm/ambassador.c
+--- linux-2.6.38.1/drivers/atm/ambassador.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/ambassador.c 2011-03-21 18:31:35.000000000 -0400
@@ -454,7 +454,7 @@ static void tx_complete (amb_dev * dev,
PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx);
return -ENOMEM; // ?
}
-diff -urNp linux-2.6.37.2/drivers/atm/atmtcp.c linux-2.6.37.2/drivers/atm/atmtcp.c
---- linux-2.6.37.2/drivers/atm/atmtcp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/atmtcp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/atmtcp.c linux-2.6.38.1/drivers/atm/atmtcp.c
+--- linux-2.6.38.1/drivers/atm/atmtcp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/atmtcp.c 2011-03-21 18:31:35.000000000 -0400
@@ -207,7 +207,7 @@ static int atmtcp_v_send(struct atm_vcc
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
done:
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb(skb);
-diff -urNp linux-2.6.37.2/drivers/atm/eni.c linux-2.6.37.2/drivers/atm/eni.c
---- linux-2.6.37.2/drivers/atm/eni.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/eni.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/eni.c linux-2.6.38.1/drivers/atm/eni.c
+--- linux-2.6.38.1/drivers/atm/eni.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/eni.c 2011-03-21 18:31:35.000000000 -0400
@@ -526,7 +526,7 @@ static int rx_aal0(struct atm_vcc *vcc)
DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
vcc->dev->number);
wake_up(&eni_dev->tx_wait);
dma_complete++;
}
-diff -urNp linux-2.6.37.2/drivers/atm/firestream.c linux-2.6.37.2/drivers/atm/firestream.c
---- linux-2.6.37.2/drivers/atm/firestream.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/firestream.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/firestream.c linux-2.6.38.1/drivers/atm/firestream.c
+--- linux-2.6.38.1/drivers/atm/firestream.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/firestream.c 2011-03-21 18:31:35.000000000 -0400
@@ -749,7 +749,7 @@ static void process_txdone_queue (struct
}
}
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.37.2/drivers/atm/fore200e.c linux-2.6.37.2/drivers/atm/fore200e.c
---- linux-2.6.37.2/drivers/atm/fore200e.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/fore200e.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/fore200e.c linux-2.6.38.1/drivers/atm/fore200e.c
+--- linux-2.6.38.1/drivers/atm/fore200e.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/fore200e.c 2011-03-21 18:31:35.000000000 -0400
@@ -933,9 +933,9 @@ fore200e_tx_irq(struct fore200e* fore200
#endif
/* check error condition */
fore200e->tx_sat++;
DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
-diff -urNp linux-2.6.37.2/drivers/atm/he.c linux-2.6.37.2/drivers/atm/he.c
---- linux-2.6.37.2/drivers/atm/he.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/he.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/he.c linux-2.6.38.1/drivers/atm/he.c
+--- linux-2.6.38.1/drivers/atm/he.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/he.c 2011-03-21 18:31:35.000000000 -0400
@@ -1709,7 +1709,7 @@ he_service_rbrq(struct he_dev *he_dev, i
if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
return 0;
}
-diff -urNp linux-2.6.37.2/drivers/atm/horizon.c linux-2.6.37.2/drivers/atm/horizon.c
---- linux-2.6.37.2/drivers/atm/horizon.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/horizon.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/horizon.c linux-2.6.38.1/drivers/atm/horizon.c
+--- linux-2.6.38.1/drivers/atm/horizon.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/horizon.c 2011-03-21 18:31:35.000000000 -0400
@@ -1034,7 +1034,7 @@ static void rx_schedule (hrz_dev * dev,
{
struct atm_vcc * vcc = ATM_SKB(skb)->vcc;
// free the skb
hrz_kfree_skb (skb);
-diff -urNp linux-2.6.37.2/drivers/atm/idt77252.c linux-2.6.37.2/drivers/atm/idt77252.c
---- linux-2.6.37.2/drivers/atm/idt77252.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/idt77252.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/idt77252.c linux-2.6.38.1/drivers/atm/idt77252.c
+--- linux-2.6.38.1/drivers/atm/idt77252.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/idt77252.c 2011-03-21 18:31:35.000000000 -0400
@@ -811,7 +811,7 @@ drain_scq(struct idt77252_dev *card, str
else
dev_kfree_skb(skb);
return -ENOMEM;
}
atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-diff -urNp linux-2.6.37.2/drivers/atm/iphase.c linux-2.6.37.2/drivers/atm/iphase.c
---- linux-2.6.37.2/drivers/atm/iphase.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/iphase.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/iphase.c linux-2.6.38.1/drivers/atm/iphase.c
+--- linux-2.6.38.1/drivers/atm/iphase.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/iphase.c 2011-03-21 18:31:35.000000000 -0400
@@ -1124,7 +1124,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))
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.37.2/drivers/atm/lanai.c linux-2.6.37.2/drivers/atm/lanai.c
---- linux-2.6.37.2/drivers/atm/lanai.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/lanai.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/lanai.c linux-2.6.38.1/drivers/atm/lanai.c
+--- linux-2.6.38.1/drivers/atm/lanai.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/lanai.c 2011-03-21 18:31:35.000000000 -0400
@@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct l
vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0);
lanai_endtx(lanai, lvcc);
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.37.2/drivers/atm/nicstar.c linux-2.6.37.2/drivers/atm/nicstar.c
---- linux-2.6.37.2/drivers/atm/nicstar.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/nicstar.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/nicstar.c linux-2.6.38.1/drivers/atm/nicstar.c
+--- linux-2.6.38.1/drivers/atm/nicstar.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/nicstar.c 2011-03-21 18:31:35.000000000 -0400
@@ -1654,7 +1654,7 @@ static int ns_send(struct atm_vcc *vcc,
if ((vc = (vc_map *) vcc->dev_data) == NULL) {
printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n",
}
}
-diff -urNp linux-2.6.37.2/drivers/atm/solos-pci.c linux-2.6.37.2/drivers/atm/solos-pci.c
---- linux-2.6.37.2/drivers/atm/solos-pci.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/solos-pci.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/solos-pci.c linux-2.6.38.1/drivers/atm/solos-pci.c
+--- linux-2.6.38.1/drivers/atm/solos-pci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/solos-pci.c 2011-03-21 18:31:35.000000000 -0400
@@ -717,7 +717,7 @@ void solos_bh(unsigned long card_arg)
}
atm_charge(vcc, skb->truesize);
break;
case PKT_STATUS:
-@@ -1025,7 +1025,7 @@ static uint32_t fpga_tx(struct solos_car
+@@ -1026,7 +1026,7 @@ static uint32_t fpga_tx(struct solos_car
vcc = SKB_CB(oldskb)->vcc;
if (vcc) {
solos_pop(vcc, oldskb);
} else
dev_kfree_skb_irq(oldskb);
-diff -urNp linux-2.6.37.2/drivers/atm/suni.c linux-2.6.37.2/drivers/atm/suni.c
---- linux-2.6.37.2/drivers/atm/suni.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/suni.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/suni.c linux-2.6.38.1/drivers/atm/suni.c
+--- linux-2.6.38.1/drivers/atm/suni.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/suni.c 2011-03-21 18:31:35.000000000 -0400
@@ -50,8 +50,8 @@ static DEFINE_SPINLOCK(sunis_lock);
static void suni_hz(unsigned long from_timer)
-diff -urNp linux-2.6.37.2/drivers/atm/uPD98402.c linux-2.6.37.2/drivers/atm/uPD98402.c
---- linux-2.6.37.2/drivers/atm/uPD98402.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/uPD98402.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/uPD98402.c linux-2.6.38.1/drivers/atm/uPD98402.c
+--- linux-2.6.38.1/drivers/atm/uPD98402.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/uPD98402.c 2011-03-21 18:31:35.000000000 -0400
@@ -42,7 +42,7 @@ static int fetch_stats(struct atm_dev *d
struct sonet_stats tmp;
int error = 0;
return 0;
}
-diff -urNp linux-2.6.37.2/drivers/atm/zatm.c linux-2.6.37.2/drivers/atm/zatm.c
---- linux-2.6.37.2/drivers/atm/zatm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/atm/zatm.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/atm/zatm.c linux-2.6.38.1/drivers/atm/zatm.c
+--- linux-2.6.38.1/drivers/atm/zatm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/atm/zatm.c 2011-03-21 18:31:35.000000000 -0400
@@ -459,7 +459,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
}
if (!size) {
wake_up(&zatm_vcc->tx_wait);
}
-diff -urNp linux-2.6.37.2/drivers/block/cciss.c linux-2.6.37.2/drivers/block/cciss.c
---- linux-2.6.37.2/drivers/block/cciss.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/block/cciss.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/block/cciss.c linux-2.6.38.1/drivers/block/cciss.c
+--- linux-2.6.38.1/drivers/block/cciss.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/block/cciss.c 2011-03-21 18:31:35.000000000 -0400
@@ -1112,6 +1112,8 @@ static int cciss_ioctl32_passthru(struct
int err;
u32 cp;
err = 0;
err |=
copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
-diff -urNp linux-2.6.37.2/drivers/char/agp/frontend.c linux-2.6.37.2/drivers/char/agp/frontend.c
---- linux-2.6.37.2/drivers/char/agp/frontend.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/agp/frontend.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/agp/frontend.c linux-2.6.38.1/drivers/char/agp/frontend.c
+--- linux-2.6.38.1/drivers/char/agp/frontend.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/agp/frontend.c 2011-03-21 18:31:35.000000000 -0400
@@ -817,7 +817,7 @@ static int agpioc_reserve_wrap(struct ag
if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
return -EFAULT;
return -EFAULT;
client = agp_find_client_by_pid(reserve.pid);
-diff -urNp linux-2.6.37.2/drivers/char/agp/intel-agp.c linux-2.6.37.2/drivers/char/agp/intel-agp.c
---- linux-2.6.37.2/drivers/char/agp/intel-agp.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/agp/intel-agp.c 2011-02-22 16:05:42.000000000 -0500
-@@ -908,7 +908,7 @@ static struct pci_device_id agp_intel_pc
+diff -urNp linux-2.6.38.1/drivers/char/agp/intel-agp.c linux-2.6.38.1/drivers/char/agp/intel-agp.c
+--- linux-2.6.38.1/drivers/char/agp/intel-agp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/agp/intel-agp.c 2011-03-21 18:31:35.000000000 -0400
+@@ -903,7 +903,7 @@ static struct pci_device_id agp_intel_pc
ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB),
ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB),
ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_HB),
};
MODULE_DEVICE_TABLE(pci, agp_intel_pci_table);
-diff -urNp linux-2.6.37.2/drivers/char/hpet.c linux-2.6.37.2/drivers/char/hpet.c
---- linux-2.6.37.2/drivers/char/hpet.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/hpet.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/hpet.c linux-2.6.38.1/drivers/char/hpet.c
+--- linux-2.6.38.1/drivers/char/hpet.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/hpet.c 2011-03-21 18:31:35.000000000 -0400
@@ -553,7 +553,7 @@ static inline unsigned long hpet_time_di
}
static int __init hpet_init(void)
{
-diff -urNp linux-2.6.37.2/drivers/char/hvc_console.h linux-2.6.37.2/drivers/char/hvc_console.h
---- linux-2.6.37.2/drivers/char/hvc_console.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/hvc_console.h 2011-01-17 02:41:01.000000000 -0500
-@@ -82,6 +82,7 @@ extern int hvc_instantiate(uint32_t vter
- /* register a vterm for hvc tty operation (module_init or hotplug add) */
- extern struct hvc_struct * hvc_alloc(uint32_t vtermno, int data,
- const struct hv_ops *ops, int outbuf_size);
-+
- /* 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.37.2/drivers/char/hvcs.c linux-2.6.37.2/drivers/char/hvcs.c
---- linux-2.6.37.2/drivers/char/hvcs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/hvcs.c 2011-01-25 20:24:56.000000000 -0500
-@@ -83,6 +83,7 @@
- #include <asm/hvcserver.h>
- #include <asm/uaccess.h>
- #include <asm/vio.h>
-+#include <asm/local.h>
-
- /*
- * 1.3.0 -> 1.3.1 In hvcs_open memset(..,0x00,..) instead of memset(..,0x3F,00).
-@@ -270,7 +271,7 @@ struct hvcs_struct {
- unsigned int index;
-
- struct tty_struct *tty;
-- int open_count;
-+ local_t open_count;
-
- /*
- * Used to tell the driver kernel_thread what operations need to take
-@@ -420,7 +421,7 @@ static ssize_t hvcs_vterm_state_store(st
-
- spin_lock_irqsave(&hvcsd->lock, flags);
-
-- if (hvcsd->open_count > 0) {
-+ if (local_read(&hvcsd->open_count) > 0) {
- spin_unlock_irqrestore(&hvcsd->lock, flags);
- printk(KERN_INFO "HVCS: vterm state unchanged. "
- "The hvcs device node is still in use.\n");
-@@ -1136,7 +1137,7 @@ static int hvcs_open(struct tty_struct *
- if ((retval = hvcs_partner_connect(hvcsd)))
- goto error_release;
-
-- hvcsd->open_count = 1;
-+ local_set(&hvcsd->open_count, 1);
- hvcsd->tty = tty;
- tty->driver_data = hvcsd;
-
-@@ -1170,7 +1171,7 @@ fast_open:
-
- spin_lock_irqsave(&hvcsd->lock, flags);
- kref_get(&hvcsd->kref);
-- hvcsd->open_count++;
-+ local_inc(&hvcsd->open_count);
- hvcsd->todo_mask |= HVCS_SCHED_READ;
- spin_unlock_irqrestore(&hvcsd->lock, flags);
-
-@@ -1214,7 +1215,7 @@ static void hvcs_close(struct tty_struct
- hvcsd = tty->driver_data;
-
- spin_lock_irqsave(&hvcsd->lock, flags);
-- if (--hvcsd->open_count == 0) {
-+ if (local_dec_and_test(&hvcsd->open_count)) {
-
- vio_disable_interrupts(hvcsd->vdev);
-
-@@ -1240,10 +1241,10 @@ static void hvcs_close(struct tty_struct
- free_irq(irq, hvcsd);
- kref_put(&hvcsd->kref, destroy_hvcs_struct);
- return;
-- } else if (hvcsd->open_count < 0) {
-+ } else if (local_read(&hvcsd->open_count) < 0) {
- printk(KERN_ERR "HVCS: vty-server@%X open_count: %d"
- " is missmanaged.\n",
-- hvcsd->vdev->unit_address, hvcsd->open_count);
-+ hvcsd->vdev->unit_address, local_read(&hvcsd->open_count));
- }
-
- spin_unlock_irqrestore(&hvcsd->lock, flags);
-@@ -1259,7 +1260,7 @@ static void hvcs_hangup(struct tty_struc
-
- spin_lock_irqsave(&hvcsd->lock, flags);
- /* Preserve this so that we know how many kref refs to put */
-- temp_open_count = hvcsd->open_count;
-+ temp_open_count = local_read(&hvcsd->open_count);
-
- /*
- * Don't kref put inside the spinlock because the destruction
-@@ -1274,7 +1275,7 @@ static void hvcs_hangup(struct tty_struc
- hvcsd->tty->driver_data = NULL;
- hvcsd->tty = NULL;
-
-- hvcsd->open_count = 0;
-+ local_set(&hvcsd->open_count, 0);
-
- /* This will drop any buffered data on the floor which is OK in a hangup
- * scenario. */
-@@ -1345,7 +1346,7 @@ static int hvcs_write(struct tty_struct
- * the middle of a write operation? This is a crummy place to do this
- * but we want to keep it all in the spinlock.
- */
-- if (hvcsd->open_count <= 0) {
-+ if (local_read(&hvcsd->open_count) <= 0) {
- spin_unlock_irqrestore(&hvcsd->lock, flags);
- return -ENODEV;
- }
-@@ -1419,7 +1420,7 @@ static int hvcs_write_room(struct tty_st
- {
- struct hvcs_struct *hvcsd = tty->driver_data;
-
-- if (!hvcsd || hvcsd->open_count <= 0)
-+ if (!hvcsd || local_read(&hvcsd->open_count) <= 0)
- return 0;
-
- return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
-diff -urNp linux-2.6.37.2/drivers/char/hvc_xen.c linux-2.6.37.2/drivers/char/hvc_xen.c
---- linux-2.6.37.2/drivers/char/hvc_xen.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/hvc_xen.c 2011-01-17 02:41:01.000000000 -0500
-@@ -123,7 +123,7 @@ static int domU_read_console(uint32_t vt
- return recv;
- }
-
--static struct hv_ops domU_hvc_ops = {
-+static const struct hv_ops domU_hvc_ops = {
- .get_chars = domU_read_console,
- .put_chars = domU_write_console,
- .notifier_add = notifier_add_irq,
-@@ -149,7 +149,7 @@ static int dom0_write_console(uint32_t v
- return len;
- }
-
--static struct hv_ops dom0_hvc_ops = {
-+static const struct hv_ops dom0_hvc_ops = {
- .get_chars = dom0_read_console,
- .put_chars = dom0_write_console,
- .notifier_add = notifier_add_irq,
-@@ -160,7 +160,7 @@ static struct hv_ops dom0_hvc_ops = {
- static int __init xen_hvc_init(void)
- {
- struct hvc_struct *hp;
-- struct hv_ops *ops;
-+ const struct hv_ops *ops;
-
- if (!xen_pv_domain())
- return -ENODEV;
-@@ -203,7 +203,7 @@ static void __exit xen_hvc_fini(void)
-
- static int xen_cons_init(void)
- {
-- struct hv_ops *ops;
-+ const struct hv_ops *ops;
-
- if (!xen_pv_domain())
- return 0;
-diff -urNp linux-2.6.37.2/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.37.2/drivers/char/ipmi/ipmi_msghandler.c
---- linux-2.6.37.2/drivers/char/ipmi/ipmi_msghandler.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/ipmi/ipmi_msghandler.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.38.1/drivers/char/ipmi/ipmi_msghandler.c
+--- linux-2.6.38.1/drivers/char/ipmi/ipmi_msghandler.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/ipmi/ipmi_msghandler.c 2011-03-21 18:31:35.000000000 -0400
@@ -414,7 +414,7 @@ struct ipmi_smi {
struct proc_dir_entry *proc_dir;
char proc_dir_name[10];
static int is_lan_addr(struct ipmi_addr *addr)
{
-@@ -2817,7 +2817,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
+@@ -2844,7 +2844,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
INIT_LIST_HEAD(&intf->cmd_rcvrs);
init_waitqueue_head(&intf->waitq);
for (i = 0; i < IPMI_NUM_STATS; i++)
intf->proc_dir = NULL;
-diff -urNp linux-2.6.37.2/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.37.2/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.37.2/drivers/char/ipmi/ipmi_si_intf.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/ipmi/ipmi_si_intf.c 2011-02-22 16:05:42.000000000 -0500
-@@ -286,7 +286,7 @@ struct smi_info {
+diff -urNp linux-2.6.38.1/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.38.1/drivers/char/ipmi/ipmi_si_intf.c
+--- linux-2.6.38.1/drivers/char/ipmi/ipmi_si_intf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/ipmi/ipmi_si_intf.c 2011-03-21 18:31:35.000000000 -0400
+@@ -285,7 +285,7 @@ struct smi_info {
unsigned char slave_addr;
/* Counters and things for the proc filesystem. */
#define SI_MAX_PARMS 4
-@@ -3179,7 +3179,7 @@ static int try_smi_init(struct smi_info
+@@ -3202,7 +3202,7 @@ static int try_smi_init(struct smi_info
atomic_set(&new_smi->req_events, 0);
new_smi->run_to_completion = 0;
for (i = 0; i < SI_NUM_STATS; i++)
new_smi->interrupt_disabled = 1;
atomic_set(&new_smi->stop_operation, 0);
-diff -urNp linux-2.6.37.2/drivers/char/mem.c linux-2.6.37.2/drivers/char/mem.c
---- linux-2.6.37.2/drivers/char/mem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/mem.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/mem.c linux-2.6.38.1/drivers/char/mem.c
+--- linux-2.6.38.1/drivers/char/mem.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/mem.c 2011-03-21 18:31:35.000000000 -0400
@@ -18,6 +18,7 @@
#include <linux/raw.h>
#include <linux/tty.h>
};
static int memory_open(struct inode *inode, struct file *filp)
-diff -urNp linux-2.6.37.2/drivers/char/nvram.c linux-2.6.37.2/drivers/char/nvram.c
---- linux-2.6.37.2/drivers/char/nvram.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/nvram.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/nvram.c linux-2.6.38.1/drivers/char/nvram.c
+--- linux-2.6.38.1/drivers/char/nvram.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/nvram.c 2011-03-21 18:31:35.000000000 -0400
@@ -246,7 +246,7 @@ static ssize_t nvram_read(struct file *f
spin_unlock_irq(&rtc_lock);
};
static int __init nvram_init(void)
-diff -urNp linux-2.6.37.2/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.37.2/drivers/char/pcmcia/ipwireless/tty.c
---- linux-2.6.37.2/drivers/char/pcmcia/ipwireless/tty.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/pcmcia/ipwireless/tty.c 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.38.1/drivers/char/pcmcia/ipwireless/tty.c
+--- linux-2.6.38.1/drivers/char/pcmcia/ipwireless/tty.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/pcmcia/ipwireless/tty.c 2011-03-21 18:31:35.000000000 -0400
@@ -29,6 +29,7 @@
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
do_ipw_close(ttyj);
ipwireless_disassociate_network_ttys(network,
ttyj->channel_idx);
-diff -urNp linux-2.6.37.2/drivers/char/random.c linux-2.6.37.2/drivers/char/random.c
---- linux-2.6.37.2/drivers/char/random.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/random.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/random.c linux-2.6.38.1/drivers/char/random.c
+--- linux-2.6.38.1/drivers/char/random.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/random.c 2011-03-21 18:31:35.000000000 -0400
@@ -254,8 +254,13 @@
/*
* Configuration information
static int max_write_thresh = INPUT_POOL_WORDS * 32;
static char sysctl_bootid[16];
-diff -urNp linux-2.6.37.2/drivers/char/sonypi.c linux-2.6.37.2/drivers/char/sonypi.c
---- linux-2.6.37.2/drivers/char/sonypi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/sonypi.c 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/sonypi.c linux-2.6.38.1/drivers/char/sonypi.c
+--- linux-2.6.38.1/drivers/char/sonypi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/sonypi.c 2011-03-21 18:31:35.000000000 -0400
@@ -55,6 +55,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
mutex_unlock(&sonypi_device.lock);
return 0;
-diff -urNp linux-2.6.37.2/drivers/char/tpm/tpm_bios.c linux-2.6.37.2/drivers/char/tpm/tpm_bios.c
---- linux-2.6.37.2/drivers/char/tpm/tpm_bios.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/char/tpm/tpm_bios.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/tpm/tpm_bios.c linux-2.6.38.1/drivers/char/tpm/tpm_bios.c
+--- linux-2.6.38.1/drivers/char/tpm/tpm_bios.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/tpm/tpm_bios.c 2011-03-21 18:31:35.000000000 -0400
@@ -173,7 +173,7 @@ static void *tpm_bios_measurements_start
event = addr;
memcpy(log->bios_event_log, virt, len);
-diff -urNp linux-2.6.37.2/drivers/cpuidle/sysfs.c linux-2.6.37.2/drivers/cpuidle/sysfs.c
---- linux-2.6.37.2/drivers/cpuidle/sysfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/cpuidle/sysfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/char/tpm/tpm.c linux-2.6.38.1/drivers/char/tpm/tpm.c
+--- linux-2.6.38.1/drivers/char/tpm/tpm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/char/tpm/tpm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -411,7 +411,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;
+diff -urNp linux-2.6.38.1/drivers/cpuidle/sysfs.c linux-2.6.38.1/drivers/cpuidle/sysfs.c
+--- linux-2.6.38.1/drivers/cpuidle/sysfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/cpuidle/sysfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -300,7 +300,7 @@ static struct kobj_type ktype_state_cpui
.release = cpuidle_state_sysfs_release,
};
{
kobject_put(&device->kobjs[i]->kobj);
wait_for_completion(&device->kobjs[i]->kobj_unregister);
-diff -urNp linux-2.6.37.2/drivers/edac/edac_core.h linux-2.6.37.2/drivers/edac/edac_core.h
---- linux-2.6.37.2/drivers/edac/edac_core.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/edac/edac_core.h 2011-01-17 02:41:01.000000000 -0500
-@@ -87,11 +87,11 @@ extern const char *edac_mem_types[];
+diff -urNp linux-2.6.38.1/drivers/edac/edac_core.h linux-2.6.38.1/drivers/edac/edac_core.h
+--- linux-2.6.38.1/drivers/edac/edac_core.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/edac/edac_core.h 2011-03-21 18:31:35.000000000 -0400
+@@ -88,11 +88,11 @@ extern int edac_debug_level;
#else /* !CONFIG_EDAC_DEBUG */
#endif /* !CONFIG_EDAC_DEBUG */
-diff -urNp linux-2.6.37.2/drivers/edac/edac_mc_sysfs.c linux-2.6.37.2/drivers/edac/edac_mc_sysfs.c
---- linux-2.6.37.2/drivers/edac/edac_mc_sysfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/edac/edac_mc_sysfs.c 2011-01-17 02:41:01.000000000 -0500
-@@ -762,7 +762,7 @@ static void edac_inst_grp_release(struct
+diff -urNp linux-2.6.38.1/drivers/edac/edac_mc_sysfs.c linux-2.6.38.1/drivers/edac/edac_mc_sysfs.c
+--- linux-2.6.38.1/drivers/edac/edac_mc_sysfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/edac/edac_mc_sysfs.c 2011-03-21 18:31:35.000000000 -0400
+@@ -761,7 +761,7 @@ static void edac_inst_grp_release(struct
}
/* Intermediate show/store table */
.show = inst_grp_show,
.store = inst_grp_store
};
-diff -urNp linux-2.6.37.2/drivers/firewire/core-cdev.c linux-2.6.37.2/drivers/firewire/core-cdev.c
---- linux-2.6.37.2/drivers/firewire/core-cdev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/firewire/core-cdev.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/firewire/core-cdev.c linux-2.6.38.1/drivers/firewire/core-cdev.c
+--- linux-2.6.38.1/drivers/firewire/core-cdev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/firewire/core-cdev.c 2011-03-21 18:31:35.000000000 -0400
@@ -1329,8 +1329,7 @@ static int init_iso_resource(struct clie
int ret;
return -EINVAL;
r = kmalloc(sizeof(*r), GFP_KERNEL);
-diff -urNp linux-2.6.37.2/drivers/firmware/dmi_scan.c linux-2.6.37.2/drivers/firmware/dmi_scan.c
---- linux-2.6.37.2/drivers/firmware/dmi_scan.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/firmware/dmi_scan.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/firmware/dmi_scan.c linux-2.6.38.1/drivers/firmware/dmi_scan.c
+--- linux-2.6.38.1/drivers/firmware/dmi_scan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/firmware/dmi_scan.c 2011-03-21 18:31:35.000000000 -0400
@@ -449,11 +449,6 @@ void __init dmi_scan_machine(void)
}
}
p = dmi_ioremap(0xF0000, 0x10000);
if (p == NULL)
goto error;
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.37.2/drivers/gpu/drm/drm_crtc_helper.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_crtc_helper.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_crtc_helper.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.38.1/drivers/gpu/drm/drm_crtc_helper.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_crtc_helper.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_crtc_helper.c 2011-03-21 18:31:35.000000000 -0400
@@ -276,7 +276,7 @@ static bool drm_encoder_crtc_ok(struct d
struct drm_crtc *tmp;
int crtc_mask = 1;
dev = crtc->dev;
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_drv.c linux-2.6.37.2/drivers/gpu/drm/drm_drv.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_drv.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_drv.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_drv.c linux-2.6.38.1/drivers/gpu/drm/drm_drv.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_drv.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_drv.c 2011-03-21 18:31:35.000000000 -0400
@@ -425,7 +425,7 @@ long drm_ioctl(struct file *filp,
dev = file_priv->minor->dev;
++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.37.2/drivers/gpu/drm/drm_fops.c linux-2.6.37.2/drivers/gpu/drm/drm_fops.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_fops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_fops.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_fops.c linux-2.6.38.1/drivers/gpu/drm/drm_fops.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_fops.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_fops.c 2011-03-21 18:31:35.000000000 -0400
@@ -70,7 +70,7 @@ static int drm_setup(struct drm_device *
}
retcode = drm_setup(dev);
}
if (!retcode) {
-@@ -470,7 +470,7 @@ int drm_release(struct inode *inode, str
+@@ -472,7 +472,7 @@ int drm_release(struct inode *inode, str
mutex_lock(&drm_global_mutex);
if (dev->driver->preclose)
dev->driver->preclose(dev, file_priv);
-@@ -482,7 +482,7 @@ int drm_release(struct inode *inode, str
+@@ -484,7 +484,7 @@ int drm_release(struct inode *inode, str
DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
task_pid_nr(current),
(long)old_encode_dev(file_priv->minor->device),
/* if the master has gone away we can't do anything with the lock */
if (file_priv->minor->master)
-@@ -563,8 +563,8 @@ int drm_release(struct inode *inode, str
+@@ -565,8 +565,8 @@ int drm_release(struct inode *inode, str
* End inline drm_release
*/
if (atomic_read(&dev->ioctl_count)) {
DRM_ERROR("Device busy: %d\n",
atomic_read(&dev->ioctl_count));
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_global.c linux-2.6.37.2/drivers/gpu/drm/drm_global.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_global.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_global.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_global.c linux-2.6.38.1/drivers/gpu/drm/drm_global.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_global.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_global.c 2011-03-21 18:31:35.000000000 -0400
@@ -36,7 +36,7 @@
struct drm_global_item {
struct mutex mutex;
ref->release(ref);
item->object = NULL;
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_info.c linux-2.6.37.2/drivers/gpu/drm/drm_info.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_info.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_info.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_info.c linux-2.6.38.1/drivers/gpu/drm/drm_info.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_info.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_info.c 2011-03-21 18:31:35.000000000 -0400
@@ -86,10 +86,14 @@ int drm_vm_info(struct seq_file *m, void
struct drm_local_map *map;
struct drm_map_list *r_list;
type = "??";
else
type = types[map->type];
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_ioctl.c linux-2.6.37.2/drivers/gpu/drm/drm_ioctl.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_ioctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_ioctl.c 2011-01-17 02:41:01.000000000 -0500
+@@ -301,7 +305,11 @@ int drm_vma_info(struct seq_file *m, voi
+ vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
+ vma->vm_flags & VM_LOCKED ? 'l' : '-',
+ vma->vm_flags & VM_IO ? 'i' : '-',
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++ 0);
++#else
+ vma->vm_pgoff);
++#endif
+
+ #if defined(__i386__)
+ pgprot = pgprot_val(vma->vm_page_prot);
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_ioctl.c linux-2.6.38.1/drivers/gpu/drm/drm_ioctl.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_ioctl.c 2011-03-21 18:31:35.000000000 -0400
@@ -353,7 +353,7 @@ int drm_getstats(struct drm_device *dev,
stats->data[i].value =
(file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
stats->data[i].type = dev->types[i];
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/drm_lock.c linux-2.6.37.2/drivers/gpu/drm/drm_lock.c
---- linux-2.6.37.2/drivers/gpu/drm/drm_lock.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/drm_lock.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/drm_lock.c linux-2.6.38.1/drivers/gpu/drm/drm_lock.c
+--- linux-2.6.38.1/drivers/gpu/drm/drm_lock.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/drm_lock.c 2011-03-21 18:31:35.000000000 -0400
@@ -89,7 +89,7 @@ int drm_lock(struct drm_device *dev, voi
if (drm_lock_take(&master->lock, lock->context)) {
master->lock.file_priv = file_priv;
if (drm_lock_free(&master->lock, lock->context)) {
/* FIXME: Should really bail out here. */
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i810/i810_dma.c linux-2.6.37.2/drivers/gpu/drm/i810/i810_dma.c
---- linux-2.6.37.2/drivers/gpu/drm/i810/i810_dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i810/i810_dma.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i810/i810_dma.c linux-2.6.38.1/drivers/gpu/drm/i810/i810_dma.c
+--- linux-2.6.38.1/drivers/gpu/drm/i810/i810_dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i810/i810_dma.c 2011-03-21 18:31:35.000000000 -0400
@@ -953,8 +953,8 @@ static int i810_dma_vertex(struct drm_de
dma->buflist[vertex->idx],
vertex->discard, vertex->used);
sarea_priv->last_enqueue = dev_priv->counter - 1;
sarea_priv->last_dispatch = (int)hw_status[5];
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7017.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7017.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7017.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7017.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7017.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7017.c 2011-03-21 18:31:35.000000000 -0400
@@ -390,7 +390,7 @@ static void ch7017_destroy(struct intel_
}
}
.init = ch7017_init,
.detect = ch7017_detect,
.mode_valid = ch7017_mode_valid,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7xxx.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7xxx.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ch7xxx.c 2011-03-21 18:31:35.000000000 -0400
@@ -320,7 +320,7 @@ static void ch7xxx_destroy(struct intel_
}
}
.init = ch7xxx_init,
.detect = ch7xxx_detect,
.mode_valid = ch7xxx_mode_valid,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo.h linux-2.6.37.2/drivers/gpu/drm/i915/dvo.h
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo.h linux-2.6.38.1/drivers/gpu/drm/i915/dvo.h
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo.h 2011-03-21 18:31:35.000000000 -0400
@@ -122,23 +122,23 @@ struct intel_dvo_dev_ops {
*
* \return singly-linked list of modes or NULL if no modes found.
+extern const struct intel_dvo_dev_ops ch7017_ops;
#endif /* _INTEL_DVO_H */
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ivch.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ivch.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo_ivch.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ivch.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ivch.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo_ivch.c 2011-03-21 18:31:35.000000000 -0400
@@ -410,7 +410,7 @@ static void ivch_destroy(struct intel_dv
}
}
.init = ivch_init,
.dpms = ivch_dpms,
.mode_valid = ivch_mode_valid,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.37.2/drivers/gpu/drm/i915/dvo_sil164.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo_sil164.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo_sil164.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.38.1/drivers/gpu/drm/i915/dvo_sil164.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo_sil164.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo_sil164.c 2011-03-21 18:31:35.000000000 -0400
@@ -252,7 +252,7 @@ static void sil164_destroy(struct intel_
}
}
.init = sil164_init,
.detect = sil164_detect,
.mode_valid = sil164_mode_valid,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.37.2/drivers/gpu/drm/i915/dvo_tfp410.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/dvo_tfp410.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/dvo_tfp410.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.38.1/drivers/gpu/drm/i915/dvo_tfp410.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/dvo_tfp410.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/dvo_tfp410.c 2011-03-21 18:31:35.000000000 -0400
@@ -293,7 +293,7 @@ static void tfp410_destroy(struct intel_
}
}
.init = tfp410_init,
.detect = tfp410_detect,
.mode_valid = tfp410_mode_valid,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/i915_dma.c linux-2.6.37.2/drivers/gpu/drm/i915/i915_dma.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/i915_dma.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/i915_dma.c 2011-02-22 16:05:42.000000000 -0500
-@@ -1191,7 +1191,7 @@ static bool i915_switcheroo_can_switch(s
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/i915_dma.c linux-2.6.38.1/drivers/gpu/drm/i915/i915_dma.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/i915_dma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/i915_dma.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1159,7 +1159,7 @@ static bool i915_switcheroo_can_switch(s
bool can_switch;
spin_lock(&dev->count_lock);
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/i915_drv.c linux-2.6.37.2/drivers/gpu/drm/i915/i915_drv.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/i915_drv.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/i915_drv.c 2011-02-22 16:05:42.000000000 -0500
-@@ -587,7 +587,7 @@ static const struct dev_pm_ops i915_pm_o
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/i915/i915_drv.c linux-2.6.38.1/drivers/gpu/drm/i915/i915_drv.c
+--- linux-2.6.38.1/drivers/gpu/drm/i915/i915_drv.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/i915/i915_drv.c 2011-03-21 18:31:35.000000000 -0400
+@@ -673,7 +673,7 @@ static const struct dev_pm_ops i915_pm_o
.restore = i915_pm_resume,
};
.fault = i915_gem_fault,
.open = drm_gem_vm_open,
.close = drm_gem_vm_close,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/i915/i915_gem.c linux-2.6.37.2/drivers/gpu/drm/i915/i915_gem.c
---- linux-2.6.37.2/drivers/gpu/drm/i915/i915_gem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/i915/i915_gem.c 2011-01-17 02:41:01.000000000 -0500
-@@ -587,6 +587,7 @@ i915_gem_pread_ioctl(struct drm_device *
- goto out_put;
-
- ret = -EFAULT;
-+
- if (!i915_gem_object_needs_bit17_swizzle(obj))
- ret = i915_gem_shmem_pread_fast(dev, obj, args, file_priv);
- if (ret == -EFAULT)
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_backlight.c linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_backlight.c
---- linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_backlight.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_backlight.c 2011-01-17 02:41:01.000000000 -0500
-@@ -59,7 +59,7 @@ static int nv40_set_intensity(struct bac
- return 0;
- }
-
--static struct backlight_ops nv40_bl_ops = {
-+static const struct backlight_ops nv40_bl_ops = {
- .options = BL_CORE_SUSPENDRESUME,
- .get_brightness = nv40_get_intensity,
- .update_status = nv40_set_intensity,
-@@ -82,7 +82,7 @@ static int nv50_set_intensity(struct bac
- return 0;
- }
-
--static struct backlight_ops nv50_bl_ops = {
-+static const struct backlight_ops nv50_bl_ops = {
- .options = BL_CORE_SUSPENDRESUME,
- .get_brightness = nv50_get_intensity,
- .update_status = nv50_set_intensity,
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_state.c
---- linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_state.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/nouveau/nouveau_state.c 2011-01-24 18:04:15.000000000 -0500
-@@ -546,7 +546,7 @@ static bool nouveau_switcheroo_can_switc
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.38.1/drivers/gpu/drm/nouveau/nouveau_state.c
+--- linux-2.6.38.1/drivers/gpu/drm/nouveau/nouveau_state.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/nouveau/nouveau_state.c 2011-03-21 18:31:35.000000000 -0400
+@@ -621,7 +621,7 @@ static bool nouveau_switcheroo_can_switc
bool can_switch;
spin_lock(&dev->count_lock);
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.37.2/drivers/gpu/drm/radeon/mkregtable.c
---- linux-2.6.37.2/drivers/gpu/drm/radeon/mkregtable.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/radeon/mkregtable.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.38.1/drivers/gpu/drm/radeon/mkregtable.c
+--- linux-2.6.38.1/drivers/gpu/drm/radeon/mkregtable.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/radeon/mkregtable.c 2011-03-21 18:31:35.000000000 -0400
@@ -637,14 +637,14 @@ static int parser_auth(struct table *t,
regex_t mask_rex;
regmatch_t match[4];
if (regcomp
(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_device.c linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_device.c
---- linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_device.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_device.c 2011-01-24 18:04:15.000000000 -0500
-@@ -659,7 +659,7 @@ static bool radeon_switcheroo_can_switch
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_device.c linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_device.c
+--- linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_device.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_device.c 2011-03-21 18:31:35.000000000 -0400
+@@ -673,7 +673,7 @@ static bool radeon_switcheroo_can_switch
bool can_switch;
spin_lock(&dev->count_lock);
spin_unlock(&dev->count_lock);
return can_switch;
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_state.c
---- linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_state.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_state.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_state.c
+--- linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_state.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_state.c 2011-03-21 18:31:35.000000000 -0400
@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_de
if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_ttm.c
---- linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_ttm.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/radeon/radeon_ttm.c 2011-02-27 14:49:45.000000000 -0500
-@@ -589,8 +589,9 @@ void radeon_ttm_fini(struct radeon_devic
- DRM_INFO("radeon: ttm finalized\n");
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_ttm.c
+--- linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_ttm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/radeon/radeon_ttm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -603,8 +603,9 @@ void radeon_ttm_set_active_vram_size(str
+ man->size = size >> PAGE_SHIFT;
}
-static struct vm_operations_struct radeon_ttm_vm_ops;
static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
-@@ -598,17 +599,22 @@ static int radeon_ttm_fault(struct vm_ar
+@@ -612,17 +613,22 @@ static int radeon_ttm_fault(struct vm_ar
struct radeon_device *rdev;
int r;
int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct drm_file *file_priv;
-@@ -621,18 +627,11 @@ int radeon_mmap(struct file *filp, struc
+@@ -635,18 +641,11 @@ int radeon_mmap(struct file *filp, struc
file_priv = filp->private_data;
rdev = file_priv->minor->dev->dev_private;
vma->vm_ops = &radeon_ttm_vm_ops;
return 0;
}
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo.c
---- linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo.c
+--- linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo.c 2011-03-21 18:31:35.000000000 -0400
@@ -40,7 +40,7 @@
#include <asm/atomic.h>
#define TTM_BO_HASH_ORDER 13
static int ttm_bo_setup_vm(struct ttm_buffer_object *bo);
-diff -urNp linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo_vm.c
---- linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo_vm.c
+--- linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/gpu/drm/ttm/ttm_bo_vm.c 2011-03-21 18:31:35.000000000 -0400
@@ -69,11 +69,11 @@ static struct ttm_buffer_object *ttm_bo_
return best_bo;
}
unsigned long page_offset;
unsigned long page_last;
unsigned long pfn;
-@@ -84,6 +84,10 @@ static int ttm_bo_vm_fault(struct vm_are
+@@ -83,8 +83,12 @@ static int ttm_bo_vm_fault(struct vm_are
+ int i;
unsigned long address = (unsigned long)vmf->virtual_address;
int retval = VM_FAULT_NOPAGE;
-
+- struct ttm_mem_type_manager *man =
+- &bdev->man[bo->mem.mem_type];
++ struct ttm_mem_type_manager *man;
++
+ if (!bo)
+ return VM_FAULT_NOPAGE;
+ bdev = bo->bdev;
-+
++ man = &bdev->man[bo->mem.mem_type];
+
/*
* Work around locking order reversal in fault / nopfn
- * between mmap_sem and bo_reserve: Perform a trylock operation
-@@ -212,22 +216,25 @@ out_unlock:
+@@ -219,22 +223,25 @@ out_unlock:
ttm_bo_unreserve(bo);
return retval;
}
static const struct vm_operations_struct ttm_bo_vm_ops = {
.fault = ttm_bo_vm_fault,
-diff -urNp linux-2.6.37.2/drivers/hid/usbhid/hiddev.c linux-2.6.37.2/drivers/hid/usbhid/hiddev.c
---- linux-2.6.37.2/drivers/hid/usbhid/hiddev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/hid/usbhid/hiddev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -611,7 +611,7 @@ static long hiddev_ioctl(struct file *fi
- return put_user(HID_VERSION, (int __user *)arg);
+diff -urNp linux-2.6.38.1/drivers/hid/usbhid/hiddev.c linux-2.6.38.1/drivers/hid/usbhid/hiddev.c
+--- linux-2.6.38.1/drivers/hid/usbhid/hiddev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hid/usbhid/hiddev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -613,7 +613,7 @@ static long hiddev_ioctl(struct file *fi
+ break;
case HIDIOCAPPLICATION:
- if (arg < 0 || arg >= hid->maxapplication)
+ if (arg >= hid->maxapplication)
- return -EINVAL;
+ break;
for (i = 0; i < hid->maxcollection; i++)
-diff -urNp linux-2.6.37.2/drivers/hwmon/k8temp.c linux-2.6.37.2/drivers/hwmon/k8temp.c
---- linux-2.6.37.2/drivers/hwmon/k8temp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/hwmon/k8temp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/hwmon/k8temp.c linux-2.6.38.1/drivers/hwmon/k8temp.c
+--- linux-2.6.38.1/drivers/hwmon/k8temp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hwmon/k8temp.c 2011-03-21 18:31:35.000000000 -0400
@@ -138,7 +138,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_n
static const struct pci_device_id k8temp_ids[] = {
};
MODULE_DEVICE_TABLE(pci, k8temp_ids);
-diff -urNp linux-2.6.37.2/drivers/hwmon/sis5595.c linux-2.6.37.2/drivers/hwmon/sis5595.c
---- linux-2.6.37.2/drivers/hwmon/sis5595.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/hwmon/sis5595.c 2011-01-17 02:41:01.000000000 -0500
-@@ -699,7 +699,7 @@ static struct sis5595_data *sis5595_upda
+diff -urNp linux-2.6.38.1/drivers/hwmon/sis5595.c linux-2.6.38.1/drivers/hwmon/sis5595.c
+--- linux-2.6.38.1/drivers/hwmon/sis5595.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hwmon/sis5595.c 2011-03-21 18:31:35.000000000 -0400
+@@ -701,7 +701,7 @@ static struct sis5595_data *sis5595_upda
static const struct pci_device_id sis5595_pci_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
};
MODULE_DEVICE_TABLE(pci, sis5595_pci_ids);
-diff -urNp linux-2.6.37.2/drivers/hwmon/via686a.c linux-2.6.37.2/drivers/hwmon/via686a.c
---- linux-2.6.37.2/drivers/hwmon/via686a.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/hwmon/via686a.c 2011-02-22 16:05:42.000000000 -0500
-@@ -777,7 +777,7 @@ static struct via686a_data *via686a_upda
+diff -urNp linux-2.6.38.1/drivers/hwmon/via686a.c linux-2.6.38.1/drivers/hwmon/via686a.c
+--- linux-2.6.38.1/drivers/hwmon/via686a.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hwmon/via686a.c 2011-03-21 18:31:35.000000000 -0400
+@@ -779,7 +779,7 @@ static struct via686a_data *via686a_upda
static const struct pci_device_id via686a_pci_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4) },
};
MODULE_DEVICE_TABLE(pci, via686a_pci_ids);
-diff -urNp linux-2.6.37.2/drivers/hwmon/vt8231.c linux-2.6.37.2/drivers/hwmon/vt8231.c
---- linux-2.6.37.2/drivers/hwmon/vt8231.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/hwmon/vt8231.c 2011-01-17 02:41:01.000000000 -0500
-@@ -699,7 +699,7 @@ static struct platform_driver vt8231_dri
+diff -urNp linux-2.6.38.1/drivers/hwmon/vt8231.c linux-2.6.38.1/drivers/hwmon/vt8231.c
+--- linux-2.6.38.1/drivers/hwmon/vt8231.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hwmon/vt8231.c 2011-03-21 18:31:35.000000000 -0400
+@@ -701,7 +701,7 @@ static struct platform_driver vt8231_dri
static const struct pci_device_id vt8231_pci_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231_4) },
};
MODULE_DEVICE_TABLE(pci, vt8231_pci_ids);
-diff -urNp linux-2.6.37.2/drivers/hwmon/w83791d.c linux-2.6.37.2/drivers/hwmon/w83791d.c
---- linux-2.6.37.2/drivers/hwmon/w83791d.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/hwmon/w83791d.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/hwmon/w83791d.c linux-2.6.38.1/drivers/hwmon/w83791d.c
+--- linux-2.6.38.1/drivers/hwmon/w83791d.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/hwmon/w83791d.c 2011-03-21 18:31:35.000000000 -0400
@@ -329,8 +329,8 @@ static int w83791d_detect(struct i2c_cli
struct i2c_board_info *info);
static int w83791d_remove(struct i2c_client *client);
static struct w83791d_data *w83791d_update_device(struct device *dev);
#ifdef DEBUG
-diff -urNp linux-2.6.37.2/drivers/i2c/busses/i2c-i801.c linux-2.6.37.2/drivers/i2c/busses/i2c-i801.c
---- linux-2.6.37.2/drivers/i2c/busses/i2c-i801.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/i2c/busses/i2c-i801.c 2011-01-17 02:41:01.000000000 -0500
-@@ -620,7 +620,7 @@ static const struct pci_device_id i801_i
+diff -urNp linux-2.6.38.1/drivers/i2c/busses/i2c-i801.c linux-2.6.38.1/drivers/i2c/busses/i2c-i801.c
+--- linux-2.6.38.1/drivers/i2c/busses/i2c-i801.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/i2c/busses/i2c-i801.c 2011-03-21 18:31:35.000000000 -0400
+@@ -621,7 +621,7 @@ static const struct pci_device_id i801_i
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2) },
};
MODULE_DEVICE_TABLE(pci, i801_ids);
-diff -urNp linux-2.6.37.2/drivers/i2c/busses/i2c-piix4.c linux-2.6.37.2/drivers/i2c/busses/i2c-piix4.c
---- linux-2.6.37.2/drivers/i2c/busses/i2c-piix4.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/i2c/busses/i2c-piix4.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/i2c/busses/i2c-piix4.c linux-2.6.38.1/drivers/i2c/busses/i2c-piix4.c
+--- linux-2.6.38.1/drivers/i2c/busses/i2c-piix4.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/i2c/busses/i2c-piix4.c 2011-03-21 18:31:35.000000000 -0400
@@ -124,7 +124,7 @@ static struct dmi_system_id __devinitdat
.ident = "IBM",
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
};
MODULE_DEVICE_TABLE (pci, piix4_ids);
-diff -urNp linux-2.6.37.2/drivers/i2c/busses/i2c-sis630.c linux-2.6.37.2/drivers/i2c/busses/i2c-sis630.c
---- linux-2.6.37.2/drivers/i2c/busses/i2c-sis630.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/i2c/busses/i2c-sis630.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/i2c/busses/i2c-sis630.c linux-2.6.38.1/drivers/i2c/busses/i2c-sis630.c
+--- linux-2.6.38.1/drivers/i2c/busses/i2c-sis630.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/i2c/busses/i2c-sis630.c 2011-03-21 18:31:35.000000000 -0400
@@ -471,7 +471,7 @@ static struct i2c_adapter sis630_adapter
static const struct pci_device_id sis630_ids[] __devinitconst = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
};
MODULE_DEVICE_TABLE (pci, sis630_ids);
-diff -urNp linux-2.6.37.2/drivers/i2c/busses/i2c-sis96x.c linux-2.6.37.2/drivers/i2c/busses/i2c-sis96x.c
---- linux-2.6.37.2/drivers/i2c/busses/i2c-sis96x.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/i2c/busses/i2c-sis96x.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/i2c/busses/i2c-sis96x.c linux-2.6.38.1/drivers/i2c/busses/i2c-sis96x.c
+--- linux-2.6.38.1/drivers/i2c/busses/i2c-sis96x.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/i2c/busses/i2c-sis96x.c 2011-03-21 18:31:35.000000000 -0400
@@ -247,7 +247,7 @@ static struct i2c_adapter sis96x_adapter
static const struct pci_device_id sis96x_ids[] = {
};
MODULE_DEVICE_TABLE (pci, sis96x_ids);
-diff -urNp linux-2.6.37.2/drivers/ide/ide-cd.c linux-2.6.37.2/drivers/ide/ide-cd.c
---- linux-2.6.37.2/drivers/ide/ide-cd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/ide/ide-cd.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/ide/ide-cd.c linux-2.6.38.1/drivers/ide/ide-cd.c
+--- linux-2.6.38.1/drivers/ide/ide-cd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/ide/ide-cd.c 2011-03-21 18:31:35.000000000 -0400
@@ -776,7 +776,7 @@ static void cdrom_do_block_pc(ide_drive_
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
if ((unsigned long)buf & alignment
drive->dma = 0;
}
}
-diff -urNp linux-2.6.37.2/drivers/infiniband/core/cm.c linux-2.6.37.2/drivers/infiniband/core/cm.c
---- linux-2.6.37.2/drivers/infiniband/core/cm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/infiniband/core/cm.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/infiniband/core/cm.c linux-2.6.38.1/drivers/infiniband/core/cm.c
+--- linux-2.6.38.1/drivers/infiniband/core/cm.c 2011-03-23 17:20:07.000000000 -0400
++++ linux-2.6.38.1/drivers/infiniband/core/cm.c 2011-03-23 17:21:50.000000000 -0400
@@ -113,7 +113,7 @@ static char const counter_group_names[CM
struct cm_counter_group {
counter[CM_SIDR_REQ_COUNTER]);
goto out; /* Duplicate message. */
}
-@@ -3186,10 +3186,10 @@ static void cm_send_handler(struct ib_ma
+@@ -3187,10 +3187,10 @@ static void cm_send_handler(struct ib_ma
if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
msg->retries = 1;
&port->counter_group[CM_XMIT_RETRIES].
counter[attr_index]);
-@@ -3399,7 +3399,7 @@ static void cm_recv_handler(struct ib_ma
+@@ -3400,7 +3400,7 @@ static void cm_recv_handler(struct ib_ma
}
attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
counter[attr_id - CM_ATTR_ID_OFFSET]);
work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
-@@ -3597,7 +3597,7 @@ static ssize_t cm_show_counter(struct ko
+@@ -3598,7 +3598,7 @@ static ssize_t cm_show_counter(struct ko
cm_attr = container_of(attr, struct cm_counter_attribute, attr);
return sprintf(buf, "%ld\n",
}
static const struct sysfs_ops cm_counter_ops = {
-diff -urNp linux-2.6.37.2/drivers/infiniband/hw/qib/qib.h linux-2.6.37.2/drivers/infiniband/hw/qib/qib.h
---- linux-2.6.37.2/drivers/infiniband/hw/qib/qib.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/infiniband/hw/qib/qib.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/infiniband/hw/qib/qib.h linux-2.6.38.1/drivers/infiniband/hw/qib/qib.h
+--- linux-2.6.38.1/drivers/infiniband/hw/qib/qib.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/infiniband/hw/qib/qib.h 2011-03-21 18:31:35.000000000 -0400
@@ -51,6 +51,7 @@
#include <linux/completion.h>
#include <linux/kref.h>
#include "qib_common.h"
#include "qib_verbs.h"
-diff -urNp linux-2.6.37.2/drivers/input/keyboard/atkbd.c linux-2.6.37.2/drivers/input/keyboard/atkbd.c
---- linux-2.6.37.2/drivers/input/keyboard/atkbd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/keyboard/atkbd.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/input/keyboard/atkbd.c linux-2.6.38.1/drivers/input/keyboard/atkbd.c
+--- linux-2.6.38.1/drivers/input/keyboard/atkbd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/keyboard/atkbd.c 2011-03-21 18:31:35.000000000 -0400
@@ -1250,7 +1250,7 @@ static struct serio_device_id atkbd_seri
.id = SERIO_ANY,
.extra = SERIO_ANY,
};
MODULE_DEVICE_TABLE(serio, atkbd_serio_ids);
-diff -urNp linux-2.6.37.2/drivers/input/mouse/lifebook.c linux-2.6.37.2/drivers/input/mouse/lifebook.c
---- linux-2.6.37.2/drivers/input/mouse/lifebook.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/mouse/lifebook.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/input/mouse/lifebook.c linux-2.6.38.1/drivers/input/mouse/lifebook.c
+--- linux-2.6.38.1/drivers/input/mouse/lifebook.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/mouse/lifebook.c 2011-03-21 18:31:35.000000000 -0400
@@ -123,7 +123,7 @@ static const struct dmi_system_id __init
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"),
},
};
void __init lifebook_module_init(void)
-diff -urNp linux-2.6.37.2/drivers/input/mouse/psmouse-base.c linux-2.6.37.2/drivers/input/mouse/psmouse-base.c
---- linux-2.6.37.2/drivers/input/mouse/psmouse-base.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/mouse/psmouse-base.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/input/mouse/psmouse-base.c linux-2.6.38.1/drivers/input/mouse/psmouse-base.c
+--- linux-2.6.38.1/drivers/input/mouse/psmouse-base.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/mouse/psmouse-base.c 2011-03-21 18:31:35.000000000 -0400
@@ -1462,7 +1462,7 @@ static struct serio_device_id psmouse_se
.id = SERIO_ANY,
.extra = SERIO_ANY,
};
MODULE_DEVICE_TABLE(serio, psmouse_serio_ids);
-diff -urNp linux-2.6.37.2/drivers/input/mouse/synaptics.c linux-2.6.37.2/drivers/input/mouse/synaptics.c
---- linux-2.6.37.2/drivers/input/mouse/synaptics.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/mouse/synaptics.c 2011-01-17 02:41:01.000000000 -0500
-@@ -499,7 +499,7 @@ static void synaptics_process_packet(str
+diff -urNp linux-2.6.38.1/drivers/input/mouse/synaptics.c linux-2.6.38.1/drivers/input/mouse/synaptics.c
+--- linux-2.6.38.1/drivers/input/mouse/synaptics.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/mouse/synaptics.c 2011-03-21 18:31:35.000000000 -0400
+@@ -559,7 +559,7 @@ static void synaptics_process_packet(str
break;
case 2:
if (SYN_MODEL_PEN(priv->model_id))
break;
case 4 ... 15:
if (SYN_CAP_PALMDETECT(priv->capabilities))
-@@ -729,7 +729,6 @@ static const struct dmi_system_id __init
+@@ -825,7 +825,6 @@ static const struct dmi_system_id __init
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"),
},
},
{
/* Toshiba Portege M300 */
-@@ -738,9 +737,8 @@ static const struct dmi_system_id __init
+@@ -834,9 +833,8 @@ static const struct dmi_system_id __init
DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
},
#endif
};
-diff -urNp linux-2.6.37.2/drivers/input/mousedev.c linux-2.6.37.2/drivers/input/mousedev.c
---- linux-2.6.37.2/drivers/input/mousedev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/mousedev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -762,7 +762,7 @@ static ssize_t mousedev_read(struct file
+diff -urNp linux-2.6.38.1/drivers/input/mousedev.c linux-2.6.38.1/drivers/input/mousedev.c
+--- linux-2.6.38.1/drivers/input/mousedev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/mousedev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -764,7 +764,7 @@ static ssize_t mousedev_read(struct file
spin_unlock_irq(&client->packet_lock);
return -EFAULT;
return count;
-@@ -1065,7 +1065,7 @@ static struct input_handler mousedev_han
+@@ -1067,7 +1067,7 @@ static struct input_handler mousedev_han
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
static struct miscdevice psaux_mouse = {
};
static int psaux_registered;
#endif
-diff -urNp linux-2.6.37.2/drivers/input/serio/i8042-x86ia64io.h linux-2.6.37.2/drivers/input/serio/i8042-x86ia64io.h
---- linux-2.6.37.2/drivers/input/serio/i8042-x86ia64io.h 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/serio/i8042-x86ia64io.h 2011-02-22 16:11:44.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/input/serio/i8042-x86ia64io.h linux-2.6.38.1/drivers/input/serio/i8042-x86ia64io.h
+--- linux-2.6.38.1/drivers/input/serio/i8042-x86ia64io.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/serio/i8042-x86ia64io.h 2011-03-21 18:31:35.000000000 -0400
@@ -183,7 +183,7 @@ static const struct dmi_system_id __init
DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
},
};
#endif
-@@ -633,7 +633,7 @@ static const struct dmi_system_id __init
+@@ -640,7 +640,7 @@ static const struct dmi_system_id __init
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
},
},
};
#endif /* CONFIG_X86 */
-diff -urNp linux-2.6.37.2/drivers/input/serio/serio_raw.c linux-2.6.37.2/drivers/input/serio/serio_raw.c
---- linux-2.6.37.2/drivers/input/serio/serio_raw.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/input/serio/serio_raw.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/input/serio/serio_raw.c linux-2.6.38.1/drivers/input/serio/serio_raw.c
+--- linux-2.6.38.1/drivers/input/serio/serio_raw.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/input/serio/serio_raw.c 2011-03-21 18:31:35.000000000 -0400
@@ -376,7 +376,7 @@ static struct serio_device_id serio_raw_
.id = SERIO_ANY,
.extra = SERIO_ANY,
};
MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids);
-diff -urNp linux-2.6.37.2/drivers/isdn/gigaset/common.c linux-2.6.37.2/drivers/isdn/gigaset/common.c
---- linux-2.6.37.2/drivers/isdn/gigaset/common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/isdn/gigaset/common.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/isdn/gigaset/common.c linux-2.6.38.1/drivers/isdn/gigaset/common.c
+--- linux-2.6.38.1/drivers/isdn/gigaset/common.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/isdn/gigaset/common.c 2011-03-21 18:31:35.000000000 -0400
@@ -723,7 +723,7 @@ struct cardstate *gigaset_initcs(struct
cs->commands_pending = 0;
cs->cur_at_seq = 0;
cs->dev = NULL;
cs->tty = NULL;
cs->tty_dev = NULL;
-diff -urNp linux-2.6.37.2/drivers/isdn/gigaset/gigaset.h linux-2.6.37.2/drivers/isdn/gigaset/gigaset.h
---- linux-2.6.37.2/drivers/isdn/gigaset/gigaset.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/isdn/gigaset/gigaset.h 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/isdn/gigaset/gigaset.h linux-2.6.38.1/drivers/isdn/gigaset/gigaset.h
+--- linux-2.6.38.1/drivers/isdn/gigaset/gigaset.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/isdn/gigaset/gigaset.h 2011-03-21 18:31:35.000000000 -0400
@@ -35,6 +35,7 @@
#include <linux/tty_driver.h>
#include <linux/list.h>
struct tty_struct *tty;
struct tasklet_struct if_wake_tasklet;
unsigned control_state;
-diff -urNp linux-2.6.37.2/drivers/isdn/gigaset/interface.c linux-2.6.37.2/drivers/isdn/gigaset/interface.c
---- linux-2.6.37.2/drivers/isdn/gigaset/interface.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/isdn/gigaset/interface.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/isdn/gigaset/interface.c linux-2.6.38.1/drivers/isdn/gigaset/interface.c
+--- linux-2.6.38.1/drivers/isdn/gigaset/interface.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/isdn/gigaset/interface.c 2011-03-21 18:31:35.000000000 -0400
@@ -160,9 +160,7 @@ static int if_open(struct tty_struct *tt
return -ERESTARTSYS;
tty->driver_data = cs;
dev_warn(cs->dev, "%s: device not opened\n", __func__);
goto out;
}
-diff -urNp linux-2.6.37.2/drivers/isdn/hardware/avm/b1.c linux-2.6.37.2/drivers/isdn/hardware/avm/b1.c
---- linux-2.6.37.2/drivers/isdn/hardware/avm/b1.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/isdn/hardware/avm/b1.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/isdn/hardware/avm/b1.c linux-2.6.38.1/drivers/isdn/hardware/avm/b1.c
+--- linux-2.6.38.1/drivers/isdn/hardware/avm/b1.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/isdn/hardware/avm/b1.c 2011-03-21 18:31:35.000000000 -0400
@@ -176,7 +176,7 @@ int b1_load_t4file(avmcard *card, capilo
}
if (left) {
return -EFAULT;
} else {
memcpy(buf, dp, left);
-diff -urNp linux-2.6.37.2/drivers/isdn/icn/icn.c linux-2.6.37.2/drivers/isdn/icn/icn.c
---- linux-2.6.37.2/drivers/isdn/icn/icn.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/isdn/icn/icn.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/isdn/icn/icn.c linux-2.6.38.1/drivers/isdn/icn/icn.c
+--- linux-2.6.38.1/drivers/isdn/icn/icn.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/isdn/icn/icn.c 2011-03-21 18:31:35.000000000 -0400
@@ -1045,7 +1045,7 @@ icn_writecmd(const u_char * buf, int len
if (count > len)
count = len;
return -EFAULT;
} else
memcpy(msg, buf, count);
-diff -urNp linux-2.6.37.2/drivers/leds/leds-lp5521.c linux-2.6.37.2/drivers/leds/leds-lp5521.c
---- linux-2.6.37.2/drivers/leds/leds-lp5521.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/leds/leds-lp5521.c 2011-02-27 15:29:26.000000000 -0500
-@@ -544,7 +544,7 @@ static ssize_t lp5521_selftest(struct de
+diff -urNp linux-2.6.38.1/drivers/leds/leds-lp5521.c linux-2.6.38.1/drivers/leds/leds-lp5521.c
+--- linux-2.6.38.1/drivers/leds/leds-lp5521.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/leds/leds-lp5521.c 2011-03-21 18:31:35.000000000 -0400
+@@ -534,7 +534,7 @@ static ssize_t lp5521_selftest(struct de
}
/* led class device attributes */
static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL);
static struct attribute *lp5521_led_attributes[] = {
-@@ -558,15 +558,15 @@ static struct attribute_group lp5521_led
+@@ -548,15 +548,15 @@ static struct attribute_group lp5521_led
};
/* device attributes */
static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL);
static struct attribute *lp5521_attributes[] = {
-diff -urNp linux-2.6.37.2/drivers/leds/leds-lp5523.c linux-2.6.37.2/drivers/leds/leds-lp5523.c
---- linux-2.6.37.2/drivers/leds/leds-lp5523.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/leds/leds-lp5523.c 2011-02-27 15:29:58.000000000 -0500
-@@ -701,7 +701,7 @@ static ssize_t store_current(struct devi
+diff -urNp linux-2.6.38.1/drivers/leds/leds-lp5523.c linux-2.6.38.1/drivers/leds/leds-lp5523.c
+--- linux-2.6.38.1/drivers/leds/leds-lp5523.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/leds/leds-lp5523.c 2011-03-21 18:31:35.000000000 -0400
+@@ -713,7 +713,7 @@ static ssize_t store_current(struct devi
}
/* led class device attributes */
static DEVICE_ATTR(max_current, S_IRUGO , show_max_current, NULL);
static struct attribute *lp5523_led_attributes[] = {
-@@ -715,21 +715,21 @@ static struct attribute_group lp5523_led
+@@ -727,21 +727,21 @@ static struct attribute_group lp5523_led
};
/* device attributes */
static DEVICE_ATTR(selftest, S_IRUGO, lp5523_selftest, NULL);
static struct attribute *lp5523_attributes[] = {
-diff -urNp linux-2.6.37.2/drivers/lguest/core.c linux-2.6.37.2/drivers/lguest/core.c
---- linux-2.6.37.2/drivers/lguest/core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/lguest/core.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/lguest/core.c linux-2.6.38.1/drivers/lguest/core.c
+--- linux-2.6.38.1/drivers/lguest/core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/lguest/core.c 2011-03-21 18:31:35.000000000 -0400
@@ -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.
end_switcher_text - start_switcher_text);
printk(KERN_INFO "lguest: mapped switcher at %p\n",
-diff -urNp linux-2.6.37.2/drivers/lguest/x86/core.c linux-2.6.37.2/drivers/lguest/x86/core.c
---- linux-2.6.37.2/drivers/lguest/x86/core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/lguest/x86/core.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/lguest/x86/core.c linux-2.6.38.1/drivers/lguest/x86/core.c
+--- linux-2.6.38.1/drivers/lguest/x86/core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/lguest/x86/core.c 2011-03-21 18:31:35.000000000 -0400
@@ -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)
lguest_entry.segment = LGUEST_CS;
/*
-diff -urNp linux-2.6.37.2/drivers/lguest/x86/switcher_32.S linux-2.6.37.2/drivers/lguest/x86/switcher_32.S
---- linux-2.6.37.2/drivers/lguest/x86/switcher_32.S 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/lguest/x86/switcher_32.S 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/lguest/x86/switcher_32.S linux-2.6.38.1/drivers/lguest/x86/switcher_32.S
+--- linux-2.6.38.1/drivers/lguest/x86/switcher_32.S 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/lguest/x86/switcher_32.S 2011-03-21 18:31:35.000000000 -0400
@@ -87,6 +87,7 @@
#include <asm/page.h>
#include <asm/segment.h>
// Every interrupt can come to us here
// But we must truly tell each apart.
-diff -urNp linux-2.6.37.2/drivers/macintosh/via-pmu-backlight.c linux-2.6.37.2/drivers/macintosh/via-pmu-backlight.c
---- linux-2.6.37.2/drivers/macintosh/via-pmu-backlight.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/macintosh/via-pmu-backlight.c 2011-01-17 02:41:01.000000000 -0500
-@@ -15,7 +15,7 @@
-
- #define MAX_PMU_LEVEL 0xFF
-
--static struct backlight_ops pmu_backlight_data;
-+static const struct backlight_ops pmu_backlight_data;
- 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(
- return bd->props.brightness;
- }
-
--static struct backlight_ops pmu_backlight_data = {
-+static const struct backlight_ops pmu_backlight_data = {
- .get_brightness = pmu_backlight_get_brightness,
- .update_status = pmu_backlight_update_status,
-
-diff -urNp linux-2.6.37.2/drivers/macintosh/via-pmu.c linux-2.6.37.2/drivers/macintosh/via-pmu.c
---- linux-2.6.37.2/drivers/macintosh/via-pmu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/macintosh/via-pmu.c 2011-01-17 02:41:01.000000000 -0500
-@@ -2257,7 +2257,7 @@ static int pmu_sleep_valid(suspend_state
- && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
- }
-
--static struct platform_suspend_ops pmu_pm_ops = {
-+static const struct platform_suspend_ops pmu_pm_ops = {
- .enter = powerbook_sleep,
- .valid = pmu_sleep_valid,
- };
-diff -urNp linux-2.6.37.2/drivers/md/bitmap.c linux-2.6.37.2/drivers/md/bitmap.c
---- linux-2.6.37.2/drivers/md/bitmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/md/bitmap.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/md/bitmap.c linux-2.6.38.1/drivers/md/bitmap.c
+--- linux-2.6.38.1/drivers/md/bitmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/md/bitmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -55,7 +55,7 @@
# if DEBUG > 0
# define PRINTK(x...) printk(KERN_DEBUG x)
# endif
#endif
-diff -urNp linux-2.6.37.2/drivers/md/dm-table.c linux-2.6.37.2/drivers/md/dm-table.c
---- linux-2.6.37.2/drivers/md/dm-table.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/md/dm-table.c 2011-01-17 02:41:01.000000000 -0500
-@@ -366,7 +366,7 @@ static int device_area_is_invalid(struct
+diff -urNp linux-2.6.38.1/drivers/md/dm-ioctl.c linux-2.6.38.1/drivers/md/dm-ioctl.c
+--- linux-2.6.38.1/drivers/md/dm-ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/md/dm-ioctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1541,7 +1541,7 @@ static int validate_params(uint cmd, str
+ cmd == DM_LIST_VERSIONS_CMD)
+ return 0;
+
+- if ((cmd == DM_DEV_CREATE_CMD)) {
++ if (cmd == DM_DEV_CREATE_CMD) {
+ if (!*param->name) {
+ DMWARN("name not supplied when creating device");
+ return -EINVAL;
+diff -urNp linux-2.6.38.1/drivers/md/dm-table.c linux-2.6.38.1/drivers/md/dm-table.c
+--- linux-2.6.38.1/drivers/md/dm-table.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/md/dm-table.c 2011-03-21 18:31:35.000000000 -0400
+@@ -372,7 +372,7 @@ static int device_area_is_invalid(struct
if (!dev_size)
return 0;
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.37.2/drivers/md/md.c linux-2.6.37.2/drivers/md/md.c
---- linux-2.6.37.2/drivers/md/md.c 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/md/md.c 2011-02-22 16:05:42.000000000 -0500
-@@ -1882,7 +1882,7 @@ static int bind_rdev_to_array(mdk_rdev_t
+diff -urNp linux-2.6.38.1/drivers/md/md.c linux-2.6.38.1/drivers/md/md.c
+--- linux-2.6.38.1/drivers/md/md.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/md/md.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1889,7 +1889,7 @@ static int bind_rdev_to_array(mdk_rdev_t
ko = &part_to_dev(rdev->bdev->bd_part)->kobj;
if (sysfs_create_link(&rdev->kobj, ko, "block"))
rdev->sysfs_state = sysfs_get_dirent_safe(rdev->kobj.sd, "state");
list_add_rcu(&rdev->same_set, &mddev->disks);
-@@ -2494,7 +2494,7 @@ slot_store(mdk_rdev_t *rdev, const char
+@@ -2499,7 +2499,7 @@ slot_store(mdk_rdev_t *rdev, const char
sysfs_notify_dirent_safe(rdev->sysfs_state);
sprintf(nm, "rd%d", rdev->raid_disk);
if (sysfs_create_link(&rdev->mddev->kobj, &rdev->kobj, nm))
+ /* failure here is OK */{}
/* don't wakeup anyone, leave that to userspace. */
} else {
- if (slot >= rdev->mddev->raid_disks)
-@@ -4578,7 +4578,7 @@ int md_run(mddev_t *mddev)
+ if (slot >= rdev->mddev->raid_disks &&
+@@ -4594,7 +4594,7 @@ int md_run(mddev_t *mddev)
char nm[20];
sprintf(nm, "rd%d", rdev->raid_disk);
if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm))
}
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
-@@ -6419,7 +6419,7 @@ static int md_seq_show(struct seq_file *
+@@ -6462,7 +6462,7 @@ static int md_seq_show(struct seq_file *
chunk_kb ? "KB" : "B");
if (bitmap->file) {
seq_printf(seq, ", file: ");
}
seq_printf(seq, "\n");
-@@ -6513,7 +6513,7 @@ static int is_mddev_idle(mddev_t *mddev,
+@@ -6556,7 +6556,7 @@ static int is_mddev_idle(mddev_t *mddev,
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]) -
/* 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.
-@@ -7031,7 +7031,7 @@ static int remove_and_add_spares(mddev_t
+@@ -7070,7 +7070,7 @@ static int remove_and_add_spares(mddev_t
sprintf(nm, "rd%d", rdev->raid_disk);
if (sysfs_create_link(&mddev->kobj,
&rdev->kobj, nm))
spares++;
md_new_event(mddev);
set_bit(MD_CHANGE_DEVS, &mddev->flags);
-diff -urNp linux-2.6.37.2/drivers/md/md.h linux-2.6.37.2/drivers/md/md.h
---- linux-2.6.37.2/drivers/md/md.h 2011-02-22 16:05:30.000000000 -0500
-+++ linux-2.6.37.2/drivers/md/md.h 2011-02-22 16:05:42.000000000 -0500
-@@ -354,7 +354,7 @@ static inline void rdev_dec_pending(mdk_
+diff -urNp linux-2.6.38.1/drivers/md/md.h linux-2.6.38.1/drivers/md/md.h
+--- linux-2.6.38.1/drivers/md/md.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/md/md.h 2011-03-21 18:31:35.000000000 -0400
+@@ -360,7 +360,7 @@ static inline void rdev_dec_pending(mdk_
static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
{
}
struct mdk_personality
-diff -urNp linux-2.6.37.2/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.37.2/drivers/media/dvb/dvb-core/dvbdev.c
---- linux-2.6.37.2/drivers/media/dvb/dvb-core/dvbdev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/dvb/dvb-core/dvbdev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -192,6 +192,7 @@ int dvb_register_device(struct dvb_adapt
+diff -urNp linux-2.6.38.1/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.38.1/drivers/media/dvb/dvb-core/dvbdev.c
+--- linux-2.6.38.1/drivers/media/dvb/dvb-core/dvbdev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/media/dvb/dvb-core/dvbdev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -192,7 +192,7 @@ int dvb_register_device(struct dvb_adapt
const struct dvb_device *template, void *priv, int type)
{
struct dvb_device *dvbdev;
-+ /* cannot be const, see this function */
- struct file_operations *dvbdevfops;
+- struct file_operations *dvbdevfops;
++ struct file_operations *dvbdevfops; /* cannot be const, see this function */
struct device *clsdev;
int minor;
-diff -urNp linux-2.6.37.2/drivers/media/IR/ir-lirc-codec.c linux-2.6.37.2/drivers/media/IR/ir-lirc-codec.c
---- linux-2.6.37.2/drivers/media/IR/ir-lirc-codec.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/IR/ir-lirc-codec.c 2011-01-17 02:41:01.000000000 -0500
-@@ -275,7 +275,7 @@ static void ir_lirc_close(void *data)
+ int id;
+diff -urNp linux-2.6.38.1/drivers/media/radio/radio-cadet.c linux-2.6.38.1/drivers/media/radio/radio-cadet.c
+--- linux-2.6.38.1/drivers/media/radio/radio-cadet.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/media/radio/radio-cadet.c 2011-03-21 18:31:35.000000000 -0400
+@@ -349,7 +349,7 @@ static ssize_t cadet_read(struct file *f
+ readbuf[i++] = dev->rdsbuf[dev->rdsout++];
+ mutex_unlock(&dev->lock);
+
+- if (copy_to_user(data, readbuf, i))
++ if (i > sizeof readbuf || copy_to_user(data, readbuf, i))
+ return -EFAULT;
+ return i;
+ }
+diff -urNp linux-2.6.38.1/drivers/media/rc/ir-lirc-codec.c linux-2.6.38.1/drivers/media/rc/ir-lirc-codec.c
+--- linux-2.6.38.1/drivers/media/rc/ir-lirc-codec.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/media/rc/ir-lirc-codec.c 2011-03-21 18:31:35.000000000 -0400
+@@ -277,7 +277,7 @@ static void ir_lirc_close(void *data)
return;
}
.owner = THIS_MODULE,
.write = ir_lirc_transmit_ir,
.unlocked_ioctl = ir_lirc_ioctl,
-diff -urNp linux-2.6.37.2/drivers/media/IR/lirc_dev.c linux-2.6.37.2/drivers/media/IR/lirc_dev.c
---- linux-2.6.37.2/drivers/media/IR/lirc_dev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/IR/lirc_dev.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/media/rc/lirc_dev.c linux-2.6.38.1/drivers/media/rc/lirc_dev.c
+--- linux-2.6.38.1/drivers/media/rc/lirc_dev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/media/rc/lirc_dev.c 2011-03-21 18:31:35.000000000 -0400
@@ -151,7 +151,7 @@ static int lirc_thread(void *irctl)
}
.owner = THIS_MODULE,
.read = lirc_dev_fop_read,
.write = lirc_dev_fop_write,
-diff -urNp linux-2.6.37.2/drivers/media/radio/radio-cadet.c linux-2.6.37.2/drivers/media/radio/radio-cadet.c
---- linux-2.6.37.2/drivers/media/radio/radio-cadet.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/radio/radio-cadet.c 2011-01-17 02:41:01.000000000 -0500
-@@ -349,7 +349,7 @@ static ssize_t cadet_read(struct file *f
- readbuf[i++] = dev->rdsbuf[dev->rdsout++];
- mutex_unlock(&dev->lock);
-
-- if (copy_to_user(data, readbuf, i))
-+ if (i > sizeof readbuf || copy_to_user(data, readbuf, i))
- return -EFAULT;
- return i;
- }
-diff -urNp linux-2.6.37.2/drivers/media/video/saa7164/saa7164-core.c linux-2.6.37.2/drivers/media/video/saa7164/saa7164-core.c
---- linux-2.6.37.2/drivers/media/video/saa7164/saa7164-core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/video/saa7164/saa7164-core.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1169,7 +1169,7 @@ static int saa7164_proc_open(struct inod
- return single_open(filp, saa7164_proc_show, NULL);
- }
-
--static struct file_operations saa7164_proc_fops = {
-+static const struct file_operations saa7164_proc_fops = {
- .open = saa7164_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
-diff -urNp linux-2.6.37.2/drivers/media/video/sn9c102/sn9c102_core.c linux-2.6.37.2/drivers/media/video/sn9c102/sn9c102_core.c
---- linux-2.6.37.2/drivers/media/video/sn9c102/sn9c102_core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/media/video/sn9c102/sn9c102_core.c 2011-02-27 15:17:29.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/media/video/sn9c102/sn9c102_core.c linux-2.6.38.1/drivers/media/video/sn9c102/sn9c102_core.c
+--- linux-2.6.38.1/drivers/media/video/sn9c102/sn9c102_core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/media/video/sn9c102/sn9c102_core.c 2011-03-21 18:31:35.000000000 -0400
@@ -1430,9 +1430,9 @@ static DEVICE_ATTR(i2c_reg, S_IRUGO | S_
sn9c102_show_i2c_reg, sn9c102_store_i2c_reg);
static DEVICE_ATTR(i2c_val, S_IRUGO | S_IWUSR,
static DEVICE_ATTR(frame_header, S_IRUGO, sn9c102_show_frame_header, NULL);
-diff -urNp linux-2.6.37.2/drivers/message/fusion/mptbase.c linux-2.6.37.2/drivers/message/fusion/mptbase.c
---- linux-2.6.37.2/drivers/message/fusion/mptbase.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/message/fusion/mptbase.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/message/fusion/mptbase.c linux-2.6.38.1/drivers/message/fusion/mptbase.c
+--- linux-2.6.38.1/drivers/message/fusion/mptbase.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/message/fusion/mptbase.c 2011-03-21 18:31:35.000000000 -0400
@@ -6683,8 +6683,13 @@ static int mpt_iocinfo_proc_show(struct
seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
/*
* Rounding UP to nearest 4-kB boundary here...
*/
-diff -urNp linux-2.6.37.2/drivers/message/fusion/mptdebug.h linux-2.6.37.2/drivers/message/fusion/mptdebug.h
---- linux-2.6.37.2/drivers/message/fusion/mptdebug.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/message/fusion/mptdebug.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/message/fusion/mptdebug.h linux-2.6.38.1/drivers/message/fusion/mptdebug.h
+--- linux-2.6.38.1/drivers/message/fusion/mptdebug.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/message/fusion/mptdebug.h 2011-03-21 18:31:35.000000000 -0400
@@ -71,7 +71,7 @@
CMD; \
}
#endif
-diff -urNp linux-2.6.37.2/drivers/message/fusion/mptsas.c linux-2.6.37.2/drivers/message/fusion/mptsas.c
---- linux-2.6.37.2/drivers/message/fusion/mptsas.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/message/fusion/mptsas.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/message/fusion/mptsas.c linux-2.6.38.1/drivers/message/fusion/mptsas.c
+--- linux-2.6.38.1/drivers/message/fusion/mptsas.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/message/fusion/mptsas.c 2011-03-21 18:31:35.000000000 -0400
@@ -439,6 +439,23 @@ mptsas_is_end_device(struct mptsas_devin
return 0;
}
static inline struct sas_port *
mptsas_get_port(struct mptsas_phyinfo *phy_info)
{
-diff -urNp linux-2.6.37.2/drivers/message/fusion/mptscsih.c linux-2.6.37.2/drivers/message/fusion/mptscsih.c
---- linux-2.6.37.2/drivers/message/fusion/mptscsih.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/drivers/message/fusion/mptscsih.c 2011-02-27 14:49:53.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/message/fusion/mptscsih.c linux-2.6.38.1/drivers/message/fusion/mptscsih.c
+--- linux-2.6.38.1/drivers/message/fusion/mptscsih.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/message/fusion/mptscsih.c 2011-03-21 18:31:35.000000000 -0400
@@ -1268,15 +1268,16 @@ mptscsih_info(struct Scsi_Host *SChost)
h = shost_priv(SChost);
return h->info_kbuf;
}
-diff -urNp linux-2.6.37.2/drivers/message/i2o/i2o_proc.c linux-2.6.37.2/drivers/message/i2o/i2o_proc.c
---- linux-2.6.37.2/drivers/message/i2o/i2o_proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/message/i2o/i2o_proc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/message/i2o/i2o_proc.c linux-2.6.38.1/drivers/message/i2o/i2o_proc.c
+--- linux-2.6.38.1/drivers/message/i2o/i2o_proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/message/i2o/i2o_proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -255,13 +255,6 @@ static char *scsi_devices[] = {
"Array Controller Device"
};
return 0;
}
-diff -urNp linux-2.6.37.2/drivers/mfd/ab3100-core.c linux-2.6.37.2/drivers/mfd/ab3100-core.c
---- linux-2.6.37.2/drivers/mfd/ab3100-core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mfd/ab3100-core.c 2011-02-27 15:32:39.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mfd/ab3100-core.c linux-2.6.38.1/drivers/mfd/ab3100-core.c
+--- linux-2.6.38.1/drivers/mfd/ab3100-core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mfd/ab3100-core.c 2011-03-21 18:31:35.000000000 -0400
@@ -613,7 +613,7 @@ static void ab3100_setup_debugfs(struct
ab3100_get_priv.ab3100 = ab3100;
ab3100_get_priv.mode = false;
&ab3100_get_set_reg_fops);
if (!ab3100_set_reg_file) {
err = -ENOMEM;
-diff -urNp linux-2.6.37.2/drivers/mfd/ab3550-core.c linux-2.6.37.2/drivers/mfd/ab3550-core.c
---- linux-2.6.37.2/drivers/mfd/ab3550-core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mfd/ab3550-core.c 2011-02-27 15:33:08.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mfd/ab3550-core.c linux-2.6.38.1/drivers/mfd/ab3550-core.c
+--- linux-2.6.38.1/drivers/mfd/ab3550-core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mfd/ab3550-core.c 2011-03-21 18:31:35.000000000 -0400
@@ -1053,17 +1053,17 @@ static inline void ab3550_setup_debugfs(
goto exit_destroy_dir;
if (!ab3550_val_file)
goto exit_destroy_address;
-diff -urNp linux-2.6.37.2/drivers/mfd/ab8500-debugfs.c linux-2.6.37.2/drivers/mfd/ab8500-debugfs.c
---- linux-2.6.37.2/drivers/mfd/ab8500-debugfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mfd/ab8500-debugfs.c 2011-02-27 15:33:15.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mfd/ab8500-debugfs.c linux-2.6.38.1/drivers/mfd/ab8500-debugfs.c
+--- linux-2.6.38.1/drivers/mfd/ab8500-debugfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mfd/ab8500-debugfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -585,18 +585,18 @@ static int __devinit ab8500_debug_probe(
- goto exit_destroy_dir;
-
- ab8500_bank_file = debugfs_create_file("register-bank",
-- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_bank_fops);
-+ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_bank_fops);
- if (!ab8500_bank_file)
- goto exit_destroy_reg;
-
- ab8500_address_file = debugfs_create_file("register-address",
-- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev,
-+ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev,
- &ab8500_address_fops);
- if (!ab8500_address_file)
- goto exit_destroy_bank;
-
- ab8500_val_file = debugfs_create_file("register-value",
-- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_val_fops);
-+ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_val_fops);
- if (!ab8500_val_file)
- goto exit_destroy_address;
-
-diff -urNp linux-2.6.37.2/drivers/mfd/janz-cmodio.c linux-2.6.37.2/drivers/mfd/janz-cmodio.c
---- linux-2.6.37.2/drivers/mfd/janz-cmodio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mfd/janz-cmodio.c 2011-01-17 02:41:01.000000000 -0500
+ goto exit_destroy_dir;
+
+ ab8500_bank_file = debugfs_create_file("register-bank",
+- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_bank_fops);
++ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_bank_fops);
+ if (!ab8500_bank_file)
+ goto exit_destroy_reg;
+
+ ab8500_address_file = debugfs_create_file("register-address",
+- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev,
++ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev,
+ &ab8500_address_fops);
+ if (!ab8500_address_file)
+ goto exit_destroy_bank;
+
+ ab8500_val_file = debugfs_create_file("register-value",
+- (S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_val_fops);
++ (S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_val_fops);
+ if (!ab8500_val_file)
+ goto exit_destroy_address;
+
+diff -urNp linux-2.6.38.1/drivers/mfd/janz-cmodio.c linux-2.6.38.1/drivers/mfd/janz-cmodio.c
+--- linux-2.6.38.1/drivers/mfd/janz-cmodio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mfd/janz-cmodio.c 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
-diff -urNp linux-2.6.37.2/drivers/misc/ep93xx_pwm.c linux-2.6.37.2/drivers/misc/ep93xx_pwm.c
---- linux-2.6.37.2/drivers/misc/ep93xx_pwm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/misc/ep93xx_pwm.c 2011-02-27 15:24:05.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/misc/ep93xx_pwm.c linux-2.6.38.1/drivers/misc/ep93xx_pwm.c
+--- linux-2.6.38.1/drivers/misc/ep93xx_pwm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/misc/ep93xx_pwm.c 2011-03-21 18:31:35.000000000 -0400
@@ -249,11 +249,11 @@ static ssize_t ep93xx_pwm_set_invert(str
static DEVICE_ATTR(min_freq, S_IRUGO, ep93xx_pwm_get_min_freq, NULL);
ep93xx_pwm_get_invert, ep93xx_pwm_set_invert);
static struct attribute *ep93xx_pwm_attrs[] = {
-diff -urNp linux-2.6.37.2/drivers/misc/kgdbts.c linux-2.6.37.2/drivers/misc/kgdbts.c
---- linux-2.6.37.2/drivers/misc/kgdbts.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/misc/kgdbts.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/misc/kgdbts.c linux-2.6.38.1/drivers/misc/kgdbts.c
+--- linux-2.6.38.1/drivers/misc/kgdbts.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/misc/kgdbts.c 2011-03-21 18:31:35.000000000 -0400
@@ -118,7 +118,7 @@
} while (0)
#define MAX_CONFIG_LEN 40
.name = "kgdbts",
.read_char = kgdbts_get_char,
.write_char = kgdbts_put_char,
-diff -urNp linux-2.6.37.2/drivers/misc/sgi-gru/gruhandles.c linux-2.6.37.2/drivers/misc/sgi-gru/gruhandles.c
---- linux-2.6.37.2/drivers/misc/sgi-gru/gruhandles.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/misc/sgi-gru/gruhandles.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/misc/sgi-gru/gruhandles.c linux-2.6.38.1/drivers/misc/sgi-gru/gruhandles.c
+--- linux-2.6.38.1/drivers/misc/sgi-gru/gruhandles.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/misc/sgi-gru/gruhandles.c 2011-03-21 18:31:35.000000000 -0400
@@ -44,8 +44,8 @@ static void update_mcs_stats(enum mcs_op
unsigned long nsec;
if (mcs_op_statistics[op].max < nsec)
mcs_op_statistics[op].max = nsec;
}
-diff -urNp linux-2.6.37.2/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.37.2/drivers/misc/sgi-gru/gruprocfs.c
---- linux-2.6.37.2/drivers/misc/sgi-gru/gruprocfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/misc/sgi-gru/gruprocfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.38.1/drivers/misc/sgi-gru/gruprocfs.c
+--- linux-2.6.38.1/drivers/misc/sgi-gru/gruprocfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/misc/sgi-gru/gruprocfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -32,9 +32,9 @@
#define printstat(s, f) printstat_val(s, &gru_stats.f, #f)
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.37.2/drivers/misc/sgi-gru/grutables.h linux-2.6.37.2/drivers/misc/sgi-gru/grutables.h
---- linux-2.6.37.2/drivers/misc/sgi-gru/grutables.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/misc/sgi-gru/grutables.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/misc/sgi-gru/grutables.h linux-2.6.38.1/drivers/misc/sgi-gru/grutables.h
+--- linux-2.6.38.1/drivers/misc/sgi-gru/grutables.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/misc/sgi-gru/grutables.h 2011-03-21 18:31:35.000000000 -0400
@@ -167,82 +167,82 @@ extern unsigned int gru_max_gids;
* GRU statistics.
*/
} while (0)
#ifdef CONFIG_SGI_GRU_DEBUG
-diff -urNp linux-2.6.37.2/drivers/mtd/devices/doc2000.c linux-2.6.37.2/drivers/mtd/devices/doc2000.c
---- linux-2.6.37.2/drivers/mtd/devices/doc2000.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mtd/devices/doc2000.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mtd/devices/doc2000.c linux-2.6.38.1/drivers/mtd/devices/doc2000.c
+--- linux-2.6.38.1/drivers/mtd/devices/doc2000.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mtd/devices/doc2000.c 2011-03-21 18:31:35.000000000 -0400
@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt
/* The ECC will not be calculated correctly if less than 512 is written */
printk(KERN_WARNING
"ECC needs a full sector write (adr: %lx size %lx)\n",
(long) to, (long) len);
-diff -urNp linux-2.6.37.2/drivers/mtd/devices/doc2001.c linux-2.6.37.2/drivers/mtd/devices/doc2001.c
---- linux-2.6.37.2/drivers/mtd/devices/doc2001.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mtd/devices/doc2001.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mtd/devices/doc2001.c linux-2.6.38.1/drivers/mtd/devices/doc2001.c
+--- linux-2.6.38.1/drivers/mtd/devices/doc2001.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mtd/devices/doc2001.c 2011-03-21 18:31:35.000000000 -0400
@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mt
struct Nand *mychip = &this->chips[from >> (this->chipshift)];
return -EINVAL;
/* Don't allow a single read to cross a 512-byte block boundary */
-diff -urNp linux-2.6.37.2/drivers/mtd/nand/denali.c linux-2.6.37.2/drivers/mtd/nand/denali.c
---- linux-2.6.37.2/drivers/mtd/nand/denali.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mtd/nand/denali.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mtd/nand/denali.c linux-2.6.38.1/drivers/mtd/nand/denali.c
+--- linux-2.6.38.1/drivers/mtd/nand/denali.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mtd/nand/denali.c 2011-03-21 18:31:35.000000000 -0400
@@ -25,6 +25,7 @@
#include <linux/pci.h>
#include <linux/mtd/mtd.h>
#include "denali.h"
-diff -urNp linux-2.6.37.2/drivers/mtd/ubi/build.c linux-2.6.37.2/drivers/mtd/ubi/build.c
---- linux-2.6.37.2/drivers/mtd/ubi/build.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/mtd/ubi/build.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/mtd/ubi/build.c linux-2.6.38.1/drivers/mtd/ubi/build.c
+--- linux-2.6.38.1/drivers/mtd/ubi/build.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/mtd/ubi/build.c 2011-03-21 18:31:35.000000000 -0400
@@ -1285,7 +1285,7 @@ module_exit(ubi_exit);
static int __init bytes_str_to_int(const char *str)
{
}
/**
-diff -urNp linux-2.6.37.2/drivers/net/e1000e/82571.c linux-2.6.37.2/drivers/net/e1000e/82571.c
---- linux-2.6.37.2/drivers/net/e1000e/82571.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/e1000e/82571.c 2011-01-17 02:41:01.000000000 -0500
-@@ -211,6 +211,7 @@ static s32 e1000_init_mac_params_82571(s
+diff -urNp linux-2.6.38.1/drivers/net/e1000e/82571.c linux-2.6.38.1/drivers/net/e1000e/82571.c
+--- linux-2.6.38.1/drivers/net/e1000e/82571.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/e1000e/82571.c 2011-03-21 18:31:35.000000000 -0400
+@@ -239,7 +239,7 @@ static s32 e1000_init_mac_params_82571(s
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
-+ /* cannot be const */
- struct e1000_mac_operations *func = &mac->ops;
+- struct e1000_mac_operations *func = &mac->ops;
++ struct e1000_mac_operations *func = &mac->ops; /* cannot be const */
u32 swsm = 0;
u32 swsm2 = 0;
-@@ -1740,7 +1741,7 @@ static void e1000_clear_hw_cntrs_82571(s
+ bool force_clear_smbi = false;
+@@ -1930,7 +1930,7 @@ static void e1000_clear_hw_cntrs_82571(s
er32(ICRXDMTC);
}
/* .check_mng_mode: mac type dependent */
/* .check_for_link: media type dependent */
.id_led_init = e1000e_id_led_init,
-@@ -1762,7 +1763,7 @@ static struct e1000_mac_operations e8257
+@@ -1952,7 +1952,7 @@ static struct e1000_mac_operations e8257
.read_mac_addr = e1000_read_mac_addr_82571,
};
.acquire = e1000_get_hw_semaphore_82571,
.check_polarity = e1000_check_polarity_igp,
.check_reset_block = e1000e_check_reset_block_generic,
-@@ -1780,7 +1781,7 @@ static struct e1000_phy_operations e82_p
+@@ -1970,7 +1970,7 @@ static struct e1000_phy_operations e82_p
.cfg_on_link_up = NULL,
};
.acquire = e1000_get_hw_semaphore_82571,
.check_polarity = e1000_check_polarity_m88,
.check_reset_block = e1000e_check_reset_block_generic,
-@@ -1798,7 +1799,7 @@ static struct e1000_phy_operations e82_p
+@@ -1988,7 +1988,7 @@ static struct e1000_phy_operations e82_p
.cfg_on_link_up = NULL,
};
.acquire = e1000_get_hw_semaphore_82571,
.check_polarity = e1000_check_polarity_m88,
.check_reset_block = e1000e_check_reset_block_generic,
-@@ -1816,7 +1817,7 @@ static struct e1000_phy_operations e82_p
+@@ -2006,7 +2006,7 @@ static struct e1000_phy_operations e82_p
.cfg_on_link_up = NULL,
};
.acquire = e1000_acquire_nvm_82571,
.read = e1000e_read_nvm_eerd,
.release = e1000_release_nvm_82571,
-diff -urNp linux-2.6.37.2/drivers/net/e1000e/e1000.h linux-2.6.37.2/drivers/net/e1000e/e1000.h
---- linux-2.6.37.2/drivers/net/e1000e/e1000.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/e1000e/e1000.h 2011-01-17 02:41:01.000000000 -0500
-@@ -407,9 +407,9 @@ struct e1000_info {
+diff -urNp linux-2.6.38.1/drivers/net/e1000e/e1000.h linux-2.6.38.1/drivers/net/e1000e/e1000.h
+--- linux-2.6.38.1/drivers/net/e1000e/e1000.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/e1000e/e1000.h 2011-03-21 18:31:35.000000000 -0400
+@@ -408,9 +408,9 @@ struct e1000_info {
u32 pba;
u32 max_hw_frame_size;
s32 (*get_variants)(struct e1000_adapter *);
};
/* hardware capability, feature, and workaround flags */
-diff -urNp linux-2.6.37.2/drivers/net/e1000e/es2lan.c linux-2.6.37.2/drivers/net/e1000e/es2lan.c
---- linux-2.6.37.2/drivers/net/e1000e/es2lan.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/e1000e/es2lan.c 2011-01-17 02:41:01.000000000 -0500
-@@ -205,6 +205,7 @@ static s32 e1000_init_mac_params_80003es
+diff -urNp linux-2.6.38.1/drivers/net/e1000e/es2lan.c linux-2.6.38.1/drivers/net/e1000e/es2lan.c
+--- linux-2.6.38.1/drivers/net/e1000e/es2lan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/e1000e/es2lan.c 2011-03-21 18:31:35.000000000 -0400
+@@ -205,7 +205,7 @@ static s32 e1000_init_mac_params_80003es
{
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
-+ /* cannot be const */
- struct e1000_mac_operations *func = &mac->ops;
+- struct e1000_mac_operations *func = &mac->ops;
++ struct e1000_mac_operations *func = &mac->ops; /* cannot be const */
/* Set media type */
-@@ -1431,7 +1432,7 @@ static void e1000_clear_hw_cntrs_80003es
+ switch (adapter->pdev->device) {
+@@ -1431,7 +1431,7 @@ static void e1000_clear_hw_cntrs_80003es
er32(ICRXDMTC);
}
.read_mac_addr = e1000_read_mac_addr_80003es2lan,
.id_led_init = e1000e_id_led_init,
.check_mng_mode = e1000e_check_mng_mode_generic,
-@@ -1453,7 +1454,7 @@ static struct e1000_mac_operations es2_m
+@@ -1453,7 +1453,7 @@ static struct e1000_mac_operations es2_m
.setup_led = e1000e_setup_led_generic,
};
.acquire = e1000_acquire_phy_80003es2lan,
.check_polarity = e1000_check_polarity_m88,
.check_reset_block = e1000e_check_reset_block_generic,
-@@ -1471,7 +1472,7 @@ static struct e1000_phy_operations es2_p
+@@ -1471,7 +1471,7 @@ static struct e1000_phy_operations es2_p
.cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan,
};
.acquire = e1000_acquire_nvm_80003es2lan,
.read = e1000e_read_nvm_eerd,
.release = e1000_release_nvm_80003es2lan,
-diff -urNp linux-2.6.37.2/drivers/net/e1000e/hw.h linux-2.6.37.2/drivers/net/e1000e/hw.h
---- linux-2.6.37.2/drivers/net/e1000e/hw.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/e1000e/hw.h 2011-01-17 02:41:01.000000000 -0500
-@@ -800,16 +800,17 @@ struct e1000_phy_operations {
+diff -urNp linux-2.6.38.1/drivers/net/e1000e/hw.h linux-2.6.38.1/drivers/net/e1000e/hw.h
+--- linux-2.6.38.1/drivers/net/e1000e/hw.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/e1000e/hw.h 2011-03-21 18:31:35.000000000 -0400
+@@ -801,16 +801,17 @@ struct e1000_phy_operations {
/* Function pointers for the NVM. */
struct e1000_nvm_operations {
- s32 (*valid_led_default)(struct e1000_hw *, u16 *);
- s32 (*validate)(struct e1000_hw *);
- s32 (*write)(struct e1000_hw *, u16, u16, u16 *);
-+ s32 (* const acquire)(struct e1000_hw *);
++ s32 (* acquire)(struct e1000_hw *); /* cannot be const, see drivers/net/e1000e/82571.c e1000_init_nvm_params_82571() */
+ s32 (* const read)(struct e1000_hw *, u16, u16, u16 *);
-+ void (* const release)(struct e1000_hw *);
++ void (* release)(struct e1000_hw *); /* cannot be const, see drivers/net/e1000e/82571.c e1000_init_nvm_params_82571() */
+ s32 (* const update)(struct e1000_hw *);
+ s32 (* const valid_led_default)(struct e1000_hw *, u16 *);
+ s32 (* const validate)(struct e1000_hw *);
struct e1000_mac_operations ops;
u8 addr[6];
-@@ -852,6 +853,7 @@ struct e1000_mac_info {
+@@ -853,6 +854,7 @@ struct e1000_mac_info {
};
struct e1000_phy_info {
struct e1000_phy_operations ops;
enum e1000_phy_type type;
-@@ -886,6 +888,7 @@ struct e1000_phy_info {
+@@ -887,6 +889,7 @@ struct e1000_phy_info {
};
struct e1000_nvm_info {
struct e1000_nvm_operations ops;
enum e1000_nvm_type type;
-diff -urNp linux-2.6.37.2/drivers/net/e1000e/ich8lan.c linux-2.6.37.2/drivers/net/e1000e/ich8lan.c
---- linux-2.6.37.2/drivers/net/e1000e/ich8lan.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/e1000e/ich8lan.c 2011-01-17 02:41:01.000000000 -0500
-@@ -3856,7 +3856,7 @@ static void e1000_clear_hw_cntrs_ich8lan
+diff -urNp linux-2.6.38.1/drivers/net/e1000e/ich8lan.c linux-2.6.38.1/drivers/net/e1000e/ich8lan.c
+--- linux-2.6.38.1/drivers/net/e1000e/ich8lan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/e1000e/ich8lan.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3840,7 +3840,7 @@ static void e1000_clear_hw_cntrs_ich8lan
}
}
.id_led_init = e1000e_id_led_init,
/* check_mng_mode dependent on mac type */
.check_for_link = e1000_check_for_copper_link_ich8lan,
-@@ -3875,7 +3875,7 @@ static struct e1000_mac_operations ich8_
+@@ -3859,7 +3859,7 @@ static struct e1000_mac_operations ich8_
/* id_led_init dependent on mac type */
};
.acquire = e1000_acquire_swflag_ich8lan,
.check_reset_block = e1000_check_reset_block_ich8lan,
.commit = NULL,
-@@ -3889,7 +3889,7 @@ static struct e1000_phy_operations ich8_
+@@ -3873,7 +3873,7 @@ static struct e1000_phy_operations ich8_
.write_reg = e1000e_write_phy_reg_igp,
};
.acquire = e1000_acquire_nvm_ich8lan,
.read = e1000_read_nvm_ich8lan,
.release = e1000_release_nvm_ich8lan,
-diff -urNp linux-2.6.37.2/drivers/net/igb/e1000_82575.c linux-2.6.37.2/drivers/net/igb/e1000_82575.c
---- linux-2.6.37.2/drivers/net/igb/e1000_82575.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/igb/e1000_82575.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1712,7 +1712,7 @@ u16 igb_rxpbs_adjust_82580(u32 data)
+diff -urNp linux-2.6.38.1/drivers/net/igb/e1000_82575.c linux-2.6.38.1/drivers/net/igb/e1000_82575.c
+--- linux-2.6.38.1/drivers/net/igb/e1000_82575.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/igb/e1000_82575.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1747,7 +1747,7 @@ u16 igb_rxpbs_adjust_82580(u32 data)
return ret_val;
}
.init_hw = igb_init_hw_82575,
.check_for_link = igb_check_for_link_82575,
.rar_set = igb_rar_set,
-@@ -1720,13 +1720,13 @@ static struct e1000_mac_operations e1000
+@@ -1755,13 +1755,13 @@ static struct e1000_mac_operations e1000
.get_speed_and_duplex = igb_get_speed_and_duplex_copper,
};
.acquire = igb_acquire_nvm_82575,
.read = igb_read_nvm_eerd,
.release = igb_release_nvm_82575,
-diff -urNp linux-2.6.37.2/drivers/net/igb/e1000_hw.h linux-2.6.37.2/drivers/net/igb/e1000_hw.h
---- linux-2.6.37.2/drivers/net/igb/e1000_hw.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/igb/e1000_hw.h 2011-01-17 02:41:01.000000000 -0500
-@@ -325,22 +325,23 @@ struct e1000_phy_operations {
+diff -urNp linux-2.6.38.1/drivers/net/igb/e1000_hw.h linux-2.6.38.1/drivers/net/igb/e1000_hw.h
+--- linux-2.6.38.1/drivers/net/igb/e1000_hw.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/igb/e1000_hw.h 2011-03-21 18:31:35.000000000 -0400
+@@ -327,22 +327,23 @@ struct e1000_phy_operations {
};
struct e1000_nvm_operations {
struct e1000_mac_operations ops;
u8 addr[6];
-@@ -379,6 +380,7 @@ struct e1000_mac_info {
+@@ -381,6 +382,7 @@ struct e1000_mac_info {
};
struct e1000_phy_info {
struct e1000_phy_operations ops;
enum e1000_phy_type type;
-@@ -414,6 +416,7 @@ struct e1000_phy_info {
+@@ -416,6 +418,7 @@ struct e1000_phy_info {
};
struct e1000_nvm_info {
struct e1000_nvm_operations ops;
enum e1000_nvm_type type;
-diff -urNp linux-2.6.37.2/drivers/net/igbvf/vf.h linux-2.6.37.2/drivers/net/igbvf/vf.h
---- linux-2.6.37.2/drivers/net/igbvf/vf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/igbvf/vf.h 2011-01-17 02:41:01.000000000 -0500
-@@ -189,6 +189,7 @@ struct e1000_mac_operations {
+diff -urNp linux-2.6.38.1/drivers/net/igbvf/vf.h linux-2.6.38.1/drivers/net/igbvf/vf.h
+--- linux-2.6.38.1/drivers/net/igbvf/vf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/igbvf/vf.h 2011-03-21 18:31:35.000000000 -0400
+@@ -191,6 +191,7 @@ struct e1000_mac_operations {
};
struct e1000_mac_info {
struct e1000_mac_operations ops;
u8 addr[6];
u8 perm_addr[6];
-diff -urNp linux-2.6.37.2/drivers/net/irda/vlsi_ir.c linux-2.6.37.2/drivers/net/irda/vlsi_ir.c
---- linux-2.6.37.2/drivers/net/irda/vlsi_ir.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/irda/vlsi_ir.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/irda/vlsi_ir.c linux-2.6.38.1/drivers/net/irda/vlsi_ir.c
+--- linux-2.6.38.1/drivers/net/irda/vlsi_ir.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/irda/vlsi_ir.c 2011-03-21 18:31:35.000000000 -0400
@@ -907,13 +907,12 @@ static netdev_tx_t vlsi_hard_start_xmit(
/* no race - tx-ring already empty */
vlsi_set_baud(idev, iobase);
spin_unlock_irqrestore(&idev->lock, flags);
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
-diff -urNp linux-2.6.37.2/drivers/net/macvtap.c linux-2.6.37.2/drivers/net/macvtap.c
---- linux-2.6.37.2/drivers/net/macvtap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/macvtap.c 2011-01-17 02:41:01.000000000 -0500
-@@ -529,8 +529,9 @@ static ssize_t macvtap_get_user(struct m
- vnet_hdr_len = q->vnet_hdr_sz;
-
- err = -EINVAL;
-- if ((len -= vnet_hdr_len) < 0)
-+ if (len < vnet_hdr_len)
- goto err;
-+ len -= vnet_hdr_len;
-
- err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0,
- sizeof(vnet_hdr));
-diff -urNp linux-2.6.37.2/drivers/net/pcnet32.c linux-2.6.37.2/drivers/net/pcnet32.c
---- linux-2.6.37.2/drivers/net/pcnet32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/pcnet32.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/pcnet32.c linux-2.6.38.1/drivers/net/pcnet32.c
+--- linux-2.6.38.1/drivers/net/pcnet32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/pcnet32.c 2011-03-21 18:31:35.000000000 -0400
@@ -82,7 +82,7 @@ static int cards_found;
/*
* VLB I/O addresses
{ 0x300, 0x320, 0x340, 0x360, 0 };
static int pcnet32_debug;
-diff -urNp linux-2.6.37.2/drivers/net/ppp_generic.c linux-2.6.37.2/drivers/net/ppp_generic.c
---- linux-2.6.37.2/drivers/net/ppp_generic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/ppp_generic.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/ppp_generic.c linux-2.6.38.1/drivers/net/ppp_generic.c
+--- linux-2.6.38.1/drivers/net/ppp_generic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/ppp_generic.c 2011-03-21 18:31:35.000000000 -0400
@@ -986,7 +986,6 @@ ppp_net_ioctl(struct net_device *dev, st
void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
struct ppp_stats stats;
break;
err = 0;
break;
-diff -urNp linux-2.6.37.2/drivers/net/tg3.h linux-2.6.37.2/drivers/net/tg3.h
---- linux-2.6.37.2/drivers/net/tg3.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/tg3.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/tg3.h linux-2.6.38.1/drivers/net/tg3.h
+--- linux-2.6.38.1/drivers/net/tg3.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/tg3.h 2011-03-21 18:31:35.000000000 -0400
@@ -131,6 +131,7 @@
#define CHIPREV_ID_5750_A0 0x4000
#define CHIPREV_ID_5750_A1 0x4001
#define CHIPREV_ID_5750_C2 0x4202
#define CHIPREV_ID_5752_A0_HW 0x5000
#define CHIPREV_ID_5752_A0 0x6000
-diff -urNp linux-2.6.37.2/drivers/net/tulip/de4x5.c linux-2.6.37.2/drivers/net/tulip/de4x5.c
---- linux-2.6.37.2/drivers/net/tulip/de4x5.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/tulip/de4x5.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/tulip/de4x5.c linux-2.6.38.1/drivers/net/tulip/de4x5.c
+--- linux-2.6.38.1/drivers/net/tulip/de4x5.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/tulip/de4x5.c 2011-03-21 18:31:35.000000000 -0400
@@ -5401,7 +5401,7 @@ de4x5_ioctl(struct net_device *dev, stru
for (i=0; i<ETH_ALEN; i++) {
tmp.addr[i] = dev->dev_addr[i];
return -EFAULT;
break;
}
-diff -urNp linux-2.6.37.2/drivers/net/usb/hso.c linux-2.6.37.2/drivers/net/usb/hso.c
---- linux-2.6.37.2/drivers/net/usb/hso.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/usb/hso.c 2011-01-24 18:04:15.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/usb/hso.c linux-2.6.38.1/drivers/net/usb/hso.c
+--- linux-2.6.38.1/drivers/net/usb/hso.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/usb/hso.c 2011-03-21 18:31:35.000000000 -0400
@@ -71,7 +71,7 @@
#include <asm/byteorder.h>
#include <linux/serial_core.h>
spinlock_t serial_lock;
int (*write_data) (struct hso_serial *serial);
-@@ -1187,7 +1187,7 @@ static void put_rxbuf_data_and_resubmit_
+@@ -1190,7 +1190,7 @@ static void put_rxbuf_data_and_resubmit_
struct urb *urb;
urb = serial->rx_urb[0];
count = put_rxbuf_data(urb, serial);
if (count == -1)
return;
-@@ -1223,7 +1223,7 @@ static void hso_std_serial_read_bulk_cal
+@@ -1226,7 +1226,7 @@ static void hso_std_serial_read_bulk_cal
DUMP1(urb->transfer_buffer, urb->actual_length);
/* Anyone listening? */
return;
if (status == 0) {
-@@ -1318,8 +1318,7 @@ static int hso_serial_open(struct tty_st
+@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_st
spin_unlock_irq(&serial->serial_lock);
/* check for port already opened, if not set the termios */
serial->rx_state = RX_IDLE;
/* Force default termio settings */
_hso_serial_set_termios(tty, NULL);
-@@ -1331,7 +1330,7 @@ static int hso_serial_open(struct tty_st
+@@ -1324,7 +1323,7 @@ static int hso_serial_open(struct tty_st
result = hso_start_serial_device(serial->parent, GFP_KERNEL);
if (result) {
hso_stop_serial_device(serial->parent);
kref_put(&serial->parent->ref, hso_serial_ref_free);
}
} else {
-@@ -1368,10 +1367,10 @@ static void hso_serial_close(struct tty_
+@@ -1361,10 +1360,10 @@ static void hso_serial_close(struct tty_
/* reset the rts and dtr */
/* do the actual close */
spin_lock_irq(&serial->serial_lock);
if (serial->tty == tty) {
serial->tty->driver_data = NULL;
-@@ -1453,7 +1452,7 @@ static void hso_serial_set_termios(struc
+@@ -1446,7 +1445,7 @@ static void hso_serial_set_termios(struc
/* the actual setup */
spin_lock_irqsave(&serial->serial_lock, flags);
_hso_serial_set_termios(tty, old);
else
tty->termios = old;
-@@ -1913,7 +1912,7 @@ static void intr_callback(struct urb *ur
+@@ -1905,7 +1904,7 @@ static void intr_callback(struct urb *ur
D1("Pending read interrupt on port %d\n", i);
spin_lock(&serial->serial_lock);
if (serial->rx_state == RX_IDLE &&
/* Setup and send a ctrl req read on
* port i */
if (!serial->rx_urb_filled[0]) {
-@@ -3105,7 +3104,7 @@ static int hso_resume(struct usb_interfa
+@@ -3097,7 +3096,7 @@ static int hso_resume(struct usb_interfa
/* Start all serial ports */
for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
if (serial_table[i] && (serial_table[i]->interface == iface)) {
result =
hso_start_serial_device(serial_table[i], GFP_NOIO);
hso_kick_transmit(dev2ser(serial_table[i]));
-diff -urNp linux-2.6.37.2/drivers/net/wireless/b43/debugfs.c linux-2.6.37.2/drivers/net/wireless/b43/debugfs.c
---- linux-2.6.37.2/drivers/net/wireless/b43/debugfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/wireless/b43/debugfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/wireless/b43/debugfs.c linux-2.6.38.1/drivers/net/wireless/b43/debugfs.c
+--- linux-2.6.38.1/drivers/net/wireless/b43/debugfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/wireless/b43/debugfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ static struct dentry *rootdir;
struct b43_debugfs_fops {
ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
/* Offset of struct b43_dfs_file in struct b43_dfsentry */
size_t file_struct_offset;
};
-diff -urNp linux-2.6.37.2/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.37.2/drivers/net/wireless/b43legacy/debugfs.c
---- linux-2.6.37.2/drivers/net/wireless/b43legacy/debugfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/wireless/b43legacy/debugfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.38.1/drivers/net/wireless/b43legacy/debugfs.c
+--- linux-2.6.38.1/drivers/net/wireless/b43legacy/debugfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/wireless/b43legacy/debugfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -44,7 +44,7 @@ static struct dentry *rootdir;
struct b43legacy_debugfs_fops {
ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
/* 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.37.2/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.37.2/drivers/net/wireless/iwlwifi/iwl-debug.h
---- linux-2.6.37.2/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.38.1/drivers/net/wireless/iwlwifi/iwl-debug.h
+--- linux-2.6.38.1/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/wireless/iwlwifi/iwl-debug.h 2011-03-21 18:31:35.000000000 -0400
@@ -68,8 +68,8 @@ do {
} while (0)
static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
const void *p, u32 len)
{}
-diff -urNp linux-2.6.37.2/drivers/net/wireless/libertas/debugfs.c linux-2.6.37.2/drivers/net/wireless/libertas/debugfs.c
---- linux-2.6.37.2/drivers/net/wireless/libertas/debugfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/wireless/libertas/debugfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/net/wireless/libertas/debugfs.c linux-2.6.38.1/drivers/net/wireless/libertas/debugfs.c
+--- linux-2.6.38.1/drivers/net/wireless/libertas/debugfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/wireless/libertas/debugfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -702,7 +702,7 @@ out_unlock:
struct lbs_debugfs_files {
const char *name;
};
static const struct lbs_debugfs_files debugfs_files[] = {
-diff -urNp linux-2.6.37.2/drivers/net/wireless/rndis_wlan.c linux-2.6.37.2/drivers/net/wireless/rndis_wlan.c
---- linux-2.6.37.2/drivers/net/wireless/rndis_wlan.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/net/wireless/rndis_wlan.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1236,7 +1236,7 @@ static int set_rts_threshold(struct usbn
+diff -urNp linux-2.6.38.1/drivers/net/wireless/rndis_wlan.c linux-2.6.38.1/drivers/net/wireless/rndis_wlan.c
+--- linux-2.6.38.1/drivers/net/wireless/rndis_wlan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/net/wireless/rndis_wlan.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1277,7 +1277,7 @@ static int set_rts_threshold(struct usbn
netdev_dbg(usbdev->net, "%s(): %i\n", __func__, rts_threshold);
rts_threshold = 2347;
tmp = cpu_to_le32(rts_threshold);
-diff -urNp linux-2.6.37.2/drivers/oprofile/buffer_sync.c linux-2.6.37.2/drivers/oprofile/buffer_sync.c
---- linux-2.6.37.2/drivers/oprofile/buffer_sync.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/buffer_sync.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/buffer_sync.c linux-2.6.38.1/drivers/oprofile/buffer_sync.c
+--- linux-2.6.38.1/drivers/oprofile/buffer_sync.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/buffer_sync.c 2011-03-21 18:31:35.000000000 -0400
@@ -342,7 +342,7 @@ static void add_data(struct op_entry *en
if (cookie == NO_COOKIE)
offset = pc;
}
}
release_mm(mm);
-diff -urNp linux-2.6.37.2/drivers/oprofile/event_buffer.c linux-2.6.37.2/drivers/oprofile/event_buffer.c
---- linux-2.6.37.2/drivers/oprofile/event_buffer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/event_buffer.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/event_buffer.c linux-2.6.38.1/drivers/oprofile/event_buffer.c
+--- linux-2.6.38.1/drivers/oprofile/event_buffer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/event_buffer.c 2011-03-21 18:31:35.000000000 -0400
@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value
}
return;
}
-diff -urNp linux-2.6.37.2/drivers/oprofile/oprof.c linux-2.6.37.2/drivers/oprofile/oprof.c
---- linux-2.6.37.2/drivers/oprofile/oprof.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/oprof.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/oprof.c linux-2.6.38.1/drivers/oprofile/oprof.c
+--- linux-2.6.38.1/drivers/oprofile/oprof.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/oprof.c 2011-03-21 18:31:35.000000000 -0400
@@ -110,7 +110,7 @@ static void switch_worker(struct work_st
if (oprofile_ops.switch_events())
return;
start_switch_worker();
}
-diff -urNp linux-2.6.37.2/drivers/oprofile/oprofilefs.c linux-2.6.37.2/drivers/oprofile/oprofilefs.c
---- linux-2.6.37.2/drivers/oprofile/oprofilefs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/oprofilefs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/oprofilefs.c linux-2.6.38.1/drivers/oprofile/oprofilefs.c
+--- linux-2.6.38.1/drivers/oprofile/oprofilefs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/oprofilefs.c 2011-03-21 18:31:35.000000000 -0400
@@ -186,7 +186,7 @@ static const struct file_operations atom
{
return __oprofilefs_create_file(sb, root, name,
&atomic_ro_fops, 0444, val);
-diff -urNp linux-2.6.37.2/drivers/oprofile/oprofile_stats.c linux-2.6.37.2/drivers/oprofile/oprofile_stats.c
---- linux-2.6.37.2/drivers/oprofile/oprofile_stats.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/oprofile_stats.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/oprofile_stats.c linux-2.6.38.1/drivers/oprofile/oprofile_stats.c
+--- linux-2.6.38.1/drivers/oprofile/oprofile_stats.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/oprofile_stats.c 2011-03-21 18:31:35.000000000 -0400
@@ -30,11 +30,11 @@ void oprofile_reset_stats(void)
cpu_buf->sample_invalid_eip = 0;
}
}
-diff -urNp linux-2.6.37.2/drivers/oprofile/oprofile_stats.h linux-2.6.37.2/drivers/oprofile/oprofile_stats.h
---- linux-2.6.37.2/drivers/oprofile/oprofile_stats.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/oprofile/oprofile_stats.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/oprofile/oprofile_stats.h linux-2.6.38.1/drivers/oprofile/oprofile_stats.h
+--- linux-2.6.38.1/drivers/oprofile/oprofile_stats.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/oprofile/oprofile_stats.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,11 +13,11 @@
#include <asm/atomic.h>
};
extern struct oprofile_stat_struct oprofile_stats;
-diff -urNp linux-2.6.37.2/drivers/parport/procfs.c linux-2.6.37.2/drivers/parport/procfs.c
---- linux-2.6.37.2/drivers/parport/procfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/parport/procfs.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/parport/procfs.c linux-2.6.38.1/drivers/parport/procfs.c
+--- linux-2.6.38.1/drivers/parport/procfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/parport/procfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *t
*ppos += len;
}
#endif /* IEEE1284.3 support. */
-diff -urNp linux-2.6.37.2/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.37.2/drivers/pci/hotplug/acpiphp_glue.c
---- linux-2.6.37.2/drivers/pci/hotplug/acpiphp_glue.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/hotplug/acpiphp_glue.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.38.1/drivers/pci/hotplug/acpiphp_glue.c
+--- linux-2.6.38.1/drivers/pci/hotplug/acpiphp_glue.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/hotplug/acpiphp_glue.c 2011-03-21 18:31:35.000000000 -0400
@@ -110,7 +110,7 @@ static int post_dock_fixups(struct notif
}
.handler = handle_hotplug_event_func,
};
-diff -urNp linux-2.6.37.2/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.37.2/drivers/pci/hotplug/cpqphp_nvram.c
---- linux-2.6.37.2/drivers/pci/hotplug/cpqphp_nvram.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/hotplug/cpqphp_nvram.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.38.1/drivers/pci/hotplug/cpqphp_nvram.c
+--- linux-2.6.38.1/drivers/pci/hotplug/cpqphp_nvram.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/hotplug/cpqphp_nvram.c 2011-03-21 18:31:35.000000000 -0400
@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_
void compaq_nvram_init (void __iomem *rom_start)
dbg("int15 entry = %p\n", compaq_int15_entry_point);
/* initialize our int15 lock */
-diff -urNp linux-2.6.37.2/drivers/pci/intel-iommu.c linux-2.6.37.2/drivers/pci/intel-iommu.c
---- linux-2.6.37.2/drivers/pci/intel-iommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/intel-iommu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pci/intel-iommu.c linux-2.6.38.1/drivers/pci/intel-iommu.c
+--- linux-2.6.38.1/drivers/pci/intel-iommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/intel-iommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -2934,7 +2934,7 @@ static int intel_mapping_error(struct de
return !dma_addr;
}
.alloc_coherent = intel_alloc_coherent,
.free_coherent = intel_free_coherent,
.map_sg = intel_map_sg,
-diff -urNp linux-2.6.37.2/drivers/pci/pcie/portdrv_pci.c linux-2.6.37.2/drivers/pci/pcie/portdrv_pci.c
---- linux-2.6.37.2/drivers/pci/pcie/portdrv_pci.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/pcie/portdrv_pci.c 2011-01-17 02:41:01.000000000 -0500
-@@ -276,7 +276,7 @@ static void pcie_portdrv_err_resume(stru
+diff -urNp linux-2.6.38.1/drivers/pci/pcie/aspm.c linux-2.6.38.1/drivers/pci/pcie/aspm.c
+--- linux-2.6.38.1/drivers/pci/pcie/aspm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/pcie/aspm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -27,9 +27,9 @@
+ #define MODULE_PARAM_PREFIX "pcie_aspm."
+
+ /* Note: those are not register definitions */
+-#define ASPM_STATE_L0S_UP (1) /* Upstream direction L0s state */
+-#define ASPM_STATE_L0S_DW (2) /* Downstream direction L0s state */
+-#define ASPM_STATE_L1 (4) /* L1 state */
++#define ASPM_STATE_L0S_UP (1U) /* Upstream direction L0s state */
++#define ASPM_STATE_L0S_DW (2U) /* Downstream direction L0s state */
++#define ASPM_STATE_L1 (4U) /* L1 state */
+ #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.38.1/drivers/pci/pcie/portdrv_pci.c linux-2.6.38.1/drivers/pci/pcie/portdrv_pci.c
+--- linux-2.6.38.1/drivers/pci/pcie/portdrv_pci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/pcie/portdrv_pci.c 2011-03-21 18:31:35.000000000 -0400
+@@ -307,7 +307,7 @@ static void pcie_portdrv_err_resume(stru
static const struct pci_device_id port_pci_ids[] = { {
/* handle any PCI-Express port */
PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0),
};
MODULE_DEVICE_TABLE(pci, port_pci_ids);
-diff -urNp linux-2.6.37.2/drivers/pci/probe.c linux-2.6.37.2/drivers/pci/probe.c
---- linux-2.6.37.2/drivers/pci/probe.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/probe.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pci/probe.c linux-2.6.38.1/drivers/pci/probe.c
+--- linux-2.6.38.1/drivers/pci/probe.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/probe.c 2011-03-21 18:31:35.000000000 -0400
@@ -62,14 +62,14 @@ static ssize_t pci_bus_show_cpuaffinity(
return ret;
}
if (!dev->mmio_always_on) {
pci_read_config_word(dev, PCI_COMMAND, &orig_cmd);
-diff -urNp linux-2.6.37.2/drivers/pci/proc.c linux-2.6.37.2/drivers/pci/proc.c
---- linux-2.6.37.2/drivers/pci/proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pci/proc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pci/proc.c linux-2.6.38.1/drivers/pci/proc.c
+--- linux-2.6.38.1/drivers/pci/proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pci/proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -476,7 +476,16 @@ static const struct file_operations proc
static int __init pci_proc_init(void)
{
proc_create("devices", 0, proc_bus_pci_dir,
&proc_bus_pci_dev_operations);
proc_initialized = 1;
-diff -urNp linux-2.6.37.2/drivers/pcmcia/ti113x.h linux-2.6.37.2/drivers/pcmcia/ti113x.h
---- linux-2.6.37.2/drivers/pcmcia/ti113x.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pcmcia/ti113x.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pcmcia/ti113x.h linux-2.6.38.1/drivers/pcmcia/ti113x.h
+--- linux-2.6.38.1/drivers/pcmcia/ti113x.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pcmcia/ti113x.h 2011-03-21 18:31:35.000000000 -0400
@@ -936,7 +936,7 @@ static struct pci_device_id ene_tune_tbl
DEVID(PCI_VENDOR_ID_MOTOROLA, 0x3410, 0xECC0, PCI_ANY_ID,
ENE_TEST_C9_TLTENABLE | ENE_TEST_C9_PFENABLE, ENE_TEST_C9_TLTENABLE),
};
static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
-diff -urNp linux-2.6.37.2/drivers/pcmcia/yenta_socket.c linux-2.6.37.2/drivers/pcmcia/yenta_socket.c
---- linux-2.6.37.2/drivers/pcmcia/yenta_socket.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pcmcia/yenta_socket.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pcmcia/yenta_socket.c linux-2.6.38.1/drivers/pcmcia/yenta_socket.c
+--- linux-2.6.38.1/drivers/pcmcia/yenta_socket.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pcmcia/yenta_socket.c 2011-03-21 18:31:35.000000000 -0400
@@ -1426,7 +1426,7 @@ static struct pci_device_id yenta_table[
/* match any cardbus bridge */
};
MODULE_DEVICE_TABLE(pci, yenta_table);
-diff -urNp linux-2.6.37.2/drivers/platform/x86/acer-wmi.c linux-2.6.37.2/drivers/platform/x86/acer-wmi.c
---- linux-2.6.37.2/drivers/platform/x86/acer-wmi.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/acer-wmi.c 2011-02-27 14:49:58.000000000 -0500
-@@ -915,7 +915,7 @@ static int update_bl_status(struct backl
- return 0;
- }
-
--static struct backlight_ops acer_bl_ops = {
-+static const struct backlight_ops acer_bl_ops = {
- .get_brightness = read_brightness,
- .update_status = update_bl_status,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/asus_acpi.c linux-2.6.37.2/drivers/platform/x86/asus_acpi.c
---- linux-2.6.37.2/drivers/platform/x86/asus_acpi.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/asus_acpi.c 2011-02-27 14:49:58.000000000 -0500
-@@ -1461,7 +1461,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.37.2/drivers/platform/x86/asus-laptop.c linux-2.6.37.2/drivers/platform/x86/asus-laptop.c
---- linux-2.6.37.2/drivers/platform/x86/asus-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/asus-laptop.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/platform/x86/asus-laptop.c linux-2.6.38.1/drivers/platform/x86/asus-laptop.c
+--- linux-2.6.38.1/drivers/platform/x86/asus-laptop.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/platform/x86/asus-laptop.c 2011-03-21 18:31:35.000000000 -0400
@@ -243,7 +243,6 @@ struct asus_laptop {
struct asus_led gled;
struct asus_led kled;
int wireless_status;
bool have_rsts;
int lcd_state;
-@@ -640,7 +639,7 @@ static int update_bl_status(struct backl
- return asus_lcd_set(asus, value);
- }
-
--static struct backlight_ops asusbl_ops = {
-+static const struct backlight_ops asusbl_ops = {
- .get_brightness = asus_read_brightness,
- .update_status = update_bl_status,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/dell-laptop.c linux-2.6.37.2/drivers/platform/x86/dell-laptop.c
---- linux-2.6.37.2/drivers/platform/x86/dell-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/dell-laptop.c 2011-01-17 02:41:01.000000000 -0500
-@@ -546,7 +546,7 @@ out:
- return buffer->output[1];
- }
-
--static struct backlight_ops dell_ops = {
-+static const struct backlight_ops dell_ops = {
- .get_brightness = dell_get_intensity,
- .update_status = dell_send_intensity,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/eeepc-laptop.c linux-2.6.37.2/drivers/platform/x86/eeepc-laptop.c
---- linux-2.6.37.2/drivers/platform/x86/eeepc-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/eeepc-laptop.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1115,7 +1115,7 @@ static int update_bl_status(struct backl
- return set_brightness(bd, bd->props.brightness);
- }
-
--static struct backlight_ops eeepcbl_ops = {
-+static const struct backlight_ops eeepcbl_ops = {
- .get_brightness = read_brightness,
- .update_status = update_bl_status,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/fujitsu-laptop.c linux-2.6.37.2/drivers/platform/x86/fujitsu-laptop.c
---- linux-2.6.37.2/drivers/platform/x86/fujitsu-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/fujitsu-laptop.c 2011-01-17 02:41:01.000000000 -0500
-@@ -437,7 +437,7 @@ static int bl_update_status(struct backl
- return ret;
- }
-
--static struct backlight_ops fujitsubl_ops = {
-+static const struct backlight_ops fujitsubl_ops = {
- .get_brightness = bl_get_brightness,
- .update_status = bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/sony-laptop.c linux-2.6.37.2/drivers/platform/x86/sony-laptop.c
---- linux-2.6.37.2/drivers/platform/x86/sony-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/sony-laptop.c 2011-01-17 02:41:01.000000000 -0500
-@@ -856,7 +856,7 @@ static int sony_backlight_get_brightness
- }
-
- static struct backlight_device *sony_backlight_device;
--static struct backlight_ops sony_backlight_ops = {
-+static const struct backlight_ops sony_backlight_ops = {
- .update_status = sony_backlight_update_status,
- .get_brightness = sony_backlight_get_brightness,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/thinkpad_acpi.c linux-2.6.37.2/drivers/platform/x86/thinkpad_acpi.c
---- linux-2.6.37.2/drivers/platform/x86/thinkpad_acpi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/thinkpad_acpi.c 2011-01-17 02:41:01.000000000 -0500
-@@ -6109,7 +6109,7 @@ static void tpacpi_brightness_notify_cha
- BACKLIGHT_UPDATE_HOTKEY);
- }
-
--static struct backlight_ops ibm_backlight_data = {
-+static const struct backlight_ops ibm_backlight_data = {
- .get_brightness = brightness_get,
- .update_status = brightness_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/platform/x86/toshiba_acpi.c linux-2.6.37.2/drivers/platform/x86/toshiba_acpi.c
---- linux-2.6.37.2/drivers/platform/x86/toshiba_acpi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/platform/x86/toshiba_acpi.c 2011-01-17 02:41:01.000000000 -0500
-@@ -841,7 +841,7 @@ static void remove_toshiba_proc_entries(
- remove_proc_entry("version", toshiba_proc_dir);
- }
-
--static struct backlight_ops toshiba_backlight_data = {
-+static const struct backlight_ops toshiba_backlight_data = {
- .get_brightness = get_lcd,
- .update_status = set_lcd_status,
- };
-diff -urNp linux-2.6.37.2/drivers/pnp/pnpbios/bioscalls.c linux-2.6.37.2/drivers/pnp/pnpbios/bioscalls.c
---- linux-2.6.37.2/drivers/pnp/pnpbios/bioscalls.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pnp/pnpbios/bioscalls.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pnp/pnpbios/bioscalls.c linux-2.6.38.1/drivers/pnp/pnpbios/bioscalls.c
+--- linux-2.6.38.1/drivers/pnp/pnpbios/bioscalls.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pnp/pnpbios/bioscalls.c 2011-03-21 18:31:35.000000000 -0400
@@ -59,7 +59,7 @@ do { \
set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \
} while(0)
+
+ pax_close_kernel();
}
-diff -urNp linux-2.6.37.2/drivers/pnp/quirks.c linux-2.6.37.2/drivers/pnp/quirks.c
---- linux-2.6.37.2/drivers/pnp/quirks.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pnp/quirks.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pnp/quirks.c linux-2.6.38.1/drivers/pnp/quirks.c
+--- linux-2.6.38.1/drivers/pnp/quirks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pnp/quirks.c 2011-03-21 18:31:35.000000000 -0400
@@ -322,7 +322,7 @@ static struct pnp_fixup pnp_fixups[] = {
/* PnP resources that might overlap PCI BARs */
{"PNP0c01", quirk_system_pci_resources},
};
void pnp_fixup_device(struct pnp_dev *dev)
-diff -urNp linux-2.6.37.2/drivers/pnp/resource.c linux-2.6.37.2/drivers/pnp/resource.c
---- linux-2.6.37.2/drivers/pnp/resource.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/pnp/resource.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/pnp/resource.c linux-2.6.38.1/drivers/pnp/resource.c
+--- linux-2.6.38.1/drivers/pnp/resource.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/pnp/resource.c 2011-03-21 18:31:35.000000000 -0400
@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, s
return 1;
return 0;
/* check if the resource is reserved */
-diff -urNp linux-2.6.37.2/drivers/rtc/rtc-dev.c linux-2.6.37.2/drivers/rtc/rtc-dev.c
---- linux-2.6.37.2/drivers/rtc/rtc-dev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/rtc/rtc-dev.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/rtc/rtc-dev.c linux-2.6.38.1/drivers/rtc/rtc-dev.c
+--- linux-2.6.38.1/drivers/rtc/rtc-dev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/rtc/rtc-dev.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/rtc.h>
#include "rtc-core.h"
static dev_t rtc_devt;
-@@ -357,6 +358,8 @@ static long rtc_dev_ioctl(struct file *f
+@@ -345,6 +346,8 @@ static long rtc_dev_ioctl(struct file *f
if (copy_from_user(&tm, uarg, sizeof(tm)))
return -EFAULT;
return rtc_set_time(rtc, &tm);
case RTC_PIE_ON:
-diff -urNp linux-2.6.37.2/drivers/rtc/rtc-ds1511.c linux-2.6.37.2/drivers/rtc/rtc-ds1511.c
---- linux-2.6.37.2/drivers/rtc/rtc-ds1511.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/rtc/rtc-ds1511.c 2011-02-27 15:20:36.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/rtc/rtc-ds1511.c linux-2.6.38.1/drivers/rtc/rtc-ds1511.c
+--- linux-2.6.38.1/drivers/rtc/rtc-ds1511.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/rtc/rtc-ds1511.c 2011-03-21 18:31:35.000000000 -0400
@@ -485,7 +485,7 @@ ds1511_nvram_write(struct file *filp, st
static struct bin_attribute ds1511_nvram_attr = {
.attr = {
},
.size = DS1511_RAM_MAX,
.read = ds1511_nvram_read,
-diff -urNp linux-2.6.37.2/drivers/s390/cio/qdio_debug.c linux-2.6.37.2/drivers/s390/cio/qdio_debug.c
---- linux-2.6.37.2/drivers/s390/cio/qdio_debug.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/s390/cio/qdio_debug.c 2011-01-17 02:41:01.000000000 -0500
-@@ -224,7 +224,7 @@ static int qperf_seq_open(struct inode *
+diff -urNp linux-2.6.38.1/drivers/s390/cio/qdio_debug.c linux-2.6.38.1/drivers/s390/cio/qdio_debug.c
+--- linux-2.6.38.1/drivers/s390/cio/qdio_debug.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/s390/cio/qdio_debug.c 2011-03-21 18:31:35.000000000 -0400
+@@ -225,7 +225,7 @@ static int qperf_seq_open(struct inode *
filp->f_path.dentry->d_inode->i_private);
}
.owner = THIS_MODULE,
.open = qperf_seq_open,
.read = seq_read,
-diff -urNp linux-2.6.37.2/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.37.2/drivers/scsi/aic94xx/aic94xx_init.c
---- linux-2.6.37.2/drivers/scsi/aic94xx/aic94xx_init.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/aic94xx/aic94xx_init.c 2011-02-27 15:21:39.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/aic94xx/aic94xx_init.c linux-2.6.38.1/drivers/scsi/aic94xx/aic94xx_init.c
+--- linux-2.6.38.1/drivers/scsi/aic94xx/aic94xx_init.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/aic94xx/aic94xx_init.c 2011-03-21 18:31:35.000000000 -0400
@@ -486,7 +486,7 @@ static ssize_t asd_show_update_bios(stru
flash_error_table[i].reason);
}
asd_show_update_bios, asd_store_update_bios);
static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
-diff -urNp linux-2.6.37.2/drivers/scsi/hpsa.c linux-2.6.37.2/drivers/scsi/hpsa.c
---- linux-2.6.37.2/drivers/scsi/hpsa.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/hpsa.c 2011-01-17 02:41:01.000000000 -0500
-@@ -2292,6 +2292,8 @@ static int hpsa_ioctl32_passthru(struct
+diff -urNp linux-2.6.38.1/drivers/scsi/hpsa.c linux-2.6.38.1/drivers/scsi/hpsa.c
+--- linux-2.6.38.1/drivers/scsi/hpsa.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/hpsa.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2281,6 +2281,8 @@ static int hpsa_ioctl32_passthru(struct
int err;
u32 cp;
err = 0;
err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
sizeof(arg64.LUN_info));
-diff -urNp linux-2.6.37.2/drivers/scsi/ipr.c linux-2.6.37.2/drivers/scsi/ipr.c
---- linux-2.6.37.2/drivers/scsi/ipr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/ipr.c 2011-01-17 02:41:01.000000000 -0500
-@@ -6202,7 +6202,7 @@ static bool ipr_qc_fill_rtf(struct ata_q
+diff -urNp linux-2.6.38.1/drivers/scsi/ipr.c linux-2.6.38.1/drivers/scsi/ipr.c
+--- linux-2.6.38.1/drivers/scsi/ipr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/ipr.c 2011-03-21 18:31:35.000000000 -0400
+@@ -6207,7 +6207,7 @@ static bool ipr_qc_fill_rtf(struct ata_q
return true;
}
.phy_reset = ipr_ata_phy_reset,
.hardreset = ipr_sata_reset,
.post_internal_cmd = ipr_ata_post_internal,
-diff -urNp linux-2.6.37.2/drivers/scsi/libfc/fc_exch.c linux-2.6.37.2/drivers/scsi/libfc/fc_exch.c
---- linux-2.6.37.2/drivers/scsi/libfc/fc_exch.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/libfc/fc_exch.c 2011-01-17 02:41:01.000000000 -0500
-@@ -100,12 +100,12 @@ struct fc_exch_mgr {
+diff -urNp linux-2.6.38.1/drivers/scsi/libfc/fc_exch.c linux-2.6.38.1/drivers/scsi/libfc/fc_exch.c
+--- linux-2.6.38.1/drivers/scsi/libfc/fc_exch.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/libfc/fc_exch.c 2011-03-21 18:31:35.000000000 -0400
+@@ -105,12 +105,12 @@ struct fc_exch_mgr {
* all together if not used XXX
*/
struct {
+ atomic_unchecked_t non_bls_resp;
} stats;
};
- #define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
-@@ -670,7 +670,7 @@ static struct fc_exch *fc_exch_em_alloc(
+
+@@ -687,7 +687,7 @@ static struct fc_exch *fc_exch_em_alloc(
/* allocate memory for exchange */
ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC);
if (!ep) {
goto out;
}
memset(ep, 0, sizeof(*ep));
-@@ -718,7 +718,7 @@ out:
+@@ -748,7 +748,7 @@ out:
return ep;
err:
spin_unlock_bh(&pool->lock);
mempool_free(ep, mp->ep_pool);
return NULL;
}
-@@ -863,7 +863,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -893,7 +893,7 @@ static enum fc_pf_rjt_reason fc_seq_look
xid = ntohs(fh->fh_ox_id); /* we originated exch */
ep = fc_exch_find(mp, xid);
if (!ep) {
reject = FC_RJT_OX_ID;
goto out;
}
-@@ -893,7 +893,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -923,7 +923,7 @@ static enum fc_pf_rjt_reason fc_seq_look
ep = fc_exch_find(mp, xid);
if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) {
if (ep) {
reject = FC_RJT_RX_ID;
goto rel;
}
-@@ -904,7 +904,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -934,7 +934,7 @@ static enum fc_pf_rjt_reason fc_seq_look
}
xid = ep->xid; /* get our XID */
} else if (!ep) {
reject = FC_RJT_RX_ID; /* XID not found */
goto out;
}
-@@ -921,7 +921,7 @@ static enum fc_pf_rjt_reason fc_seq_look
+@@ -951,7 +951,7 @@ static enum fc_pf_rjt_reason fc_seq_look
} else {
sp = &ep->seq;
if (sp->id != fh->fh_seq_id) {
reject = FC_RJT_SEQ_ID; /* sequence/exch should exist */
goto rel;
}
-@@ -1338,22 +1338,22 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1368,22 +1368,22 @@ static void fc_exch_recv_seq_resp(struct
ep = fc_exch_find(mp, ntohs(fh->fh_ox_id));
if (!ep) {
if (ep->esb_stat & ESB_ST_COMPLETE) {
- atomic_inc(&mp->stats.xid_not_found);
+ atomic_inc_unchecked(&mp->stats.xid_not_found);
- goto out;
+ goto rel;
}
if (ep->rxid == FC_XID_UNKNOWN)
ep->rxid = ntohs(fh->fh_rx_id);
goto rel;
}
sof = fr_sof(fp);
-@@ -1362,7 +1362,7 @@ static void fc_exch_recv_seq_resp(struct
+@@ -1392,7 +1392,7 @@ static void fc_exch_recv_seq_resp(struct
sp->ssb_stat |= SSB_ST_RESP;
sp->id = fh->fh_seq_id;
} else if (sp->id != fh->fh_seq_id) {
goto rel;
}
-@@ -1425,9 +1425,9 @@ static void fc_exch_recv_resp(struct fc_
+@@ -1455,9 +1455,9 @@ static void fc_exch_recv_resp(struct fc_
sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */
if (!sp)
fc_frame_free(fp);
}
-diff -urNp linux-2.6.37.2/drivers/scsi/libsas/sas_ata.c linux-2.6.37.2/drivers/scsi/libsas/sas_ata.c
---- linux-2.6.37.2/drivers/scsi/libsas/sas_ata.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/libsas/sas_ata.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/libsas/sas_ata.c linux-2.6.38.1/drivers/scsi/libsas/sas_ata.c
+--- linux-2.6.38.1/drivers/scsi/libsas/sas_ata.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/libsas/sas_ata.c 2011-03-21 18:31:35.000000000 -0400
@@ -348,10 +348,10 @@ static int sas_ata_scr_read(struct ata_l
}
}
.qc_prep = ata_noop_qc_prep,
.qc_issue = sas_ata_qc_issue,
.qc_fill_rtf = sas_ata_qc_fill_rtf,
-diff -urNp linux-2.6.37.2/drivers/scsi/mpt2sas/mpt2sas_debug.h linux-2.6.37.2/drivers/scsi/mpt2sas/mpt2sas_debug.h
---- linux-2.6.37.2/drivers/scsi/mpt2sas/mpt2sas_debug.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/mpt2sas/mpt2sas_debug.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/mpt2sas/mpt2sas_debug.h linux-2.6.38.1/drivers/scsi/mpt2sas/mpt2sas_debug.h
+--- linux-2.6.38.1/drivers/scsi/mpt2sas/mpt2sas_debug.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/mpt2sas/mpt2sas_debug.h 2011-03-21 18:31:35.000000000 -0400
@@ -79,7 +79,7 @@
CMD; \
}
#endif /* CONFIG_SCSI_MPT2SAS_LOGGING */
-diff -urNp linux-2.6.37.2/drivers/scsi/qla2xxx/qla_os.c linux-2.6.37.2/drivers/scsi/qla2xxx/qla_os.c
---- linux-2.6.37.2/drivers/scsi/qla2xxx/qla_os.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/qla2xxx/qla_os.c 2011-01-17 02:41:01.000000000 -0500
-@@ -4083,7 +4083,7 @@ static struct pci_driver qla2xxx_pci_dri
+diff -urNp linux-2.6.38.1/drivers/scsi/qla2xxx/qla_os.c linux-2.6.38.1/drivers/scsi/qla2xxx/qla_os.c
+--- linux-2.6.38.1/drivers/scsi/qla2xxx/qla_os.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/qla2xxx/qla_os.c 2011-03-21 18:31:35.000000000 -0400
+@@ -4096,7 +4096,7 @@ static struct pci_driver qla2xxx_pci_dri
.err_handler = &qla2xxx_err_handler,
};
.owner = THIS_MODULE,
.llseek = noop_llseek,
};
-diff -urNp linux-2.6.37.2/drivers/scsi/scsi_logging.h linux-2.6.37.2/drivers/scsi/scsi_logging.h
---- linux-2.6.37.2/drivers/scsi/scsi_logging.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/scsi_logging.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/scsi_logging.h linux-2.6.38.1/drivers/scsi/scsi_logging.h
+--- linux-2.6.38.1/drivers/scsi/scsi_logging.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/scsi_logging.h 2011-03-21 18:31:35.000000000 -0400
@@ -51,7 +51,7 @@ do { \
} while (0); \
} while (0)
#endif /* CONFIG_SCSI_LOGGING */
/*
-diff -urNp linux-2.6.37.2/drivers/scsi/scsi_transport_iscsi.c linux-2.6.37.2/drivers/scsi/scsi_transport_iscsi.c
---- linux-2.6.37.2/drivers/scsi/scsi_transport_iscsi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/scsi_transport_iscsi.c 2011-02-27 15:25:03.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/scsi_transport_iscsi.c linux-2.6.38.1/drivers/scsi/scsi_transport_iscsi.c
+--- linux-2.6.38.1/drivers/scsi/scsi_transport_iscsi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/scsi_transport_iscsi.c 2011-03-21 18:31:35.000000000 -0400
@@ -1847,7 +1847,7 @@ store_priv_session_##field(struct device
#define iscsi_priv_session_rw_attr(field, format) \
iscsi_priv_session_attr_show(field, format) \
show_priv_session_##field, \
store_priv_session_##field)
iscsi_priv_session_rw_attr(recovery_tmo, "%d");
-diff -urNp linux-2.6.37.2/drivers/scsi/sg.c linux-2.6.37.2/drivers/scsi/sg.c
---- linux-2.6.37.2/drivers/scsi/sg.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/scsi/sg.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/scsi/sg.c linux-2.6.38.1/drivers/scsi/sg.c
+--- linux-2.6.38.1/drivers/scsi/sg.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/scsi/sg.c 2011-03-21 18:31:35.000000000 -0400
@@ -2310,7 +2310,7 @@ struct sg_proc_leaf {
const struct file_operations * fops;
};
sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
if (!sg_proc_sgp)
-diff -urNp linux-2.6.37.2/drivers/serial/8250_pci.c linux-2.6.37.2/drivers/serial/8250_pci.c
---- linux-2.6.37.2/drivers/serial/8250_pci.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/serial/8250_pci.c 2011-01-17 02:41:01.000000000 -0500
-@@ -3782,7 +3782,7 @@ static struct pci_device_id serial_pci_t
- PCI_ANY_ID, PCI_ANY_ID,
- PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
- 0xffff00, pbn_default },
-- { 0, }
-+ { 0, 0, 0, 0, 0, 0, 0 }
- };
-
- static struct pci_driver serial_pci_driver = {
-diff -urNp linux-2.6.37.2/drivers/serial/kgdboc.c linux-2.6.37.2/drivers/serial/kgdboc.c
---- linux-2.6.37.2/drivers/serial/kgdboc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/serial/kgdboc.c 2011-01-17 02:41:01.000000000 -0500
-@@ -22,7 +22,8 @@
-
- #define MAX_CONFIG_LEN 40
-
--static struct kgdb_io kgdboc_io_ops;
-+/* cannot be const, see configure_kgdboc() */
-+static struct kgdb_io kgdboc_io_ops;
-
- /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
- static int configured = -1;
-@@ -293,6 +294,7 @@ static void kgdboc_post_exp_handler(void
- kgdboc_restore_input();
- }
-
-+/* cannot be const, see configure_kgdboc() */
- static struct kgdb_io kgdboc_io_ops = {
- .name = "kgdboc",
- .read_char = kgdboc_get_char,
-diff -urNp linux-2.6.37.2/drivers/staging/autofs/root.c linux-2.6.37.2/drivers/staging/autofs/root.c
---- linux-2.6.37.2/drivers/staging/autofs/root.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/autofs/root.c 2011-01-24 18:04:18.000000000 -0500
-@@ -308,7 +308,8 @@ static int autofs_root_symlink(struct in
+diff -urNp linux-2.6.38.1/drivers/staging/autofs/root.c linux-2.6.38.1/drivers/staging/autofs/root.c
+--- linux-2.6.38.1/drivers/staging/autofs/root.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/autofs/root.c 2011-03-21 18:31:35.000000000 -0400
+@@ -311,7 +311,8 @@ static int autofs_root_symlink(struct in
set_bit(n,sbi->symlink_bitmap);
sl = &sbi->symlink[n];
sl->len = strlen(symname);
if (!sl->data) {
clear_bit(n,sbi->symlink_bitmap);
unlock_kernel();
-diff -urNp linux-2.6.37.2/drivers/staging/bcm/Bcmchar.c linux-2.6.37.2/drivers/staging/bcm/Bcmchar.c
---- linux-2.6.37.2/drivers/staging/bcm/Bcmchar.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/bcm/Bcmchar.c 2011-01-17 02:41:01.000000000 -0500
-@@ -2386,7 +2386,7 @@ static long bcm_char_ioctl(struct file *
+diff -urNp linux-2.6.38.1/drivers/staging/bcm/Bcmchar.c linux-2.6.38.1/drivers/staging/bcm/Bcmchar.c
+--- linux-2.6.38.1/drivers/staging/bcm/Bcmchar.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/bcm/Bcmchar.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2093,7 +2093,7 @@ static long bcm_char_ioctl(struct file *
}
.owner = THIS_MODULE,
.open = bcm_char_open,
.release = bcm_char_release,
-diff -urNp linux-2.6.37.2/drivers/staging/bcm/InterfaceInit.c linux-2.6.37.2/drivers/staging/bcm/InterfaceInit.c
---- linux-2.6.37.2/drivers/staging/bcm/InterfaceInit.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/bcm/InterfaceInit.c 2011-02-22 16:05:42.000000000 -0500
-@@ -158,7 +158,7 @@ VOID ConfigureEndPointTypesThroughEEPROM
-
- }
-
--static struct file_operations usbbcm_fops = {
-+static const struct file_operations usbbcm_fops = {
- .open = usbbcm_open,
- .release = usbbcm_release,
- .read = usbbcm_read,
-diff -urNp linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
---- linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-01-24 18:04:18.000000000 -0500
-@@ -864,14 +864,14 @@ static void dhd_op_if(dhd_if_t *ifp)
+diff -urNp linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/dhd_linux.c linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+--- linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/dhd_linux.c 2011-03-21 18:31:35.000000000 -0400
+@@ -863,14 +863,14 @@ static void dhd_op_if(dhd_if_t *ifp)
free_netdev(ifp->net);
}
/* Allocate etherdev, including space for private structure */
err = dhd_net_attach(&dhd->pub, ifp->idx);
if (err != 0) {
DHD_ERROR(("%s: dhd_net_attach failed, "
-@@ -1891,25 +1891,23 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct
+@@ -1969,25 +1969,23 @@ dhd_pub_t *dhd_attach(struct osl_info *o
strcpy(nv_path, nvram_path);
/* Allocate etherdev, including space for private structure */
dhd->pub.osh = osh;
/* Set network interface name if it was provided as module parameter */
-@@ -2027,7 +2025,7 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct
+@@ -2105,7 +2103,7 @@ dhd_pub_t *dhd_attach(struct osl_info *o
/*
* Save the dhd_info into the priv
*/
#if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC)
g_bus = bus;
-diff -urNp linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/wl_iw.c linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/wl_iw.c
---- linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/wl_iw.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/brcm80211/brcmfmac/wl_iw.c 2011-01-24 18:04:18.000000000 -0500
-@@ -514,7 +514,7 @@ wl_iw_get_range(struct net_device *dev,
+diff -urNp linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/wl_iw.c linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+--- linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/wl_iw.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/brcm80211/brcmfmac/wl_iw.c 2011-03-21 18:31:35.000000000 -0400
+@@ -513,7 +513,7 @@ wl_iw_get_range(struct net_device *dev,
list = (wl_u32_list_t *) channels;
dwrq->length = sizeof(struct iw_range);
range->min_nwid = range->max_nwid = 0;
-diff -urNp linux-2.6.37.2/drivers/staging/comedi/comedi_fops.c linux-2.6.37.2/drivers/staging/comedi/comedi_fops.c
---- linux-2.6.37.2/drivers/staging/comedi/comedi_fops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/comedi/comedi_fops.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/staging/comedi/comedi_fops.c linux-2.6.38.1/drivers/staging/comedi/comedi_fops.c
+--- linux-2.6.38.1/drivers/staging/comedi/comedi_fops.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/comedi/comedi_fops.c 2011-03-21 18:31:35.000000000 -0400
@@ -1426,7 +1426,7 @@ static void comedi_unmap(struct vm_area_
mutex_unlock(&dev->mutex);
}
.close = comedi_unmap,
};
-diff -urNp linux-2.6.37.2/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c linux-2.6.37.2/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
---- linux-2.6.37.2/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -69,7 +69,7 @@ int numofmsgbuf = 0;
+diff -urNp linux-2.6.38.1/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c linux-2.6.38.1/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+--- linux-2.6.38.1/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 2011-03-21 18:31:35.000000000 -0400
+@@ -55,7 +55,7 @@ int numofmsgbuf = 0;
//
// Table of entry-point routines for char device
//
-static struct file_operations ft1000fops =
+static const struct file_operations ft1000fops =
{
- .unlocked_ioctl = ft1000_ChIoctl,
- .poll = ft1000_ChPoll,
-diff -urNp linux-2.6.37.2/drivers/staging/go7007/go7007-v4l2.c linux-2.6.37.2/drivers/staging/go7007/go7007-v4l2.c
---- linux-2.6.37.2/drivers/staging/go7007/go7007-v4l2.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/go7007/go7007-v4l2.c 2011-01-17 02:41:01.000000000 -0500
+ .unlocked_ioctl = ft1000_ioctl,
+ .poll = ft1000_poll_dev,
+diff -urNp linux-2.6.38.1/drivers/staging/go7007/go7007-v4l2.c linux-2.6.38.1/drivers/staging/go7007/go7007-v4l2.c
+--- linux-2.6.38.1/drivers/staging/go7007/go7007-v4l2.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/go7007/go7007-v4l2.c 2011-03-21 18:31:35.000000000 -0400
@@ -1672,7 +1672,7 @@ static int go7007_vm_fault(struct vm_are
return 0;
}
.open = go7007_vm_open,
.close = go7007_vm_close,
.fault = go7007_vm_fault,
-diff -urNp linux-2.6.37.2/drivers/staging/hv/hv.c linux-2.6.37.2/drivers/staging/hv/hv.c
---- linux-2.6.37.2/drivers/staging/hv/hv.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/hv/hv.c 2011-01-17 02:41:01.000000000 -0500
-@@ -162,7 +162,7 @@ static u64 HvDoHypercall(u64 Control, vo
- u64 outputAddress = (Output) ? virt_to_phys(Output) : 0;
- u32 outputAddressHi = outputAddress >> 32;
- u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
-- volatile void *hypercallPage = gHvContext.HypercallPage;
-+ volatile void *hypercallPage = ktva_ktla(gHvContext.HypercallPage);
+diff -urNp linux-2.6.38.1/drivers/staging/hv/hv.c linux-2.6.38.1/drivers/staging/hv/hv.c
+--- linux-2.6.38.1/drivers/staging/hv/hv.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/hv/hv.c 2011-03-21 18:31:35.000000000 -0400
+@@ -163,7 +163,7 @@ static u64 do_hypercall(u64 control, voi
+ u64 output_address = (output) ? virt_to_phys(output) : 0;
+ u32 output_address_hi = output_address >> 32;
+ u32 output_address_lo = output_address & 0xFFFFFFFF;
+- volatile void *hypercall_page = hv_context.hypercall_page;
++ volatile void *hypercall_page = ktva_ktla(hv_context.hypercall_page);
DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
- Control, Input, Output);
-diff -urNp linux-2.6.37.2/drivers/staging/msm/msm_fb_bl.c linux-2.6.37.2/drivers/staging/msm/msm_fb_bl.c
---- linux-2.6.37.2/drivers/staging/msm/msm_fb_bl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/msm/msm_fb_bl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -42,7 +42,7 @@ static int msm_fb_bl_update_status(struc
- return 0;
- }
-
--static struct backlight_ops msm_fb_bl_ops = {
-+static const struct backlight_ops msm_fb_bl_ops = {
- .get_brightness = msm_fb_bl_get_brightness,
- .update_status = msm_fb_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/staging/olpc_dcon/olpc_dcon.c linux-2.6.37.2/drivers/staging/olpc_dcon/olpc_dcon.c
---- linux-2.6.37.2/drivers/staging/olpc_dcon/olpc_dcon.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/olpc_dcon/olpc_dcon.c 2011-01-17 02:41:01.000000000 -0500
-@@ -615,7 +615,7 @@ static struct device_attribute dcon_devi
- __ATTR(resumeline, 0644, dcon_resumeline_show, dcon_resumeline_store),
- };
-
--static struct backlight_ops dcon_bl_ops = {
-+static const struct backlight_ops dcon_bl_ops = {
- .get_brightness = dconbl_get,
- .update_status = dconbl_set
- };
-diff -urNp linux-2.6.37.2/drivers/staging/phison/phison.c linux-2.6.37.2/drivers/staging/phison/phison.c
---- linux-2.6.37.2/drivers/staging/phison/phison.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/phison/phison.c 2011-01-17 02:41:01.000000000 -0500
+ control, input, output);
+diff -urNp linux-2.6.38.1/drivers/staging/phison/phison.c linux-2.6.38.1/drivers/staging/phison/phison.c
+--- linux-2.6.38.1/drivers/staging/phison/phison.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/phison/phison.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,7 @@ static struct scsi_host_template phison_
ATA_BMDMA_SHT(DRV_NAME),
};
.inherits = &ata_bmdma_port_ops,
.prereset = phison_pre_reset,
};
-diff -urNp linux-2.6.37.2/drivers/staging/pohmelfs/inode.c linux-2.6.37.2/drivers/staging/pohmelfs/inode.c
---- linux-2.6.37.2/drivers/staging/pohmelfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/pohmelfs/inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1848,7 +1848,7 @@ static int pohmelfs_fill_super(struct su
+diff -urNp linux-2.6.38.1/drivers/staging/pohmelfs/inode.c linux-2.6.38.1/drivers/staging/pohmelfs/inode.c
+--- linux-2.6.38.1/drivers/staging/pohmelfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/pohmelfs/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1855,7 +1855,7 @@ static int pohmelfs_fill_super(struct su
mutex_init(&psb->mcache_lock);
psb->mcache_root = RB_ROOT;
psb->mcache_timeout = msecs_to_jiffies(5000);
psb->trans_max_pages = 100;
-diff -urNp linux-2.6.37.2/drivers/staging/pohmelfs/mcache.c linux-2.6.37.2/drivers/staging/pohmelfs/mcache.c
---- linux-2.6.37.2/drivers/staging/pohmelfs/mcache.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/pohmelfs/mcache.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/staging/pohmelfs/mcache.c linux-2.6.38.1/drivers/staging/pohmelfs/mcache.c
+--- linux-2.6.38.1/drivers/staging/pohmelfs/mcache.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/pohmelfs/mcache.c 2011-03-21 18:31:35.000000000 -0400
@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_
m->data = data;
m->start = start;
mutex_lock(&psb->mcache_lock);
err = pohmelfs_mcache_insert(psb, m);
-diff -urNp linux-2.6.37.2/drivers/staging/pohmelfs/netfs.h linux-2.6.37.2/drivers/staging/pohmelfs/netfs.h
---- linux-2.6.37.2/drivers/staging/pohmelfs/netfs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/pohmelfs/netfs.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/staging/pohmelfs/netfs.h linux-2.6.38.1/drivers/staging/pohmelfs/netfs.h
+--- linux-2.6.38.1/drivers/staging/pohmelfs/netfs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/pohmelfs/netfs.h 2011-03-21 18:31:35.000000000 -0400
@@ -571,7 +571,7 @@ struct pohmelfs_config;
struct pohmelfs_sb {
struct rb_root mcache_root;
unsigned long mcache_timeout;
unsigned int idx;
-diff -urNp linux-2.6.37.2/drivers/staging/rtl8192u/ieee80211/proc.c linux-2.6.37.2/drivers/staging/rtl8192u/ieee80211/proc.c
---- linux-2.6.37.2/drivers/staging/rtl8192u/ieee80211/proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/rtl8192u/ieee80211/proc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/staging/rtl8192u/ieee80211/proc.c linux-2.6.38.1/drivers/staging/rtl8192u/ieee80211/proc.c
+--- linux-2.6.38.1/drivers/staging/rtl8192u/ieee80211/proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/rtl8192u/ieee80211/proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -99,7 +99,7 @@ static int crypto_info_open(struct inode
return seq_open(file, &crypto_seq_ops);
}
.open = crypto_info_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.37.2/drivers/staging/samsung-laptop/samsung-laptop.c linux-2.6.37.2/drivers/staging/samsung-laptop/samsung-laptop.c
---- linux-2.6.37.2/drivers/staging/samsung-laptop/samsung-laptop.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/samsung-laptop/samsung-laptop.c 2011-01-17 02:41:01.000000000 -0500
-@@ -269,7 +269,7 @@ static int update_status(struct backligh
- return 0;
- }
-
--static struct backlight_ops backlight_ops = {
-+static const struct backlight_ops backlight_ops = {
- .get_brightness = get_brightness,
- .update_status = update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/staging/spectra/ffsport.c linux-2.6.37.2/drivers/staging/spectra/ffsport.c
---- linux-2.6.37.2/drivers/staging/spectra/ffsport.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/spectra/ffsport.c 2011-01-17 02:41:01.000000000 -0500
-@@ -603,7 +603,7 @@ int GLOB_SBD_unlocked_ioctl(struct block
+diff -urNp linux-2.6.38.1/drivers/staging/spectra/ffsport.c linux-2.6.38.1/drivers/staging/spectra/ffsport.c
+--- linux-2.6.38.1/drivers/staging/spectra/ffsport.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/spectra/ffsport.c 2011-03-21 18:31:35.000000000 -0400
+@@ -604,7 +604,7 @@ int GLOB_SBD_unlocked_ioctl(struct block
return ret;
}
.owner = THIS_MODULE,
.open = GLOB_SBD_open,
.release = GLOB_SBD_release,
-diff -urNp linux-2.6.37.2/drivers/staging/vme/devices/vme_user.c linux-2.6.37.2/drivers/staging/vme/devices/vme_user.c
---- linux-2.6.37.2/drivers/staging/vme/devices/vme_user.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/vme/devices/vme_user.c 2011-01-17 02:41:01.000000000 -0500
-@@ -137,7 +137,7 @@ static long vme_user_unlocked_ioctl(stru
- static int __init vme_user_probe(struct device *, int, int);
- static int __exit vme_user_remove(struct device *, int, int);
+diff -urNp linux-2.6.38.1/drivers/staging/vme/devices/vme_user.c linux-2.6.38.1/drivers/staging/vme/devices/vme_user.c
+--- linux-2.6.38.1/drivers/staging/vme/devices/vme_user.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/vme/devices/vme_user.c 2011-03-21 18:31:35.000000000 -0400
+@@ -138,7 +138,7 @@ static long vme_user_unlocked_ioctl(stru
+ static int __devinit vme_user_probe(struct device *, int, int);
+ static int __devexit vme_user_remove(struct device *, int, int);
-static struct file_operations vme_user_fops = {
+static const struct file_operations vme_user_fops = {
.open = vme_user_open,
.release = vme_user_release,
.read = vme_user_read,
-diff -urNp linux-2.6.37.2/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c linux-2.6.37.2/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c
---- linux-2.6.37.2/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c linux-2.6.38.1/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c
+--- linux-2.6.38.1/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/staging/westbridge/astoria/block/cyasblkdev_block.c 2011-03-21 18:31:35.000000000 -0400
@@ -426,7 +426,7 @@ int cyasblkdev_revalidate_disk(struct ge
.open = cyasblkdev_blk_open,
.release = cyasblkdev_blk_release,
.ioctl = cyasblkdev_blk_ioctl,
-diff -urNp linux-2.6.37.2/drivers/tty/n_gsm.c linux-2.6.37.2/drivers/tty/n_gsm.c
---- linux-2.6.37.2/drivers/tty/n_gsm.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/n_gsm.c 2011-02-22 16:05:42.000000000 -0500
-@@ -1579,7 +1579,7 @@ static struct gsm_dlci *gsm_dlci_alloc(s
+diff -urNp linux-2.6.38.1/drivers/tty/hvc/hvc_console.h linux-2.6.38.1/drivers/tty/hvc/hvc_console.h
+--- linux-2.6.38.1/drivers/tty/hvc/hvc_console.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/hvc/hvc_console.h 2011-03-21 18:31:35.000000000 -0400
+@@ -82,6 +82,7 @@ extern int hvc_instantiate(uint32_t vter
+ /* register a vterm for hvc tty operation (module_init or hotplug add) */
+ extern struct hvc_struct * hvc_alloc(uint32_t vtermno, int data,
+ const struct hv_ops *ops, int outbuf_size);
++
+ /* 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.38.1/drivers/tty/hvc/hvcs.c linux-2.6.38.1/drivers/tty/hvc/hvcs.c
+--- linux-2.6.38.1/drivers/tty/hvc/hvcs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/hvc/hvcs.c 2011-03-21 18:31:35.000000000 -0400
+@@ -83,6 +83,7 @@
+ #include <asm/hvcserver.h>
+ #include <asm/uaccess.h>
+ #include <asm/vio.h>
++#include <asm/local.h>
+
+ /*
+ * 1.3.0 -> 1.3.1 In hvcs_open memset(..,0x00,..) instead of memset(..,0x3F,00).
+@@ -270,7 +271,7 @@ struct hvcs_struct {
+ unsigned int index;
+
+ struct tty_struct *tty;
+- int open_count;
++ local_t open_count;
+
+ /*
+ * Used to tell the driver kernel_thread what operations need to take
+@@ -420,7 +421,7 @@ static ssize_t hvcs_vterm_state_store(st
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+
+- if (hvcsd->open_count > 0) {
++ if (local_read(&hvcsd->open_count) > 0) {
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+ printk(KERN_INFO "HVCS: vterm state unchanged. "
+ "The hvcs device node is still in use.\n");
+@@ -1136,7 +1137,7 @@ static int hvcs_open(struct tty_struct *
+ if ((retval = hvcs_partner_connect(hvcsd)))
+ goto error_release;
+
+- hvcsd->open_count = 1;
++ local_set(&hvcsd->open_count, 1);
+ hvcsd->tty = tty;
+ tty->driver_data = hvcsd;
+
+@@ -1170,7 +1171,7 @@ fast_open:
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+ kref_get(&hvcsd->kref);
+- hvcsd->open_count++;
++ local_inc(&hvcsd->open_count);
+ hvcsd->todo_mask |= HVCS_SCHED_READ;
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+
+@@ -1214,7 +1215,7 @@ static void hvcs_close(struct tty_struct
+ hvcsd = tty->driver_data;
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+- if (--hvcsd->open_count == 0) {
++ if (local_dec_and_test(&hvcsd->open_count)) {
+
+ vio_disable_interrupts(hvcsd->vdev);
+
+@@ -1240,10 +1241,10 @@ static void hvcs_close(struct tty_struct
+ free_irq(irq, hvcsd);
+ kref_put(&hvcsd->kref, destroy_hvcs_struct);
+ return;
+- } else if (hvcsd->open_count < 0) {
++ } else if (local_read(&hvcsd->open_count) < 0) {
+ printk(KERN_ERR "HVCS: vty-server@%X open_count: %d"
+ " is missmanaged.\n",
+- hvcsd->vdev->unit_address, hvcsd->open_count);
++ hvcsd->vdev->unit_address, local_read(&hvcsd->open_count));
+ }
+
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+@@ -1259,7 +1260,7 @@ static void hvcs_hangup(struct tty_struc
+
+ spin_lock_irqsave(&hvcsd->lock, flags);
+ /* Preserve this so that we know how many kref refs to put */
+- temp_open_count = hvcsd->open_count;
++ temp_open_count = local_read(&hvcsd->open_count);
+
+ /*
+ * Don't kref put inside the spinlock because the destruction
+@@ -1274,7 +1275,7 @@ static void hvcs_hangup(struct tty_struc
+ hvcsd->tty->driver_data = NULL;
+ hvcsd->tty = NULL;
+
+- hvcsd->open_count = 0;
++ local_set(&hvcsd->open_count, 0);
+
+ /* This will drop any buffered data on the floor which is OK in a hangup
+ * scenario. */
+@@ -1345,7 +1346,7 @@ static int hvcs_write(struct tty_struct
+ * the middle of a write operation? This is a crummy place to do this
+ * but we want to keep it all in the spinlock.
+ */
+- if (hvcsd->open_count <= 0) {
++ if (local_read(&hvcsd->open_count) <= 0) {
+ spin_unlock_irqrestore(&hvcsd->lock, flags);
+ return -ENODEV;
+ }
+@@ -1419,7 +1420,7 @@ static int hvcs_write_room(struct tty_st
+ {
+ struct hvcs_struct *hvcsd = tty->driver_data;
+
+- if (!hvcsd || hvcsd->open_count <= 0)
++ if (!hvcsd || local_read(&hvcsd->open_count) <= 0)
+ return 0;
+
+ return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
+diff -urNp linux-2.6.38.1/drivers/tty/hvc/hvc_xen.c linux-2.6.38.1/drivers/tty/hvc/hvc_xen.c
+--- linux-2.6.38.1/drivers/tty/hvc/hvc_xen.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/hvc/hvc_xen.c 2011-03-21 18:31:35.000000000 -0400
+@@ -123,7 +123,7 @@ static int domU_read_console(uint32_t vt
+ return recv;
+ }
+
+-static struct hv_ops domU_hvc_ops = {
++static const struct hv_ops domU_hvc_ops = {
+ .get_chars = domU_read_console,
+ .put_chars = domU_write_console,
+ .notifier_add = notifier_add_irq,
+@@ -149,7 +149,7 @@ static int dom0_write_console(uint32_t v
+ return len;
+ }
+
+-static struct hv_ops dom0_hvc_ops = {
++static const struct hv_ops dom0_hvc_ops = {
+ .get_chars = dom0_read_console,
+ .put_chars = dom0_write_console,
+ .notifier_add = notifier_add_irq,
+@@ -160,7 +160,7 @@ static struct hv_ops dom0_hvc_ops = {
+ static int __init xen_hvc_init(void)
+ {
+ struct hvc_struct *hp;
+- struct hv_ops *ops;
++ const struct hv_ops *ops;
+
+ if (!xen_pv_domain())
+ return -ENODEV;
+@@ -203,7 +203,7 @@ static void __exit xen_hvc_fini(void)
+
+ static int xen_cons_init(void)
+ {
+- struct hv_ops *ops;
++ const struct hv_ops *ops;
+
+ if (!xen_pv_domain())
+ return 0;
+diff -urNp linux-2.6.38.1/drivers/tty/n_gsm.c linux-2.6.38.1/drivers/tty/n_gsm.c
+--- linux-2.6.38.1/drivers/tty/n_gsm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/n_gsm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1589,7 +1589,7 @@ static struct gsm_dlci *gsm_dlci_alloc(s
return NULL;
spin_lock_init(&dlci->lock);
dlci->fifo = &dlci->_fifo;
kfree(dlci);
return NULL;
}
-diff -urNp linux-2.6.37.2/drivers/tty/n_tty.c linux-2.6.37.2/drivers/tty/n_tty.c
---- linux-2.6.37.2/drivers/tty/n_tty.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/n_tty.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/n_tty.c linux-2.6.38.1/drivers/tty/n_tty.c
+--- linux-2.6.38.1/drivers/tty/n_tty.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/n_tty.c 2011-03-21 18:31:35.000000000 -0400
@@ -2116,6 +2116,7 @@ void n_tty_inherit_ops(struct tty_ldisc_
{
*ops = tty_ldisc_N_TTY;
+ ops->flags = 0;
}
EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
-diff -urNp linux-2.6.37.2/drivers/tty/pty.c linux-2.6.37.2/drivers/tty/pty.c
---- linux-2.6.37.2/drivers/tty/pty.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/pty.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/pty.c linux-2.6.38.1/drivers/tty/pty.c
+--- linux-2.6.38.1/drivers/tty/pty.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/pty.c 2011-03-21 18:31:35.000000000 -0400
@@ -700,7 +700,18 @@ out:
return retval;
}
cdev_init(&ptmx_cdev, &ptmx_fops);
if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
-diff -urNp linux-2.6.37.2/drivers/tty/tty_io.c linux-2.6.37.2/drivers/tty/tty_io.c
---- linux-2.6.37.2/drivers/tty/tty_io.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/tty_io.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/serial/8250_pci.c linux-2.6.38.1/drivers/tty/serial/8250_pci.c
+--- linux-2.6.38.1/drivers/tty/serial/8250_pci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/serial/8250_pci.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3818,7 +3818,7 @@ static struct pci_device_id serial_pci_t
+ PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
+ 0xffff00, pbn_default },
+- { 0, }
++ { 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+ static struct pci_driver serial_pci_driver = {
+diff -urNp linux-2.6.38.1/drivers/tty/serial/kgdboc.c linux-2.6.38.1/drivers/tty/serial/kgdboc.c
+--- linux-2.6.38.1/drivers/tty/serial/kgdboc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/serial/kgdboc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -22,7 +22,7 @@
+
+ #define MAX_CONFIG_LEN 40
+
+-static struct kgdb_io kgdboc_io_ops;
++static struct kgdb_io kgdboc_io_ops; /* cannot be const, see configure_kgdboc() */
+
+ /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
+ static int configured = -1;
+@@ -293,7 +293,7 @@ static void kgdboc_post_exp_handler(void
+ kgdboc_restore_input();
+ }
+
+-static struct kgdb_io kgdboc_io_ops = {
++static struct kgdb_io kgdboc_io_ops = { /* cannot be const, see configure_kgdboc() */
+ .name = "kgdboc",
+ .read_char = kgdboc_get_char,
+ .write_char = kgdboc_put_char,
+diff -urNp linux-2.6.38.1/drivers/tty/tty_io.c linux-2.6.38.1/drivers/tty/tty_io.c
+--- linux-2.6.38.1/drivers/tty/tty_io.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/tty_io.c 2011-03-21 18:31:35.000000000 -0400
@@ -140,21 +140,11 @@ EXPORT_SYMBOL(tty_mutex);
/* Spinlock to protect the tty->tty_files list */
DEFINE_SPINLOCK(tty_files_lock);
/**
* tiocsti - fake input character
* @tty: tty to fake input into
-@@ -2687,8 +2687,10 @@ long tty_ioctl(struct file *file, unsign
+@@ -2692,8 +2692,10 @@ long tty_ioctl(struct file *file, unsign
return retval;
}
unsigned long arg)
{
struct inode *inode = file->f_dentry->d_inode;
-@@ -2712,6 +2714,9 @@ static long tty_compat_ioctl(struct file
+@@ -2717,6 +2719,9 @@ static long tty_compat_ioctl(struct file
return retval;
}
#endif
/*
-@@ -3190,11 +3195,6 @@ struct tty_struct *get_current_tty(void)
+@@ -3195,11 +3200,6 @@ struct tty_struct *get_current_tty(void)
}
EXPORT_SYMBOL_GPL(get_current_tty);
/*
* Initialize the console device. This is called *early*, so
* we can't necessarily depend on lots of kernel help here.
-diff -urNp linux-2.6.37.2/drivers/tty/tty_ldisc.c linux-2.6.37.2/drivers/tty/tty_ldisc.c
---- linux-2.6.37.2/drivers/tty/tty_ldisc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/tty_ldisc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/tty_ldisc.c linux-2.6.38.1/drivers/tty/tty_ldisc.c
+--- linux-2.6.38.1/drivers/tty/tty_ldisc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/tty_ldisc.c 2011-03-21 18:31:35.000000000 -0400
@@ -76,7 +76,7 @@ static void put_ldisc(struct tty_ldisc *
if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
struct tty_ldisc_ops *ldo = ld->ops;
module_put(ldops->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
}
-diff -urNp linux-2.6.37.2/drivers/tty/vt/keyboard.c linux-2.6.37.2/drivers/tty/vt/keyboard.c
---- linux-2.6.37.2/drivers/tty/vt/keyboard.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/vt/keyboard.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/vt/keyboard.c linux-2.6.38.1/drivers/tty/vt/keyboard.c
+--- linux-2.6.38.1/drivers/tty/vt/keyboard.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/vt/keyboard.c 2011-03-21 18:31:35.000000000 -0400
@@ -657,6 +657,16 @@ static void k_spec(struct vc_data *vc, u
kbd->kbdmode == VC_MEDIUMRAW) &&
value != KVAL(K_SAK))
};
MODULE_DEVICE_TABLE(input, kbd_ids);
-diff -urNp linux-2.6.37.2/drivers/tty/vt/vt_ioctl.c linux-2.6.37.2/drivers/tty/vt/vt_ioctl.c
---- linux-2.6.37.2/drivers/tty/vt/vt_ioctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/tty/vt/vt_ioctl.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/tty/vt/vt.c linux-2.6.38.1/drivers/tty/vt/vt.c
+--- linux-2.6.38.1/drivers/tty/vt/vt.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/vt/vt.c 2011-03-21 18:31:35.000000000 -0400
+@@ -262,7 +262,7 @@ EXPORT_SYMBOL_GPL(unregister_vt_notifier
+
+ static void notify_write(struct vc_data *vc, unsigned int unicode)
+ {
+- struct vt_notifier_param param = { .vc = vc, unicode = unicode };
++ struct vt_notifier_param param = { .vc = vc, .c = unicode };
+ atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, ¶m);
+ }
+
+diff -urNp linux-2.6.38.1/drivers/tty/vt/vt_ioctl.c linux-2.6.38.1/drivers/tty/vt/vt_ioctl.c
+--- linux-2.6.38.1/drivers/tty/vt/vt_ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/tty/vt/vt_ioctl.c 2011-03-21 18:31:35.000000000 -0400
@@ -210,9 +210,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __
if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
return -EFAULT;
if (!perm) {
ret = -EPERM;
goto reterr;
-diff -urNp linux-2.6.37.2/drivers/uio/uio.c linux-2.6.37.2/drivers/uio/uio.c
---- linux-2.6.37.2/drivers/uio/uio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/uio/uio.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/uio/uio.c linux-2.6.38.1/drivers/uio/uio.c
+--- linux-2.6.38.1/drivers/uio/uio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/uio/uio.c 2011-03-21 18:31:35.000000000 -0400
@@ -25,6 +25,7 @@
#include <linux/kobject.h>
#include <linux/cdev.h>
}
static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-diff -urNp linux-2.6.37.2/drivers/usb/atm/cxacru.c linux-2.6.37.2/drivers/usb/atm/cxacru.c
---- linux-2.6.37.2/drivers/usb/atm/cxacru.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/atm/cxacru.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/atm/cxacru.c linux-2.6.38.1/drivers/usb/atm/cxacru.c
+--- linux-2.6.38.1/drivers/usb/atm/cxacru.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/atm/cxacru.c 2011-03-21 18:31:35.000000000 -0400
@@ -473,7 +473,7 @@ static ssize_t cxacru_sysfs_store_adsl_c
ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
if (ret < 2)
return -EINVAL;
pos += tmp;
-diff -urNp linux-2.6.37.2/drivers/usb/atm/usbatm.c linux-2.6.37.2/drivers/usb/atm/usbatm.c
---- linux-2.6.37.2/drivers/usb/atm/usbatm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/atm/usbatm.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/atm/usbatm.c linux-2.6.38.1/drivers/usb/atm/usbatm.c
+--- linux-2.6.38.1/drivers/usb/atm/usbatm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/atm/usbatm.c 2011-03-21 18:31:35.000000000 -0400
@@ -332,7 +332,7 @@ static void usbatm_extract_one_cell(stru
if (printk_ratelimit())
atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n",
if (!left--) {
if (instance->disconnected)
-diff -urNp linux-2.6.37.2/drivers/usb/class/cdc-acm.c linux-2.6.37.2/drivers/usb/class/cdc-acm.c
---- linux-2.6.37.2/drivers/usb/class/cdc-acm.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/class/cdc-acm.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/class/cdc-acm.c linux-2.6.38.1/drivers/usb/class/cdc-acm.c
+--- linux-2.6.38.1/drivers/usb/class/cdc-acm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/class/cdc-acm.c 2011-03-21 18:31:35.000000000 -0400
@@ -1635,7 +1635,7 @@ static const struct usb_device_id acm_id
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
USB_CDC_ACM_PROTO_AT_CDMA) },
};
MODULE_DEVICE_TABLE(usb, acm_ids);
-diff -urNp linux-2.6.37.2/drivers/usb/class/cdc-wdm.c linux-2.6.37.2/drivers/usb/class/cdc-wdm.c
---- linux-2.6.37.2/drivers/usb/class/cdc-wdm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/class/cdc-wdm.c 2011-01-17 02:41:01.000000000 -0500
-@@ -342,7 +342,7 @@ static ssize_t wdm_write
- goto outnp;
- }
-
-- if (!file->f_flags && O_NONBLOCK)
-+ if (!(file->f_flags & O_NONBLOCK))
- r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE,
- &desc->flags));
- else
-diff -urNp linux-2.6.37.2/drivers/usb/class/usblp.c linux-2.6.37.2/drivers/usb/class/usblp.c
---- linux-2.6.37.2/drivers/usb/class/usblp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/class/usblp.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/class/usblp.c linux-2.6.38.1/drivers/usb/class/usblp.c
+--- linux-2.6.38.1/drivers/usb/class/usblp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/class/usblp.c 2011-03-21 18:31:35.000000000 -0400
@@ -227,7 +227,7 @@ static const struct quirk_printer_struct
{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
{ 0x04f9, 0x000d, USBLP_QUIRK_BIDIR }, /* Brother Industries, Ltd HL-1440 Laser Printer */
};
MODULE_DEVICE_TABLE(usb, usblp_ids);
-diff -urNp linux-2.6.37.2/drivers/usb/core/hcd.c linux-2.6.37.2/drivers/usb/core/hcd.c
---- linux-2.6.37.2/drivers/usb/core/hcd.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/core/hcd.c 2011-02-22 16:05:42.000000000 -0500
-@@ -2431,7 +2431,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd
+diff -urNp linux-2.6.38.1/drivers/usb/core/hcd.c linux-2.6.38.1/drivers/usb/core/hcd.c
+--- linux-2.6.38.1/drivers/usb/core/hcd.c 2011-03-23 17:20:07.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/core/hcd.c 2011-03-26 20:49:43.000000000 -0400
+@@ -2457,7 +2457,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd
#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
/*
* The registration is unlocked.
-@@ -2441,7 +2441,7 @@ struct usb_mon_operations *mon_ops;
+@@ -2467,7 +2467,7 @@ struct usb_mon_operations *mon_ops;
* symbols from usbcore, usbcore gets referenced and cannot be unloaded first.
*/
{
if (mon_ops)
-diff -urNp linux-2.6.37.2/drivers/usb/core/hub.c linux-2.6.37.2/drivers/usb/core/hub.c
---- linux-2.6.37.2/drivers/usb/core/hub.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/core/hub.c 2011-02-27 14:49:58.000000000 -0500
-@@ -3482,7 +3482,7 @@ static const struct usb_device_id hub_id
+diff -urNp linux-2.6.38.1/drivers/usb/core/hub.c linux-2.6.38.1/drivers/usb/core/hub.c
+--- linux-2.6.38.1/drivers/usb/core/hub.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/core/hub.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3492,7 +3492,7 @@ static const struct usb_device_id hub_id
.bDeviceClass = USB_CLASS_HUB},
{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
.bInterfaceClass = USB_CLASS_HUB},
};
MODULE_DEVICE_TABLE (usb, hub_id_table);
-diff -urNp linux-2.6.37.2/drivers/usb/core/message.c linux-2.6.37.2/drivers/usb/core/message.c
---- linux-2.6.37.2/drivers/usb/core/message.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/core/message.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/core/message.c linux-2.6.38.1/drivers/usb/core/message.c
+--- linux-2.6.38.1/drivers/usb/core/message.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/core/message.c 2011-03-21 18:31:35.000000000 -0400
@@ -869,8 +869,8 @@ char *usb_cache_string(struct usb_device
buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
if (buf) {
if (!smallbuf)
return buf;
memcpy(smallbuf, buf, len);
-diff -urNp linux-2.6.37.2/drivers/usb/early/ehci-dbgp.c linux-2.6.37.2/drivers/usb/early/ehci-dbgp.c
---- linux-2.6.37.2/drivers/usb/early/ehci-dbgp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/early/ehci-dbgp.c 2011-01-17 02:41:01.000000000 -0500
-@@ -96,6 +96,7 @@ static inline u32 dbgp_len_update(u32 x,
+diff -urNp linux-2.6.38.1/drivers/usb/early/ehci-dbgp.c linux-2.6.38.1/drivers/usb/early/ehci-dbgp.c
+--- linux-2.6.38.1/drivers/usb/early/ehci-dbgp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/early/ehci-dbgp.c 2011-03-21 18:31:35.000000000 -0400
+@@ -96,7 +96,7 @@ static inline u32 dbgp_len_update(u32 x,
}
#ifdef CONFIG_KGDB
-+/* cannot be const, see kgdbdbgp_parse_config */
- static struct kgdb_io kgdbdbgp_io_ops;
+-static struct kgdb_io kgdbdbgp_io_ops;
++static struct kgdb_io kgdbdbgp_io_ops; /* cannot be const, see kgdbdbgp_parse_config */
#define dbgp_kgdb_mode (dbg_io_ops == &kgdbdbgp_io_ops)
#else
-@@ -1026,6 +1027,7 @@ static void kgdbdbgp_write_char(u8 chr)
+ #define dbgp_kgdb_mode (0)
+@@ -1026,7 +1026,7 @@ static void kgdbdbgp_write_char(u8 chr)
early_dbgp_write(NULL, &chr, 1);
}
-+/* cannot be const, see kgdbdbgp_parse_config() */
- static struct kgdb_io kgdbdbgp_io_ops = {
+-static struct kgdb_io kgdbdbgp_io_ops = {
++static struct kgdb_io kgdbdbgp_io_ops = { /* cannot be const, see kgdbdbgp_parse_config() */
.name = "kgdbdbgp",
.read_char = kgdbdbgp_read_char,
-diff -urNp linux-2.6.37.2/drivers/usb/host/ehci-pci.c linux-2.6.37.2/drivers/usb/host/ehci-pci.c
---- linux-2.6.37.2/drivers/usb/host/ehci-pci.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/host/ehci-pci.c 2011-02-22 16:05:42.000000000 -0500
-@@ -509,7 +509,7 @@ static const struct pci_device_id pci_id
+ .write_char = kgdbdbgp_write_char,
+diff -urNp linux-2.6.38.1/drivers/usb/host/ehci-pci.c linux-2.6.38.1/drivers/usb/host/ehci-pci.c
+--- linux-2.6.38.1/drivers/usb/host/ehci-pci.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/host/ehci-pci.c 2011-03-21 18:31:35.000000000 -0400
+@@ -516,7 +516,7 @@ static const struct pci_device_id pci_id
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
.driver_data = (unsigned long) &ehci_pci_hc_driver,
},
};
MODULE_DEVICE_TABLE(pci, pci_ids);
-diff -urNp linux-2.6.37.2/drivers/usb/host/uhci-hcd.c linux-2.6.37.2/drivers/usb/host/uhci-hcd.c
---- linux-2.6.37.2/drivers/usb/host/uhci-hcd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/host/uhci-hcd.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/host/uhci-hcd.c linux-2.6.38.1/drivers/usb/host/uhci-hcd.c
+--- linux-2.6.38.1/drivers/usb/host/uhci-hcd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/host/uhci-hcd.c 2011-03-21 18:31:35.000000000 -0400
@@ -948,7 +948,7 @@ static const struct pci_device_id uhci_p
/* handle any USB UHCI controller */
PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
};
MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
-diff -urNp linux-2.6.37.2/drivers/usb/mon/mon_main.c linux-2.6.37.2/drivers/usb/mon/mon_main.c
---- linux-2.6.37.2/drivers/usb/mon/mon_main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/mon/mon_main.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/mon/mon_main.c linux-2.6.38.1/drivers/usb/mon/mon_main.c
+--- linux-2.6.38.1/drivers/usb/mon/mon_main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/mon/mon_main.c 2011-03-21 18:31:35.000000000 -0400
@@ -238,7 +238,7 @@ static struct notifier_block mon_nb = {
/*
* Ops
.urb_submit = mon_submit,
.urb_submit_error = mon_submit_error,
.urb_complete = mon_complete,
-diff -urNp linux-2.6.37.2/drivers/usb/storage/debug.h linux-2.6.37.2/drivers/usb/storage/debug.h
---- linux-2.6.37.2/drivers/usb/storage/debug.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/storage/debug.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/storage/debug.h linux-2.6.38.1/drivers/usb/storage/debug.h
+--- linux-2.6.38.1/drivers/usb/storage/debug.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/storage/debug.h 2011-03-21 18:31:35.000000000 -0400
@@ -54,9 +54,9 @@ void usb_stor_show_sense( unsigned char
#define US_DEBUGPX(x...) printk( x )
#define US_DEBUG(x) x
#endif
#endif
-diff -urNp linux-2.6.37.2/drivers/usb/storage/usb.c linux-2.6.37.2/drivers/usb/storage/usb.c
---- linux-2.6.37.2/drivers/usb/storage/usb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/storage/usb.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/storage/usb.c linux-2.6.38.1/drivers/usb/storage/usb.c
+--- linux-2.6.38.1/drivers/usb/storage/usb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/storage/usb.c 2011-03-21 18:31:35.000000000 -0400
@@ -122,7 +122,7 @@ MODULE_PARM_DESC(quirks, "supplemental l
static struct us_unusual_dev us_unusual_dev_list[] = {
};
#undef UNUSUAL_DEV
-diff -urNp linux-2.6.37.2/drivers/usb/storage/usual-tables.c linux-2.6.37.2/drivers/usb/storage/usual-tables.c
---- linux-2.6.37.2/drivers/usb/storage/usual-tables.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/usb/storage/usual-tables.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/usb/storage/usual-tables.c linux-2.6.38.1/drivers/usb/storage/usual-tables.c
+--- linux-2.6.38.1/drivers/usb/storage/usual-tables.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/usb/storage/usual-tables.c 2011-03-21 18:31:35.000000000 -0400
@@ -48,7 +48,7 @@
struct usb_device_id usb_storage_usb_ids[] = {
};
EXPORT_SYMBOL_GPL(usb_storage_usb_ids);
-diff -urNp linux-2.6.37.2/drivers/vhost/vhost.c linux-2.6.37.2/drivers/vhost/vhost.c
---- linux-2.6.37.2/drivers/vhost/vhost.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/vhost/vhost.c 2011-01-17 02:41:01.000000000 -0500
-@@ -560,7 +560,7 @@ static int init_used(struct vhost_virtqu
+diff -urNp linux-2.6.38.1/drivers/vhost/vhost.c linux-2.6.38.1/drivers/vhost/vhost.c
+--- linux-2.6.38.1/drivers/vhost/vhost.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/vhost/vhost.c 2011-03-21 18:31:35.000000000 -0400
+@@ -565,7 +565,7 @@ static int init_used(struct vhost_virtqu
return get_user(vq->last_used_idx, &used->idx);
}
{
struct file *eventfp, *filep = NULL,
*pollstart = NULL, *pollstop = NULL;
-diff -urNp linux-2.6.37.2/drivers/video/atmel_lcdfb.c linux-2.6.37.2/drivers/video/atmel_lcdfb.c
---- linux-2.6.37.2/drivers/video/atmel_lcdfb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/atmel_lcdfb.c 2011-01-17 02:41:01.000000000 -0500
-@@ -111,7 +111,7 @@ static int atmel_bl_get_brightness(struc
- return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
- }
-
--static struct backlight_ops atmel_lcdc_bl_ops = {
-+static const struct backlight_ops atmel_lcdc_bl_ops = {
- .update_status = atmel_bl_update_status,
- .get_brightness = atmel_bl_get_brightness,
- };
-diff -urNp linux-2.6.37.2/drivers/video/aty/aty128fb.c linux-2.6.37.2/drivers/video/aty/aty128fb.c
---- linux-2.6.37.2/drivers/video/aty/aty128fb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/aty/aty128fb.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1786,7 +1786,7 @@ static int aty128_bl_get_brightness(stru
- return bd->props.brightness;
- }
-
--static struct backlight_ops aty128_bl_data = {
-+static const struct backlight_ops aty128_bl_data = {
- .get_brightness = aty128_bl_get_brightness,
- .update_status = aty128_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/aty/atyfb_base.c linux-2.6.37.2/drivers/video/aty/atyfb_base.c
---- linux-2.6.37.2/drivers/video/aty/atyfb_base.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/aty/atyfb_base.c 2011-02-22 16:05:42.000000000 -0500
-@@ -2221,7 +2221,7 @@ static int aty_bl_get_brightness(struct
- return bd->props.brightness;
- }
-
--static struct backlight_ops aty_bl_data = {
-+static const struct backlight_ops aty_bl_data = {
- .get_brightness = aty_bl_get_brightness,
- .update_status = aty_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/aty/radeon_backlight.c linux-2.6.37.2/drivers/video/aty/radeon_backlight.c
---- linux-2.6.37.2/drivers/video/aty/radeon_backlight.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/aty/radeon_backlight.c 2011-01-17 02:41:01.000000000 -0500
-@@ -128,7 +128,7 @@ static int radeon_bl_get_brightness(stru
- return bd->props.brightness;
- }
-
--static struct backlight_ops radeon_bl_data = {
-+static const struct backlight_ops radeon_bl_data = {
- .get_brightness = radeon_bl_get_brightness,
- .update_status = radeon_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/backlight/88pm860x_bl.c linux-2.6.37.2/drivers/video/backlight/88pm860x_bl.c
---- linux-2.6.37.2/drivers/video/backlight/88pm860x_bl.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/backlight/88pm860x_bl.c 2011-02-22 16:05:42.000000000 -0500
-@@ -155,7 +155,7 @@ out:
- return -EINVAL;
- }
-
--static struct backlight_ops pm860x_backlight_ops = {
-+static const struct backlight_ops pm860x_backlight_ops = {
- .options = BL_CORE_SUSPENDRESUME,
- .update_status = pm860x_backlight_update_status,
- .get_brightness = pm860x_backlight_get_brightness,
-diff -urNp linux-2.6.37.2/drivers/video/backlight/max8925_bl.c linux-2.6.37.2/drivers/video/backlight/max8925_bl.c
---- linux-2.6.37.2/drivers/video/backlight/max8925_bl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/backlight/max8925_bl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -92,7 +92,7 @@ static int max8925_backlight_get_brightn
- return ret;
- }
-
--static struct backlight_ops max8925_backlight_ops = {
-+static const struct backlight_ops max8925_backlight_ops = {
- .options = BL_CORE_SUSPENDRESUME,
- .update_status = max8925_backlight_update_status,
- .get_brightness = max8925_backlight_get_brightness,
-diff -urNp linux-2.6.37.2/drivers/video/fbcmap.c linux-2.6.37.2/drivers/video/fbcmap.c
---- linux-2.6.37.2/drivers/video/fbcmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/fbcmap.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/fbcmap.c linux-2.6.38.1/drivers/video/fbcmap.c
+--- linux-2.6.38.1/drivers/video/fbcmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/fbcmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -285,8 +285,7 @@ int fb_set_user_cmap(struct fb_cmap_user
rc = -ENODEV;
goto out;
rc = -EINVAL;
goto out1;
}
-diff -urNp linux-2.6.37.2/drivers/video/fbmem.c linux-2.6.37.2/drivers/video/fbmem.c
---- linux-2.6.37.2/drivers/video/fbmem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/fbmem.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/fbmem.c linux-2.6.38.1/drivers/video/fbmem.c
+--- linux-2.6.38.1/drivers/video/fbmem.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/fbmem.c 2011-03-21 18:31:35.000000000 -0400
@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_in
image->dx += image->width + 8;
}
return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
-diff -urNp linux-2.6.37.2/drivers/video/fbmon.c linux-2.6.37.2/drivers/video/fbmon.c
---- linux-2.6.37.2/drivers/video/fbmon.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/fbmon.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/fbmon.c linux-2.6.38.1/drivers/video/fbmon.c
+--- linux-2.6.38.1/drivers/video/fbmon.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/fbmon.c 2011-03-21 18:31:35.000000000 -0400
@@ -46,7 +46,7 @@
#ifdef DEBUG
#define DPRINTK(fmt, args...) printk(fmt,## args)
#endif
#define FBMON_FIX_HEADER 1
-diff -urNp linux-2.6.37.2/drivers/video/i810/i810_accel.c linux-2.6.37.2/drivers/video/i810/i810_accel.c
---- linux-2.6.37.2/drivers/video/i810/i810_accel.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/i810/i810_accel.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/i810/i810_accel.c linux-2.6.38.1/drivers/video/i810/i810_accel.c
+--- linux-2.6.38.1/drivers/video/i810/i810_accel.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/i810/i810_accel.c 2011-03-21 18:31:35.000000000 -0400
@@ -73,6 +73,7 @@ static inline int wait_for_space(struct
}
}
i810_report_error(mmio);
par->dev_flags |= LOCKUP;
info->pixmap.scan_align = 1;
-diff -urNp linux-2.6.37.2/drivers/video/i810/i810_main.c linux-2.6.37.2/drivers/video/i810/i810_main.c
---- linux-2.6.37.2/drivers/video/i810/i810_main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/i810/i810_main.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/i810/i810_main.c linux-2.6.38.1/drivers/video/i810/i810_main.c
+--- linux-2.6.38.1/drivers/video/i810/i810_main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/i810/i810_main.c 2011-03-21 18:31:35.000000000 -0400
@@ -120,7 +120,7 @@ static struct pci_device_id i810fb_pci_t
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC,
};
static struct pci_driver i810fb_driver = {
-diff -urNp linux-2.6.37.2/drivers/video/modedb.c linux-2.6.37.2/drivers/video/modedb.c
---- linux-2.6.37.2/drivers/video/modedb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/modedb.c 2011-01-17 02:41:01.000000000 -0500
-@@ -40,240 +40,240 @@ static const struct fb_videomode modedb[
- {
+diff -urNp linux-2.6.38.1/drivers/video/modedb.c linux-2.6.38.1/drivers/video/modedb.c
+--- linux-2.6.38.1/drivers/video/modedb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/modedb.c 2011-03-21 18:31:35.000000000 -0400
+@@ -40,255 +40,255 @@ static const struct fb_videomode modedb[
+
/* 640x400 @ 70 Hz, 31.5 kHz hsync */
- NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x480 @ 60 Hz, 31.5 kHz hsync */
- NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 800x600 @ 56 Hz, 35.15 kHz hsync */
- NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync */
- NULL, 87, 1024, 768, 22271, 56, 24, 33, 8, 160, 8,
-- 0, FB_VMODE_INTERLACED
-+ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 87, 1024, 768, 22271, 56, 24, 33, 8, 160, 8, 0,
+- FB_VMODE_INTERLACED },
++ FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x400 @ 85 Hz, 37.86 kHz hsync */
- NULL, 85, 640, 400, 31746, 96, 32, 41, 1, 64, 3,
-- FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 640, 400, 31746, 96, 32, 41, 1, 64, 3,
+- FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED },
++ FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x480 @ 72 Hz, 36.5 kHz hsync */
- NULL, 72, 640, 480, 31746, 144, 40, 30, 8, 40, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 72, 640, 480, 31746, 144, 40, 30, 8, 40, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x480 @ 75 Hz, 37.50 kHz hsync */
- NULL, 75, 640, 480, 31746, 120, 16, 16, 1, 64, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 75, 640, 480, 31746, 120, 16, 16, 1, 64, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 800x600 @ 60 Hz, 37.8 kHz hsync */
- NULL, 60, 800, 600, 25000, 88, 40, 23, 1, 128, 4,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 800, 600, 25000, 88, 40, 23, 1, 128, 4,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x480 @ 85 Hz, 43.27 kHz hsync */
- NULL, 85, 640, 480, 27777, 80, 56, 25, 1, 56, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 640, 480, 27777, 80, 56, 25, 1, 56, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 89 Hz interlaced, 44 kHz hsync */
- NULL, 89, 1152, 864, 15384, 96, 16, 110, 1, 216, 10,
-- 0, FB_VMODE_INTERLACED
-+ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 89, 1152, 864, 15384, 96, 16, 110, 1, 216, 10, 0,
+- FB_VMODE_INTERLACED },
++ FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN },
/* 800x600 @ 72 Hz, 48.0 kHz hsync */
- NULL, 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 60 Hz, 48.4 kHz hsync */
- NULL, 60, 1024, 768, 15384, 168, 8, 29, 3, 144, 6,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1024, 768, 15384, 168, 8, 29, 3, 144, 6, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 640x480 @ 100 Hz, 53.01 kHz hsync */
- NULL, 100, 640, 480, 21834, 96, 32, 36, 8, 96, 6,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 100, 640, 480, 21834, 96, 32, 36, 8, 96, 6, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 60 Hz, 53.5 kHz hsync */
- NULL, 60, 1152, 864, 11123, 208, 64, 16, 4, 256, 8,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1152, 864, 11123, 208, 64, 16, 4, 256, 8, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 800x600 @ 85 Hz, 55.84 kHz hsync */
- NULL, 85, 800, 600, 16460, 160, 64, 36, 16, 64, 5,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 800, 600, 16460, 160, 64, 36, 16, 64, 5, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 70 Hz, 56.5 kHz hsync */
- NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */
- NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12,
-- 0, FB_VMODE_INTERLACED
-+ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12, 0,
+- FB_VMODE_INTERLACED },
++ FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 800x600 @ 100 Hz, 64.02 kHz hsync */
- NULL, 100, 800, 600, 14357, 160, 64, 30, 4, 64, 6,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 100, 800, 600, 14357, 160, 64, 30, 4, 64, 6, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 76 Hz, 62.5 kHz hsync */
- NULL, 76, 1024, 768, 11764, 208, 8, 36, 16, 120, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 76, 1024, 768, 11764, 208, 8, 36, 16, 120, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 70 Hz, 62.4 kHz hsync */
- NULL, 70, 1152, 864, 10869, 106, 56, 20, 1, 160, 10,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 1152, 864, 10869, 106, 56, 20, 1, 160, 10, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 61 Hz, 64.2 kHz hsync */
- NULL, 61, 1280, 1024, 9090, 200, 48, 26, 1, 184, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 61, 1280, 1024, 9090, 200, 48, 26, 1, 184, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1400x1050 @ 60Hz, 63.9 kHz hsync */
- NULL, 60, 1400, 1050, 9259, 136, 40, 13, 1, 112, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1400, 1050, 9259, 136, 40, 13, 1, 112, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1400x1050 @ 75,107 Hz, 82,392 kHz +hsync +vsync*/
- NULL, 75, 1400, 1050, 7190, 120, 56, 23, 10, 112, 13,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 75, 1400, 1050, 7190, 120, 56, 23, 10, 112, 13,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1400x1050 @ 60 Hz, ? kHz +hsync +vsync*/
- NULL, 60, 1400, 1050, 9259, 128, 40, 12, 0, 112, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1400, 1050, 9259, 128, 40, 12, 0, 112, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 85 Hz, 70.24 kHz hsync */
- NULL, 85, 1024, 768, 10111, 192, 32, 34, 14, 160, 6,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 1024, 768, 10111, 192, 32, 34, 14, 160, 6, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 78 Hz, 70.8 kHz hsync */
- NULL, 78, 1152, 864, 9090, 228, 88, 32, 0, 84, 12,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 78, 1152, 864, 9090, 228, 88, 32, 0, 84, 12, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 70 Hz, 74.59 kHz hsync */
- NULL, 70, 1280, 1024, 7905, 224, 32, 28, 8, 160, 8,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 1280, 1024, 7905, 224, 32, 28, 8, 160, 8, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1600x1200 @ 60Hz, 75.00 kHz hsync */
- NULL, 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 84 Hz, 76.0 kHz hsync */
- NULL, 84, 1152, 864, 7407, 184, 312, 32, 0, 128, 12,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 84, 1152, 864, 7407, 184, 312, 32, 0, 128, 12, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 74 Hz, 78.85 kHz hsync */
- NULL, 74, 1280, 1024, 7407, 256, 32, 34, 3, 144, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 74, 1280, 1024, 7407, 256, 32, 34, 3, 144, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1024x768 @ 100Hz, 80.21 kHz hsync */
- NULL, 100, 1024, 768, 8658, 192, 32, 21, 3, 192, 10,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 100, 1024, 768, 8658, 192, 32, 21, 3, 192, 10, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 76 Hz, 81.13 kHz hsync */
- NULL, 76, 1280, 1024, 7407, 248, 32, 34, 3, 104, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 76, 1280, 1024, 7407, 248, 32, 34, 3, 104, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1600x1200 @ 70 Hz, 87.50 kHz hsync */
- NULL, 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x864 @ 100 Hz, 89.62 kHz hsync */
- NULL, 100, 1152, 864, 7264, 224, 32, 17, 2, 128, 19,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 100, 1152, 864, 7264, 224, 32, 17, 2, 128, 19, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 85 Hz, 91.15 kHz hsync */
- NULL, 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1600x1200 @ 75 Hz, 93.75 kHz hsync */
- NULL, 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1680x1050 @ 60 Hz, 65.191 kHz hsync */
- NULL, 60, 1680, 1050, 6848, 280, 104, 30, 3, 176, 6,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1680, 1050, 6848, 280, 104, 30, 3, 176, 6,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1600x1200 @ 85 Hz, 105.77 kHz hsync */
- NULL, 85, 1600, 1200, 4545, 272, 16, 37, 4, 192, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 1600, 1200, 4545, 272, 16, 37, 4, 192, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1280x1024 @ 100 Hz, 107.16 kHz hsync */
- NULL, 100, 1280, 1024, 5502, 256, 32, 26, 7, 128, 15,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 100, 1280, 1024, 5502, 256, 32, 26, 7, 128, 15, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1800x1440 @ 64Hz, 96.15 kHz hsync */
- NULL, 64, 1800, 1440, 4347, 304, 96, 46, 1, 192, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 64, 1800, 1440, 4347, 304, 96, 46, 1, 192, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1800x1440 @ 70Hz, 104.52 kHz hsync */
- NULL, 70, 1800, 1440, 4000, 304, 96, 46, 1, 192, 3,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 1800, 1440, 4000, 304, 96, 46, 1, 192, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 512x384 @ 78 Hz, 31.50 kHz hsync */
- NULL, 78, 512, 384, 49603, 48, 16, 16, 1, 64, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 78, 512, 384, 49603, 48, 16, 16, 1, 64, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 512x384 @ 85 Hz, 34.38 kHz hsync */
- NULL, 85, 512, 384, 45454, 48, 16, 16, 1, 64, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 85, 512, 384, 45454, 48, 16, 16, 1, 64, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio */
- NULL, 70, 320, 200, 79440, 16, 16, 20, 4, 48, 1,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 70, 320, 200, 79440, 16, 16, 20, 4, 48, 1, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio */
- NULL, 60, 320, 240, 79440, 16, 16, 16, 5, 48, 1,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 320, 240, 79440, 16, 16, 16, 5, 48, 1, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 320x240 @ 72 Hz, 36.5 kHz hsync */
- NULL, 72, 320, 240, 63492, 16, 16, 16, 4, 48, 2,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 72, 320, 240, 63492, 16, 16, 16, 4, 48, 2, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio */
- NULL, 56, 400, 300, 55555, 64, 16, 10, 1, 32, 1,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 56, 400, 300, 55555, 64, 16, 10, 1, 32, 1, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 400x300 @ 60 Hz, 37.8 kHz hsync */
- NULL, 60, 400, 300, 50000, 48, 16, 11, 1, 64, 2,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 400, 300, 50000, 48, 16, 11, 1, 64, 2, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 400x300 @ 72 Hz, 48.0 kHz hsync */
- NULL, 72, 400, 300, 40000, 32, 24, 11, 19, 64, 3,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 72, 400, 300, 40000, 32, 24, 11, 19, 64, 3, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 480x300 @ 56 Hz, 35.2 kHz hsync, 8:5 aspect ratio */
- NULL, 56, 480, 300, 46176, 80, 16, 10, 1, 40, 1,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 56, 480, 300, 46176, 80, 16, 10, 1, 40, 1, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 480x300 @ 60 Hz, 37.8 kHz hsync */
- NULL, 60, 480, 300, 41858, 56, 16, 11, 1, 80, 2,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 480, 300, 41858, 56, 16, 11, 1, 80, 2, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 480x300 @ 63 Hz, 39.6 kHz hsync */
- NULL, 63, 480, 300, 40000, 56, 16, 11, 1, 80, 2,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 63, 480, 300, 40000, 56, 16, 11, 1, 80, 2, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 480x300 @ 72 Hz, 48.0 kHz hsync */
- NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3,
-- 0, FB_VMODE_DOUBLE
-+ 0, FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
+- FB_VMODE_DOUBLE },
++ FB_VMODE_DOUBLE, FB_MODE_IS_UNKNOWN },
+
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
- NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-- FB_VMODE_NONINTERLACED
-+ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
+ { NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
/* 1152x768, 60 Hz, PowerBook G4 Titanium I and II */
- NULL, 60, 1152, 768, 14047, 158, 26, 29, 3, 136, 6,
-- FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-+ FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
- /* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */
- NULL, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
- /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
- NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
-- 0, FB_VMODE_NONINTERLACED
-+ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN
- }, {
- /* 720x576i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
- NULL, 50, 720, 576, 74074, 64, 16, 39, 5, 64, 5,
-- 0, FB_VMODE_INTERLACED
-+ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
- }, {
- /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
- NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5,
-- 0, FB_VMODE_INTERLACED
-+ 0, FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN
- },
- };
-
-diff -urNp linux-2.6.37.2/drivers/video/nvidia/nv_backlight.c linux-2.6.37.2/drivers/video/nvidia/nv_backlight.c
---- linux-2.6.37.2/drivers/video/nvidia/nv_backlight.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/nvidia/nv_backlight.c 2011-01-17 02:41:01.000000000 -0500
-@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(stru
- return bd->props.brightness;
- }
-
--static struct backlight_ops nvidia_bl_ops = {
-+static const struct backlight_ops nvidia_bl_ops = {
- .get_brightness = nvidia_bl_get_brightness,
- .update_status = nvidia_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/omap2/displays/panel-taal.c linux-2.6.37.2/drivers/video/omap2/displays/panel-taal.c
---- linux-2.6.37.2/drivers/video/omap2/displays/panel-taal.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/omap2/displays/panel-taal.c 2011-01-17 02:41:01.000000000 -0500
-@@ -465,7 +465,7 @@ static int taal_bl_get_intensity(struct
- return 0;
- }
+ { NULL, 60, 1152, 768, 14047, 158, 26, 29, 3, 136, 6,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
--static struct backlight_ops taal_bl_ops = {
-+static const struct backlight_ops taal_bl_ops = {
- .get_brightness = taal_bl_get_intensity,
- .update_status = taal_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/riva/fbdev.c linux-2.6.37.2/drivers/video/riva/fbdev.c
---- linux-2.6.37.2/drivers/video/riva/fbdev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/riva/fbdev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct
- return bd->props.brightness;
- }
+ /* 1366x768, 60 Hz, 47.403 kHz hsync, WXGA 16:9 aspect ratio */
+ { NULL, 60, 1366, 768, 13806, 120, 10, 14, 3, 32, 5, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
--static struct backlight_ops riva_bl_ops = {
-+static const struct backlight_ops riva_bl_ops = {
- .get_brightness = riva_bl_get_brightness,
- .update_status = riva_bl_update_status,
- };
-diff -urNp linux-2.6.37.2/drivers/video/uvesafb.c linux-2.6.37.2/drivers/video/uvesafb.c
---- linux-2.6.37.2/drivers/video/uvesafb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/uvesafb.c 2011-01-17 02:41:01.000000000 -0500
+ /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
+ { NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3, 0,
+- FB_VMODE_NONINTERLACED },
++ FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+
+ /* 720x576i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+ { NULL, 50, 720, 576, 74074, 64, 16, 39, 5, 64, 5, 0,
+- FB_VMODE_INTERLACED },
++ FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN },
+
+ /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+ { NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5, 0,
+- FB_VMODE_INTERLACED },
++ FB_VMODE_INTERLACED, FB_MODE_IS_UNKNOWN },
+
+ /* 864x480 @ 60 Hz, 35.15 kHz hsync */
+ { NULL, 60, 864, 480, 27777, 1, 1, 1, 1, 0, 0,
+- 0, FB_VMODE_NONINTERLACED },
++ 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_UNKNOWN },
+ };
+
+ #ifdef CONFIG_FB_MODE_HELPERS
+diff -urNp linux-2.6.38.1/drivers/video/pxa3xx-gcu.c linux-2.6.38.1/drivers/video/pxa3xx-gcu.c
+--- linux-2.6.38.1/drivers/video/pxa3xx-gcu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/pxa3xx-gcu.c 2011-03-21 18:31:35.000000000 -0400
+@@ -103,7 +103,7 @@ struct pxa3xx_gcu_priv {
+ dma_addr_t shared_phys;
+ struct resource *resource_mem;
+ struct miscdevice misc_dev;
+- struct file_operations misc_fops;
++ const struct file_operations misc_fops;
+ wait_queue_head_t wait_idle;
+ wait_queue_head_t wait_free;
+ spinlock_t spinlock;
+diff -urNp linux-2.6.38.1/drivers/video/uvesafb.c linux-2.6.38.1/drivers/video/uvesafb.c
+--- linux-2.6.38.1/drivers/video/uvesafb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/uvesafb.c 2011-03-21 18:31:35.000000000 -0400
@@ -19,6 +19,7 @@
#include <linux/io.h>
#include <linux/mutex.h>
}
framebuffer_release(info);
-diff -urNp linux-2.6.37.2/drivers/video/vesafb.c linux-2.6.37.2/drivers/video/vesafb.c
---- linux-2.6.37.2/drivers/video/vesafb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/drivers/video/vesafb.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/drivers/video/vesafb.c linux-2.6.38.1/drivers/video/vesafb.c
+--- linux-2.6.38.1/drivers/video/vesafb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/drivers/video/vesafb.c 2011-03-21 18:31:35.000000000 -0400
@@ -9,6 +9,7 @@
*/
if (info->screen_base)
iounmap(info->screen_base);
framebuffer_release(info);
-diff -urNp linux-2.6.37.2/fs/9p/vfs_inode.c linux-2.6.37.2/fs/9p/vfs_inode.c
---- linux-2.6.37.2/fs/9p/vfs_inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/9p/vfs_inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1598,7 +1598,7 @@ static void *v9fs_vfs_follow_link(struct
- static void
+diff -urNp linux-2.6.38.1/fs/9p/vfs_inode.c linux-2.6.38.1/fs/9p/vfs_inode.c
+--- linux-2.6.38.1/fs/9p/vfs_inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/9p/vfs_inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1094,7 +1094,7 @@ static void *v9fs_vfs_follow_link(struct
+ void
v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
{
- char *s = nd_get_link(nd);
P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
IS_ERR(s) ? "<error>" : s);
-diff -urNp linux-2.6.37.2/fs/aio.c linux-2.6.37.2/fs/aio.c
---- linux-2.6.37.2/fs/aio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/aio.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/aio.c linux-2.6.38.1/fs/aio.c
+--- linux-2.6.38.1/fs/aio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/aio.c 2011-03-21 18:31:35.000000000 -0400
@@ -130,7 +130,7 @@ static int aio_setup_ring(struct kioctx
size += sizeof(struct io_event) * nr_events;
nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT;
return -EINVAL;
nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
-diff -urNp linux-2.6.37.2/fs/attr.c linux-2.6.37.2/fs/attr.c
---- linux-2.6.37.2/fs/attr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/attr.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/attr.c linux-2.6.38.1/fs/attr.c
+--- linux-2.6.38.1/fs/attr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/attr.c 2011-03-21 18:31:35.000000000 -0400
@@ -98,6 +98,7 @@ int inode_newsize_ok(const struct inode
unsigned long limit;
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
-diff -urNp linux-2.6.37.2/fs/autofs4/symlink.c linux-2.6.37.2/fs/autofs4/symlink.c
---- linux-2.6.37.2/fs/autofs4/symlink.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/autofs4/symlink.c 2011-01-17 02:41:01.000000000 -0500
-@@ -15,7 +15,7 @@
- static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
- {
- struct autofs_info *ino = autofs4_dentry_ino(dentry);
-- nd_set_link(nd, (char *)ino->u.symlink);
-+ nd_set_link(nd, ino->u.symlink);
- return NULL;
- }
-
-diff -urNp linux-2.6.37.2/fs/befs/linuxvfs.c linux-2.6.37.2/fs/befs/linuxvfs.c
---- linux-2.6.37.2/fs/befs/linuxvfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/befs/linuxvfs.c 2011-01-17 02:41:01.000000000 -0500
-@@ -493,7 +493,7 @@ static void befs_put_link(struct dentry
+diff -urNp linux-2.6.38.1/fs/befs/linuxvfs.c linux-2.6.38.1/fs/befs/linuxvfs.c
+--- linux-2.6.38.1/fs/befs/linuxvfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/befs/linuxvfs.c 2011-03-21 18:31:35.000000000 -0400
+@@ -499,7 +499,7 @@ static void befs_put_link(struct dentry
{
befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-2.6.37.2/fs/binfmt_aout.c linux-2.6.37.2/fs/binfmt_aout.c
---- linux-2.6.37.2/fs/binfmt_aout.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/binfmt_aout.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/binfmt_aout.c linux-2.6.38.1/fs/binfmt_aout.c
+--- linux-2.6.38.1/fs/binfmt_aout.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/binfmt_aout.c 2011-03-21 18:31:35.000000000 -0400
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/fs.h>
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up_write(¤t->mm->mmap_sem);
-diff -urNp linux-2.6.37.2/fs/binfmt_elf.c linux-2.6.37.2/fs/binfmt_elf.c
---- linux-2.6.37.2/fs/binfmt_elf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/binfmt_elf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/binfmt_elf.c linux-2.6.38.1/fs/binfmt_elf.c
+--- linux-2.6.38.1/fs/binfmt_elf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/binfmt_elf.c 2011-03-21 18:31:35.000000000 -0400
@@ -51,6 +51,10 @@ static int elf_core_dump(struct coredump
#define elf_core_dump NULL
#endif
#define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
#else
@@ -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,
+ .load_binary = load_elf_binary,
+ .load_shlib = load_elf_library,
+ .core_dump = elf_core_dump,
+
+#ifdef CONFIG_PAX_MPROTECT
+ .handle_mprotect= elf_handle_mprotect,
+#endif
+
- .min_coredump = ELF_EXEC_PAGESIZE,
- .hasvdso = 1
+ .min_coredump = ELF_EXEC_PAGESIZE,
};
-@@ -78,6 +87,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)
{
start = ELF_PAGEALIGN(start);
end = ELF_PAGEALIGN(end);
if (end > start) {
-@@ -88,7 +99,7 @@ static int set_brk(unsigned long start,
+@@ -87,7 +98,7 @@ static int set_brk(unsigned long start,
if (BAD_ADDR(addr))
return addr;
}
return 0;
}
-@@ -149,7 +160,7 @@ create_elf_tables(struct linux_binprm *b
+@@ -148,7 +159,7 @@ create_elf_tables(struct linux_binprm *b
elf_addr_t __user *u_rand_bytes;
const char *k_platform = ELF_PLATFORM;
const char *k_base_platform = ELF_BASE_PLATFORM;
int items;
elf_addr_t *elf_info;
int ei_index = 0;
-@@ -196,8 +207,12 @@ create_elf_tables(struct linux_binprm *b
+@@ -195,8 +206,12 @@ create_elf_tables(struct linux_binprm *b
* Generate 16 random bytes for userspace PRNG seeding.
*/
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
return -EFAULT;
-@@ -386,10 +401,10 @@ static unsigned long load_elf_interp(str
+@@ -381,10 +396,10 @@ static unsigned long load_elf_interp(str
{
struct elf_phdr *elf_phdata;
struct elf_phdr *eppnt;
unsigned long total_size;
int retval, i, size;
-@@ -435,6 +450,11 @@ static unsigned long load_elf_interp(str
+@@ -430,6 +445,11 @@ static unsigned long load_elf_interp(str
goto out_close;
}
eppnt = elf_phdata;
for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
if (eppnt->p_type == PT_LOAD) {
-@@ -478,8 +498,8 @@ static unsigned long load_elf_interp(str
+@@ -473,8 +493,8 @@ static unsigned long load_elf_interp(str
k = load_addr + eppnt->p_vaddr;
if (BAD_ADDR(k) ||
eppnt->p_filesz > eppnt->p_memsz ||
error = -ENOMEM;
goto out_close;
}
-@@ -533,6 +553,177 @@ out:
+@@ -528,6 +548,177 @@ out:
return error;
}
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -549,6 +740,11 @@ static unsigned long randomize_stack_top
+@@ -544,6 +735,11 @@ static unsigned long randomize_stack_top
{
unsigned int random_variable = 0;
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
random_variable = get_random_int() & STACK_RND_MASK;
-@@ -567,7 +763,7 @@ static int load_elf_binary(struct linux_
+@@ -562,7 +758,7 @@ static int load_elf_binary(struct linux_
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retval, i;
-@@ -577,11 +773,11 @@ static int load_elf_binary(struct linux_
+@@ -572,11 +768,11 @@ static int load_elf_binary(struct linux_
unsigned long start_code, end_code, start_data, end_data;
unsigned long reloc_func_desc = 0;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -719,11 +915,80 @@ static int load_elf_binary(struct linux_
+@@ -714,11 +910,80 @@ static int load_elf_binary(struct linux_
/* OK, This is the point of no return */
current->flags &= ~PF_FORKNOEXEC;
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
-@@ -805,6 +1070,20 @@ static int load_elf_binary(struct linux_
+@@ -800,6 +1065,20 @@ static int load_elf_binary(struct linux_
#else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
#endif
}
error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-@@ -837,9 +1116,9 @@ static int load_elf_binary(struct linux_
+@@ -832,9 +1111,9 @@ static int load_elf_binary(struct linux_
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
/* set_brk can never work. Avoid overflows. */
send_sig(SIGKILL, current, 0);
retval = -EINVAL;
-@@ -867,6 +1146,11 @@ static int load_elf_binary(struct linux_
+@@ -862,6 +1141,11 @@ static int load_elf_binary(struct linux_
start_data += load_bias;
end_data += load_bias;
/* 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
-@@ -878,9 +1162,11 @@ static int load_elf_binary(struct linux_
+@@ -873,9 +1157,11 @@ static int load_elf_binary(struct linux_
goto out_free_dentry;
}
if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
}
if (elf_interpreter) {
-@@ -1091,7 +1377,7 @@ out:
+@@ -1086,7 +1372,7 @@ out:
* Decide what to dump of a segment, part, all or none.
*/
static unsigned long vma_dump_size(struct vm_area_struct *vma,
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
-@@ -1125,7 +1411,7 @@ static unsigned long vma_dump_size(struc
+@@ -1120,7 +1406,7 @@ static unsigned long vma_dump_size(struc
if (vma->vm_file == NULL)
return 0;
goto whole;
/*
-@@ -1347,9 +1633,9 @@ static void fill_auxv_note(struct memelf
+@@ -1342,9 +1628,9 @@ static void fill_auxv_note(struct memelf
{
elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
int i = 0;
fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
}
-@@ -1855,14 +2141,14 @@ static void fill_extnum_info(struct elfh
+@@ -1850,14 +2136,14 @@ static void fill_extnum_info(struct elfh
}
static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma,
return size;
}
-@@ -1956,7 +2242,7 @@ static int elf_core_dump(struct coredump
+@@ -1951,7 +2237,7 @@ static int elf_core_dump(struct coredump
dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
offset += elf_core_extra_data_size();
e_shoff = offset;
-@@ -1970,10 +2256,12 @@ static int elf_core_dump(struct coredump
+@@ -1965,10 +2251,12 @@ static int elf_core_dump(struct coredump
offset = dataoff;
size += sizeof(*elf);
if (size > cprm->limit
|| !dump_write(cprm->file, phdr4note, sizeof(*phdr4note)))
goto end_coredump;
-@@ -1987,7 +2275,7 @@ static int elf_core_dump(struct coredump
+@@ -1982,7 +2270,7 @@ static int elf_core_dump(struct coredump
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
phdr.p_memsz = vma->vm_end - vma->vm_start;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -1998,6 +2286,7 @@ static int elf_core_dump(struct coredump
+@@ -1993,6 +2281,7 @@ static int elf_core_dump(struct coredump
phdr.p_align = ELF_EXEC_PAGESIZE;
size += sizeof(phdr);
if (size > cprm->limit
|| !dump_write(cprm->file, &phdr, sizeof(phdr)))
goto end_coredump;
-@@ -2022,7 +2311,7 @@ static int elf_core_dump(struct coredump
+@@ -2017,7 +2306,7 @@ static int elf_core_dump(struct coredump
unsigned long addr;
unsigned long end;
for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
struct page *page;
-@@ -2031,6 +2320,7 @@ static int elf_core_dump(struct coredump
+@@ -2026,6 +2315,7 @@ static int elf_core_dump(struct coredump
page = get_dump_page(addr);
if (page) {
void *kaddr = kmap(page);
stop = ((size += PAGE_SIZE) > cprm->limit) ||
!dump_write(cprm->file, kaddr,
PAGE_SIZE);
-@@ -2048,6 +2338,7 @@ static int elf_core_dump(struct coredump
+@@ -2043,6 +2333,7 @@ static int elf_core_dump(struct coredump
if (e_phnum == PN_XNUM) {
size += sizeof(*shdr4extnum);
if (size > cprm->limit
|| !dump_write(cprm->file, shdr4extnum,
sizeof(*shdr4extnum)))
-@@ -2068,6 +2359,97 @@ out:
+@@ -2063,6 +2354,97 @@ out:
#endif /* CONFIG_ELF_CORE */
static int __init init_elf_binfmt(void)
{
return register_binfmt(&elf_format);
-diff -urNp linux-2.6.37.2/fs/binfmt_flat.c linux-2.6.37.2/fs/binfmt_flat.c
---- linux-2.6.37.2/fs/binfmt_flat.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/binfmt_flat.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/binfmt_flat.c linux-2.6.38.1/fs/binfmt_flat.c
+--- linux-2.6.38.1/fs/binfmt_flat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/binfmt_flat.c 2011-03-21 18:31:35.000000000 -0400
@@ -567,7 +567,9 @@ static int load_flat_file(struct linux_b
realdatastart = (unsigned long) -ENOMEM;
printk("Unable to allocate RAM for process data, errno %d\n",
ret = result;
goto err;
}
-diff -urNp linux-2.6.37.2/fs/binfmt_misc.c linux-2.6.37.2/fs/binfmt_misc.c
---- linux-2.6.37.2/fs/binfmt_misc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/binfmt_misc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/binfmt_misc.c linux-2.6.38.1/fs/binfmt_misc.c
+--- linux-2.6.38.1/fs/binfmt_misc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/binfmt_misc.c 2011-03-21 18:31:35.000000000 -0400
@@ -698,7 +698,7 @@ static int bm_fill_super(struct super_bl
static struct tree_descr bm_files[] = {
[2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO},
};
int err = simple_fill_super(sb, 0x42494e4d, bm_files);
if (!err)
-diff -urNp linux-2.6.37.2/fs/bio.c linux-2.6.37.2/fs/bio.c
---- linux-2.6.37.2/fs/bio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/bio.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/bio.c linux-2.6.38.1/fs/bio.c
+--- linux-2.6.38.1/fs/bio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/bio.c 2011-03-21 18:31:35.000000000 -0400
@@ -1233,7 +1233,7 @@ static void bio_copy_kern_endio(struct b
const int read = bio_data_dir(bio) == READ;
struct bio_map_data *bmd = bio->bi_private;
__bio_for_each_segment(bvec, bio, i, 0) {
char *addr = page_address(bvec->bv_page);
-diff -urNp linux-2.6.37.2/fs/block_dev.c linux-2.6.37.2/fs/block_dev.c
---- linux-2.6.37.2/fs/block_dev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/block_dev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -662,7 +662,7 @@ static bool bd_may_claim(struct block_de
+diff -urNp linux-2.6.38.1/fs/block_dev.c linux-2.6.38.1/fs/block_dev.c
+--- linux-2.6.38.1/fs/block_dev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/block_dev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -669,7 +669,7 @@ static bool bd_may_claim(struct block_de
else if (bdev->bd_contains == bdev)
return true; /* is a whole device which isn't held */
-- else if (whole->bd_holder == bd_claim)
-+ else if (whole->bd_holder == (void *)bd_claim)
+- else if (whole->bd_holder == bd_may_claim)
++ else if (whole->bd_holder == (void *)bd_may_claim)
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-2.6.37.2/fs/btrfs/ctree.c linux-2.6.37.2/fs/btrfs/ctree.c
---- linux-2.6.37.2/fs/btrfs/ctree.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/ctree.c 2011-01-17 02:41:01.000000000 -0500
-@@ -466,9 +466,12 @@ static noinline int __btrfs_cow_block(st
+diff -urNp linux-2.6.38.1/fs/btrfs/ctree.c linux-2.6.38.1/fs/btrfs/ctree.c
+--- linux-2.6.38.1/fs/btrfs/ctree.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/ctree.c 2011-03-21 18:31:35.000000000 -0400
+@@ -468,9 +468,12 @@ static noinline int __btrfs_cow_block(st
free_extent_buffer(buf);
add_root_to_dirty_list(root);
} else {
parent_start = 0;
WARN_ON(trans->transid != btrfs_header_generation(parent));
-@@ -3768,7 +3771,6 @@ setup_items_for_insert(struct btrfs_tran
+@@ -3776,7 +3779,6 @@ setup_items_for_insert(struct btrfs_tran
ret = 0;
if (slot == 0) {
btrfs_cpu_key_to_disk(&disk_key, cpu_key);
ret = fixup_low_keys(trans, root, path, &disk_key, 1);
}
-diff -urNp linux-2.6.37.2/fs/btrfs/disk-io.c linux-2.6.37.2/fs/btrfs/disk-io.c
---- linux-2.6.37.2/fs/btrfs/disk-io.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/disk-io.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/btrfs/disk-io.c linux-2.6.38.1/fs/btrfs/disk-io.c
+--- linux-2.6.38.1/fs/btrfs/disk-io.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/disk-io.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,7 +41,7 @@
#include "tree-log.h"
#include "free-space-cache.h"
+static const struct extent_io_ops btree_extent_io_ops;
static void end_workqueue_fn(struct btrfs_work *work);
static void free_fs_root(struct btrfs_root *root);
-
-@@ -2619,7 +2619,7 @@ out:
+ static void btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
+@@ -3028,7 +3028,7 @@ static int btrfs_cleanup_transaction(str
return 0;
}
.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.37.2/fs/btrfs/extent_io.h linux-2.6.37.2/fs/btrfs/extent_io.h
---- linux-2.6.37.2/fs/btrfs/extent_io.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/extent_io.h 2011-01-17 02:41:01.000000000 -0500
-@@ -51,36 +51,36 @@ typedef int (extent_submit_bio_hook_t)(s
+diff -urNp linux-2.6.38.1/fs/btrfs/extent_io.h linux-2.6.38.1/fs/btrfs/extent_io.h
+--- linux-2.6.38.1/fs/btrfs/extent_io.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/extent_io.h 2011-03-21 18:31:35.000000000 -0400
+@@ -55,36 +55,36 @@ typedef int (extent_submit_bio_hook_t)(s
struct bio *bio, int mirror_num,
unsigned long bio_flags, u64 bio_offset);
struct extent_io_ops {
};
struct extent_io_tree {
-@@ -90,7 +90,7 @@ struct extent_io_tree {
+@@ -94,7 +94,7 @@ struct extent_io_tree {
u64 dirty_bytes;
spinlock_t lock;
spinlock_t buffer_lock;
};
struct extent_state {
-diff -urNp linux-2.6.37.2/fs/btrfs/free-space-cache.c linux-2.6.37.2/fs/btrfs/free-space-cache.c
---- linux-2.6.37.2/fs/btrfs/free-space-cache.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/free-space-cache.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1828,8 +1828,6 @@ u64 btrfs_alloc_from_cluster(struct btrf
+diff -urNp linux-2.6.38.1/fs/btrfs/free-space-cache.c linux-2.6.38.1/fs/btrfs/free-space-cache.c
+--- linux-2.6.38.1/fs/btrfs/free-space-cache.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/free-space-cache.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1855,8 +1855,6 @@ u64 btrfs_alloc_from_cluster(struct btrf
while(1) {
if (entry->bytes < bytes || entry->offset < min_start) {
node = rb_next(&entry->offset_index);
if (!node)
break;
-@@ -1980,7 +1978,7 @@ again:
+@@ -2018,7 +2016,7 @@ again:
*/
while (entry->bitmap || found_bitmap ||
(!entry->bitmap && entry->bytes < min_bytes)) {
if (entry->bitmap && entry->bytes > bytes + empty_size) {
ret = btrfs_bitmap_cluster(block_group, entry, cluster,
-diff -urNp linux-2.6.37.2/fs/btrfs/inode.c linux-2.6.37.2/fs/btrfs/inode.c
---- linux-2.6.37.2/fs/btrfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/inode.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/btrfs/inode.c linux-2.6.38.1/fs/btrfs/inode.c
+--- linux-2.6.38.1/fs/btrfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/inode.c 2011-03-24 23:08:20.000000000 -0400
@@ -64,7 +64,7 @@ static const struct inode_operations btr
static const struct address_space_operations btrfs_aops;
static const struct address_space_operations btrfs_symlink_aops;
static struct kmem_cache *btrfs_inode_cachep;
struct kmem_cache *btrfs_trans_handle_cachep;
-@@ -7246,7 +7246,7 @@ static const struct file_operations btrf
+@@ -6796,7 +6796,7 @@ fail:
+ return -ENOMEM;
+ }
+
+-static int btrfs_getattr(struct vfsmount *mnt,
++int btrfs_getattr(struct vfsmount *mnt,
+ struct dentry *dentry, struct kstat *stat)
+ {
+ struct inode *inode = dentry->d_inode;
+@@ -6808,6 +6808,14 @@ static int btrfs_getattr(struct vfsmount
+ return 0;
+ }
+
++EXPORT_SYMBOL(btrfs_getattr);
++
++dev_t get_btrfs_dev_from_inode(struct inode *inode)
++{
++ return BTRFS_I(inode)->root->anon_super.s_dev;
++}
++EXPORT_SYMBOL(get_btrfs_dev_from_inode);
++
+ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+ struct inode *new_dir, struct dentry *new_dentry)
+ {
+@@ -7311,7 +7319,7 @@ static const struct file_operations btrf
.fsync = btrfs_sync_file,
};
.fill_delalloc = run_delalloc_range,
.submit_bio_hook = btrfs_submit_bio_hook,
.merge_bio_hook = btrfs_merge_bio_hook,
-diff -urNp linux-2.6.37.2/fs/btrfs/ioctl.c linux-2.6.37.2/fs/btrfs/ioctl.c
---- linux-2.6.37.2/fs/btrfs/ioctl.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/ioctl.c 2011-02-12 10:29:31.000000000 -0500
-@@ -2146,9 +2146,12 @@ long btrfs_ioctl_space_info(struct btrfs
+diff -urNp linux-2.6.38.1/fs/btrfs/ioctl.c linux-2.6.38.1/fs/btrfs/ioctl.c
+--- linux-2.6.38.1/fs/btrfs/ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/ioctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2270,9 +2270,12 @@ long btrfs_ioctl_space_info(struct btrfs
for (i = 0; i < num_types; i++) {
struct btrfs_space_info *tmp;
info = NULL;
rcu_read_lock();
list_for_each_entry_rcu(tmp, &root->fs_info->space_info,
-@@ -2170,10 +2173,7 @@ long btrfs_ioctl_space_info(struct btrfs
+@@ -2294,10 +2297,7 @@ long btrfs_ioctl_space_info(struct btrfs
memcpy(dest, &space, sizeof(space));
dest++;
space_args.total_spaces++;
}
up_read(&info->groups_sem);
}
-diff -urNp linux-2.6.37.2/fs/btrfs/relocation.c linux-2.6.37.2/fs/btrfs/relocation.c
---- linux-2.6.37.2/fs/btrfs/relocation.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/btrfs/relocation.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1238,7 +1238,7 @@ static int __update_reloc_root(struct bt
+diff -urNp linux-2.6.38.1/fs/btrfs/relocation.c linux-2.6.38.1/fs/btrfs/relocation.c
+--- linux-2.6.38.1/fs/btrfs/relocation.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/btrfs/relocation.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1239,7 +1239,7 @@ static int __update_reloc_root(struct bt
}
spin_unlock(&rc->reloc_root_tree.lock);
if (!del) {
spin_lock(&rc->reloc_root_tree.lock);
-diff -urNp linux-2.6.37.2/fs/cachefiles/bind.c linux-2.6.37.2/fs/cachefiles/bind.c
---- linux-2.6.37.2/fs/cachefiles/bind.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/cachefiles/bind.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/cachefiles/bind.c linux-2.6.38.1/fs/cachefiles/bind.c
+--- linux-2.6.38.1/fs/cachefiles/bind.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/cachefiles/bind.c 2011-03-21 18:31:35.000000000 -0400
@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachef
args);
cache->bcull_percent < cache->brun_percent &&
cache->brun_percent < 100);
-diff -urNp linux-2.6.37.2/fs/cachefiles/daemon.c linux-2.6.37.2/fs/cachefiles/daemon.c
---- linux-2.6.37.2/fs/cachefiles/daemon.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/cachefiles/daemon.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/cachefiles/daemon.c linux-2.6.38.1/fs/cachefiles/daemon.c
+--- linux-2.6.38.1/fs/cachefiles/daemon.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/cachefiles/daemon.c 2011-03-21 18:31:35.000000000 -0400
@@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(st
if (n > buflen)
return -EMSGSIZE;
return cachefiles_daemon_range_error(cache, args);
cache->bstop_percent = bstop;
-diff -urNp linux-2.6.37.2/fs/cachefiles/rdwr.c linux-2.6.37.2/fs/cachefiles/rdwr.c
---- linux-2.6.37.2/fs/cachefiles/rdwr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/cachefiles/rdwr.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/cachefiles/rdwr.c linux-2.6.38.1/fs/cachefiles/rdwr.c
+--- linux-2.6.38.1/fs/cachefiles/rdwr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/cachefiles/rdwr.c 2011-03-21 18:31:35.000000000 -0400
@@ -945,7 +945,7 @@ int cachefiles_write_page(struct fscache
old_fs = get_fs();
set_fs(KERNEL_DS);
set_fs(old_fs);
kunmap(page);
if (ret != len)
-diff -urNp linux-2.6.37.2/fs/ceph/dir.c linux-2.6.37.2/fs/ceph/dir.c
---- linux-2.6.37.2/fs/ceph/dir.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ceph/dir.c 2011-01-17 02:41:01.000000000 -0500
-@@ -223,7 +223,7 @@ static int ceph_readdir(struct file *fil
+diff -urNp linux-2.6.38.1/fs/ceph/dir.c linux-2.6.38.1/fs/ceph/dir.c
+--- linux-2.6.38.1/fs/ceph/dir.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ceph/dir.c 2011-03-21 18:31:35.000000000 -0400
+@@ -226,7 +226,7 @@ static int ceph_readdir(struct file *fil
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
struct ceph_mds_client *mdsc = fsc->mdsc;
unsigned frag = fpos_frag(filp->f_pos);
int err;
u32 ftype;
struct ceph_mds_reply_info_parsed *rinfo;
-@@ -355,7 +355,7 @@ more:
+@@ -358,7 +358,7 @@ more:
rinfo = &fi->last_readdir->r_reply_info;
dout("readdir frag %x num %d off %d chunkoff %d\n", frag,
rinfo->dir_nr, off, fi->offset);
u64 pos = ceph_make_fpos(frag, off);
struct ceph_mds_reply_inode *in =
rinfo->dir_in[off - fi->offset].in;
-diff -urNp linux-2.6.37.2/fs/cifs/cifs_uniupr.h linux-2.6.37.2/fs/cifs/cifs_uniupr.h
---- linux-2.6.37.2/fs/cifs/cifs_uniupr.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/cifs/cifs_uniupr.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/cifs/cifs_uniupr.h linux-2.6.38.1/fs/cifs/cifs_uniupr.h
+--- linux-2.6.38.1/fs/cifs/cifs_uniupr.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/cifs/cifs_uniupr.h 2011-03-21 18:31:35.000000000 -0400
@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRa
{0x0490, 0x04cc, UniCaseRangeU0490},
{0x1e00, 0x1ffc, UniCaseRangeU1e00},
};
#endif
-diff -urNp linux-2.6.37.2/fs/cifs/link.c linux-2.6.37.2/fs/cifs/link.c
---- linux-2.6.37.2/fs/cifs/link.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/cifs/link.c 2011-01-17 02:41:01.000000000 -0500
-@@ -540,7 +540,7 @@ symlink_exit:
+diff -urNp linux-2.6.38.1/fs/cifs/link.c linux-2.6.38.1/fs/cifs/link.c
+--- linux-2.6.38.1/fs/cifs/link.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/cifs/link.c 2011-03-21 18:31:35.000000000 -0400
+@@ -577,7 +577,7 @@ symlink_exit:
void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
{
if (!IS_ERR(p))
kfree(p);
}
-diff -urNp linux-2.6.37.2/fs/compat_binfmt_elf.c linux-2.6.37.2/fs/compat_binfmt_elf.c
---- linux-2.6.37.2/fs/compat_binfmt_elf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/compat_binfmt_elf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/compat_binfmt_elf.c linux-2.6.38.1/fs/compat_binfmt_elf.c
+--- linux-2.6.38.1/fs/compat_binfmt_elf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/compat_binfmt_elf.c 2011-03-21 18:31:35.000000000 -0400
@@ -30,11 +30,13 @@
#undef elf_phdr
#undef elf_shdr
#define elf_addr_t Elf32_Addr
/*
-diff -urNp linux-2.6.37.2/fs/compat.c linux-2.6.37.2/fs/compat.c
---- linux-2.6.37.2/fs/compat.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/compat.c 2011-01-17 02:41:01.000000000 -0500
-@@ -592,7 +592,7 @@ ssize_t compat_rw_copy_check_uvector(int
+diff -urNp linux-2.6.38.1/fs/compat.c linux-2.6.38.1/fs/compat.c
+--- linux-2.6.38.1/fs/compat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/compat.c 2011-03-21 18:31:35.000000000 -0400
+@@ -594,7 +594,7 @@ ssize_t compat_rw_copy_check_uvector(int
goto out;
ret = -EINVAL;
error = vfs_readdir(file, compat_filldir64, &buf);
if (error >= 0)
-@@ -1419,6 +1437,7 @@ static int compat_copy_strings(int argc,
+@@ -1423,6 +1441,7 @@ static int compat_copy_strings(int argc,
page = get_arg_page(bprm, pos, 1);
if (!page) {
ret = -E2BIG;
goto out;
}
-@@ -1460,6 +1479,11 @@ int compat_do_execve(char * filename,
+@@ -1464,6 +1483,11 @@ int compat_do_execve(char * filename,
compat_uptr_t __user *envp,
struct pt_regs * regs)
{
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
-@@ -1496,6 +1520,14 @@ int compat_do_execve(char * filename,
+@@ -1500,6 +1524,14 @@ int compat_do_execve(char * filename,
bprm->filename = filename;
bprm->interp = filename;
retval = bprm_mm_init(bprm);
if (retval)
goto out_file;
-@@ -1525,9 +1557,40 @@ int compat_do_execve(char * filename,
+@@ -1529,9 +1561,40 @@ int compat_do_execve(char * filename,
if (retval < 0)
goto out;
/* execve succeeded */
current->fs->in_exec = 0;
-@@ -1538,6 +1601,14 @@ int compat_do_execve(char * filename,
+@@ -1542,6 +1605,14 @@ int compat_do_execve(char * filename,
put_files_struct(displaced);
return retval;
out:
if (bprm->mm) {
acct_arg_size(bprm, 0);
-diff -urNp linux-2.6.37.2/fs/compat_ioctl.c linux-2.6.37.2/fs/compat_ioctl.c
---- linux-2.6.37.2/fs/compat_ioctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/compat_ioctl.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/compat_ioctl.c linux-2.6.38.1/fs/compat_ioctl.c
+--- linux-2.6.38.1/fs/compat_ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/compat_ioctl.c 2011-03-21 18:31:35.000000000 -0400
@@ -208,6 +208,8 @@ static int do_video_set_spu_palette(unsi
err = get_user(palp, &up->palette);
up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
err = put_user(compat_ptr(palp), &up_native->palette);
-@@ -1637,8 +1639,8 @@ asmlinkage long compat_sys_ioctl(unsigne
+@@ -1638,8 +1640,8 @@ asmlinkage long compat_sys_ioctl(unsigne
static int __init init_sys32_ioctl_cmp(const void *p, const void *q)
{
unsigned int a, b;
if (a > b)
return 1;
if (a < b)
-diff -urNp linux-2.6.37.2/fs/debugfs/inode.c linux-2.6.37.2/fs/debugfs/inode.c
---- linux-2.6.37.2/fs/debugfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/debugfs/inode.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/debugfs/inode.c linux-2.6.38.1/fs/debugfs/inode.c
+--- linux-2.6.38.1/fs/debugfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/debugfs/inode.c 2011-03-21 18:31:35.000000000 -0400
@@ -130,7 +130,7 @@ static inline int debugfs_positive(struc
static int debug_fill_super(struct super_block *sb, void *data, int silent)
return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
}
-diff -urNp linux-2.6.37.2/fs/dlm/lockspace.c linux-2.6.37.2/fs/dlm/lockspace.c
---- linux-2.6.37.2/fs/dlm/lockspace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/dlm/lockspace.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/dlm/lockspace.c linux-2.6.38.1/fs/dlm/lockspace.c
+--- linux-2.6.38.1/fs/dlm/lockspace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/dlm/lockspace.c 2011-03-21 18:31:35.000000000 -0400
@@ -200,7 +200,7 @@ static int dlm_uevent(struct kset *kset,
return 0;
}
.uevent = dlm_uevent,
};
-diff -urNp linux-2.6.37.2/fs/ecryptfs/inode.c linux-2.6.37.2/fs/ecryptfs/inode.c
---- linux-2.6.37.2/fs/ecryptfs/inode.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/fs/ecryptfs/inode.c 2011-02-27 14:50:02.000000000 -0500
-@@ -745,7 +745,7 @@ static int ecryptfs_readlink_lower(struc
+diff -urNp linux-2.6.38.1/fs/ecryptfs/inode.c linux-2.6.38.1/fs/ecryptfs/inode.c
+--- linux-2.6.38.1/fs/ecryptfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ecryptfs/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -658,7 +658,7 @@ static int ecryptfs_readlink_lower(struc
old_fs = get_fs();
set_fs(get_ds());
rc = lower_dentry->d_inode->i_op->readlink(lower_dentry,
lower_bufsiz);
set_fs(old_fs);
if (rc < 0)
-@@ -791,7 +791,7 @@ static void *ecryptfs_follow_link(struct
+@@ -704,7 +704,7 @@ static void *ecryptfs_follow_link(struct
}
old_fs = get_fs();
set_fs(get_ds());
set_fs(old_fs);
if (rc < 0) {
kfree(buf);
-@@ -806,7 +806,7 @@ out:
+@@ -719,7 +719,7 @@ out:
static void
ecryptfs_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
{
if (!IS_ERR(buf)) {
/* Free the char* */
kfree(buf);
-diff -urNp linux-2.6.37.2/fs/ecryptfs/miscdev.c linux-2.6.37.2/fs/ecryptfs/miscdev.c
---- linux-2.6.37.2/fs/ecryptfs/miscdev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ecryptfs/miscdev.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ecryptfs/miscdev.c linux-2.6.38.1/fs/ecryptfs/miscdev.c
+--- linux-2.6.38.1/fs/ecryptfs/miscdev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ecryptfs/miscdev.c 2011-03-21 18:31:35.000000000 -0400
@@ -328,7 +328,7 @@ check_list:
goto out_unlock_msg_ctx;
i = 5;
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-2.6.37.2/fs/exec.c linux-2.6.37.2/fs/exec.c
---- linux-2.6.37.2/fs/exec.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/exec.c 2011-02-12 11:21:04.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/exec.c linux-2.6.38.1/fs/exec.c
+--- linux-2.6.38.1/fs/exec.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/exec.c 2011-03-21 18:31:35.000000000 -0400
@@ -55,12 +55,24 @@
#include <linux/fs_struct.h>
#include <linux/pipe_fs_i.h>
goto out;
file = do_filp_open(AT_FDCWD, tmp,
-- O_LARGEFILE | O_RDONLY | FMODE_EXEC, 0,
-+ O_LARGEFILE | O_RDONLY | FMODE_EXEC | FMODE_GREXEC, 0,
+- O_LARGEFILE | O_RDONLY | __FMODE_EXEC, 0,
++ O_LARGEFILE | O_RDONLY | __FMODE_EXEC | FMODE_GREXEC, 0,
MAY_READ | MAY_EXEC | MAY_OPEN);
putname(tmp);
error = PTR_ERR(file);
int err;
file = do_filp_open(AT_FDCWD, name,
-- O_LARGEFILE | O_RDONLY | FMODE_EXEC, 0,
-+ O_LARGEFILE | O_RDONLY | FMODE_EXEC | FMODE_GREXEC, 0,
+- O_LARGEFILE | O_RDONLY | __FMODE_EXEC, 0,
++ O_LARGEFILE | O_RDONLY | __FMODE_EXEC | FMODE_GREXEC, 0,
MAY_EXEC | MAY_OPEN);
if (IS_ERR(file))
goto out;
if (ispipe) {
int dump_count;
char **helper_argv;
-diff -urNp linux-2.6.37.2/fs/ext2/balloc.c linux-2.6.37.2/fs/ext2/balloc.c
---- linux-2.6.37.2/fs/ext2/balloc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext2/balloc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext2/balloc.c linux-2.6.38.1/fs/ext2/balloc.c
+--- linux-2.6.38.1/fs/ext2/balloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext2/balloc.c 2011-03-21 18:31:35.000000000 -0400
@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct e
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.37.2/fs/ext2/xattr.c linux-2.6.37.2/fs/ext2/xattr.c
---- linux-2.6.37.2/fs/ext2/xattr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext2/xattr.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext2/xattr.c linux-2.6.38.1/fs/ext2/xattr.c
+--- linux-2.6.38.1/fs/ext2/xattr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext2/xattr.c 2011-03-21 18:31:35.000000000 -0400
@@ -86,8 +86,8 @@
printk("\n"); \
} while (0)
#endif
static int ext2_xattr_set2(struct inode *, struct buffer_head *,
-diff -urNp linux-2.6.37.2/fs/ext3/balloc.c linux-2.6.37.2/fs/ext3/balloc.c
---- linux-2.6.37.2/fs/ext3/balloc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext3/balloc.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1425,7 +1425,7 @@ static int ext3_has_free_blocks(struct e
+diff -urNp linux-2.6.38.1/fs/ext3/balloc.c linux-2.6.38.1/fs/ext3/balloc.c
+--- linux-2.6.38.1/fs/ext3/balloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext3/balloc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1441,7 +1441,7 @@ static int ext3_has_free_blocks(struct e
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
sbi->s_resuid != current_fsuid() &&
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
return 0;
-diff -urNp linux-2.6.37.2/fs/ext3/namei.c linux-2.6.37.2/fs/ext3/namei.c
---- linux-2.6.37.2/fs/ext3/namei.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext3/namei.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1168,7 +1168,7 @@ static struct ext3_dir_entry_2 *do_split
+diff -urNp linux-2.6.38.1/fs/ext3/namei.c linux-2.6.38.1/fs/ext3/namei.c
+--- linux-2.6.38.1/fs/ext3/namei.c 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/fs/ext3/namei.c 2011-03-23 17:21:51.000000000 -0400
+@@ -1159,7 +1159,7 @@ static struct ext3_dir_entry_2 *do_split
char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size;
struct ext3_dir_entry_2 *de = NULL, *de2;
bh2 = ext3_append (handle, dir, &newblock, &err);
if (!(bh2)) {
-diff -urNp linux-2.6.37.2/fs/ext3/xattr.c linux-2.6.37.2/fs/ext3/xattr.c
---- linux-2.6.37.2/fs/ext3/xattr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext3/xattr.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext3/xattr.c linux-2.6.38.1/fs/ext3/xattr.c
+--- linux-2.6.38.1/fs/ext3/xattr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext3/xattr.c 2011-03-21 18:31:35.000000000 -0400
@@ -89,8 +89,8 @@
printk("\n"); \
} while (0)
#endif
static void ext3_xattr_cache_insert(struct buffer_head *);
-diff -urNp linux-2.6.37.2/fs/ext4/balloc.c linux-2.6.37.2/fs/ext4/balloc.c
---- linux-2.6.37.2/fs/ext4/balloc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext4/balloc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext4/balloc.c linux-2.6.38.1/fs/ext4/balloc.c
+--- linux-2.6.38.1/fs/ext4/balloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext4/balloc.c 2011-03-21 18:31:35.000000000 -0400
@@ -519,7 +519,7 @@ static int ext4_has_free_blocks(struct e
/* Hm, nope. Are (enough) root reserved blocks available? */
if (sbi->s_resuid == current_fsuid() ||
if (free_blocks >= (nblocks + dirty_blocks))
return 1;
}
-diff -urNp linux-2.6.37.2/fs/ext4/ext4.h linux-2.6.37.2/fs/ext4/ext4.h
---- linux-2.6.37.2/fs/ext4/ext4.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext4/ext4.h 2011-01-17 02:41:01.000000000 -0500
-@@ -1164,19 +1164,19 @@ struct ext4_sb_info {
+diff -urNp linux-2.6.38.1/fs/ext4/ext4.h linux-2.6.38.1/fs/ext4/ext4.h
+--- linux-2.6.38.1/fs/ext4/ext4.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext4/ext4.h 2011-03-21 18:31:35.000000000 -0400
+@@ -1166,19 +1166,19 @@ struct ext4_sb_info {
unsigned long s_mb_last_start;
/* stats for buddy allocator */
atomic_t s_lock_busy;
/* locality groups */
-diff -urNp linux-2.6.37.2/fs/ext4/mballoc.c linux-2.6.37.2/fs/ext4/mballoc.c
---- linux-2.6.37.2/fs/ext4/mballoc.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/fs/ext4/mballoc.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext4/mballoc.c linux-2.6.38.1/fs/ext4/mballoc.c
+--- linux-2.6.38.1/fs/ext4/mballoc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext4/mballoc.c 2011-03-21 18:31:35.000000000 -0400
@@ -1846,7 +1846,7 @@ void ext4_mb_simple_scan_group(struct ex
BUG_ON(ac->ac_b_ex.fe_len != ac->ac_g_ex.fe_len);
trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len);
return 0;
-diff -urNp linux-2.6.37.2/fs/ext4/namei.c linux-2.6.37.2/fs/ext4/namei.c
---- linux-2.6.37.2/fs/ext4/namei.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext4/namei.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext4/namei.c linux-2.6.38.1/fs/ext4/namei.c
+--- linux-2.6.38.1/fs/ext4/namei.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext4/namei.c 2011-03-21 18:31:35.000000000 -0400
@@ -1161,7 +1161,7 @@ static struct ext4_dir_entry_2 *do_split
char *data1 = (*bh)->b_data, *data2;
unsigned split, move, size;
bh2 = ext4_append (handle, dir, &newblock, &err);
if (!(bh2)) {
-diff -urNp linux-2.6.37.2/fs/ext4/xattr.c linux-2.6.37.2/fs/ext4/xattr.c
---- linux-2.6.37.2/fs/ext4/xattr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ext4/xattr.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ext4/xattr.c linux-2.6.38.1/fs/ext4/xattr.c
+--- linux-2.6.38.1/fs/ext4/xattr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ext4/xattr.c 2011-03-21 18:31:35.000000000 -0400
@@ -82,8 +82,8 @@
printk("\n"); \
} while (0)
#endif
static void ext4_xattr_cache_insert(struct buffer_head *);
-diff -urNp linux-2.6.37.2/fs/fcntl.c linux-2.6.37.2/fs/fcntl.c
---- linux-2.6.37.2/fs/fcntl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fcntl.c 2011-01-17 02:53:49.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/fcntl.c linux-2.6.38.1/fs/fcntl.c
+--- linux-2.6.38.1/fs/fcntl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fcntl.c 2011-03-21 18:31:35.000000000 -0400
@@ -224,6 +224,11 @@ int __f_setown(struct file *filp, struct
if (err)
return err;
__O_SYNC | O_DSYNC | FASYNC |
O_DIRECT | O_LARGEFILE | O_DIRECTORY |
O_NOFOLLOW | O_NOATIME | O_CLOEXEC |
-- FMODE_EXEC
-+ FMODE_EXEC | FMODE_GREXEC
+- __FMODE_EXEC
++ __FMODE_EXEC | FMODE_GREXEC
));
fasync_cache = kmem_cache_create("fasync_cache",
-diff -urNp linux-2.6.37.2/fs/fifo.c linux-2.6.37.2/fs/fifo.c
---- linux-2.6.37.2/fs/fifo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fifo.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/fifo.c linux-2.6.38.1/fs/fifo.c
+--- linux-2.6.38.1/fs/fifo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fifo.c 2011-03-21 18:31:35.000000000 -0400
@@ -58,10 +58,10 @@ static int fifo_open(struct inode *inode
*/
filp->f_op = &read_pipefifo_fops;
free_pipe_info(inode);
err_nocleanup:
-diff -urNp linux-2.6.37.2/fs/file.c linux-2.6.37.2/fs/file.c
---- linux-2.6.37.2/fs/file.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/file.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/file.c linux-2.6.38.1/fs/file.c
+--- linux-2.6.38.1/fs/file.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/file.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
if (nr >= rlimit(RLIMIT_NOFILE))
return -EMFILE;
-diff -urNp linux-2.6.37.2/fs/fs_struct.c linux-2.6.37.2/fs/fs_struct.c
---- linux-2.6.37.2/fs/fs_struct.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fs_struct.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/fs_struct.c linux-2.6.38.1/fs/fs_struct.c
+--- linux-2.6.38.1/fs/fs_struct.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fs_struct.c 2011-03-21 18:31:35.000000000 -0400
@@ -4,6 +4,7 @@
#include <linux/path.h>
#include <linux/slab.h>
#include <linux/fs_struct.h>
+#include <linux/grsecurity.h>
+ #include "internal.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
+ 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(path);
+ path_get_longterm(path);
+ gr_set_chroot_entries(current, path);
+ write_seqcount_end(&fs->seq);
spin_unlock(&fs->lock);
if (old_root.dentry)
- path_put(&old_root);
-@@ -56,6 +58,7 @@ void chroot_fs_refs(struct path *old_roo
+@@ -74,6 +76,7 @@ void chroot_fs_refs(struct path *old_roo
&& fs->root.mnt == old_root->mnt) {
- path_get(new_root);
+ path_get_longterm(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);
+@@ -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);
- if (kill)
-@@ -102,7 +106,7 @@ struct fs_struct *copy_fs_struct(struct
+@@ -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) {
+ atomic_set(&fs->users, 1);
fs->in_exec = 0;
spin_lock_init(&fs->lock);
- fs->umask = old->umask;
-@@ -122,8 +126,9 @@ int unshare_fs_struct(void)
+ 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);
spin_unlock(&fs->lock);
task_unlock(current);
-@@ -142,7 +147,7 @@ EXPORT_SYMBOL(current_umask);
+@@ -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,
- };
-@@ -157,12 +162,13 @@ void daemonize_fs_struct(void)
+@@ -186,12 +194,13 @@ void daemonize_fs_struct(void)
task_lock(current);
spin_lock(&init_fs.lock);
spin_unlock(&fs->lock);
task_unlock(current);
-diff -urNp linux-2.6.37.2/fs/fuse/control.c linux-2.6.37.2/fs/fuse/control.c
---- linux-2.6.37.2/fs/fuse/control.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fuse/control.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/fuse/control.c linux-2.6.38.1/fs/fuse/control.c
+--- linux-2.6.38.1/fs/fuse/control.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fuse/control.c 2011-03-21 18:31:35.000000000 -0400
@@ -298,7 +298,7 @@ void fuse_ctl_remove_conn(struct fuse_co
static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent)
struct fuse_conn *fc;
int err;
-diff -urNp linux-2.6.37.2/fs/fuse/cuse.c linux-2.6.37.2/fs/fuse/cuse.c
---- linux-2.6.37.2/fs/fuse/cuse.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fuse/cuse.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/fuse/cuse.c linux-2.6.38.1/fs/fuse/cuse.c
+--- linux-2.6.38.1/fs/fuse/cuse.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fuse/cuse.c 2011-03-21 18:31:35.000000000 -0400
@@ -530,8 +530,18 @@ static int cuse_channel_release(struct i
return rc;
}
cuse_class = class_create(THIS_MODULE, "cuse");
if (IS_ERR(cuse_class))
return PTR_ERR(cuse_class);
-diff -urNp linux-2.6.37.2/fs/fuse/dev.c linux-2.6.37.2/fs/fuse/dev.c
---- linux-2.6.37.2/fs/fuse/dev.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fuse/dev.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1047,7 +1047,7 @@ static ssize_t fuse_dev_do_read(struct f
+diff -urNp linux-2.6.38.1/fs/fuse/dev.c linux-2.6.38.1/fs/fuse/dev.c
+--- linux-2.6.38.1/fs/fuse/dev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fuse/dev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1183,7 +1183,7 @@ static ssize_t fuse_dev_do_read(struct f
return err;
}
unsigned long nr_segs, loff_t pos)
{
struct fuse_copy_state cs;
-@@ -1061,6 +1061,8 @@ static ssize_t fuse_dev_read(struct kioc
+@@ -1197,6 +1197,8 @@ static ssize_t fuse_dev_read(struct kioc
return fuse_dev_do_read(fc, file, &cs, iov_length(iov, nr_segs));
}
static int fuse_dev_pipe_buf_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
-@@ -1104,7 +1106,7 @@ static ssize_t fuse_dev_splice_read(stru
+@@ -1240,7 +1242,7 @@ static ssize_t fuse_dev_splice_read(stru
ret = 0;
pipe_lock(pipe);
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -1597,7 +1599,7 @@ static ssize_t fuse_dev_do_write(struct
+@@ -1733,7 +1735,7 @@ static ssize_t fuse_dev_do_write(struct
return err;
}
unsigned long nr_segs, loff_t pos)
{
struct fuse_copy_state cs;
-@@ -1610,6 +1612,8 @@ static ssize_t fuse_dev_write(struct kio
+@@ -1746,6 +1748,8 @@ static ssize_t fuse_dev_write(struct kio
return fuse_dev_do_write(fc, &cs, iov_length(iov, nr_segs));
}
static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
struct file *out, loff_t *ppos,
size_t len, unsigned int flags)
-@@ -1688,7 +1692,7 @@ out:
+@@ -1824,7 +1828,7 @@ out:
return ret;
}
{
unsigned mask = POLLOUT | POLLWRNORM;
struct fuse_conn *fc = fuse_get_conn(file);
-@@ -1707,6 +1711,8 @@ static unsigned fuse_dev_poll(struct fil
+@@ -1843,6 +1847,8 @@ static unsigned fuse_dev_poll(struct fil
return mask;
}
/*
* Abort all requests on the given list (pending or processing)
*
-@@ -1824,7 +1830,7 @@ int fuse_dev_release(struct inode *inode
+@@ -1962,7 +1968,7 @@ int fuse_dev_release(struct inode *inode
}
EXPORT_SYMBOL_GPL(fuse_dev_release);
{
struct fuse_conn *fc = fuse_get_conn(file);
if (!fc)
-@@ -1834,6 +1840,8 @@ static int fuse_dev_fasync(int fd, struc
+@@ -1972,6 +1978,8 @@ static int fuse_dev_fasync(int fd, struc
return fasync_helper(fd, file, on, &fc->fasync);
}
const struct file_operations fuse_dev_operations = {
.owner = THIS_MODULE,
.llseek = no_llseek,
-diff -urNp linux-2.6.37.2/fs/fuse/dir.c linux-2.6.37.2/fs/fuse/dir.c
---- linux-2.6.37.2/fs/fuse/dir.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fuse/dir.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1127,7 +1127,7 @@ static char *read_link(struct dentry *de
+diff -urNp linux-2.6.38.1/fs/fuse/dir.c linux-2.6.38.1/fs/fuse/dir.c
+--- linux-2.6.38.1/fs/fuse/dir.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fuse/dir.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1133,7 +1133,7 @@ static char *read_link(struct dentry *de
return link;
}
{
if (!IS_ERR(link))
free_page((unsigned long) link);
-diff -urNp linux-2.6.37.2/fs/fuse/fuse_i.h linux-2.6.37.2/fs/fuse/fuse_i.h
---- linux-2.6.37.2/fs/fuse/fuse_i.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/fuse/fuse_i.h 2011-01-17 02:41:01.000000000 -0500
-@@ -525,6 +525,16 @@ extern const struct file_operations fuse
+diff -urNp linux-2.6.38.1/fs/fuse/fuse_i.h linux-2.6.38.1/fs/fuse/fuse_i.h
+--- linux-2.6.38.1/fs/fuse/fuse_i.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/fuse/fuse_i.h 2011-03-21 18:31:35.000000000 -0400
+@@ -541,6 +541,16 @@ extern const struct file_operations fuse
extern const struct dentry_operations fuse_dentry_operations;
/**
* Inode to nodeid comparison.
*/
-diff -urNp linux-2.6.37.2/fs/hfs/inode.c linux-2.6.37.2/fs/hfs/inode.c
---- linux-2.6.37.2/fs/hfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/hfs/inode.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/hfs/inode.c linux-2.6.38.1/fs/hfs/inode.c
+--- linux-2.6.38.1/fs/hfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/hfs/inode.c 2011-03-21 18:31:35.000000000 -0400
@@ -447,7 +447,7 @@ int hfs_write_inode(struct inode *inode,
if (S_ISDIR(main_inode->i_mode)) {
hfs_bnode_read(fd.bnode, &rec, fd.entryoffset,
sizeof(struct hfs_cat_file));
if (rec.type != HFS_CDR_FIL ||
-diff -urNp linux-2.6.37.2/fs/hfsplus/inode.c linux-2.6.37.2/fs/hfsplus/inode.c
---- linux-2.6.37.2/fs/hfsplus/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/hfsplus/inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -478,7 +478,7 @@ int hfsplus_cat_read_inode(struct inode
+diff -urNp linux-2.6.38.1/fs/hfsplus/inode.c linux-2.6.38.1/fs/hfsplus/inode.c
+--- linux-2.6.38.1/fs/hfsplus/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/hfsplus/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -498,7 +498,7 @@ int hfsplus_cat_read_inode(struct inode
struct hfsplus_cat_folder *folder = &entry.folder;
if (fd->entrylength < sizeof(struct hfsplus_cat_folder))
hfs_bnode_read(fd->bnode, &entry, fd->entryoffset,
sizeof(struct hfsplus_cat_folder));
hfsplus_get_perms(inode, &folder->permissions, 1);
-@@ -495,7 +495,7 @@ int hfsplus_cat_read_inode(struct inode
+@@ -515,7 +515,7 @@ int hfsplus_cat_read_inode(struct inode
struct hfsplus_cat_file *file = &entry.file;
if (fd->entrylength < sizeof(struct hfsplus_cat_file))
hfs_bnode_read(fd->bnode, &entry, fd->entryoffset,
sizeof(struct hfsplus_cat_file));
-@@ -551,7 +551,7 @@ int hfsplus_cat_write_inode(struct inode
+@@ -572,7 +572,7 @@ int hfsplus_cat_write_inode(struct inode
struct hfsplus_cat_folder *folder = &entry.folder;
if (fd.entrylength < sizeof(struct hfsplus_cat_folder))
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
sizeof(struct hfsplus_cat_folder));
/* simple node checks? */
-@@ -573,7 +573,7 @@ int hfsplus_cat_write_inode(struct inode
+@@ -594,7 +594,7 @@ int hfsplus_cat_write_inode(struct inode
struct hfsplus_cat_file *file = &entry.file;
if (fd.entrylength < sizeof(struct hfsplus_cat_file))
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
sizeof(struct hfsplus_cat_file));
hfsplus_inode_write_fork(inode, &file->data_fork);
-diff -urNp linux-2.6.37.2/fs/hugetlbfs/inode.c linux-2.6.37.2/fs/hugetlbfs/inode.c
---- linux-2.6.37.2/fs/hugetlbfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/hugetlbfs/inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -908,7 +908,7 @@ static struct file_system_type hugetlbfs
+diff -urNp linux-2.6.38.1/fs/hugetlbfs/inode.c linux-2.6.38.1/fs/hugetlbfs/inode.c
+--- linux-2.6.38.1/fs/hugetlbfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/hugetlbfs/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -915,7 +915,7 @@ static struct file_system_type hugetlbfs
.kill_sb = kill_litter_super,
};
static int can_do_hugetlb_shm(void)
{
-diff -urNp linux-2.6.37.2/fs/ioctl.c linux-2.6.37.2/fs/ioctl.c
---- linux-2.6.37.2/fs/ioctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ioctl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -86,7 +86,7 @@ int fiemap_fill_next_extent(struct fiema
- u64 phys, u64 len, u32 flags)
- {
- struct fiemap_extent extent;
-- struct fiemap_extent *dest = fieinfo->fi_extents_start;
-+ struct fiemap_extent __user *dest = fieinfo->fi_extents_start;
-
- /* only count the extents */
- if (fieinfo->fi_extents_max == 0) {
-@@ -196,7 +196,7 @@ static int ioctl_fiemap(struct file *fil
-
- fieinfo.fi_flags = fiemap.fm_flags;
- fieinfo.fi_extents_max = fiemap.fm_extent_count;
-- fieinfo.fi_extents_start = (struct fiemap_extent *)(arg + sizeof(fiemap));
-+ fieinfo.fi_extents_start = (struct fiemap_extent __user *)(arg + sizeof(fiemap));
-
- if (fiemap.fm_extent_count != 0 &&
- !access_ok(VERIFY_WRITE, fieinfo.fi_extents_start,
-@@ -209,7 +209,7 @@ static int ioctl_fiemap(struct file *fil
- 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;
-- if (copy_to_user((char *)arg, &fiemap, sizeof(fiemap)))
-+ if (copy_to_user((__force char __user *)arg, &fiemap, sizeof(fiemap)))
- error = -EFAULT;
-
- return error;
-diff -urNp linux-2.6.37.2/fs/jffs2/debug.h linux-2.6.37.2/fs/jffs2/debug.h
---- linux-2.6.37.2/fs/jffs2/debug.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/jffs2/debug.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/jffs2/debug.h linux-2.6.38.1/fs/jffs2/debug.h
+--- linux-2.6.38.1/fs/jffs2/debug.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/jffs2/debug.h 2011-03-21 18:31:35.000000000 -0400
@@ -53,13 +53,13 @@
#if CONFIG_JFFS2_FS_DEBUG > 0
#define D1(x) x
#endif
/* "Sanity" checks */
-diff -urNp linux-2.6.37.2/fs/jffs2/erase.c linux-2.6.37.2/fs/jffs2/erase.c
---- linux-2.6.37.2/fs/jffs2/erase.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/jffs2/erase.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/jffs2/erase.c linux-2.6.38.1/fs/jffs2/erase.c
+--- linux-2.6.38.1/fs/jffs2/erase.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/jffs2/erase.c 2011-03-21 18:31:35.000000000 -0400
@@ -439,7 +439,8 @@ static void jffs2_mark_erased_block(stru
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
};
jffs2_prealloc_raw_node_refs(c, jeb, 1);
-diff -urNp linux-2.6.37.2/fs/jffs2/summary.h linux-2.6.37.2/fs/jffs2/summary.h
---- linux-2.6.37.2/fs/jffs2/summary.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/jffs2/summary.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/jffs2/summary.h linux-2.6.38.1/fs/jffs2/summary.h
+--- linux-2.6.38.1/fs/jffs2/summary.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/jffs2/summary.h 2011-03-21 18:31:35.000000000 -0400
@@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_
#define jffs2_sum_active() (0)
#define jffs2_sum_scan_sumnode(a,b,c,d,e) (0)
#endif /* CONFIG_JFFS2_SUMMARY */
-diff -urNp linux-2.6.37.2/fs/jffs2/wbuf.c linux-2.6.37.2/fs/jffs2/wbuf.c
---- linux-2.6.37.2/fs/jffs2/wbuf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/jffs2/wbuf.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/jffs2/wbuf.c linux-2.6.38.1/fs/jffs2/wbuf.c
+--- linux-2.6.38.1/fs/jffs2/wbuf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/jffs2/wbuf.c 2011-03-21 18:31:35.000000000 -0400
@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o
{
.magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK),
};
/*
-diff -urNp linux-2.6.37.2/fs/Kconfig.binfmt linux-2.6.37.2/fs/Kconfig.binfmt
---- linux-2.6.37.2/fs/Kconfig.binfmt 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/Kconfig.binfmt 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/Kconfig.binfmt linux-2.6.38.1/fs/Kconfig.binfmt
+--- linux-2.6.38.1/fs/Kconfig.binfmt 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/Kconfig.binfmt 2011-03-21 18:31:35.000000000 -0400
@@ -86,7 +86,7 @@ config HAVE_AOUT
config BINFMT_AOUT
---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.37.2/fs/lockd/svc.c linux-2.6.37.2/fs/lockd/svc.c
---- linux-2.6.37.2/fs/lockd/svc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/lockd/svc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/lockd/svc.c linux-2.6.38.1/fs/lockd/svc.c
+--- linux-2.6.38.1/fs/lockd/svc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/lockd/svc.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,7 +41,7 @@
static struct svc_program nlmsvc_program;
EXPORT_SYMBOL_GPL(nlmsvc_ops);
static DEFINE_MUTEX(nlmsvc_mutex);
-diff -urNp linux-2.6.37.2/fs/locks.c linux-2.6.37.2/fs/locks.c
---- linux-2.6.37.2/fs/locks.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/locks.c 2011-01-17 02:41:01.000000000 -0500
-@@ -2050,16 +2050,16 @@ void locks_remove_flock(struct file *fil
+diff -urNp linux-2.6.38.1/fs/locks.c linux-2.6.38.1/fs/locks.c
+--- linux-2.6.38.1/fs/locks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/locks.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2044,16 +2044,16 @@ void locks_remove_flock(struct file *fil
return;
if (filp->f_op && filp->f_op->flock) {
}
lock_flocks();
-diff -urNp linux-2.6.37.2/fs/namei.c linux-2.6.37.2/fs/namei.c
---- linux-2.6.37.2/fs/namei.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/namei.c 2011-01-17 11:57:48.000000000 -0500
-@@ -221,14 +221,6 @@ int generic_permission(struct inode *ino
+diff -urNp linux-2.6.38.1/fs/namei.c linux-2.6.38.1/fs/namei.c
+--- linux-2.6.38.1/fs/namei.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/namei.c 2011-03-25 18:59:30.000000000 -0400
+@@ -226,14 +226,6 @@ int generic_permission(struct inode *ino
return ret;
/*
* Searching includes executable on directories, else just read.
*/
mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
-@@ -236,6 +228,14 @@ int generic_permission(struct inode *ino
+@@ -241,6 +233,14 @@ int generic_permission(struct inode *ino
if (capable(CAP_DAC_READ_SEARCH))
return 0;
return -EACCES;
}
-@@ -473,7 +473,8 @@ static int exec_permission(struct inode
- if (!ret)
- goto ok;
+@@ -687,7 +687,8 @@ static inline int exec_permission(struct
+ if (ret == -ECHILD)
+ return ret;
- if (capable(CAP_DAC_OVERRIDE) || capable(CAP_DAC_READ_SEARCH))
+ if (capable_nolog(CAP_DAC_OVERRIDE) || capable(CAP_DAC_READ_SEARCH) ||
goto ok;
return ret;
-@@ -542,7 +543,7 @@ __do_follow_link(struct path *path, stru
+@@ -775,7 +776,7 @@ __do_follow_link(const struct path *link
*p = dentry->d_inode->i_op->follow_link(dentry, nd);
error = PTR_ERR(*p);
if (!IS_ERR(*p)) {
error = 0;
if (s)
error = __vfs_follow_link(nd, s);
-@@ -575,6 +576,13 @@ static inline int do_follow_link(struct
+@@ -814,6 +815,13 @@ static inline int do_follow_link(struct
err = security_inode_follow_link(path->dentry, nd);
if (err)
goto loop;
current->link_count++;
current->total_link_count++;
nd->depth++;
-@@ -967,11 +975,18 @@ return_reval:
- break;
- }
+@@ -1505,13 +1513,36 @@ return_reval:
return_base:
+ if (nameidata_drop_rcu_last_maybe(nd))
+ return -ECHILD;
++
+ if (!(nd->flags & LOOKUP_PARENT) && !gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
-+ path_put(&nd->path);
-+ return -ENOENT;
++ err = -ENOENT;
++ goto err_and_ret;
+ }
++
return 0;
out_dput:
- path_put_conditional(&next, nd);
+ if (!(nd->flags & LOOKUP_RCU))
+ path_put_conditional(&next, nd);
break;
}
++#ifdef CONFIG_GRKERNSEC
++ /* we do this because we can't operate here on an rcu'd dentry,
++ acquire a properly-referenced copy
++ */
++ if (nameidata_drop_rcu_last_maybe(nd))
++ return -ECHILD;
++#endif
++
+ if (!(nd->flags & LOOKUP_PARENT) && !gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt))
+ err = -ENOENT;
+
- path_put(&nd->path);
++err_and_ret:
++#ifndef CONFIG_GRKERNSEC
++ /* since we convert to ref-walk above, always put the path if we reach
++ here
++ */
+ if (!(nd->flags & LOOKUP_RCU))
++#endif
+ path_put(&nd->path);
return_err:
return err;
-@@ -1397,6 +1412,30 @@ int vfs_create(struct inode *dir, struct
+@@ -1738,6 +1769,9 @@ static int do_path_lookup(int dfd, const
+ }
+
+ if (likely(!retval)) {
++ if (*name != '/' && nd->path.dentry && nd->inode && !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);
+@@ -1789,6 +1823,7 @@ int vfs_path_lookup(struct dentry *dentr
+ nd->inode = nd->path.dentry->d_inode;
+
+ retval = path_walk(name, nd);
++
+ if (unlikely(!retval && !audit_dummy_context() && nd->path.dentry &&
+ nd->inode))
+ audit_inode(name, nd->path.dentry);
+@@ -2078,6 +2113,30 @@ int vfs_create(struct inode *dir, struct
return error;
}
int may_open(struct path *path, int acc_mode, int flag)
{
struct dentry *dentry = path->dentry;
-@@ -1445,7 +1484,26 @@ int may_open(struct path *path, int acc_
+@@ -2126,7 +2185,27 @@ int may_open(struct path *path, int acc_
/*
* Ensure there are no outstanding leases on the file.
*/
- return break_lease(inode, flag);
+ error = break_lease(inode, flag);
++
+ if (error)
+ return error;
+
+ return error;
}
- static int handle_truncate(struct path *path)
-@@ -1479,6 +1537,12 @@ static int __open_namei_create(struct na
+ static int handle_truncate(struct file *filp)
+@@ -2161,6 +2240,12 @@ static int __open_namei_create(struct na
{
int error;
struct dentry *dir = nd->path.dentry;
if (!IS_POSIXACL(dir->d_inode))
mode &= ~current_umask();
-@@ -1486,6 +1550,8 @@ static int __open_namei_create(struct na
+@@ -2168,6 +2253,8 @@ static int __open_namei_create(struct na
if (error)
goto out_unlock;
error = vfs_create(dir->d_inode, path->dentry, mode, nd);
out_unlock:
mutex_unlock(&dir->d_inode->i_mutex);
dput(nd->path.dentry);
-@@ -1496,30 +1562,6 @@ out_unlock:
+@@ -2179,30 +2266,6 @@ out_unlock:
return may_open(&nd->path, 0, open_flag & ~O_TRUNC);
}
static int open_will_truncate(int flag, struct inode *inode)
{
/*
-@@ -1589,6 +1631,7 @@ static struct file *do_last(struct namei
+@@ -2273,6 +2336,7 @@ static struct file *do_last(struct namei
int mode, const char *pathname)
{
struct dentry *dir = nd->path.dentry;
struct file *filp;
int error = -EISDIR;
-@@ -1690,6 +1733,14 @@ static struct file *do_last(struct namei
+@@ -2351,6 +2415,14 @@ static struct file *do_last(struct namei
/*
* It already exists.
*/
mutex_unlock(&dir->d_inode->i_mutex);
audit_inode(pathname, path->dentry);
-@@ -1838,6 +1889,11 @@ reval:
- error = security_inode_follow_link(path.dentry, &nd);
+@@ -2467,6 +2539,7 @@ struct file *do_filp_open(int dfd, const
+ if (!nd.inode->i_op->lookup)
+ goto out_path2;
+ }
++
+ audit_inode(pathname, nd.path.dentry);
+ filp = finish_open(&nd, open_flag, acc_mode);
+ out2:
+@@ -2500,6 +2573,7 @@ reval:
+
+ error = path_walk_simple(pathname, &nd);
+ }
++
+ if (unlikely(error))
+ goto out_filp;
+ if (unlikely(!audit_dummy_context()))
+@@ -2534,6 +2608,11 @@ reval:
+ error = security_inode_follow_link(link.dentry, &nd);
if (error)
goto exit_dput;
-+ if (gr_handle_follow_link(path.dentry->d_parent->d_inode,
-+ path.dentry->d_inode, path.dentry, nd.path.mnt)) {
++ if (gr_handle_follow_link(link.dentry->d_parent->d_inode,
++ link.dentry->d_inode, link.dentry, nd.path.mnt)) {
+ error = -EACCES;
+ goto exit_dput;
+ }
- error = __do_follow_link(&path, &nd, &cookie);
+ error = __do_follow_link(&link, &nd, &cookie);
if (unlikely(error)) {
- /* nd.path had been dropped */
-@@ -2013,6 +2069,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+ if (!IS_ERR(cookie) && linki->i_op->put_link)
+@@ -2704,6 +2783,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
error = may_mknod(mode);
if (error)
goto out_dput;
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2033,6 +2100,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
+@@ -2724,6 +2814,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
}
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
dput(dentry);
out_unlock:
-@@ -2085,6 +2155,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2776,6 +2869,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
if (IS_ERR(dentry))
goto out_unlock;
if (!IS_POSIXACL(nd.path.dentry->d_inode))
mode &= ~current_umask();
error = mnt_want_write(nd.path.mnt);
-@@ -2096,6 +2171,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
+@@ -2787,6 +2885,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
dput(dentry);
out_unlock:
-@@ -2177,6 +2256,8 @@ static long do_rmdir(int dfd, const char
+@@ -2866,6 +2968,8 @@ static long do_rmdir(int dfd, const char
char * name;
struct dentry *dentry;
struct nameidata nd;
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2201,6 +2282,19 @@ static long do_rmdir(int dfd, const char
+@@ -2890,6 +2994,19 @@ static long do_rmdir(int dfd, const char
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
goto exit2;
+ if (dentry->d_inode != NULL) {
+ if (dentry->d_inode->i_nlink <= 1) {
+ saved_ino = dentry->d_inode->i_ino;
-+ saved_dev = dentry->d_inode->i_sb->s_dev;
++ saved_dev = gr_get_dev_from_dentry(dentry);
+ }
+
+ if (!gr_acl_handle_rmdir(dentry, nd.path.mnt)) {
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit3;
-@@ -2208,6 +2302,8 @@ static long do_rmdir(int dfd, const char
+@@ -2897,6 +3014,8 @@ static long do_rmdir(int dfd, const char
if (error)
goto exit4;
error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
exit4:
mnt_drop_write(nd.path.mnt);
exit3:
-@@ -2270,6 +2366,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2959,6 +3078,8 @@ static long do_unlinkat(int dfd, const c
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
error = user_path_parent(dfd, pathname, &nd, &name);
if (error)
-@@ -2289,8 +2387,17 @@ static long do_unlinkat(int dfd, const c
+@@ -2978,8 +3099,17 @@ static long do_unlinkat(int dfd, const c
if (nd.last.name[nd.last.len])
goto slashes;
inode = dentry->d_inode;
ihold(inode);
+ if (inode->i_nlink <= 1) {
+ saved_ino = inode->i_ino;
-+ saved_dev = inode->i_sb->s_dev;
++ saved_dev = gr_get_dev_from_dentry(dentry);
+ }
+ if (!gr_acl_handle_unlink(dentry, nd.path.mnt)) {
+ error = -EACCES;
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit2;
-@@ -2298,6 +2405,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2987,6 +3117,8 @@ static long do_unlinkat(int dfd, const c
if (error)
goto exit3;
error = vfs_unlink(nd.path.dentry->d_inode, dentry);
exit3:
mnt_drop_write(nd.path.mnt);
exit2:
-@@ -2375,6 +2484,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -3064,6 +3196,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
if (IS_ERR(dentry))
goto out_unlock;
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2382,6 +2496,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
+@@ -3071,6 +3208,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
if (error)
goto out_drop_write;
error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2474,6 +2590,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -3163,6 +3302,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
goto out_unlock;
error = mnt_want_write(nd.path.mnt);
if (error)
goto out_dput;
-@@ -2481,6 +2611,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
+@@ -3170,6 +3323,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
if (error)
goto out_drop_write;
error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
out_drop_write:
mnt_drop_write(nd.path.mnt);
out_dput:
-@@ -2714,6 +2846,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -3403,6 +3558,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
if (new_dentry == trap)
goto exit5;
error = mnt_want_write(oldnd.path.mnt);
if (error)
goto exit5;
-@@ -2723,6 +2861,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
+@@ -3412,6 +3573,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
goto exit6;
error = vfs_rename(old_dir->d_inode, old_dentry,
new_dir->d_inode, new_dentry);
exit6:
mnt_drop_write(oldnd.path.mnt);
exit5:
-diff -urNp linux-2.6.37.2/fs/namespace.c linux-2.6.37.2/fs/namespace.c
---- linux-2.6.37.2/fs/namespace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/namespace.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1141,6 +1141,9 @@ static int do_umount(struct vfsmount *mn
+diff -urNp linux-2.6.38.1/fs/namespace.c linux-2.6.38.1/fs/namespace.c
+--- linux-2.6.38.1/fs/namespace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/namespace.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1285,6 +1285,9 @@ static int do_umount(struct vfsmount *mn
if (!(sb->s_flags & MS_RDONLY))
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
up_write(&sb->s_umount);
return retval;
}
-@@ -1160,6 +1163,9 @@ static int do_umount(struct vfsmount *mn
+@@ -1304,6 +1307,9 @@ static int do_umount(struct vfsmount *mn
br_write_unlock(vfsmount_lock);
up_write(&namespace_sem);
release_mounts(&umount_list);
return retval;
}
-@@ -2053,6 +2059,16 @@ long do_mount(char *dev_name, char *dir_
+@@ -2241,6 +2247,16 @@ long do_mount(char *dev_name, char *dir_
MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
MS_STRICTATIME);
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
-@@ -2067,6 +2083,9 @@ long do_mount(char *dev_name, char *dir_
+@@ -2255,6 +2271,9 @@ long do_mount(char *dev_name, char *dir_
dev_name, data_page);
dput_out:
path_put(&path);
return retval;
}
-@@ -2273,6 +2292,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -2483,6 +2502,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
goto out1;
}
get_fs_root(current->fs, &root);
down_write(&namespace_sem);
mutex_lock(&old.dentry->d_inode->i_mutex);
-diff -urNp linux-2.6.37.2/fs/nfs/inode.c linux-2.6.37.2/fs/nfs/inode.c
---- linux-2.6.37.2/fs/nfs/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/nfs/inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -985,16 +985,16 @@ static int nfs_size_need_update(const st
+diff -urNp linux-2.6.38.1/fs/nfs/inode.c linux-2.6.38.1/fs/nfs/inode.c
+--- linux-2.6.38.1/fs/nfs/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nfs/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -998,16 +998,16 @@ static int nfs_size_need_update(const st
return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
}
}
void nfs_fattr_init(struct nfs_fattr *fattr)
-diff -urNp linux-2.6.37.2/fs/nfs/nfs4proc.c linux-2.6.37.2/fs/nfs/nfs4proc.c
---- linux-2.6.37.2/fs/nfs/nfs4proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/nfs/nfs4proc.c 2011-01-17 02:41:01.000000000 -0500
-@@ -1184,7 +1184,7 @@ static int _nfs4_do_open_reclaim(struct
+diff -urNp linux-2.6.38.1/fs/nfs/nfs4proc.c linux-2.6.38.1/fs/nfs/nfs4proc.c
+--- linux-2.6.38.1/fs/nfs/nfs4proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nfs/nfs4proc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1198,7 +1198,7 @@ static int _nfs4_do_open_reclaim(struct
static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
err = _nfs4_do_open_reclaim(ctx, state);
-@@ -1226,7 +1226,7 @@ static int _nfs4_open_delegation_recall(
+@@ -1240,7 +1240,7 @@ static int _nfs4_open_delegation_recall(
int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
-@@ -1602,7 +1602,7 @@ static int _nfs4_open_expired(struct nfs
+@@ -1615,7 +1615,7 @@ static int _nfs4_open_expired(struct nfs
static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
-@@ -1717,7 +1717,7 @@ out_err:
+@@ -1730,7 +1730,7 @@ out_err:
static struct nfs4_state *nfs4_do_open(struct inode *dir, struct path *path, fmode_t fmode, int flags, struct iattr *sattr, struct rpc_cred *cred)
{
struct nfs4_state *res;
int status;
-@@ -1808,7 +1808,7 @@ static int nfs4_do_setattr(struct inode
+@@ -1821,7 +1821,7 @@ static int nfs4_do_setattr(struct inode
struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(inode);
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2081,7 +2081,7 @@ static int _nfs4_server_capabilities(str
+@@ -2111,7 +2111,7 @@ static int _nfs4_server_capabilities(str
int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
{
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2115,7 +2115,7 @@ static int _nfs4_lookup_root(struct nfs_
+@@ -2145,7 +2145,7 @@ static int _nfs4_lookup_root(struct nfs_
static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2203,7 +2203,7 @@ static int _nfs4_proc_getattr(struct nfs
+@@ -2233,7 +2233,7 @@ static int _nfs4_proc_getattr(struct nfs
static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2291,7 +2291,7 @@ static int nfs4_proc_lookupfh(struct nfs
+@@ -2321,7 +2321,7 @@ static int nfs4_proc_lookupfh(struct nfs
struct qstr *name, struct nfs_fh *fhandle,
struct nfs_fattr *fattr)
{
int err;
do {
err = _nfs4_proc_lookupfh(server, dirfh, name, fhandle, fattr);
-@@ -2320,7 +2320,7 @@ static int _nfs4_proc_lookup(struct inod
+@@ -2350,7 +2350,7 @@ static int _nfs4_proc_lookup(struct inod
static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2387,7 +2387,7 @@ static int _nfs4_proc_access(struct inod
+@@ -2417,7 +2417,7 @@ static int _nfs4_proc_access(struct inod
static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -2443,7 +2443,7 @@ static int _nfs4_proc_readlink(struct in
+@@ -2473,7 +2473,7 @@ static int _nfs4_proc_readlink(struct in
static int nfs4_proc_readlink(struct inode *inode, struct page *page,
unsigned int pgbase, unsigned int pglen)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -2537,7 +2537,7 @@ out:
+@@ -2568,7 +2568,7 @@ out:
static int nfs4_proc_remove(struct inode *dir, struct qstr *name)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2642,7 +2642,7 @@ out:
+@@ -2673,7 +2673,7 @@ out:
static int nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
struct inode *new_dir, struct qstr *new_name)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(old_dir),
-@@ -2691,7 +2691,7 @@ out:
+@@ -2722,7 +2722,7 @@ out:
static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -2783,7 +2783,7 @@ out:
+@@ -2814,7 +2814,7 @@ out:
static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
struct page *page, unsigned int len, struct iattr *sattr)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2814,7 +2814,7 @@ out:
+@@ -2845,7 +2845,7 @@ out:
static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
struct iattr *sattr)
{
- struct nfs4_exception exception = { };
+ struct nfs4_exception exception = {0, 0};
int err;
- do {
- err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2866,7 +2866,7 @@ static int _nfs4_proc_readdir(struct den
+
+ sattr->ia_mode &= ~current_umask();
+@@ -2899,7 +2899,7 @@ static int _nfs4_proc_readdir(struct den
static int nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
u64 cookie, struct page **pages, unsigned int count, int plus)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode),
-@@ -2914,7 +2914,7 @@ out:
+@@ -2947,7 +2947,7 @@ out:
static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
struct iattr *sattr, dev_t rdev)
{
- struct nfs4_exception exception = { };
+ struct nfs4_exception exception = {0, 0};
int err;
- do {
- err = nfs4_handle_exception(NFS_SERVER(dir),
-@@ -2946,7 +2946,7 @@ static int _nfs4_proc_statfs(struct nfs_
+
+ sattr->ia_mode &= ~current_umask();
+@@ -2981,7 +2981,7 @@ static int _nfs4_proc_statfs(struct nfs_
static int nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat)
{
int err;
do {
err = nfs4_handle_exception(server,
-@@ -2977,7 +2977,7 @@ static int _nfs4_do_fsinfo(struct nfs_se
+@@ -3012,7 +3012,7 @@ static int _nfs4_do_fsinfo(struct nfs_se
static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
{
int err;
do {
-@@ -3023,7 +3023,7 @@ static int _nfs4_proc_pathconf(struct nf
+@@ -3058,7 +3058,7 @@ static int _nfs4_proc_pathconf(struct nf
static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_pathconf *pathconf)
{
int err;
do {
-@@ -3340,7 +3340,7 @@ out_free:
+@@ -3404,7 +3404,7 @@ out_free:
static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
{
ssize_t ret;
do {
ret = __nfs4_get_acl_uncached(inode, buf, buflen);
-@@ -3405,7 +3405,7 @@ static int __nfs4_proc_set_acl(struct in
+@@ -3479,7 +3479,7 @@ static int __nfs4_proc_set_acl(struct in
static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen)
{
int err;
do {
err = nfs4_handle_exception(NFS_SERVER(inode),
-@@ -3685,7 +3685,7 @@ out:
+@@ -3760,7 +3760,7 @@ out:
int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, int issync)
{
struct nfs_server *server = NFS_SERVER(inode);
int err;
do {
err = _nfs4_proc_delegreturn(inode, cred, stateid, issync);
-@@ -3758,7 +3758,7 @@ out:
+@@ -3834,7 +3834,7 @@ out:
static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
int err;
do {
-@@ -4167,7 +4167,7 @@ static int _nfs4_do_setlk(struct nfs4_st
+@@ -4239,7 +4239,7 @@ static int _nfs4_do_setlk(struct nfs4_st
static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
do {
-@@ -4185,7 +4185,7 @@ static int nfs4_lock_reclaim(struct nfs4
+@@ -4257,7 +4257,7 @@ static int nfs4_lock_reclaim(struct nfs4
static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
err = nfs4_set_lock_state(state, request);
-@@ -4249,7 +4249,7 @@ out:
+@@ -4321,7 +4321,7 @@ out:
static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
int err;
do {
-@@ -4309,7 +4309,7 @@ nfs4_proc_lock(struct file *filp, int cm
+@@ -4381,7 +4381,7 @@ nfs4_proc_lock(struct file *filp, int cm
int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
{
struct nfs_server *server = NFS_SERVER(state->inode);
int err;
err = nfs4_set_lock_state(state, fl);
-diff -urNp linux-2.6.37.2/fs/nfsd/lockd.c linux-2.6.37.2/fs/nfsd/lockd.c
---- linux-2.6.37.2/fs/nfsd/lockd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/nfsd/lockd.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/nfsd/lockd.c linux-2.6.38.1/fs/nfsd/lockd.c
+--- linux-2.6.38.1/fs/nfsd/lockd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nfsd/lockd.c 2011-03-21 18:31:35.000000000 -0400
@@ -61,7 +61,7 @@ nlm_fclose(struct file *filp)
fput(filp);
}
.fopen = nlm_fopen, /* open file for locking */
.fclose = nlm_fclose, /* close file */
};
-diff -urNp linux-2.6.37.2/fs/nfsd/nfsctl.c linux-2.6.37.2/fs/nfsd/nfsctl.c
---- linux-2.6.37.2/fs/nfsd/nfsctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/nfsd/nfsctl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -178,7 +178,7 @@ static int export_features_open(struct i
+diff -urNp linux-2.6.38.1/fs/nfsd/nfsctl.c linux-2.6.38.1/fs/nfsd/nfsctl.c
+--- linux-2.6.38.1/fs/nfsd/nfsctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nfsd/nfsctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -180,7 +180,7 @@ static int export_features_open(struct i
return single_open(file, export_features_show, NULL);
}
.open = export_features_open,
.read = seq_read,
.llseek = seq_lseek,
-diff -urNp linux-2.6.37.2/fs/nfsd/vfs.c linux-2.6.37.2/fs/nfsd/vfs.c
---- linux-2.6.37.2/fs/nfsd/vfs.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/fs/nfsd/vfs.c 2011-02-27 14:50:02.000000000 -0500
-@@ -916,7 +916,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+diff -urNp linux-2.6.38.1/fs/nfsd/vfs.c linux-2.6.38.1/fs/nfsd/vfs.c
+--- linux-2.6.38.1/fs/nfsd/vfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nfsd/vfs.c 2011-03-21 18:31:35.000000000 -0400
+@@ -898,7 +898,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
} else {
oldfs = get_fs();
set_fs(KERNEL_DS);
set_fs(oldfs);
}
-@@ -1029,7 +1029,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1002,7 +1002,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
-@@ -1546,7 +1546,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
+@@ -1518,7 +1518,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
*/
oldfs = get_fs(); set_fs(KERNEL_DS);
set_fs(oldfs);
if (host_err < 0)
-diff -urNp linux-2.6.37.2/fs/nls/nls_base.c linux-2.6.37.2/fs/nls/nls_base.c
---- linux-2.6.37.2/fs/nls/nls_base.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/nls/nls_base.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/nls/nls_base.c linux-2.6.38.1/fs/nls/nls_base.c
+--- linux-2.6.38.1/fs/nls/nls_base.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/nls/nls_base.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,7 +41,7 @@ static const struct utf8_table utf8_tabl
{0xF8, 0xF0, 3*6, 0x1FFFFF, 0x10000, /* 4 byte sequence */},
{0xFC, 0xF8, 4*6, 0x3FFFFFF, 0x200000, /* 5 byte sequence */},
};
#define UNICODE_MAX 0x0010ffff
-diff -urNp linux-2.6.37.2/fs/ntfs/dir.c linux-2.6.37.2/fs/ntfs/dir.c
---- linux-2.6.37.2/fs/ntfs/dir.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ntfs/dir.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ntfs/dir.c linux-2.6.38.1/fs/ntfs/dir.c
+--- linux-2.6.38.1/fs/ntfs/dir.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ntfs/dir.c 2011-03-21 18:31:35.000000000 -0400
@@ -1329,7 +1329,7 @@ find_next_index_buffer:
ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
~(s64)(ndir->itype.index.block_size - 1)));
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.37.2/fs/ntfs/file.c linux-2.6.37.2/fs/ntfs/file.c
---- linux-2.6.37.2/fs/ntfs/file.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ntfs/file.c 2011-01-17 02:41:01.000000000 -0500
-@@ -2223,6 +2223,6 @@ const struct inode_operations ntfs_file_
+diff -urNp linux-2.6.38.1/fs/ntfs/file.c linux-2.6.38.1/fs/ntfs/file.c
+--- linux-2.6.38.1/fs/ntfs/file.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ntfs/file.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2222,6 +2222,6 @@ const struct inode_operations ntfs_file_
#endif /* NTFS_RW */
};
-const struct inode_operations ntfs_empty_inode_ops = {};
+const struct inode_operations ntfs_empty_inode_ops __read_only;
-diff -urNp linux-2.6.37.2/fs/ocfs2/localalloc.c linux-2.6.37.2/fs/ocfs2/localalloc.c
---- linux-2.6.37.2/fs/ocfs2/localalloc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ocfs2/localalloc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ocfs2/localalloc.c linux-2.6.38.1/fs/ocfs2/localalloc.c
+--- linux-2.6.38.1/fs/ocfs2/localalloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ocfs2/localalloc.c 2011-03-21 18:31:35.000000000 -0400
@@ -1307,7 +1307,7 @@ static int ocfs2_local_alloc_slide_windo
goto bail;
}
bail:
if (handle)
-diff -urNp linux-2.6.37.2/fs/ocfs2/ocfs2.h linux-2.6.37.2/fs/ocfs2/ocfs2.h
---- linux-2.6.37.2/fs/ocfs2/ocfs2.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ocfs2/ocfs2.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ocfs2/ocfs2.h linux-2.6.38.1/fs/ocfs2/ocfs2.h
+--- linux-2.6.38.1/fs/ocfs2/ocfs2.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ocfs2/ocfs2.h 2011-03-21 18:31:35.000000000 -0400
@@ -230,11 +230,11 @@ enum ocfs2_vol_state
struct ocfs2_alloc_stats
};
enum ocfs2_local_alloc_state
-diff -urNp linux-2.6.37.2/fs/ocfs2/suballoc.c linux-2.6.37.2/fs/ocfs2/suballoc.c
---- linux-2.6.37.2/fs/ocfs2/suballoc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ocfs2/suballoc.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ocfs2/suballoc.c linux-2.6.38.1/fs/ocfs2/suballoc.c
+--- linux-2.6.38.1/fs/ocfs2/suballoc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ocfs2/suballoc.c 2011-03-21 18:31:35.000000000 -0400
@@ -877,7 +877,7 @@ static int ocfs2_reserve_suballoc_bits(s
mlog_errno(status);
goto bail;
*num_clusters = res.sr_bits;
}
}
-diff -urNp linux-2.6.37.2/fs/ocfs2/super.c linux-2.6.37.2/fs/ocfs2/super.c
---- linux-2.6.37.2/fs/ocfs2/super.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ocfs2/super.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ocfs2/super.c linux-2.6.38.1/fs/ocfs2/super.c
+--- linux-2.6.38.1/fs/ocfs2/super.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ocfs2/super.c 2011-03-21 18:31:35.000000000 -0400
@@ -297,11 +297,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
"%10s => GlobalAllocs: %d LocalAllocs: %d "
"SubAllocs: %d LAWinMoves: %d SAExtends: %d\n",
out += snprintf(buf + out, len - out,
"%10s => State: %u Descriptor: %llu Size: %u bits "
-@@ -2122,11 +2122,11 @@ static int ocfs2_initialize_super(struct
+@@ -2141,11 +2141,11 @@ static int ocfs2_initialize_super(struct
spin_lock_init(&osb->osb_xattr_lock);
ocfs2_init_steal_slots(osb);
/* Copy the blockcheck stats from the superblock probe */
osb->osb_ecc_stats = *stats;
-diff -urNp linux-2.6.37.2/fs/ocfs2/symlink.c linux-2.6.37.2/fs/ocfs2/symlink.c
---- linux-2.6.37.2/fs/ocfs2/symlink.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ocfs2/symlink.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ocfs2/symlink.c linux-2.6.38.1/fs/ocfs2/symlink.c
+--- linux-2.6.38.1/fs/ocfs2/symlink.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ocfs2/symlink.c 2011-03-21 18:31:35.000000000 -0400
@@ -148,7 +148,7 @@ bail:
static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
if (!IS_ERR(link))
kfree(link);
}
-diff -urNp linux-2.6.37.2/fs/open.c linux-2.6.37.2/fs/open.c
---- linux-2.6.37.2/fs/open.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/open.c 2011-01-17 02:49:14.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/open.c linux-2.6.38.1/fs/open.c
+--- linux-2.6.38.1/fs/open.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/open.c 2011-03-21 18:31:35.000000000 -0400
@@ -112,6 +112,10 @@ static long do_sys_truncate(const char _
error = locks_verify_truncate(inode, NULL, length);
if (!error)
if (!error)
error = do_truncate(path.dentry, length, 0, NULL);
-@@ -345,6 +349,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con
+@@ -358,6 +362,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con
if (__mnt_is_readonly(path.mnt))
res = -EROFS;
out_path_release:
path_put(&path);
out:
-@@ -371,6 +378,8 @@ SYSCALL_DEFINE1(chdir, const char __user
+@@ -384,6 +391,8 @@ SYSCALL_DEFINE1(chdir, const char __user
if (error)
goto dput_and_out;
set_fs_pwd(current->fs, &path);
dput_and_out:
-@@ -397,6 +406,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);
if (!error)
set_fs_pwd(current->fs, &file->f_path);
out_putf:
-@@ -425,7 +441,18 @@ SYSCALL_DEFINE1(chroot, const char __use
+@@ -438,7 +454,18 @@ SYSCALL_DEFINE1(chroot, const char __use
if (error)
goto dput_and_out;
error = 0;
dput_and_out:
path_put(&path);
-@@ -453,12 +480,25 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
+@@ -466,12 +493,25 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
err = mnt_want_write_file(file);
if (err)
goto out_putf;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
err = notify_change(dentry, &newattrs);
-@@ -486,12 +526,25 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
+@@ -499,12 +539,25 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
error = mnt_want_write(path.mnt);
if (error)
goto dput_and_out;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
error = notify_change(path.dentry, &newattrs);
-@@ -515,6 +568,9 @@ static int chown_common(struct path *pat
+@@ -528,6 +581,9 @@ static int chown_common(struct path *pat
int error;
struct iattr newattrs;
newattrs.ia_valid = ATTR_CTIME;
if (user != (uid_t) -1) {
newattrs.ia_valid |= ATTR_UID;
-@@ -883,7 +939,10 @@ long do_sys_open(int dfd, const char __u
+@@ -898,7 +954,10 @@ long do_sys_open(int dfd, const char __u
if (!IS_ERR(tmp)) {
fd = get_unused_fd_flags(flags);
if (fd >= 0) {
if (IS_ERR(f)) {
put_unused_fd(fd);
fd = PTR_ERR(f);
-diff -urNp linux-2.6.37.2/fs/partitions/ldm.c linux-2.6.37.2/fs/partitions/ldm.c
---- linux-2.6.37.2/fs/partitions/ldm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/partitions/ldm.c 2011-02-27 15:47:06.000000000 -0500
-@@ -251,6 +251,11 @@ static bool ldm_parse_vmdb (const u8 *da
- }
-
- vm->vblk_size = get_unaligned_be32(data + 0x08);
-+ if (vm->vblk_size == 0) {
-+ ldm_eror ("Illegal VBLK size");
-+ return false;
-+ }
-+
- vm->vblk_offset = get_unaligned_be32(data + 0x0C);
- vm->last_vblk_seq = get_unaligned_be32(data + 0x04);
-
-@@ -1308,7 +1313,7 @@ static bool ldm_frag_add (const u8 *data
+diff -urNp linux-2.6.38.1/fs/partitions/ldm.c linux-2.6.38.1/fs/partitions/ldm.c
+--- linux-2.6.38.1/fs/partitions/ldm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/partitions/ldm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1313,7 +1313,7 @@ static bool ldm_frag_add (const u8 *data
goto found;
}
if (!f) {
ldm_crit ("Out of memory.");
return false;
-diff -urNp linux-2.6.37.2/fs/pipe.c linux-2.6.37.2/fs/pipe.c
---- linux-2.6.37.2/fs/pipe.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/pipe.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/pipe.c linux-2.6.38.1/fs/pipe.c
+--- linux-2.6.38.1/fs/pipe.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/pipe.c 2011-03-21 18:31:35.000000000 -0400
@@ -420,9 +420,9 @@ redo:
}
if (bufs) /* More to do? */
+ if (!atomic_read(&pipe->readers) && !atomic_read(&pipe->writers)) {
free_pipe_info(inode);
} else {
- wake_up_interruptible_sync(&pipe->wait);
+ wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP);
@@ -802,7 +802,7 @@ pipe_read_open(struct inode *inode, stru
if (inode->i_pipe) {
inode->i_fop = &rdwr_pipefifo_fops;
/*
-diff -urNp linux-2.6.37.2/fs/proc/array.c linux-2.6.37.2/fs/proc/array.c
---- linux-2.6.37.2/fs/proc/array.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/array.c 2011-02-27 14:50:09.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/array.c linux-2.6.38.1/fs/proc/array.c
+--- linux-2.6.38.1/fs/proc/array.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/array.c 2011-03-21 18:31:35.000000000 -0400
@@ -60,6 +60,7 @@
#include <linux/tty.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/uaccess.h>
@@ -337,6 +338,21 @@ static void task_cpus_allowed(struct seq
- seq_printf(m, "\n");
+ seq_putc(m, '\n');
}
+#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
+ return sprintf(buffer, "%pI4\n", &task->signal->curr_ip);
+}
+#endif
-diff -urNp linux-2.6.37.2/fs/proc/base.c linux-2.6.37.2/fs/proc/base.c
---- linux-2.6.37.2/fs/proc/base.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/base.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/base.c linux-2.6.38.1/fs/proc/base.c
+--- linux-2.6.38.1/fs/proc/base.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/base.c 2011-03-26 11:59:10.000000000 -0400
@@ -104,6 +104,22 @@ struct pid_entry {
union proc_op op;
};
#define MAX_STACK_TRACE_DEPTH 64
-@@ -509,7 +547,7 @@ static int proc_pid_limits(struct task_s
+@@ -503,7 +541,7 @@ static int proc_pid_limits(struct task_s
return count;
}
static int proc_pid_syscall(struct task_struct *task, char *buffer)
{
long nr;
-@@ -930,6 +968,9 @@ static ssize_t environ_read(struct file
+@@ -528,7 +566,7 @@ static int proc_pid_syscall(struct task_
+ /************************************************************************/
+
+ /* permission checks */
+-static int proc_fd_access_allowed(struct inode *inode)
++static int proc_fd_access_allowed(struct inode *inode, unsigned int log)
+ {
+ struct task_struct *task;
+ int allowed = 0;
+@@ -538,7 +576,10 @@ static int proc_fd_access_allowed(struct
+ */
+ task = get_proc_task(inode);
+ if (task) {
+- allowed = ptrace_may_access(task, PTRACE_MODE_READ);
++ if (log)
++ allowed = ptrace_may_access_log(task, PTRACE_MODE_READ);
++ else
++ allowed = ptrace_may_access(task, PTRACE_MODE_READ);
+ put_task_struct(task);
+ }
+ return allowed;
+@@ -917,6 +958,9 @@ static ssize_t environ_read(struct file
if (!task)
goto out_no_task;
if (!ptrace_may_access(task, PTRACE_MODE_READ))
goto out;
-@@ -1663,7 +1704,11 @@ static struct inode *proc_pid_make_inode
+@@ -1606,7 +1650,7 @@ static void *proc_pid_follow_link(struct
+ path_put(&nd->path);
+
+ /* Are we allowed to snoop on the tasks file descriptors? */
+- if (!proc_fd_access_allowed(inode))
++ if (!proc_fd_access_allowed(inode,0))
+ goto out;
+
+ error = PROC_I(inode)->op.proc_get_link(inode, &nd->path);
+@@ -1645,8 +1689,18 @@ static int proc_pid_readlink(struct dent
+ struct path path;
+
+ /* Are we allowed to snoop on the tasks file descriptors? */
+- if (!proc_fd_access_allowed(inode))
+- goto out;
++ /* logging this is needed for learning on chromium to work properly,
++ but we don't want to flood the logs from 'ps' which does a readlink
++ on /proc/fd/2 of tasks in the listing, nor do we want 'ps' to learn
++ CAP_SYS_PTRACE as it's not necessary for its basic functionality
++ */
++ if (dentry->d_name.name[0] == '2' && dentry->d_name.name[1] == '\0') {
++ if (!proc_fd_access_allowed(inode,0))
++ goto out;
++ } else {
++ if (!proc_fd_access_allowed(inode,1))
++ goto out;
++ }
+
+ error = PROC_I(inode)->op.proc_get_link(inode, &path);
+ if (error)
+@@ -1712,7 +1766,11 @@ static struct inode *proc_pid_make_inode
rcu_read_lock();
cred = __task_cred(task);
inode->i_uid = cred->euid;
rcu_read_unlock();
}
security_task_to_inode(task, inode);
-@@ -1681,6 +1726,9 @@ static int pid_getattr(struct vfsmount *
+@@ -1730,6 +1788,9 @@ static int pid_getattr(struct vfsmount *
struct inode *inode = dentry->d_inode;
struct task_struct *task;
const struct cred *cred;
generic_fillattr(inode, stat);
-@@ -1688,12 +1736,34 @@ static int pid_getattr(struct vfsmount *
+@@ -1737,12 +1798,34 @@ static int pid_getattr(struct vfsmount *
stat->uid = 0;
stat->gid = 0;
task = pid_task(proc_pid(inode), PIDTYPE_PID);
}
}
rcu_read_unlock();
-@@ -1725,11 +1795,20 @@ static int pid_revalidate(struct dentry
+@@ -1780,11 +1863,20 @@ static int pid_revalidate(struct dentry
if (task) {
if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
rcu_read_unlock();
} else {
inode->i_uid = 0;
-@@ -1850,7 +1929,8 @@ static int proc_fd_info(struct inode *in
+@@ -1905,7 +1997,8 @@ static int proc_fd_info(struct inode *in
int fd = proc_fd(inode);
if (task) {
put_task_struct(task);
}
if (files) {
-@@ -2104,12 +2184,22 @@ static const struct file_operations proc
- static int proc_fd_permission(struct inode *inode, int mask)
+@@ -2165,15 +2258,25 @@ static const struct file_operations proc
+ */
+ static int proc_fd_permission(struct inode *inode, int mask, unsigned int flags)
{
- int rv;
+ struct task_struct *task;
+ int rv;
- rv = generic_permission(inode, mask, NULL);
+ if (flags & IPERM_FLAG_RCU)
+ return -ECHILD;
+ rv = generic_permission(inode, mask, flags, NULL);
- if (rv == 0)
- return 0;
+
return rv;
}
-@@ -2219,6 +2309,9 @@ static struct dentry *proc_pident_lookup
+@@ -2283,6 +2386,9 @@ static struct dentry *proc_pident_lookup
if (!task)
goto out_no_task;
/*
* Yes, it does not scale. And it should not. Don't add
* new entries into /proc/<tgid>/ without very good reasons.
-@@ -2263,6 +2356,9 @@ static int proc_pident_readdir(struct fi
+@@ -2327,6 +2433,9 @@ static int proc_pident_readdir(struct fi
if (!task)
goto out_no_task;
ret = 0;
i = filp->f_pos;
switch (i) {
-@@ -2533,7 +2629,7 @@ static void *proc_self_follow_link(struc
+@@ -2597,7 +2706,7 @@ static void *proc_self_follow_link(struc
static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd,
void *cookie)
{
if (!IS_ERR(s))
__putname(s);
}
-@@ -2734,7 +2830,7 @@ static const struct pid_entry tgid_base_
- REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
+@@ -2777,7 +2886,7 @@ static const struct pid_entry tgid_base_
+ REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
-#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
INF("syscall", S_IRUSR, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -2759,10 +2855,10 @@ static const struct pid_entry tgid_base_
+@@ -2802,10 +2911,10 @@ static const struct pid_entry tgid_base_
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
ONE("stack", S_IRUSR, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-@@ -2793,6 +2889,9 @@ static const struct pid_entry tgid_base_
+@@ -2836,6 +2945,9 @@ static const struct pid_entry tgid_base_
#ifdef CONFIG_TASK_IO_ACCOUNTING
INF("io", S_IRUGO, proc_tgid_io_accounting),
#endif
};
static int proc_tgid_base_readdir(struct file * filp,
-@@ -2918,7 +3017,14 @@ static struct dentry *proc_pid_instantia
+@@ -2961,7 +3073,14 @@ static struct dentry *proc_pid_instantia
if (!inode)
goto out;
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -2960,7 +3066,11 @@ struct dentry *proc_pid_lookup(struct in
+@@ -3003,7 +3122,11 @@ struct dentry *proc_pid_lookup(struct in
if (!task)
goto out;
put_task_struct(task);
out:
return result;
-@@ -3025,6 +3135,11 @@ int proc_pid_readdir(struct file * filp,
+@@ -3068,6 +3191,11 @@ int proc_pid_readdir(struct file * filp,
{
unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY;
struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode);
struct tgid_iter iter;
struct pid_namespace *ns;
-@@ -3043,8 +3158,27 @@ int proc_pid_readdir(struct file * filp,
+@@ -3086,8 +3214,27 @@ int proc_pid_readdir(struct file * filp,
for (iter = next_tgid(ns, iter);
iter.task;
iter.tgid += 1, iter = next_tgid(ns, iter)) {
put_task_struct(iter.task);
goto out;
}
-@@ -3071,7 +3205,7 @@ static const struct pid_entry tid_base_s
+@@ -3114,7 +3261,7 @@ static const struct pid_entry tid_base_s
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
INF("syscall", S_IRUSR, proc_pid_syscall),
#endif
INF("cmdline", S_IRUGO, proc_pid_cmdline),
-@@ -3095,10 +3229,10 @@ static const struct pid_entry tid_base_s
+@@ -3138,10 +3285,10 @@ static const struct pid_entry tid_base_s
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
ONE("stack", S_IRUSR, proc_pid_stack),
#endif
#ifdef CONFIG_SCHEDSTATS
-diff -urNp linux-2.6.37.2/fs/proc/cmdline.c linux-2.6.37.2/fs/proc/cmdline.c
---- linux-2.6.37.2/fs/proc/cmdline.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/cmdline.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/cmdline.c linux-2.6.38.1/fs/proc/cmdline.c
+--- linux-2.6.38.1/fs/proc/cmdline.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/cmdline.c 2011-03-21 18:31:35.000000000 -0400
@@ -23,7 +23,11 @@ static const struct file_operations cmdl
static int __init proc_cmdline_init(void)
return 0;
}
module_init(proc_cmdline_init);
-diff -urNp linux-2.6.37.2/fs/proc/devices.c linux-2.6.37.2/fs/proc/devices.c
---- linux-2.6.37.2/fs/proc/devices.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/devices.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/devices.c linux-2.6.38.1/fs/proc/devices.c
+--- linux-2.6.38.1/fs/proc/devices.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/devices.c 2011-03-21 18:31:35.000000000 -0400
@@ -64,7 +64,11 @@ static const struct file_operations proc
static int __init proc_devices_init(void)
return 0;
}
module_init(proc_devices_init);
-diff -urNp linux-2.6.37.2/fs/proc/inode.c linux-2.6.37.2/fs/proc/inode.c
---- linux-2.6.37.2/fs/proc/inode.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/inode.c 2011-01-17 02:41:01.000000000 -0500
-@@ -425,7 +425,11 @@ struct inode *proc_get_inode(struct supe
+diff -urNp linux-2.6.38.1/fs/proc/inode.c linux-2.6.38.1/fs/proc/inode.c
+--- linux-2.6.38.1/fs/proc/inode.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/inode.c 2011-03-21 18:31:35.000000000 -0400
+@@ -435,7 +435,11 @@ struct inode *proc_get_inode(struct supe
if (de->mode) {
inode->i_mode = de->mode;
inode->i_uid = de->uid;
}
if (de->size)
inode->i_size = de->size;
-diff -urNp linux-2.6.37.2/fs/proc/internal.h linux-2.6.37.2/fs/proc/internal.h
---- linux-2.6.37.2/fs/proc/internal.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/internal.h 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/internal.h linux-2.6.38.1/fs/proc/internal.h
+--- linux-2.6.38.1/fs/proc/internal.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/internal.h 2011-03-21 18:31:35.000000000 -0400
@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi
struct pid *pid, struct task_struct *task);
extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
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.37.2/fs/proc/Kconfig linux-2.6.37.2/fs/proc/Kconfig
---- linux-2.6.37.2/fs/proc/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/Kconfig 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/Kconfig linux-2.6.38.1/fs/proc/Kconfig
+--- linux-2.6.38.1/fs/proc/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/Kconfig 2011-03-21 18:31:35.000000000 -0400
@@ -30,12 +30,12 @@ config PROC_FS
config PROC_KCORE
- depends on PROC_FS && MMU
+ default n
+ depends on PROC_FS && MMU && !GRKERNSEC
- bool "Enable /proc page monitoring" if EMBEDDED
+ bool "Enable /proc page monitoring" if EXPERT
help
Various /proc files exist to monitor process memory utilization:
-diff -urNp linux-2.6.37.2/fs/proc/kcore.c linux-2.6.37.2/fs/proc/kcore.c
---- linux-2.6.37.2/fs/proc/kcore.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/kcore.c 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/kcore.c linux-2.6.38.1/fs/proc/kcore.c
+--- linux-2.6.38.1/fs/proc/kcore.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/kcore.c 2011-03-21 18:31:35.000000000 -0400
@@ -478,9 +478,10 @@ read_kcore(struct file *file, char __use
* the addresses in the elf_phdr on our list.
*/
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
if (kcore_need_update)
-diff -urNp linux-2.6.37.2/fs/proc/meminfo.c linux-2.6.37.2/fs/proc/meminfo.c
---- linux-2.6.37.2/fs/proc/meminfo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/meminfo.c 2011-01-17 02:41:01.000000000 -0500
-@@ -149,7 +149,7 @@ static int meminfo_proc_show(struct seq_
+diff -urNp linux-2.6.38.1/fs/proc/meminfo.c linux-2.6.38.1/fs/proc/meminfo.c
+--- linux-2.6.38.1/fs/proc/meminfo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/meminfo.c 2011-03-21 18:31:35.000000000 -0400
+@@ -157,7 +157,7 @@ static int meminfo_proc_show(struct seq_
vmi.used >> 10,
vmi.largest_chunk >> 10
#ifdef CONFIG_MEMORY_FAILURE
- ,atomic_long_read(&mce_bad_pages) << (PAGE_SHIFT - 10)
+ ,atomic_long_read_unchecked(&mce_bad_pages) << (PAGE_SHIFT - 10)
#endif
- );
-
-diff -urNp linux-2.6.37.2/fs/proc/nommu.c linux-2.6.37.2/fs/proc/nommu.c
---- linux-2.6.37.2/fs/proc/nommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/nommu.c 2011-01-17 02:41:01.000000000 -0500
+ #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ ,K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
+diff -urNp linux-2.6.38.1/fs/proc/nommu.c linux-2.6.38.1/fs/proc/nommu.c
+--- linux-2.6.38.1/fs/proc/nommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/nommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -66,7 +66,7 @@ static int nommu_region_show(struct seq_
if (len < 1)
len = 1;
}
seq_putc(m, '\n');
-diff -urNp linux-2.6.37.2/fs/proc/proc_net.c linux-2.6.37.2/fs/proc/proc_net.c
---- linux-2.6.37.2/fs/proc/proc_net.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/proc_net.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/proc_net.c linux-2.6.38.1/fs/proc/proc_net.c
+--- linux-2.6.38.1/fs/proc/proc_net.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/proc_net.c 2011-03-21 18:31:35.000000000 -0400
@@ -105,6 +105,17 @@ static struct net *get_proc_task_net(str
struct task_struct *task;
struct nsproxy *ns;
rcu_read_lock();
task = pid_task(proc_pid(dir), PIDTYPE_PID);
-diff -urNp linux-2.6.37.2/fs/proc/proc_sysctl.c linux-2.6.37.2/fs/proc/proc_sysctl.c
---- linux-2.6.37.2/fs/proc/proc_sysctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/proc_sysctl.c 2011-01-17 02:41:01.000000000 -0500
-@@ -7,6 +7,8 @@
- #include <linux/security.h>
+diff -urNp linux-2.6.38.1/fs/proc/proc_sysctl.c linux-2.6.38.1/fs/proc/proc_sysctl.c
+--- linux-2.6.38.1/fs/proc/proc_sysctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/proc_sysctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -8,6 +8,8 @@
+ #include <linux/namei.h>
#include "internal.h"
+extern __u32 gr_handle_sysctl(const struct ctl_table *table, const int op);
static const struct dentry_operations proc_sys_dentry_operations;
static const struct file_operations proc_sys_file_operations;
static const struct inode_operations proc_sys_inode_operations;
-@@ -111,6 +113,9 @@ static struct dentry *proc_sys_lookup(st
+@@ -112,6 +114,9 @@ static struct dentry *proc_sys_lookup(st
if (!p)
goto out;
err = ERR_PTR(-ENOMEM);
inode = proc_sys_make_inode(dir->i_sb, h ? h : head, p);
if (h)
-@@ -230,6 +235,9 @@ static int scan(struct ctl_table_header
+@@ -231,6 +236,9 @@ static int scan(struct ctl_table_header
if (*pos < file->f_pos)
continue;
res = proc_sys_fill_cache(file, dirent, filldir, head, table);
if (res)
return res;
-@@ -355,6 +363,9 @@ static int proc_sys_getattr(struct vfsmo
+@@ -359,6 +367,9 @@ static int proc_sys_getattr(struct vfsmo
if (IS_ERR(head))
return PTR_ERR(head);
generic_fillattr(inode, stat);
if (table)
stat->mode = (stat->mode & S_IFMT) | table->mode;
-diff -urNp linux-2.6.37.2/fs/proc/root.c linux-2.6.37.2/fs/proc/root.c
---- linux-2.6.37.2/fs/proc/root.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/root.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/root.c linux-2.6.38.1/fs/proc/root.c
+--- linux-2.6.38.1/fs/proc/root.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/root.c 2011-03-21 18:31:35.000000000 -0400
@@ -132,7 +132,15 @@ void __init proc_root_init(void)
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
proc_sys_init();
}
-diff -urNp linux-2.6.37.2/fs/proc/task_mmu.c linux-2.6.37.2/fs/proc/task_mmu.c
---- linux-2.6.37.2/fs/proc/task_mmu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/task_mmu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/task_mmu.c linux-2.6.38.1/fs/proc/task_mmu.c
+--- linux-2.6.38.1/fs/proc/task_mmu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/task_mmu.c 2011-03-21 18:31:35.000000000 -0400
@@ -49,8 +49,13 @@ void task_mem(struct seq_file *m, struct
"VmExe:\t%8lu kB\n"
"VmLib:\t%8lu kB\n"
}
unsigned long task_vsize(struct mm_struct *mm)
-@@ -203,6 +214,12 @@ static int do_maps_open(struct inode *in
+@@ -204,6 +215,12 @@ static int do_maps_open(struct inode *in
return ret;
}
static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
{
struct mm_struct *mm = vma->vm_mm;
-@@ -210,7 +227,6 @@ static void show_map_vma(struct seq_file
+@@ -211,7 +228,6 @@ static void show_map_vma(struct seq_file
int flags = vma->vm_flags;
unsigned long ino = 0;
unsigned long long pgoff = 0;
dev_t dev = 0;
int len;
-@@ -221,20 +237,24 @@ static void show_map_vma(struct seq_file
+@@ -222,20 +238,24 @@ static void show_map_vma(struct seq_file
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
}
MAJOR(dev), MINOR(dev), ino, &len);
/*
-@@ -243,16 +263,16 @@ static void show_map_vma(struct seq_file
+@@ -244,16 +264,16 @@ static void show_map_vma(struct seq_file
*/
if (file) {
pad_len_spaces(m, len);
name = "[stack]";
}
} else {
-@@ -398,11 +418,16 @@ static int show_smap(struct seq_file *m,
+@@ -399,11 +419,16 @@ static int show_smap(struct seq_file *m,
};
memset(&mss, 0, sizeof mss);
show_map_vma(m, vma);
seq_printf(m,
-@@ -418,7 +443,11 @@ static int show_smap(struct seq_file *m,
- "Swap: %8lu kB\n"
+@@ -420,7 +445,11 @@ static int show_smap(struct seq_file *m,
"KernelPageSize: %8lu kB\n"
- "MMUPageSize: %8lu kB\n",
+ "MMUPageSize: %8lu kB\n"
+ "Locked: %8lu kB\n",
+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
+ PAX_RAND_FLAGS(vma->vm_mm) ? 0UL : (vma->vm_end - vma->vm_start) >> 10,
+#else
mss.resident >> 10,
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
mss.shared_clean >> 10,
-diff -urNp linux-2.6.37.2/fs/proc/task_nommu.c linux-2.6.37.2/fs/proc/task_nommu.c
---- linux-2.6.37.2/fs/proc/task_nommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/proc/task_nommu.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/proc/task_nommu.c linux-2.6.38.1/fs/proc/task_nommu.c
+--- linux-2.6.38.1/fs/proc/task_nommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/proc/task_nommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct
else
bytes += kobjsize(mm);
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
-@@ -165,7 +165,7 @@ static int nommu_vma_show(struct seq_fil
+@@ -166,7 +166,7 @@ static int nommu_vma_show(struct seq_fil
if (file) {
pad_len_spaces(m, len);
} else if (mm) {
if (vma->vm_start <= mm->start_stack &&
vma->vm_end >= mm->start_stack) {
-diff -urNp linux-2.6.37.2/fs/readdir.c linux-2.6.37.2/fs/readdir.c
---- linux-2.6.37.2/fs/readdir.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/readdir.c 2011-01-17 02:41:01.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/readdir.c linux-2.6.38.1/fs/readdir.c
+--- linux-2.6.38.1/fs/readdir.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/readdir.c 2011-03-21 18:31:35.000000000 -0400
@@ -17,6 +17,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
buf.count = count;
buf.error = 0;
-diff -urNp linux-2.6.37.2/fs/reiserfs/do_balan.c linux-2.6.37.2/fs/reiserfs/do_balan.c
---- linux-2.6.37.2/fs/reiserfs/do_balan.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/reiserfs/do_balan.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/reiserfs/do_balan.c linux-2.6.38.1/fs/reiserfs/do_balan.c
+--- linux-2.6.38.1/fs/reiserfs/do_balan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/reiserfs/do_balan.c 2011-03-21 18:31:35.000000000 -0400
@@ -2051,7 +2051,7 @@ void do_balance(struct tree_balance *tb,
return;
}
do_balance_starts(tb);
/* balance leaf returns 0 except if combining L R and S into
-diff -urNp linux-2.6.37.2/fs/reiserfs/item_ops.c linux-2.6.37.2/fs/reiserfs/item_ops.c
---- linux-2.6.37.2/fs/reiserfs/item_ops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/reiserfs/item_ops.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/reiserfs/item_ops.c linux-2.6.38.1/fs/reiserfs/item_ops.c
+--- linux-2.6.38.1/fs/reiserfs/item_ops.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/reiserfs/item_ops.c 2011-03-21 18:31:35.000000000 -0400
@@ -102,7 +102,7 @@ static void sd_print_vi(struct virtual_i
vi->vi_index, vi->vi_type, vi->vi_ih);
}
&stat_data_ops,
&indirect_ops,
&direct_ops,
-diff -urNp linux-2.6.37.2/fs/reiserfs/procfs.c linux-2.6.37.2/fs/reiserfs/procfs.c
---- linux-2.6.37.2/fs/reiserfs/procfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/reiserfs/procfs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/reiserfs/procfs.c linux-2.6.38.1/fs/reiserfs/procfs.c
+--- linux-2.6.38.1/fs/reiserfs/procfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/reiserfs/procfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -113,7 +113,7 @@ static int show_super(struct seq_file *m
"SMALL_TAILS " : "NO_TAILS ",
replay_only(sb) ? "REPLAY_ONLY " : "",
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),
-diff -urNp linux-2.6.37.2/fs/select.c linux-2.6.37.2/fs/select.c
---- linux-2.6.37.2/fs/select.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/select.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/select.c linux-2.6.38.1/fs/select.c
+--- linux-2.6.38.1/fs/select.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/select.c 2011-03-21 18:31:35.000000000 -0400
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
#include <linux/fdtable.h>
-@@ -838,6 +839,7 @@ int do_sys_poll(struct pollfd __user *uf
+@@ -840,6 +841,7 @@ int do_sys_poll(struct pollfd __user *uf
struct poll_list *walk = head;
unsigned long todo = nfds;
if (nfds > rlimit(RLIMIT_NOFILE))
return -EINVAL;
-diff -urNp linux-2.6.37.2/fs/seq_file.c linux-2.6.37.2/fs/seq_file.c
---- linux-2.6.37.2/fs/seq_file.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/seq_file.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/seq_file.c linux-2.6.38.1/fs/seq_file.c
+--- linux-2.6.38.1/fs/seq_file.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/seq_file.c 2011-03-21 18:31:35.000000000 -0400
@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m,
return 0;
}
if (!m->buf)
goto Enomem;
m->count = 0;
-diff -urNp linux-2.6.37.2/fs/splice.c linux-2.6.37.2/fs/splice.c
---- linux-2.6.37.2/fs/splice.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/splice.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/splice.c linux-2.6.38.1/fs/splice.c
+--- linux-2.6.38.1/fs/splice.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/splice.c 2011-03-21 18:31:35.000000000 -0400
@@ -186,7 +186,7 @@ ssize_t splice_to_pipe(struct pipe_inode
pipe_lock(pipe);
vec[i].iov_len = this_len;
spd.pages[i] = page;
spd.nr_pages++;
-@@ -849,10 +849,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed);
+@@ -842,10 +842,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed);
int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
{
while (!pipe->nrbufs) {
return 0;
if (sd->flags & SPLICE_F_NONBLOCK)
-@@ -1189,7 +1189,7 @@ ssize_t splice_direct_to_actor(struct fi
+@@ -1178,7 +1178,7 @@ ssize_t splice_direct_to_actor(struct fi
* out of the pipe right after the splice_to_pipe(). So set
* PIPE_READERS appropriately.
*/
current->splice_pipe = pipe;
}
-@@ -1745,9 +1745,9 @@ static int ipipe_prep(struct pipe_inode_
+@@ -1730,9 +1730,9 @@ static int ipipe_prep(struct pipe_inode_
ret = -ERESTARTSYS;
break;
}
if (flags & SPLICE_F_NONBLOCK) {
ret = -EAGAIN;
break;
-@@ -1779,7 +1779,7 @@ static int opipe_prep(struct pipe_inode_
+@@ -1764,7 +1764,7 @@ static int opipe_prep(struct pipe_inode_
pipe_lock(pipe);
while (pipe->nrbufs >= pipe->buffers) {
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
break;
-@@ -1792,9 +1792,9 @@ static int opipe_prep(struct pipe_inode_
+@@ -1777,9 +1777,9 @@ static int opipe_prep(struct pipe_inode_
ret = -ERESTARTSYS;
break;
}
}
pipe_unlock(pipe);
-@@ -1830,14 +1830,14 @@ retry:
+@@ -1815,14 +1815,14 @@ retry:
pipe_double_lock(ipipe, opipe);
do {
break;
/*
-@@ -1937,7 +1937,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1922,7 +1922,7 @@ static int link_pipe(struct pipe_inode_i
pipe_double_lock(ipipe, opipe);
do {
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -1982,7 +1982,7 @@ static int link_pipe(struct pipe_inode_i
+@@ -1967,7 +1967,7 @@ static int link_pipe(struct pipe_inode_i
* return EAGAIN if we have the potential of some data in the
* future, otherwise just return 0
*/
ret = -EAGAIN;
pipe_unlock(ipipe);
-diff -urNp linux-2.6.37.2/fs/sysfs/symlink.c linux-2.6.37.2/fs/sysfs/symlink.c
---- linux-2.6.37.2/fs/sysfs/symlink.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/sysfs/symlink.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/sysfs/mount.c linux-2.6.38.1/fs/sysfs/mount.c
+--- linux-2.6.38.1/fs/sysfs/mount.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/sysfs/mount.c 2011-03-21 18:31:35.000000000 -0400
+@@ -36,7 +36,11 @@ struct sysfs_dirent sysfs_root = {
+ .s_name = "",
+ .s_count = ATOMIC_INIT(1),
+ .s_flags = SYSFS_DIR | (KOBJ_NS_TYPE_NONE << SYSFS_NS_TYPE_SHIFT),
++#ifdef CONFIG_GRKERNSEC_SYSFS_RESTRICT
++ .s_mode = S_IFDIR | S_IRWXU,
++#else
+ .s_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO,
++#endif
+ .s_ino = 1,
+ };
+
+diff -urNp linux-2.6.38.1/fs/sysfs/symlink.c linux-2.6.38.1/fs/sysfs/symlink.c
+--- linux-2.6.38.1/fs/sysfs/symlink.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/sysfs/symlink.c 2011-03-21 18:31:35.000000000 -0400
@@ -286,7 +286,7 @@ static void *sysfs_follow_link(struct de
static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
if (!IS_ERR(page))
free_page((unsigned long)page);
}
-diff -urNp linux-2.6.37.2/fs/ubifs/debug.c linux-2.6.37.2/fs/ubifs/debug.c
---- linux-2.6.37.2/fs/ubifs/debug.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/ubifs/debug.c 2011-02-27 15:31:52.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/ubifs/debug.c linux-2.6.38.1/fs/ubifs/debug.c
+--- linux-2.6.38.1/fs/ubifs/debug.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/ubifs/debug.c 2011-03-21 18:31:35.000000000 -0400
@@ -2813,19 +2813,19 @@ int dbg_debugfs_init_fs(struct ubifs_inf
}
if (IS_ERR(dent))
goto out_remove;
d->dfs_dump_tnc = dent;
-diff -urNp linux-2.6.37.2/fs/udf/misc.c linux-2.6.37.2/fs/udf/misc.c
---- linux-2.6.37.2/fs/udf/misc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/udf/misc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/udf/misc.c linux-2.6.38.1/fs/udf/misc.c
+--- linux-2.6.38.1/fs/udf/misc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/udf/misc.c 2011-03-21 18:31:35.000000000 -0400
@@ -142,8 +142,8 @@ struct genericFormat *udf_add_extendedat
iinfo->i_lenEAttr += size;
return (struct genericFormat *)&ea[offset];
u8 checksum = 0;
int i;
for (i = 0; i < sizeof(struct tag); ++i)
-diff -urNp linux-2.6.37.2/fs/udf/udfdecl.h linux-2.6.37.2/fs/udf/udfdecl.h
---- linux-2.6.37.2/fs/udf/udfdecl.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/udf/udfdecl.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/udf/udfdecl.h linux-2.6.38.1/fs/udf/udfdecl.h
+--- linux-2.6.38.1/fs/udf/udfdecl.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/udf/udfdecl.h 2011-03-21 18:31:35.000000000 -0400
@@ -26,7 +26,7 @@ do { \
printk(f, ##a); \
} while (0)
#endif
#define udf_info(f, a...) \
-diff -urNp linux-2.6.37.2/fs/utimes.c linux-2.6.37.2/fs/utimes.c
---- linux-2.6.37.2/fs/utimes.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/utimes.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/utimes.c linux-2.6.38.1/fs/utimes.c
+--- linux-2.6.38.1/fs/utimes.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/utimes.c 2011-03-21 18:31:35.000000000 -0400
@@ -1,6 +1,7 @@
#include <linux/compiler.h>
#include <linux/file.h>
mutex_lock(&inode->i_mutex);
error = notify_change(path->dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-diff -urNp linux-2.6.37.2/fs/xattr_acl.c linux-2.6.37.2/fs/xattr_acl.c
---- linux-2.6.37.2/fs/xattr_acl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xattr_acl.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/xattr_acl.c linux-2.6.38.1/fs/xattr_acl.c
+--- linux-2.6.38.1/fs/xattr_acl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xattr_acl.c 2011-03-21 18:31:35.000000000 -0400
@@ -17,8 +17,8 @@
struct posix_acl *
posix_acl_from_xattr(const void *value, size_t size)
int count;
struct posix_acl *acl;
struct posix_acl_entry *acl_e;
-diff -urNp linux-2.6.37.2/fs/xattr.c linux-2.6.37.2/fs/xattr.c
---- linux-2.6.37.2/fs/xattr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xattr.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/xattr.c linux-2.6.38.1/fs/xattr.c
+--- linux-2.6.38.1/fs/xattr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xattr.c 2011-03-21 18:31:35.000000000 -0400
@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
* Extended attribute SET operations
*/
mnt_drop_write(f->f_path.mnt);
}
fput(f);
-diff -urNp linux-2.6.37.2/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.37.2/fs/xfs/linux-2.6/xfs_ioctl.c
---- linux-2.6.37.2/fs/xfs/linux-2.6/xfs_ioctl.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xfs/linux-2.6/xfs_ioctl.c 2011-01-17 02:41:02.000000000 -0500
-@@ -127,7 +127,7 @@ xfs_find_handle(
+diff -urNp linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl32.c linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl32.c
+--- linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl32.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl32.c 2011-03-21 18:31:35.000000000 -0400
+@@ -73,6 +73,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.38.1/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl.c
+--- linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xfs/linux-2.6/xfs_ioctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -128,7 +128,7 @@ xfs_find_handle(
}
error = -EFAULT;
copy_to_user(hreq->ohandlen, &hsize, sizeof(__s32)))
goto out_put;
-diff -urNp linux-2.6.37.2/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.37.2/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.37.2/fs/xfs/linux-2.6/xfs_iops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xfs/linux-2.6/xfs_iops.c 2011-01-17 02:41:02.000000000 -0500
-@@ -437,7 +437,7 @@ xfs_vn_put_link(
+@@ -720,6 +720,7 @@ xfs_ioc_fsgeometry(
+ xfs_fsop_geom_t fsgeo;
+ int error;
+
++ memset(&fsgeo, 0, sizeof(fsgeo));
+ error = xfs_fs_geometry(mp, &fsgeo, 4);
+ if (error)
+ return -error;
+diff -urNp linux-2.6.38.1/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.38.1/fs/xfs/linux-2.6/xfs_iops.c
+--- linux-2.6.38.1/fs/xfs/linux-2.6/xfs_iops.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xfs/linux-2.6/xfs_iops.c 2011-03-21 18:31:35.000000000 -0400
+@@ -436,7 +436,7 @@ xfs_vn_put_link(
struct nameidata *nd,
void *p)
{
if (!IS_ERR(s))
kfree(s);
-diff -urNp linux-2.6.37.2/fs/xfs/xfs_bmap.c linux-2.6.37.2/fs/xfs/xfs_bmap.c
---- linux-2.6.37.2/fs/xfs/xfs_bmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xfs/xfs_bmap.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/fs/xfs/xfs_bmap.c linux-2.6.38.1/fs/xfs/xfs_bmap.c
+--- linux-2.6.38.1/fs/xfs/xfs_bmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/fs/xfs/xfs_bmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -287,7 +287,7 @@ xfs_bmap_validate_ret(
int nmap,
int ret_nmap);
#endif /* DEBUG */
STATIC int
-diff -urNp linux-2.6.37.2/fs/xfs/xfs_fsops.c linux-2.6.37.2/fs/xfs/xfs_fsops.c
---- linux-2.6.37.2/fs/xfs/xfs_fsops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/fs/xfs/xfs_fsops.c 2011-02-15 19:43:38.000000000 -0500
-@@ -53,6 +53,9 @@ xfs_fs_geometry(
- xfs_fsop_geom_t *geo,
- int new_version)
- {
-+
-+ memset(geo, 0, sizeof(*geo));
-+
- geo->blocksize = mp->m_sb.sb_blocksize;
- geo->rtextsize = mp->m_sb.sb_rextsize;
- geo->agblocks = mp->m_sb.sb_agblocks;
-diff -urNp linux-2.6.37.2/grsecurity/gracl_alloc.c linux-2.6.37.2/grsecurity/gracl_alloc.c
---- linux-2.6.37.2/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_alloc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/gracl_alloc.c linux-2.6.38.1/grsecurity/gracl_alloc.c
+--- linux-2.6.38.1/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_alloc.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,105 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+ else
+ return 1;
+}
-diff -urNp linux-2.6.37.2/grsecurity/gracl.c linux-2.6.37.2/grsecurity/gracl.c
---- linux-2.6.37.2/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl.c 2011-01-17 20:20:28.000000000 -0500
-@@ -0,0 +1,3991 @@
+diff -urNp linux-2.6.38.1/grsecurity/gracl.c linux-2.6.38.1/grsecurity/gracl.c
+--- linux-2.6.38.1/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl.c 2011-03-26 17:50:26.000000000 -0400
+@@ -0,0 +1,4078 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+ return (gr_status & GR_READY);
+}
+
++#ifdef CONFIG_BTRFS_FS
++extern dev_t get_btrfs_dev_from_inode(struct inode *inode);
++extern int btrfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
++#endif
++
++static inline dev_t __get_dev(const struct dentry *dentry)
++{
++#ifdef CONFIG_BTRFS_FS
++ if (dentry->d_inode->i_op && dentry->d_inode->i_op->getattr == &btrfs_getattr)
++ return get_btrfs_dev_from_inode(dentry->d_inode);
++ else
++#endif
++ return dentry->d_inode->i_sb->s_dev;
++}
++
++dev_t gr_get_dev_from_dentry(struct dentry *dentry)
++{
++ return __get_dev(dentry);
++}
++
+static char gr_task_roletype_to_char(struct task_struct *task)
+{
+ switch (task->role->roletype &
+ }
+ parent = dentry->d_parent;
+ prefetch(parent);
++ spin_lock(&dentry->d_lock);
+ error = prepend_name(buffer, buflen, &dentry->d_name);
++ spin_unlock(&dentry->d_lock);
+ if (!error)
+ error = prepend(buffer, buflen, "/", 1);
+ if (error)
+ return error;
+}
+
-+/* this must be called with vfsmount_lock and dcache_lock held */
++/* this must be called with vfsmount_lock and rename_lock held */
+
+static char *__our_d_path(const struct path *path, struct path *root,
+ char *buf, int buflen)
+ path.mnt = (struct vfsmount *)vfsmnt;
+
+ /* we can't use real_root.dentry, real_root.mnt, because they belong only to the RBAC system */
-+ get_fs_root(reaper->fs, &root);
++ root.dentry = reaper->nsproxy->mnt_ns->root->mnt_root;
++ root.mnt = reaper->nsproxy->mnt_ns->root;
++ path_get(&root);
+
-+ spin_lock(&dcache_lock);
++ write_seqlock(&rename_lock);
+ br_read_lock(vfsmount_lock);
+ res = gen_full_path(&path, &root, buf, buflen);
+ br_read_unlock(vfsmount_lock);
-+ spin_unlock(&dcache_lock);
++ write_sequnlock(&rename_lock);
+
+ path_put(&root);
+ return res;
+gr_to_filename_rbac(const struct dentry *dentry, const struct vfsmount *mnt)
+{
+ char *ret;
-+ spin_lock(&dcache_lock);
++ write_seqlock(&rename_lock);
+ br_read_lock(vfsmount_lock);
+ ret = __d_real_path(dentry, mnt, per_cpu_ptr(gr_shared_page[0],smp_processor_id()),
+ PAGE_SIZE);
+ br_read_unlock(vfsmount_lock);
-+ spin_unlock(&dcache_lock);
++ write_sequnlock(&rename_lock);
+ return ret;
+}
+
+ return 1;
+
+ /* grab reference for the real root dentry and vfsmount */
-+ get_fs_root(reaper->fs, &real_root);
++ real_root.dentry = reaper->nsproxy->mnt_ns->root->mnt_root;
++ real_root.mnt = reaper->nsproxy->mnt_ns->root;
++ path_get(&real_root);
+
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
++ printk(KERN_ALERT "Obtained real root device=%d, inode=%lu\n", __get_dev(real_root.dentry), real_root.dentry->d_inode->i_ino);
++#endif
++
+ fakefs_obj = acl_alloc(sizeof(struct acl_object_label));
+ if (fakefs_obj == NULL)
+ return 1;
+ goto cleanup;
+ }
+ tmp[len-1] = '\0';
-+#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
+ printk(KERN_ALERT "Copying special role %s\n", tmp);
+#endif
+ sptmp->rolename = tmp;
+
+static __inline__ struct acl_object_label *
+full_lookup(const struct dentry *orig_dentry, const struct vfsmount *orig_mnt,
-+ const struct dentry *curr_dentry,
++ struct dentry *curr_dentry,
+ const struct acl_subject_label *subj, char **path, const int checkglob)
+{
+ int newglob = checkglob;
++ ino_t inode;
++ dev_t device;
+
+ /* if we aren't checking a subdirectory of the original path yet, don't do glob checking
+ as we don't want a / * rule to match instead of the / object
+ if (orig_dentry == curr_dentry && newglob != GR_CREATE_GLOB)
+ newglob = GR_NO_GLOB;
+
-+ return __full_lookup(orig_dentry, orig_mnt,
-+ curr_dentry->d_inode->i_ino,
-+ curr_dentry->d_inode->i_sb->s_dev, subj, path, newglob);
++ spin_lock(&curr_dentry->d_lock);
++ inode = curr_dentry->d_inode->i_ino;
++ device = __get_dev(curr_dentry);
++ spin_unlock(&curr_dentry->d_lock);
++
++ return __full_lookup(orig_dentry, orig_mnt, inode, device, subj, path, newglob);
+}
+
+static struct acl_object_label *
+ struct dentry *dentry = (struct dentry *) l_dentry;
+ struct vfsmount *mnt = (struct vfsmount *) l_mnt;
+ struct acl_object_label *retval;
++ struct dentry *parent;
+
-+ spin_lock(&dcache_lock);
++ write_seqlock(&rename_lock);
+ br_read_lock(vfsmount_lock);
+
+ if (unlikely(mnt == shm_mnt || mnt == pipe_mnt || mnt == sock_mnt ||
+ continue;
+ }
+
++ parent = dentry->d_parent;
+ retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path, checkglob);
+ if (retval != NULL)
+ goto out;
+
-+ dentry = dentry->d_parent;
++ dentry = parent;
+ }
+
+ retval = full_lookup(l_dentry, l_mnt, dentry, subj, &path, checkglob);
+
++ /* real_root is pinned so we don't have to hold a reference */
+ if (retval == NULL)
+ retval = full_lookup(l_dentry, l_mnt, real_root.dentry, subj, &path, checkglob);
+out:
+ br_read_unlock(vfsmount_lock);
-+ spin_unlock(&dcache_lock);
++ write_sequnlock(&rename_lock);
+
+ BUG_ON(retval == NULL);
+
+ struct dentry *dentry = (struct dentry *) l_dentry;
+ struct vfsmount *mnt = (struct vfsmount *) l_mnt;
+ struct acl_subject_label *retval;
++ struct dentry *parent;
+
-+ spin_lock(&dcache_lock);
++ write_seqlock(&rename_lock);
+ br_read_lock(vfsmount_lock);
+
+ for (;;) {
+ if (mnt->mnt_parent == mnt)
+ break;
+
++ spin_lock(&dentry->d_lock);
+ read_lock(&gr_inode_lock);
+ retval =
+ lookup_acl_subj_label(dentry->d_inode->i_ino,
-+ dentry->d_inode->i_sb->s_dev, role);
++ __get_dev(dentry), role);
+ read_unlock(&gr_inode_lock);
++ spin_unlock(&dentry->d_lock);
+ if (retval != NULL)
+ goto out;
+
+ continue;
+ }
+
++ spin_lock(&dentry->d_lock);
+ read_lock(&gr_inode_lock);
+ retval = lookup_acl_subj_label(dentry->d_inode->i_ino,
-+ dentry->d_inode->i_sb->s_dev, role);
++ __get_dev(dentry), role);
+ read_unlock(&gr_inode_lock);
++ parent = dentry->d_parent;
++ spin_unlock(&dentry->d_lock);
++
+ if (retval != NULL)
+ goto out;
+
-+ dentry = dentry->d_parent;
++ dentry = parent;
+ }
+
++ spin_lock(&dentry->d_lock);
+ read_lock(&gr_inode_lock);
+ retval = lookup_acl_subj_label(dentry->d_inode->i_ino,
-+ dentry->d_inode->i_sb->s_dev, role);
++ __get_dev(dentry), role);
+ read_unlock(&gr_inode_lock);
++ spin_unlock(&dentry->d_lock);
+
+ if (unlikely(retval == NULL)) {
++ /* real_root is pinned, we don't need to hold a reference */
+ read_lock(&gr_inode_lock);
+ retval = lookup_acl_subj_label(real_root.dentry->d_inode->i_ino,
-+ real_root.dentry->d_inode->i_sb->s_dev, role);
++ __get_dev(real_root.dentry), role);
+ read_unlock(&gr_inode_lock);
+ }
+out:
+ br_read_unlock(vfsmount_lock);
-+ spin_unlock(&dcache_lock);
++ write_sequnlock(&rename_lock);
+
+ BUG_ON(retval == NULL);
+
+ currobj = chk_obj_label(dentry, mnt, curracl);
+ retval = currobj->mode & mode;
+
++ /* if we're opening a specified transfer file for writing
++ (e.g. /dev/initctl), then transfer our role to init
++ */
++ if (unlikely(currobj->mode & GR_INIT_TRANSFER && retval & GR_WRITE &&
++ current->role->roletype & GR_ROLE_PERSIST)) {
++ struct task_struct *task = init_pid_ns.child_reaper;
++
++ if (task->role != current->role) {
++ task->acl_sp_role = 0;
++ task->acl_role_id = current->acl_role_id;
++ task->role = current->role;
++ rcu_read_lock();
++ read_lock(&grsec_exec_file_lock);
++ gr_apply_subject_to_task(task);
++ read_unlock(&grsec_exec_file_lock);
++ rcu_read_unlock();
++ gr_log_noargs(GR_DONT_AUDIT_GOOD, GR_INIT_TRANSFER_MSG);
++ }
++ }
++
+ if (unlikely
+ ((curracl->mode & (GR_LEARN | GR_INHERITLEARN)) && !(mode & GR_NOPTRACE)
+ && (retval != (mode & ~(GR_AUDITS | GR_SUPPRESS))))) {
+ if (unlikely(obj->mode & GR_WRITE))
+ task->is_writable = 1;
+
-+#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
+ printk(KERN_ALERT "Set role label for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
+#endif
+
+
+ gr_set_proc_res(task);
+
-+#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
+ printk(KERN_ALERT "Set subject label for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
+#endif
+ return 0;
+ struct acl_subject_label *subj;
+ struct acl_role_label *role;
+ unsigned int x;
++ ino_t ino = dentry->d_inode->i_ino;
++ dev_t dev = __get_dev(dentry);
+
+ FOR_EACH_ROLE_START(role)
-+ update_acl_subj_label(matchn->inode, matchn->device,
-+ dentry->d_inode->i_ino,
-+ dentry->d_inode->i_sb->s_dev, role);
++ update_acl_subj_label(matchn->inode, matchn->device, ino, dev, role);
+
+ FOR_EACH_NESTED_SUBJECT_START(role, subj)
-+ if ((subj->inode == dentry->d_inode->i_ino) &&
-+ (subj->device == dentry->d_inode->i_sb->s_dev)) {
-+ subj->inode = dentry->d_inode->i_ino;
-+ subj->device = dentry->d_inode->i_sb->s_dev;
++ if ((subj->inode == ino) && (subj->device == dev)) {
++ subj->inode = ino;
++ subj->device = dev;
+ }
+ FOR_EACH_NESTED_SUBJECT_END(subj)
+ FOR_EACH_SUBJECT_START(role, subj, x)
+ update_acl_obj_label(matchn->inode, matchn->device,
-+ dentry->d_inode->i_ino,
-+ dentry->d_inode->i_sb->s_dev, subj);
++ ino, dev, subj);
+ FOR_EACH_SUBJECT_END(subj,x)
+ FOR_EACH_ROLE_END(role)
+
-+ update_inodev_entry(matchn->inode, matchn->device,
-+ dentry->d_inode->i_ino, dentry->d_inode->i_sb->s_dev);
++ update_inodev_entry(matchn->inode, matchn->device, ino, dev);
+
+ return;
+}
+{
+ struct name_entry *matchn;
+ struct inodev_entry *inodev;
++ ino_t old_ino = old_dentry->d_inode->i_ino;
++ dev_t old_dev = __get_dev(old_dentry);
+
+ /* vfs_rename swaps the name and parent link for old_dentry and
+ new_dentry
+
+ write_lock(&gr_inode_lock);
+ if (unlikely(replace && new_dentry->d_inode)) {
-+ inodev = lookup_inodev_entry(new_dentry->d_inode->i_ino,
-+ new_dentry->d_inode->i_sb->s_dev);
++ ino_t new_ino = new_dentry->d_inode->i_ino;
++ dev_t new_dev = __get_dev(new_dentry);
++
++ inodev = lookup_inodev_entry(new_ino, new_dev);
+ if (inodev != NULL && (new_dentry->d_inode->i_nlink <= 1))
-+ do_handle_delete(inodev, new_dentry->d_inode->i_ino,
-+ new_dentry->d_inode->i_sb->s_dev);
++ do_handle_delete(inodev, new_ino, new_dev);
+ }
+
-+ inodev = lookup_inodev_entry(old_dentry->d_inode->i_ino,
-+ old_dentry->d_inode->i_sb->s_dev);
++ inodev = lookup_inodev_entry(old_ino, old_dev);
+ if (inodev != NULL && (old_dentry->d_inode->i_nlink <= 1))
-+ do_handle_delete(inodev, old_dentry->d_inode->i_ino,
-+ old_dentry->d_inode->i_sb->s_dev);
++ do_handle_delete(inodev, old_ino, old_dev);
+
+ if (unlikely((unsigned long)matchn))
+ do_handle_create(matchn, old_dentry, mnt);
+ if (unlikely(obj->mode & GR_WRITE))
+ tsk->is_writable = 1;
+
-+#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
+ printk(KERN_ALERT "Assigning special role:%s subject:%s to process (%s:%d)\n", tsk->role->rolename, tsk->acl->filename, tsk->comm, tsk->pid);
+#endif
+
+ return error;
+}
+
++/* must be called with
++ rcu_read_lock();
++ read_lock(&tasklist_lock);
++ read_lock(&grsec_exec_file_lock);
++*/
++int gr_apply_subject_to_task(struct task_struct *task)
++{
++ struct acl_object_label *obj;
++ char *tmpname;
++ struct acl_subject_label *tmpsubj;
++ struct file *filp;
++ struct name_entry *nmatch;
++
++ filp = task->exec_file;
++ if (filp == NULL)
++ return 0;
++
++ /* the following is to apply the correct subject
++ on binaries running when the RBAC system
++ is enabled, when the binaries have been
++ replaced or deleted since their execution
++ -----
++ when the RBAC system starts, the inode/dev
++ from exec_file will be one the RBAC system
++ is unaware of. It only knows the inode/dev
++ of the present file on disk, or the absence
++ of it.
++ */
++ preempt_disable();
++ tmpname = gr_to_filename_rbac(filp->f_path.dentry, filp->f_path.mnt);
++
++ nmatch = lookup_name_entry(tmpname);
++ preempt_enable();
++ tmpsubj = NULL;
++ if (nmatch) {
++ if (nmatch->deleted)
++ tmpsubj = lookup_acl_subj_label_deleted(nmatch->inode, nmatch->device, task->role);
++ else
++ tmpsubj = lookup_acl_subj_label(nmatch->inode, nmatch->device, task->role);
++ if (tmpsubj != NULL)
++ task->acl = tmpsubj;
++ }
++ if (tmpsubj == NULL)
++ task->acl = chk_subj_label(filp->f_path.dentry, filp->f_path.mnt,
++ task->role);
++ if (task->acl) {
++ struct acl_subject_label *curr;
++ curr = task->acl;
++
++ task->is_writable = 0;
++ /* ignore additional mmap checks for processes that are writable
++ by the default ACL */
++ obj = chk_obj_label(filp->f_path.dentry, filp->f_path.mnt, default_role->root_label);
++ if (unlikely(obj->mode & GR_WRITE))
++ task->is_writable = 1;
++ obj = chk_obj_label(filp->f_path.dentry, filp->f_path.mnt, task->role->root_label);
++ if (unlikely(obj->mode & GR_WRITE))
++ task->is_writable = 1;
++
++ gr_set_proc_res(task);
++
++#ifdef CONFIG_GRKERNSEC_RBAC_DEBUG
++ printk(KERN_ALERT "gr_set_acls for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
++#endif
++ } else {
++ return 1;
++ }
++
++ return 0;
++}
++
+int
+gr_set_acls(const int type)
+{
-+ struct acl_object_label *obj;
+ struct task_struct *task, *task2;
-+ struct file *filp;
+ struct acl_role_label *role = current->role;
+ __u16 acl_role_id = current->acl_role_id;
+ const struct cred *cred;
-+ char *tmpname;
-+ struct name_entry *nmatch;
-+ struct acl_subject_label *tmpsubj;
++ int ret;
+
+ rcu_read_lock();
+ read_lock(&tasklist_lock);
+ task->acl_role_id = 0;
+ task->acl_sp_role = 0;
+
-+ if ((filp = task->exec_file)) {
++ if (task->exec_file) {
+ cred = __task_cred(task);
+ task->role = lookup_acl_role_label(task, cred->uid, cred->gid);
-+
-+ /* the following is to apply the correct subject
-+ on binaries running when the RBAC system
-+ is enabled, when the binaries have been
-+ replaced or deleted since their execution
-+ -----
-+ when the RBAC system starts, the inode/dev
-+ from exec_file will be one the RBAC system
-+ is unaware of. It only knows the inode/dev
-+ of the present file on disk, or the absence
-+ of it.
-+ */
-+ preempt_disable();
-+ tmpname = gr_to_filename_rbac(filp->f_path.dentry, filp->f_path.mnt);
-+
-+ nmatch = lookup_name_entry(tmpname);
-+ preempt_enable();
-+ tmpsubj = NULL;
-+ if (nmatch) {
-+ if (nmatch->deleted)
-+ tmpsubj = lookup_acl_subj_label_deleted(nmatch->inode, nmatch->device, task->role);
-+ else
-+ tmpsubj = lookup_acl_subj_label(nmatch->inode, nmatch->device, task->role);
-+ if (tmpsubj != NULL)
-+ task->acl = tmpsubj;
-+ }
-+ if (tmpsubj == NULL)
-+ task->acl = chk_subj_label(filp->f_path.dentry, filp->f_path.mnt,
-+ task->role);
-+ if (task->acl) {
-+ struct acl_subject_label *curr;
-+ curr = task->acl;
-+
-+ task->is_writable = 0;
-+ /* ignore additional mmap checks for processes that are writable
-+ by the default ACL */
-+ obj = chk_obj_label(filp->f_path.dentry, filp->f_path.mnt, default_role->root_label);
-+ if (unlikely(obj->mode & GR_WRITE))
-+ task->is_writable = 1;
-+ obj = chk_obj_label(filp->f_path.dentry, filp->f_path.mnt, task->role->root_label);
-+ if (unlikely(obj->mode & GR_WRITE))
-+ task->is_writable = 1;
-+
-+ gr_set_proc_res(task);
-+
-+#ifdef CONFIG_GRKERNSEC_ACL_DEBUG
-+ printk(KERN_ALERT "gr_set_acls for (%s:%d): role:%s, subject:%s\n", task->comm, task->pid, task->role->rolename, task->acl->filename);
-+#endif
-+ } else {
++ ret = gr_apply_subject_to_task(task);
++ if (ret) {
+ read_unlock(&grsec_exec_file_lock);
+ read_unlock(&tasklist_lock);
+ rcu_read_unlock();
+ gr_log_str_int(GR_DONT_AUDIT_GOOD, GR_DEFACL_MSG, task->comm, task->pid);
-+ return 1;
++ return ret;
+ }
+ } else {
+ // it's a kernel process
+ unsigned int bufsize;
+ int is_not_root;
+ char *path;
++ dev_t dev = __get_dev(dentry);
+
+ if (unlikely(!(gr_status & GR_READY)))
+ return 1;
+
+ subj = task->acl;
+ do {
-+ obj = lookup_acl_obj_label(ino, dentry->d_inode->i_sb->s_dev, subj);
++ obj = lookup_acl_obj_label(ino, dev, subj);
+ if (obj != NULL)
+ return (obj->mode & GR_FIND) ? 1 : 0;
+ } while ((subj = subj->parent_subject));
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
+
-diff -urNp linux-2.6.37.2/grsecurity/gracl_cap.c linux-2.6.37.2/grsecurity/gracl_cap.c
---- linux-2.6.37.2/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_cap.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,138 @@
+diff -urNp linux-2.6.38.1/grsecurity/gracl_cap.c linux-2.6.38.1/grsecurity/gracl_cap.c
+--- linux-2.6.38.1/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_cap.c 2011-03-21 20:22:36.000000000 -0400
+@@ -0,0 +1,139 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+ "CAP_AUDIT_CONTROL",
+ "CAP_SETFCAP",
+ "CAP_MAC_OVERRIDE",
-+ "CAP_MAC_ADMIN"
++ "CAP_MAC_ADMIN",
++ "CAP_SYSLOG"
+};
+
+EXPORT_SYMBOL(gr_is_capable);
+ return 0;
+}
+
-diff -urNp linux-2.6.37.2/grsecurity/gracl_fs.c linux-2.6.37.2/grsecurity/gracl_fs.c
---- linux-2.6.37.2/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_fs.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,430 @@
+diff -urNp linux-2.6.38.1/grsecurity/gracl_fs.c linux-2.6.38.1/grsecurity/gracl_fs.c
+--- linux-2.6.38.1/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_fs.c 2011-03-26 14:32:42.000000000 -0400
+@@ -0,0 +1,431 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+ reqmode |= GR_WRITE;
+ if (likely((fmode & FMODE_READ) && !(fmode & O_DIRECTORY)))
+ reqmode |= GR_READ;
-+ if ((fmode & FMODE_GREXEC) && (fmode & FMODE_EXEC))
++ if ((fmode & FMODE_GREXEC) && (fmode & __FMODE_EXEC))
+ reqmode &= ~GR_READ;
+ mode =
+ gr_search_file(dentry, reqmode | to_gr_audit(reqmode) | GR_SUPPRESS,
+ char *rolename;
+ struct file *exec_file;
+
-+ if (unlikely(current->acl_sp_role && gr_acl_is_enabled())) {
++ if (unlikely(current->acl_sp_role && gr_acl_is_enabled() &&
++ !(current->role->roletype & GR_ROLE_PERSIST))) {
+ id = current->acl_role_id;
+ rolename = current->role->rolename;
+ gr_set_acls(1);
+
+ return 0;
+}
-diff -urNp linux-2.6.37.2/grsecurity/gracl_ip.c linux-2.6.37.2/grsecurity/gracl_ip.c
---- linux-2.6.37.2/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_ip.c 2011-02-15 19:42:06.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/gracl_ip.c linux-2.6.38.1/grsecurity/gracl_ip.c
+--- linux-2.6.38.1/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_ip.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,382 @@
+#include <linux/kernel.h>
+#include <asm/uaccess.h>
+
+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
+}
-diff -urNp linux-2.6.37.2/grsecurity/gracl_learn.c linux-2.6.37.2/grsecurity/gracl_learn.c
---- linux-2.6.37.2/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_learn.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/gracl_learn.c linux-2.6.38.1/grsecurity/gracl_learn.c
+--- linux-2.6.38.1/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_learn.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,211 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+ .release = close_learn,
+ .poll = poll_learn,
+};
-diff -urNp linux-2.6.37.2/grsecurity/gracl_res.c linux-2.6.37.2/grsecurity/gracl_res.c
---- linux-2.6.37.2/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_res.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/gracl_res.c linux-2.6.38.1/grsecurity/gracl_res.c
+--- linux-2.6.38.1/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_res.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,68 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ rcu_read_unlock();
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/gracl_segv.c linux-2.6.37.2/grsecurity/gracl_segv.c
---- linux-2.6.37.2/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_segv.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,310 @@
+diff -urNp linux-2.6.38.1/grsecurity/gracl_segv.c linux-2.6.38.1/grsecurity/gracl_segv.c
+--- linux-2.6.38.1/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_segv.c 2011-03-24 23:09:37.000000000 -0400
+@@ -0,0 +1,326 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <asm/uaccess.h>
+ struct acl_role_label *role);
+extern int specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t);
+
++
++#ifdef CONFIG_BTRFS_FS
++extern dev_t get_btrfs_dev_from_inode(struct inode *inode);
++extern int btrfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
++#endif
++
++static inline dev_t __get_dev(const struct dentry *dentry)
++{
++#ifdef CONFIG_BTRFS_FS
++ if (dentry->d_inode->i_op && dentry->d_inode->i_op->getattr == &btrfs_getattr)
++ return get_btrfs_dev_from_inode(dentry->d_inode);
++ else
++#endif
++ return dentry->d_inode->i_sb->s_dev;
++}
++
+int
+gr_init_uidset(void)
+{
+
+ read_lock(&gr_inode_lock);
+ curr = lookup_acl_subj_label(filp->f_path.dentry->d_inode->i_ino,
-+ filp->f_path.dentry->d_inode->i_sb->s_dev,
++ __get_dev(filp->f_path.dentry),
+ current->role);
+ read_unlock(&gr_inode_lock);
+
+
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/gracl_shm.c linux-2.6.37.2/grsecurity/gracl_shm.c
---- linux-2.6.37.2/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/gracl_shm.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/gracl_shm.c linux-2.6.38.1/grsecurity/gracl_shm.c
+--- linux-2.6.38.1/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/gracl_shm.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,40 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+
+ return 1;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_chdir.c linux-2.6.37.2/grsecurity/grsec_chdir.c
---- linux-2.6.37.2/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_chdir.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_chdir.c linux-2.6.38.1/grsecurity/grsec_chdir.c
+--- linux-2.6.38.1/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_chdir.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_chroot.c linux-2.6.37.2/grsecurity/grsec_chroot.c
---- linux-2.6.37.2/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_chroot.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,373 @@
+diff -urNp linux-2.6.38.1/grsecurity/grsec_chroot.c linux-2.6.38.1/grsecurity/grsec_chroot.c
+--- linux-2.6.38.1/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_chroot.c 2011-03-21 21:24:10.000000000 -0400
+@@ -0,0 +1,351 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#if defined(CONFIG_GRKERNSEC_CHROOT_DOUBLE) || defined(CONFIG_GRKERNSEC_CHROOT_FCHDIR)
+int gr_is_outside_chroot(const struct dentry *u_dentry, const struct vfsmount *u_mnt)
+{
-+ struct dentry *dentry = (struct dentry *)u_dentry;
-+ struct vfsmount *mnt = (struct vfsmount *)u_mnt;
-+ struct path realroot, currentroot;
-+ struct task_struct *reaper = &init_task;
-+ int ret = 1;
++ struct path path, currentroot;
++ int ret = 0;
+
-+ get_fs_root(reaper->fs, &realroot);
++ path.dentry = (struct dentry *)u_dentry;
++ path.mnt = (struct vfsmount *)u_mnt;
+ get_fs_root(current->fs, ¤troot);
-+
-+ spin_lock(&dcache_lock);
-+ for (;;) {
-+ if (unlikely((dentry == realroot.dentry && mnt == realroot.mnt)
-+ || (dentry == currentroot.dentry && mnt == currentroot.mnt)))
-+ break;
-+ if (unlikely(dentry == mnt->mnt_root || IS_ROOT(dentry))) {
-+ if (mnt->mnt_parent == mnt)
-+ break;
-+ dentry = mnt->mnt_mountpoint;
-+ mnt = mnt->mnt_parent;
-+ continue;
-+ }
-+ dentry = dentry->d_parent;
-+ }
-+ spin_unlock(&dcache_lock);
-+
++ if (path_is_under(&path, ¤troot))
++ ret = 1;
+ path_put(¤troot);
+
-+ /* access is outside of chroot */
-+ if (dentry == realroot.dentry && mnt == realroot.mnt)
-+ ret = 0;
-+
-+ path_put(&realroot);
+ return ret;
+}
+#endif
+#ifdef CONFIG_SECURITY
+EXPORT_SYMBOL(gr_handle_chroot_caps);
+#endif
-diff -urNp linux-2.6.37.2/grsecurity/grsec_disabled.c linux-2.6.37.2/grsecurity/grsec_disabled.c
---- linux-2.6.37.2/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_disabled.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,442 @@
+diff -urNp linux-2.6.38.1/grsecurity/grsec_disabled.c linux-2.6.38.1/grsecurity/grsec_disabled.c
+--- linux-2.6.38.1/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_disabled.c 2011-03-25 18:57:41.000000000 -0400
+@@ -0,0 +1,447 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+ return 0;
+}
+
++dev_t gr_get_dev_from_dentry(struct dentry *dentry)
++{
++ return dentry->d_inode->i_sb->s_dev;
++}
++
+EXPORT_SYMBOL(gr_is_capable);
+EXPORT_SYMBOL(gr_is_capable_nolog);
+EXPORT_SYMBOL(gr_learn_resource);
+EXPORT_SYMBOL(gr_check_user_change);
+EXPORT_SYMBOL(gr_check_group_change);
+#endif
-diff -urNp linux-2.6.37.2/grsecurity/grsec_exec.c linux-2.6.37.2/grsecurity/grsec_exec.c
---- linux-2.6.37.2/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_exec.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_exec.c linux-2.6.38.1/grsecurity/grsec_exec.c
+--- linux-2.6.38.1/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_exec.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,147 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ return;
+}
+#endif
-diff -urNp linux-2.6.37.2/grsecurity/grsec_fifo.c linux-2.6.37.2/grsecurity/grsec_fifo.c
---- linux-2.6.37.2/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_fifo.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_fifo.c linux-2.6.38.1/grsecurity/grsec_fifo.c
+--- linux-2.6.38.1/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_fifo.c 2011-03-21 20:33:29.000000000 -0400
@@ -0,0 +1,24 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ !(flag & O_EXCL) && (dir->d_inode->i_mode & S_ISVTX) &&
+ (dentry->d_inode->i_uid != dir->d_inode->i_uid) &&
+ (cred->fsuid != dentry->d_inode->i_uid)) {
-+ if (!generic_permission(dentry->d_inode, acc_mode, NULL))
++ if (!inode_permission(dentry->d_inode, acc_mode))
+ gr_log_fs_int2(GR_DONT_AUDIT, GR_FIFO_MSG, dentry, mnt, dentry->d_inode->i_uid, dentry->d_inode->i_gid);
+ return -EACCES;
+ }
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_fork.c linux-2.6.37.2/grsecurity/grsec_fork.c
---- linux-2.6.37.2/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_fork.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_fork.c linux-2.6.38.1/grsecurity/grsec_fork.c
+--- linux-2.6.38.1/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_fork.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,23 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_init.c linux-2.6.37.2/grsecurity/grsec_init.c
---- linux-2.6.37.2/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_init.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_init.c linux-2.6.38.1/grsecurity/grsec_init.c
+--- linux-2.6.38.1/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_init.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,270 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_link.c linux-2.6.37.2/grsecurity/grsec_link.c
---- linux-2.6.37.2/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_link.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_link.c linux-2.6.38.1/grsecurity/grsec_link.c
+--- linux-2.6.38.1/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_link.c 2011-03-21 20:34:41.000000000 -0400
@@ -0,0 +1,43 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ if (grsec_enable_link && cred->fsuid != inode->i_uid &&
+ (!S_ISREG(mode) || (mode & S_ISUID) ||
+ ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) ||
-+ (generic_permission(inode, MAY_READ | MAY_WRITE, NULL))) &&
++ (inode_permission(inode, MAY_READ | MAY_WRITE))) &&
+ !capable(CAP_FOWNER) && cred->uid) {
+ gr_log_fs_int2_str(GR_DONT_AUDIT, GR_HARDLINK_MSG, dentry, mnt, inode->i_uid, inode->i_gid, to);
+ return -EPERM;
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_log.c linux-2.6.37.2/grsecurity/grsec_log.c
---- linux-2.6.37.2/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_log.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_log.c linux-2.6.38.1/grsecurity/grsec_log.c
+--- linux-2.6.38.1/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_log.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,310 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ gr_log_end(audit);
+ END_LOCKS(audit);
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_mem.c linux-2.6.37.2/grsecurity/grsec_mem.c
---- linux-2.6.37.2/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_mem.c 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,85 @@
+diff -urNp linux-2.6.38.1/grsecurity/grsec_mem.c linux-2.6.38.1/grsecurity/grsec_mem.c
+--- linux-2.6.38.1/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_mem.c 2011-03-26 14:40:33.000000000 -0400
+@@ -0,0 +1,100 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+ return -EPERM;
+ }
+
++/* if raw i/o is disabled, prevent writes to /dev/mem entirely */
++#ifndef CONFIG_GRKERNSEC_IO
+ /* allowed ranges : ISA I/O BIOS */
+ if ((start >= __pa(high_memory))
+#if defined(CONFIG_X86) || defined(CONFIG_PPC)
+#endif
+ )
+ return 0;
++#endif
+
+ if (vma->vm_flags & VM_WRITE) {
+ gr_log_noargs(GR_DONT_AUDIT, GR_MEM_MMAP_MSG);
+void
+gr_log_nonroot_mod_load(const char *modname)
+{
-+ gr_log_str(GR_DONT_AUDIT, GR_NONROOT_MODLOAD_MSG, modname);
++ if (1
++#if !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
++ /* There are known knowns. These are things we know
++ that we know. There are known unknowns. That is to say,
++ there are things that we know we don't know. But there are
++ also unknown unknowns. There are things we don't know
++ we don't know.
++ This here is a known unknown.
++ */
++ && strcmp(modname, "net-pf-10")
++#endif
++ )
++ gr_log_str(GR_DONT_AUDIT, GR_NONROOT_MODLOAD_MSG, modname);
+ return;
+}
+
+ gr_log_noargs(GR_DONT_AUDIT, GR_VM86_MSG);
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_mount.c linux-2.6.37.2/grsecurity/grsec_mount.c
---- linux-2.6.37.2/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_mount.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_mount.c linux-2.6.38.1/grsecurity/grsec_mount.c
+--- linux-2.6.38.1/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_mount.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,62 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return 0;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_pax.c linux-2.6.37.2/grsecurity/grsec_pax.c
---- linux-2.6.37.2/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_pax.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_pax.c linux-2.6.38.1/grsecurity/grsec_pax.c
+--- linux-2.6.38.1/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_pax.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,36 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_ptrace.c linux-2.6.37.2/grsecurity/grsec_ptrace.c
---- linux-2.6.37.2/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_ptrace.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_ptrace.c linux-2.6.38.1/grsecurity/grsec_ptrace.c
+--- linux-2.6.38.1/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_ptrace.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,14 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_sig.c linux-2.6.37.2/grsecurity/grsec_sig.c
---- linux-2.6.37.2/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_sig.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_sig.c linux-2.6.38.1/grsecurity/grsec_sig.c
+--- linux-2.6.38.1/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_sig.c 2011-03-26 19:58:27.000000000 -0400
@@ -0,0 +1,65 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ return;
+}
+
-diff -urNp linux-2.6.37.2/grsecurity/grsec_sock.c linux-2.6.37.2/grsecurity/grsec_sock.c
---- linux-2.6.37.2/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_sock.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_sock.c linux-2.6.38.1/grsecurity/grsec_sock.c
+--- linux-2.6.38.1/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_sock.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,275 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+ return current_cap();
+#endif
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsec_sysctl.c linux-2.6.37.2/grsecurity/grsec_sysctl.c
---- linux-2.6.37.2/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_sysctl.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_sysctl.c linux-2.6.38.1/grsecurity/grsec_sysctl.c
+--- linux-2.6.38.1/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_sysctl.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,433 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+ { }
+};
+#endif
-diff -urNp linux-2.6.37.2/grsecurity/grsec_time.c linux-2.6.37.2/grsecurity/grsec_time.c
---- linux-2.6.37.2/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_time.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_time.c linux-2.6.38.1/grsecurity/grsec_time.c
+--- linux-2.6.38.1/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_time.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
+
+EXPORT_SYMBOL(gr_log_timechange);
-diff -urNp linux-2.6.37.2/grsecurity/grsec_tpe.c linux-2.6.37.2/grsecurity/grsec_tpe.c
---- linux-2.6.37.2/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsec_tpe.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsec_tpe.c linux-2.6.38.1/grsecurity/grsec_tpe.c
+--- linux-2.6.38.1/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsec_tpe.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,39 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#endif
+ return 1;
+}
-diff -urNp linux-2.6.37.2/grsecurity/grsum.c linux-2.6.37.2/grsecurity/grsum.c
---- linux-2.6.37.2/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/grsum.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/grsum.c linux-2.6.38.1/grsecurity/grsum.c
+--- linux-2.6.38.1/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/grsum.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,61 @@
+#include <linux/err.h>
+#include <linux/kernel.h>
+
+ return retval;
+}
-diff -urNp linux-2.6.37.2/grsecurity/Kconfig linux-2.6.37.2/grsecurity/Kconfig
---- linux-2.6.37.2/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/Kconfig 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,1000 @@
+diff -urNp linux-2.6.38.1/grsecurity/Kconfig linux-2.6.38.1/grsecurity/Kconfig
+--- linux-2.6.38.1/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/Kconfig 2011-03-26 19:54:37.000000000 -0400
+@@ -0,0 +1,1020 @@
+#
+# grecurity configuration
+#
+ 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
+ - Hardening of module auto-loading
+ - Ptrace restrictions
+ - Restricted vm86 mode
++ - Restricted sysfs/debugfs
+
+config GRKERNSEC_CUSTOM
+ bool "Custom"
+menu "Role Based Access Control Options"
+depends on GRKERNSEC
+
++config GRKERNSEC_RBAC_DEBUG
++ bool
++
+config GRKERNSEC_NO_RBAC
+ bool "Disable RBAC system"
+ help
+ 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 (i.e. /tmp), unless the owner of the
++ 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.
+ 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 (i.e. /tmp), unless the owner of
++ 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
+endmenu
+
+endmenu
-diff -urNp linux-2.6.37.2/grsecurity/Makefile linux-2.6.37.2/grsecurity/Makefile
---- linux-2.6.37.2/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/grsecurity/Makefile 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/grsecurity/Makefile linux-2.6.38.1/grsecurity/Makefile
+--- linux-2.6.38.1/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/grsecurity/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,29 @@
+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
+# during 2001-2009 it has been completely redesigned by Brad Spengler
+ @-chmod -f 700 .
+ @echo ' grsec: protected kernel image paths'
+endif
-diff -urNp linux-2.6.37.2/include/acpi/acoutput.h linux-2.6.37.2/include/acpi/acoutput.h
---- linux-2.6.37.2/include/acpi/acoutput.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/acpi/acoutput.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/acpi/acoutput.h linux-2.6.38.1/include/acpi/acoutput.h
+--- linux-2.6.38.1/include/acpi/acoutput.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/acpi/acoutput.h 2011-03-21 18:31:35.000000000 -0400
@@ -269,8 +269,8 @@
* leaving no executable debug code!
*/
#endif /* ACPI_DEBUG_OUTPUT */
-diff -urNp linux-2.6.37.2/include/acpi/acpi_drivers.h linux-2.6.37.2/include/acpi/acpi_drivers.h
---- linux-2.6.37.2/include/acpi/acpi_drivers.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/acpi/acpi_drivers.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/acpi/acpi_drivers.h linux-2.6.38.1/include/acpi/acpi_drivers.h
+--- linux-2.6.38.1/include/acpi/acpi_drivers.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/acpi/acpi_drivers.h 2011-03-21 18:31:35.000000000 -0400
@@ -119,8 +119,8 @@ void pci_acpi_crs_quirks(void);
Dock Station
-------------------------------------------------------------------------- */
void *context)
{
return -ENODEV;
-diff -urNp linux-2.6.37.2/include/asm-generic/atomic-long.h linux-2.6.37.2/include/asm-generic/atomic-long.h
---- linux-2.6.37.2/include/asm-generic/atomic-long.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/atomic-long.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/atomic-long.h linux-2.6.38.1/include/asm-generic/atomic-long.h
+--- linux-2.6.38.1/include/asm-generic/atomic-long.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/atomic-long.h 2011-03-21 18:31:35.000000000 -0400
@@ -22,6 +22,12 @@
typedef atomic64_t atomic_long_t;
+#endif
+
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */
-diff -urNp linux-2.6.37.2/include/asm-generic/dma-mapping-common.h linux-2.6.37.2/include/asm-generic/dma-mapping-common.h
---- linux-2.6.37.2/include/asm-generic/dma-mapping-common.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/dma-mapping-common.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/dma-mapping-common.h linux-2.6.38.1/include/asm-generic/dma-mapping-common.h
+--- linux-2.6.38.1/include/asm-generic/dma-mapping-common.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/dma-mapping-common.h 2011-03-21 18:31:35.000000000 -0400
@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_
enum dma_data_direction dir,
struct dma_attrs *attrs)
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_sg_for_device)
-diff -urNp linux-2.6.37.2/include/asm-generic/futex.h linux-2.6.37.2/include/asm-generic/futex.h
---- linux-2.6.37.2/include/asm-generic/futex.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/futex.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/futex.h linux-2.6.38.1/include/asm-generic/futex.h
+--- linux-2.6.38.1/include/asm-generic/futex.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/futex.h 2011-03-21 18:31:35.000000000 -0400
@@ -6,7 +6,7 @@
#include <asm/errno.h>
{
return -ENOSYS;
}
-diff -urNp linux-2.6.37.2/include/asm-generic/int-l64.h linux-2.6.37.2/include/asm-generic/int-l64.h
---- linux-2.6.37.2/include/asm-generic/int-l64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/int-l64.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/int-l64.h linux-2.6.38.1/include/asm-generic/int-l64.h
+--- linux-2.6.38.1/include/asm-generic/int-l64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/int-l64.h 2011-03-21 18:31:35.000000000 -0400
@@ -46,6 +46,8 @@ typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u64;
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.37.2/include/asm-generic/int-ll64.h linux-2.6.37.2/include/asm-generic/int-ll64.h
---- linux-2.6.37.2/include/asm-generic/int-ll64.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/int-ll64.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/int-ll64.h linux-2.6.38.1/include/asm-generic/int-ll64.h
+--- linux-2.6.38.1/include/asm-generic/int-ll64.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/int-ll64.h 2011-03-21 18:31:35.000000000 -0400
@@ -51,6 +51,8 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
#define S8_C(x) x
#define U8_C(x) x ## U
#define S16_C(x) x
-diff -urNp linux-2.6.37.2/include/asm-generic/kmap_types.h linux-2.6.37.2/include/asm-generic/kmap_types.h
---- linux-2.6.37.2/include/asm-generic/kmap_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/kmap_types.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/kmap_types.h linux-2.6.38.1/include/asm-generic/kmap_types.h
+--- linux-2.6.38.1/include/asm-generic/kmap_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/kmap_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -29,10 +29,11 @@ KMAP_D(16) KM_IRQ_PTE,
KMAP_D(17) KM_NMI,
KMAP_D(18) KM_NMI_PTE,
};
#undef KMAP_D
-diff -urNp linux-2.6.37.2/include/asm-generic/pgtable.h linux-2.6.37.2/include/asm-generic/pgtable.h
---- linux-2.6.37.2/include/asm-generic/pgtable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/pgtable.h 2011-01-17 02:41:02.000000000 -0500
-@@ -348,6 +348,14 @@ extern void untrack_pfn_vma(struct vm_ar
- unsigned long size);
+diff -urNp linux-2.6.38.1/include/asm-generic/pgtable.h linux-2.6.38.1/include/asm-generic/pgtable.h
+--- linux-2.6.38.1/include/asm-generic/pgtable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/pgtable.h 2011-03-21 18:31:35.000000000 -0400
+@@ -447,6 +447,14 @@ static inline int pmd_write(pmd_t pmd)
+ #endif /* __HAVE_ARCH_PMD_WRITE */
#endif
+#ifndef __HAVE_ARCH_PAX_OPEN_KERNEL
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_GENERIC_PGTABLE_H */
-diff -urNp linux-2.6.37.2/include/asm-generic/pgtable-nopmd.h linux-2.6.37.2/include/asm-generic/pgtable-nopmd.h
---- linux-2.6.37.2/include/asm-generic/pgtable-nopmd.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/pgtable-nopmd.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/pgtable-nopmd.h linux-2.6.38.1/include/asm-generic/pgtable-nopmd.h
+--- linux-2.6.38.1/include/asm-generic/pgtable-nopmd.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/pgtable-nopmd.h 2011-03-21 18:31:35.000000000 -0400
@@ -1,14 +1,19 @@
#ifndef _PGTABLE_NOPMD_H
#define _PGTABLE_NOPMD_H
/*
* 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.37.2/include/asm-generic/pgtable-nopud.h linux-2.6.37.2/include/asm-generic/pgtable-nopud.h
---- linux-2.6.37.2/include/asm-generic/pgtable-nopud.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/pgtable-nopud.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/asm-generic/pgtable-nopud.h linux-2.6.38.1/include/asm-generic/pgtable-nopud.h
+--- linux-2.6.38.1/include/asm-generic/pgtable-nopud.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/pgtable-nopud.h 2011-03-21 18:31:35.000000000 -0400
@@ -1,10 +1,15 @@
#ifndef _PGTABLE_NOPUD_H
#define _PGTABLE_NOPUD_H
/*
* 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.37.2/include/asm-generic/vmlinux.lds.h linux-2.6.37.2/include/asm-generic/vmlinux.lds.h
---- linux-2.6.37.2/include/asm-generic/vmlinux.lds.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/asm-generic/vmlinux.lds.h 2011-01-17 02:41:02.000000000 -0500
-@@ -210,6 +210,7 @@
+diff -urNp linux-2.6.38.1/include/asm-generic/vmlinux.lds.h linux-2.6.38.1/include/asm-generic/vmlinux.lds.h
+--- linux-2.6.38.1/include/asm-generic/vmlinux.lds.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/asm-generic/vmlinux.lds.h 2011-03-21 18:31:35.000000000 -0400
+@@ -213,6 +213,7 @@
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
*(.rodata) *(.rodata.*) \
+ *(.data..read_only) \
*(__vermagic) /* Kernel version magic */ \
- *(__markers_strings) /* Markers: strings */ \
- *(__tracepoints_strings)/* Tracepoints: strings */ \
-@@ -679,14 +680,15 @@
+ . = ALIGN(8); \
+ VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \
+@@ -696,14 +697,15 @@
* section in the linker script will go there too. @phdr should have
* a leading colon.
*
VMLINUX_SYMBOL(__per_cpu_start) = .; \
*(.data..percpu..first) \
. = ALIGN(PAGE_SIZE); \
-@@ -696,7 +698,7 @@
+@@ -713,7 +715,7 @@
*(.data..percpu..shared_aligned) \
VMLINUX_SYMBOL(__per_cpu_end) = .; \
} phdr \
/**
* PERCPU - define output section for percpu area, simple version
-diff -urNp linux-2.6.37.2/include/drm/drm_pciids.h linux-2.6.37.2/include/drm/drm_pciids.h
---- linux-2.6.37.2/include/drm/drm_pciids.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/drm/drm_pciids.h 2011-02-22 16:05:42.000000000 -0500
-@@ -418,7 +418,7 @@
- {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+diff -urNp linux-2.6.38.1/include/drm/drm_pciids.h linux-2.6.38.1/include/drm/drm_pciids.h
+--- linux-2.6.38.1/include/drm/drm_pciids.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/drm/drm_pciids.h 2011-03-21 18:31:35.000000000 -0400
+@@ -458,7 +458,7 @@
+ {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+ {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
+ {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
- {0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
#define r128_PCI_IDS \
{0x1002, 0x4c45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -458,14 +458,14 @@
+@@ -498,14 +498,14 @@
{0x1002, 0x5446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x544C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x5452, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
#define mach64_PCI_IDS \
{0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -488,7 +488,7 @@
+@@ -528,7 +528,7 @@
{0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
#define sisdrv_PCI_IDS \
{0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -499,7 +499,7 @@
+@@ -539,7 +539,7 @@
{0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x18CA, 0x0040, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
{0x18CA, 0x0042, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
#define tdfx_PCI_IDS \
{0x121a, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -508,7 +508,7 @@
+@@ -548,7 +548,7 @@
{0x121a, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x121a, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x121a, 0x000b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
#define viadrv_PCI_IDS \
{0x1106, 0x3022, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -520,14 +520,14 @@
+@@ -560,14 +560,14 @@
{0x1106, 0x3343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1106, 0x3230, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_DX9_0}, \
{0x1106, 0x3157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_PRO_GROUP_A}, \
#define i830_PCI_IDS \
{0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
-@@ -535,11 +535,11 @@
+@@ -575,11 +575,11 @@
{0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x8086, 0x358e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
#define savage_PCI_IDS \
{0x5333, 0x8a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \
-@@ -565,10 +565,10 @@
+@@ -605,10 +605,10 @@
{0x5333, 0x8d02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_TWISTER}, \
{0x5333, 0x8d03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
{0x5333, 0x8d04, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
#define i915_PCI_IDS \
{0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
-@@ -602,4 +602,4 @@
+@@ -642,4 +642,4 @@
{0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
{0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
{0x8086, 0x0102, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
- {0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
-diff -urNp linux-2.6.37.2/include/drm/drmP.h linux-2.6.37.2/include/drm/drmP.h
---- linux-2.6.37.2/include/drm/drmP.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/drm/drmP.h 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/include/drm/drmP.h linux-2.6.38.1/include/drm/drmP.h
+--- linux-2.6.38.1/include/drm/drmP.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/drm/drmP.h 2011-03-21 18:31:35.000000000 -0400
@@ -73,6 +73,7 @@
#include <linux/workqueue.h>
#include <linux/poll.h>
#include "drm.h"
#include <linux/idr.h>
-@@ -804,7 +805,7 @@ struct drm_driver {
+@@ -881,7 +882,7 @@ struct drm_driver {
void (*vgaarb_irq)(struct drm_device *dev, bool state);
/* Driver private ops for this object */
int major;
int minor;
-@@ -817,7 +818,7 @@ struct drm_driver {
+@@ -894,7 +895,7 @@ struct drm_driver {
int dev_priv_size;
struct drm_ioctl_desc *ioctls;
int num_ioctls;
struct pci_driver pci_driver;
struct platform_device *platform_device;
/* List of devices hanging off this driver */
-@@ -914,7 +915,7 @@ struct drm_device {
+@@ -991,7 +992,7 @@ struct drm_device {
/** \name Usage Counters */
/*@{ */
atomic_t ioctl_count; /**< Outstanding IOCTLs pending */
atomic_t vma_count; /**< Outstanding vma areas open */
int buf_use; /**< Buffers in use -- cannot alloc */
-@@ -925,7 +926,7 @@ struct drm_device {
+@@ -1002,7 +1003,7 @@ struct drm_device {
/*@{ */
unsigned long counters;
enum drm_stat_type types[15];
/*@} */
struct list_head filelist;
-diff -urNp linux-2.6.37.2/include/linux/a.out.h linux-2.6.37.2/include/linux/a.out.h
---- linux-2.6.37.2/include/linux/a.out.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/a.out.h 2011-01-17 02:41:02.000000000 -0500
+@@ -1101,7 +1102,7 @@ struct drm_device {
+ struct platform_device *platformdev; /**< Platform device struture */
+
+ struct drm_sg_mem *sg; /**< Scatter gather memory */
+- unsigned int num_crtcs; /**< Number of CRTCs on this device */
++ unsigned int num_crtcs; /**< Number of CRTCs on this device */
+ void *dev_private; /**< device private data */
+ void *mm_private;
+ struct address_space *dev_mapping;
+diff -urNp linux-2.6.38.1/include/linux/a.out.h linux-2.6.38.1/include/linux/a.out.h
+--- linux-2.6.38.1/include/linux/a.out.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/a.out.h 2011-03-21 18:31:35.000000000 -0400
@@ -39,6 +39,14 @@ enum machine_type {
M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
};
#if !defined (N_MAGIC)
#define N_MAGIC(exec) ((exec).a_info & 0xffff)
#endif
-diff -urNp linux-2.6.37.2/include/linux/atmdev.h linux-2.6.37.2/include/linux/atmdev.h
---- linux-2.6.37.2/include/linux/atmdev.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/atmdev.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/atmdev.h linux-2.6.38.1/include/linux/atmdev.h
+--- linux-2.6.38.1/include/linux/atmdev.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/atmdev.h 2011-03-21 18:31:35.000000000 -0400
@@ -237,7 +237,7 @@ struct compat_atm_iobuf {
#endif
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.37.2/include/linux/binfmts.h linux-2.6.37.2/include/linux/binfmts.h
---- linux-2.6.37.2/include/linux/binfmts.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/binfmts.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/binfmts.h linux-2.6.38.1/include/linux/binfmts.h
+--- linux-2.6.38.1/include/linux/binfmts.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/binfmts.h 2011-03-21 18:31:35.000000000 -0400
@@ -92,6 +92,7 @@ struct linux_binfmt {
int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
int (*load_shlib)(struct file *);
int (*core_dump)(struct coredump_params *cprm);
+ void (*handle_mprotect)(struct vm_area_struct *vma, unsigned long newflags);
unsigned long min_coredump; /* minimal dump size */
- int hasvdso;
};
-diff -urNp linux-2.6.37.2/include/linux/blkdev.h linux-2.6.37.2/include/linux/blkdev.h
---- linux-2.6.37.2/include/linux/blkdev.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/blkdev.h 2011-02-22 16:05:42.000000000 -0500
-@@ -1251,19 +1251,19 @@ queue_max_integrity_segments(struct requ
+
+diff -urNp linux-2.6.38.1/include/linux/blkdev.h linux-2.6.38.1/include/linux/blkdev.h
+--- linux-2.6.38.1/include/linux/blkdev.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/blkdev.h 2011-03-21 18:31:35.000000000 -0400
+@@ -1247,22 +1247,22 @@ queue_max_integrity_segments(struct requ
#endif /* CONFIG_BLK_DEV_INTEGRITY */
struct block_device_operations {
+ int (* const compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
+ int (* const direct_access) (struct block_device *, sector_t,
void **, unsigned long *);
+- unsigned int (*check_events) (struct gendisk *disk,
++ unsigned int (* const check_events) (struct gendisk *disk,
+ unsigned int clearing);
+ /* ->media_changed() is DEPRECATED, use ->check_events() instead */
- int (*media_changed) (struct gendisk *);
- void (*unlock_native_capacity) (struct gendisk *);
- int (*revalidate_disk) (struct gendisk *);
};
extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
-diff -urNp linux-2.6.37.2/include/linux/byteorder/little_endian.h linux-2.6.37.2/include/linux/byteorder/little_endian.h
---- linux-2.6.37.2/include/linux/byteorder/little_endian.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/byteorder/little_endian.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/byteorder/little_endian.h linux-2.6.38.1/include/linux/byteorder/little_endian.h
+--- linux-2.6.38.1/include/linux/byteorder/little_endian.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/byteorder/little_endian.h 2011-03-21 18:31:35.000000000 -0400
@@ -42,51 +42,51 @@
static inline __le64 __cpu_to_le64p(const __u64 *p)
}
#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.37.2/include/linux/cache.h linux-2.6.37.2/include/linux/cache.h
---- linux-2.6.37.2/include/linux/cache.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/cache.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/cache.h linux-2.6.38.1/include/linux/cache.h
+--- linux-2.6.38.1/include/linux/cache.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/cache.h 2011-03-21 18:31:35.000000000 -0400
@@ -16,6 +16,10 @@
#define __read_mostly
#endif
#ifndef ____cacheline_aligned
#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
-diff -urNp linux-2.6.37.2/include/linux/capability.h linux-2.6.37.2/include/linux/capability.h
---- linux-2.6.37.2/include/linux/capability.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/capability.h 2011-01-17 02:41:02.000000000 -0500
-@@ -558,6 +558,7 @@ extern const kernel_cap_t __cap_init_eff
+diff -urNp linux-2.6.38.1/include/linux/capability.h linux-2.6.38.1/include/linux/capability.h
+--- linux-2.6.38.1/include/linux/capability.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/capability.h 2011-03-21 18:31:35.000000000 -0400
+@@ -561,6 +561,7 @@ extern const kernel_cap_t __cap_init_eff
(security_real_capable_noaudit((t), (cap)) == 0)
extern int capable(int cap);
/* audit system wants to get cap info from files as well */
struct dentry;
-diff -urNp linux-2.6.37.2/include/linux/compiler-gcc4.h linux-2.6.37.2/include/linux/compiler-gcc4.h
---- linux-2.6.37.2/include/linux/compiler-gcc4.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/compiler-gcc4.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/compiler-gcc4.h linux-2.6.38.1/include/linux/compiler-gcc4.h
+--- linux-2.6.38.1/include/linux/compiler-gcc4.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/compiler-gcc4.h 2011-03-21 18:31:35.000000000 -0400
@@ -54,6 +54,10 @@
#endif
#endif
#if __GNUC_MINOR__ > 0
-diff -urNp linux-2.6.37.2/include/linux/compiler.h linux-2.6.37.2/include/linux/compiler.h
---- linux-2.6.37.2/include/linux/compiler.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/compiler.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/compiler.h linux-2.6.38.1/include/linux/compiler.h
+--- linux-2.6.38.1/include/linux/compiler.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/compiler.h 2011-03-21 18:31:35.000000000 -0400
@@ -273,6 +273,22 @@ void ftrace_likely_update(struct ftrace_
#define __cold
#endif
+#define ACCESS_ONCE_RW(x) (*(volatile typeof(x) *)&(x))
#endif /* __LINUX_COMPILER_H */
-diff -urNp linux-2.6.37.2/include/linux/cpuset.h linux-2.6.37.2/include/linux/cpuset.h
---- linux-2.6.37.2/include/linux/cpuset.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/cpuset.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/cpuset.h linux-2.6.38.1/include/linux/cpuset.h
+--- linux-2.6.38.1/include/linux/cpuset.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/cpuset.h 2011-03-21 18:31:35.000000000 -0400
@@ -118,7 +118,7 @@ static inline void put_mems_allowed(void
* nodemask.
*/
}
static inline void set_mems_allowed(nodemask_t nodemask)
-diff -urNp linux-2.6.37.2/include/linux/decompress/mm.h linux-2.6.37.2/include/linux/decompress/mm.h
---- linux-2.6.37.2/include/linux/decompress/mm.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/decompress/mm.h 2011-01-17 02:41:02.000000000 -0500
-@@ -78,7 +78,7 @@ static void free(void *where)
+diff -urNp linux-2.6.38.1/include/linux/decompress/mm.h linux-2.6.38.1/include/linux/decompress/mm.h
+--- linux-2.6.38.1/include/linux/decompress/mm.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/decompress/mm.h 2011-03-21 18:31:35.000000000 -0400
+@@ -77,7 +77,7 @@ static void free(void *where)
* warnings when not needed (indeed large_malloc / large_free are not
* needed by inflate */
#define free(a) kfree(a)
#define large_malloc(a) vmalloc(a)
-diff -urNp linux-2.6.37.2/include/linux/dma-mapping.h linux-2.6.37.2/include/linux/dma-mapping.h
---- linux-2.6.37.2/include/linux/dma-mapping.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/dma-mapping.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/dma-mapping.h linux-2.6.38.1/include/linux/dma-mapping.h
+--- linux-2.6.38.1/include/linux/dma-mapping.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/dma-mapping.h 2011-03-21 18:31:35.000000000 -0400
@@ -16,40 +16,40 @@ enum dma_data_direction {
};
};
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
-diff -urNp linux-2.6.37.2/include/linux/elf.h linux-2.6.37.2/include/linux/elf.h
---- linux-2.6.37.2/include/linux/elf.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/elf.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/elf.h linux-2.6.38.1/include/linux/elf.h
+--- linux-2.6.38.1/include/linux/elf.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/elf.h 2011-03-21 18:31:35.000000000 -0400
@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword;
#define PT_GNU_EH_FRAME 0x6474e550
#endif
-diff -urNp linux-2.6.37.2/include/linux/fs.h linux-2.6.37.2/include/linux/fs.h
---- linux-2.6.37.2/include/linux/fs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/fs.h 2011-01-17 02:43:32.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/fs.h linux-2.6.38.1/include/linux/fs.h
+--- linux-2.6.38.1/include/linux/fs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/fs.h 2011-03-21 18:31:35.000000000 -0400
@@ -105,6 +105,11 @@ struct inodes_stat_t {
/* File was opened by fanotify and shouldn't generate fanotify events */
#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
/*
* The below are the various read and write types that we support. Some of
* them include behavioral modifiers that send information down to the
-@@ -578,42 +583,42 @@ typedef int (*read_actor_t)(read_descrip
+@@ -581,42 +586,42 @@ typedef int (*read_actor_t)(read_descrip
unsigned long, unsigned long);
struct address_space_operations {
};
/*
-@@ -1049,18 +1054,18 @@ static inline int file_check_writeable(s
+@@ -1059,17 +1064,17 @@ static inline int file_check_writeable(s
typedef struct files_struct *fl_owner_t;
struct file_lock_operations {
- int (*fl_grant)(struct file_lock *, struct file_lock *, int);
- void (*fl_release_private)(struct file_lock *);
- void (*fl_break)(struct file_lock *);
-- int (*fl_mylease)(struct file_lock *, struct file_lock *);
- int (*fl_change)(struct file_lock **, int);
+ int (* const fl_compare_owner)(struct file_lock *, struct file_lock *);
+ void (* const fl_notify)(struct file_lock *); /* unblock callback */
+ int (* const fl_grant)(struct file_lock *, struct file_lock *, int);
+ void (* const fl_release_private)(struct file_lock *);
+ void (* const fl_break)(struct file_lock *);
-+ int (* const fl_mylease)(struct file_lock *, struct file_lock *);
+ int (* const fl_change)(struct file_lock **, int);
};
struct lock_manager {
-@@ -1474,7 +1479,7 @@ struct fiemap_extent_info {
- unsigned int fi_flags; /* Flags as passed from user */
- unsigned int fi_extents_mapped; /* Number of mapped extents */
- unsigned int fi_extents_max; /* Size of fiemap_extent array */
-- struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
-+ struct fiemap_extent __user *fi_extents_start; /* Start of fiemap_extent
- * array */
- };
- int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
-@@ -1590,29 +1595,29 @@ extern ssize_t vfs_writev(struct file *,
+@@ -1604,29 +1609,29 @@ extern ssize_t vfs_writev(struct file *,
unsigned long, loff_t *);
struct super_operations {
};
/*
-diff -urNp linux-2.6.37.2/include/linux/fs_struct.h linux-2.6.37.2/include/linux/fs_struct.h
---- linux-2.6.37.2/include/linux/fs_struct.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/fs_struct.h 2011-01-17 02:41:02.000000000 -0500
-@@ -4,7 +4,7 @@
- #include <linux/path.h>
+diff -urNp linux-2.6.38.1/include/linux/fs_struct.h linux-2.6.38.1/include/linux/fs_struct.h
+--- linux-2.6.38.1/include/linux/fs_struct.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/fs_struct.h 2011-03-21 18:31:35.000000000 -0400
+@@ -6,7 +6,7 @@
+ #include <linux/seqlock.h>
struct fs_struct {
- int users;
+ atomic_t users;
spinlock_t lock;
+ seqcount_t seq;
int umask;
- int in_exec;
-diff -urNp linux-2.6.37.2/include/linux/genhd.h linux-2.6.37.2/include/linux/genhd.h
---- linux-2.6.37.2/include/linux/genhd.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/genhd.h 2011-02-22 16:05:42.000000000 -0500
-@@ -173,7 +173,7 @@ struct gendisk {
+diff -urNp linux-2.6.38.1/include/linux/genhd.h linux-2.6.38.1/include/linux/genhd.h
+--- linux-2.6.38.1/include/linux/genhd.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/genhd.h 2011-03-21 18:31:35.000000000 -0400
+@@ -183,7 +183,7 @@ struct gendisk {
+ struct kobject *slave_dir;
struct timer_rand_state *random;
-
- atomic_t sync_io; /* RAID */
+ atomic_unchecked_t sync_io; /* RAID */
- struct work_struct async_notify;
+ struct disk_events *ev;
#ifdef CONFIG_BLK_DEV_INTEGRITY
struct blk_integrity *integrity;
-diff -urNp linux-2.6.37.2/include/linux/gracl.h linux-2.6.37.2/include/linux/gracl.h
---- linux-2.6.37.2/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/gracl.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/gracl.h linux-2.6.38.1/include/linux/gracl.h
+--- linux-2.6.38.1/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/gracl.h 2011-03-26 14:27:27.000000000 -0400
@@ -0,0 +1,317 @@
+#ifndef GR_ACL_H
+#define GR_ACL_H
+
+/* Major status information */
+
-+#define GR_VERSION "grsecurity 2.2.1"
-+#define GRSECURITY_VERSION 0x2201
++#define GR_VERSION "grsecurity 2.2.2"
++#define GRSECURITY_VERSION 0x2202
+
+enum {
+ GR_SHUTDOWN = 0,
+
+#endif
+
-diff -urNp linux-2.6.37.2/include/linux/gralloc.h linux-2.6.37.2/include/linux/gralloc.h
---- linux-2.6.37.2/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/gralloc.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/gralloc.h linux-2.6.38.1/include/linux/gralloc.h
+--- linux-2.6.38.1/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/gralloc.h 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,9 @@
+#ifndef __GRALLOC_H
+#define __GRALLOC_H
+void *acl_alloc_num(unsigned long num, unsigned long len);
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/grdefs.h linux-2.6.37.2/include/linux/grdefs.h
---- linux-2.6.37.2/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/grdefs.h 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,137 @@
+diff -urNp linux-2.6.38.1/include/linux/grdefs.h linux-2.6.38.1/include/linux/grdefs.h
+--- linux-2.6.38.1/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/grdefs.h 2011-03-26 16:39:14.000000000 -0400
+@@ -0,0 +1,139 @@
+#ifndef GRDEFS_H
+#define GRDEFS_H
+
+ GR_ROLE_LEARN = 0x0080,
+ GR_ROLE_TPE = 0x0100,
+ GR_ROLE_DOMAIN = 0x0200,
-+ GR_ROLE_PAM = 0x0400
++ GR_ROLE_PAM = 0x0400,
++ GR_ROLE_PERSIST = 0x0800
+};
+
+/* ACL Subject and Object mode flags */
+ GR_PTRACERD = 0x00100000,
+ GR_NOPTRACE = 0x00200000,
+ GR_SUPPRESS = 0x00400000,
-+ GR_NOLEARN = 0x00800000
++ GR_NOLEARN = 0x00800000,
++ GR_INIT_TRANSFER= 0x01000000
+};
+
+#define GR_AUDITS (GR_AUDIT_READ | GR_AUDIT_WRITE | GR_AUDIT_APPEND | GR_AUDIT_EXEC | \
+};
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/grinternal.h linux-2.6.37.2/include/linux/grinternal.h
---- linux-2.6.37.2/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/grinternal.h 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,216 @@
+diff -urNp linux-2.6.38.1/include/linux/grinternal.h linux-2.6.38.1/include/linux/grinternal.h
+--- linux-2.6.38.1/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/grinternal.h 2011-03-26 16:51:07.000000000 -0400
+@@ -0,0 +1,217 @@
+#ifndef __GRINTERNAL_H
+#define __GRINTERNAL_H
+
+int gr_check_protected_task(const struct task_struct *task);
+__u32 to_gr_audit(const __u32 reqmode);
+int gr_set_acls(const int type);
-+
++int gr_apply_subject_to_task(struct task_struct *task);
+int gr_acl_is_enabled(void);
+char gr_roletype_to_char(void);
+
+enum {
+ GR_DO_AUDIT,
+ GR_DONT_AUDIT,
++ /* used for non-audit messages that we shouldn't kill the task on */
+ GR_DONT_AUDIT_GOOD
+};
+
+#endif
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/grmsg.h linux-2.6.37.2/include/linux/grmsg.h
---- linux-2.6.37.2/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/grmsg.h 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,111 @@
+diff -urNp linux-2.6.38.1/include/linux/grmsg.h linux-2.6.38.1/include/linux/grmsg.h
+--- linux-2.6.38.1/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/grmsg.h 2011-03-26 16:52:08.000000000 -0400
+@@ -0,0 +1,112 @@
+#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"
+#define GR_PTRACE_ACL_MSG "denied ptrace of %.950s(%.16s:%d) by "
+#define GR_NONROOT_MODLOAD_MSG "denied kernel module auto-load of %.64s by "
+#define GR_VM86_MSG "denied use of vm86 by "
+#define GR_PTRACE_AUDIT_MSG "process %.950s(%.16s:%d) attached to via ptrace by "
-diff -urNp linux-2.6.37.2/include/linux/grsecurity.h linux-2.6.37.2/include/linux/grsecurity.h
---- linux-2.6.37.2/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/grsecurity.h 2011-01-17 02:41:02.000000000 -0500
-@@ -0,0 +1,214 @@
++#define GR_INIT_TRANSFER_MSG "persistent special role transferred privilege to init by "
+diff -urNp linux-2.6.38.1/include/linux/grsecurity.h linux-2.6.38.1/include/linux/grsecurity.h
+--- linux-2.6.38.1/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/grsecurity.h 2011-03-26 19:58:41.000000000 -0400
+@@ -0,0 +1,215 @@
+#ifndef GR_SECURITY_H
+#define GR_SECURITY_H
+#include <linux/fs.h>
+int gr_handle_rofs_mount(struct dentry *dentry, struct vfsmount *mnt, int mnt_flags);
+int gr_handle_rofs_blockwrite(struct dentry *dentry, struct vfsmount *mnt, int acc_mode);
+void gr_audit_ptrace(struct task_struct *task);
++dev_t gr_get_dev_from_dentry(struct dentry *dentry);
+
+#ifdef CONFIG_GRKERNSEC
+void task_grsec_rbac(struct seq_file *m, struct task_struct *p);
+#endif
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/grsock.h linux-2.6.37.2/include/linux/grsock.h
---- linux-2.6.37.2/include/linux/grsock.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/grsock.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/grsock.h linux-2.6.38.1/include/linux/grsock.h
+--- linux-2.6.38.1/include/linux/grsock.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/grsock.h 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,19 @@
+#ifndef __GRSOCK_H
+#define __GRSOCK_H
+ const int protocol);
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/highmem.h linux-2.6.37.2/include/linux/highmem.h
---- linux-2.6.37.2/include/linux/highmem.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/highmem.h 2011-01-17 02:41:02.000000000 -0500
-@@ -182,6 +182,18 @@ static inline void clear_highpage(struct
+diff -urNp linux-2.6.38.1/include/linux/highmem.h linux-2.6.38.1/include/linux/highmem.h
+--- linux-2.6.38.1/include/linux/highmem.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/highmem.h 2011-03-21 18:31:35.000000000 -0400
+@@ -185,6 +185,18 @@ static inline void clear_highpage(struct
kunmap_atomic(kaddr, KM_USER0);
}
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
-diff -urNp linux-2.6.37.2/include/linux/init.h linux-2.6.37.2/include/linux/init.h
---- linux-2.6.37.2/include/linux/init.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/init.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/init.h linux-2.6.38.1/include/linux/init.h
+--- linux-2.6.38.1/include/linux/init.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/init.h 2011-03-21 18:31:35.000000000 -0400
@@ -293,13 +293,13 @@ void __init parse_early_options(char *cm
/* Each module must use one module_init(). */
{ return exitfn; } \
void cleanup_module(void) __attribute__((alias(#exitfn)));
-diff -urNp linux-2.6.37.2/include/linux/interrupt.h linux-2.6.37.2/include/linux/interrupt.h
---- linux-2.6.37.2/include/linux/interrupt.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/interrupt.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/interrupt.h linux-2.6.38.1/include/linux/interrupt.h
+--- linux-2.6.38.1/include/linux/interrupt.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/interrupt.h 2011-03-21 18:31:35.000000000 -0400
@@ -393,7 +393,7 @@ enum
/* map softirq index to softirq name. update 'softirq_to_name' in
* kernel/softirq.c when adding a new softirq.
extern void softirq_init(void);
static inline void __raise_softirq_irqoff(unsigned int nr)
{
-diff -urNp linux-2.6.37.2/include/linux/jbd2.h linux-2.6.37.2/include/linux/jbd2.h
---- linux-2.6.37.2/include/linux/jbd2.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/jbd2.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/jbd2.h linux-2.6.38.1/include/linux/jbd2.h
+--- linux-2.6.38.1/include/linux/jbd2.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/jbd2.h 2011-03-21 18:31:35.000000000 -0400
@@ -67,7 +67,7 @@ extern u8 jbd2_journal_enable_debug;
} \
} while (0)
#endif
extern void *jbd2_alloc(size_t size, gfp_t flags);
-diff -urNp linux-2.6.37.2/include/linux/jbd.h linux-2.6.37.2/include/linux/jbd.h
---- linux-2.6.37.2/include/linux/jbd.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/jbd.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/jbd.h linux-2.6.38.1/include/linux/jbd.h
+--- linux-2.6.38.1/include/linux/jbd.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/jbd.h 2011-03-21 18:31:35.000000000 -0400
@@ -67,7 +67,7 @@ extern u8 journal_enable_debug;
} \
} while (0)
#endif
static inline void *jbd_alloc(size_t size, gfp_t flags)
-diff -urNp linux-2.6.37.2/include/linux/kallsyms.h linux-2.6.37.2/include/linux/kallsyms.h
---- linux-2.6.37.2/include/linux/kallsyms.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/kallsyms.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/kallsyms.h linux-2.6.38.1/include/linux/kallsyms.h
+--- linux-2.6.38.1/include/linux/kallsyms.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/kallsyms.h 2011-03-21 18:31:35.000000000 -0400
@@ -15,7 +15,8 @@
struct module;
/* This macro allows us to keep printk typechecking */
static void __check_printsym_format(const char *fmt, ...)
-diff -urNp linux-2.6.37.2/include/linux/kgdb.h linux-2.6.37.2/include/linux/kgdb.h
---- linux-2.6.37.2/include/linux/kgdb.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/kgdb.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/kgdb.h linux-2.6.38.1/include/linux/kgdb.h
+--- linux-2.6.38.1/include/linux/kgdb.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/kgdb.h 2011-03-21 18:31:35.000000000 -0400
@@ -269,22 +269,22 @@ struct kgdb_arch {
*/
struct kgdb_io {
extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
extern char *kgdb_mem2hex(char *mem, char *buf, int count);
-diff -urNp linux-2.6.37.2/include/linux/kvm_host.h linux-2.6.37.2/include/linux/kvm_host.h
---- linux-2.6.37.2/include/linux/kvm_host.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/kvm_host.h 2011-01-17 02:41:02.000000000 -0500
-@@ -246,7 +246,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
+diff -urNp linux-2.6.38.1/include/linux/kvm_host.h linux-2.6.38.1/include/linux/kvm_host.h
+--- linux-2.6.38.1/include/linux/kvm_host.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/kvm_host.h 2011-03-21 18:31:35.000000000 -0400
+@@ -288,7 +288,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
void vcpu_load(struct kvm_vcpu *vcpu);
void vcpu_put(struct kvm_vcpu *vcpu);
struct module *module);
void kvm_exit(void);
-@@ -375,7 +375,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
+@@ -428,7 +428,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
struct kvm_guest_debug *dbg);
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
void kvm_arch_exit(void);
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
-diff -urNp linux-2.6.37.2/include/linux/libata.h linux-2.6.37.2/include/linux/libata.h
---- linux-2.6.37.2/include/linux/libata.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/libata.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/libata.h linux-2.6.38.1/include/linux/libata.h
+--- linux-2.6.38.1/include/linux/libata.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/libata.h 2011-03-21 18:31:35.000000000 -0400
@@ -65,11 +65,11 @@
#ifdef ATA_VERBOSE_DEBUG
#define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
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_Host *h, struct scsi_cmnd *cmd);
-diff -urNp linux-2.6.37.2/include/linux/lockd/bind.h linux-2.6.37.2/include/linux/lockd/bind.h
---- linux-2.6.37.2/include/linux/lockd/bind.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/lockd/bind.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/lockd/bind.h linux-2.6.38.1/include/linux/lockd/bind.h
+--- linux-2.6.38.1/include/linux/lockd/bind.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/lockd/bind.h 2011-03-21 18:31:35.000000000 -0400
@@ -23,13 +23,13 @@ struct svc_rqst;
* This is the set of functions for lockd->nfsd communication
*/
/*
* Similar to nfs_client_initdata, but without the NFS-specific
-diff -urNp linux-2.6.37.2/include/linux/mm.h linux-2.6.37.2/include/linux/mm.h
---- linux-2.6.37.2/include/linux/mm.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/mm.h 2011-01-17 02:41:02.000000000 -0500
-@@ -107,7 +107,14 @@ extern unsigned int kobjsize(const void
+diff -urNp linux-2.6.38.1/include/linux/mm.h linux-2.6.38.1/include/linux/mm.h
+--- linux-2.6.38.1/include/linux/mm.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/mm.h 2011-03-21 18:31:35.000000000 -0400
+@@ -113,7 +113,14 @@ extern unsigned int kobjsize(const void
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
-@@ -875,12 +882,6 @@ int set_page_dirty(struct page *page);
+@@ -985,12 +992,6 @@ int set_page_dirty(struct page *page);
int set_page_dirty_lock(struct page *page);
int clear_page_dirty_for_io(struct page *page);
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);
-@@ -1032,6 +1033,15 @@ struct shrinker {
+@@ -1142,6 +1143,15 @@ struct shrinker {
extern void register_shrinker(struct shrinker *);
extern void unregister_shrinker(struct shrinker *);
int vma_wants_writenotify(struct vm_area_struct *vma);
extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
-@@ -1318,6 +1328,7 @@ out:
+@@ -1431,6 +1441,7 @@ out:
}
extern int do_munmap(struct mm_struct *, unsigned long, size_t);
extern unsigned long do_brk(unsigned long, unsigned long);
-@@ -1374,6 +1385,10 @@ extern struct vm_area_struct * find_vma(
+@@ -1487,6 +1498,10 @@ extern struct vm_area_struct * find_vma(
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
/* 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)
-@@ -1390,15 +1405,6 @@ static inline unsigned long vma_pages(st
+@@ -1503,15 +1518,6 @@ static inline unsigned long vma_pages(st
return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
}
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);
-@@ -1505,7 +1511,7 @@ extern int unpoison_memory(unsigned long
+@@ -1620,7 +1626,7 @@ extern int unpoison_memory(unsigned long
extern int sysctl_memory_failure_early_kill;
extern int sysctl_memory_failure_recovery;
extern void shake_page(struct page *p, int access);
extern int soft_offline_page(struct page *page, int flags);
#ifdef CONFIG_MEMORY_FAILURE
int is_hwpoison_address(unsigned long addr);
-@@ -1518,5 +1524,11 @@ static inline int is_hwpoison_address(un
-
- extern void dump_page(struct page *page);
+@@ -1642,5 +1648,11 @@ extern void copy_user_huge_page(struct p
+ unsigned int pages_per_huge_page);
+ #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
+extern void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
-diff -urNp linux-2.6.37.2/include/linux/mm_types.h linux-2.6.37.2/include/linux/mm_types.h
---- linux-2.6.37.2/include/linux/mm_types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/mm_types.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/mm_types.h linux-2.6.38.1/include/linux/mm_types.h
+--- linux-2.6.38.1/include/linux/mm_types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/mm_types.h 2011-03-21 18:31:35.000000000 -0400
@@ -183,6 +183,8 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
};
struct core_thread {
-@@ -312,6 +314,24 @@ struct mm_struct {
+@@ -315,6 +317,24 @@ struct mm_struct {
#endif
/* How many tasks sharing this mm are OOM_DISABLE */
atomic_t oom_disable_count;
};
/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
-diff -urNp linux-2.6.37.2/include/linux/mmu_notifier.h linux-2.6.37.2/include/linux/mmu_notifier.h
---- linux-2.6.37.2/include/linux/mmu_notifier.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/mmu_notifier.h 2011-01-17 02:41:02.000000000 -0500
-@@ -235,12 +235,12 @@ static inline void mmu_notifier_mm_destr
+diff -urNp linux-2.6.38.1/include/linux/mmu_notifier.h linux-2.6.38.1/include/linux/mmu_notifier.h
+--- linux-2.6.38.1/include/linux/mmu_notifier.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/mmu_notifier.h 2011-03-21 18:31:35.000000000 -0400
+@@ -255,12 +255,12 @@ static inline void mmu_notifier_mm_destr
*/
#define ptep_clear_flush_notify(__vma, __address, __ptep) \
({ \
+ ___pte; \
})
- #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \
-diff -urNp linux-2.6.37.2/include/linux/mmzone.h linux-2.6.37.2/include/linux/mmzone.h
---- linux-2.6.37.2/include/linux/mmzone.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/mmzone.h 2011-02-22 16:05:42.000000000 -0500
-@@ -354,7 +354,7 @@ struct zone {
+ #define pmdp_clear_flush_notify(__vma, __address, __pmdp) \
+diff -urNp linux-2.6.38.1/include/linux/mmzone.h linux-2.6.38.1/include/linux/mmzone.h
+--- linux-2.6.38.1/include/linux/mmzone.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/mmzone.h 2011-03-21 18:31:35.000000000 -0400
+@@ -355,7 +355,7 @@ struct zone {
unsigned long flags; /* zone flags, see below */
/* Zone statistics */
/*
* The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
-diff -urNp linux-2.6.37.2/include/linux/mod_devicetable.h linux-2.6.37.2/include/linux/mod_devicetable.h
---- linux-2.6.37.2/include/linux/mod_devicetable.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/mod_devicetable.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/mod_devicetable.h linux-2.6.38.1/include/linux/mod_devicetable.h
+--- linux-2.6.38.1/include/linux/mod_devicetable.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/mod_devicetable.h 2011-03-21 18:31:35.000000000 -0400
@@ -12,7 +12,7 @@
typedef unsigned long kernel_ulong_t;
#endif
struct hid_device_id {
__u16 bus;
-diff -urNp linux-2.6.37.2/include/linux/module.h linux-2.6.37.2/include/linux/module.h
---- linux-2.6.37.2/include/linux/module.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/module.h 2011-01-17 02:41:02.000000000 -0500
-@@ -297,16 +297,16 @@ struct module
+diff -urNp linux-2.6.38.1/include/linux/module.h linux-2.6.38.1/include/linux/module.h
+--- linux-2.6.38.1/include/linux/module.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/module.h 2011-03-21 18:31:35.000000000 -0400
+@@ -324,19 +324,16 @@ struct module
int (*init)(void);
/* If this is non-NULL, vfree after init() returns */
/* The size of the executable code in each section. */
- unsigned int init_text_size, core_text_size;
+-
+- /* Size of RO sections of the module (text+rodata) */
+- unsigned int init_ro_size, core_ro_size;
+ unsigned int init_size_rx, core_size_rx;
/* Arch-specific module values */
struct mod_arch_specific arch;
-@@ -411,16 +411,46 @@ bool is_module_address(unsigned long add
+@@ -441,16 +438,46 @@ bool is_module_address(unsigned long add
bool is_module_percpu_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
}
/* Search for module by name: must hold module_mutex. */
-diff -urNp linux-2.6.37.2/include/linux/moduleloader.h linux-2.6.37.2/include/linux/moduleloader.h
---- linux-2.6.37.2/include/linux/moduleloader.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/moduleloader.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/moduleloader.h linux-2.6.38.1/include/linux/moduleloader.h
+--- linux-2.6.38.1/include/linux/moduleloader.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/moduleloader.h 2011-03-21 18:31:35.000000000 -0400
@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(st
sections. Returns NULL on failure. */
void *module_alloc(unsigned long size);
/* Apply the given relocation to the (simplified) ELF. Return -error
or 0. */
int apply_relocate(Elf_Shdr *sechdrs,
-diff -urNp linux-2.6.37.2/include/linux/moduleparam.h linux-2.6.37.2/include/linux/moduleparam.h
---- linux-2.6.37.2/include/linux/moduleparam.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/moduleparam.h 2011-01-17 02:41:02.000000000 -0500
-@@ -253,7 +253,7 @@ static inline void __kernel_param_unlock
+diff -urNp linux-2.6.38.1/include/linux/moduleparam.h linux-2.6.38.1/include/linux/moduleparam.h
+--- linux-2.6.38.1/include/linux/moduleparam.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/moduleparam.h 2011-03-21 18:31:35.000000000 -0400
+@@ -255,7 +255,7 @@ static inline void __kernel_param_unlock
* @len is usually just sizeof(string).
*/
#define module_param_string(name, string, len, perm) \
= { len, string }; \
__module_param_call(MODULE_PARAM_PREFIX, name, \
¶m_ops_string, \
-@@ -368,7 +368,7 @@ extern int param_get_invbool(char *buffe
+@@ -370,7 +370,7 @@ extern int param_get_invbool(char *buffe
* module_param_named() for why this might be necessary.
*/
#define module_param_array_named(name, array, type, nump, perm) \
= { ARRAY_SIZE(array), nump, ¶m_ops_##type, \
sizeof(array[0]), array }; \
__module_param_call(MODULE_PARAM_PREFIX, name, \
-diff -urNp linux-2.6.37.2/include/linux/namei.h linux-2.6.37.2/include/linux/namei.h
---- linux-2.6.37.2/include/linux/namei.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/namei.h 2011-01-17 02:41:02.000000000 -0500
-@@ -22,7 +22,7 @@ struct nameidata {
- unsigned int flags;
+diff -urNp linux-2.6.38.1/include/linux/namei.h linux-2.6.38.1/include/linux/namei.h
+--- linux-2.6.38.1/include/linux/namei.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/namei.h 2011-03-21 18:31:35.000000000 -0400
+@@ -25,7 +25,7 @@ struct nameidata {
+ unsigned seq;
int last_type;
unsigned depth;
- char *saved_names[MAX_NESTED_LINKS + 1];
/* Intent data */
union {
-@@ -81,12 +81,12 @@ extern int follow_up(struct path *);
+@@ -88,12 +88,12 @@ extern int follow_up(struct path *);
extern struct dentry *lock_rename(struct dentry *, struct dentry *);
extern void unlock_rename(struct dentry *, struct dentry *);
{
return nd->saved_names[nd->depth];
}
-diff -urNp linux-2.6.37.2/include/linux/netfilter/xt_gradm.h linux-2.6.37.2/include/linux/netfilter/xt_gradm.h
---- linux-2.6.37.2/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/include/linux/netfilter/xt_gradm.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/netfilter/xt_gradm.h linux-2.6.38.1/include/linux/netfilter/xt_gradm.h
+--- linux-2.6.38.1/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/include/linux/netfilter/xt_gradm.h 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,9 @@
+#ifndef _LINUX_NETFILTER_XT_GRADM_H
+#define _LINUX_NETFILTER_XT_GRADM_H 1
+};
+
+#endif
-diff -urNp linux-2.6.37.2/include/linux/oprofile.h linux-2.6.37.2/include/linux/oprofile.h
---- linux-2.6.37.2/include/linux/oprofile.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/oprofile.h 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/oprofile.h linux-2.6.38.1/include/linux/oprofile.h
+--- linux-2.6.38.1/include/linux/oprofile.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/oprofile.h 2011-03-21 18:31:35.000000000 -0400
@@ -132,9 +132,9 @@ int oprofilefs_create_ulong(struct super
int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
char const * name, ulong * val);
/** create a directory */
struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
-diff -urNp linux-2.6.37.2/include/linux/pipe_fs_i.h linux-2.6.37.2/include/linux/pipe_fs_i.h
---- linux-2.6.37.2/include/linux/pipe_fs_i.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/pipe_fs_i.h 2011-01-17 02:41:02.000000000 -0500
-@@ -45,9 +45,9 @@ struct pipe_buffer {
+diff -urNp linux-2.6.38.1/include/linux/pipe_fs_i.h linux-2.6.38.1/include/linux/pipe_fs_i.h
+--- linux-2.6.38.1/include/linux/pipe_fs_i.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/pipe_fs_i.h 2011-03-21 18:31:35.000000000 -0400
+@@ -46,9 +46,9 @@ struct pipe_buffer {
struct pipe_inode_info {
wait_queue_head_t wait;
unsigned int nrbufs, curbuf, buffers;
unsigned int r_counter;
unsigned int w_counter;
struct page *tmp_page;
-diff -urNp linux-2.6.37.2/include/linux/pm_runtime.h linux-2.6.37.2/include/linux/pm_runtime.h
---- linux-2.6.37.2/include/linux/pm_runtime.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/pm_runtime.h 2011-01-17 02:41:02.000000000 -0500
-@@ -83,7 +83,7 @@ static inline bool pm_runtime_suspended(
+diff -urNp linux-2.6.38.1/include/linux/pm_runtime.h linux-2.6.38.1/include/linux/pm_runtime.h
+--- linux-2.6.38.1/include/linux/pm_runtime.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/pm_runtime.h 2011-03-21 18:31:35.000000000 -0400
+@@ -89,7 +89,7 @@ static inline bool pm_runtime_enabled(st
static inline void pm_runtime_mark_last_busy(struct device *dev)
{
}
#else /* !CONFIG_PM_RUNTIME */
-diff -urNp linux-2.6.37.2/include/linux/poison.h linux-2.6.37.2/include/linux/poison.h
---- linux-2.6.37.2/include/linux/poison.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/poison.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/poison.h linux-2.6.38.1/include/linux/poison.h
+--- linux-2.6.38.1/include/linux/poison.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/poison.h 2011-03-21 18:31:35.000000000 -0400
@@ -19,8 +19,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
/********** include/linux/timer.h **********/
/*
-diff -urNp linux-2.6.37.2/include/linux/proc_fs.h linux-2.6.37.2/include/linux/proc_fs.h
---- linux-2.6.37.2/include/linux/proc_fs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/proc_fs.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/proc_fs.h linux-2.6.38.1/include/linux/proc_fs.h
+--- linux-2.6.38.1/include/linux/proc_fs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/proc_fs.h 2011-03-21 18:31:35.000000000 -0400
@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *pro
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
mode_t mode, struct proc_dir_entry *base,
read_proc_t *read_proc, void * data)
-diff -urNp linux-2.6.37.2/include/linux/random.h linux-2.6.37.2/include/linux/random.h
---- linux-2.6.37.2/include/linux/random.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/random.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/ptrace.h linux-2.6.38.1/include/linux/ptrace.h
+--- linux-2.6.38.1/include/linux/ptrace.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/ptrace.h 2011-03-26 11:36:13.000000000 -0400
+@@ -115,10 +115,10 @@ extern void __ptrace_unlink(struct task_
+ extern void exit_ptrace(struct task_struct *tracer);
+ #define PTRACE_MODE_READ 1
+ #define PTRACE_MODE_ATTACH 2
+-/* Returns 0 on success, -errno on denial. */
+-extern int __ptrace_may_access(struct task_struct *task, unsigned int mode);
+ /* Returns true on success, false on denial. */
+ extern bool ptrace_may_access(struct task_struct *task, unsigned int mode);
++/* Returns true on success, false on denial. */
++extern bool ptrace_may_access_log(struct task_struct *task, unsigned int mode);
+
+ static inline int ptrace_reparented(struct task_struct *child)
+ {
+diff -urNp linux-2.6.38.1/include/linux/random.h linux-2.6.38.1/include/linux/random.h
+--- linux-2.6.38.1/include/linux/random.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/random.h 2011-03-21 18:31:35.000000000 -0400
@@ -80,12 +80,17 @@ void srandom32(u32 seed);
u32 prandom32(struct rnd_state *);
}
/**
-diff -urNp linux-2.6.37.2/include/linux/reiserfs_fs.h linux-2.6.37.2/include/linux/reiserfs_fs.h
---- linux-2.6.37.2/include/linux/reiserfs_fs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/reiserfs_fs.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/reiserfs_fs.h linux-2.6.38.1/include/linux/reiserfs_fs.h
+--- linux-2.6.38.1/include/linux/reiserfs_fs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/reiserfs_fs.h 2011-03-21 18:31:35.000000000 -0400
@@ -1403,7 +1403,7 @@ static inline loff_t max_reiserfs_offset
#define REISERFS_USER_MEM 1 /* reiserfs user memory mode */
#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.37.2/include/linux/reiserfs_fs_sb.h linux-2.6.37.2/include/linux/reiserfs_fs_sb.h
---- linux-2.6.37.2/include/linux/reiserfs_fs_sb.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/reiserfs_fs_sb.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/reiserfs_fs_sb.h linux-2.6.38.1/include/linux/reiserfs_fs_sb.h
+--- linux-2.6.38.1/include/linux/reiserfs_fs_sb.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/reiserfs_fs_sb.h 2011-03-21 18:31:35.000000000 -0400
@@ -386,7 +386,7 @@ struct reiserfs_sb_info {
/* Comment? -Hans */
wait_queue_head_t s_wait;
// tree gets re-balanced
unsigned long s_properties; /* File system properties. Currently holds
on-disk FS format */
-diff -urNp linux-2.6.37.2/include/linux/rmap.h linux-2.6.37.2/include/linux/rmap.h
---- linux-2.6.37.2/include/linux/rmap.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/rmap.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/rmap.h linux-2.6.38.1/include/linux/rmap.h
+--- linux-2.6.38.1/include/linux/rmap.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/rmap.h 2011-03-21 18:31:35.000000000 -0400
@@ -145,8 +145,8 @@ static inline void anon_vma_unlock(struc
void anon_vma_init(void); /* create anon_vma_cachep */
int anon_vma_prepare(struct vm_area_struct *);
void __anon_vma_link(struct vm_area_struct *);
void anon_vma_free(struct anon_vma *);
-diff -urNp linux-2.6.37.2/include/linux/sched.h linux-2.6.37.2/include/linux/sched.h
---- linux-2.6.37.2/include/linux/sched.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/sched.h 2011-01-17 02:41:02.000000000 -0500
-@@ -100,6 +100,7 @@ struct robust_list_head;
+diff -urNp linux-2.6.38.1/include/linux/sched.h linux-2.6.38.1/include/linux/sched.h
+--- linux-2.6.38.1/include/linux/sched.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/sched.h 2011-03-26 17:18:15.000000000 -0400
+@@ -99,6 +99,7 @@ struct robust_list_head;
struct bio_list;
struct fs_struct;
struct perf_event_context;
/*
* List of flags we want to share for kernel threads,
-@@ -377,10 +378,12 @@ struct user_namespace;
+@@ -380,10 +381,13 @@ struct user_namespace;
#define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
extern int sysctl_max_map_count;
#include <linux/aio.h>
#ifdef CONFIG_MMU
-+extern bool check_heap_stack_gap(struct vm_area_struct *vma, unsigned long addr, unsigned long len);
++extern bool check_heap_stack_gap(const struct vm_area_struct *vma, unsigned long addr, unsigned long len);
++extern unsigned long skip_heap_stack_gap(const struct vm_area_struct *vma, unsigned long len);
extern void arch_pick_mmap_layout(struct mm_struct *mm);
extern unsigned long
arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
-@@ -624,6 +627,16 @@ struct signal_struct {
- struct tty_audit_buf *tty_audit_buf;
+@@ -628,6 +632,17 @@ struct signal_struct {
+ #ifdef CONFIG_TASKSTATS
+ struct taskstats *stats;
#endif
-
++
+#ifdef CONFIG_GRKERNSEC
+ u32 curr_ip;
+ u32 saved_ip;
+ u8 used_accept:1;
+#endif
+
- int oom_adj; /* OOM kill score adjustment (bit shift) */
- int oom_score_adj; /* OOM kill score adjustment */
-
-@@ -1181,7 +1194,7 @@ enum perf_event_task_context {
+ #ifdef CONFIG_AUDIT
+ unsigned audit_tty;
+ struct tty_audit_buf *tty_audit_buf;
+@@ -1192,7 +1207,7 @@ enum perf_event_task_context {
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
unsigned int ptrace;
-@@ -1291,8 +1304,8 @@ struct task_struct {
+@@ -1307,8 +1322,8 @@ struct task_struct {
struct list_head thread_group;
struct completion *vfork_done; /* for vfork() */
cputime_t utime, stime, utimescaled, stimescaled;
cputime_t gtime;
-@@ -1308,13 +1321,6 @@ struct task_struct {
+@@ -1324,13 +1339,6 @@ struct task_struct {
struct task_cputime cputime_expires;
struct list_head cpu_timers[3];
char comm[TASK_COMM_LEN]; /* executable name excluding path
- access with [gs]et_task_comm (which lock
it with task_lock())
-@@ -1333,6 +1339,10 @@ struct task_struct {
+@@ -1349,6 +1357,10 @@ struct task_struct {
struct thread_struct thread;
/* filesystem information */
struct fs_struct *fs;
/* open file information */
struct files_struct *files;
/* namespaces */
-@@ -1379,6 +1389,11 @@ struct task_struct {
+@@ -1395,6 +1407,11 @@ struct task_struct {
struct rt_mutex_waiter *pi_blocked_on;
#endif
#ifdef CONFIG_DEBUG_MUTEXES
/* mutex deadlock detection */
struct mutex_waiter *blocked_on;
-@@ -1483,6 +1498,20 @@ struct task_struct {
+@@ -1499,6 +1516,21 @@ struct task_struct {
unsigned long default_timer_slack_ns;
struct list_head *scm_work_list;
+ struct acl_role_label *role;
+ struct file *exec_file;
+ u16 acl_role_id;
++ /* is this the task that authenticated to the special role */
+ u8 acl_sp_role;
+ u8 is_writable;
+ u8 brute;
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* Index of current stored address in ret_stack */
int curr_ret_stack;
-@@ -1514,6 +1543,52 @@ struct task_struct {
+@@ -1530,6 +1562,52 @@ struct task_struct {
#endif
};
/* Future-safe accessor for struct task_struct's cpus_allowed. */
#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
-@@ -2134,7 +2209,7 @@ extern void __cleanup_sighand(struct sig
+@@ -2169,7 +2247,7 @@ extern void __cleanup_sighand(struct sig
extern void exit_itimers(struct signal_struct *);
extern void flush_itimer_signals(void);
extern void daemonize(const char *, ...);
extern int allow_signal(int);
-@@ -2259,8 +2334,8 @@ static inline void unlock_task_sighand(s
+@@ -2294,8 +2372,8 @@ static inline void unlock_task_sighand(s
#ifndef __HAVE_THREAD_FUNCTIONS
static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
{
-@@ -2275,13 +2350,17 @@ static inline unsigned long *end_of_stac
+@@ -2310,13 +2388,17 @@ static inline unsigned long *end_of_stac
#endif
extern void thread_info_cache_init(void);
#ifdef CONFIG_DEBUG_STACK_USAGE
-diff -urNp linux-2.6.37.2/include/linux/screen_info.h linux-2.6.37.2/include/linux/screen_info.h
---- linux-2.6.37.2/include/linux/screen_info.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/screen_info.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/screen_info.h linux-2.6.38.1/include/linux/screen_info.h
+--- linux-2.6.38.1/include/linux/screen_info.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/screen_info.h 2011-03-21 18:31:35.000000000 -0400
@@ -43,7 +43,8 @@ struct screen_info {
__u16 pages; /* 0x32 */
__u16 vesa_attributes; /* 0x34 */
} __attribute__((packed));
#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */
-diff -urNp linux-2.6.37.2/include/linux/security.h linux-2.6.37.2/include/linux/security.h
---- linux-2.6.37.2/include/linux/security.h 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/include/linux/security.h 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/security.h linux-2.6.38.1/include/linux/security.h
+--- linux-2.6.38.1/include/linux/security.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/security.h 2011-03-21 18:31:35.000000000 -0400
@@ -35,6 +35,7 @@
#include <linux/key.h>
#include <linux/xfrm.h>
#include <net/flow.h>
/* Maximum number of letters for an LSM name string */
-diff -urNp linux-2.6.37.2/include/linux/shm.h linux-2.6.37.2/include/linux/shm.h
---- linux-2.6.37.2/include/linux/shm.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/shm.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/shm.h linux-2.6.38.1/include/linux/shm.h
+--- linux-2.6.38.1/include/linux/shm.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/shm.h 2011-03-21 18:31:35.000000000 -0400
@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the ke
pid_t shm_cprid;
pid_t shm_lprid;
};
/* shm_mode upper byte flags */
-diff -urNp linux-2.6.37.2/include/linux/skbuff.h linux-2.6.37.2/include/linux/skbuff.h
---- linux-2.6.37.2/include/linux/skbuff.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/skbuff.h 2011-01-17 02:41:02.000000000 -0500
-@@ -581,7 +581,7 @@ static inline struct skb_shared_hwtstamp
+diff -urNp linux-2.6.38.1/include/linux/skbuff.h linux-2.6.38.1/include/linux/skbuff.h
+--- linux-2.6.38.1/include/linux/skbuff.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/skbuff.h 2011-03-21 18:31:35.000000000 -0400
+@@ -589,7 +589,7 @@ static inline struct skb_shared_hwtstamp
*/
static inline int skb_queue_empty(const struct sk_buff_head *list)
{
}
/**
-@@ -594,7 +594,7 @@ static inline int skb_queue_empty(const
+@@ -602,7 +602,7 @@ static inline int skb_queue_empty(const
static inline bool skb_queue_is_last(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
}
/**
-@@ -607,7 +607,7 @@ static inline bool skb_queue_is_last(con
+@@ -615,7 +615,7 @@ static inline bool skb_queue_is_last(con
static inline bool skb_queue_is_first(const struct sk_buff_head *list,
const struct sk_buff *skb)
{
}
/**
-diff -urNp linux-2.6.37.2/include/linux/slab.h linux-2.6.37.2/include/linux/slab.h
---- linux-2.6.37.2/include/linux/slab.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/slab.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/slab.h linux-2.6.38.1/include/linux/slab.h
+--- linux-2.6.38.1/include/linux/slab.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/slab.h 2011-03-21 18:31:35.000000000 -0400
@@ -11,6 +11,7 @@
#include <linux/gfp.h>
/*
* struct kmem_cache related prototypes
-@@ -144,6 +148,7 @@ void * __must_check krealloc(const void
+@@ -142,6 +146,7 @@ void * __must_check krealloc(const void
void kfree(const void *);
void kzfree(const void *);
size_t ksize(const void *);
/*
* Allocator specific definitions. These are mainly used to establish optimized
-@@ -336,4 +341,37 @@ static inline void *kzalloc_node(size_t
+@@ -334,4 +339,37 @@ static inline void *kzalloc_node(size_t
void __init kmem_cache_init_late(void);
+})
+
#endif /* _LINUX_SLAB_H */
-diff -urNp linux-2.6.37.2/include/linux/slub_def.h linux-2.6.37.2/include/linux/slub_def.h
---- linux-2.6.37.2/include/linux/slub_def.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/slub_def.h 2011-01-17 02:41:02.000000000 -0500
-@@ -80,7 +80,7 @@ struct kmem_cache {
+diff -urNp linux-2.6.38.1/include/linux/slub_def.h linux-2.6.38.1/include/linux/slub_def.h
+--- linux-2.6.38.1/include/linux/slub_def.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/slub_def.h 2011-03-21 18:31:35.000000000 -0400
+@@ -79,7 +79,7 @@ struct kmem_cache {
struct kmem_cache_order_objects max;
struct kmem_cache_order_objects min;
gfp_t allocflags; /* gfp flags to use on each alloc */
void (*ctor)(void *);
int inuse; /* Offset to metadata */
int align; /* Alignment */
-diff -urNp linux-2.6.37.2/include/linux/sonet.h linux-2.6.37.2/include/linux/sonet.h
---- linux-2.6.37.2/include/linux/sonet.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/sonet.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/sonet.h linux-2.6.38.1/include/linux/sonet.h
+--- linux-2.6.38.1/include/linux/sonet.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/sonet.h 2011-03-21 18:31:35.000000000 -0400
@@ -61,7 +61,7 @@ struct sonet_stats {
#include <asm/atomic.h>
__SONET_ITEMS
#undef __HANDLE_ITEM
};
-diff -urNp linux-2.6.37.2/include/linux/sunrpc/clnt.h linux-2.6.37.2/include/linux/sunrpc/clnt.h
---- linux-2.6.37.2/include/linux/sunrpc/clnt.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/sunrpc/clnt.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/sunrpc/clnt.h linux-2.6.38.1/include/linux/sunrpc/clnt.h
+--- linux-2.6.38.1/include/linux/sunrpc/clnt.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/sunrpc/clnt.h 2011-03-21 18:31:35.000000000 -0400
@@ -168,9 +168,9 @@ static inline unsigned short rpc_get_por
{
switch (sap->sa_family) {
}
#endif /* __KERNEL__ */
-diff -urNp linux-2.6.37.2/include/linux/suspend.h linux-2.6.37.2/include/linux/suspend.h
---- linux-2.6.37.2/include/linux/suspend.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/suspend.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/suspend.h linux-2.6.38.1/include/linux/suspend.h
+--- linux-2.6.38.1/include/linux/suspend.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/suspend.h 2011-03-21 18:31:35.000000000 -0400
@@ -106,15 +106,15 @@ typedef int __bitwise suspend_state_t;
* which require special recovery actions in that situation.
*/
};
#ifdef CONFIG_SUSPEND
-@@ -122,7 +122,7 @@ struct platform_suspend_ops {
- * suspend_set_ops - set platform dependent suspend operations
- * @ops: The new suspend operations to set.
- */
--extern void suspend_set_ops(struct platform_suspend_ops *ops);
-+extern void suspend_set_ops(const struct platform_suspend_ops *ops);
- extern int suspend_valid_only_mem(suspend_state_t state);
-
- /**
-@@ -147,7 +147,7 @@ extern int pm_suspend(suspend_state_t st
- #else /* !CONFIG_SUSPEND */
- #define suspend_valid_only_mem NULL
-
--static inline void suspend_set_ops(struct platform_suspend_ops *ops) {}
-+static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {}
- static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
- #endif /* !CONFIG_SUSPEND */
-
@@ -217,16 +217,16 @@ extern void mark_free_pages(struct zone
* platforms which require special recovery actions in that situation.
*/
};
#ifdef CONFIG_HIBERNATION
-@@ -245,7 +245,7 @@ extern void swsusp_set_page_free(struct
- extern void swsusp_unset_page_free(struct page *);
- extern unsigned long get_safe_page(gfp_t gfp_mask);
-
--extern void hibernation_set_ops(struct platform_hibernation_ops *ops);
-+extern void hibernation_set_ops(const struct platform_hibernation_ops *ops);
- extern int hibernate(void);
- extern bool system_entering_hibernation(void);
- #else /* CONFIG_HIBERNATION */
-@@ -253,7 +253,7 @@ static inline int swsusp_page_is_forbidd
- static inline void swsusp_set_page_free(struct page *p) {}
- static inline void swsusp_unset_page_free(struct page *p) {}
-
--static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
-+static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {}
- static inline int hibernate(void) { return -ENOSYS; }
- static inline bool system_entering_hibernation(void) { return false; }
- #endif /* CONFIG_HIBERNATION */
-diff -urNp linux-2.6.37.2/include/linux/sysctl.h linux-2.6.37.2/include/linux/sysctl.h
---- linux-2.6.37.2/include/linux/sysctl.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/sysctl.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/sysctl.h linux-2.6.38.1/include/linux/sysctl.h
+--- linux-2.6.38.1/include/linux/sysctl.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/sysctl.h 2011-03-21 18:31:35.000000000 -0400
@@ -155,7 +155,11 @@ enum
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
};
/* CTL_VM names: */
enum
-@@ -966,6 +970,8 @@ typedef int proc_handler (struct ctl_tab
+@@ -967,6 +971,8 @@ typedef int proc_handler (struct ctl_tab
extern int proc_dostring(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
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-2.6.37.2/include/linux/sysfs.h linux-2.6.37.2/include/linux/sysfs.h
---- linux-2.6.37.2/include/linux/sysfs.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/sysfs.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/sysfs.h linux-2.6.38.1/include/linux/sysfs.h
+--- linux-2.6.38.1/include/linux/sysfs.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/sysfs.h 2011-03-21 18:31:35.000000000 -0400
@@ -110,8 +110,8 @@ struct bin_attribute {
#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
};
struct sysfs_dirent;
-diff -urNp linux-2.6.37.2/include/linux/tty.h linux-2.6.37.2/include/linux/tty.h
---- linux-2.6.37.2/include/linux/tty.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/tty.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/tty.h linux-2.6.38.1/include/linux/tty.h
+--- linux-2.6.38.1/include/linux/tty.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/tty.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,8 @@
#include <linux/tty_driver.h>
#include <linux/tty_ldisc.h>
/* n_tty.c */
extern struct tty_ldisc_ops tty_ldisc_N_TTY;
-diff -urNp linux-2.6.37.2/include/linux/tty_ldisc.h linux-2.6.37.2/include/linux/tty_ldisc.h
---- linux-2.6.37.2/include/linux/tty_ldisc.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/tty_ldisc.h 2011-01-17 02:41:02.000000000 -0500
-@@ -147,7 +147,7 @@ struct tty_ldisc_ops {
+diff -urNp linux-2.6.38.1/include/linux/tty_ldisc.h linux-2.6.38.1/include/linux/tty_ldisc.h
+--- linux-2.6.38.1/include/linux/tty_ldisc.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/tty_ldisc.h 2011-03-21 18:31:35.000000000 -0400
+@@ -148,7 +148,7 @@ struct tty_ldisc_ops {
struct module *owner;
};
struct tty_ldisc {
-diff -urNp linux-2.6.37.2/include/linux/types.h linux-2.6.37.2/include/linux/types.h
---- linux-2.6.37.2/include/linux/types.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/types.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/types.h linux-2.6.38.1/include/linux/types.h
+--- linux-2.6.38.1/include/linux/types.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/types.h 2011-03-21 18:31:35.000000000 -0400
@@ -207,10 +207,26 @@ typedef struct {
int counter;
} atomic_t;
#endif
struct list_head {
-diff -urNp linux-2.6.37.2/include/linux/u64_stats_sync.h linux-2.6.37.2/include/linux/u64_stats_sync.h
---- linux-2.6.37.2/include/linux/u64_stats_sync.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/u64_stats_sync.h 2011-01-17 02:41:02.000000000 -0500
-@@ -67,21 +67,21 @@ struct u64_stats_sync {
- #endif
- };
-
--static void inline u64_stats_update_begin(struct u64_stats_sync *syncp)
-+static inline void u64_stats_update_begin(struct u64_stats_sync *syncp)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- write_seqcount_begin(&syncp->seq);
- #endif
- }
-
--static void inline u64_stats_update_end(struct u64_stats_sync *syncp)
-+static inline void u64_stats_update_end(struct u64_stats_sync *syncp)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- write_seqcount_end(&syncp->seq);
- #endif
- }
-
--static unsigned int inline u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
-+static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- return read_seqcount_begin(&syncp->seq);
-@@ -93,7 +93,7 @@ static unsigned int inline u64_stats_fet
- #endif
- }
-
--static bool inline u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
-+static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
- unsigned int start)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-@@ -112,7 +112,7 @@ static bool inline u64_stats_fetch_retry
- * - UP 32bit must disable BH.
- * - 64bit have no problem atomically reading u64 values, irq safe.
- */
--static unsigned int inline u64_stats_fetch_begin_bh(const struct u64_stats_sync *syncp)
-+static inline unsigned int u64_stats_fetch_begin_bh(const struct u64_stats_sync *syncp)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- return read_seqcount_begin(&syncp->seq);
-@@ -124,7 +124,7 @@ static unsigned int inline u64_stats_fet
- #endif
- }
-
--static bool inline u64_stats_fetch_retry_bh(const struct u64_stats_sync *syncp,
-+static inline bool u64_stats_fetch_retry_bh(const struct u64_stats_sync *syncp,
- unsigned int start)
- {
- #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-diff -urNp linux-2.6.37.2/include/linux/uaccess.h linux-2.6.37.2/include/linux/uaccess.h
---- linux-2.6.37.2/include/linux/uaccess.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/uaccess.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/uaccess.h linux-2.6.38.1/include/linux/uaccess.h
+--- linux-2.6.38.1/include/linux/uaccess.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/uaccess.h 2011-03-21 18:31:35.000000000 -0400
@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_
long ret; \
mm_segment_t old_fs = get_fs(); \
+extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size);
#endif /* __LINUX_UACCESS_H__ */
-diff -urNp linux-2.6.37.2/include/linux/unaligned/access_ok.h linux-2.6.37.2/include/linux/unaligned/access_ok.h
---- linux-2.6.37.2/include/linux/unaligned/access_ok.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/unaligned/access_ok.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/unaligned/access_ok.h linux-2.6.38.1/include/linux/unaligned/access_ok.h
+--- linux-2.6.38.1/include/linux/unaligned/access_ok.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/unaligned/access_ok.h 2011-03-21 18:31:35.000000000 -0400
@@ -6,32 +6,32 @@
static inline u16 get_unaligned_le16(const void *p)
}
static inline void put_unaligned_le16(u16 val, void *p)
-diff -urNp linux-2.6.37.2/include/linux/usb/hcd.h linux-2.6.37.2/include/linux/usb/hcd.h
---- linux-2.6.37.2/include/linux/usb/hcd.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/usb/hcd.h 2011-02-22 16:05:42.000000000 -0500
-@@ -581,7 +581,7 @@ struct usb_mon_operations {
+diff -urNp linux-2.6.38.1/include/linux/usb/hcd.h linux-2.6.38.1/include/linux/usb/hcd.h
+--- linux-2.6.38.1/include/linux/usb/hcd.h 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/include/linux/usb/hcd.h 2011-03-23 17:21:51.000000000 -0400
+@@ -589,7 +589,7 @@ struct usb_mon_operations {
/* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */
};
static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
{
-@@ -603,7 +603,7 @@ static inline void usbmon_urb_complete(s
+@@ -611,7 +611,7 @@ static inline void usbmon_urb_complete(s
(*mon_ops->urb_complete)(bus, urb, status);
}
void usb_mon_deregister(void);
#else
-diff -urNp linux-2.6.37.2/include/linux/vmalloc.h linux-2.6.37.2/include/linux/vmalloc.h
---- linux-2.6.37.2/include/linux/vmalloc.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/linux/vmalloc.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/vmalloc.h linux-2.6.38.1/include/linux/vmalloc.h
+--- linux-2.6.38.1/include/linux/vmalloc.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/vmalloc.h 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,11 @@ struct vm_area_struct; /* vma defining
#define VM_MAP 0x00000004 /* vmap()ed pages */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
/* bits [20..32] reserved for arch specific ioremap internals */
/*
-@@ -125,4 +130,103 @@ struct vm_struct **pcpu_get_vm_areas(con
+@@ -123,4 +128,103 @@ struct vm_struct **pcpu_get_vm_areas(con
void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
#endif
+})
+
#endif /* _LINUX_VMALLOC_H */
-diff -urNp linux-2.6.37.2/include/linux/vmstat.h linux-2.6.37.2/include/linux/vmstat.h
---- linux-2.6.37.2/include/linux/vmstat.h 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/include/linux/vmstat.h 2011-02-22 16:05:42.000000000 -0500
+diff -urNp linux-2.6.38.1/include/linux/vmstat.h linux-2.6.38.1/include/linux/vmstat.h
+--- linux-2.6.38.1/include/linux/vmstat.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/linux/vmstat.h 2011-03-21 18:31:35.000000000 -0400
@@ -140,18 +140,18 @@ static inline void vm_events_fold_cpu(in
/*
* Zone based page accounting with per cpu differentials.
#ifdef CONFIG_SMP
int cpu;
-@@ -270,8 +270,8 @@ static inline void __mod_zone_page_state
+@@ -273,8 +273,8 @@ static inline void __mod_zone_page_state
static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
}
static inline void __inc_zone_page_state(struct page *page,
-@@ -282,8 +282,8 @@ static inline void __inc_zone_page_state
+@@ -285,8 +285,8 @@ static inline void __inc_zone_page_state
static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
{
}
static inline void __dec_zone_page_state(struct page *page,
-diff -urNp linux-2.6.37.2/include/net/inetpeer.h linux-2.6.37.2/include/net/inetpeer.h
---- linux-2.6.37.2/include/net/inetpeer.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/inetpeer.h 2011-01-17 02:41:02.000000000 -0500
-@@ -30,8 +30,8 @@ struct inet_peer {
+diff -urNp linux-2.6.38.1/include/net/inetpeer.h linux-2.6.38.1/include/net/inetpeer.h
+--- linux-2.6.38.1/include/net/inetpeer.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/inetpeer.h 2011-03-21 18:31:35.000000000 -0400
+@@ -38,8 +38,8 @@ struct inet_peer {
*/
union {
struct {
__u32 tcp_ts;
__u32 tcp_ts_stamp;
};
-@@ -62,7 +62,7 @@ static inline __u16 inet_getid(struct in
+@@ -88,7 +88,7 @@ static inline __u16 inet_getid(struct in
{
more++;
inet_peer_refcheck(p);
}
#endif /* _NET_INETPEER_H */
-diff -urNp linux-2.6.37.2/include/net/irda/ircomm_tty.h linux-2.6.37.2/include/net/irda/ircomm_tty.h
---- linux-2.6.37.2/include/net/irda/ircomm_tty.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/irda/ircomm_tty.h 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/include/net/irda/ircomm_tty.h linux-2.6.38.1/include/net/irda/ircomm_tty.h
+--- linux-2.6.38.1/include/net/irda/ircomm_tty.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/irda/ircomm_tty.h 2011-03-21 18:31:35.000000000 -0400
@@ -35,6 +35,7 @@
#include <linux/termios.h>
#include <linux/timer.h>
/* Protect concurent access to :
* o self->open_count
-diff -urNp linux-2.6.37.2/include/net/neighbour.h linux-2.6.37.2/include/net/neighbour.h
---- linux-2.6.37.2/include/net/neighbour.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/neighbour.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/net/neighbour.h linux-2.6.38.1/include/net/neighbour.h
+--- linux-2.6.38.1/include/net/neighbour.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/neighbour.h 2011-03-21 18:31:35.000000000 -0400
@@ -118,12 +118,12 @@ struct neighbour {
struct neigh_ops {
};
struct pneigh_entry {
-diff -urNp linux-2.6.37.2/include/net/netlink.h linux-2.6.37.2/include/net/netlink.h
---- linux-2.6.37.2/include/net/netlink.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/netlink.h 2011-01-17 02:41:02.000000000 -0500
-@@ -558,7 +558,7 @@ static inline void *nlmsg_get_pos(struct
+diff -urNp linux-2.6.38.1/include/net/netlink.h linux-2.6.38.1/include/net/netlink.h
+--- linux-2.6.38.1/include/net/netlink.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/netlink.h 2011-03-21 18:31:35.000000000 -0400
+@@ -562,7 +562,7 @@ static inline void *nlmsg_get_pos(struct
static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
{
if (mark)
}
/**
-diff -urNp linux-2.6.37.2/include/net/sctp/sctp.h linux-2.6.37.2/include/net/sctp/sctp.h
---- linux-2.6.37.2/include/net/sctp/sctp.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/sctp/sctp.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/net/sctp/sctp.h linux-2.6.38.1/include/net/sctp/sctp.h
+--- linux-2.6.38.1/include/net/sctp/sctp.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/sctp/sctp.h 2011-03-21 18:31:35.000000000 -0400
@@ -316,9 +316,9 @@ do { \
#else /* SCTP_DEBUG */
#define SCTP_ENABLE_DEBUG
#define SCTP_DISABLE_DEBUG
#define SCTP_ASSERT(expr, str, func)
-diff -urNp linux-2.6.37.2/include/net/tcp.h linux-2.6.37.2/include/net/tcp.h
---- linux-2.6.37.2/include/net/tcp.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/tcp.h 2011-01-17 02:41:02.000000000 -0500
-@@ -1380,6 +1380,7 @@ enum tcp_seq_states {
+diff -urNp linux-2.6.38.1/include/net/tcp.h linux-2.6.38.1/include/net/tcp.h
+--- linux-2.6.38.1/include/net/tcp.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/tcp.h 2011-03-21 18:31:35.000000000 -0400
+@@ -1382,7 +1382,7 @@ enum tcp_seq_states {
struct tcp_seq_afinfo {
char *name;
sa_family_t family;
-+ /* cannot be const */
- struct file_operations seq_fops;
+- struct file_operations seq_fops;
++ struct file_operations seq_fops; /* cannot be const */
struct seq_operations seq_ops;
};
-diff -urNp linux-2.6.37.2/include/net/udp.h linux-2.6.37.2/include/net/udp.h
---- linux-2.6.37.2/include/net/udp.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/net/udp.h 2011-01-17 02:41:02.000000000 -0500
-@@ -223,6 +223,7 @@ struct udp_seq_afinfo {
+
+diff -urNp linux-2.6.38.1/include/net/udp.h linux-2.6.38.1/include/net/udp.h
+--- linux-2.6.38.1/include/net/udp.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/net/udp.h 2011-03-21 18:31:35.000000000 -0400
+@@ -223,7 +223,7 @@ struct udp_seq_afinfo {
char *name;
sa_family_t family;
struct udp_table *udp_table;
-+ /* cannot be const */
- struct file_operations seq_fops;
+- struct file_operations seq_fops;
++ struct file_operations seq_fops; /* cannot be const */
struct seq_operations seq_ops;
};
-diff -urNp linux-2.6.37.2/include/sound/ac97_codec.h linux-2.6.37.2/include/sound/ac97_codec.h
---- linux-2.6.37.2/include/sound/ac97_codec.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/sound/ac97_codec.h 2011-01-17 02:41:02.000000000 -0500
+
+diff -urNp linux-2.6.38.1/include/sound/ac97_codec.h linux-2.6.38.1/include/sound/ac97_codec.h
+--- linux-2.6.38.1/include/sound/ac97_codec.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/sound/ac97_codec.h 2011-03-21 18:31:35.000000000 -0400
@@ -419,15 +419,15 @@
struct snd_ac97;
};
struct snd_ac97_bus_ops {
-@@ -477,7 +477,7 @@ struct snd_ac97_template {
-
- struct snd_ac97 {
- /* -- lowlevel (hardware) driver specific -- */
-- struct snd_ac97_build_ops * build_ops;
-+ const struct snd_ac97_build_ops * build_ops;
- void *private_data;
- void (*private_free) (struct snd_ac97 *ac97);
- /* --- */
-diff -urNp linux-2.6.37.2/include/trace/events/irq.h linux-2.6.37.2/include/trace/events/irq.h
---- linux-2.6.37.2/include/trace/events/irq.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/trace/events/irq.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/trace/events/irq.h linux-2.6.38.1/include/trace/events/irq.h
+--- linux-2.6.38.1/include/trace/events/irq.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/trace/events/irq.h 2011-03-21 18:31:35.000000000 -0400
@@ -36,7 +36,7 @@ struct softirq_action;
*/
TRACE_EVENT(irq_handler_entry,
TP_ARGS(irq, action, ret),
-diff -urNp linux-2.6.37.2/include/video/uvesafb.h linux-2.6.37.2/include/video/uvesafb.h
---- linux-2.6.37.2/include/video/uvesafb.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/include/video/uvesafb.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/include/video/uvesafb.h linux-2.6.38.1/include/video/uvesafb.h
+--- linux-2.6.38.1/include/video/uvesafb.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/include/video/uvesafb.h 2011-03-21 18:31:35.000000000 -0400
@@ -177,6 +177,7 @@ struct uvesafb_par {
u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
u8 pmi_setpal; /* PMI for palette changes */
void *pmi_start;
void *pmi_pal;
u8 *vbe_state_orig; /*
-diff -urNp linux-2.6.37.2/init/do_mounts.c linux-2.6.37.2/init/do_mounts.c
---- linux-2.6.37.2/init/do_mounts.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/do_mounts.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/init/do_mounts.c linux-2.6.38.1/init/do_mounts.c
+--- linux-2.6.38.1/init/do_mounts.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/do_mounts.c 2011-03-21 18:31:35.000000000 -0400
@@ -287,7 +287,7 @@ static void __init get_fs_names(char *pa
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
+ sys_mount((__force char __user *)".", (__force char __user *)"/", NULL, MS_MOVE, NULL);
sys_chroot((const char __user __force *)".");
}
-diff -urNp linux-2.6.37.2/init/do_mounts.h linux-2.6.37.2/init/do_mounts.h
---- linux-2.6.37.2/init/do_mounts.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/do_mounts.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/init/do_mounts.h linux-2.6.38.1/init/do_mounts.h
+--- linux-2.6.38.1/init/do_mounts.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/do_mounts.h 2011-03-21 18:31:35.000000000 -0400
@@ -15,15 +15,15 @@ extern int root_mountflags;
static inline int create_dev(char *name, dev_t dev)
return 0;
if (!S_ISBLK(stat.st_mode))
return 0;
-diff -urNp linux-2.6.37.2/init/do_mounts_initrd.c linux-2.6.37.2/init/do_mounts_initrd.c
---- linux-2.6.37.2/init/do_mounts_initrd.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/do_mounts_initrd.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/init/do_mounts_initrd.c linux-2.6.38.1/init/do_mounts_initrd.c
+--- linux-2.6.38.1/init/do_mounts_initrd.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/do_mounts_initrd.c 2011-03-21 18:31:35.000000000 -0400
@@ -44,13 +44,13 @@ static void __init handle_initrd(void)
create_dev("/dev/root.old", Root_RAM0);
/* mount initrd on rootfs' /root */
+ sys_unlink((__force const char __user *)"/initrd.image");
return 0;
}
-diff -urNp linux-2.6.37.2/init/do_mounts_md.c linux-2.6.37.2/init/do_mounts_md.c
---- linux-2.6.37.2/init/do_mounts_md.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/do_mounts_md.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/init/do_mounts_md.c linux-2.6.38.1/init/do_mounts_md.c
+--- linux-2.6.38.1/init/do_mounts_md.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/do_mounts_md.c 2011-03-21 18:31:35.000000000 -0400
@@ -170,7 +170,7 @@ static void __init md_setup_drive(void)
partitioned ? "_d" : "", minor,
md_setup_args[ent].device_names);
sys_ioctl(fd, BLKRRPART, 0);
}
sys_close(fd);
-diff -urNp linux-2.6.37.2/init/initramfs.c linux-2.6.37.2/init/initramfs.c
---- linux-2.6.37.2/init/initramfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/initramfs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/init/initramfs.c linux-2.6.38.1/init/initramfs.c
+--- linux-2.6.38.1/init/initramfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/initramfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -74,7 +74,7 @@ static void __init free_hash(void)
}
}
state = SkipIt;
next_state = Reset;
return 0;
-diff -urNp linux-2.6.37.2/init/Kconfig linux-2.6.37.2/init/Kconfig
---- linux-2.6.37.2/init/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/Kconfig 2011-01-17 02:41:02.000000000 -0500
-@@ -1108,7 +1108,7 @@ config SLUB_DEBUG
+diff -urNp linux-2.6.38.1/init/Kconfig linux-2.6.38.1/init/Kconfig
+--- linux-2.6.38.1/init/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/Kconfig 2011-03-21 18:31:35.000000000 -0400
+@@ -1185,7 +1185,7 @@ config SLUB_DEBUG
config COMPAT_BRK
bool "Disable heap randomization"
help
Randomizing heap placement makes heap exploits harder, but it
also breaks ancient binaries (including anything libc5 based).
-diff -urNp linux-2.6.37.2/init/main.c linux-2.6.37.2/init/main.c
---- linux-2.6.37.2/init/main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/init/main.c 2011-01-17 02:41:02.000000000 -0500
-@@ -94,6 +94,7 @@ static inline void mark_rodata_ro(void)
- #ifdef CONFIG_TC
+diff -urNp linux-2.6.38.1/init/main.c linux-2.6.38.1/init/main.c
+--- linux-2.6.38.1/init/main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/init/main.c 2011-03-21 18:31:35.000000000 -0400
+@@ -96,6 +96,8 @@ static inline void mark_rodata_ro(void)
extern void tc_init(void);
#endif
-+extern void grsecurity_init(void);
- enum system_states system_state __read_mostly;
- EXPORT_SYMBOL(system_state);
-@@ -196,6 +197,47 @@ static int __init set_reset_devices(char
++extern void grsecurity_init(void);
++
+ /*
+ * 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
+@@ -206,6 +208,47 @@ static int __init set_reset_devices(char
__setup("reset_devices", set_reset_devices);
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;
-@@ -740,6 +782,7 @@ int __init_or_module do_one_initcall(ini
+@@ -751,6 +794,7 @@ int __init_or_module do_one_initcall(ini
{
int count = preempt_count();
int ret;
if (initcall_debug)
ret = do_one_initcall_debug(fn);
-@@ -752,15 +795,15 @@ int __init_or_module do_one_initcall(ini
+@@ -763,15 +807,15 @@ int __init_or_module do_one_initcall(ini
sprintf(msgbuf, "error code %d ", ret);
if (preempt_count() != count) {
}
return ret;
-@@ -889,7 +932,7 @@ static int __init kernel_init(void * unu
+@@ -898,7 +942,7 @@ static int __init kernel_init(void * unu
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
printk(KERN_WARNING "Warning: unable to open an initial console.\n");
(void) sys_dup(0);
-@@ -902,11 +945,13 @@ static int __init kernel_init(void * unu
+@@ -911,11 +955,13 @@ static int __init kernel_init(void * unu
if (!ramdisk_execute_command)
ramdisk_execute_command = "/init";
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
-diff -urNp linux-2.6.37.2/ipc/mqueue.c linux-2.6.37.2/ipc/mqueue.c
---- linux-2.6.37.2/ipc/mqueue.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/ipc/mqueue.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/ipc/mqueue.c linux-2.6.38.1/ipc/mqueue.c
+--- linux-2.6.38.1/ipc/mqueue.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/ipc/mqueue.c 2011-03-21 18:31:35.000000000 -0400
@@ -154,6 +154,7 @@ static struct inode *mqueue_get_inode(st
mq_bytes = (mq_msg_tblsz +
(info->attr.mq_maxmsg * info->attr.mq_msgsize));
spin_lock(&mq_lock);
if (u->mq_bytes + mq_bytes < u->mq_bytes ||
u->mq_bytes + mq_bytes >
-diff -urNp linux-2.6.37.2/ipc/shm.c linux-2.6.37.2/ipc/shm.c
---- linux-2.6.37.2/ipc/shm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/ipc/shm.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/ipc/shm.c linux-2.6.38.1/ipc/shm.c
+--- linux-2.6.38.1/ipc/shm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/ipc/shm.c 2011-03-21 18:31:35.000000000 -0400
@@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_name
static int sysvipc_shm_proc_show(struct seq_file *s, void *it);
#endif
shp->shm_segsz = size;
shp->shm_nattch = 0;
shp->shm_file = file;
-@@ -895,9 +911,21 @@ long do_shmat(int shmid, char __user *sh
+@@ -761,8 +777,6 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int,
+ case SHM_LOCK:
+ case SHM_UNLOCK:
+ {
+- struct file *uninitialized_var(shm_file);
+-
+ lru_add_drain_all(); /* drain pagevecs to lru lists */
+
+ shp = shm_lock_check(ns, shmid);
+@@ -895,9 +909,21 @@ long do_shmat(int shmid, char __user *sh
if (err)
goto out_unlock;
size = i_size_read(path.dentry->d_inode);
shm_unlock(shp);
-diff -urNp linux-2.6.37.2/kernel/acct.c linux-2.6.37.2/kernel/acct.c
---- linux-2.6.37.2/kernel/acct.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/acct.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/acct.c linux-2.6.38.1/kernel/acct.c
+--- linux-2.6.38.1/kernel/acct.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/acct.c 2011-03-21 18:31:35.000000000 -0400
@@ -570,7 +570,7 @@ static void do_acct_process(struct bsd_a
*/
flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
sizeof(acct_t), &file->f_pos);
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
-diff -urNp linux-2.6.37.2/kernel/capability.c linux-2.6.37.2/kernel/capability.c
---- linux-2.6.37.2/kernel/capability.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/kernel/capability.c 2011-02-27 14:50:12.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/capability.c linux-2.6.38.1/kernel/capability.c
+--- linux-2.6.38.1/kernel/capability.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/capability.c 2011-03-21 18:31:35.000000000 -0400
@@ -205,6 +205,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_
* before modification is attempted and the application
* fails.
+
EXPORT_SYMBOL(capable);
+EXPORT_SYMBOL(capable_nolog);
-diff -urNp linux-2.6.37.2/kernel/compat.c linux-2.6.37.2/kernel/compat.c
---- linux-2.6.37.2/kernel/compat.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/compat.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/compat.c linux-2.6.38.1/kernel/compat.c
+--- linux-2.6.38.1/kernel/compat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/compat.c 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,7 @@
#include <linux/linkage.h>
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/signal.h>
-diff -urNp linux-2.6.37.2/kernel/configs.c linux-2.6.37.2/kernel/configs.c
---- linux-2.6.37.2/kernel/configs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/configs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/configs.c linux-2.6.38.1/kernel/configs.c
+--- linux-2.6.38.1/kernel/configs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/configs.c 2011-03-21 18:31:35.000000000 -0400
@@ -74,8 +74,19 @@ static int __init ikconfig_init(void)
struct proc_dir_entry *entry;
if (!entry)
return -ENOMEM;
-diff -urNp linux-2.6.37.2/kernel/cred.c linux-2.6.37.2/kernel/cred.c
---- linux-2.6.37.2/kernel/cred.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/kernel/cred.c 2011-02-12 11:03:34.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/cred.c linux-2.6.38.1/kernel/cred.c
+--- linux-2.6.38.1/kernel/cred.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/cred.c 2011-03-21 18:31:35.000000000 -0400
@@ -483,6 +483,8 @@ int commit_creds(struct cred *new)
get_cred(new); /* we will require a ref for the subj creds too */
/* dumpability changes */
if (old->euid != new->euid ||
old->egid != new->egid ||
-diff -urNp linux-2.6.37.2/kernel/debug/debug_core.c linux-2.6.37.2/kernel/debug/debug_core.c
---- linux-2.6.37.2/kernel/debug/debug_core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/debug/debug_core.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/debug/debug_core.c linux-2.6.38.1/kernel/debug/debug_core.c
+--- linux-2.6.38.1/kernel/debug/debug_core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/debug/debug_core.c 2011-03-21 18:31:35.000000000 -0400
@@ -72,7 +72,7 @@ int kgdb_io_module_registered;
/* Guard for recursive entry */
static int exception_level;
{
BUG_ON(kgdb_connected);
-diff -urNp linux-2.6.37.2/kernel/debug/kdb/kdb_main.c linux-2.6.37.2/kernel/debug/kdb/kdb_main.c
---- linux-2.6.37.2/kernel/debug/kdb/kdb_main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/debug/kdb/kdb_main.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/debug/kdb/kdb_main.c linux-2.6.38.1/kernel/debug/kdb/kdb_main.c
+--- linux-2.6.38.1/kernel/debug/kdb/kdb_main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/debug/kdb/kdb_main.c 2011-03-21 18:31:35.000000000 -0400
@@ -1980,7 +1980,7 @@ static int kdb_lsmod(int argc, const cha
list_for_each_entry(mod, kdb_modules, list) {
#ifdef CONFIG_MODULE_UNLOAD
{
-diff -urNp linux-2.6.37.2/kernel/exit.c linux-2.6.37.2/kernel/exit.c
---- linux-2.6.37.2/kernel/exit.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/exit.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/exit.c linux-2.6.38.1/kernel/exit.c
+--- linux-2.6.38.1/kernel/exit.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/exit.c 2011-03-21 18:31:35.000000000 -0400
@@ -57,6 +57,10 @@
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
exit_mm(tsk);
if (group_dead)
-diff -urNp linux-2.6.37.2/kernel/fork.c linux-2.6.37.2/kernel/fork.c
---- linux-2.6.37.2/kernel/fork.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/fork.c 2011-01-17 02:41:02.000000000 -0500
-@@ -278,7 +278,7 @@ static struct task_struct *dup_task_stru
+diff -urNp linux-2.6.38.1/kernel/fork.c linux-2.6.38.1/kernel/fork.c
+--- linux-2.6.38.1/kernel/fork.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/fork.c 2011-03-21 18:31:35.000000000 -0400
+@@ -280,7 +280,7 @@ static struct task_struct *dup_task_stru
*stackend = STACK_END_MAGIC; /* for overflow detection */
#ifdef CONFIG_CC_STACKPROTECTOR
#endif
/* One for us, one for whoever does the "release_task()" (usually parent) */
-@@ -300,13 +300,78 @@ out:
+@@ -302,13 +302,78 @@ out:
}
#ifdef CONFIG_MMU
down_write(&oldmm->mmap_sem);
flush_cache_dup_mm(oldmm);
-@@ -318,8 +383,8 @@ static int dup_mmap(struct mm_struct *mm
+@@ -320,8 +385,8 @@ static int dup_mmap(struct mm_struct *mm
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
mm->map_count = 0;
cpumask_clear(mm_cpumask(mm));
mm->mm_rb = RB_ROOT;
-@@ -332,8 +397,6 @@ static int dup_mmap(struct mm_struct *mm
+@@ -337,8 +402,6 @@ static int dup_mmap(struct mm_struct *mm
prev = NULL;
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
if (mpnt->vm_flags & VM_DONTCOPY) {
long pages = vma_pages(mpnt);
mm->total_vm -= pages;
-@@ -341,56 +404,13 @@ static int dup_mmap(struct mm_struct *mm
+@@ -346,56 +409,13 @@ static int dup_mmap(struct mm_struct *mm
-pages);
continue;
}
* Link in the new vma and copy the page table entries.
*/
*pprev = tmp;
-@@ -411,6 +431,31 @@ static int dup_mmap(struct mm_struct *mm
+@@ -416,6 +436,31 @@ static int dup_mmap(struct mm_struct *mm
if (retval)
goto out;
}
/* a new mm has just been created */
arch_dup_mmap(oldmm, mm);
retval = 0;
-@@ -419,14 +464,6 @@ out:
+@@ -424,14 +469,6 @@ out:
flush_tlb_mm(oldmm);
up_write(&oldmm->mmap_sem);
return retval;
}
static inline int mm_alloc_pgd(struct mm_struct * mm)
-@@ -765,13 +802,14 @@ static int copy_fs(unsigned long clone_f
+@@ -778,13 +815,14 @@ static int copy_fs(unsigned long clone_f
spin_unlock(&fs->lock);
return -EAGAIN;
}
return 0;
}
-@@ -1027,10 +1065,13 @@ static struct task_struct *copy_process(
+@@ -1042,10 +1080,13 @@ static struct task_struct *copy_process(
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
retval = -EAGAIN;
goto bad_fork_free;
}
-@@ -1184,6 +1225,8 @@ static struct task_struct *copy_process(
+@@ -1199,6 +1240,8 @@ static struct task_struct *copy_process(
goto bad_fork_free_pid;
}
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
/*
* Clear TID on mm_release()?
-@@ -1341,6 +1384,8 @@ bad_fork_cleanup_count:
+@@ -1356,6 +1399,8 @@ bad_fork_cleanup_count:
bad_fork_free:
free_task(p);
fork_out:
return ERR_PTR(retval);
}
-@@ -1446,6 +1491,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1444,6 +1489,8 @@ long do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_PARENT_SETTID)
put_user(nr, parent_tidptr);
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
-@@ -1570,7 +1617,7 @@ static int unshare_fs(unsigned long unsh
+@@ -1559,7 +1606,7 @@ static int unshare_fs(unsigned long unsh
return 0;
/* don't need lock here; in the worst case we'll do useless copy */
return 0;
*new_fsp = copy_fs_struct(fs);
-@@ -1693,7 +1740,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
+@@ -1682,7 +1729,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
fs = current->fs;
spin_lock(&fs->lock);
current->fs = new_fs;
new_fs = NULL;
else
new_fs = fs;
-diff -urNp linux-2.6.37.2/kernel/futex.c linux-2.6.37.2/kernel/futex.c
---- linux-2.6.37.2/kernel/futex.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/futex.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/futex.c linux-2.6.38.1/kernel/futex.c
+--- linux-2.6.38.1/kernel/futex.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/futex.c 2011-03-21 18:31:35.000000000 -0400
@@ -54,6 +54,7 @@
#include <linux/mount.h>
#include <linux/pagemap.h>
#include <linux/signal.h>
#include <linux/module.h>
#include <linux/magic.h>
-@@ -222,6 +223,11 @@ get_futex_key(u32 __user *uaddr, int fsh
- struct page *page;
+@@ -236,6 +237,11 @@ get_futex_key(u32 __user *uaddr, int fsh
+ struct page *page, *page_head;
int err;
+#ifdef CONFIG_PAX_SEGMEXEC
/*
* The futex address must be "naturally" aligned.
*/
-@@ -2384,7 +2390,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2404,7 +2410,9 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
{
struct robust_list_head __user *head;
unsigned long ret;
if (!futex_cmpxchg_enabled)
return -ENOSYS;
-@@ -2400,11 +2408,16 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
+@@ -2420,11 +2428,16 @@ SYSCALL_DEFINE3(get_robust_list, int, pi
if (!p)
goto err_unlock;
ret = -EPERM;
head = p->robust_list;
rcu_read_unlock();
}
-@@ -2648,6 +2661,7 @@ static int __init futex_init(void)
+@@ -2667,6 +2680,7 @@ static int __init futex_init(void)
{
u32 curval;
int i;
/*
* This will fail and we want it. Some arch implementations do
-@@ -2659,7 +2673,10 @@ static int __init futex_init(void)
+@@ -2678,7 +2692,10 @@ static int __init futex_init(void)
* implementation, the non-functional ones will return
* -ENOSYS.
*/
if (curval == -EFAULT)
futex_cmpxchg_enabled = 1;
-diff -urNp linux-2.6.37.2/kernel/futex_compat.c linux-2.6.37.2/kernel/futex_compat.c
---- linux-2.6.37.2/kernel/futex_compat.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/futex_compat.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/futex_compat.c linux-2.6.38.1/kernel/futex_compat.c
+--- linux-2.6.38.1/kernel/futex_compat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/futex_compat.c 2011-03-21 18:31:35.000000000 -0400
@@ -10,6 +10,7 @@
#include <linux/compat.h>
#include <linux/nsproxy.h>
head = p->compat_robust_list;
rcu_read_unlock();
}
-diff -urNp linux-2.6.37.2/kernel/gcov/base.c linux-2.6.37.2/kernel/gcov/base.c
---- linux-2.6.37.2/kernel/gcov/base.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/gcov/base.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/gcov/base.c linux-2.6.38.1/kernel/gcov/base.c
+--- linux-2.6.38.1/kernel/gcov/base.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/gcov/base.c 2011-03-21 18:31:35.000000000 -0400
@@ -102,11 +102,6 @@ void gcov_enable_events(void)
}
if (prev)
prev->next = info->next;
else
-diff -urNp linux-2.6.37.2/kernel/hrtimer.c linux-2.6.37.2/kernel/hrtimer.c
---- linux-2.6.37.2/kernel/hrtimer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/hrtimer.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1401,7 +1401,7 @@ void hrtimer_peek_ahead_timers(void)
+diff -urNp linux-2.6.38.1/kernel/hrtimer.c linux-2.6.38.1/kernel/hrtimer.c
+--- linux-2.6.38.1/kernel/hrtimer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/hrtimer.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1371,7 +1371,7 @@ void hrtimer_peek_ahead_timers(void)
local_irq_restore(flags);
}
{
hrtimer_peek_ahead_timers();
}
-diff -urNp linux-2.6.37.2/kernel/jump_label.c linux-2.6.37.2/kernel/jump_label.c
---- linux-2.6.37.2/kernel/jump_label.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/jump_label.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/jump_label.c linux-2.6.38.1/kernel/jump_label.c
+--- linux-2.6.38.1/kernel/jump_label.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/jump_label.c 2011-03-21 18:31:35.000000000 -0400
@@ -49,6 +49,17 @@ void jump_label_unlock(void)
mutex_unlock(&jump_label_mutex);
}
iter++;
}
}
-diff -urNp linux-2.6.37.2/kernel/kallsyms.c linux-2.6.37.2/kernel/kallsyms.c
---- linux-2.6.37.2/kernel/kallsyms.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/kallsyms.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/kallsyms.c linux-2.6.38.1/kernel/kallsyms.c
+--- linux-2.6.38.1/kernel/kallsyms.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/kallsyms.c 2011-03-21 18:31:35.000000000 -0400
@@ -11,6 +11,9 @@
* Changed the compression method from stem compression to "table lookup"
* compression (see scripts/kallsyms.c for a more complete description)
if (!iter)
return -ENOMEM;
reset_iter(iter, 0);
-diff -urNp linux-2.6.37.2/kernel/kmod.c linux-2.6.37.2/kernel/kmod.c
---- linux-2.6.37.2/kernel/kmod.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/kmod.c 2011-02-12 10:56:18.000000000 -0500
-@@ -90,6 +90,28 @@ int __request_module(bool wait, const ch
+diff -urNp linux-2.6.38.1/kernel/kmod.c linux-2.6.38.1/kernel/kmod.c
+--- linux-2.6.38.1/kernel/kmod.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/kmod.c 2011-03-26 13:28:34.000000000 -0400
+@@ -90,6 +90,18 @@ int __request_module(bool wait, const ch
if (ret)
return ret;
+ auto-loaded
+ */
+ if (current_uid()) {
-+#if !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
-+ /* There are known knowns. These are things we know
-+ that we know. There are known unknowns. That is to say,
-+ there are things that we know we don't know. But there are
-+ also unknown unknowns. There are things we don't know
-+ we don't know.
-+ This here is a known unknown.
-+ */
-+ if (strcmp(module_name, "net-pf-10"))
-+#endif
-+ gr_log_nonroot_mod_load(module_name);
++ gr_log_nonroot_mod_load(module_name);
+ return -EPERM;
+ }
+#endif
/* 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
-diff -urNp linux-2.6.37.2/kernel/kprobes.c linux-2.6.37.2/kernel/kprobes.c
---- linux-2.6.37.2/kernel/kprobes.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/kprobes.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/kprobes.c linux-2.6.38.1/kernel/kprobes.c
+--- linux-2.6.38.1/kernel/kprobes.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/kprobes.c 2011-03-21 18:31:35.000000000 -0400
@@ -185,7 +185,7 @@ static kprobe_opcode_t __kprobes *__get_
* kernel image and loaded module images reside. This is required
* so x86_64 can correctly handle the %rip-relative fixups.
kfree(kip);
}
return 1;
-@@ -1724,7 +1724,7 @@ static int __init init_kprobes(void)
+@@ -1936,7 +1936,7 @@ static int __init init_kprobes(void)
{
int i, err = 0;
unsigned long offset = 0, size = 0;
const char *symbol_name;
void *addr;
struct kprobe_blackpoint *kb;
-@@ -1850,7 +1850,7 @@ static int __kprobes show_kprobe_addr(st
+@@ -2062,7 +2062,7 @@ static int __kprobes show_kprobe_addr(st
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
head = &kprobe_table[i];
preempt_disable();
-diff -urNp linux-2.6.37.2/kernel/lockdep.c linux-2.6.37.2/kernel/lockdep.c
---- linux-2.6.37.2/kernel/lockdep.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/lockdep.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/lockdep.c linux-2.6.38.1/kernel/lockdep.c
+--- linux-2.6.38.1/kernel/lockdep.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/lockdep.c 2011-03-21 18:31:35.000000000 -0400
@@ -571,6 +571,10 @@ static int static_obj(void *obj)
end = (unsigned long) &_end,
addr = (unsigned long) obj;
printk("the code is fine but needs lockdep annotation.\n");
printk("turning off the locking correctness validator.\n");
dump_stack();
-@@ -2768,7 +2773,7 @@ static int __lock_acquire(struct lockdep
+@@ -2752,7 +2757,7 @@ static int __lock_acquire(struct lockdep
if (!class)
return 0;
}
if (very_verbose(class)) {
printk("\nacquire class [%p] %s", class->key, class->name);
if (class->name_version > 1)
-diff -urNp linux-2.6.37.2/kernel/lockdep_proc.c linux-2.6.37.2/kernel/lockdep_proc.c
---- linux-2.6.37.2/kernel/lockdep_proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/lockdep_proc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/lockdep_proc.c linux-2.6.38.1/kernel/lockdep_proc.c
+--- linux-2.6.38.1/kernel/lockdep_proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/lockdep_proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, v
static void print_name(struct seq_file *m, struct lock_class *class)
const char *name = class->name;
if (!name) {
-diff -urNp linux-2.6.37.2/kernel/module.c linux-2.6.37.2/kernel/module.c
---- linux-2.6.37.2/kernel/module.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/module.c 2011-02-02 20:28:40.000000000 -0500
-@@ -97,7 +97,8 @@ static BLOCKING_NOTIFIER_HEAD(module_not
+diff -urNp linux-2.6.38.1/kernel/module.c linux-2.6.38.1/kernel/module.c
+--- linux-2.6.38.1/kernel/module.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/module.c 2011-03-21 18:31:35.000000000 -0400
+@@ -118,7 +118,8 @@ static BLOCKING_NOTIFIER_HEAD(module_not
/* Bounds of module allocation, for speeding __module_address.
* Protected by module_mutex. */
int register_module_notifier(struct notifier_block * nb)
{
-@@ -261,7 +262,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -282,7 +283,7 @@ bool each_symbol(bool (*fn)(const struct
return true;
list_for_each_entry_rcu(mod, &modules, list) {
{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
NOT_GPL_ONLY, false },
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -283,7 +284,7 @@ bool each_symbol(bool (*fn)(const struct
+@@ -304,7 +305,7 @@ bool each_symbol(bool (*fn)(const struct
#endif
};
return true;
}
return false;
-@@ -394,7 +395,7 @@ static inline void __percpu *mod_percpu(
+@@ -415,7 +416,7 @@ static inline void __percpu *mod_percpu(
static int percpu_modalloc(struct module *mod,
unsigned long size, unsigned long align)
{
printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
mod->name, align, PAGE_SIZE);
align = PAGE_SIZE;
-@@ -1122,7 +1123,7 @@ resolve_symbol_wait(struct module *mod,
+@@ -1143,7 +1144,7 @@ resolve_symbol_wait(struct module *mod,
*/
#ifdef CONFIG_SYSFS
static inline bool sect_empty(const Elf_Shdr *sect)
{
return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
-@@ -1566,15 +1567,18 @@ static void free_module(struct module *m
+@@ -1612,17 +1613,17 @@ void unset_section_ro_nx(struct module *
+ {
+ unsigned long total_pages;
+
+- if (mod->module_core == module_region) {
++ if (mod->module_core_rx == module_region) {
+ /* Set core as NX+RW */
+- total_pages = MOD_NUMBER_OF_PAGES(mod->module_core, mod->core_size);
+- set_memory_nx((unsigned long)mod->module_core, total_pages);
+- set_memory_rw((unsigned long)mod->module_core, total_pages);
++ total_pages = MOD_NUMBER_OF_PAGES(mod->module_core_rx, mod->core_size_rx);
++ set_memory_nx((unsigned long)mod->module_core_rx, total_pages);
++ set_memory_rw((unsigned long)mod->module_core_rx, total_pages);
+
+- } else if (mod->module_init == module_region) {
++ } else if (mod->module_init_rx == module_region) {
+ /* Set init as NX+RW */
+- total_pages = MOD_NUMBER_OF_PAGES(mod->module_init, mod->init_size);
+- set_memory_nx((unsigned long)mod->module_init, total_pages);
+- set_memory_rw((unsigned long)mod->module_init, total_pages);
++ total_pages = MOD_NUMBER_OF_PAGES(mod->module_init_rx, mod->init_size_rx);
++ set_memory_nx((unsigned long)mod->module_init_rx, total_pages);
++ set_memory_rw((unsigned long)mod->module_init_rx, total_pages);
+ }
+ }
+
+@@ -1633,14 +1634,14 @@ void set_all_modules_text_rw()
+
+ mutex_lock(&module_mutex);
+ list_for_each_entry_rcu(mod, &modules, list) {
+- if ((mod->module_core) && (mod->core_text_size)) {
+- set_page_attributes(mod->module_core,
+- mod->module_core + mod->core_text_size,
++ if ((mod->module_core_rx) && (mod->core_size_rx)) {
++ set_page_attributes(mod->module_core_rx,
++ mod->module_core_rx + mod->core_size_rx,
+ set_memory_rw);
+ }
+- if ((mod->module_init) && (mod->init_text_size)) {
+- set_page_attributes(mod->module_init,
+- mod->module_init + mod->init_text_size,
++ if ((mod->module_init_rx) && (mod->init_size_rx)) {
++ set_page_attributes(mod->module_init_rx,
++ mod->module_init_rx + mod->init_size_rx,
+ set_memory_rw);
+ }
+ }
+@@ -1654,14 +1655,14 @@ void set_all_modules_text_ro()
+
+ mutex_lock(&module_mutex);
+ list_for_each_entry_rcu(mod, &modules, list) {
+- if ((mod->module_core) && (mod->core_text_size)) {
+- set_page_attributes(mod->module_core,
+- mod->module_core + mod->core_text_size,
++ if ((mod->module_core_rx) && (mod->core_size_rx)) {
++ set_page_attributes(mod->module_core_rx,
++ mod->module_core_rx + mod->core_size_rx,
+ set_memory_ro);
+ }
+- if ((mod->module_init) && (mod->init_text_size)) {
+- set_page_attributes(mod->module_init,
+- mod->module_init + mod->init_text_size,
++ if ((mod->module_init_rx) && (mod->init_size_rx)) {
++ set_page_attributes(mod->module_init_rx,
++ mod->module_init_rx + mod->init_size_rx,
+ set_memory_ro);
+ }
+ }
+@@ -1696,17 +1697,20 @@ static void free_module(struct module *m
destroy_params(mod->kp, mod->num_kp);
/* This may be NULL, but that's OK */
+- unset_section_ro_nx(mod, mod->module_init);
- module_free(mod, mod->module_init);
++ unset_section_ro_nx(mod, mod->module_init_rx);
+ module_free(mod, mod->module_init_rw);
+ module_free_exec(mod, mod->module_init_rx);
kfree(mod->args);
+ lockdep_free_key_range(mod->module_core_rw, mod->core_size_rw);
/* Finally, free the core (containing the module structure) */
+- unset_section_ro_nx(mod, mod->module_core);
- module_free(mod, mod->module_core);
++ unset_section_ro_nx(mod, mod->module_core_rx);
+ module_free_exec(mod, mod->module_core_rx);
+ module_free(mod, mod->module_core_rw);
#ifdef CONFIG_MPU
update_protections(current->mm);
-@@ -1667,7 +1671,9 @@ static int simplify_symbols(struct modul
+@@ -1799,7 +1803,9 @@ static int simplify_symbols(struct modul
ksym = resolve_symbol_wait(mod, info, name);
/* Ok if resolved. */
if (ksym && !IS_ERR(ksym)) {
break;
}
-@@ -1686,7 +1692,9 @@ static int simplify_symbols(struct modul
+@@ -1818,7 +1824,9 @@ static int simplify_symbols(struct modul
secbase = (unsigned long)mod_percpu(mod);
else
secbase = info->sechdrs[sym[i].st_shndx].sh_addr;
break;
}
}
-@@ -1774,11 +1782,12 @@ static void layout_sections(struct modul
+@@ -1906,22 +1914,12 @@ static void layout_sections(struct modul
|| s->sh_entsize != ~0UL
|| strstarts(sname, ".init"))
continue;
+ s->sh_entsize = get_offset(mod, &mod->core_size_rx, s, i);
DEBUGP("\t%s\n", name);
}
-- if (m == 0)
+- switch (m) {
+- case 0: /* executable */
+- mod->core_size = debug_align(mod->core_size);
- mod->core_text_size = mod->core_size;
+- break;
+- case 1: /* RO: text and ro-data */
+- mod->core_size = debug_align(mod->core_size);
+- mod->core_ro_size = mod->core_size;
+- break;
+- case 3: /* whole core */
+- mod->core_size = debug_align(mod->core_size);
+- break;
+- }
}
DEBUGP("Init section allocation order:\n");
-@@ -1792,12 +1801,13 @@ static void layout_sections(struct modul
+@@ -1935,23 +1933,13 @@ static void layout_sections(struct modul
|| s->sh_entsize != ~0UL
|| !strstarts(sname, ".init"))
continue;
+ s->sh_entsize |= INIT_OFFSET_MASK;
DEBUGP("\t%s\n", sname);
}
-- if (m == 0)
+- switch (m) {
+- case 0: /* executable */
+- mod->init_size = debug_align(mod->init_size);
- mod->init_text_size = mod->init_size;
+- break;
+- case 1: /* RO: text and ro-data */
+- mod->init_size = debug_align(mod->init_size);
+- mod->init_ro_size = mod->init_size;
+- break;
+- case 3: /* whole init */
+- mod->init_size = debug_align(mod->init_size);
+- break;
+- }
}
}
-@@ -1965,7 +1975,7 @@ static void layout_symtab(struct module
+@@ -2119,7 +2107,7 @@ static void layout_symtab(struct module
/* Put symbol section at end of init part of module. */
symsect->sh_flags |= SHF_ALLOC;
info->index.sym) | INIT_OFFSET_MASK;
DEBUGP("\t%s\n", info->secstrings + symsect->sh_name);
-@@ -1982,19 +1992,19 @@ static void layout_symtab(struct module
+@@ -2136,19 +2124,19 @@ static void layout_symtab(struct module
}
/* Append room for core symbols at end of core part. */
}
static void add_kallsyms(struct module *mod, const struct load_info *info)
-@@ -2010,11 +2020,13 @@ static void add_kallsyms(struct module *
+@@ -2164,11 +2152,13 @@ static void add_kallsyms(struct module *
/* Make sure we get permanent strtab: don't use info->strtab. */
mod->strtab = (void *)info->sechdrs[info->index.str].sh_addr;
src = mod->symtab;
*dst = *src;
for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) {
-@@ -2027,10 +2039,12 @@ static void add_kallsyms(struct module *
+@@ -2181,10 +2171,12 @@ static void add_kallsyms(struct module *
}
mod->core_num_syms = ndst;
}
#else
static inline void layout_symtab(struct module *mod, struct load_info *info)
-@@ -2059,17 +2073,33 @@ static void dynamic_debug_remove(struct
+@@ -2213,17 +2205,33 @@ static void dynamic_debug_remove(struct
ddebug_remove_module(debug->modname);
}
mutex_unlock(&module_mutex);
}
return ret;
-@@ -2362,7 +2392,7 @@ static int move_module(struct module *mo
+@@ -2516,7 +2524,7 @@ static int move_module(struct module *mo
void *ptr;
/* Do the allocs. */
/*
* The pointer to this block is stored in the module structure
* which is inside the block. Just mark it as not being a
-@@ -2372,23 +2402,50 @@ static int move_module(struct module *mo
+@@ -2526,23 +2534,50 @@ static int move_module(struct module *mo
if (!ptr)
return -ENOMEM;
+ kmemleak_not_leak(ptr);
+ if (!ptr && mod->init_size_rw) {
+ module_free(mod, mod->module_core_rw);
-+ return -ENOMEM;
-+ }
+ return -ENOMEM;
+ }
+- memset(ptr, 0, mod->init_size);
+- mod->module_init = ptr;
+ memset(ptr, 0, mod->init_size_rw);
+ mod->module_init_rw = ptr;
+
+ module_free_exec(mod, mod->module_core_rx);
+ module_free(mod, mod->module_init_rw);
+ module_free(mod, mod->module_core_rw);
- return -ENOMEM;
- }
-- memset(ptr, 0, mod->init_size);
-- mod->module_init = ptr;
++ return -ENOMEM;
++ }
+
+ pax_open_kernel();
+ memset(ptr, 0, mod->init_size_rx);
/* Transfer each section which specifies SHF_ALLOC */
DEBUGP("final section addresses:\n");
-@@ -2399,16 +2456,45 @@ static int move_module(struct module *mo
+@@ -2553,16 +2588,45 @@ static int move_module(struct module *mo
if (!(shdr->sh_flags & SHF_ALLOC))
continue;
DEBUGP("\t0x%lx %s\n",
shdr->sh_addr, info->secstrings + shdr->sh_name);
}
-@@ -2459,12 +2545,12 @@ static void flush_module_icache(const st
+@@ -2613,12 +2677,12 @@ static void flush_module_icache(const st
* Do it before processing of module parameters, so the module
* can provide parameter accessor functions of its own.
*/
set_fs(old_fs);
}
-@@ -2536,8 +2622,10 @@ static void module_deallocate(struct mod
+@@ -2690,8 +2754,10 @@ static void module_deallocate(struct mod
{
kfree(info->strmap);
percpu_modfree(mod);
}
static int post_relocation(struct module *mod, const struct load_info *info)
-@@ -2765,10 +2853,12 @@ SYSCALL_DEFINE3(init_module, void __user
+@@ -2877,16 +2943,16 @@ SYSCALL_DEFINE3(init_module, void __user
+ MODULE_STATE_COMING, mod);
+
+ /* Set RO and NX regions for core */
+- set_section_ro_nx(mod->module_core,
+- mod->core_text_size,
+- mod->core_ro_size,
+- mod->core_size);
++ set_section_ro_nx(mod->module_core_rx,
++ mod->core_size_rx,
++ mod->core_size_rx,
++ mod->core_size_rx);
+
+ /* Set RO and NX regions for init */
+- set_section_ro_nx(mod->module_init,
+- mod->init_text_size,
+- mod->init_ro_size,
+- mod->init_size);
++ set_section_ro_nx(mod->module_init_rx,
++ mod->init_size_rx,
++ mod->init_size_rx,
++ mod->init_size_rx);
+
+ do_mod_ctors(mod);
+ /* Start the module */
+@@ -2931,11 +2997,13 @@ SYSCALL_DEFINE3(init_module, void __user
mod->symtab = mod->core_symtab;
mod->strtab = mod->core_strtab;
#endif
+- unset_section_ro_nx(mod, mod->module_init);
- module_free(mod, mod->module_init);
- mod->module_init = NULL;
- mod->init_size = 0;
- mod->init_text_size = 0;
++ unset_section_ro_nx(mod, mod->module_init_rx);
+ module_free(mod, mod->module_init_rw);
+ module_free_exec(mod, mod->module_init_rx);
+ mod->module_init_rw = NULL;
mutex_unlock(&module_mutex);
return 0;
-@@ -2799,10 +2889,16 @@ static const char *get_ksymbol(struct mo
+@@ -2966,10 +3034,16 @@ static const char *get_ksymbol(struct mo
unsigned long nextval;
/* At worse, next value is at end of module */
/* Scan for closest preceeding symbol, and next symbol. (ELF
starts real symbols at 1). */
-@@ -3048,7 +3144,7 @@ static int m_show(struct seq_file *m, vo
+@@ -3215,7 +3289,7 @@ static int m_show(struct seq_file *m, vo
char buf[8];
seq_printf(m, "%s %u",
print_unload_info(m, mod);
/* Informative for users. */
-@@ -3057,7 +3153,7 @@ static int m_show(struct seq_file *m, vo
+@@ -3224,7 +3298,7 @@ static int m_show(struct seq_file *m, vo
mod->state == MODULE_STATE_COMING ? "Loading":
"Live");
/* Used by oprofile and other similar tools. */
/* Taints info */
if (mod->taints)
-@@ -3093,7 +3189,17 @@ static const struct file_operations proc
+@@ -3260,7 +3334,17 @@ static const struct file_operations proc
static int __init proc_modules_init(void)
{
return 0;
}
module_init(proc_modules_init);
-@@ -3152,12 +3258,12 @@ struct module *__module_address(unsigned
+@@ -3319,12 +3403,12 @@ struct module *__module_address(unsigned
{
struct module *mod;
return mod;
return NULL;
}
-@@ -3191,11 +3297,20 @@ bool is_module_text_address(unsigned lon
+@@ -3358,11 +3442,20 @@ bool is_module_text_address(unsigned lon
*/
struct module *__module_text_address(unsigned long addr)
{
mod = NULL;
}
return mod;
-diff -urNp linux-2.6.37.2/kernel/panic.c linux-2.6.37.2/kernel/panic.c
---- linux-2.6.37.2/kernel/panic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/panic.c 2011-01-17 02:41:02.000000000 -0500
-@@ -368,7 +368,7 @@ static void warn_slowpath_common(const c
+diff -urNp linux-2.6.38.1/kernel/panic.c linux-2.6.38.1/kernel/panic.c
+--- linux-2.6.38.1/kernel/panic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/panic.c 2011-03-21 18:31:35.000000000 -0400
+@@ -369,7 +369,7 @@ static void warn_slowpath_common(const c
const char *board;
printk(KERN_WARNING "------------[ cut here ]------------\n");
board = dmi_get_system_info(DMI_PRODUCT_NAME);
if (board)
printk(KERN_WARNING "Hardware name: %s\n", board);
-@@ -423,7 +423,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
+@@ -424,7 +424,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
*/
void __stack_chk_fail(void)
{
__builtin_return_address(0));
}
EXPORT_SYMBOL(__stack_chk_fail);
-diff -urNp linux-2.6.37.2/kernel/pid.c linux-2.6.37.2/kernel/pid.c
---- linux-2.6.37.2/kernel/pid.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/pid.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/pid.c linux-2.6.38.1/kernel/pid.c
+--- linux-2.6.38.1/kernel/pid.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/pid.c 2011-03-21 18:31:35.000000000 -0400
@@ -33,6 +33,7 @@
#include <linux/rculist.h>
#include <linux/bootmem.h>
}
struct task_struct *find_task_by_vpid(pid_t vnr)
-diff -urNp linux-2.6.37.2/kernel/posix-cpu-timers.c linux-2.6.37.2/kernel/posix-cpu-timers.c
---- linux-2.6.37.2/kernel/posix-cpu-timers.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/posix-cpu-timers.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/posix-cpu-timers.c linux-2.6.38.1/kernel/posix-cpu-timers.c
+--- linux-2.6.38.1/kernel/posix-cpu-timers.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/posix-cpu-timers.c 2011-03-21 18:31:35.000000000 -0400
@@ -6,6 +6,7 @@
#include <linux/posix-timers.h>
#include <linux/errno.h>
#include <asm/uaccess.h>
#include <linux/kernel_stat.h>
#include <trace/events/timer.h>
-diff -urNp linux-2.6.37.2/kernel/posix-timers.c linux-2.6.37.2/kernel/posix-timers.c
---- linux-2.6.37.2/kernel/posix-timers.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/posix-timers.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/posix-timers.c linux-2.6.38.1/kernel/posix-timers.c
+--- linux-2.6.38.1/kernel/posix-timers.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/posix-timers.c 2011-03-21 18:31:35.000000000 -0400
@@ -42,6 +42,7 @@
#include <linux/compiler.h>
#include <linux/idr.h>
#include <linux/syscalls.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
-@@ -949,6 +950,13 @@ SYSCALL_DEFINE2(clock_settime, const clo
+@@ -955,6 +956,13 @@ SYSCALL_DEFINE2(clock_settime, const clo
if (copy_from_user(&new_tp, tp, sizeof (*tp)))
return -EFAULT;
return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp));
}
-diff -urNp linux-2.6.37.2/kernel/power/hibernate.c linux-2.6.37.2/kernel/power/hibernate.c
---- linux-2.6.37.2/kernel/power/hibernate.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/power/hibernate.c 2011-01-17 02:41:02.000000000 -0500
-@@ -51,14 +51,14 @@ enum {
-
- static int hibernation_mode = HIBERNATION_SHUTDOWN;
-
--static struct platform_hibernation_ops *hibernation_ops;
-+static const struct platform_hibernation_ops *hibernation_ops;
-
- /**
- * hibernation_set_ops - set the global hibernate operations
- * @ops: the hibernation operations to use in subsequent hibernation transitions
- */
-
--void hibernation_set_ops(struct platform_hibernation_ops *ops)
-+void hibernation_set_ops(const struct platform_hibernation_ops *ops)
- {
- if (ops && !(ops->begin && ops->end && ops->pre_snapshot
- && ops->prepare && ops->finish && ops->enter && ops->pre_restore
-diff -urNp linux-2.6.37.2/kernel/power/poweroff.c linux-2.6.37.2/kernel/power/poweroff.c
---- linux-2.6.37.2/kernel/power/poweroff.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/power/poweroff.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/power/poweroff.c linux-2.6.38.1/kernel/power/poweroff.c
+--- linux-2.6.38.1/kernel/power/poweroff.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/power/poweroff.c 2011-03-21 18:31:35.000000000 -0400
@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof
.enable_mask = SYSRQ_ENABLE_BOOT,
};
{
register_sysrq_key('o', &sysrq_poweroff_op);
return 0;
-diff -urNp linux-2.6.37.2/kernel/power/process.c linux-2.6.37.2/kernel/power/process.c
---- linux-2.6.37.2/kernel/power/process.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/power/process.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/power/process.c linux-2.6.38.1/kernel/power/process.c
+--- linux-2.6.38.1/kernel/power/process.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/power/process.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,6 +41,7 @@ static int try_to_freeze_tasks(bool sig_
u64 elapsed_csecs64;
unsigned int elapsed_csecs;
+ timedout = true;
read_lock(&tasklist_lock);
do_each_thread(g, p) {
- if (frozen(p) || !freezeable(p))
-@@ -65,9 +68,13 @@ static int try_to_freeze_tasks(bool sig_
- * It is "frozen enough". If the task does wake
- * up, it will immediately call try_to_freeze.
+ if (frozen(p) || !freezable(p))
+@@ -71,9 +74,13 @@ static int try_to_freeze_tasks(bool sig_
+ * try_to_stop() after schedule() in ptrace/signal
+ * stop sees TIF_FREEZE.
*/
- if (!task_is_stopped_or_traced(p) &&
- !freezer_should_skip(p))
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
-@@ -76,7 +83,7 @@ static int try_to_freeze_tasks(bool sig_
+@@ -82,7 +89,7 @@ static int try_to_freeze_tasks(bool sig_
todo += wq_busy;
}
+ if (!todo || timedout)
break;
- if (!pm_check_wakeup_events()) {
-diff -urNp linux-2.6.37.2/kernel/power/suspend.c linux-2.6.37.2/kernel/power/suspend.c
---- linux-2.6.37.2/kernel/power/suspend.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/power/suspend.c 2011-01-17 02:41:02.000000000 -0500
-@@ -30,13 +30,13 @@ const char *const pm_states[PM_SUSPEND_M
- [PM_SUSPEND_MEM] = "mem",
- };
-
--static struct platform_suspend_ops *suspend_ops;
-+static const struct platform_suspend_ops *suspend_ops;
-
- /**
- * suspend_set_ops - Set the global suspend method table.
- * @ops: Pointer to ops structure.
- */
--void suspend_set_ops(struct platform_suspend_ops *ops)
-+void suspend_set_ops(const struct platform_suspend_ops *ops)
- {
- mutex_lock(&pm_mutex);
- suspend_ops = ops;
-diff -urNp linux-2.6.37.2/kernel/printk.c linux-2.6.37.2/kernel/printk.c
---- linux-2.6.37.2/kernel/printk.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/printk.c 2011-01-17 02:41:02.000000000 -0500
-@@ -274,6 +274,11 @@ int do_syslog(int type, char __user *buf
- char c;
- int error = 0;
+ if (pm_wakeup_pending()) {
+diff -urNp linux-2.6.38.1/kernel/printk.c linux-2.6.38.1/kernel/printk.c
+--- linux-2.6.38.1/kernel/printk.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/printk.c 2011-03-23 22:30:08.000000000 -0400
+@@ -279,12 +279,17 @@ static int check_syslog_permissions(int
+ if (from_file && type != SYSLOG_ACTION_OPEN)
+ return 0;
+#ifdef CONFIG_GRKERNSEC_DMESG
-+ if (grsec_enable_dmesg && !capable(CAP_SYS_ADMIN))
++ if (grsec_enable_dmesg && !capable(CAP_SYSLOG) && !capable_nolog(CAP_SYS_ADMIN))
+ return -EPERM;
+#endif
+
- /*
- * If this is from /proc/kmsg we only do the capabilities checks
- * at open time.
-diff -urNp linux-2.6.37.2/kernel/ptrace.c linux-2.6.37.2/kernel/ptrace.c
---- linux-2.6.37.2/kernel/ptrace.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/ptrace.c 2011-02-12 10:37:18.000000000 -0500
-@@ -140,7 +140,7 @@ int __ptrace_may_access(struct task_stru
+ if (syslog_action_restricted(type)) {
+ if (capable(CAP_SYSLOG))
+ return 0;
+ /* For historical reasons, accept CAP_SYS_ADMIN too, with a warning */
+ if (capable(CAP_SYS_ADMIN)) {
+- WARN_ONCE(1, "Attempt to access syslog with CAP_SYS_ADMIN "
++ printk_once(KERN_WARNING "Attempt to access syslog with CAP_SYS_ADMIN "
+ "but no CAP_SYSLOG (deprecated).\n");
+ return 0;
+ }
+diff -urNp linux-2.6.38.1/kernel/ptrace.c linux-2.6.38.1/kernel/ptrace.c
+--- linux-2.6.38.1/kernel/ptrace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/ptrace.c 2011-03-26 11:42:34.000000000 -0400
+@@ -116,7 +116,8 @@ int ptrace_check_attach(struct task_stru
+ return ret;
+ }
+
+-int __ptrace_may_access(struct task_struct *task, unsigned int mode)
++static int __ptrace_may_access(struct task_struct *task, unsigned int mode,
++ unsigned int log)
+ {
+ const struct cred *cred = current_cred(), *tcred;
+
+@@ -140,7 +141,9 @@ int __ptrace_may_access(struct task_stru
cred->gid != tcred->egid ||
cred->gid != tcred->sgid ||
cred->gid != tcred->gid) &&
- !capable(CAP_SYS_PTRACE)) {
-+ !capable_nolog(CAP_SYS_PTRACE)) {
++ ((!log && !capable_nolog(CAP_SYS_PTRACE)) ||
++ (log && !capable(CAP_SYS_PTRACE)))
++ ) {
rcu_read_unlock();
return -EPERM;
}
-@@ -148,7 +148,7 @@ int __ptrace_may_access(struct task_stru
+@@ -148,7 +151,9 @@ int __ptrace_may_access(struct task_stru
smp_rmb();
if (task->mm)
dumpable = get_dumpable(task->mm);
- if (!dumpable && !capable(CAP_SYS_PTRACE))
-+ if (!dumpable && !capable_nolog(CAP_SYS_PTRACE))
++ if (!dumpable &&
++ ((!log && !capable_nolog(CAP_SYS_PTRACE)) ||
++ (log && !capable(CAP_SYS_PTRACE))))
return -EPERM;
return security_ptrace_access_check(task, mode);
-@@ -198,7 +198,7 @@ int ptrace_attach(struct task_struct *ta
+@@ -158,7 +163,16 @@ bool ptrace_may_access(struct task_struc
+ {
+ int err;
+ task_lock(task);
+- err = __ptrace_may_access(task, mode);
++ err = __ptrace_may_access(task, mode, 0);
++ task_unlock(task);
++ return !err;
++}
++
++bool ptrace_may_access_log(struct task_struct *task, unsigned int mode)
++{
++ int err;
++ task_lock(task);
++ err = __ptrace_may_access(task, mode, 1);
+ task_unlock(task);
+ return !err;
+ }
+@@ -185,7 +199,7 @@ static int ptrace_attach(struct task_str
+ goto out;
+
+ task_lock(task);
+- retval = __ptrace_may_access(task, PTRACE_MODE_ATTACH);
++ retval = __ptrace_may_access(task, PTRACE_MODE_ATTACH, 1);
+ task_unlock(task);
+ if (retval)
+ goto unlock_creds;
+@@ -198,7 +212,7 @@ static int ptrace_attach(struct task_str
goto unlock_tasklist;
task->ptrace = PT_PTRACED;
task->ptrace |= PT_PTRACE_CAP;
__ptrace_link(task, current);
-@@ -369,7 +369,7 @@ int ptrace_readdata(struct task_struct *
+@@ -369,7 +383,7 @@ int ptrace_readdata(struct task_struct *
break;
return -EIO;
}
return -EFAULT;
copied += retval;
src += retval;
-@@ -565,7 +565,7 @@ int ptrace_request(struct task_struct *c
+@@ -565,7 +579,7 @@ int ptrace_request(struct task_struct *c
{
int ret = -EIO;
siginfo_t siginfo;
unsigned long __user *datalp = datavp;
switch (request) {
-@@ -713,14 +713,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l
+@@ -713,14 +727,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l
goto out;
}
goto out_put_task_struct;
}
-@@ -745,7 +752,7 @@ int generic_ptrace_peekdata(struct task_
+@@ -745,7 +766,7 @@ int generic_ptrace_peekdata(struct task_
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
if (copied != sizeof(tmp))
return -EIO;
}
int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
-@@ -855,14 +862,21 @@ asmlinkage long compat_sys_ptrace(compat
+@@ -855,14 +876,21 @@ asmlinkage long compat_sys_ptrace(compat
goto out;
}
goto out_put_task_struct;
}
-diff -urNp linux-2.6.37.2/kernel/rcutree.c linux-2.6.37.2/kernel/rcutree.c
---- linux-2.6.37.2/kernel/rcutree.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/rcutree.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1394,7 +1394,7 @@ __rcu_process_callbacks(struct rcu_state
+diff -urNp linux-2.6.38.1/kernel/rcutree.c linux-2.6.38.1/kernel/rcutree.c
+--- linux-2.6.38.1/kernel/rcutree.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/rcutree.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1389,7 +1389,7 @@ __rcu_process_callbacks(struct rcu_state
/*
* Do softirq processing for the current CPU.
*/
{
/*
* Memory references from any prior RCU read-side critical sections
-diff -urNp linux-2.6.37.2/kernel/rcutree_plugin.h linux-2.6.37.2/kernel/rcutree_plugin.h
---- linux-2.6.37.2/kernel/rcutree_plugin.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/rcutree_plugin.h 2011-01-17 02:41:02.000000000 -0500
-@@ -729,7 +729,7 @@ void synchronize_rcu_expedited(void)
+diff -urNp linux-2.6.38.1/kernel/rcutree_plugin.h linux-2.6.38.1/kernel/rcutree_plugin.h
+--- linux-2.6.38.1/kernel/rcutree_plugin.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/rcutree_plugin.h 2011-03-21 18:31:35.000000000 -0400
+@@ -730,7 +730,7 @@ void synchronize_rcu_expedited(void)
/* Clean up and exit. */
smp_mb(); /* ensure expedited GP seen before counter increment. */
unlock_mb_ret:
mutex_unlock(&sync_rcu_preempt_exp_mutex);
mb_ret:
-diff -urNp linux-2.6.37.2/kernel/resource.c linux-2.6.37.2/kernel/resource.c
---- linux-2.6.37.2/kernel/resource.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/resource.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/resource.c linux-2.6.38.1/kernel/resource.c
+--- linux-2.6.38.1/kernel/resource.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/resource.c 2011-03-21 18:31:35.000000000 -0400
@@ -133,8 +133,18 @@ static const struct file_operations proc
static int __init ioresources_init(void)
return 0;
}
__initcall(ioresources_init);
-diff -urNp linux-2.6.37.2/kernel/rtmutex.c linux-2.6.37.2/kernel/rtmutex.c
---- linux-2.6.37.2/kernel/rtmutex.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/rtmutex.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/rtmutex.c linux-2.6.38.1/kernel/rtmutex.c
+--- linux-2.6.38.1/kernel/rtmutex.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/rtmutex.c 2011-03-21 18:31:35.000000000 -0400
@@ -511,7 +511,7 @@ static void wakeup_next_waiter(struct rt
*/
raw_spin_lock_irqsave(&pendowner->pi_lock, flags);
WARN_ON(pendowner->pi_blocked_on != waiter);
WARN_ON(pendowner->pi_blocked_on->lock != lock);
-diff -urNp linux-2.6.37.2/kernel/sched.c linux-2.6.37.2/kernel/sched.c
---- linux-2.6.37.2/kernel/sched.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/sched.c 2011-02-22 16:05:44.000000000 -0500
-@@ -4773,6 +4773,8 @@ int can_nice(const struct task_struct *p
+diff -urNp linux-2.6.38.1/kernel/sched.c linux-2.6.38.1/kernel/sched.c
+--- linux-2.6.38.1/kernel/sched.c 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/kernel/sched.c 2011-03-23 17:21:51.000000000 -0400
+@@ -4638,6 +4638,8 @@ int can_nice(const struct task_struct *p
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
capable(CAP_SYS_NICE));
}
-@@ -4806,7 +4808,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -4671,7 +4673,8 @@ SYSCALL_DEFINE1(nice, int, increment)
if (nice > 19)
nice = 19;
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -4949,6 +4952,7 @@ recheck:
+@@ -4814,6 +4817,7 @@ recheck:
unsigned long rlim_rtprio =
task_rlimit(p, RLIMIT_RTPRIO);
/* can't set/change the rt policy */
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
-@@ -7158,7 +7162,7 @@ static void init_sched_groups_power(int
+@@ -6942,7 +6946,7 @@ static void init_sched_groups_power(int
long power;
int weight;
if (cpu != group_first_cpu(sd->groups))
return;
-diff -urNp linux-2.6.37.2/kernel/sched_fair.c linux-2.6.37.2/kernel/sched_fair.c
---- linux-2.6.37.2/kernel/sched_fair.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/sched_fair.c 2011-01-17 02:41:02.000000000 -0500
-@@ -3724,7 +3724,7 @@ static void nohz_idle_balance(int this_c
+diff -urNp linux-2.6.38.1/kernel/sched_fair.c linux-2.6.38.1/kernel/sched_fair.c
+--- linux-2.6.38.1/kernel/sched_fair.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/sched_fair.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3960,7 +3960,7 @@ static void nohz_idle_balance(int this_c
* run_rebalance_domains is triggered when needed from the scheduler tick.
* Also triggered for nohz idle balancing (with nohz_balancing_kick set).
*/
{
int this_cpu = smp_processor_id();
struct rq *this_rq = cpu_rq(this_cpu);
-diff -urNp linux-2.6.37.2/kernel/signal.c linux-2.6.37.2/kernel/signal.c
---- linux-2.6.37.2/kernel/signal.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/signal.c 2011-02-12 11:22:39.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/signal.c linux-2.6.38.1/kernel/signal.c
+--- linux-2.6.38.1/kernel/signal.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/signal.c 2011-03-21 18:31:35.000000000 -0400
@@ -45,12 +45,12 @@ static struct kmem_cache *sigqueue_cache
int print_fatal_signals __read_mostly;
return ret;
}
-diff -urNp linux-2.6.37.2/kernel/smp.c linux-2.6.37.2/kernel/smp.c
---- linux-2.6.37.2/kernel/smp.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/smp.c 2011-02-22 16:05:44.000000000 -0500
-@@ -540,22 +540,22 @@ int smp_call_function(smp_call_func_t fu
+diff -urNp linux-2.6.38.1/kernel/smp.c linux-2.6.38.1/kernel/smp.c
+--- linux-2.6.38.1/kernel/smp.c 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/kernel/smp.c 2011-03-26 20:50:44.000000000 -0400
+@@ -583,22 +583,22 @@ int smp_call_function(smp_call_func_t fu
}
EXPORT_SYMBOL(smp_call_function);
{
raw_spin_unlock_irq(&call_function.lock);
}
-diff -urNp linux-2.6.37.2/kernel/softirq.c linux-2.6.37.2/kernel/softirq.c
---- linux-2.6.37.2/kernel/softirq.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/softirq.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/softirq.c linux-2.6.38.1/kernel/softirq.c
+--- linux-2.6.38.1/kernel/softirq.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/softirq.c 2011-03-21 18:31:35.000000000 -0400
@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec
static DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
{
struct tasklet_struct *list;
-diff -urNp linux-2.6.37.2/kernel/sys.c linux-2.6.37.2/kernel/sys.c
---- linux-2.6.37.2/kernel/sys.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/sys.c 2011-02-22 16:05:44.000000000 -0500
-@@ -134,6 +134,12 @@ static int set_one_prio(struct task_stru
+diff -urNp linux-2.6.38.1/kernel/sys.c linux-2.6.38.1/kernel/sys.c
+--- linux-2.6.38.1/kernel/sys.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/sys.c 2011-03-21 18:31:35.000000000 -0400
+@@ -136,6 +136,12 @@ static int set_one_prio(struct task_stru
error = -EACCES;
goto out;
}
no_nice = security_task_setnice(p, niceval);
if (no_nice) {
error = no_nice;
-@@ -511,6 +517,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
+@@ -517,6 +523,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
goto error;
}
if (rgid != (gid_t) -1 ||
(egid != (gid_t) -1 && egid != old->gid))
new->sgid = new->egid;
-@@ -540,6 +549,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
+@@ -546,6 +555,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
old = current_cred();
retval = -EPERM;
if (capable(CAP_SETGID))
new->gid = new->egid = new->sgid = new->fsgid = gid;
else if (gid == old->gid || gid == old->sgid)
-@@ -620,6 +633,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
+@@ -626,6 +639,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
goto error;
}
if (new->uid != old->uid) {
retval = set_user(new);
if (retval < 0)
-@@ -664,6 +680,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
+@@ -670,6 +686,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
old = current_cred();
retval = -EPERM;
if (capable(CAP_SETUID)) {
new->suid = new->uid = uid;
if (uid != old->uid) {
-@@ -718,6 +740,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
+@@ -724,6 +746,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
goto error;
}
if (ruid != (uid_t) -1) {
new->uid = ruid;
if (ruid != old->uid) {
-@@ -782,6 +807,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
+@@ -788,6 +813,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
goto error;
}
if (rgid != (gid_t) -1)
new->gid = rgid;
if (egid != (gid_t) -1)
-@@ -828,6 +856,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
+@@ -834,6 +862,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
old = current_cred();
old_fsuid = old->fsuid;
if (uid == old->uid || uid == old->euid ||
uid == old->suid || uid == old->fsuid ||
capable(CAP_SETUID)) {
-@@ -838,6 +869,7 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
+@@ -844,6 +875,7 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
}
}
abort_creds(new);
return old_fsuid;
-@@ -864,12 +896,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
+@@ -870,12 +902,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
if (gid == old->gid || gid == old->egid ||
gid == old->sgid || gid == old->fsgid ||
capable(CAP_SETGID)) {
abort_creds(new);
return old_fsgid;
-@@ -1608,7 +1644,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
+@@ -1616,7 +1652,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
error = get_dumpable(me->mm);
break;
case PR_SET_DUMPABLE:
error = -EINVAL;
break;
}
-diff -urNp linux-2.6.37.2/kernel/sysctl.c linux-2.6.37.2/kernel/sysctl.c
---- linux-2.6.37.2/kernel/sysctl.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/sysctl.c 2011-02-22 16:05:44.000000000 -0500
-@@ -83,6 +83,13 @@
+diff -urNp linux-2.6.38.1/kernel/sysctl.c linux-2.6.38.1/kernel/sysctl.c
+--- linux-2.6.38.1/kernel/sysctl.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/sysctl.c 2011-03-21 18:31:35.000000000 -0400
+@@ -84,6 +84,13 @@
#if defined(CONFIG_SYSCTL)
/* External variables not in a header file. */
extern int sysctl_overcommit_memory;
-@@ -189,6 +196,7 @@ static int sysrq_sysctl_handler(ctl_tabl
+@@ -190,6 +197,7 @@ static int sysrq_sysctl_handler(ctl_tabl
}
#endif
static struct ctl_table root_table[];
static struct ctl_table_root sysctl_table_root;
-@@ -218,6 +226,20 @@ extern struct ctl_table epoll_table[];
+@@ -219,6 +227,20 @@ extern struct ctl_table epoll_table[];
int sysctl_legacy_va_layout;
#endif
/* The default sysctl tables: */
static struct ctl_table root_table[] = {
-@@ -270,6 +292,22 @@ static int max_extfrag_threshold = 1000;
+@@ -265,6 +287,22 @@ static int max_extfrag_threshold = 1000;
#endif
static struct ctl_table kern_table[] = {
{
.procname = "sched_child_runs_first",
.data = &sysctl_sched_child_runs_first,
-@@ -550,7 +588,7 @@ static struct ctl_table kern_table[] = {
+@@ -546,7 +584,7 @@ static struct ctl_table kern_table[] = {
.data = &modprobe_path,
.maxlen = KMOD_PATH_LEN,
.mode = 0644,
},
{
.procname = "modules_disabled",
-@@ -1181,6 +1219,13 @@ static struct ctl_table vm_table[] = {
+@@ -708,16 +746,20 @@ static struct ctl_table kern_table[] = {
+ .extra1 = &zero,
+ .extra2 = &one,
+ },
++#endif
+ {
+ .procname = "kptr_restrict",
+ .data = &kptr_restrict,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec_minmax,
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++ .extra1 = &two,
++#else
+ .extra1 = &zero,
++#endif
+ .extra2 = &two,
+ },
+-#endif
+ {
+ .procname = "ngroups_max",
+ .data = &ngroups_max,
+@@ -1182,6 +1224,13 @@ static struct ctl_table vm_table[] = {
.proc_handler = proc_dointvec_minmax,
.extra1 = &zero,
},
#else
{
.procname = "nr_trim_pages",
-@@ -1696,6 +1741,16 @@ int sysctl_perm(struct ctl_table_root *r
+@@ -1693,6 +1742,16 @@ int sysctl_perm(struct ctl_table_root *r
int error;
int mode;
error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
if (error)
return error;
-@@ -2103,6 +2158,16 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2100,6 +2159,16 @@ int proc_dostring(struct ctl_table *tabl
buffer, lenp, ppos);
}
static size_t proc_skip_spaces(char **buf)
{
size_t ret;
-@@ -2208,6 +2273,8 @@ static int proc_put_long(void __user **b
+@@ -2205,6 +2274,8 @@ static int proc_put_long(void __user **b
len = strlen(tmp);
if (len > *size)
len = *size;
if (copy_to_user(*buf, tmp, len))
return -EFAULT;
*size -= len;
-@@ -2513,8 +2580,11 @@ static int __do_proc_doulongvec_minmax(v
+@@ -2510,8 +2581,11 @@ static int __do_proc_doulongvec_minmax(v
*i = val;
} else {
val = convdiv * (*i) / convmul;
err = proc_put_long(&buffer, &left, val, false);
if (err)
break;
-@@ -2909,6 +2979,12 @@ int proc_dostring(struct ctl_table *tabl
+@@ -2906,6 +2980,12 @@ int proc_dostring(struct ctl_table *tabl
return -ENOSYS;
}
int proc_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
-@@ -2965,6 +3041,7 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
+@@ -2962,6 +3042,7 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
EXPORT_SYMBOL(proc_dostring);
EXPORT_SYMBOL(proc_doulongvec_minmax);
EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
EXPORT_SYMBOL(register_sysctl_table);
-diff -urNp linux-2.6.37.2/kernel/sysctl_check.c linux-2.6.37.2/kernel/sysctl_check.c
---- linux-2.6.37.2/kernel/sysctl_check.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/sysctl_check.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/sysctl_check.c linux-2.6.38.1/kernel/sysctl_check.c
+--- linux-2.6.38.1/kernel/sysctl_check.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/sysctl_check.c 2011-03-21 18:31:35.000000000 -0400
@@ -131,6 +131,7 @@ int sysctl_check_table(struct nsproxy *n
set_fail(&fail, table, "Directory with extra2");
} else {
(table->proc_handler == proc_dointvec) ||
(table->proc_handler == proc_dointvec_minmax) ||
(table->proc_handler == proc_dointvec_jiffies) ||
-diff -urNp linux-2.6.37.2/kernel/taskstats.c linux-2.6.37.2/kernel/taskstats.c
---- linux-2.6.37.2/kernel/taskstats.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/taskstats.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/taskstats.c linux-2.6.38.1/kernel/taskstats.c
+--- linux-2.6.38.1/kernel/taskstats.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/taskstats.c 2011-03-21 18:31:35.000000000 -0400
@@ -27,9 +27,12 @@
#include <linux/cgroup.h>
#include <linux/fs.h>
/*
* Maximum length of a cpumask that can be specified in
* the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute
-@@ -550,6 +553,9 @@ err:
+@@ -549,6 +552,9 @@ err:
static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
{
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-2.6.37.2/kernel/time/tick-broadcast.c linux-2.6.37.2/kernel/time/tick-broadcast.c
---- linux-2.6.37.2/kernel/time/tick-broadcast.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/time/tick-broadcast.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/time/tick-broadcast.c linux-2.6.38.1/kernel/time/tick-broadcast.c
+--- linux-2.6.38.1/kernel/time/tick-broadcast.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/time/tick-broadcast.c 2011-03-21 18:31:35.000000000 -0400
@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct cl
* then clear the broadcast bit.
*/
cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
tick_broadcast_clear_oneshot(cpu);
-diff -urNp linux-2.6.37.2/kernel/time/timekeeping.c linux-2.6.37.2/kernel/time/timekeeping.c
---- linux-2.6.37.2/kernel/time/timekeeping.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/time/timekeeping.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/time/timekeeping.c linux-2.6.38.1/kernel/time/timekeeping.c
+--- linux-2.6.38.1/kernel/time/timekeeping.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/time/timekeeping.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/sysdev.h>
#include <linux/clocksource.h>
#include <linux/jiffies.h>
-@@ -314,6 +315,8 @@ int do_settimeofday(struct timespec *tv)
+@@ -361,6 +362,8 @@ int do_settimeofday(struct timespec *tv)
if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
return -EINVAL;
write_seqlock_irqsave(&xtime_lock, flags);
timekeeping_forward_now();
-diff -urNp linux-2.6.37.2/kernel/time/timer_list.c linux-2.6.37.2/kernel/time/timer_list.c
---- linux-2.6.37.2/kernel/time/timer_list.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/time/timer_list.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/time/timer_list.c linux-2.6.38.1/kernel/time/timer_list.c
+--- linux-2.6.38.1/kernel/time/timer_list.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/time/timer_list.c 2011-03-21 18:31:35.000000000 -0400
@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base,
static void print_name_offset(struct seq_file *m, void *sym)
char symname[KSYM_NAME_LEN];
if (lookup_symbol_name((unsigned long)sym, symname) < 0)
- SEQ_printf(m, "<%p>", sym);
+ SEQ_printf(m, "<%pK>", sym);
else
SEQ_printf(m, "%s", symname);
+#endif
+#ifdef CONFIG_GRKERNSEC_HIDESYM
+ SEQ_printf(m, " .base: %p\n", NULL);
+#else
- SEQ_printf(m, " .base: %p\n", base);
+ SEQ_printf(m, " .base: %pK\n", base);
+#endif
SEQ_printf(m, " .index: %d\n",
base->index);
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-2.6.37.2/kernel/time/timer_stats.c linux-2.6.37.2/kernel/time/timer_stats.c
---- linux-2.6.37.2/kernel/time/timer_stats.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/time/timer_stats.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/time/timer_stats.c linux-2.6.38.1/kernel/time/timer_stats.c
+--- linux-2.6.38.1/kernel/time/timer_stats.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/time/timer_stats.c 2011-03-21 18:31:35.000000000 -0400
@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *time
static void print_name_offset(struct seq_file *m, unsigned long addr)
if (!pe)
return -ENOMEM;
return 0;
-diff -urNp linux-2.6.37.2/kernel/time.c linux-2.6.37.2/kernel/time.c
---- linux-2.6.37.2/kernel/time.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/time.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/time.c linux-2.6.38.1/kernel/time.c
+--- linux-2.6.38.1/kernel/time.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/time.c 2011-03-21 18:31:35.000000000 -0400
@@ -163,6 +163,11 @@ int do_sys_settimeofday(struct timespec
return error;
/* SMP safe, global irq locking makes it work. */
sys_tz = *tz;
update_vsyscall_tz();
-@@ -238,7 +243,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;
-@@ -254,7 +259,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.37.2/kernel/timer.c linux-2.6.37.2/kernel/timer.c
---- linux-2.6.37.2/kernel/timer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/timer.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1296,7 +1296,7 @@ void update_process_times(int user_tick)
+diff -urNp linux-2.6.38.1/kernel/timer.c linux-2.6.38.1/kernel/timer.c
+--- linux-2.6.38.1/kernel/timer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/timer.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1276,7 +1276,7 @@ void update_process_times(int user_tick)
/*
* This function runs timers and the timer-tq in bottom half context.
*/
-static void run_timer_softirq(struct softirq_action *h)
+static void run_timer_softirq(void)
{
- struct tvec_base *base = __get_cpu_var(tvec_bases);
+ struct tvec_base *base = __this_cpu_read(tvec_bases);
-diff -urNp linux-2.6.37.2/kernel/trace/ftrace.c linux-2.6.37.2/kernel/trace/ftrace.c
---- linux-2.6.37.2/kernel/trace/ftrace.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/ftrace.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/trace/ftrace.c linux-2.6.38.1/kernel/trace/ftrace.c
+--- linux-2.6.38.1/kernel/trace/ftrace.c 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/ftrace.c 2011-03-23 17:21:51.000000000 -0400
@@ -1107,13 +1107,18 @@ ftrace_code_disable(struct module *mod,
ip = rec->ip;
}
/*
-diff -urNp linux-2.6.37.2/kernel/trace/ring_buffer.c linux-2.6.37.2/kernel/trace/ring_buffer.c
---- linux-2.6.37.2/kernel/trace/ring_buffer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/ring_buffer.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/trace/ring_buffer.c linux-2.6.38.1/kernel/trace/ring_buffer.c
+--- linux-2.6.38.1/kernel/trace/ring_buffer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/ring_buffer.c 2011-03-21 18:31:35.000000000 -0400
@@ -669,7 +669,7 @@ static struct list_head *rb_list_head(st
* the reader page). But if the next page is a header page,
* its flags will be non zero.
rb_is_head_page(struct ring_buffer_per_cpu *cpu_buffer,
struct buffer_page *page, struct list_head *list)
{
-diff -urNp linux-2.6.37.2/kernel/trace/trace.c linux-2.6.37.2/kernel/trace/trace.c
---- linux-2.6.37.2/kernel/trace/trace.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/trace.c 2011-02-22 16:05:44.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/trace/trace.c linux-2.6.38.1/kernel/trace/trace.c
+--- linux-2.6.38.1/kernel/trace/trace.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/trace.c 2011-03-21 18:31:35.000000000 -0400
@@ -3967,10 +3967,9 @@ static const struct file_operations trac
};
#endif
static int once;
struct dentry *d_tracer;
-diff -urNp linux-2.6.37.2/kernel/trace/trace_events.c linux-2.6.37.2/kernel/trace/trace_events.c
---- linux-2.6.37.2/kernel/trace/trace_events.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/trace_events.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1231,6 +1231,7 @@ static LIST_HEAD(ftrace_module_file_list
- * Modules must own their file_operations to keep up with
- * reference counting.
- */
-+/* cannot be const, see trace_create_file_ops() */
+diff -urNp linux-2.6.38.1/kernel/trace/trace_events.c linux-2.6.38.1/kernel/trace/trace_events.c
+--- linux-2.6.38.1/kernel/trace/trace_events.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/trace_events.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1240,10 +1240,10 @@ static LIST_HEAD(ftrace_module_file_list
struct ftrace_module_file_ops {
struct list_head list;
struct module *mod;
-diff -urNp linux-2.6.37.2/kernel/trace/trace_output.c linux-2.6.37.2/kernel/trace/trace_output.c
---- linux-2.6.37.2/kernel/trace/trace_output.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/trace_output.c 2011-01-17 02:41:02.000000000 -0500
+- struct file_operations id;
+- struct file_operations enable;
+- struct file_operations format;
+- struct file_operations filter;
++ struct file_operations id; /* cannot be const, see trace_create_file_ops() */
++ struct file_operations enable; /* cannot be const, see trace_create_file_ops() */
++ struct file_operations format; /* cannot be const, see trace_create_file_ops() */
++ struct file_operations filter; /* cannot be const, see trace_create_file_ops() */
+ };
+
+ static struct ftrace_module_file_ops *
+diff -urNp linux-2.6.38.1/kernel/trace/trace_output.c linux-2.6.38.1/kernel/trace/trace_output.c
+--- linux-2.6.38.1/kernel/trace/trace_output.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/trace_output.c 2011-03-21 18:31:35.000000000 -0400
@@ -278,7 +278,7 @@ int trace_seq_path(struct trace_seq *s,
p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len);
if (p) {
s->len = p - s->buffer;
return 1;
-diff -urNp linux-2.6.37.2/kernel/trace/trace_stack.c linux-2.6.37.2/kernel/trace/trace_stack.c
---- linux-2.6.37.2/kernel/trace/trace_stack.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/kernel/trace/trace_stack.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/kernel/trace/trace_stack.c linux-2.6.38.1/kernel/trace/trace_stack.c
+--- linux-2.6.38.1/kernel/trace/trace_stack.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/kernel/trace/trace_stack.c 2011-03-21 18:31:35.000000000 -0400
@@ -50,7 +50,7 @@ static inline void check_stack(void)
return;
return;
local_irq_save(flags);
-diff -urNp linux-2.6.37.2/lib/bug.c linux-2.6.37.2/lib/bug.c
---- linux-2.6.37.2/lib/bug.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/bug.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/bug.c linux-2.6.38.1/lib/bug.c
+--- linux-2.6.38.1/lib/bug.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/bug.c 2011-03-21 18:31:35.000000000 -0400
@@ -133,6 +133,8 @@ enum bug_trap_type report_bug(unsigned l
return BUG_TRAP_TYPE_NONE;
file = NULL;
line = 0;
-diff -urNp linux-2.6.37.2/lib/debugobjects.c linux-2.6.37.2/lib/debugobjects.c
---- linux-2.6.37.2/lib/debugobjects.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/debugobjects.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/debugobjects.c linux-2.6.38.1/lib/debugobjects.c
+--- linux-2.6.38.1/lib/debugobjects.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/debugobjects.c 2011-03-21 18:31:35.000000000 -0400
@@ -281,7 +281,7 @@ static void debug_object_is_on_stack(voi
if (limit > 4)
return;
if (is_on_stack == onstack)
return;
-diff -urNp linux-2.6.37.2/lib/dma-debug.c linux-2.6.37.2/lib/dma-debug.c
---- linux-2.6.37.2/lib/dma-debug.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/dma-debug.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/dma-debug.c linux-2.6.38.1/lib/dma-debug.c
+--- linux-2.6.38.1/lib/dma-debug.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/dma-debug.c 2011-03-21 18:31:35.000000000 -0400
@@ -862,7 +862,7 @@ out:
static void check_for_stack(struct device *dev, void *addr)
err_printk(dev, NULL, "DMA-API: device driver maps memory from"
"stack [addr=%p]\n", addr);
}
-diff -urNp linux-2.6.37.2/lib/inflate.c linux-2.6.37.2/lib/inflate.c
---- linux-2.6.37.2/lib/inflate.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/inflate.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/inflate.c linux-2.6.38.1/lib/inflate.c
+--- linux-2.6.38.1/lib/inflate.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/inflate.c 2011-03-21 18:31:35.000000000 -0400
@@ -269,7 +269,7 @@ static void free(void *where)
malloc_ptr = free_mem_ptr;
}
#define free(a) kfree(a)
#endif
-diff -urNp linux-2.6.37.2/lib/Kconfig.debug linux-2.6.37.2/lib/Kconfig.debug
---- linux-2.6.37.2/lib/Kconfig.debug 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/Kconfig.debug 2011-01-17 02:41:02.000000000 -0500
-@@ -1065,6 +1065,7 @@ config LATENCYTOP
+diff -urNp linux-2.6.38.1/lib/Kconfig.debug linux-2.6.38.1/lib/Kconfig.debug
+--- linux-2.6.38.1/lib/Kconfig.debug 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/Kconfig.debug 2011-03-21 18:31:35.000000000 -0400
+@@ -1066,6 +1066,7 @@ config LATENCYTOP
depends on DEBUG_KERNEL
depends on STACKTRACE_SUPPORT
depends on PROC_FS
select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE
select KALLSYMS
select KALLSYMS_ALL
-diff -urNp linux-2.6.37.2/lib/kref.c linux-2.6.37.2/lib/kref.c
---- linux-2.6.37.2/lib/kref.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/lib/kref.c 2011-02-22 16:05:44.000000000 -0500
-@@ -64,7 +64,7 @@ int kref_test_and_get(struct kref *kref)
+diff -urNp linux-2.6.38.1/lib/kref.c linux-2.6.38.1/lib/kref.c
+--- linux-2.6.38.1/lib/kref.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/kref.c 2011-03-21 18:31:35.000000000 -0400
+@@ -52,7 +52,7 @@ void kref_get(struct kref *kref)
*/
int kref_put(struct kref *kref, void (*release)(struct kref *kref))
{
WARN_ON(release == (void (*)(struct kref *))kfree);
if (atomic_dec_and_test(&kref->refcount)) {
-diff -urNp linux-2.6.37.2/lib/radix-tree.c linux-2.6.37.2/lib/radix-tree.c
---- linux-2.6.37.2/lib/radix-tree.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/radix-tree.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/radix-tree.c linux-2.6.38.1/lib/radix-tree.c
+--- linux-2.6.38.1/lib/radix-tree.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/radix-tree.c 2011-03-21 18:31:35.000000000 -0400
@@ -80,7 +80,7 @@ struct radix_tree_preload {
int nr;
struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
static inline void *ptr_to_indirect(void *ptr)
{
-diff -urNp linux-2.6.37.2/lib/vsprintf.c linux-2.6.37.2/lib/vsprintf.c
---- linux-2.6.37.2/lib/vsprintf.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/lib/vsprintf.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/lib/vsprintf.c linux-2.6.38.1/lib/vsprintf.c
+--- linux-2.6.38.1/lib/vsprintf.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/lib/vsprintf.c 2011-03-21 18:31:35.000000000 -0400
@@ -16,6 +16,9 @@
* - scnprintf and vscnprintf
*/
sprint_symbol(sym, value);
else
kallsyms_lookup(value, NULL, NULL, NULL, sym);
-@@ -947,6 +950,8 @@ char *uuid_string(char *buf, char *end,
+@@ -936,7 +939,11 @@ char *uuid_string(char *buf, char *end,
+ return string(buf, end, uuid, spec);
+ }
+
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++int kptr_restrict = 2;
++#else
+ int kptr_restrict = 1;
++#endif
+
+ /*
+ * Show a '%p' thing. A kernel extension is that the '%p' is followed
+@@ -949,6 +956,8 @@ int kptr_restrict = 1;
* - 'f' For simple symbolic function names without offset
* - 'S' For symbolic direct pointers with offset
* - 's' For symbolic direct pointers without offset
* - '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
-@@ -990,12 +995,12 @@ char *pointer(const char *fmt, char *buf
+@@ -993,12 +1002,12 @@ char *pointer(const char *fmt, char *buf
{
if (!ptr) {
/*
}
switch (*fmt) {
-@@ -1005,6 +1010,13 @@ char *pointer(const char *fmt, char *buf
+@@ -1008,6 +1017,13 @@ char *pointer(const char *fmt, char *buf
/* Fallthrough */
case 'S':
case 's':
return symbol_string(buf, end, ptr, spec, *fmt);
case 'R':
case 'r':
-@@ -1750,11 +1762,11 @@ int bstr_printf(char *buf, size_t size,
+@@ -1772,11 +1788,11 @@ int bstr_printf(char *buf, size_t size,
typeof(type) value; \
if (sizeof(type) == 8) { \
args = PTR_ALIGN(args, sizeof(u32)); \
} \
args += sizeof(type); \
value; \
-@@ -1817,7 +1829,7 @@ int bstr_printf(char *buf, size_t size,
+@@ -1839,7 +1855,7 @@ int bstr_printf(char *buf, size_t size,
case FORMAT_TYPE_STR: {
const char *str_arg = args;
args += strlen(str_arg) + 1;
break;
}
-diff -urNp linux-2.6.37.2/localversion-grsec linux-2.6.37.2/localversion-grsec
---- linux-2.6.37.2/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/localversion-grsec 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/localversion-grsec linux-2.6.38.1/localversion-grsec
+--- linux-2.6.38.1/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/localversion-grsec 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1 @@
+-grsec
-diff -urNp linux-2.6.37.2/Makefile linux-2.6.37.2/Makefile
---- linux-2.6.37.2/Makefile 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/Makefile 2011-02-27 14:49:35.000000000 -0500
-@@ -232,8 +232,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
+diff -urNp linux-2.6.38.1/Makefile linux-2.6.38.1/Makefile
+--- linux-2.6.38.1/Makefile 2011-03-23 17:20:06.000000000 -0400
++++ linux-2.6.38.1/Makefile 2011-03-23 17:21:43.000000000 -0400
+@@ -233,8 +233,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
HOSTCC = gcc
HOSTCXX = g++
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
-@@ -680,7 +680,7 @@ export mod_strip_cmd
+@@ -681,7 +681,7 @@ export mod_strip_cmd
ifeq ($(KBUILD_EXTMOD),)
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-diff -urNp linux-2.6.37.2/mm/bootmem.c linux-2.6.37.2/mm/bootmem.c
---- linux-2.6.37.2/mm/bootmem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/bootmem.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/bootmem.c linux-2.6.38.1/mm/bootmem.c
+--- linux-2.6.38.1/mm/bootmem.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/bootmem.c 2011-03-21 18:31:35.000000000 -0400
@@ -201,19 +201,30 @@ static void __init __free_pages_memory(u
unsigned long __init free_all_memory_core_early(int nodeid)
{
return count;
}
-diff -urNp linux-2.6.37.2/mm/filemap.c linux-2.6.37.2/mm/filemap.c
---- linux-2.6.37.2/mm/filemap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/filemap.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1660,7 +1660,7 @@ int generic_file_mmap(struct file * file
+diff -urNp linux-2.6.38.1/mm/filemap.c linux-2.6.38.1/mm/filemap.c
+--- linux-2.6.38.1/mm/filemap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/filemap.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1664,7 +1664,7 @@ int generic_file_mmap(struct file * file
struct address_space *mapping = file->f_mapping;
if (!mapping->a_ops->readpage)
file_accessed(file);
vma->vm_ops = &generic_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
-@@ -2056,6 +2056,7 @@ inline int generic_write_checks(struct f
+@@ -2060,6 +2060,7 @@ inline int generic_write_checks(struct f
*pos = i_size_read(inode);
if (limit != RLIM_INFINITY) {
if (*pos >= limit) {
send_sig(SIGXFSZ, current, 0);
return -EFBIG;
-diff -urNp linux-2.6.37.2/mm/fremap.c linux-2.6.37.2/mm/fremap.c
---- linux-2.6.37.2/mm/fremap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/fremap.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/fremap.c linux-2.6.38.1/mm/fremap.c
+--- linux-2.6.38.1/mm/fremap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/fremap.c 2011-03-21 18:31:35.000000000 -0400
@@ -156,6 +156,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
retry:
vma = find_vma(mm, start);
munlock_vma_pages_range(vma, start, start + size);
vma->vm_flags = saved_flags;
}
-diff -urNp linux-2.6.37.2/mm/highmem.c linux-2.6.37.2/mm/highmem.c
---- linux-2.6.37.2/mm/highmem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/highmem.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/highmem.c linux-2.6.38.1/mm/highmem.c
+--- linux-2.6.38.1/mm/highmem.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/highmem.c 2011-03-21 18:31:35.000000000 -0400
@@ -125,9 +125,10 @@ static void flush_all_zero_pkmaps(void)
* So no dangers, even with speculative execution.
*/
pkmap_count[last_pkmap_nr] = 1;
set_page_address(page, (void *)vaddr);
-diff -urNp linux-2.6.37.2/mm/hugetlb.c linux-2.6.37.2/mm/hugetlb.c
---- linux-2.6.37.2/mm/hugetlb.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/hugetlb.c 2011-01-17 02:41:02.000000000 -0500
-@@ -2373,6 +2373,27 @@ static int unmap_ref_private(struct mm_s
+diff -urNp linux-2.6.38.1/mm/hugetlb.c linux-2.6.38.1/mm/hugetlb.c
+--- linux-2.6.38.1/mm/hugetlb.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/hugetlb.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2333,6 +2333,27 @@ static int unmap_ref_private(struct mm_s
return 1;
}
/*
* Hugetlb_cow() should be called with page lock of the original hugepage held.
*/
-@@ -2473,6 +2494,11 @@ retry_avoidcopy:
+@@ -2434,6 +2455,11 @@ retry_avoidcopy:
make_huge_pte(vma, new_page, 1));
page_remove_rmap(old_page);
hugepage_add_new_anon_rmap(new_page, vma, address);
/* Make the old page be freed below */
new_page = old_page;
mmu_notifier_invalidate_range_end(mm,
-@@ -2624,6 +2650,10 @@ retry:
+@@ -2585,6 +2611,10 @@ retry:
&& (vma->vm_flags & VM_SHARED)));
set_huge_pte_at(mm, address, ptep, new_pte);
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);
-@@ -2653,6 +2683,10 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2614,6 +2644,10 @@ int hugetlb_fault(struct mm_struct *mm,
static DEFINE_MUTEX(hugetlb_instantiation_mutex);
struct hstate *h = hstate_vma(vma);
ptep = huge_pte_offset(mm, address);
if (ptep) {
entry = huge_ptep_get(ptep);
-@@ -2664,6 +2698,26 @@ int hugetlb_fault(struct mm_struct *mm,
+@@ -2625,6 +2659,26 @@ int hugetlb_fault(struct mm_struct *mm,
VM_FAULT_SET_HINDEX(h - hstates);
}
ptep = huge_pte_alloc(mm, address, huge_page_size(h));
if (!ptep)
return VM_FAULT_OOM;
-diff -urNp linux-2.6.37.2/mm/Kconfig linux-2.6.37.2/mm/Kconfig
---- linux-2.6.37.2/mm/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/Kconfig 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/Kconfig linux-2.6.38.1/mm/Kconfig
+--- linux-2.6.38.1/mm/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/Kconfig 2011-03-21 18:31:35.000000000 -0400
@@ -240,7 +240,7 @@ config KSM
config DEFAULT_MMAP_MIN_ADDR
int "Low address space to protect from user allocation"
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.37.2/mm/kmemleak.c linux-2.6.37.2/mm/kmemleak.c
---- linux-2.6.37.2/mm/kmemleak.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/kmemleak.c 2011-01-17 02:41:02.000000000 -0500
-@@ -355,7 +355,7 @@ static void print_unreferenced(struct se
+diff -urNp linux-2.6.38.1/mm/kmemleak.c linux-2.6.38.1/mm/kmemleak.c
+--- linux-2.6.38.1/mm/kmemleak.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/kmemleak.c 2011-03-21 18:31:35.000000000 -0400
+@@ -357,7 +357,7 @@ static void print_unreferenced(struct se
for (i = 0; i < object->trace_len; i++) {
void *ptr = (void *)object->trace[i];
}
}
-diff -urNp linux-2.6.37.2/mm/maccess.c linux-2.6.37.2/mm/maccess.c
---- linux-2.6.37.2/mm/maccess.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/maccess.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/maccess.c linux-2.6.38.1/mm/maccess.c
+--- linux-2.6.38.1/mm/maccess.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/maccess.c 2011-03-21 18:31:35.000000000 -0400
@@ -15,10 +15,10 @@
* happens, handle that and return -EFAULT.
*/
{
long ret;
mm_segment_t old_fs = get_fs();
-diff -urNp linux-2.6.37.2/mm/madvise.c linux-2.6.37.2/mm/madvise.c
---- linux-2.6.37.2/mm/madvise.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/madvise.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/madvise.c linux-2.6.38.1/mm/madvise.c
+--- linux-2.6.38.1/mm/madvise.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/madvise.c 2011-03-21 18:31:35.000000000 -0400
@@ -45,6 +45,10 @@ static long madvise_behavior(struct vm_a
pgoff_t pgoff;
unsigned long new_flags = vma->vm_flags;
switch (behavior) {
case MADV_NORMAL:
new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ;
-@@ -104,6 +108,13 @@ success:
+@@ -110,6 +114,13 @@ success:
/*
* vm_flags is protected by the mmap_sem held in write mode.
*/
vma->vm_flags = new_flags;
out:
-@@ -162,6 +173,11 @@ static long madvise_dontneed(struct vm_a
+@@ -168,6 +179,11 @@ static long madvise_dontneed(struct vm_a
struct vm_area_struct ** prev,
unsigned long start, unsigned long end)
{
*prev = vma;
if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
return -EINVAL;
-@@ -174,6 +190,21 @@ static long madvise_dontneed(struct vm_a
+@@ -180,6 +196,21 @@ static long madvise_dontneed(struct vm_a
zap_page_range(vma, start, end - start, &details);
} else
zap_page_range(vma, start, end - start, NULL);
return 0;
}
-@@ -366,6 +397,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
+@@ -376,6 +407,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
if (end < start)
goto out;
error = 0;
if (end == start)
goto out;
-diff -urNp linux-2.6.37.2/mm/memory.c linux-2.6.37.2/mm/memory.c
---- linux-2.6.37.2/mm/memory.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/memory.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/memory.c linux-2.6.38.1/mm/memory.c
+--- linux-2.6.38.1/mm/memory.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/memory.c 2011-03-21 18:31:35.000000000 -0400
@@ -259,8 +259,12 @@ static inline void free_pmd_range(struct
return;
}
/*
-@@ -1361,10 +1368,10 @@ int __get_user_pages(struct task_struct
+@@ -1433,10 +1440,10 @@ int __get_user_pages(struct task_struct
(VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
i = 0;
if (!vma && in_gate_area(tsk, start)) {
unsigned long pg = start & PAGE_MASK;
struct vm_area_struct *gate_vma = get_gate_vma(tsk);
-@@ -1416,7 +1423,7 @@ int __get_user_pages(struct task_struct
+@@ -1489,7 +1496,7 @@ int __get_user_pages(struct task_struct
continue;
}
(vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
!(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
-@@ -1492,7 +1499,7 @@ int __get_user_pages(struct task_struct
+@@ -1575,7 +1582,7 @@ int __get_user_pages(struct task_struct
start += PAGE_SIZE;
nr_pages--;
} while (nr_pages && start < vma->vm_end);
return i;
}
-@@ -1637,6 +1644,10 @@ static int insert_page(struct vm_area_st
+@@ -1724,6 +1731,10 @@ static int insert_page(struct vm_area_st
page_add_file_rmap(page);
set_pte_at(mm, addr, pte, mk_pte(page, prot));
retval = 0;
pte_unmap_unlock(pte, ptl);
return retval;
-@@ -1671,10 +1682,22 @@ out:
+@@ -1758,10 +1769,22 @@ out:
int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
struct page *page)
{
vma->vm_flags |= VM_INSERTPAGE;
return insert_page(vma, addr, page, vma->vm_page_prot);
}
-@@ -1760,6 +1783,7 @@ int vm_insert_mixed(struct vm_area_struc
+@@ -1847,6 +1870,7 @@ int vm_insert_mixed(struct vm_area_struc
unsigned long pfn)
{
BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
-@@ -2087,6 +2111,186 @@ static inline void cow_user_page(struct
+@@ -2162,6 +2186,186 @@ static inline void cow_user_page(struct
copy_user_highpage(dst, src, va, vma);
}
/*
* This routine handles present pages, when users try to write
* to a shared page. It is done by copying the page to a new address
-@@ -2274,6 +2478,12 @@ gotten:
+@@ -2373,6 +2577,12 @@ gotten:
*/
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (likely(pte_same(*page_table, orig_pte))) {
if (old_page) {
if (!PageAnon(old_page)) {
dec_mm_counter_fast(mm, MM_FILEPAGES);
-@@ -2325,6 +2535,10 @@ gotten:
+@@ -2424,6 +2634,10 @@ gotten:
page_remove_rmap(old_page);
}
/* Free the old page.. */
new_page = old_page;
ret |= VM_FAULT_WRITE;
-@@ -2756,6 +2970,11 @@ static int do_swap_page(struct mm_struct
+@@ -2834,6 +3048,11 @@ static int do_swap_page(struct mm_struct
swap_free(entry);
if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
try_to_free_swap(page);
unlock_page(page);
if (swapcache) {
/*
-@@ -2779,6 +2998,11 @@ static int do_swap_page(struct mm_struct
+@@ -2857,6 +3076,11 @@ static int do_swap_page(struct mm_struct
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, page_table);
unlock:
pte_unmap_unlock(page_table, ptl);
out:
-@@ -2798,40 +3022,6 @@ out_release:
+@@ -2876,40 +3100,6 @@ out_release:
}
/*
* 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.
-@@ -2840,27 +3030,23 @@ static int do_anonymous_page(struct mm_s
+@@ -2918,27 +3108,23 @@ static int do_anonymous_page(struct mm_s
unsigned long address, pte_t *page_table, pmd_t *pmd,
unsigned int flags)
{
if (unlikely(anon_vma_prepare(vma)))
goto oom;
page = alloc_zeroed_user_highpage_movable(vma, address);
-@@ -2879,6 +3065,11 @@ static int do_anonymous_page(struct mm_s
+@@ -2957,6 +3143,11 @@ static int do_anonymous_page(struct mm_s
if (!pte_none(*page_table))
goto release;
inc_mm_counter_fast(mm, MM_ANONPAGES);
page_add_new_anon_rmap(page, vma, address);
setpte:
-@@ -2886,6 +3077,12 @@ setpte:
+@@ -2964,6 +3155,12 @@ setpte:
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, page_table);
unlock:
pte_unmap_unlock(page_table, ptl);
return 0;
-@@ -3029,6 +3226,12 @@ static int __do_fault(struct mm_struct *
+@@ -3101,6 +3298,12 @@ static int __do_fault(struct mm_struct *
*/
/* Only go through if we didn't race with anybody else... */
if (likely(pte_same(*page_table, orig_pte))) {
flush_icache_page(vma, page);
entry = mk_pte(page, vma->vm_page_prot);
if (flags & FAULT_FLAG_WRITE)
-@@ -3048,6 +3251,14 @@ static int __do_fault(struct mm_struct *
+@@ -3120,6 +3323,14 @@ static int __do_fault(struct mm_struct *
/* no need to invalidate: a not-present page won't be cached */
update_mmu_cache(vma, address, page_table);
} else {
if (charged)
mem_cgroup_uncharge_page(page);
-@@ -3195,6 +3406,12 @@ static inline int handle_pte_fault(struc
+@@ -3267,6 +3478,12 @@ int handle_pte_fault(struct mm_struct *m
if (flags & FAULT_FLAG_WRITE)
flush_tlb_fix_spurious_fault(vma, address);
}
unlock:
pte_unmap_unlock(pte, ptl);
return 0;
-@@ -3211,6 +3428,10 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3283,6 +3500,10 @@ int handle_mm_fault(struct mm_struct *mm
pmd_t *pmd;
pte_t *pte;
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
-@@ -3221,6 +3442,34 @@ int handle_mm_fault(struct mm_struct *mm
+@@ -3293,6 +3514,34 @@ int handle_mm_fault(struct mm_struct *mm
if (unlikely(is_vm_hugetlb_page(vma)))
return hugetlb_fault(mm, vma, address, flags);
+ pmd_m = pmd_alloc(mm, pud_m, address_m);
+ if (!pmd_m)
+ return VM_FAULT_OOM;
-+ if (!pmd_present(*pmd_m) && __pte_alloc(mm, pmd_m, address_m))
++ if (!pmd_present(*pmd_m) && __pte_alloc(mm, vma_m, pmd_m, address_m))
+ return VM_FAULT_OOM;
+ pax_unmap_mirror_pte(vma_m, address_m, pmd_m);
+ }
pgd = pgd_offset(mm, address);
pud = pud_alloc(mm, pgd, address);
if (!pud)
-@@ -3318,7 +3567,7 @@ static int __init gate_vma_init(void)
+@@ -3426,7 +3675,7 @@ static int __init gate_vma_init(void)
gate_vma.vm_start = FIXADDR_USER_START;
gate_vma.vm_end = FIXADDR_USER_END;
gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
/*
* Make sure the vDSO gets into every core dump.
* Dumping its contents makes post-mortem fully interpretable later
-diff -urNp linux-2.6.37.2/mm/memory-failure.c linux-2.6.37.2/mm/memory-failure.c
---- linux-2.6.37.2/mm/memory-failure.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/memory-failure.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/memory-failure.c linux-2.6.38.1/mm/memory-failure.c
+--- linux-2.6.38.1/mm/memory-failure.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/memory-failure.c 2011-03-21 18:31:35.000000000 -0400
@@ -58,7 +58,7 @@ int sysctl_memory_failure_early_kill __r
int sysctl_memory_failure_recovery __read_mostly = 1;
#if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE)
-@@ -967,7 +967,7 @@ int __memory_failure(unsigned long pfn,
+@@ -1012,7 +1012,7 @@ int __memory_failure(unsigned long pfn,
}
- nr_pages = 1 << compound_order(hpage);
+ 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.
-@@ -997,7 +997,7 @@ int __memory_failure(unsigned long pfn,
+@@ -1042,7 +1042,7 @@ int __memory_failure(unsigned long pfn,
if (!PageHWPoison(hpage)
|| (hwpoison_filter(p) && TestClearPageHWPoison(p))
|| (p != hpage && TestSetPageHWPoison(hpage))) {
return 0;
}
set_page_hwpoison_huge_page(hpage);
-@@ -1052,7 +1052,7 @@ int __memory_failure(unsigned long pfn,
+@@ -1100,7 +1100,7 @@ int __memory_failure(unsigned long pfn,
}
if (hwpoison_filter(p)) {
if (TestClearPageHWPoison(p))
unlock_page(hpage);
put_page(hpage);
return 0;
-@@ -1178,7 +1178,7 @@ int unpoison_memory(unsigned long pfn)
+@@ -1226,7 +1226,7 @@ int unpoison_memory(unsigned long pfn)
return 0;
}
if (TestClearPageHWPoison(p))
pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn);
return 0;
}
-@@ -1192,7 +1192,7 @@ int unpoison_memory(unsigned long pfn)
+@@ -1240,7 +1240,7 @@ int unpoison_memory(unsigned long pfn)
*/
if (TestClearPageHWPoison(page)) {
pr_info("MCE: Software-unpoisoned page %#lx\n", pfn);
freeit = 1;
if (PageHuge(page))
clear_page_hwpoison_huge_page(page);
-@@ -1301,7 +1301,7 @@ static int soft_offline_huge_page(struct
+@@ -1353,7 +1353,7 @@ static int soft_offline_huge_page(struct
}
done:
if (!PageHWPoison(hpage))
-- atomic_long_add(1 << compound_order(hpage), &mce_bad_pages);
-+ atomic_long_add_unchecked(1 << compound_order(hpage), &mce_bad_pages);
+- 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 */
-@@ -1428,7 +1428,7 @@ int soft_offline_page(struct page *page,
+@@ -1482,7 +1482,7 @@ int soft_offline_page(struct page *page,
return ret;
done:
SetPageHWPoison(page);
/* keep elevated page count for bad page */
return ret;
-diff -urNp linux-2.6.37.2/mm/mempolicy.c linux-2.6.37.2/mm/mempolicy.c
---- linux-2.6.37.2/mm/mempolicy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/mempolicy.c 2011-01-17 02:41:02.000000000 -0500
-@@ -642,6 +642,10 @@ static int mbind_range(struct mm_struct
+diff -urNp linux-2.6.38.1/mm/mempolicy.c linux-2.6.38.1/mm/mempolicy.c
+--- linux-2.6.38.1/mm/mempolicy.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/mempolicy.c 2011-03-21 18:31:35.000000000 -0400
+@@ -643,6 +643,10 @@ static int mbind_range(struct mm_struct
unsigned long vmstart;
unsigned long vmend;
vma = find_vma_prev(mm, start, &prev);
if (!vma || vma->vm_start > start)
return -EFAULT;
-@@ -672,6 +676,16 @@ static int mbind_range(struct mm_struct
+@@ -673,6 +677,16 @@ static int mbind_range(struct mm_struct
err = policy_vma(vma, new_pol);
if (err)
goto out;
}
out:
-@@ -1104,6 +1118,17 @@ static long do_mbind(unsigned long start
+@@ -1106,6 +1120,17 @@ static long do_mbind(unsigned long start
if (end < start)
return -EINVAL;
rcu_read_unlock();
err = -EPERM;
goto out;
-@@ -2632,7 +2664,7 @@ int show_numa_map(struct seq_file *m, vo
+@@ -2635,7 +2667,7 @@ int show_numa_map(struct seq_file *m, vo
if (file) {
seq_printf(m, " file=");
} 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.37.2/mm/migrate.c linux-2.6.37.2/mm/migrate.c
---- linux-2.6.37.2/mm/migrate.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/mm/migrate.c 2011-02-22 16:05:44.000000000 -0500
-@@ -1278,6 +1278,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+diff -urNp linux-2.6.38.1/mm/migrate.c linux-2.6.38.1/mm/migrate.c
+--- linux-2.6.38.1/mm/migrate.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/migrate.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1299,6 +1299,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
if (!mm)
return -EINVAL;
/*
* Check if this process has the right to modify the specified
* process. The right exists if the process has administrative
-@@ -1287,8 +1295,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
+@@ -1308,8 +1316,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
rcu_read_lock();
tcred = __task_cred(task);
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
rcu_read_unlock();
err = -EPERM;
goto out;
-diff -urNp linux-2.6.37.2/mm/mlock.c linux-2.6.37.2/mm/mlock.c
---- linux-2.6.37.2/mm/mlock.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/mlock.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/mlock.c linux-2.6.38.1/mm/mlock.c
+--- linux-2.6.38.1/mm/mlock.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/mlock.c 2011-03-21 18:31:35.000000000 -0400
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
/**
* __mlock_vma_pages_range() - mlock a range of pages in the vma.
* @vma: target vma
-@@ -174,12 +168,6 @@ static long __mlock_vma_pages_range(stru
- if (vma->vm_flags & VM_WRITE)
- gup_flags |= FOLL_WRITE;
+@@ -188,12 +182,6 @@ static long __mlock_vma_pages_range(stru
+ if (vma->vm_flags & VM_LOCKED)
+ gup_flags |= FOLL_MLOCK;
- /* We don't try to access the guard page of a stack vma */
- if (stack_guard_page(vma, start)) {
- nr_pages--;
- }
-
- while (nr_pages > 0) {
- int i;
-
-@@ -437,7 +425,7 @@ static int do_mlock(unsigned long start,
- {
- unsigned long nstart, end, tmp;
- struct vm_area_struct * vma, * prev;
-- int error;
-+ int error = -EINVAL;
-
- len = PAGE_ALIGN(len);
- end = start + len;
-@@ -445,6 +433,9 @@ static int do_mlock(unsigned long start,
+ return __get_user_pages(current, mm, addr, nr_pages, gup_flags,
+ NULL, NULL, nonblocking);
+ }
+@@ -393,6 +381,9 @@ static int do_mlock(unsigned long start,
return -EINVAL;
if (end == start)
return 0;
vma = find_vma_prev(current->mm, start, &prev);
if (!vma || vma->vm_start > start)
return -ENOMEM;
-@@ -455,6 +446,11 @@ static int do_mlock(unsigned long start,
+@@ -403,6 +394,11 @@ static int do_mlock(unsigned long start,
for (nstart = start ; ; ) {
unsigned int newflags;
/* Here we know that vma->vm_start <= nstart < vma->vm_end. */
newflags = vma->vm_flags | VM_LOCKED;
-@@ -504,6 +500,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
+@@ -508,6 +504,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
lock_limit >>= PAGE_SHIFT;
/* check against resource limits */
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = do_mlock(start, len, 1);
up_write(¤t->mm->mmap_sem);
-@@ -525,17 +522,23 @@ SYSCALL_DEFINE2(munlock, unsigned long,
+@@ -531,17 +528,23 @@ SYSCALL_DEFINE2(munlock, unsigned long,
static int do_mlockall(int flags)
{
struct vm_area_struct * vma, * prev = NULL;
newflags = vma->vm_flags | VM_LOCKED;
if (!(flags & MCL_CURRENT))
newflags &= ~VM_LOCKED;
-@@ -567,6 +570,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
+@@ -573,6 +576,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
lock_limit >>= PAGE_SHIFT;
ret = -ENOMEM;
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
-diff -urNp linux-2.6.37.2/mm/mmap.c linux-2.6.37.2/mm/mmap.c
---- linux-2.6.37.2/mm/mmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/mmap.c 2011-02-12 11:36:29.000000000 -0500
-@@ -45,6 +45,16 @@
+diff -urNp linux-2.6.38.1/mm/mmap.c linux-2.6.38.1/mm/mmap.c
+--- linux-2.6.38.1/mm/mmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/mmap.c 2011-03-21 23:47:41.000000000 -0400
+@@ -46,6 +46,16 @@
#define arch_rebalance_pgtables(addr, len) (addr)
#endif
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
+@@ -71,22 +81,32 @@ static void unmap_region(struct mm_struc
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
*
*/
struct percpu_counter vm_committed_as;
/*
-@@ -231,6 +251,7 @@ static struct vm_area_struct *remove_vma
+@@ -232,6 +252,7 @@ static struct vm_area_struct *remove_vma
struct vm_area_struct *next = vma->vm_next;
might_sleep();
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file) {
-@@ -267,6 +288,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
+@@ -276,6 +297,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
* not page aligned -Ram Gupta
*/
rlim = rlimit(RLIMIT_DATA);
if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
(mm->end_data - mm->start_data) > rlim)
goto out;
-@@ -708,6 +730,12 @@ static int
+@@ -719,6 +741,12 @@ static int
can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
if (vma->vm_pgoff == vm_pgoff)
-@@ -727,6 +755,12 @@ static int
+@@ -738,6 +766,12 @@ static int
can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
pgoff_t vm_pglen;
-@@ -769,13 +803,20 @@ can_vma_merge_after(struct vm_area_struc
+@@ -780,13 +814,20 @@ can_vma_merge_after(struct vm_area_struc
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,
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -791,6 +832,15 @@ struct vm_area_struct *vma_merge(struct
+@@ -802,6 +843,15 @@ struct vm_area_struct *vma_merge(struct
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
/*
* Can it merge with the predecessor?
*/
-@@ -810,9 +860,24 @@ struct vm_area_struct *vma_merge(struct
+@@ -821,9 +871,24 @@ struct vm_area_struct *vma_merge(struct
/* cases 1, 6 */
err = vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
+ }
if (err)
return NULL;
- return prev;
-@@ -825,12 +890,27 @@ struct vm_area_struct *vma_merge(struct
+ khugepaged_enter_vma_merge(prev);
+@@ -837,12 +902,27 @@ struct vm_area_struct *vma_merge(struct
mpol_equal(policy, vma_policy(next)) &&
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen)) {
+ }
if (err)
return NULL;
- return area;
-@@ -945,14 +1025,11 @@ none:
+ khugepaged_enter_vma_merge(area);
+@@ -958,14 +1038,11 @@ none:
void vm_stat_account(struct mm_struct *mm, unsigned long flags,
struct file *file, long pages)
{
mm->stack_vm += pages;
if (flags & (VM_RESERVED|VM_IO))
mm->reserved_vm += pages;
-@@ -979,7 +1056,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -992,7 +1069,7 @@ unsigned long do_mmap_pgoff(struct file
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
-@@ -1005,7 +1082,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1018,7 +1095,7 @@ unsigned long do_mmap_pgoff(struct file
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
if (addr & ~PAGE_MASK)
return addr;
-@@ -1016,6 +1093,36 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1029,6 +1106,36 @@ unsigned long do_mmap_pgoff(struct file
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
if (flags & MAP_LOCKED)
if (!can_do_mlock())
return -EPERM;
-@@ -1027,6 +1134,7 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1040,6 +1147,7 @@ unsigned long do_mmap_pgoff(struct file
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1097,6 +1205,9 @@ unsigned long do_mmap_pgoff(struct file
+@@ -1110,6 +1218,9 @@ unsigned long do_mmap_pgoff(struct file
if (error)
return error;
return mmap_region(file, addr, len, flags, vm_flags, pgoff);
}
EXPORT_SYMBOL(do_mmap_pgoff);
-@@ -1174,10 +1285,10 @@ SYSCALL_DEFINE1(old_mmap, struct mmap_ar
+@@ -1187,10 +1298,10 @@ SYSCALL_DEFINE1(old_mmap, struct mmap_ar
*/
int vma_wants_writenotify(struct vm_area_struct *vma)
{
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1226,14 +1337,24 @@ unsigned long mmap_region(struct file *f
+@@ -1239,14 +1350,24 @@ unsigned long mmap_region(struct file *f
unsigned long charged = 0;
struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
}
/* Check against address space limit. */
-@@ -1282,6 +1403,16 @@ munmap_back:
+@@ -1295,6 +1416,16 @@ munmap_back:
goto unacct_error;
}
vma->vm_mm = mm;
vma->vm_start = addr;
vma->vm_end = addr + len;
-@@ -1305,6 +1436,19 @@ munmap_back:
+@@ -1318,6 +1449,19 @@ munmap_back:
error = file->f_op->mmap(file, vma);
if (error)
goto unmap_and_free_vma;
if (vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
-@@ -1340,6 +1484,11 @@ munmap_back:
+@@ -1353,6 +1497,11 @@ munmap_back:
vma_link(mm, vma, prev, rb_link, rb_parent);
file = vma->vm_file;
/* Once vma denies write, undo our temporary denial count */
if (correct_wcount)
atomic_inc(&inode->i_writecount);
-@@ -1348,6 +1497,7 @@ out:
+@@ -1361,6 +1510,7 @@ out:
mm->total_vm += len >> PAGE_SHIFT;
vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
if (vm_flags & VM_LOCKED) {
if (!mlock_vma_pages_range(vma, addr, addr + len))
mm->locked_vm += (len >> PAGE_SHIFT);
-@@ -1365,6 +1515,12 @@ unmap_and_free_vma:
+@@ -1378,6 +1528,12 @@ unmap_and_free_vma:
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
charged = 0;
free_vma:
kmem_cache_free(vm_area_cachep, vma);
unacct_error:
if (charged)
-@@ -1372,6 +1528,33 @@ unacct_error:
+@@ -1385,6 +1541,44 @@ unacct_error:
return error;
}
-+bool check_heap_stack_gap(struct vm_area_struct *vma, unsigned long addr, unsigned long len)
++bool check_heap_stack_gap(const struct vm_area_struct *vma, unsigned long addr, unsigned long len)
+{
+ if (!vma) {
+#ifdef CONFIG_STACK_GROWSUP
+
+ return true;
+}
++
++unsigned long skip_heap_stack_gap(const struct vm_area_struct *vma, unsigned long len)
++{
++ if (vma->vm_start < len)
++ return -ENOMEM;
++ if (!(vma->vm_flags & VM_GROWSDOWN))
++ return vma->vm_start - len;
++ if (sysctl_heap_stack_gap <= vma->vm_start - len)
++ return vma->vm_start - len - sysctl_heap_stack_gap;
++ return -ENOMEM;
++}
+
/* Get an address range which is currently unmapped.
* For shmat() with addr=0.
*
-@@ -1398,18 +1581,23 @@ arch_get_unmapped_area(struct file *filp
+@@ -1411,18 +1605,23 @@ arch_get_unmapped_area(struct file *filp
if (flags & MAP_FIXED)
return addr;
}
full_search:
-@@ -1420,34 +1608,40 @@ full_search:
+@@ -1433,34 +1632,40 @@ full_search:
* Start a new search - just in case we missed
* some holes.
*/
mm->free_area_cache = addr;
mm->cached_hole_size = ~0UL;
}
-@@ -1465,7 +1659,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1478,7 +1683,7 @@ arch_get_unmapped_area_topdown(struct fi
{
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
/* requested length too big for entire address space */
if (len > TASK_SIZE)
-@@ -1474,13 +1668,18 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1487,13 +1692,18 @@ arch_get_unmapped_area_topdown(struct fi
if (flags & MAP_FIXED)
return addr;
}
/* check if free_area_cache is useful for us */
-@@ -1495,7 +1694,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1508,7 +1718,7 @@ arch_get_unmapped_area_topdown(struct fi
/* make sure it can fit in the remaining address space */
if (addr > len) {
vma = find_vma(mm, addr-len);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr-len);
}
-@@ -1512,7 +1711,7 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1525,7 +1735,7 @@ arch_get_unmapped_area_topdown(struct fi
* return with success:
*/
vma = find_vma(mm, addr);
/* remember the address as a hint for next time */
return (mm->free_area_cache = addr);
-@@ -1531,13 +1730,21 @@ bottomup:
+@@ -1534,8 +1744,8 @@ arch_get_unmapped_area_topdown(struct fi
+ mm->cached_hole_size = vma->vm_start - addr;
+
+ /* try just below the current vma->vm_start */
+- addr = vma->vm_start-len;
+- } while (len < vma->vm_start);
++ addr = skip_heap_stack_gap(vma, len);
++ } while (!IS_ERR_VALUE(addr));
+
+ bottomup:
+ /*
+@@ -1544,13 +1754,21 @@ bottomup:
* can happen with large stack limits and large mmap()
* allocations.
*/
mm->cached_hole_size = ~0UL;
return addr;
-@@ -1546,6 +1753,12 @@ bottomup:
+@@ -1559,6 +1777,12 @@ bottomup:
void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
{
/*
* Is this a new hole at the highest possible address?
*/
-@@ -1553,8 +1766,10 @@ void arch_unmap_area_topdown(struct mm_s
+@@ -1566,8 +1790,10 @@ void arch_unmap_area_topdown(struct mm_s
mm->free_area_cache = addr;
/* dont allow allocations above current base */
}
unsigned long
-@@ -1662,6 +1877,28 @@ out:
+@@ -1675,6 +1901,28 @@ out:
return prev ? prev->vm_next : vma;
}
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -1678,6 +1915,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1691,6 +1939,7 @@ static int acct_stack_growth(struct vm_a
return -ENOMEM;
/* Stack limit test */
if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
return -ENOMEM;
-@@ -1688,6 +1926,7 @@ static int acct_stack_growth(struct vm_a
+@@ -1701,6 +1950,7 @@ static int acct_stack_growth(struct vm_a
locked = mm->locked_vm + grow;
limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
limit >>= PAGE_SHIFT;
if (locked > limit && !capable(CAP_IPC_LOCK))
return -ENOMEM;
}
-@@ -1718,37 +1957,48 @@ static int acct_stack_growth(struct vm_a
+@@ -1731,37 +1981,48 @@ static int acct_stack_growth(struct vm_a
* 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.
*/
unsigned long size, grow;
size = address - vma->vm_start;
-@@ -1760,6 +2010,8 @@ int expand_upwards(struct vm_area_struct
+@@ -1773,6 +2034,8 @@ int expand_upwards(struct vm_area_struct
perf_event_mmap(vma);
}
}
+ if (locknext)
+ vma_unlock_anon_vma(vma->vm_next);
vma_unlock_anon_vma(vma);
+ khugepaged_enter_vma_merge(vma);
return error;
- }
-@@ -1772,6 +2024,8 @@ static int expand_downwards(struct vm_ar
+@@ -1786,6 +2049,8 @@ static int expand_downwards(struct vm_ar
unsigned long address)
{
int error;
/*
* We must make sure the anon_vma is allocated
-@@ -1785,6 +2039,15 @@ static int expand_downwards(struct vm_ar
+@@ -1799,6 +2064,15 @@ static int expand_downwards(struct vm_ar
if (error)
return error;
vma_lock_anon_vma(vma);
/*
-@@ -1794,9 +2057,17 @@ static int expand_downwards(struct vm_ar
+@@ -1808,9 +2082,17 @@ static int expand_downwards(struct vm_ar
*/
/* Somebody else might have raced and expanded it already */
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -1804,10 +2075,21 @@ static int expand_downwards(struct vm_ar
+@@ -1818,10 +2100,21 @@ static int expand_downwards(struct vm_ar
if (!error) {
vma->vm_start = address;
vma->vm_pgoff -= grow;
vma_unlock_anon_vma(vma);
+ if (lockprev)
+ vma_unlock_anon_vma(prev);
+ khugepaged_enter_vma_merge(vma);
return error;
}
-
-@@ -1881,6 +2163,13 @@ static void remove_vma_list(struct mm_st
+@@ -1896,6 +2189,13 @@ static void remove_vma_list(struct mm_st
do {
long nrpages = vma_pages(vma);
mm->total_vm -= nrpages;
vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
vma = remove_vma(vma);
-@@ -1926,6 +2215,16 @@ detach_vmas_to_be_unmapped(struct mm_str
+@@ -1941,6 +2241,16 @@ detach_vmas_to_be_unmapped(struct mm_str
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
vma->vm_prev = NULL;
do {
rb_erase(&vma->vm_rb, &mm->mm_rb);
mm->map_count--;
tail_vma = vma;
-@@ -1954,14 +2253,33 @@ static int __split_vma(struct mm_struct
+@@ -1969,14 +2279,33 @@ static int __split_vma(struct mm_struct
struct vm_area_struct *new;
int err = -ENOMEM;
/* most fields are the same, copy all, and then fixup */
*new = *vma;
-@@ -1974,6 +2292,22 @@ static int __split_vma(struct mm_struct
+@@ -1989,6 +2318,22 @@ static int __split_vma(struct mm_struct
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
}
pol = mpol_dup(vma_policy(vma));
if (IS_ERR(pol)) {
err = PTR_ERR(pol);
-@@ -1999,6 +2333,42 @@ static int __split_vma(struct mm_struct
+@@ -2014,6 +2359,42 @@ static int __split_vma(struct mm_struct
else
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
/* Success. */
if (!err)
return 0;
-@@ -2011,10 +2381,18 @@ static int __split_vma(struct mm_struct
+@@ -2026,10 +2407,18 @@ static int __split_vma(struct mm_struct
removed_exe_file_vma(mm);
fput(new->vm_file);
}
kmem_cache_free(vm_area_cachep, new);
out_err:
return err;
-@@ -2027,6 +2405,15 @@ static int __split_vma(struct mm_struct
+@@ -2042,6 +2431,15 @@ static int __split_vma(struct mm_struct
int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, int new_below)
{
if (mm->map_count >= sysctl_max_map_count)
return -ENOMEM;
-@@ -2038,11 +2425,30 @@ int split_vma(struct mm_struct *mm, stru
+@@ -2053,11 +2451,30 @@ int split_vma(struct mm_struct *mm, stru
* work. This now handles partial unmappings.
* Jeremy Fitzhardinge <jeremy@goop.org>
*/
+#ifdef CONFIG_PAX_SEGMEXEC
-+int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
-+{
+ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+ {
+ int ret = __do_munmap(mm, start, len);
+ if (ret || !(mm->pax_flags & MF_PAX_SEGMEXEC))
+ return ret;
+
+int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+#else
- int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
++int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+#endif
- {
++{
unsigned long end;
struct vm_area_struct *vma, *prev, *last;
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
return -EINVAL;
-@@ -2116,6 +2522,8 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -2131,6 +2548,8 @@ int do_munmap(struct mm_struct *mm, unsi
/* Fix up all other VM information */
remove_vma_list(mm, vma);
return 0;
}
-@@ -2128,22 +2536,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a
+@@ -2143,22 +2562,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a
profile_munmap(addr);
/*
* this is really a simplified "do_mmap". it only handles
* anonymous maps. eventually we may be able to do some
-@@ -2157,6 +2561,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2172,6 +2587,7 @@ unsigned long do_brk(unsigned long addr,
struct rb_node ** rb_link, * rb_parent;
pgoff_t pgoff = addr >> PAGE_SHIFT;
int error;
len = PAGE_ALIGN(len);
if (!len)
-@@ -2168,16 +2573,30 @@ unsigned long do_brk(unsigned long addr,
+@@ -2183,16 +2599,30 @@ unsigned long do_brk(unsigned long addr,
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
-@@ -2194,22 +2613,22 @@ unsigned long do_brk(unsigned long addr,
+@@ -2209,22 +2639,22 @@ unsigned long do_brk(unsigned long addr,
/*
* Clear old maps. this also does some error checking for us
*/
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
-@@ -2223,7 +2642,7 @@ unsigned long do_brk(unsigned long addr,
+@@ -2238,7 +2668,7 @@ unsigned long do_brk(unsigned long addr,
*/
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma) {
return -ENOMEM;
}
-@@ -2237,11 +2656,12 @@ unsigned long do_brk(unsigned long addr,
+@@ -2252,11 +2682,12 @@ unsigned long do_brk(unsigned long addr,
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
perf_event_mmap(vma);
return addr;
}
-@@ -2288,8 +2708,10 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2303,8 +2734,10 @@ void exit_mmap(struct mm_struct *mm)
* Walk the list again, actually closing and freeing it,
* with preemption enabled, without holding any MM locks.
*/
BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
}
-@@ -2303,6 +2725,13 @@ int insert_vm_struct(struct mm_struct *
+@@ -2318,6 +2751,13 @@ int insert_vm_struct(struct mm_struct *
struct vm_area_struct * __vma, * prev;
struct rb_node ** rb_link, * rb_parent;
/*
* The vm_pgoff of a purely anonymous vma should be irrelevant
* until its first write fault, when page's anon_vma and index
-@@ -2325,7 +2754,22 @@ int insert_vm_struct(struct mm_struct *
+@@ -2340,7 +2780,22 @@ int insert_vm_struct(struct mm_struct *
if ((vma->vm_flags & VM_ACCOUNT) &&
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
return 0;
}
-@@ -2343,6 +2787,8 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2358,6 +2813,8 @@ struct vm_area_struct *copy_vma(struct v
struct rb_node **rb_link, *rb_parent;
struct mempolicy *pol;
/*
* If anonymous vma has not yet been faulted, update new pgoff
* to match new location, to increase its chance of merging.
-@@ -2392,6 +2838,39 @@ struct vm_area_struct *copy_vma(struct v
+@@ -2407,6 +2864,39 @@ struct vm_area_struct *copy_vma(struct v
kmem_cache_free(vm_area_cachep, new_vma);
return NULL;
}
/*
* Return true if the calling process may expand its vm space by the passed
-@@ -2403,7 +2882,7 @@ int may_expand_vm(struct mm_struct *mm,
+@@ -2418,7 +2908,7 @@ int may_expand_vm(struct mm_struct *mm,
unsigned long lim;
lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
if (cur + npages > lim)
return 0;
return 1;
-@@ -2474,6 +2953,22 @@ int install_special_mapping(struct mm_st
+@@ -2489,6 +2979,22 @@ int install_special_mapping(struct mm_st
vma->vm_start = addr;
vma->vm_end = addr + len;
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.37.2/mm/mprotect.c linux-2.6.37.2/mm/mprotect.c
---- linux-2.6.37.2/mm/mprotect.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/mprotect.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/mprotect.c linux-2.6.38.1/mm/mprotect.c
+--- linux-2.6.38.1/mm/mprotect.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/mprotect.c 2011-03-21 18:31:35.000000000 -0400
@@ -23,10 +23,16 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
#ifndef pgprot_modify
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
-@@ -131,6 +137,48 @@ static void change_protection(struct vm_
+@@ -141,6 +147,48 @@ static void change_protection(struct vm_
flush_tlb_range(vma, start, end);
}
int
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
unsigned long start, unsigned long end, unsigned long newflags)
-@@ -143,11 +191,29 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -153,11 +201,29 @@ mprotect_fixup(struct vm_area_struct *vm
int error;
int dirty_accountable = 0;
/*
* If we make a private mapping writable we increase our commit;
* but (without finer accounting) cannot reduce our commit if we
-@@ -164,6 +230,42 @@ mprotect_fixup(struct vm_area_struct *vm
+@@ -174,6 +240,42 @@ mprotect_fixup(struct vm_area_struct *vm
}
}
/*
* First try to merge with previous and/or next vma.
*/
-@@ -194,9 +296,21 @@ success:
+@@ -204,9 +306,21 @@ success:
* vm_flags and vm_page_prot are protected by the mmap_sem
* held in write mode.
*/
if (vma_wants_writenotify(vma)) {
vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
-@@ -238,6 +352,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -248,6 +362,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
end = start + len;
if (end <= start)
return -ENOMEM;
if (!arch_validate_prot(prot))
return -EINVAL;
-@@ -245,7 +370,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -255,7 +380,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
-@@ -277,6 +402,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -287,6 +412,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
if (start > vma->vm_start)
prev = vma;
for (nstart = start ; ; ) {
unsigned long newflags;
-@@ -286,6 +416,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -296,6 +426,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
/* newflags >> 4 shift VM_MAY% in place of VM_% */
if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
error = -EACCES;
goto out;
}
-@@ -300,6 +438,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
+@@ -310,6 +448,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
if (error)
goto out;
nstart = tmp;
if (nstart < prev->vm_end)
-diff -urNp linux-2.6.37.2/mm/mremap.c linux-2.6.37.2/mm/mremap.c
---- linux-2.6.37.2/mm/mremap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/mremap.c 2011-01-17 02:41:02.000000000 -0500
-@@ -113,6 +113,12 @@ static void move_ptes(struct vm_area_str
+diff -urNp linux-2.6.38.1/mm/mremap.c linux-2.6.38.1/mm/mremap.c
+--- linux-2.6.38.1/mm/mremap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/mremap.c 2011-03-21 18:31:35.000000000 -0400
+@@ -114,6 +114,12 @@ static void move_ptes(struct vm_area_str
continue;
pte = ptep_clear_flush(vma, old_addr, old_pte);
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
set_pte_at(mm, new_addr, new_pte, pte);
}
-@@ -272,6 +278,11 @@ static struct vm_area_struct *vma_to_res
+@@ -273,6 +279,11 @@ static struct vm_area_struct *vma_to_res
if (is_vm_hugetlb_page(vma))
goto Einval;
/* We can't remap across vm area boundaries */
if (old_len > vma->vm_end - addr)
goto Efault;
-@@ -321,20 +332,25 @@ static unsigned long mremap_to(unsigned
+@@ -322,20 +333,25 @@ static unsigned long mremap_to(unsigned
unsigned long ret = -EINVAL;
unsigned long charged = 0;
unsigned long map_flags;
goto out;
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
-@@ -406,6 +422,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -407,6 +423,7 @@ unsigned long do_mremap(unsigned long ad
struct vm_area_struct *vma;
unsigned long ret = -EINVAL;
unsigned long charged = 0;
if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
goto out;
-@@ -424,6 +441,17 @@ unsigned long do_mremap(unsigned long ad
+@@ -425,6 +442,17 @@ unsigned long do_mremap(unsigned long ad
if (!new_len)
goto out;
if (flags & MREMAP_FIXED) {
if (flags & MREMAP_MAYMOVE)
ret = mremap_to(addr, old_len, new_addr, new_len);
-@@ -473,6 +501,7 @@ unsigned long do_mremap(unsigned long ad
+@@ -474,6 +502,7 @@ unsigned long do_mremap(unsigned long ad
addr + new_len);
}
ret = addr;
goto out;
}
}
-@@ -499,7 +528,13 @@ unsigned long do_mremap(unsigned long ad
+@@ -500,7 +529,13 @@ unsigned long do_mremap(unsigned long ad
ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
if (ret)
goto out;
}
out:
if (ret & ~PAGE_MASK)
-diff -urNp linux-2.6.37.2/mm/nommu.c linux-2.6.37.2/mm/nommu.c
---- linux-2.6.37.2/mm/nommu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/nommu.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/nommu.c linux-2.6.38.1/mm/nommu.c
+--- linux-2.6.38.1/mm/nommu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/nommu.c 2011-03-21 18:31:35.000000000 -0400
@@ -63,7 +63,6 @@ int sysctl_overcommit_memory = OVERCOMMI
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
atomic_long_t mmap_pages_allocated;
-@@ -831,15 +830,6 @@ struct vm_area_struct *find_vma(struct m
+@@ -833,15 +832,6 @@ struct vm_area_struct *find_vma(struct m
EXPORT_SYMBOL(find_vma);
/*
* expand a stack to a given address
* - not supported under NOMMU conditions
*/
-@@ -1561,6 +1551,7 @@ int split_vma(struct mm_struct *mm, stru
+@@ -1563,6 +1553,7 @@ int split_vma(struct mm_struct *mm, stru
/* most fields are the same, copy all, and then fixup */
*new = *vma;
*region = *vma->vm_region;
new->vm_region = region;
-diff -urNp linux-2.6.37.2/mm/page_alloc.c linux-2.6.37.2/mm/page_alloc.c
---- linux-2.6.37.2/mm/page_alloc.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/mm/page_alloc.c 2011-02-22 16:05:44.000000000 -0500
-@@ -648,6 +648,10 @@ static bool free_pages_prepare(struct pa
+diff -urNp linux-2.6.38.1/mm/page_alloc.c linux-2.6.38.1/mm/page_alloc.c
+--- linux-2.6.38.1/mm/page_alloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/page_alloc.c 2011-03-21 18:31:35.000000000 -0400
+@@ -644,6 +644,10 @@ static bool free_pages_prepare(struct pa
int i;
int bad = 0;
trace_mm_page_free_direct(page, order);
kmemcheck_free_shadow(page, order);
-@@ -666,6 +670,12 @@ static bool free_pages_prepare(struct pa
+@@ -659,6 +663,12 @@ static bool free_pages_prepare(struct pa
debug_check_no_obj_freed(page_address(page),
PAGE_SIZE << order);
}
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
-@@ -780,8 +790,10 @@ static int prep_new_page(struct page *pa
+@@ -773,8 +783,10 @@ static int prep_new_page(struct page *pa
arch_alloc_page(page, order);
kernel_map_pages(page, 1 << order, 1);
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
-@@ -4033,7 +4045,7 @@ static void __init setup_usemap(struct p
- zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize);
- }
- #else
--static void inline setup_usemap(struct pglist_data *pgdat,
-+static inline void setup_usemap(struct pglist_data *pgdat,
- struct zone *zone, unsigned long zonesize) {}
- #endif /* CONFIG_SPARSEMEM */
-
-diff -urNp linux-2.6.37.2/mm/percpu.c linux-2.6.37.2/mm/percpu.c
---- linux-2.6.37.2/mm/percpu.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/percpu.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/percpu.c linux-2.6.38.1/mm/percpu.c
+--- linux-2.6.38.1/mm/percpu.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/percpu.c 2011-03-21 18:31:35.000000000 -0400
@@ -121,7 +121,7 @@ static unsigned int pcpu_first_unit_cpu
static unsigned int pcpu_last_unit_cpu __read_mostly;
EXPORT_SYMBOL_GPL(pcpu_base_addr);
static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */
-diff -urNp linux-2.6.37.2/mm/rmap.c linux-2.6.37.2/mm/rmap.c
---- linux-2.6.37.2/mm/rmap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/rmap.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/rmap.c linux-2.6.38.1/mm/rmap.c
+--- linux-2.6.38.1/mm/rmap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/rmap.c 2011-03-21 18:31:35.000000000 -0400
@@ -117,6 +117,10 @@ int anon_vma_prepare(struct vm_area_stru
struct anon_vma *anon_vma = vma->anon_vma;
struct anon_vma_chain *avc;
anon_vma_chain_free(avc);
out_enomem:
return -ENOMEM;
-@@ -185,7 +222,7 @@ static void anon_vma_chain_link(struct v
+@@ -189,7 +226,7 @@ static void anon_vma_chain_link(struct v
* Attach the anon_vmas from src to dst.
* Returns 0 on success, -ENOMEM on failure.
*/
{
struct anon_vma_chain *avc, *pavc;
-@@ -207,7 +244,7 @@ int anon_vma_clone(struct vm_area_struct
+@@ -211,7 +248,7 @@ int anon_vma_clone(struct vm_area_struct
* the corresponding VMA in the parent process is attached to.
* Returns 0 on success, non-zero on failure.
*/
{
struct anon_vma_chain *avc;
struct anon_vma *anon_vma;
-diff -urNp linux-2.6.37.2/mm/shmem.c linux-2.6.37.2/mm/shmem.c
---- linux-2.6.37.2/mm/shmem.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/shmem.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/shmem.c linux-2.6.38.1/mm/shmem.c
+--- linux-2.6.38.1/mm/shmem.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/shmem.c 2011-03-21 18:31:35.000000000 -0400
@@ -31,7 +31,7 @@
#include <linux/percpu_counter.h>
#include <linux/swap.h>
if (entry->val) {
/*
* The more uptodate page coming down from a stacked
-diff -urNp linux-2.6.37.2/mm/slab.c linux-2.6.37.2/mm/slab.c
---- linux-2.6.37.2/mm/slab.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/slab.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/slab.c linux-2.6.38.1/mm/slab.c
+--- linux-2.6.38.1/mm/slab.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/slab.c 2011-03-21 18:31:35.000000000 -0400
@@ -284,7 +284,7 @@ struct kmem_list3 {
* Need this for bootstrapping a per node allocator.
*/
#define NUM_INIT_LISTS (3 * MAX_NUMNODES)
--struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS];
-+struct kmem_list3 initkmem_list3[NUM_INIT_LISTS];
+-static struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS];
++static struct kmem_list3 initkmem_list3[NUM_INIT_LISTS];
#define CACHE_CACHE 0
#define SIZE_AC MAX_NUMNODES
#define SIZE_L3 (2 * MAX_NUMNODES)
/* internal cache of cache description objs */
static struct kmem_cache cache_cache = {
-@@ -4557,15 +4557,66 @@ static const struct file_operations proc
+@@ -4535,15 +4535,66 @@ static const struct file_operations proc
static int __init slab_proc_init(void)
{
/**
* ksize - get the actual amount of memory allocated for a given object
* @objp: Pointer to the object
-diff -urNp linux-2.6.37.2/mm/slob.c linux-2.6.37.2/mm/slob.c
---- linux-2.6.37.2/mm/slob.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/slob.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/slob.c linux-2.6.38.1/mm/slob.c
+--- linux-2.6.38.1/mm/slob.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/slob.c 2011-03-21 18:31:35.000000000 -0400
@@ -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
}
trace_kmem_cache_free(_RET_IP_, b);
-diff -urNp linux-2.6.37.2/mm/slub.c linux-2.6.37.2/mm/slub.c
---- linux-2.6.37.2/mm/slub.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/mm/slub.c 2011-02-22 16:05:44.000000000 -0500
-@@ -388,7 +388,7 @@ static void print_track(const char *s, s
+diff -urNp linux-2.6.38.1/mm/slub.c linux-2.6.38.1/mm/slub.c
+--- linux-2.6.38.1/mm/slub.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/slub.c 2011-03-21 18:31:35.000000000 -0400
+@@ -390,7 +390,7 @@ static void print_track(const char *s, s
if (!t->addr)
return;
s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
}
-@@ -1911,6 +1911,8 @@ void kmem_cache_free(struct kmem_cache *
+@@ -1927,6 +1927,8 @@ void kmem_cache_free(struct kmem_cache *
page = virt_to_head_page(x);
slab_free(s, page, x, _RET_IP_);
trace_kmem_cache_free(_RET_IP_, x);
-@@ -1955,7 +1957,7 @@ static int slub_min_objects;
+@@ -1960,7 +1962,7 @@ static int slub_min_objects;
* Merge control. If this is set then no merging of slab caches will occur.
* (Could be removed. This was introduced to pacify the merge skeptics.)
*/
/*
* Calculate the order of allocation given an slab object size.
-@@ -2365,7 +2367,7 @@ static int kmem_cache_open(struct kmem_c
+@@ -2370,7 +2372,7 @@ static int kmem_cache_open(struct kmem_c
* list to avoid pounding the page allocator excessively.
*/
set_min_partial(s, ilog2(s->size));
#ifdef CONFIG_NUMA
s->remote_node_defrag_ratio = 1000;
#endif
-@@ -2506,8 +2508,7 @@ static inline int kmem_cache_close(struc
+@@ -2482,8 +2484,7 @@ static inline int kmem_cache_close(struc
void kmem_cache_destroy(struct kmem_cache *s)
{
down_write(&slub_lock);
list_del(&s->list);
if (kmem_cache_close(s)) {
printk(KERN_ERR "SLUB %s: %s called for cache that "
-@@ -2717,6 +2718,46 @@ void *__kmalloc_node(size_t size, gfp_t
+@@ -2693,6 +2694,46 @@ void *__kmalloc_node(size_t size, gfp_t
EXPORT_SYMBOL(__kmalloc_node);
#endif
+ if (!virt_addr_valid(ptr))
+ return;
+
-+ page = get_object_page(ptr);
++ page = virt_to_head_page(ptr);
+
-+ if (!page) {
++ if (!PageSlab(page)) {
+ if (object_is_on_stack(ptr, n) == -1)
+ goto report;
+ return;
size_t ksize(const void *object)
{
struct page *page;
-@@ -2982,7 +3023,7 @@ static void __init kmem_cache_bootstrap_
+@@ -2958,7 +2999,7 @@ static void __init kmem_cache_bootstrap_
int node;
list_add(&s->list, &slab_caches);
for_each_node_state(node, N_NORMAL_MEMORY) {
struct kmem_cache_node *n = get_node(s, node);
-@@ -3177,7 +3218,7 @@ static int slab_unmergeable(struct kmem_
+@@ -3153,7 +3194,7 @@ static int slab_unmergeable(struct kmem_
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
return 1;
return 0;
-@@ -3236,7 +3277,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3212,7 +3253,7 @@ struct kmem_cache *kmem_cache_create(con
down_write(&slub_lock);
s = find_mergeable(size, align, flags, name, ctor);
if (s) {
/*
* Adjust the object sizes so that we clear
* the complete object on kzalloc.
-@@ -3245,7 +3286,7 @@ struct kmem_cache *kmem_cache_create(con
+@@ -3221,7 +3262,7 @@ struct kmem_cache *kmem_cache_create(con
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
if (sysfs_slab_alias(s, name)) {
goto err;
}
up_write(&slub_lock);
-@@ -3981,7 +4022,7 @@ SLAB_ATTR_RO(ctor);
+@@ -3954,7 +3995,7 @@ SLAB_ATTR_RO(ctor);
static ssize_t aliases_show(struct kmem_cache *s, char *buf)
{
}
SLAB_ATTR_RO(aliases);
-@@ -4718,7 +4759,13 @@ static const struct file_operations proc
+@@ -4691,7 +4732,13 @@ static const struct file_operations proc
static int __init slab_proc_init(void)
{
return 0;
}
module_init(slab_proc_init);
-diff -urNp linux-2.6.37.2/mm/util.c linux-2.6.37.2/mm/util.c
---- linux-2.6.37.2/mm/util.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/util.c 2011-01-17 02:41:02.000000000 -0500
-@@ -240,6 +240,12 @@ EXPORT_SYMBOL(strndup_user);
+diff -urNp linux-2.6.38.1/mm/util.c linux-2.6.38.1/mm/util.c
+--- linux-2.6.38.1/mm/util.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/util.c 2011-03-21 18:31:35.000000000 -0400
+@@ -219,6 +219,12 @@ EXPORT_SYMBOL(strndup_user);
void arch_pick_mmap_layout(struct mm_struct *mm)
{
mm->mmap_base = TASK_UNMAPPED_BASE;
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
}
-diff -urNp linux-2.6.37.2/mm/vmalloc.c linux-2.6.37.2/mm/vmalloc.c
---- linux-2.6.37.2/mm/vmalloc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/mm/vmalloc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/vmalloc.c linux-2.6.38.1/mm/vmalloc.c
+--- linux-2.6.38.1/mm/vmalloc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/vmalloc.c 2011-03-21 18:31:35.000000000 -0400
@@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd,
pte = pte_offset_kernel(pmd, addr);
if (!pmd_none(*pmd)) {
pte_t *ptep, pte;
-@@ -1243,6 +1283,16 @@ static struct vm_struct *__get_vm_area_n
+@@ -1244,6 +1284,16 @@ static struct vm_struct *__get_vm_area_n
struct vm_struct *area;
BUG_ON(in_interrupt());
if (flags & VM_IOREMAP) {
int bit = fls(size);
-@@ -1468,6 +1518,11 @@ void *vmap(struct page **pages, unsigned
+@@ -1462,6 +1512,11 @@ void *vmap(struct page **pages, unsigned
if (count > totalram_pages)
return NULL;
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
__builtin_return_address(0));
if (!area)
-@@ -1577,6 +1632,13 @@ static void *__vmalloc_node(unsigned lon
+@@ -1558,6 +1613,13 @@ void *__vmalloc_node_range(unsigned long
if (!size || (size >> PAGE_SHIFT) > totalram_pages)
return NULL;
+ else
+#endif
+
- area = __get_vm_area_node(size, align, VM_ALLOC, VMALLOC_START,
- VMALLOC_END, node, gfp_mask, caller);
+ area = __get_vm_area_node(size, align, VM_ALLOC, start, end, node,
+ gfp_mask, caller);
-@@ -1595,6 +1657,7 @@ static void *__vmalloc_node(unsigned lon
- return addr;
+@@ -1597,6 +1659,7 @@ static void *__vmalloc_node(unsigned lon
+ gfp_mask, prot, node, caller);
}
+#undef __vmalloc
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
{
return __vmalloc_node(size, 1, gfp_mask, prot, -1,
-@@ -1618,6 +1681,7 @@ static inline void *__vmalloc_node_flags
+@@ -1620,6 +1683,7 @@ static inline void *__vmalloc_node_flags
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
void *vmalloc(unsigned long size)
{
return __vmalloc_node_flags(size, -1, GFP_KERNEL | __GFP_HIGHMEM);
-@@ -1634,6 +1698,7 @@ EXPORT_SYMBOL(vmalloc);
+@@ -1636,6 +1700,7 @@ EXPORT_SYMBOL(vmalloc);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
void *vzalloc(unsigned long size)
{
return __vmalloc_node_flags(size, -1,
-@@ -1648,6 +1713,7 @@ EXPORT_SYMBOL(vzalloc);
+@@ -1650,6 +1715,7 @@ EXPORT_SYMBOL(vzalloc);
* The resulting memory area is zeroed so it can be mapped to userspace
* without leaking data.
*/
void *vmalloc_user(unsigned long size)
{
struct vm_struct *area;
-@@ -1675,6 +1741,7 @@ EXPORT_SYMBOL(vmalloc_user);
+@@ -1677,6 +1743,7 @@ EXPORT_SYMBOL(vmalloc_user);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
void *vmalloc_node(unsigned long size, int node)
{
return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL,
-@@ -1694,6 +1761,7 @@ EXPORT_SYMBOL(vmalloc_node);
+@@ -1696,6 +1763,7 @@ EXPORT_SYMBOL(vmalloc_node);
* For tight control over page level allocator and protection flags
* use __vmalloc_node() instead.
*/
void *vzalloc_node(unsigned long size, int node)
{
return __vmalloc_node_flags(size, node,
-@@ -1716,10 +1784,10 @@ EXPORT_SYMBOL(vzalloc_node);
+@@ -1718,10 +1786,10 @@ EXPORT_SYMBOL(vzalloc_node);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
-1, __builtin_return_address(0));
}
-@@ -1738,6 +1806,7 @@ void *vmalloc_exec(unsigned long size)
+@@ -1740,6 +1808,7 @@ void *vmalloc_exec(unsigned long size)
* Allocate enough 32bit PA addressable pages to cover @size from the
* page level allocator and map them into contiguous kernel virtual space.
*/
void *vmalloc_32(unsigned long size)
{
return __vmalloc_node(size, 1, GFP_VMALLOC32, PAGE_KERNEL,
-@@ -1752,6 +1821,7 @@ EXPORT_SYMBOL(vmalloc_32);
+@@ -1754,6 +1823,7 @@ EXPORT_SYMBOL(vmalloc_32);
* The resulting memory area is 32bit addressable and zeroed so it can be
* mapped to userspace without leaking data.
*/
void *vmalloc_32_user(unsigned long size)
{
struct vm_struct *area;
-@@ -2016,6 +2086,8 @@ int remap_vmalloc_range(struct vm_area_s
+@@ -2018,6 +2088,8 @@ int remap_vmalloc_range(struct vm_area_s
unsigned long uaddr = vma->vm_start;
unsigned long usize = vma->vm_end - vma->vm_start;
if ((PAGE_SIZE-1) & (unsigned long)addr)
return -EINVAL;
-diff -urNp linux-2.6.37.2/mm/vmstat.c linux-2.6.37.2/mm/vmstat.c
---- linux-2.6.37.2/mm/vmstat.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/mm/vmstat.c 2011-02-22 16:05:44.000000000 -0500
+diff -urNp linux-2.6.38.1/mm/vmstat.c linux-2.6.38.1/mm/vmstat.c
+--- linux-2.6.38.1/mm/vmstat.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/mm/vmstat.c 2011-03-21 18:31:35.000000000 -0400
@@ -78,7 +78,7 @@ void vm_events_fold_cpu(int cpu)
*
* vm_stat contains the global counters
EXPORT_SYMBOL(vm_stat);
#ifdef CONFIG_SMP
-@@ -396,7 +396,7 @@ void refresh_cpu_vm_stats(int cpu)
+@@ -451,7 +451,7 @@ void refresh_cpu_vm_stats(int cpu)
v = p->vm_stat_diff[i];
p->vm_stat_diff[i] = 0;
local_irq_restore(flags);
global_diff[i] += v;
#ifdef CONFIG_NUMA
/* 3 seconds idle till flush */
-@@ -434,7 +434,7 @@ void refresh_cpu_vm_stats(int cpu)
+@@ -489,7 +489,7 @@ void refresh_cpu_vm_stats(int cpu)
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
if (global_diff[i])
}
#endif
-@@ -1132,10 +1132,20 @@ static int __init setup_vmstat(void)
+@@ -1188,10 +1188,20 @@ static int __init setup_vmstat(void)
start_cpu_timer(cpu);
#endif
#ifdef CONFIG_PROC_FS
#endif
return 0;
}
-diff -urNp linux-2.6.37.2/net/8021q/vlan.c linux-2.6.37.2/net/8021q/vlan.c
---- linux-2.6.37.2/net/8021q/vlan.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/8021q/vlan.c 2011-01-17 02:41:02.000000000 -0500
-@@ -588,8 +588,7 @@ static int vlan_ioctl_handler(struct net
+diff -urNp linux-2.6.38.1/net/8021q/vlan.c linux-2.6.38.1/net/8021q/vlan.c
+--- linux-2.6.38.1/net/8021q/vlan.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/8021q/vlan.c 2011-03-21 18:31:35.000000000 -0400
+@@ -589,8 +589,7 @@ static int vlan_ioctl_handler(struct net
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
break;
struct vlan_net *vn;
vn = net_generic(net, vlan_net_id);
-diff -urNp linux-2.6.37.2/net/atm/atm_misc.c linux-2.6.37.2/net/atm/atm_misc.c
---- linux-2.6.37.2/net/atm/atm_misc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/atm/atm_misc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/atm/atm_misc.c linux-2.6.38.1/net/atm/atm_misc.c
+--- linux-2.6.38.1/net/atm/atm_misc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/atm/atm_misc.c 2011-03-21 18:31:35.000000000 -0400
@@ -17,7 +17,7 @@ int atm_charge(struct atm_vcc *vcc, int
if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf)
return 1;
__SONET_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.37.2/net/atm/proc.c linux-2.6.37.2/net/atm/proc.c
---- linux-2.6.37.2/net/atm/proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/atm/proc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/atm/proc.c linux-2.6.38.1/net/atm/proc.c
+--- linux-2.6.38.1/net/atm/proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/atm/proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -45,9 +45,9 @@ static void add_stats(struct seq_file *s
const struct k_atm_aal_stats *stats)
{
if (!vcc->dev)
seq_printf(seq, "Unassigned ");
else
-diff -urNp linux-2.6.37.2/net/atm/resources.c linux-2.6.37.2/net/atm/resources.c
---- linux-2.6.37.2/net/atm/resources.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/atm/resources.c 2011-01-17 02:41:02.000000000 -0500
+@@ -218,7 +223,11 @@ static void svc_info(struct seq_file *se
+ {
+ if (!vcc->dev)
+ seq_printf(seq, sizeof(void *) == 4 ?
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++ "N/A@%p%10s" : "N/A@%p%2s", NULL, "");
++#else
+ "N/A@%p%10s" : "N/A@%p%2s", vcc, "");
++#endif
+ else
+ seq_printf(seq, "%3d %3d %5d ",
+ vcc->dev->number, vcc->vpi, vcc->vci);
+diff -urNp linux-2.6.38.1/net/atm/resources.c linux-2.6.38.1/net/atm/resources.c
+--- linux-2.6.38.1/net/atm/resources.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/atm/resources.c 2011-03-21 18:31:35.000000000 -0400
@@ -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)
__AAL_STAT_ITEMS
#undef __HANDLE_ITEM
}
-diff -urNp linux-2.6.37.2/net/bridge/br_multicast.c linux-2.6.37.2/net/bridge/br_multicast.c
---- linux-2.6.37.2/net/bridge/br_multicast.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/bridge/br_multicast.c 2011-02-22 16:37:28.000000000 -0500
-@@ -707,7 +707,8 @@ static int br_multicast_add_group(struct
- goto err;
-
- if (!port) {
-- hlist_add_head(&mp->mglist, &br->mglist);
-+ if (hlist_unhashed(&mp->mglist))
-+ hlist_add_head(&mp->mglist, &br->mglist);
- mod_timer(&mp->timer, now + br->multicast_membership_interval);
- goto out;
- }
-@@ -1461,7 +1462,7 @@ static int br_multicast_ipv6_rcv(struct
+diff -urNp linux-2.6.38.1/net/bluetooth/bnep/sock.c linux-2.6.38.1/net/bluetooth/bnep/sock.c
+--- linux-2.6.38.1/net/bluetooth/bnep/sock.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/bluetooth/bnep/sock.c 2011-03-21 18:31:35.000000000 -0400
+@@ -88,6 +88,7 @@ static int bnep_sock_ioctl(struct socket
+ sockfd_put(nsock);
+ return -EBADFD;
+ }
++ ca.device[sizeof(ca.device)-1] = 0;
+
+ err = bnep_add_connection(&ca, nsock);
+ if (!err) {
+diff -urNp linux-2.6.38.1/net/bluetooth/sco.c linux-2.6.38.1/net/bluetooth/sco.c
+--- linux-2.6.38.1/net/bluetooth/sco.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/bluetooth/sco.c 2011-03-21 18:31:35.000000000 -0400
+@@ -703,6 +703,7 @@ static int sco_sock_getsockopt_old(struc
+ break;
+ }
+
++ memset(&cinfo, 0, sizeof(cinfo));
+ cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle;
+ memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3);
+
+diff -urNp linux-2.6.38.1/net/bridge/br_multicast.c linux-2.6.38.1/net/bridge/br_multicast.c
+--- linux-2.6.38.1/net/bridge/br_multicast.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/bridge/br_multicast.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1482,7 +1482,7 @@ static int br_multicast_ipv6_rcv(struct
nexthdr = ip6h->nexthdr;
offset = ipv6_skip_exthdr(skb, sizeof(*ip6h), &nexthdr);
return 0;
/* Okay, we found ICMPv6 header */
-diff -urNp linux-2.6.37.2/net/bridge/br_stp_if.c linux-2.6.37.2/net/bridge/br_stp_if.c
---- linux-2.6.37.2/net/bridge/br_stp_if.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/bridge/br_stp_if.c 2011-01-17 02:41:02.000000000 -0500
-@@ -145,7 +145,7 @@ static void br_stp_stop(struct net_bridg
- char *envp[] = { NULL };
-
- if (br->stp_enabled == BR_USER_STP) {
-- r = call_usermodehelper(BR_STP_PROG, argv, envp, 1);
-+ r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
- br_info(br, "userspace STP stopped, return code %d\n", r);
-
- /* To start timers on any ports left in blocking */
-diff -urNp linux-2.6.37.2/net/bridge/netfilter/ebtables.c linux-2.6.37.2/net/bridge/netfilter/ebtables.c
---- linux-2.6.37.2/net/bridge/netfilter/ebtables.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/bridge/netfilter/ebtables.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1511,7 +1511,7 @@ static int do_ebt_get_ctl(struct sock *s
+diff -urNp linux-2.6.38.1/net/bridge/netfilter/ebtables.c linux-2.6.38.1/net/bridge/netfilter/ebtables.c
+--- linux-2.6.38.1/net/bridge/netfilter/ebtables.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/bridge/netfilter/ebtables.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1107,6 +1107,8 @@ static int do_replace(struct net *net, c
+ if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
+ return -ENOMEM;
+
++ tmp.name[sizeof(tmp.name)-1] = 0;
++
+ countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;
+ newinfo = vmalloc(sizeof(*newinfo) + countersize);
+ if (!newinfo)
+@@ -1510,7 +1512,7 @@ static int do_ebt_get_ctl(struct sock *s
tmp.valid_hooks = t->table->valid_hooks;
}
mutex_unlock(&ebt_mutex);
BUGPRINT("c2u Didn't work\n");
ret = -EFAULT;
break;
-diff -urNp linux-2.6.37.2/net/core/dev.c linux-2.6.37.2/net/core/dev.c
---- linux-2.6.37.2/net/core/dev.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/net/core/dev.c 2011-02-27 14:50:36.000000000 -0500
-@@ -2654,7 +2654,7 @@ int netif_rx_ni(struct sk_buff *skb)
+diff -urNp linux-2.6.38.1/net/can/bcm.c linux-2.6.38.1/net/can/bcm.c
+--- linux-2.6.38.1/net/can/bcm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/can/bcm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -165,9 +165,15 @@ static int bcm_proc_show(struct seq_file
+ struct bcm_sock *bo = bcm_sk(sk);
+ struct bcm_op *op;
+
++#ifdef CONFIG_GRKERNSEC_HIDESYM
++ seq_printf(m, ">>> socket %p", NULL);
++ seq_printf(m, " / sk %p", NULL);
++ seq_printf(m, " / bo %p", NULL);
++#else
+ seq_printf(m, ">>> socket %p", sk->sk_socket);
+ seq_printf(m, " / sk %p", sk);
+ seq_printf(m, " / bo %p", bo);
++#endif
+ 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.38.1/net/core/dev.c linux-2.6.38.1/net/core/dev.c
+--- linux-2.6.38.1/net/core/dev.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/core/dev.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1124,7 +1124,7 @@ void dev_load(struct net *net, const cha
+ if (no_module && capable(CAP_NET_ADMIN))
+ no_module = request_module("netdev-%s", name);
+ if (no_module && capable(CAP_SYS_MODULE)) {
+- if (!request_module("%s", name))
++ if (!request_module("%s", name))
+ pr_err("Loading kernel module for a network device "
+ "with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s "
+ "instead\n", name);
+@@ -2787,7 +2787,7 @@ int netif_rx_ni(struct sk_buff *skb)
}
EXPORT_SYMBOL(netif_rx_ni);
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
-@@ -3570,7 +3570,7 @@ void netif_napi_del(struct napi_struct *
+@@ -3697,7 +3697,7 @@ void netif_napi_del(struct napi_struct *
}
EXPORT_SYMBOL(netif_napi_del);
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
unsigned long time_limit = jiffies + 2;
-diff -urNp linux-2.6.37.2/net/core/sock.c linux-2.6.37.2/net/core/sock.c
---- linux-2.6.37.2/net/core/sock.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/net/core/sock.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/net/core/sock.c linux-2.6.38.1/net/core/sock.c
+--- linux-2.6.38.1/net/core/sock.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/core/sock.c 2011-03-21 18:31:35.000000000 -0400
@@ -934,7 +934,7 @@ int sock_getsockopt(struct socket *sock,
return -ENOTCONN;
if (lv < len)
return -EFAULT;
lenout:
if (put_user(len, optlen))
-diff -urNp linux-2.6.37.2/net/dccp/ccids/ccid3.c linux-2.6.37.2/net/dccp/ccids/ccid3.c
---- linux-2.6.37.2/net/dccp/ccids/ccid3.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/dccp/ccids/ccid3.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/dccp/ccids/ccid3.c linux-2.6.38.1/net/dccp/ccids/ccid3.c
+--- linux-2.6.38.1/net/dccp/ccids/ccid3.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/dccp/ccids/ccid3.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,7 +41,7 @@
static int ccid3_debug;
#define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)
#endif
/*
-diff -urNp linux-2.6.37.2/net/dccp/dccp.h linux-2.6.37.2/net/dccp/dccp.h
---- linux-2.6.37.2/net/dccp/dccp.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/dccp/dccp.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/dccp/dccp.h linux-2.6.38.1/net/dccp/dccp.h
+--- linux-2.6.38.1/net/dccp/dccp.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/dccp/dccp.h 2011-03-21 18:31:35.000000000 -0400
@@ -44,9 +44,9 @@ extern int dccp_debug;
#define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a)
#define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
#endif
extern struct inet_hashinfo dccp_hashinfo;
-diff -urNp linux-2.6.37.2/net/decnet/sysctl_net_decnet.c linux-2.6.37.2/net/decnet/sysctl_net_decnet.c
---- linux-2.6.37.2/net/decnet/sysctl_net_decnet.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/decnet/sysctl_net_decnet.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/decnet/sysctl_net_decnet.c linux-2.6.38.1/net/decnet/sysctl_net_decnet.c
+--- linux-2.6.38.1/net/decnet/sysctl_net_decnet.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/decnet/sysctl_net_decnet.c 2011-03-21 18:31:35.000000000 -0400
@@ -173,7 +173,7 @@ static int dn_node_address_handler(ctl_t
if (len > *lenp) len = *lenp;
return -EFAULT;
*lenp = len;
-diff -urNp linux-2.6.37.2/net/econet/Kconfig linux-2.6.37.2/net/econet/Kconfig
---- linux-2.6.37.2/net/econet/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/econet/Kconfig 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/econet/Kconfig linux-2.6.38.1/net/econet/Kconfig
+--- linux-2.6.38.1/net/econet/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/econet/Kconfig 2011-03-21 18:31:35.000000000 -0400
@@ -4,7 +4,7 @@
config ECONET
---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.37.2/net/ipv4/inet_diag.c linux-2.6.37.2/net/ipv4/inet_diag.c
---- linux-2.6.37.2/net/ipv4/inet_diag.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/inet_diag.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/inet_diag.c linux-2.6.38.1/net/ipv4/inet_diag.c
+--- linux-2.6.38.1/net/ipv4/inet_diag.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/inet_diag.c 2011-03-21 18:31:35.000000000 -0400
@@ -114,8 +114,14 @@ static int inet_csk_diag_fill(struct soc
r->idiag_retrans = 0;
tmo = req->expires - jiffies;
if (tmo < 0)
-diff -urNp linux-2.6.37.2/net/ipv4/inet_hashtables.c linux-2.6.37.2/net/ipv4/inet_hashtables.c
---- linux-2.6.37.2/net/ipv4/inet_hashtables.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/inet_hashtables.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/inet_hashtables.c linux-2.6.38.1/net/ipv4/inet_hashtables.c
+--- linux-2.6.38.1/net/ipv4/inet_hashtables.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/inet_hashtables.c 2011-03-21 18:31:35.000000000 -0400
@@ -18,11 +18,14 @@
#include <linux/sched.h>
#include <linux/slab.h>
if (tw) {
inet_twsk_deschedule(tw, death_row);
while (twrefcnt) {
-diff -urNp linux-2.6.37.2/net/ipv4/inetpeer.c linux-2.6.37.2/net/ipv4/inetpeer.c
---- linux-2.6.37.2/net/ipv4/inetpeer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/inetpeer.c 2011-01-17 02:41:02.000000000 -0500
-@@ -469,8 +469,8 @@ struct inet_peer *inet_getpeer(__be32 da
+diff -urNp linux-2.6.38.1/net/ipv4/inetpeer.c linux-2.6.38.1/net/ipv4/inetpeer.c
+--- linux-2.6.38.1/net/ipv4/inetpeer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/inetpeer.c 2011-03-21 18:31:35.000000000 -0400
+@@ -509,8 +509,8 @@ struct inet_peer *inet_getpeer(struct in
if (p) {
- p->v4daddr = daddr;
+ p->daddr = *daddr;
atomic_set(&p->refcnt, 1);
- atomic_set(&p->rid, 0);
-- atomic_set(&p->ip_id_count, secure_ip_id(daddr));
+- atomic_set(&p->ip_id_count, secure_ip_id(daddr->a4));
+ atomic_set_unchecked(&p->rid, 0);
-+ atomic_set_unchecked(&p->ip_id_count, secure_ip_id(daddr));
++ atomic_set_unchecked(&p->ip_id_count, secure_ip_id(daddr->a4));
p->tcp_ts_stamp = 0;
INIT_LIST_HEAD(&p->unused);
-diff -urNp linux-2.6.37.2/net/ipv4/ip_fragment.c linux-2.6.37.2/net/ipv4/ip_fragment.c
---- linux-2.6.37.2/net/ipv4/ip_fragment.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/ip_fragment.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/ip_fragment.c linux-2.6.38.1/net/ipv4/ip_fragment.c
+--- linux-2.6.38.1/net/ipv4/ip_fragment.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/ip_fragment.c 2011-03-21 18:31:35.000000000 -0400
@@ -298,7 +298,7 @@ static inline int ip_frag_too_far(struct
return 0;
qp->rid = end;
rc = qp->q.fragments && (end - start) > max;
-diff -urNp linux-2.6.37.2/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.37.2/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-2.6.37.2/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.38.1/net/ipv4/netfilter/nf_nat_snmp_basic.c
+--- linux-2.6.38.1/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/netfilter/nf_nat_snmp_basic.c 2011-03-21 18:31:35.000000000 -0400
@@ -398,7 +398,7 @@ static unsigned char asn1_octets_decode(
*len = 0;
if (*octets == NULL) {
if (net_ratelimit())
pr_notice("OOM in bsalg (%d)\n", __LINE__);
-diff -urNp linux-2.6.37.2/net/ipv4/route.c linux-2.6.37.2/net/ipv4/route.c
---- linux-2.6.37.2/net/ipv4/route.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/route.c 2011-01-17 02:41:02.000000000 -0500
-@@ -2876,7 +2876,7 @@ static int rt_fill_info(struct net *net,
+diff -urNp linux-2.6.38.1/net/ipv4/route.c linux-2.6.38.1/net/ipv4/route.c
+--- linux-2.6.38.1/net/ipv4/route.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/route.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2857,7 +2857,7 @@ static int rt_fill_info(struct net *net,
expires = rt->dst.expires ? rt->dst.expires - jiffies : 0;
if (rt->peer) {
inet_peer_refcheck(rt->peer);
if (rt->peer->tcp_ts_stamp) {
ts = rt->peer->tcp_ts;
tsage = get_seconds() - rt->peer->tcp_ts_stamp;
-diff -urNp linux-2.6.37.2/net/ipv4/tcp_ipv4.c linux-2.6.37.2/net/ipv4/tcp_ipv4.c
---- linux-2.6.37.2/net/ipv4/tcp_ipv4.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/tcp_ipv4.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/tcp_ipv4.c linux-2.6.38.1/net/ipv4/tcp_ipv4.c
+--- linux-2.6.38.1/net/ipv4/tcp_ipv4.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/tcp_ipv4.c 2011-03-21 18:31:35.000000000 -0400
@@ -86,6 +86,9 @@ int sysctl_tcp_tw_reuse __read_mostly;
int sysctl_tcp_low_latency __read_mostly;
EXPORT_SYMBOL(sysctl_tcp_low_latency);
#ifdef CONFIG_TCP_MD5SIG
static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
-@@ -1599,6 +1602,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
+@@ -1593,6 +1596,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
return 0;
reset:
tcp_v4_send_reset(rsk, skb);
discard:
kfree_skb(skb);
-@@ -1661,12 +1667,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
+@@ -1655,12 +1661,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
TCP_SKB_CB(skb)->sacked = 0;
sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
-@@ -1716,6 +1729,10 @@ no_tcp_socket:
+@@ -1710,6 +1723,10 @@ no_tcp_socket:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
tcp_v4_send_reset(NULL, skb);
}
-@@ -2404,7 +2421,11 @@ static void get_openreq4(struct sock *sk
+@@ -2373,7 +2390,11 @@ static void get_openreq4(struct sock *sk
0, /* non standard timer */
0, /* open_requests have no inode */
atomic_read(&sk->sk_refcnt),
len);
}
-@@ -2454,7 +2475,12 @@ static void get_tcp4_sock(struct sock *s
+@@ -2423,7 +2444,12 @@ static void get_tcp4_sock(struct sock *s
sock_i_uid(sk),
icsk->icsk_probes_out,
sock_i_ino(sk),
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
-@@ -2482,7 +2508,13 @@ static void get_timewait4_sock(struct in
+@@ -2451,7 +2477,13 @@ static void get_timewait4_sock(struct in
" %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,
}
#define TMPSZ 150
-diff -urNp linux-2.6.37.2/net/ipv4/tcp_minisocks.c linux-2.6.37.2/net/ipv4/tcp_minisocks.c
---- linux-2.6.37.2/net/ipv4/tcp_minisocks.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/tcp_minisocks.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/tcp_minisocks.c linux-2.6.38.1/net/ipv4/tcp_minisocks.c
+--- linux-2.6.38.1/net/ipv4/tcp_minisocks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/tcp_minisocks.c 2011-03-21 18:31:35.000000000 -0400
@@ -27,6 +27,10 @@
#include <net/inet_common.h>
#include <net/xfrm.h>
int sysctl_tcp_syncookies __read_mostly = 1;
EXPORT_SYMBOL(sysctl_tcp_syncookies);
-@@ -700,6 +704,10 @@ listen_overflow:
+@@ -745,6 +749,10 @@ listen_overflow:
embryonic_reset:
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS);
if (!(flg & TCP_FLAG_RST))
req->rsk_ops->send_reset(sk, skb);
-diff -urNp linux-2.6.37.2/net/ipv4/tcp_probe.c linux-2.6.37.2/net/ipv4/tcp_probe.c
---- linux-2.6.37.2/net/ipv4/tcp_probe.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/tcp_probe.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/tcp_probe.c linux-2.6.38.1/net/ipv4/tcp_probe.c
+--- linux-2.6.38.1/net/ipv4/tcp_probe.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/tcp_probe.c 2011-03-21 18:31:35.000000000 -0400
@@ -202,7 +202,7 @@ static ssize_t tcpprobe_read(struct file
if (cnt + width >= len)
break;
return -EFAULT;
cnt += width;
}
-diff -urNp linux-2.6.37.2/net/ipv4/tcp_timer.c linux-2.6.37.2/net/ipv4/tcp_timer.c
---- linux-2.6.37.2/net/ipv4/tcp_timer.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/tcp_timer.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/tcp_timer.c linux-2.6.38.1/net/ipv4/tcp_timer.c
+--- linux-2.6.38.1/net/ipv4/tcp_timer.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/tcp_timer.c 2011-03-21 18:31:35.000000000 -0400
@@ -22,6 +22,10 @@
#include <linux/gfp.h>
#include <net/tcp.h>
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-2.6.37.2/net/ipv4/udp.c linux-2.6.37.2/net/ipv4/udp.c
---- linux-2.6.37.2/net/ipv4/udp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv4/udp.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv4/udp.c linux-2.6.38.1/net/ipv4/udp.c
+--- linux-2.6.38.1/net/ipv4/udp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv4/udp.c 2011-03-21 18:31:35.000000000 -0400
@@ -86,6 +86,7 @@
#include <linux/types.h>
#include <linux/fcntl.h>
daddr = inet->inet_daddr;
dport = inet->inet_dport;
/* Open fast path for connected socket.
-@@ -1141,6 +1158,10 @@ try_again:
+@@ -1139,6 +1156,10 @@ try_again:
if (!skb)
goto out;
ulen = skb->len - sizeof(struct udphdr);
if (len > ulen)
len = ulen;
-@@ -1625,6 +1646,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
+@@ -1623,6 +1644,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
goto csum_error;
UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
/*
-@@ -2052,7 +2076,12 @@ static void udp4_format_sock(struct sock
+@@ -2050,7 +2074,12 @@ static void udp4_format_sock(struct sock
sk_wmem_alloc_get(sp),
sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
atomic_read(&sp->sk_drops), len);
}
-diff -urNp linux-2.6.37.2/net/ipv6/exthdrs.c linux-2.6.37.2/net/ipv6/exthdrs.c
---- linux-2.6.37.2/net/ipv6/exthdrs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv6/exthdrs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv6/exthdrs.c linux-2.6.38.1/net/ipv6/exthdrs.c
+--- linux-2.6.38.1/net/ipv6/exthdrs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv6/exthdrs.c 2011-03-21 18:31:35.000000000 -0400
@@ -634,7 +634,7 @@ static struct tlvtype_proc tlvprochopopt
.type = IPV6_TLV_JUMBO,
.func = ipv6_hop_jumbo,
};
int ipv6_parse_hopopts(struct sk_buff *skb)
-diff -urNp linux-2.6.37.2/net/ipv6/raw.c linux-2.6.37.2/net/ipv6/raw.c
---- linux-2.6.37.2/net/ipv6/raw.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv6/raw.c 2011-01-17 02:41:02.000000000 -0500
-@@ -601,7 +601,7 @@ out:
+diff -urNp linux-2.6.38.1/net/ipv6/raw.c linux-2.6.38.1/net/ipv6/raw.c
+--- linux-2.6.38.1/net/ipv6/raw.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv6/raw.c 2011-03-21 18:31:35.000000000 -0400
+@@ -602,7 +602,7 @@ out:
return err;
}
struct flowi *fl, struct dst_entry **dstp,
unsigned int flags)
{
-@@ -1243,7 +1243,13 @@ static void raw6_sock_seq_show(struct se
+@@ -1262,7 +1262,13 @@ static void raw6_sock_seq_show(struct se
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
}
static int raw6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.37.2/net/ipv6/tcp_ipv6.c linux-2.6.37.2/net/ipv6/tcp_ipv6.c
---- linux-2.6.37.2/net/ipv6/tcp_ipv6.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv6/tcp_ipv6.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv6/tcp_ipv6.c linux-2.6.38.1/net/ipv6/tcp_ipv6.c
+--- linux-2.6.38.1/net/ipv6/tcp_ipv6.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv6/tcp_ipv6.c 2011-03-21 18:31:35.000000000 -0400
@@ -92,6 +92,10 @@ static struct tcp_md5sig_key *tcp_v6_md5
}
#endif
static void tcp_v6_hash(struct sock *sk)
{
if (sk->sk_state != TCP_CLOSE) {
-@@ -1631,6 +1635,9 @@ static int tcp_v6_do_rcv(struct sock *sk
+@@ -1676,6 +1680,9 @@ static int tcp_v6_do_rcv(struct sock *sk
return 0;
reset:
tcp_v6_send_reset(sk, skb);
discard:
if (opt_skb)
-@@ -1710,12 +1717,20 @@ static int tcp_v6_rcv(struct sk_buff *sk
+@@ -1755,12 +1762,20 @@ static int tcp_v6_rcv(struct sk_buff *sk
TCP_SKB_CB(skb)->sacked = 0;
sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) {
NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
-@@ -1763,6 +1778,10 @@ no_tcp_socket:
+@@ -1808,6 +1823,10 @@ no_tcp_socket:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
tcp_v6_send_reset(NULL, skb);
}
-@@ -1991,7 +2010,13 @@ static void get_openreq6(struct seq_file
+@@ -2068,7 +2087,13 @@ static void get_openreq6(struct seq_file
uid,
0, /* non standard timer */
0, /* open_requests have no inode */
}
static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
-@@ -2041,7 +2066,12 @@ static void get_tcp6_sock(struct seq_fil
+@@ -2118,7 +2143,12 @@ static void get_tcp6_sock(struct seq_fil
sock_i_uid(sp),
icsk->icsk_probes_out,
sock_i_ino(sp),
jiffies_to_clock_t(icsk->icsk_rto),
jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
-@@ -2076,7 +2106,13 @@ static void get_timewait6_sock(struct se
+@@ -2153,7 +2183,13 @@ static void get_timewait6_sock(struct se
dest->s6_addr32[2], dest->s6_addr32[3], destp,
tw->tw_substate, 0, 0,
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
}
static int tcp6_seq_show(struct seq_file *seq, void *v)
-diff -urNp linux-2.6.37.2/net/ipv6/udp.c linux-2.6.37.2/net/ipv6/udp.c
---- linux-2.6.37.2/net/ipv6/udp.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/ipv6/udp.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/ipv6/udp.c linux-2.6.38.1/net/ipv6/udp.c
+--- linux-2.6.38.1/net/ipv6/udp.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/ipv6/udp.c 2011-03-21 18:31:35.000000000 -0400
@@ -50,6 +50,10 @@
#include <linux/seq_file.h>
#include "udp_impl.h"
atomic_read(&sp->sk_drops));
}
-diff -urNp linux-2.6.37.2/net/irda/ircomm/ircomm_tty.c linux-2.6.37.2/net/irda/ircomm/ircomm_tty.c
---- linux-2.6.37.2/net/irda/ircomm/ircomm_tty.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/irda/ircomm/ircomm_tty.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/net/irda/ircomm/ircomm_tty.c linux-2.6.38.1/net/irda/ircomm/ircomm_tty.c
+--- linux-2.6.38.1/net/irda/ircomm/ircomm_tty.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/irda/ircomm/ircomm_tty.c 2011-03-21 18:31:35.000000000 -0400
@@ -281,16 +281,16 @@ static int ircomm_tty_block_til_ready(st
add_wait_queue(&self->open_wait, &wait);
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.37.2/net/key/af_key.c linux-2.6.37.2/net/key/af_key.c
---- linux-2.6.37.2/net/key/af_key.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/key/af_key.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/key/af_key.c linux-2.6.38.1/net/key/af_key.c
+--- linux-2.6.38.1/net/key/af_key.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/key/af_key.c 2011-03-21 18:31:35.000000000 -0400
@@ -3644,7 +3644,11 @@ static int pfkey_seq_show(struct seq_fil
seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n");
else
atomic_read(&s->sk_refcnt),
sk_rmem_alloc_get(s),
sk_wmem_alloc_get(s),
-diff -urNp linux-2.6.37.2/net/mac80211/ieee80211_i.h linux-2.6.37.2/net/mac80211/ieee80211_i.h
---- linux-2.6.37.2/net/mac80211/ieee80211_i.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/ieee80211_i.h 2011-01-24 18:04:18.000000000 -0500
-@@ -26,6 +26,7 @@
+diff -urNp linux-2.6.38.1/net/mac80211/ieee80211_i.h linux-2.6.38.1/net/mac80211/ieee80211_i.h
+--- linux-2.6.38.1/net/mac80211/ieee80211_i.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/ieee80211_i.h 2011-03-21 18:31:35.000000000 -0400
+@@ -27,6 +27,7 @@
#include <net/ieee80211_radiotap.h>
#include <net/cfg80211.h>
#include <net/mac80211.h>
#include "key.h"
#include "sta_info.h"
-@@ -704,7 +705,7 @@ struct ieee80211_local {
+@@ -716,7 +717,7 @@ struct ieee80211_local {
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
spinlock_t queue_stop_reason_lock;
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.37.2/net/mac80211/iface.c linux-2.6.37.2/net/mac80211/iface.c
---- linux-2.6.37.2/net/mac80211/iface.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/iface.c 2011-01-24 18:04:18.000000000 -0500
-@@ -216,7 +216,7 @@ static int ieee80211_do_open(struct net_
+diff -urNp linux-2.6.38.1/net/mac80211/iface.c linux-2.6.38.1/net/mac80211/iface.c
+--- linux-2.6.38.1/net/mac80211/iface.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/iface.c 2011-03-21 18:31:35.000000000 -0400
+@@ -211,7 +211,7 @@ static int ieee80211_do_open(struct net_
break;
}
res = drv_start(local);
if (res)
goto err_del_bss;
-@@ -238,7 +238,7 @@ static int ieee80211_do_open(struct net_
+@@ -235,7 +235,7 @@ static int ieee80211_do_open(struct net_
memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
if (!is_valid_ether_addr(dev->dev_addr)) {
drv_stop(local);
return -EADDRNOTAVAIL;
}
-@@ -335,7 +335,7 @@ static int ieee80211_do_open(struct net_
+@@ -327,7 +327,7 @@ static int ieee80211_do_open(struct net_
mutex_unlock(&local->mtx);
if (coming_up)
if (hw_reconf_flags) {
ieee80211_hw_config(local, hw_reconf_flags);
-@@ -355,7 +355,7 @@ static int ieee80211_do_open(struct net_
+@@ -347,7 +347,7 @@ static int ieee80211_do_open(struct net_
err_del_interface:
drv_remove_interface(local, &sdata->vif);
err_stop:
drv_stop(local);
err_del_bss:
sdata->bss = NULL;
-@@ -481,7 +481,7 @@ static void ieee80211_do_stop(struct iee
+@@ -473,7 +473,7 @@ static void ieee80211_do_stop(struct iee
}
if (going_down)
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
-@@ -552,7 +552,7 @@ static void ieee80211_do_stop(struct iee
+@@ -532,7 +532,7 @@ static void ieee80211_do_stop(struct iee
ieee80211_recalc_ps(local, -1);
if (local->ops->napi_poll)
napi_disable(&local->napi);
ieee80211_clear_tx_pending(local);
-diff -urNp linux-2.6.37.2/net/mac80211/main.c linux-2.6.37.2/net/mac80211/main.c
---- linux-2.6.37.2/net/mac80211/main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/main.c 2011-01-24 18:04:18.000000000 -0500
-@@ -159,7 +159,7 @@ int ieee80211_hw_config(struct ieee80211
+diff -urNp linux-2.6.38.1/net/mac80211/main.c linux-2.6.38.1/net/mac80211/main.c
+--- linux-2.6.38.1/net/mac80211/main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/main.c 2011-03-21 18:31:35.000000000 -0400
+@@ -161,7 +161,7 @@ int ieee80211_hw_config(struct ieee80211
local->hw.conf.power_level = power;
}
ret = drv_config(local, changed);
/*
* Goal:
-diff -urNp linux-2.6.37.2/net/mac80211/pm.c linux-2.6.37.2/net/mac80211/pm.c
---- linux-2.6.37.2/net/mac80211/pm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/pm.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/net/mac80211/pm.c linux-2.6.38.1/net/mac80211/pm.c
+--- linux-2.6.38.1/net/mac80211/pm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/pm.c 2011-03-21 18:31:35.000000000 -0400
@@ -95,7 +95,7 @@ int __ieee80211_suspend(struct ieee80211
}
ieee80211_stop_device(local);
local->suspended = true;
-diff -urNp linux-2.6.37.2/net/mac80211/rate.c linux-2.6.37.2/net/mac80211/rate.c
---- linux-2.6.37.2/net/mac80211/rate.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/rate.c 2011-01-24 18:04:18.000000000 -0500
-@@ -361,7 +361,7 @@ int ieee80211_init_rate_ctrl_alg(struct
+diff -urNp linux-2.6.38.1/net/mac80211/rate.c linux-2.6.38.1/net/mac80211/rate.c
+--- linux-2.6.38.1/net/mac80211/rate.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/rate.c 2011-03-21 18:31:35.000000000 -0400
+@@ -371,7 +371,7 @@ int ieee80211_init_rate_ctrl_alg(struct
ASSERT_RTNL();
return -EBUSY;
if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
-diff -urNp linux-2.6.37.2/net/mac80211/rc80211_pid_debugfs.c linux-2.6.37.2/net/mac80211/rc80211_pid_debugfs.c
---- linux-2.6.37.2/net/mac80211/rc80211_pid_debugfs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/rc80211_pid_debugfs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/mac80211/rc80211_pid_debugfs.c linux-2.6.38.1/net/mac80211/rc80211_pid_debugfs.c
+--- linux-2.6.38.1/net/mac80211/rc80211_pid_debugfs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/rc80211_pid_debugfs.c 2011-03-21 18:31:35.000000000 -0400
@@ -192,7 +192,7 @@ static ssize_t rate_control_pid_events_r
spin_unlock_irqrestore(&events->lock, status);
return -EFAULT;
return p;
-diff -urNp linux-2.6.37.2/net/mac80211/tx.c linux-2.6.37.2/net/mac80211/tx.c
---- linux-2.6.37.2/net/mac80211/tx.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/tx.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/net/mac80211/tx.c linux-2.6.38.1/net/mac80211/tx.c
+--- linux-2.6.38.1/net/mac80211/tx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/tx.c 2011-03-21 18:31:35.000000000 -0400
@@ -173,7 +173,7 @@ static __le16 ieee80211_duration(struct
return cpu_to_le16(dur);
}
struct net_device *dev)
{
return local == wdev_priv(dev->ieee80211_ptr);
-diff -urNp linux-2.6.37.2/net/mac80211/util.c linux-2.6.37.2/net/mac80211/util.c
---- linux-2.6.37.2/net/mac80211/util.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/mac80211/util.c 2011-01-24 18:04:18.000000000 -0500
-@@ -1111,7 +1111,7 @@ int ieee80211_reconfig(struct ieee80211_
+diff -urNp linux-2.6.38.1/net/mac80211/util.c linux-2.6.38.1/net/mac80211/util.c
+--- linux-2.6.38.1/net/mac80211/util.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/mac80211/util.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1135,7 +1135,7 @@ int ieee80211_reconfig(struct ieee80211_
local->resuming = true;
/* restart hardware */
/*
* Upon resume hardware can sometimes be goofy due to
* various platform / driver / bus issues, so restarting
-diff -urNp linux-2.6.37.2/net/netfilter/Kconfig linux-2.6.37.2/net/netfilter/Kconfig
---- linux-2.6.37.2/net/netfilter/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/netfilter/Kconfig 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/netfilter/Kconfig linux-2.6.38.1/net/netfilter/Kconfig
+--- linux-2.6.38.1/net/netfilter/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/netfilter/Kconfig 2011-03-21 18:31:35.000000000 -0400
@@ -709,6 +709,16 @@ config NETFILTER_XT_MATCH_ESP
To compile it as a module, choose M here. If unsure, say N.
config NETFILTER_XT_MATCH_HASHLIMIT
tristate '"hashlimit" match support'
depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
-diff -urNp linux-2.6.37.2/net/netfilter/Makefile linux-2.6.37.2/net/netfilter/Makefile
---- linux-2.6.37.2/net/netfilter/Makefile 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/netfilter/Makefile 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/netfilter/Makefile linux-2.6.38.1/net/netfilter/Makefile
+--- linux-2.6.38.1/net/netfilter/Makefile 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/netfilter/Makefile 2011-03-21 18:31:35.000000000 -0400
@@ -74,6 +74,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CPU) +=
obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.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.37.2/net/netfilter/nf_conntrack_netlink.c linux-2.6.37.2/net/netfilter/nf_conntrack_netlink.c
---- linux-2.6.37.2/net/netfilter/nf_conntrack_netlink.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/net/netfilter/nf_conntrack_netlink.c 2011-02-27 14:50:36.000000000 -0500
-@@ -758,7 +758,7 @@ static const struct nla_policy tuple_nla
+diff -urNp linux-2.6.38.1/net/netfilter/nf_conntrack_netlink.c linux-2.6.38.1/net/netfilter/nf_conntrack_netlink.c
+--- linux-2.6.38.1/net/netfilter/nf_conntrack_netlink.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/netfilter/nf_conntrack_netlink.c 2011-03-21 18:31:35.000000000 -0400
+@@ -761,7 +761,7 @@ static const struct nla_policy tuple_nla
static int
ctnetlink_parse_tuple(const struct nlattr * const cda[],
struct nf_conntrack_tuple *tuple,
{
struct nlattr *tb[CTA_TUPLE_MAX+1];
int err;
-diff -urNp linux-2.6.37.2/net/netfilter/xt_gradm.c linux-2.6.37.2/net/netfilter/xt_gradm.c
---- linux-2.6.37.2/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.37.2/net/netfilter/xt_gradm.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/netfilter/xt_gradm.c linux-2.6.38.1/net/netfilter/xt_gradm.c
+--- linux-2.6.38.1/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.38.1/net/netfilter/xt_gradm.c 2011-03-21 18:31:35.000000000 -0400
@@ -0,0 +1,51 @@
+/*
+ * gradm match for netfilter
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("ipt_gradm");
+MODULE_ALIAS("ip6t_gradm");
-diff -urNp linux-2.6.37.2/net/netlink/af_netlink.c linux-2.6.37.2/net/netlink/af_netlink.c
---- linux-2.6.37.2/net/netlink/af_netlink.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/netlink/af_netlink.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1991,13 +1991,21 @@ static int netlink_seq_show(struct seq_f
+diff -urNp linux-2.6.38.1/net/netlink/af_netlink.c linux-2.6.38.1/net/netlink/af_netlink.c
+--- linux-2.6.38.1/net/netlink/af_netlink.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/netlink/af_netlink.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2001,13 +2001,21 @@ static int netlink_seq_show(struct seq_f
struct netlink_sock *nlk = nlk_sk(s);
seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d %-8lu\n",
atomic_read(&s->sk_refcnt),
atomic_read(&s->sk_drops),
sock_i_ino(s)
-diff -urNp linux-2.6.37.2/net/netrom/af_netrom.c linux-2.6.37.2/net/netrom/af_netrom.c
---- linux-2.6.37.2/net/netrom/af_netrom.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/netrom/af_netrom.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/netrom/af_netrom.c linux-2.6.38.1/net/netrom/af_netrom.c
+--- linux-2.6.38.1/net/netrom/af_netrom.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/netrom/af_netrom.c 2011-03-21 18:31:35.000000000 -0400
@@ -840,6 +840,7 @@ static int nr_getname(struct socket *soc
struct sock *sk = sock->sk;
struct nr_sock *nr = nr_sk(sk);
sax->fsa_ax25.sax25_call = nr->source_addr;
*uaddr_len = sizeof(struct sockaddr_ax25);
}
-diff -urNp linux-2.6.37.2/net/packet/af_packet.c linux-2.6.37.2/net/packet/af_packet.c
---- linux-2.6.37.2/net/packet/af_packet.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/packet/af_packet.c 2011-01-17 02:41:02.000000000 -0500
-@@ -2123,7 +2123,7 @@ static int packet_getsockopt(struct sock
+diff -urNp linux-2.6.38.1/net/packet/af_packet.c linux-2.6.38.1/net/packet/af_packet.c
+--- linux-2.6.38.1/net/packet/af_packet.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/packet/af_packet.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2134,7 +2134,7 @@ static int packet_getsockopt(struct sock
case PACKET_HDRLEN:
if (len > sizeof(int))
len = sizeof(int);
return -EFAULT;
switch (val) {
case TPACKET_V1:
-@@ -2161,7 +2161,7 @@ static int packet_getsockopt(struct sock
+@@ -2172,7 +2172,7 @@ static int packet_getsockopt(struct sock
if (put_user(len, optlen))
return -EFAULT;
return -EFAULT;
return 0;
}
-@@ -2640,7 +2640,11 @@ static int packet_seq_show(struct seq_fi
+@@ -2684,7 +2684,11 @@ static int packet_seq_show(struct seq_fi
seq_printf(seq,
"%p %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n",
atomic_read(&s->sk_refcnt),
s->sk_type,
ntohs(po->num),
-diff -urNp linux-2.6.37.2/net/phonet/af_phonet.c linux-2.6.37.2/net/phonet/af_phonet.c
---- linux-2.6.37.2/net/phonet/af_phonet.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/phonet/af_phonet.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/phonet/af_phonet.c linux-2.6.38.1/net/phonet/af_phonet.c
+--- linux-2.6.38.1/net/phonet/af_phonet.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/phonet/af_phonet.c 2011-03-21 18:31:35.000000000 -0400
@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_pr
{
struct phonet_protocol *pp;
return -EINVAL;
err = proto_register(pp->prot, 1);
-diff -urNp linux-2.6.37.2/net/phonet/socket.c linux-2.6.37.2/net/phonet/socket.c
---- linux-2.6.37.2/net/phonet/socket.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/phonet/socket.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/phonet/socket.c linux-2.6.38.1/net/phonet/socket.c
+--- linux-2.6.38.1/net/phonet/socket.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/phonet/socket.c 2011-03-21 18:31:35.000000000 -0400
@@ -637,7 +637,12 @@ static int pn_sock_seq_show(struct seq_f
sk->sk_state,
sk_wmem_alloc_get(sk), sk_rmem_alloc_get(sk),
atomic_read(&sk->sk_drops), &len);
}
seq_printf(seq, "%*s\n", 127 - len, "");
-diff -urNp linux-2.6.37.2/net/rxrpc/ar-key.c linux-2.6.37.2/net/rxrpc/ar-key.c
---- linux-2.6.37.2/net/rxrpc/ar-key.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/rxrpc/ar-key.c 2011-02-27 15:02:18.000000000 -0500
-@@ -89,11 +89,11 @@ static int rxrpc_instantiate_xdr_rxkad(s
- return ret;
-
- plen -= sizeof(*token);
-- token = kmalloc(sizeof(*token), GFP_KERNEL);
-+ token = kzalloc(sizeof(*token), GFP_KERNEL);
- if (!token)
- return -ENOMEM;
-
-- token->kad = kmalloc(plen, GFP_KERNEL);
-+ token->kad = kzalloc(plen, GFP_KERNEL);
- if (!token->kad) {
- kfree(token);
- return -ENOMEM;
-@@ -731,10 +731,10 @@ static int rxrpc_instantiate(struct key
- goto error;
-
- ret = -ENOMEM;
-- token = kmalloc(sizeof(*token), GFP_KERNEL);
-+ token = kzalloc(sizeof(*token), GFP_KERNEL);
- if (!token)
- goto error;
-- token->kad = kmalloc(plen, GFP_KERNEL);
-+ token->kad = kzalloc(plen, GFP_KERNEL);
- if (!token->kad)
- goto error_free;
-
-diff -urNp linux-2.6.37.2/net/sctp/proc.c linux-2.6.37.2/net/sctp/proc.c
---- linux-2.6.37.2/net/sctp/proc.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/sctp/proc.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/sctp/proc.c linux-2.6.38.1/net/sctp/proc.c
+--- linux-2.6.38.1/net/sctp/proc.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/sctp/proc.c 2011-03-21 18:31:35.000000000 -0400
@@ -212,7 +212,12 @@ static int sctp_eps_seq_show(struct seq_
sctp_for_each_hentry(epb, node, &head->chain) {
ep = sctp_ep(epb);
assoc->state, hash,
assoc->assoc_id,
assoc->sndbuf_used,
-diff -urNp linux-2.6.37.2/net/sctp/socket.c linux-2.6.37.2/net/sctp/socket.c
---- linux-2.6.37.2/net/sctp/socket.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/sctp/socket.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/sctp/socket.c linux-2.6.38.1/net/sctp/socket.c
+--- linux-2.6.38.1/net/sctp/socket.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/sctp/socket.c 2011-03-21 18:31:35.000000000 -0400
@@ -1496,7 +1496,7 @@ SCTP_STATIC int sctp_sendmsg(struct kioc
struct sctp_sndrcvinfo *sinfo;
struct sctp_initmsg *sinit;
return -EFAULT;
to += addrlen;
cnt++;
-diff -urNp linux-2.6.37.2/net/socket.c linux-2.6.37.2/net/socket.c
---- linux-2.6.37.2/net/socket.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/socket.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/socket.c linux-2.6.38.1/net/socket.c
+--- linux-2.6.38.1/net/socket.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/socket.c 2011-03-21 18:31:35.000000000 -0400
@@ -88,6 +88,7 @@
#include <linux/nsproxy.h>
#include <linux/magic.h>
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);
-@@ -311,7 +314,7 @@ static struct dentry *sockfs_mount(struc
- return mount_pseudo(fs_type, "socket:", &sockfs_ops, SOCKFS_MAGIC);
+@@ -326,7 +329,7 @@ static struct dentry *sockfs_mount(struc
+ &sockfs_dentry_operations, SOCKFS_MAGIC);
}
-static struct vfsmount *sock_mnt __read_mostly;
static struct file_system_type sock_fs_type = {
.name = "sockfs",
-@@ -1173,6 +1176,8 @@ int __sock_create(struct net *net, int f
+@@ -1174,6 +1177,8 @@ int __sock_create(struct net *net, int f
return -EAFNOSUPPORT;
if (type < 0 || type >= SOCK_MAX)
return -EINVAL;
/* Compatibility.
-@@ -1305,6 +1310,16 @@ SYSCALL_DEFINE3(socket, int, family, int
+@@ -1306,6 +1311,16 @@ SYSCALL_DEFINE3(socket, int, family, int
if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
retval = sock_create(family, type, protocol, &sock);
if (retval < 0)
goto out;
-@@ -1417,6 +1432,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1418,6 +1433,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
if (sock) {
err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address);
if (err >= 0) {
err = security_socket_bind(sock,
(struct sockaddr *)&address,
addrlen);
-@@ -1425,6 +1448,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
+@@ -1426,6 +1449,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
(struct sockaddr *)
&address, addrlen);
}
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1448,10 +1472,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba
+@@ -1449,10 +1473,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba
if ((unsigned)backlog > somaxconn)
backlog = somaxconn;
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1495,6 +1529,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1496,6 +1530,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
newsock->type = sock->type;
newsock->ops = sock->ops;
/*
* We don't need try_module_get here, as the listening socket (sock)
* has the protocol module (sock->ops->owner) held.
-@@ -1533,6 +1579,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
+@@ -1534,6 +1580,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
fd_install(newfd, newfile);
err = newfd;
out_put:
fput_light(sock->file, fput_needed);
out:
-@@ -1565,6 +1613,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1566,6 +1614,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct
int, addrlen)
{
struct socket *sock;
struct sockaddr_storage address;
int err, fput_needed;
-@@ -1575,6 +1624,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct
+@@ -1576,6 +1625,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct
if (err < 0)
goto out_put;
err =
security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
if (err)
-diff -urNp linux-2.6.37.2/net/sunrpc/sched.c linux-2.6.37.2/net/sunrpc/sched.c
---- linux-2.6.37.2/net/sunrpc/sched.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/sunrpc/sched.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/sunrpc/sched.c linux-2.6.38.1/net/sunrpc/sched.c
+--- linux-2.6.38.1/net/sunrpc/sched.c 2011-03-23 17:20:08.000000000 -0400
++++ linux-2.6.38.1/net/sunrpc/sched.c 2011-03-23 17:21:51.000000000 -0400
@@ -234,9 +234,9 @@ static int rpc_wait_bit_killable(void *w
#ifdef RPC_DEBUG
static void rpc_task_set_debuginfo(struct rpc_task *task)
}
#else
static inline void rpc_task_set_debuginfo(struct rpc_task *task)
-diff -urNp linux-2.6.37.2/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.37.2/net/sunrpc/xprtrdma/svc_rdma.c
---- linux-2.6.37.2/net/sunrpc/xprtrdma/svc_rdma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/sunrpc/xprtrdma/svc_rdma.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.38.1/net/sunrpc/xprtrdma/svc_rdma.c
+--- linux-2.6.38.1/net/sunrpc/xprtrdma/svc_rdma.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/sunrpc/xprtrdma/svc_rdma.c 2011-03-21 18:31:35.000000000 -0400
@@ -109,7 +109,7 @@ static int read_reset_stat(ctl_table *ta
len -= *ppos;
if (len > *lenp)
return -EFAULT;
*lenp = len;
*ppos += len;
-diff -urNp linux-2.6.37.2/net/sysctl_net.c linux-2.6.37.2/net/sysctl_net.c
---- linux-2.6.37.2/net/sysctl_net.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/sysctl_net.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/net/sysctl_net.c linux-2.6.38.1/net/sysctl_net.c
+--- linux-2.6.38.1/net/sysctl_net.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/sysctl_net.c 2011-03-21 18:31:35.000000000 -0400
@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ct
struct ctl_table *table)
{
int mode = (table->mode >> 6) & 7;
return (mode << 6) | (mode << 3) | mode;
}
-diff -urNp linux-2.6.37.2/net/tipc/socket.c linux-2.6.37.2/net/tipc/socket.c
---- linux-2.6.37.2/net/tipc/socket.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/tipc/socket.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1475,8 +1475,9 @@ static int connect(struct socket *sock,
+diff -urNp linux-2.6.38.1/net/tipc/socket.c linux-2.6.38.1/net/tipc/socket.c
+--- linux-2.6.38.1/net/tipc/socket.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/tipc/socket.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1447,8 +1447,9 @@ static int connect(struct socket *sock,
} else {
if (res == 0)
res = -ETIMEDOUT;
sock->state = SS_DISCONNECTING;
}
-diff -urNp linux-2.6.37.2/net/unix/af_unix.c linux-2.6.37.2/net/unix/af_unix.c
---- linux-2.6.37.2/net/unix/af_unix.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/net/unix/af_unix.c 2011-02-22 16:05:49.000000000 -0500
-@@ -764,6 +764,12 @@ static struct sock *unix_find_other(stru
+diff -urNp linux-2.6.38.1/net/unix/af_unix.c linux-2.6.38.1/net/unix/af_unix.c
+--- linux-2.6.38.1/net/unix/af_unix.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/unix/af_unix.c 2011-03-21 18:31:35.000000000 -0400
+@@ -765,6 +765,12 @@ static struct sock *unix_find_other(stru
err = -ECONNREFUSED;
if (!S_ISSOCK(inode->i_mode))
goto put_fail;
u = unix_find_socket_byinode(inode);
if (!u)
goto put_fail;
-@@ -784,6 +790,13 @@ static struct sock *unix_find_other(stru
+@@ -785,6 +791,13 @@ static struct sock *unix_find_other(stru
if (u) {
struct dentry *dentry;
dentry = unix_sk(u)->dentry;
if (dentry)
touch_atime(unix_sk(u)->mnt, dentry);
} else
-@@ -869,11 +882,18 @@ static int unix_bind(struct socket *sock
+@@ -870,11 +883,18 @@ static int unix_bind(struct socket *sock
err = security_path_mknod(&nd.path, dentry, mode, 0);
if (err)
goto out_mknod_drop_write;
mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
dput(nd.path.dentry);
nd.path.dentry = dentry;
-@@ -891,6 +911,11 @@ out_mknod_drop_write:
+@@ -892,6 +912,11 @@ out_mknod_drop_write:
goto out_unlock;
}
list = &unix_socket_table[addr->hash];
} else {
list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)];
-@@ -2226,7 +2251,11 @@ static int unix_seq_show(struct seq_file
+@@ -2235,7 +2260,11 @@ static int unix_seq_show(struct seq_file
unix_state_lock(s);
seq_printf(seq, "%p: %08X %08X %08X %04X %02X %5lu",
atomic_read(&s->sk_refcnt),
0,
s->sk_state == TCP_LISTEN ? __SO_ACCEPTCON : 0,
-diff -urNp linux-2.6.37.2/net/wireless/reg.c linux-2.6.37.2/net/wireless/reg.c
---- linux-2.6.37.2/net/wireless/reg.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/net/wireless/reg.c 2011-02-22 16:05:49.000000000 -0500
-@@ -51,7 +51,7 @@
- printk(KERN_DEBUG format , ## args); \
+diff -urNp linux-2.6.38.1/net/wireless/reg.c linux-2.6.38.1/net/wireless/reg.c
+--- linux-2.6.38.1/net/wireless/reg.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/wireless/reg.c 2011-03-21 18:31:35.000000000 -0400
+@@ -54,7 +54,7 @@
+ printk(KERN_DEBUG pr_fmt(format), ##args); \
} while (0)
#else
-#define REG_DBG_PRINT(args...)
#endif
/* Receipt of information from last regulatory request */
-diff -urNp linux-2.6.37.2/net/wireless/wext-core.c linux-2.6.37.2/net/wireless/wext-core.c
---- linux-2.6.37.2/net/wireless/wext-core.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/wireless/wext-core.c 2011-01-17 02:41:02.000000000 -0500
-@@ -744,8 +744,7 @@ static int ioctl_standard_iw_point(struc
+diff -urNp linux-2.6.38.1/net/wireless/wext-core.c linux-2.6.38.1/net/wireless/wext-core.c
+--- linux-2.6.38.1/net/wireless/wext-core.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/wireless/wext-core.c 2011-03-21 18:31:35.000000000 -0400
+@@ -746,8 +746,7 @@ static int ioctl_standard_iw_point(struc
*/
/* Support for very large requests */
/* Allow userspace to GET more than max so
* we can support any size GET requests.
* There is still a limit : -ENOMEM.
-@@ -782,22 +781,6 @@ static int ioctl_standard_iw_point(struc
+@@ -784,22 +783,6 @@ static int ioctl_standard_iw_point(struc
}
}
err = handler(dev, info, (union iwreq_data *) iwp, extra);
iwp->length += essid_compat;
-diff -urNp linux-2.6.37.2/net/x25/x25_facilities.c linux-2.6.37.2/net/x25/x25_facilities.c
---- linux-2.6.37.2/net/x25/x25_facilities.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/x25/x25_facilities.c 2011-01-17 02:41:02.000000000 -0500
-@@ -157,7 +157,8 @@ int x25_parse_facilities(struct sk_buff
+diff -urNp linux-2.6.38.1/net/x25/x25_facilities.c linux-2.6.38.1/net/x25/x25_facilities.c
+--- linux-2.6.38.1/net/x25/x25_facilities.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/x25/x25_facilities.c 2011-03-21 18:31:35.000000000 -0400
+@@ -167,7 +167,8 @@ int x25_parse_facilities(struct sk_buff
break;
default:
printk(KERN_DEBUG "X.25: unknown facility %02X,"
break;
}
len -= p[1] + 2;
-diff -urNp linux-2.6.37.2/net/xfrm/xfrm_policy.c linux-2.6.37.2/net/xfrm/xfrm_policy.c
---- linux-2.6.37.2/net/xfrm/xfrm_policy.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/net/xfrm/xfrm_policy.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1504,7 +1504,7 @@ free_dst:
+diff -urNp linux-2.6.38.1/net/xfrm/xfrm_policy.c linux-2.6.38.1/net/xfrm/xfrm_policy.c
+--- linux-2.6.38.1/net/xfrm/xfrm_policy.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/net/xfrm/xfrm_policy.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1507,7 +1507,7 @@ free_dst:
goto out;
}
xfrm_dst_alloc_copy(void **target, void *src, int size)
{
if (!*target) {
-@@ -1516,7 +1516,7 @@ xfrm_dst_alloc_copy(void **target, void
+@@ -1519,7 +1519,7 @@ xfrm_dst_alloc_copy(void **target, void
return 0;
}
xfrm_dst_update_parent(struct dst_entry *dst, struct xfrm_selector *sel)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-@@ -1528,7 +1528,7 @@ xfrm_dst_update_parent(struct dst_entry
+@@ -1531,7 +1531,7 @@ xfrm_dst_update_parent(struct dst_entry
#endif
}
xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl)
{
#ifdef CONFIG_XFRM_SUB_POLICY
-diff -urNp linux-2.6.37.2/scripts/basic/fixdep.c linux-2.6.37.2/scripts/basic/fixdep.c
---- linux-2.6.37.2/scripts/basic/fixdep.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/basic/fixdep.c 2011-01-17 02:41:02.000000000 -0500
-@@ -222,9 +222,9 @@ static void use_config(char *m, int slen
+diff -urNp linux-2.6.38.1/scripts/basic/fixdep.c linux-2.6.38.1/scripts/basic/fixdep.c
+--- linux-2.6.38.1/scripts/basic/fixdep.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/basic/fixdep.c 2011-03-21 18:31:35.000000000 -0400
+@@ -235,9 +235,9 @@ static void use_config(const char *m, in
- static void parse_config_file(char *map, size_t len)
+ static void parse_config_file(const char *map, size_t len)
{
-- int *end = (int *) (map + len);
-+ unsigned int *end = (unsigned int *) (map + len);
+- const int *end = (const int *) (map + len);
++ const unsigned int *end = (const unsigned int *) (map + len);
/* start at +1, so that p can never be < map */
-- int *m = (int *) map + 1;
-+ unsigned int *m = (unsigned int *) map + 1;
- char *p, *q;
+- const int *m = (const int *) map + 1;
++ const unsigned int *m = (const unsigned int *) map + 1;
+ const char *p, *q;
for (; m < end; m++) {
-@@ -371,7 +371,7 @@ static void print_deps(void)
+@@ -405,7 +405,7 @@ static void print_deps(void)
static void traps(void)
{
static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
-diff -urNp linux-2.6.37.2/scripts/kallsyms.c linux-2.6.37.2/scripts/kallsyms.c
---- linux-2.6.37.2/scripts/kallsyms.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/kallsyms.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/scripts/kallsyms.c linux-2.6.38.1/scripts/kallsyms.c
+--- linux-2.6.38.1/scripts/kallsyms.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/kallsyms.c 2011-03-21 18:31:35.000000000 -0400
@@ -43,10 +43,10 @@ struct text_range {
static unsigned long long _text;
};
#define text_range_text (&text_ranges[0])
#define text_range_inittext (&text_ranges[1])
-diff -urNp linux-2.6.37.2/scripts/mod/file2alias.c linux-2.6.37.2/scripts/mod/file2alias.c
---- linux-2.6.37.2/scripts/mod/file2alias.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/mod/file2alias.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/scripts/mod/file2alias.c linux-2.6.38.1/scripts/mod/file2alias.c
+--- linux-2.6.38.1/scripts/mod/file2alias.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/mod/file2alias.c 2011-03-21 18:31:35.000000000 -0400
@@ -72,7 +72,7 @@ static void device_id_check(const char *
unsigned long size, unsigned long id_size,
void *symval)
sprintf(alias, "dmi*");
-diff -urNp linux-2.6.37.2/scripts/mod/modpost.c linux-2.6.37.2/scripts/mod/modpost.c
---- linux-2.6.37.2/scripts/mod/modpost.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/mod/modpost.c 2011-01-17 02:41:02.000000000 -0500
-@@ -895,6 +895,7 @@ enum mismatch {
+diff -urNp linux-2.6.38.1/scripts/mod/modpost.c linux-2.6.38.1/scripts/mod/modpost.c
+--- linux-2.6.38.1/scripts/mod/modpost.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/mod/modpost.c 2011-03-21 18:31:35.000000000 -0400
+@@ -896,6 +896,7 @@ enum mismatch {
ANY_INIT_TO_ANY_EXIT,
ANY_EXIT_TO_ANY_INIT,
EXPORT_TO_INIT_EXIT,
};
struct sectioncheck {
-@@ -1003,6 +1004,12 @@ const struct sectioncheck sectioncheck[]
+@@ -1004,6 +1005,12 @@ const struct sectioncheck sectioncheck[]
.tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
.mismatch = EXPORT_TO_INIT_EXIT,
.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
}
};
-@@ -1125,10 +1132,10 @@ static Elf_Sym *find_elf_symbol(struct e
+@@ -1126,10 +1133,10 @@ static Elf_Sym *find_elf_symbol(struct e
continue;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
continue;
if (d < 0)
d = addr - sym->st_value;
if (d < distance) {
-@@ -1400,6 +1407,14 @@ static void report_sec_mismatch(const ch
+@@ -1401,6 +1408,14 @@ static void report_sec_mismatch(const ch
tosym, prl_to, prl_to, tosym);
free(prl_to);
break;
}
fprintf(stderr, "\n");
}
-@@ -1723,7 +1738,7 @@ void __attribute__((format(printf, 2, 3)
+@@ -1724,7 +1739,7 @@ void __attribute__((format(printf, 2, 3)
va_end(ap);
}
{
if (buf->size - buf->pos < len) {
buf->size += len + SZ;
-@@ -1935,7 +1950,7 @@ static void write_if_changed(struct buff
+@@ -1936,7 +1951,7 @@ static void write_if_changed(struct buff
if (fstat(fileno(file), &st) < 0)
goto close_write;
goto close_write;
tmp = NOFAIL(malloc(b->pos));
-diff -urNp linux-2.6.37.2/scripts/mod/modpost.h linux-2.6.37.2/scripts/mod/modpost.h
---- linux-2.6.37.2/scripts/mod/modpost.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/mod/modpost.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/scripts/mod/modpost.h linux-2.6.38.1/scripts/mod/modpost.h
+--- linux-2.6.38.1/scripts/mod/modpost.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/mod/modpost.h 2011-03-21 18:31:35.000000000 -0400
@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e
struct buffer {
struct module {
struct module *next;
-diff -urNp linux-2.6.37.2/scripts/mod/sumversion.c linux-2.6.37.2/scripts/mod/sumversion.c
---- linux-2.6.37.2/scripts/mod/sumversion.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/mod/sumversion.c 2011-01-17 02:41:02.000000000 -0500
-@@ -455,7 +455,7 @@ static void write_version(const char *fi
+diff -urNp linux-2.6.38.1/scripts/mod/sumversion.c linux-2.6.38.1/scripts/mod/sumversion.c
+--- linux-2.6.38.1/scripts/mod/sumversion.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/mod/sumversion.c 2011-03-21 18:31:35.000000000 -0400
+@@ -470,7 +470,7 @@ static void write_version(const char *fi
goto out;
}
warn("writing sum in %s failed: %s\n",
filename, strerror(errno));
goto out;
-diff -urNp linux-2.6.37.2/scripts/pnmtologo.c linux-2.6.37.2/scripts/pnmtologo.c
---- linux-2.6.37.2/scripts/pnmtologo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/scripts/pnmtologo.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/scripts/pnmtologo.c linux-2.6.38.1/scripts/pnmtologo.c
+--- linux-2.6.38.1/scripts/pnmtologo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/scripts/pnmtologo.c 2011-03-21 18:31:35.000000000 -0400
@@ -237,14 +237,14 @@ static void write_header(void)
fprintf(out, " * Linux logo %s\n", logoname);
fputs(" */\n\n", out);
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
-diff -urNp linux-2.6.37.2/security/apparmor/lsm.c linux-2.6.37.2/security/apparmor/lsm.c
---- linux-2.6.37.2/security/apparmor/lsm.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/apparmor/lsm.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/apparmor/lsm.c linux-2.6.38.1/security/apparmor/lsm.c
+--- linux-2.6.38.1/security/apparmor/lsm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/apparmor/lsm.c 2011-03-21 18:31:35.000000000 -0400
@@ -619,7 +619,7 @@ static int apparmor_task_setrlimit(struc
return error;
}
.name = "apparmor",
.ptrace_access_check = apparmor_ptrace_access_check,
-diff -urNp linux-2.6.37.2/security/commoncap.c linux-2.6.37.2/security/commoncap.c
---- linux-2.6.37.2/security/commoncap.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/commoncap.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/commoncap.c linux-2.6.38.1/security/commoncap.c
+--- linux-2.6.38.1/security/commoncap.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/commoncap.c 2011-03-21 18:31:35.000000000 -0400
@@ -27,6 +27,7 @@
#include <linux/sched.h>
#include <linux/prctl.h>
if (cred->uid != 0) {
if (bprm->cap_effective)
return 1;
-diff -urNp linux-2.6.37.2/security/integrity/ima/ima_api.c linux-2.6.37.2/security/integrity/ima/ima_api.c
---- linux-2.6.37.2/security/integrity/ima/ima_api.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/integrity/ima/ima_api.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/integrity/ima/ima_api.c linux-2.6.38.1/security/integrity/ima/ima_api.c
+--- linux-2.6.38.1/security/integrity/ima/ima_api.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/integrity/ima/ima_api.c 2011-03-21 18:31:35.000000000 -0400
@@ -75,7 +75,7 @@ void ima_add_violation(struct inode *ino
int result;
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
if (!entry) {
-diff -urNp linux-2.6.37.2/security/integrity/ima/ima_fs.c linux-2.6.37.2/security/integrity/ima/ima_fs.c
---- linux-2.6.37.2/security/integrity/ima/ima_fs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/integrity/ima/ima_fs.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/integrity/ima/ima_fs.c linux-2.6.38.1/security/integrity/ima/ima_fs.c
+--- linux-2.6.38.1/security/integrity/ima/ima_fs.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/integrity/ima/ima_fs.c 2011-03-21 18:31:35.000000000 -0400
@@ -28,12 +28,12 @@
static int valid_policy = 1;
#define TMPBUFLEN 12
return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
}
-diff -urNp linux-2.6.37.2/security/integrity/ima/ima.h linux-2.6.37.2/security/integrity/ima/ima.h
---- linux-2.6.37.2/security/integrity/ima/ima.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/integrity/ima/ima.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/integrity/ima/ima.h linux-2.6.38.1/security/integrity/ima/ima.h
+--- linux-2.6.38.1/security/integrity/ima/ima.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/integrity/ima/ima.h 2011-03-21 18:31:35.000000000 -0400
@@ -85,8 +85,8 @@ void ima_add_violation(struct inode *ino
extern spinlock_t ima_queue_lock;
struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
};
extern struct ima_h_table ima_htable;
-diff -urNp linux-2.6.37.2/security/integrity/ima/ima_queue.c linux-2.6.37.2/security/integrity/ima/ima_queue.c
---- linux-2.6.37.2/security/integrity/ima/ima_queue.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/integrity/ima/ima_queue.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/integrity/ima/ima_queue.c linux-2.6.38.1/security/integrity/ima/ima_queue.c
+--- linux-2.6.38.1/security/integrity/ima/ima_queue.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/integrity/ima/ima_queue.c 2011-03-21 18:31:35.000000000 -0400
@@ -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);
key = ima_hash_key(entry->digest);
hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
return 0;
-diff -urNp linux-2.6.37.2/security/Kconfig linux-2.6.37.2/security/Kconfig
---- linux-2.6.37.2/security/Kconfig 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/Kconfig 2011-02-12 11:32:56.000000000 -0500
+diff -urNp linux-2.6.38.1/security/Kconfig linux-2.6.38.1/security/Kconfig
+--- linux-2.6.38.1/security/Kconfig 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/Kconfig 2011-03-21 18:31:35.000000000 -0400
@@ -4,6 +4,527 @@
menu "Security options"
config KEYS
bool "Enable access key retention support"
help
-@@ -136,7 +657,7 @@ config INTEL_TXT
+@@ -167,7 +688,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
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.37.2/security/min_addr.c linux-2.6.37.2/security/min_addr.c
---- linux-2.6.37.2/security/min_addr.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/min_addr.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/min_addr.c linux-2.6.38.1/security/min_addr.c
+--- linux-2.6.38.1/security/min_addr.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/min_addr.c 2011-03-21 18:31:35.000000000 -0400
@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG
*/
static void update_mmap_min_addr(void)
}
/*
-diff -urNp linux-2.6.37.2/security/security.c linux-2.6.37.2/security/security.c
---- linux-2.6.37.2/security/security.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/security/security.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/security/security.c linux-2.6.38.1/security/security.c
+--- linux-2.6.38.1/security/security.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/security.c 2011-03-21 18:31:35.000000000 -0400
@@ -25,8 +25,8 @@ static __initdata char chosen_lsm[SECURI
/* things that live in capability.c */
extern void __init security_fixup_ops(struct security_operations *ops);
}
/* Save user chosen LSM */
-diff -urNp linux-2.6.37.2/security/selinux/hooks.c linux-2.6.37.2/security/selinux/hooks.c
---- linux-2.6.37.2/security/selinux/hooks.c 2011-02-27 14:49:17.000000000 -0500
-+++ linux-2.6.37.2/security/selinux/hooks.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/security/selinux/hooks.c linux-2.6.38.1/security/selinux/hooks.c
+--- linux-2.6.38.1/security/selinux/hooks.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/selinux/hooks.c 2011-03-21 18:31:35.000000000 -0400
@@ -90,7 +90,6 @@
#define NUM_SEL_MNT_OPTS 5
.name = "selinux",
.ptrace_access_check = selinux_ptrace_access_check,
-diff -urNp linux-2.6.37.2/security/smack/smack_lsm.c linux-2.6.37.2/security/smack/smack_lsm.c
---- linux-2.6.37.2/security/smack/smack_lsm.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/security/smack/smack_lsm.c 2011-02-22 16:05:49.000000000 -0500
-@@ -3052,7 +3052,7 @@ static int smack_inode_getsecctx(struct
+diff -urNp linux-2.6.38.1/security/smack/smack_lsm.c linux-2.6.38.1/security/smack/smack_lsm.c
+--- linux-2.6.38.1/security/smack/smack_lsm.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/smack/smack_lsm.c 2011-03-21 18:31:35.000000000 -0400
+@@ -3179,7 +3179,7 @@ static int smack_inode_getsecctx(struct
return 0;
}
.name = "smack",
.ptrace_access_check = smack_ptrace_access_check,
-diff -urNp linux-2.6.37.2/security/tomoyo/tomoyo.c linux-2.6.37.2/security/tomoyo/tomoyo.c
---- linux-2.6.37.2/security/tomoyo/tomoyo.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/security/tomoyo/tomoyo.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/security/tomoyo/tomoyo.c linux-2.6.38.1/security/tomoyo/tomoyo.c
+--- linux-2.6.38.1/security/tomoyo/tomoyo.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/security/tomoyo/tomoyo.c 2011-03-21 18:31:35.000000000 -0400
@@ -240,7 +240,7 @@ static int tomoyo_sb_pivotroot(struct pa
* tomoyo_security_ops is a "struct security_operations" which is used for
* registering TOMOYO.
.name = "tomoyo",
.cred_alloc_blank = tomoyo_cred_alloc_blank,
.cred_prepare = tomoyo_cred_prepare,
-diff -urNp linux-2.6.37.2/sound/aoa/codecs/onyx.c linux-2.6.37.2/sound/aoa/codecs/onyx.c
---- linux-2.6.37.2/sound/aoa/codecs/onyx.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/aoa/codecs/onyx.c 2011-01-24 18:04:18.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/aoa/codecs/onyx.c linux-2.6.38.1/sound/aoa/codecs/onyx.c
+--- linux-2.6.38.1/sound/aoa/codecs/onyx.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/aoa/codecs/onyx.c 2011-03-21 18:31:35.000000000 -0400
@@ -54,7 +54,7 @@ struct onyx {
spdif_locked:1,
analog_locked:1,
onyx->spdif_locked = onyx->analog_locked = 0;
mutex_unlock(&onyx->mutex);
-diff -urNp linux-2.6.37.2/sound/aoa/codecs/onyx.h linux-2.6.37.2/sound/aoa/codecs/onyx.h
---- linux-2.6.37.2/sound/aoa/codecs/onyx.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/aoa/codecs/onyx.h 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/aoa/codecs/onyx.h linux-2.6.38.1/sound/aoa/codecs/onyx.h
+--- linux-2.6.38.1/sound/aoa/codecs/onyx.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/aoa/codecs/onyx.h 2011-03-21 18:31:35.000000000 -0400
@@ -11,6 +11,7 @@
#include <linux/i2c.h>
#include <asm/pmac_low_i2c.h>
/* PCM3052 register definitions */
-diff -urNp linux-2.6.37.2/sound/core/oss/pcm_oss.c linux-2.6.37.2/sound/core/oss/pcm_oss.c
---- linux-2.6.37.2/sound/core/oss/pcm_oss.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/core/oss/pcm_oss.c 2011-01-17 02:41:02.000000000 -0500
-@@ -2969,8 +2969,8 @@ static void snd_pcm_oss_proc_done(struct
+diff -urNp linux-2.6.38.1/sound/core/oss/pcm_oss.c linux-2.6.38.1/sound/core/oss/pcm_oss.c
+--- linux-2.6.38.1/sound/core/oss/pcm_oss.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/core/oss/pcm_oss.c 2011-03-21 18:31:35.000000000 -0400
+@@ -2971,8 +2971,8 @@ static void snd_pcm_oss_proc_done(struct
}
}
#else /* !CONFIG_SND_VERBOSE_PROCFS */
#endif /* CONFIG_SND_VERBOSE_PROCFS */
/*
-diff -urNp linux-2.6.37.2/sound/core/seq/seq_lock.h linux-2.6.37.2/sound/core/seq/seq_lock.h
---- linux-2.6.37.2/sound/core/seq/seq_lock.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/core/seq/seq_lock.h 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/core/seq/seq_lock.h linux-2.6.38.1/sound/core/seq/seq_lock.h
+--- linux-2.6.38.1/sound/core/seq/seq_lock.h 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/core/seq/seq_lock.h 2011-03-21 18:31:35.000000000 -0400
@@ -23,10 +23,10 @@ void snd_use_lock_sync_helper(snd_use_lo
#else /* SMP || CONFIG_SND_DEBUG */
#endif /* SMP || CONFIG_SND_DEBUG */
-diff -urNp linux-2.6.37.2/sound/drivers/mts64.c linux-2.6.37.2/sound/drivers/mts64.c
---- linux-2.6.37.2/sound/drivers/mts64.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/drivers/mts64.c 2011-01-25 22:35:55.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/drivers/mts64.c linux-2.6.38.1/sound/drivers/mts64.c
+--- linux-2.6.38.1/sound/drivers/mts64.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/drivers/mts64.c 2011-03-21 18:31:35.000000000 -0400
@@ -28,6 +28,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
return 0;
}
-diff -urNp linux-2.6.37.2/sound/drivers/portman2x4.c linux-2.6.37.2/sound/drivers/portman2x4.c
---- linux-2.6.37.2/sound/drivers/portman2x4.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/drivers/portman2x4.c 2011-01-25 20:24:56.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/drivers/portman2x4.c linux-2.6.38.1/sound/drivers/portman2x4.c
+--- linux-2.6.38.1/sound/drivers/portman2x4.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/drivers/portman2x4.c 2011-03-21 18:31:35.000000000 -0400
@@ -47,6 +47,7 @@
#include <sound/initval.h>
#include <sound/rawmidi.h>
int mode[PORTMAN_NUM_INPUT_PORTS];
struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS];
};
-diff -urNp linux-2.6.37.2/sound/oss/sb_audio.c linux-2.6.37.2/sound/oss/sb_audio.c
---- linux-2.6.37.2/sound/oss/sb_audio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/oss/sb_audio.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/oss/sb_audio.c linux-2.6.38.1/sound/oss/sb_audio.c
+--- linux-2.6.38.1/sound/oss/sb_audio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/oss/sb_audio.c 2011-03-21 18:31:35.000000000 -0400
@@ -901,7 +901,7 @@ sb16_copy_from_user(int dev,
buf16 = (signed short *)(localbuf + localoffs);
while (c)
if (copy_from_user(lbuf8,
userbuf+useroffs + p,
locallen))
-diff -urNp linux-2.6.37.2/sound/oss/swarm_cs4297a.c linux-2.6.37.2/sound/oss/swarm_cs4297a.c
---- linux-2.6.37.2/sound/oss/swarm_cs4297a.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/oss/swarm_cs4297a.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/oss/swarm_cs4297a.c linux-2.6.38.1/sound/oss/swarm_cs4297a.c
+--- linux-2.6.38.1/sound/oss/swarm_cs4297a.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/oss/swarm_cs4297a.c 2011-03-21 18:31:35.000000000 -0400
@@ -2606,7 +2606,6 @@ static int __init cs4297a_init(void)
{
struct cs4297a_state *s;
list_add(&s->list, &cs4297a_devs);
-diff -urNp linux-2.6.37.2/sound/pci/ac97/ac97_codec.c linux-2.6.37.2/sound/pci/ac97/ac97_codec.c
---- linux-2.6.37.2/sound/pci/ac97/ac97_codec.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/ac97/ac97_codec.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1962,7 +1962,7 @@ static int snd_ac97_dev_disconnect(struc
- }
-
- /* build_ops to do nothing */
--static struct snd_ac97_build_ops null_build_ops;
-+static const struct snd_ac97_build_ops null_build_ops;
-
- #ifdef CONFIG_SND_AC97_POWER_SAVE
- static void do_update_power(struct work_struct *work)
-diff -urNp linux-2.6.37.2/sound/pci/ac97/ac97_patch.c linux-2.6.37.2/sound/pci/ac97/ac97_patch.c
---- linux-2.6.37.2/sound/pci/ac97/ac97_patch.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/ac97/ac97_patch.c 2011-01-17 02:41:02.000000000 -0500
-@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spd
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_yamaha_ymf743_ops = {
-+static const struct snd_ac97_build_ops patch_yamaha_ymf743_ops = {
- .build_spdif = patch_yamaha_ymf743_build_spdif,
- .build_3d = patch_yamaha_ymf7x3_3d,
- };
-@@ -455,7 +455,7 @@ static int patch_yamaha_ymf753_post_spdi
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_yamaha_ymf753_ops = {
-+static const struct snd_ac97_build_ops patch_yamaha_ymf753_ops = {
- .build_3d = patch_yamaha_ymf7x3_3d,
- .build_post_spdif = patch_yamaha_ymf753_post_spdif
- };
-@@ -502,7 +502,7 @@ static int patch_wolfson_wm9703_specific
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_wolfson_wm9703_ops = {
-+static const struct snd_ac97_build_ops patch_wolfson_wm9703_ops = {
- .build_specific = patch_wolfson_wm9703_specific,
- };
-
-@@ -533,7 +533,7 @@ static int patch_wolfson_wm9704_specific
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_wolfson_wm9704_ops = {
-+static const struct snd_ac97_build_ops patch_wolfson_wm9704_ops = {
- .build_specific = patch_wolfson_wm9704_specific,
- };
-
-@@ -677,7 +677,7 @@ static int patch_wolfson_wm9711_specific
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_wolfson_wm9711_ops = {
-+static const struct snd_ac97_build_ops patch_wolfson_wm9711_ops = {
- .build_specific = patch_wolfson_wm9711_specific,
- };
-
-@@ -871,7 +871,7 @@ static void patch_wolfson_wm9713_resume
- }
- #endif
-
--static struct snd_ac97_build_ops patch_wolfson_wm9713_ops = {
-+static const struct snd_ac97_build_ops patch_wolfson_wm9713_ops = {
- .build_specific = patch_wolfson_wm9713_specific,
- .build_3d = patch_wolfson_wm9713_3d,
- #ifdef CONFIG_PM
-@@ -976,7 +976,7 @@ static int patch_sigmatel_stac97xx_speci
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = {
-+static const struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = {
- .build_3d = patch_sigmatel_stac9700_3d,
- .build_specific = patch_sigmatel_stac97xx_specific
- };
-@@ -1023,7 +1023,7 @@ static int patch_sigmatel_stac9708_speci
- return patch_sigmatel_stac97xx_specific(ac97);
- }
-
--static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
-+static const struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
- .build_3d = patch_sigmatel_stac9708_3d,
- .build_specific = patch_sigmatel_stac9708_specific
- };
-@@ -1252,7 +1252,7 @@ static int patch_sigmatel_stac9758_speci
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = {
-+static const struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = {
- .build_3d = patch_sigmatel_stac9700_3d,
- .build_specific = patch_sigmatel_stac9758_specific
- };
-@@ -1327,7 +1327,7 @@ static int patch_cirrus_build_spdif(stru
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_cirrus_ops = {
-+static const struct snd_ac97_build_ops patch_cirrus_ops = {
- .build_spdif = patch_cirrus_build_spdif
- };
-
-@@ -1384,7 +1384,7 @@ static int patch_conexant_build_spdif(st
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_conexant_ops = {
-+static const struct snd_ac97_build_ops patch_conexant_ops = {
- .build_spdif = patch_conexant_build_spdif
- };
-
+diff -urNp linux-2.6.38.1/sound/pci/ac97/ac97_patch.c linux-2.6.38.1/sound/pci/ac97/ac97_patch.c
+--- linux-2.6.38.1/sound/pci/ac97/ac97_patch.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/pci/ac97/ac97_patch.c 2011-03-21 18:31:35.000000000 -0400
@@ -1486,7 +1486,7 @@ static const struct snd_ac97_res_table a
{ AC97_VIDEO, 0x9f1f },
{ AC97_AUX, 0x9f1f },
};
static int patch_ad1819(struct snd_ac97 * ac97)
-@@ -1560,7 +1560,7 @@ static void patch_ad1881_chained(struct
- }
- }
-
--static struct snd_ac97_build_ops patch_ad1881_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1881_build_ops = {
- #ifdef CONFIG_PM
- .resume = ad18xx_resume
- #endif
-@@ -1647,7 +1647,7 @@ static int patch_ad1885_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_ad1885_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1885_build_ops = {
- .build_specific = &patch_ad1885_specific,
- #ifdef CONFIG_PM
- .resume = ad18xx_resume
-@@ -1674,7 +1674,7 @@ static int patch_ad1886_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_ad1886_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1886_build_ops = {
- .build_specific = &patch_ad1886_specific,
- #ifdef CONFIG_PM
- .resume = ad18xx_resume
-@@ -1881,7 +1881,7 @@ static int patch_ad1981a_specific(struct
- ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
- }
-
--static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1981a_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1981a_specific,
- #ifdef CONFIG_PM
-@@ -1936,7 +1936,7 @@ static int patch_ad1981b_specific(struct
- ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
- }
-
--static struct snd_ac97_build_ops patch_ad1981b_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1981b_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1981b_specific,
- #ifdef CONFIG_PM
-@@ -2075,7 +2075,7 @@ static int patch_ad1888_specific(struct
- return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
- }
-
--static struct snd_ac97_build_ops patch_ad1888_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1888_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1888_specific,
- #ifdef CONFIG_PM
-@@ -2124,7 +2124,7 @@ static int patch_ad1980_specific(struct
- return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
- }
-
--static struct snd_ac97_build_ops patch_ad1980_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1980_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1980_specific,
- #ifdef CONFIG_PM
-@@ -2239,7 +2239,7 @@ static int patch_ad1985_specific(struct
- ARRAY_SIZE(snd_ac97_ad1985_controls));
- }
-
--static struct snd_ac97_build_ops patch_ad1985_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1985_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1985_specific,
- #ifdef CONFIG_PM
-@@ -2531,7 +2531,7 @@ static int patch_ad1986_specific(struct
- ARRAY_SIZE(snd_ac97_ad1985_controls));
- }
-
--static struct snd_ac97_build_ops patch_ad1986_build_ops = {
-+static const struct snd_ac97_build_ops patch_ad1986_build_ops = {
- .build_post_spdif = patch_ad198x_post_spdif,
- .build_specific = patch_ad1986_specific,
- #ifdef CONFIG_PM
-@@ -2636,7 +2636,7 @@ static int patch_alc650_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_alc650_ops = {
-+static const struct snd_ac97_build_ops patch_alc650_ops = {
- .build_specific = patch_alc650_specific,
- .update_jacks = alc650_update_jacks
- };
-@@ -2788,7 +2788,7 @@ static int patch_alc655_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_alc655_ops = {
-+static const struct snd_ac97_build_ops patch_alc655_ops = {
- .build_specific = patch_alc655_specific,
- .update_jacks = alc655_update_jacks
- };
-@@ -2900,7 +2900,7 @@ static int patch_alc850_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_alc850_ops = {
-+static const struct snd_ac97_build_ops patch_alc850_ops = {
- .build_specific = patch_alc850_specific,
- .update_jacks = alc850_update_jacks
- };
-@@ -2962,7 +2962,7 @@ static int patch_cm9738_specific(struct
- return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
- }
-
--static struct snd_ac97_build_ops patch_cm9738_ops = {
-+static const struct snd_ac97_build_ops patch_cm9738_ops = {
- .build_specific = patch_cm9738_specific,
- .update_jacks = cm9738_update_jacks
- };
-@@ -3053,7 +3053,7 @@ static int patch_cm9739_post_spdif(struc
- return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
- }
-
--static struct snd_ac97_build_ops patch_cm9739_ops = {
-+static const struct snd_ac97_build_ops patch_cm9739_ops = {
- .build_specific = patch_cm9739_specific,
- .build_post_spdif = patch_cm9739_post_spdif,
- .update_jacks = cm9739_update_jacks
-@@ -3227,7 +3227,7 @@ static int patch_cm9761_specific(struct
- return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
- }
-
--static struct snd_ac97_build_ops patch_cm9761_ops = {
-+static const struct snd_ac97_build_ops patch_cm9761_ops = {
- .build_specific = patch_cm9761_specific,
- .build_post_spdif = patch_cm9761_post_spdif,
- .update_jacks = cm9761_update_jacks
-@@ -3323,7 +3323,7 @@ static int patch_cm9780_specific(struct
- return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
- }
-
--static struct snd_ac97_build_ops patch_cm9780_ops = {
-+static const struct snd_ac97_build_ops patch_cm9780_ops = {
- .build_specific = patch_cm9780_specific,
- .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */
- };
-@@ -3443,7 +3443,7 @@ static int patch_vt1616_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_vt1616_ops = {
-+static const struct snd_ac97_build_ops patch_vt1616_ops = {
- .build_specific = patch_vt1616_specific
- };
-
-@@ -3797,7 +3797,7 @@ static int patch_it2646_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_it2646_ops = {
-+static const struct snd_ac97_build_ops patch_it2646_ops = {
- .build_specific = patch_it2646_specific,
- .update_jacks = it2646_update_jacks
- };
-@@ -3831,7 +3831,7 @@ static int patch_si3036_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_si3036_ops = {
-+static const struct snd_ac97_build_ops patch_si3036_ops = {
- .build_specific = patch_si3036_specific,
- };
-
@@ -3864,7 +3864,7 @@ static struct snd_ac97_res_table lm4550_
{ AC97_AUX, 0x1f1f },
{ AC97_PCM, 0x1f1f },
};
static int patch_lm4550(struct snd_ac97 *ac97)
-@@ -3898,7 +3898,7 @@ static int patch_ucb1400_specific(struct
- return 0;
- }
-
--static struct snd_ac97_build_ops patch_ucb1400_ops = {
-+static const struct snd_ac97_build_ops patch_ucb1400_ops = {
- .build_specific = patch_ucb1400_specific,
- };
-
-diff -urNp linux-2.6.37.2/sound/pci/ens1370.c linux-2.6.37.2/sound/pci/ens1370.c
---- linux-2.6.37.2/sound/pci/ens1370.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/ens1370.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/pci/ens1370.c linux-2.6.38.1/sound/pci/ens1370.c
+--- linux-2.6.38.1/sound/pci/ens1370.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/pci/ens1370.c 2011-03-21 18:31:35.000000000 -0400
@@ -452,7 +452,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_audio
{ PCI_VDEVICE(ENSONIQ, 0x5880), 0, }, /* ES1373 - CT5880 */
{ PCI_VDEVICE(ECTIVA, 0x8938), 0, }, /* Ectiva EV1938 */
};
MODULE_DEVICE_TABLE(pci, snd_audiopci_ids);
-diff -urNp linux-2.6.37.2/sound/pci/hda/patch_hdmi.c linux-2.6.37.2/sound/pci/hda/patch_hdmi.c
---- linux-2.6.37.2/sound/pci/hda/patch_hdmi.c 2011-02-22 16:05:31.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/hda/patch_hdmi.c 2011-02-22 16:05:49.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/pci/hda/patch_hdmi.c linux-2.6.38.1/sound/pci/hda/patch_hdmi.c
+--- linux-2.6.38.1/sound/pci/hda/patch_hdmi.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/pci/hda/patch_hdmi.c 2011-03-21 18:31:35.000000000 -0400
@@ -733,10 +733,10 @@ static void hdmi_non_intrinsic_event(str
cp_ready);
}
-diff -urNp linux-2.6.37.2/sound/pci/intel8x0.c linux-2.6.37.2/sound/pci/intel8x0.c
---- linux-2.6.37.2/sound/pci/intel8x0.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/intel8x0.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/pci/intel8x0.c linux-2.6.38.1/sound/pci/intel8x0.c
+--- linux-2.6.38.1/sound/pci/intel8x0.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/pci/intel8x0.c 2011-03-21 18:31:35.000000000 -0400
@@ -444,7 +444,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_intel
{ PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
{ PCI_VDEVICE(AMD, 0x7445), DEVICE_INTEL }, /* AMD768 */
};
static int __devinit snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock,
-diff -urNp linux-2.6.37.2/sound/pci/intel8x0m.c linux-2.6.37.2/sound/pci/intel8x0m.c
---- linux-2.6.37.2/sound/pci/intel8x0m.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/sound/pci/intel8x0m.c 2011-01-17 02:41:02.000000000 -0500
+diff -urNp linux-2.6.38.1/sound/pci/intel8x0m.c linux-2.6.38.1/sound/pci/intel8x0m.c
+--- linux-2.6.38.1/sound/pci/intel8x0m.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/sound/pci/intel8x0m.c 2011-03-21 18:31:35.000000000 -0400
@@ -239,7 +239,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_intel
{ PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
{ PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */
};
static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
-diff -urNp linux-2.6.37.2/usr/gen_init_cpio.c linux-2.6.37.2/usr/gen_init_cpio.c
---- linux-2.6.37.2/usr/gen_init_cpio.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/usr/gen_init_cpio.c 2011-01-17 02:41:02.000000000 -0500
-@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name,
+diff -urNp linux-2.6.38.1/usr/gen_init_cpio.c linux-2.6.38.1/usr/gen_init_cpio.c
+--- linux-2.6.38.1/usr/gen_init_cpio.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/usr/gen_init_cpio.c 2011-03-21 18:31:35.000000000 -0400
+@@ -305,7 +305,7 @@ static int cpio_mkfile(const char *name,
int retval;
int rc = -1;
int namesize;
mode |= S_IFREG;
-@@ -386,9 +386,10 @@ static char *cpio_replace_env(char *new_
+@@ -394,9 +394,10 @@ static char *cpio_replace_env(char *new_
*env_var = *expanded = '\0';
strncat(env_var, start + 2, end - start - 2);
strncat(expanded, new_location, start - new_location);
} else
break;
}
-diff -urNp linux-2.6.37.2/virt/kvm/kvm_main.c linux-2.6.37.2/virt/kvm/kvm_main.c
---- linux-2.6.37.2/virt/kvm/kvm_main.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37.2/virt/kvm/kvm_main.c 2011-01-17 02:41:02.000000000 -0500
-@@ -1344,6 +1344,7 @@ static int kvm_vcpu_release(struct inode
+diff -urNp linux-2.6.38.1/virt/kvm/kvm_main.c linux-2.6.38.1/virt/kvm/kvm_main.c
+--- linux-2.6.38.1/virt/kvm/kvm_main.c 2011-03-14 21:20:32.000000000 -0400
++++ linux-2.6.38.1/virt/kvm/kvm_main.c 2011-03-21 18:31:35.000000000 -0400
+@@ -1521,7 +1521,7 @@ static int kvm_vcpu_release(struct inode
return 0;
}
-+/* cannot be const */
- static struct file_operations kvm_vcpu_fops = {
+-static struct file_operations kvm_vcpu_fops = {
++static struct file_operations kvm_vcpu_fops = { /* cannot be const */
.release = kvm_vcpu_release,
.unlocked_ioctl = kvm_vcpu_ioctl,
-@@ -1812,6 +1813,7 @@ static int kvm_vm_mmap(struct file *file
+ .compat_ioctl = kvm_vcpu_ioctl,
+@@ -1990,7 +1990,7 @@ static int kvm_vm_mmap(struct file *file
return 0;
}
-+/* cannot be const */
- static struct file_operations kvm_vm_fops = {
+-static struct file_operations kvm_vm_fops = {
++static struct file_operations kvm_vm_fops = { /* cannot be const */
.release = kvm_vm_release,
.unlocked_ioctl = kvm_vm_ioctl,
-@@ -1910,6 +1912,7 @@ out:
+ #ifdef CONFIG_COMPAT
+@@ -2088,7 +2088,7 @@ out:
return r;
}
-+/* cannot be const */
- static struct file_operations kvm_chardev_ops = {
+-static struct file_operations kvm_chardev_ops = {
++static struct file_operations kvm_chardev_ops = { /* cannot be const */
.unlocked_ioctl = kvm_dev_ioctl,
.compat_ioctl = kvm_dev_ioctl,
-@@ -1920,6 +1923,9 @@ static struct miscdevice kvm_dev = {
+ .llseek = noop_llseek,
+@@ -2098,6 +2098,9 @@ static struct miscdevice kvm_dev = {
KVM_MINOR,
"kvm",
&kvm_chardev_ops,
+ NULL
};
- static void hardware_enable(void *junk)
-@@ -2259,7 +2265,7 @@ static void kvm_sched_out(struct preempt
+ static void hardware_enable_nolock(void *junk)
+@@ -2443,7 +2446,7 @@ static void kvm_sched_out(struct preempt
kvm_arch_vcpu_put(vcpu);
}