1 --- linux-2.6.15.6/drivers/input/joystick/iforce/iforce-serio.c 2006-03-05 19:07:54.000000000 +0000
2 +++ linux-2.6.15.6.iforce/drivers/input/joystick/iforce/iforce-serio.c 2006-04-29 23:17:59.000000000 +0000
9 + .proto = 0x1f, // Trust ForceFeedback Race Master
16 --- linux-2.6.27/arch/powerpc/include/asm/io.h~ 2006-06-18 01:49:35.000000000 +0000
17 +++ linux-2.6.27/arch/powerpc/include/asm/io.h 2006-06-22 02:44:19.000000000 +0000
19 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
20 #define page_to_bus(page) (page_to_phys(page) + PCI_DRAM_OFFSET)
22 +#define isa_virt_to_bus virt_to_phys
23 +#define isa_page_to_bus page_to_phys
24 +#define isa_bus_to_virt phys_to_virt
26 /* Enforce in-order execution of data I/O.
27 * No distinction between read/write on PPC; use eieio for all three.
29 --- linux-2.6.27/arch/powerpc/include/asm/suspend.h 2007-07-09 01:32:17.000000000 +0200
30 +++ linux-2.6.27/arch/powerpc/include/asm/suspend.h 2007-08-28 23:26:16.629658848 +0200
32 void save_processor_state(void);
33 void restore_processor_state(void);
35 +#define suspend2_faulted (0)
36 +#define clear_suspend2_fault() do { } while(0)
38 #endif /* __ASM_POWERPC_SUSPEND_H */
39 --- linux-2.6.26/arch/powerpc/kernel/swsusp.c 2008-09-29 00:01:56.000000000 +0200
40 +++ linux-2.6.26/arch/powerpc/kernel/swsusp.c 2008-09-29 00:01:42.000000000 +0200
42 * 2 of the License, or (at your option) any later version.
45 +#include <linux/module.h>
46 #include <linux/sched.h>
47 #include <asm/suspend.h>
48 #include <asm/system.h>
53 +EXPORT_SYMBOL(save_processor_state);
55 void restore_processor_state(void)
58 --- linux-2.6.32/drivers/infiniband/Kconfig~ 2009-12-05 00:26:03.663774916 +0100
59 +++ linux-2.6.32/drivers/infiniband/Kconfig 2009-12-05 00:26:05.914179759 +0100
61 config INFINIBAND_ADDR_TRANS
64 - depends on !(INFINIBAND = y && IPV6 = m)
67 source "drivers/infiniband/hw/mthca/Kconfig"
68 --- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100
69 +++ linux-2.6.33/scripts/mod/modpost.c 2010-03-07 14:26:47.242168558 +0100
74 -#include "../../include/generated/autoconf.h"
75 +// PLD architectures don't use CONFIG_SYMBOL_PREFIX
76 +//#include "../../include/generated/autoconf.h"
77 #include "../../include/linux/license.h"
79 /* Some toolchains use a `_' prefix for all user symbols. */
80 From 799c10559d60f159ab2232203f222f18fa3c4a5f Mon Sep 17 00:00:00 2001
81 From: Linus Torvalds <torvalds@linux-foundation.org>
82 Date: Fri, 15 Oct 2010 11:09:28 -0700
83 Subject: [PATCH] De-pessimize rds_page_copy_user
85 Don't try to "optimize" rds_page_copy_user() by using kmap_atomic() and
86 the unsafe atomic user mode accessor functions. It's actually slower
87 than the straightforward code on any reasonable modern CPU.
89 Back when the code was written (although probably not by the time it was
90 actually merged, though), 32-bit x86 may have been the dominant
91 architecture. And there kmap_atomic() can be a lot faster than kmap()
92 (unless you have very good locality, in which case the virtual address
93 caching by kmap() can overcome all the downsides).
95 But these days, x86-64 may not be more populous, but it's getting there
96 (and if you care about performance, it's definitely already there -
97 you'd have upgraded your CPU's already in the last few years). And on
98 x86-64, the non-kmap_atomic() version is faster, simply because the code
99 is simpler and doesn't have the "re-try page fault" case.
101 People with old hardware are not likely to care about RDS anyway, and
102 the optimization for the 32-bit case is simply buggy, since it doesn't
103 verify the user addresses properly.
105 Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
106 Acked-by: Andrew Morton <akpm@linux-foundation.org>
107 Cc: stable@kernel.org
108 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
110 net/rds/page.c | 27 +++++++--------------------
111 1 files changed, 7 insertions(+), 20 deletions(-)
113 diff --git a/net/rds/page.c b/net/rds/page.c
114 index 595a952..1dfbfea 100644
117 @@ -57,30 +57,17 @@ int rds_page_copy_user(struct page *page, unsigned long offset,
124 rds_stats_add(s_copy_to_user, bytes);
126 + ret = copy_to_user(ptr, addr + offset, bytes);
128 rds_stats_add(s_copy_from_user, bytes);
130 - addr = kmap_atomic(page, KM_USER0);
132 - ret = __copy_to_user_inatomic(ptr, addr + offset, bytes);
134 - ret = __copy_from_user_inatomic(addr + offset, ptr, bytes);
135 - kunmap_atomic(addr, KM_USER0);
140 - ret = copy_to_user(ptr, addr + offset, bytes);
142 - ret = copy_from_user(addr + offset, ptr, bytes);
146 + ret = copy_from_user(addr + offset, ptr, bytes);
151 + return ret ? -EFAULT : 0;
153 EXPORT_SYMBOL_GPL(rds_page_copy_user);